dark-lbp / isf

ISF(Industrial Control System Exploitation Framework),a exploitation framework based on Python
BSD 2-Clause "Simplified" License
1.02k stars 286 forks source link

S7-1200 module - error: [Errno 104] Connection reset by peer #10

Closed payne747 closed 3 years ago

payne747 commented 3 years ago

Testing the S7-1200 PLC Control module against a real S7-1200 (1212C), when sending the stop command, get:

isf (S7-1200 PLC Control) > set target 192.168.1.190
[+] {'target': '192.168.1.190'}
isf (S7-1200 PLC Control) > set command 2
[+] {'command': '2'}
isf (S7-1200 PLC Control) > run
[*] Running module...
[+] Target is alive
[*] Sending packet to target
[*] reset plc
[-] Traceback (most recent call last):
  File "/root/isf/icssploit/interpreter.py", line 337, in command_run
    self.current_module.run()
  File "/root/isf/icssploit/modules/exploits/plcs/siemens/s7_1200_plc_control.py", line 122, in run
    self.exploit()
  File "/root/isf/icssploit/modules/exploits/plcs/siemens/s7_1200_plc_control.py", line 107, in exploit
    self.start_ctrl(stop_cpu_packet)
  File "/root/isf/icssploit/modules/exploits/plcs/siemens/s7_1200_plc_control.py", line 95, in start_ctrl
    s.recv(1024)
error: [Errno 104] Connection reset by peer
dark-lbp commented 3 years ago

Hi @payne747 what's the s7-1200 firmware version? s7_1200_plc_control module might only work with S7-1200 V3.x firmware.

payne747 commented 3 years ago

It's on 4.4, that might explain it.

dark-lbp commented 3 years ago

Duplicate of #3