Vulnerabilities > CVE-2008-2639 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in Citect Citectfacilities and Citectscada

047910
CVSS 7.6 - HIGH
Attack vector
NETWORK
Attack complexity
HIGH
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
high complexity
citect
CWE-119
exploit available
metasploit

Summary

Stack-based buffer overflow in the ODBC server service in Citect CitectSCADA 6 and 7, and CitectFacilities 7, allows remote attackers to execute arbitrary code via a long string in the second application packet in a TCP session on port 20222. The access complexity for this vulnerability is set at High due to the fact that exploiting this vulnerability requires the SCADA system to be connected to the internet and the client needs to be using ODBC technology. SCADA systems are not typically installed to connect to the internet for security purposes. While the vendor acknowledges that this vulnerability exists and will provide a patch upon request, they point out that this can be easily mitigated by ensuring SCADA systems (not limited to Citect products) are not connected to the internet. The vulnerability found in CitectSCADA could allow a remote un-authenticated attacker to force an abnormal termination of the vulnerable software (Denial of Service) or to execute arbitrary code on vulnerable systems to gain complete control of the software. The CitectSCADA and CitectFacilities applications include ODBC server capabilities to provide remote SQL access to a relational database. For that purpose, an ODBC Server component is used to service requests from clients on TCP/IP networks. Requests are serviced over a TCP high-port in which the application layer protocol reads an initial packet that specifies the length of data and then a second packet of data, of the same length is then read. Once the data is read from the network, it is then copied to an internal buffer of fixed size allocated in the stack without previously verifying that the buffer is big enough to store all the read data. The vulnerability is related to a lack of a proper length-checking on data read from the network. A specially crafted combination of length and data packets could be used to exploit the vulnerability allowing an un-authenticated attacker to execute arbitrary code on vulnerable systems. The bug is a texbook example of classic simple stack-based buffer overflow vulnerabilities of the 1990s that can be exploited by overwriting the return address of the currently running thread. Fixes and Workarounds: User organizations should deploy the vendor patch, which is available upon request at http://www.citect.com/ or disable the vulnerable service (ODBC server) if it is not needed in their particular installation. Citect will provide a patch upon request to mitigate this vulnerability. Please see the following press release for more information: http://www.citect.com/documents/news_and_media/pr-citect-address-security.pdf For further information on properly securing SCADA systems, please see the following whitepaper published by Citect: http://www.citect.com/documents/whitepapers/scada-security-whitepaper.pdf

Vulnerable Configurations

Part Description Count
Application
Citect
3

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Exploit-Db

  • descriptionCitectSCADA ODBC Server Remote Stack Buffer Overflow Exploit (meta). CVE-2008-2639. Remote exploit for windows platform
    fileexploits/windows/remote/6387.rb
    idEDB-ID:6387
    last seen2016-01-31
    modified2008-09-05
    platformwindows
    port2022
    published2008-09-05
    reporterKevin Finisterre
    sourcehttps://www.exploit-db.com/download/6387/
    titleCitectSCADA ODBC Server Remote Stack Buffer Overflow Exploit meta
    typeremote
  • descriptionCitectSCADA/CitectFacilities ODBC Buffer Overflow. CVE-2008-2639. Remote exploit for windows platform
    idEDB-ID:16380
    last seen2016-02-01
    modified2010-11-14
    published2010-11-14
    reportermetasploit
    sourcehttps://www.exploit-db.com/download/16380/
    titleCitectSCADA/CitectFacilities ODBC Buffer Overflow

Metasploit

descriptionThis module exploits a stack buffer overflow in CitectSCADA's ODBC daemon. This has only been tested against Citect v5, v6 and v7.
idMSF:EXPLOIT/WINDOWS/SCADA/CITECT_SCADA_ODBC
last seen2020-03-15
modified2017-11-08
published2010-11-09
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/windows/scada/citect_scada_odbc.rb
titleCitectSCADA/CitectFacilities ODBC Buffer Overflow

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/69709/citect_scada_odbc.rb.txt
idPACKETSTORM:69709
last seen2016-12-05
published2008-09-06
reporterKevin Finisterre
sourcehttps://packetstormsecurity.com/files/69709/citect_scada_odbc.rb.txt.html
titlecitect_scada_odbc.rb.txt

Saint

bid29634
descriptionCitect SCADA ODBC Service Overflow
idmisc_citectscada_ver
osvdb46105
titlecitect_scada_odbc_service_overflow
typeremote

Seebug

bulletinFamilyexploit
descriptionNo description provided by source.
idSSV:9456
last seen2017-11-19
modified2008-09-10
published2008-09-10
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-9456
titleCitectSCADA ODBC Server Remote Stack Buffer Overflow Exploit (meta)