
MODBUS 침투 테스트 프레임워크
#smod smod는 modbus 프로토콜을 펜테스트하기 위해 필요한 모든 종류의 진단 및 공격 기능을 갖춘 모듈형 프레임워크입니다. Python과 Scapy를 사용한 완전한 Modbus 프로토콜 구현입니다. 이 소프트웨어는 python 2.7.x 환경의 Linux/OSX에서 실행할 수 있습니다.
##요약 SCADA(공정 제어 네트워크) 기반 시스템은 최근 몇 년 동안 독점 폐쇄 네트워크에서 오픈소스 솔루션과 TCP/IP 지원 네트워크로 꾸준히 전환되었습니다. 이로 인해 기존 컴퓨터 네트워크가 직면하는 것과 동일한 보안 취약점에 노출되었습니다.
Modbus/TCP 프로토콜은 전력 시스템 프로토콜에 대한 사이버 공격을 수행하는 데 있어 테스트 베드의 효과를 보여주기 위한 참조 프로토콜로 사용되었습니다. Modbus/TCP가 특별히 선택된 이유는 다음과 같습니다:
이 도구를 사용하여 modbus 프로토콜에 대한 취약점 평가를 수행할 수 있습니다.
##데모 기본 기능을 보여주는 간단한 데모입니다.
root@kali:~/smod# python smod.py
_______
< SMOD >
-------
\ ^__^
\ (xx)\_______
(__)\ )\/\
U ||----w |
SMOD >help
Command Description
------- -----------
back Move back from the current context
exit Exit the console
exploit Run module
help Help menu
show Displays modules of a given type, or all modules
set Sets a variable to a value
use Selects a module by name
SMOD >show modules
Modules Description
------- -----------
modbus/function/readCoils Fuzzing Read Coils Function
modbus/function/readDiscreteInput Fuzzing Read Discrete Inputs Function
modbus/function/readHoldingRegister Fuzzing Read Holding Registers Function
modbus/function/readInputRegister Fuzzing Read Input Registers Function
modbus/function/writeSingleCoils Fuzzing Write Single Coil Function
modbus/function/writeSingleRegister Fuzzing Write Single Register Function
modbus/scanner/discover Check Modbus Protocols
modbus/scanner/getfunc Enumeration Function on Modbus
modbus/scanner/uid Brute Force UID
SMOD >
Modbus UID 무차별 대입
SMOD >use modbus/scanner/uid
SMOD modbus(uid) >show options
Name Current Setting Required Description
---- --------------- -------- -----------
Function 1 False Function code, Defualt:Read Coils.
Output True False The stdout save in output directory
RHOSTS True The target address range or CIDR identifier
RPORT 502 False The port number for modbus protocol
Threads 1 False The number of concurrent threads
SMOD modbus(uid) >set RHOSTS 192.168.1.6
SMOD modbus(uid) >exploit
[+] Module Brute Force UID Start
[+] Start Brute Force UID on : 192.168.1.6
[+] UID on 192.168.1.6 is : 10
SMOD modbus(uid) >
Modbus 기능 열거
SMOD >use modbus/scanner/getfunc
SMOD modbus(getfunc) >show options
Name Current Setting Required Description
---- --------------- -------- -----------
Output True False The stdout save in output directory
RHOSTS True The target address range or CIDR identifier
RPORT 502 False The port number for modbus protocol
Threads 1 False The number of concurrent threads
UID None True Modbus Slave UID.
SMOD modbus(getfunc) >set RHOSTS 192.168.1.6
SMOD modbus(getfunc) >set UID 10
SMOD modbus(getfunc) >exploit
[+] Module Get Function Start
[+] Looking for supported function codes on 192.168.1.6
[+] Function Code 1(Read Coils) is supported.
[+] Function Code 2(Read Discrete Inputs) is supported.
[+] Function Code 3(Read Multiple Holding Registers) is supported.
[+] Function Code 4(Read Input Registers) is supported.
[+] Function Code 5(Write Single Coil) is supported.
[+] Function Code 6(Write Single Holding Register) is supported.
[+] Function Code 7(Read Exception Status) is supported.
[+] Function Code 8(Diagnostic) is supported.
[+] Function Code 15(Write Multiple Coils) is supported.
[+] Function Code 16(Write Multiple Holding Registers) is supported.
[+] Function Code 17(Report Slave ID) is supported.
[+] Function Code 20(Read File Record) is supported.
[+] Function Code 21(Write File Record) is supported.
[+] Function Code 22(Mask Write Register) is supported.
[+] Function Code 23(Read/Write Multiple Registers) is supported.
SMOD modbus(getfunc) >