smod – Kerangka Pentesting MODBUS yang ditulis dengan Python 2

smod - Kerangka Pentesting MODBUS yang ditulis dengan Python 2


Tentang smod
smod adalah kerangka kerja modular dengan setiap jenis fitur diagnostik dan ofensif yang Anda perlukan untuk menguji protokol modbus. Ini adalah implementasi protokol Modbus lengkap menggunakan Python dan Scapy. Perangkat lunak ini dapat dijalankan di Linux dan Mac OS X di bawah python 2.7.x.
Jangan ragu untuk membuat permintaan tarik, jika ada yang menurut Anda bisa kami lakukan lebih baik.

Sistem berbasis Summery SCADA (Process Control Networks) telah berpindah dari jaringan tertutup berpemilik ke solusi open source dan jaringan berkemampuan TCP/IP secara stabil selama beberapa tahun terakhir. Ini telah membuat mereka rentan terhadap kerentanan keamanan yang sama yang dihadapi jaringan komputer tradisional kita.
Protokol Modbus/TCP digunakan sebagai protokol referensi untuk menampilkan efektivitas test bed dalam melakukan serangan cyber pada protokol sistem tenaga. Modbus/TCP dipilih secara khusus untuk alasan berikut:
* modbus masih banyak digunakan dalam sistem tenaga.
* modbus/TCP sederhana dan mudah diimplementasikan.
* Pustaka protokol modbus tersedia secara bebas untuk utilitas untuk mengimplementasikan aplikasi smart grid.

Bacaan Lainnya

Anda dapat menggunakan alat ini untuk menilai kerentanan protokol modbus.

Instal dan Jalankan


   git clone https://github.com/Exploit-install/smod
   cd smod
   pip2 instal scapy &&sudo python2 smod.py


Demo Hanya sedikit demo yang menunjukkan dasar-dasarnya
Menu bantuan

root@kali:~/smod# python smod.py 
_______

-------
^__^
(xx)_______
(__) )/
U ||---w |
|| ||
--=[MODBUS Penetration Test FrameWork
--+--=[Version : 1.0.4
--+--=[Modules : 23
--+--=[Coder : Farzin Enddo
--=[github : www.github.com/enddo

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/dos/arp DOS with Arp Poisoning
modbus/dos/galilRIO DOS Galil RIO-47100
modbus/dos/writeAllCoils DOS With Write All Coils
modbus/dos/writeAllRegister DOS With Write All Register Function
modbus/dos/writeSingleCoils DOS With Write Single Coil Function
modbus/dos/writeSingleRegister DOS Write Single Register Function
modbus/function/fuzzing Fuzzing Modbus Functions
modbus/function/readCoils Fuzzing Read Coils Function
modbus/function/readCoilsException Fuzzing Read Coils Exception Function
modbus/function/readDiscreteInput Fuzzing Read Discrete Inputs Function
modbus/function/readDiscreteInputException Fuzzing Read Discrete Inputs Exception Function
modbus/function/readExceptionStatus Fuzzing Read Exception Status Function
modbus/function/readHoldingRegister Fuzzing Read Holding Registers Function
modbus/function/readHoldingRegisterException Fuzzing Read Holding Registers Exception Function
modbus/function/readInputRegister Fuzzing Read Input Registers Function
modbus/function/readInputRegisterException Fuzzing Read Input Registers Exception Function
modbus/function/writeSingleCoils Fuzzing Write Single Coil Function
modbus/function/writeSingleRegister Fuzzing Write Single Register Function
modbus/scanner/arpWatcher ARP Watcher
modbus/scanner/discover Check Modbus Protocols
modbus/scanner/getfunc Enumeration Function on Modbus
modbus/scanner/uid Brute Force UID
modbus/sniff/arp Arp Poisoning
SMOD >

   BruteForce 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
[+] Modul Brute Force UID Mulai
[+] Mulai Brute Force UID pada : 192.168.1.6
[+] UID pada 192.168.1.6 adalah : 10
Modbus SMOD(uid) >

Fungsi Pencacahan pada 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) >

Fungsi Kumparan Baca Fuzzing

SMOD >use modbus/function/readCoils
SMOD modbus(readCoils) >show options
Name Current Setting Required Description
---- --------------- -------- -----------
Output True False The stdout save in output directory
Quantity 0x0001 True Registers Values.
RHOSTS True The target address range or CIDR identifier
RPORT 502 False The port number for modbus protocol
StartAddr 0x0000 True Start Address.
Threads 1 False The number of concurrent threads
UID None True Modbus Slave UID.
SMOD modbus(readCoils) >set RHOSTS 192.168.1.6
SMOD modbus(readCoils) >set UID 10
SMOD modbus(readCoils) >exploit
[+] Module Read Coils Function Start
[+] Connecting to 192.168.1.6
[+] Response is :
###[ ModbusADU ]###
transId = 0x2
protoId = 0x0
len = 0x4
unitId = 0xa
###[ Read Coils Answer ]###
funcCode = 0x1
byteCount = 1L
coilStatus= [0]
SMOD modbus(readCoils) >

Unduh smod

Pos terkait