# Informação Básica O Protocolo Modbus é uma estrutura de mensagens desenvolvida pela Modicon em 1979. É usado para estabelecer comunicação mestre-escravo/cliente-servidor entre dispositivos inteligentes. **Porta padrão:** 502 ``` PORT STATE SERVICE 502/tcp open modbus ``` # Enumeração ## Modbus TCP ### Nmap ```bash nmap -sV --script modbus-discover ``` ### Modscan Modscan is a tool that can be used to perform Modbus enumeration and exploitation. ```bash modscan32.exe ``` ### mbtget mbtget is a tool that can be used to read and write Modbus registers. ```bash mbtget -a ``` ### Metasploit Metasploit has a module that can be used to perform Modbus enumeration and exploitation. ```bash use auxiliary/scanner/scada/modbusclient ``` ### Other tools Other tools that can be used for Modbus enumeration and exploitation include: - [CAS Modbus Scanner](https://www.chipkin.com/products/software/modbus-software/cas-modbus-scanner/) - [Simply Modbus](http://www.simplymodbus.ca/) - [Modbus Poll](https://www.modbustools.com/modbus_poll.html) ## Modbus RTU ### mbtget mbtget can also be used to read and write Modbus RTU registers. ```bash mbtget -s /dev/ttyS0 -a ``` ### Other tools Other tools that can be used for Modbus RTU enumeration and exploitation include: - [CAS Modbus Scanner](https://www.chipkin.com/products/software/modbus-software/cas-modbus-scanner/) - [Simply Modbus](http://www.simplymodbus.ca/) - [Modbus Poll](https://www.modbustools.com/modbus_poll.html) ```bash nmap --script modbus-discover -p 502 msf> use auxiliary/scanner/scada/modbusdetect msf> use auxiliary/scanner/scada/modbus_findunitid ```
☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥 - Você trabalha em uma **empresa de segurança cibernética**? Você quer ver sua **empresa anunciada no HackTricks**? ou você quer ter acesso à **última versão do PEASS ou baixar o HackTricks em PDF**? Confira os [**PLANOS DE ASSINATURA**](https://github.com/sponsors/carlospolop)! - Descubra [**A Família PEASS**](https://opensea.io/collection/the-peass-family), nossa coleção exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family) - Adquira o [**swag oficial do PEASS & HackTricks**](https://peass.creator-spring.com) - **Junte-se ao** [**💬**](https://emojipedia.org/speech-balloon/) [**grupo do Discord**](https://discord.gg/hRep4RUj7f) ou ao [**grupo do telegram**](https://t.me/peass) ou **siga-me** no **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.** - **Compartilhe seus truques de hacking enviando PRs para o [repositório hacktricks](https://github.com/carlospolop/hacktricks) e [hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)**.