---
title: "502 - Modbus"
weight: 502
date: "2026-03-10T10:03:28+08:00"
lastmod: "2026-03-10T13:26:55+08:00"
---

💡 **学习提示**: 本文档介绍 **Modbus** 的渗透测试方法，适合信息安全初学者和从业人员参考。

⚠️ **法律声明**: 本文档仅供学习和授权测试使用。未经授权的系统测试可能违反法律法规。

---

> ⚠️ **法律声明**: 本文档仅供学习和授权测试使用。未经授权的系统测试可能违反法律法规。

## # 502/tcp - 渗透测试 Modbus 协议

### 基本信息

In 1979, the **Modbus 协议** was developed by Modicon, serving as a messaging structure. Its primary use involves facilitating communication between intelligent devices, operating under a master-slave/client-server model. This protocol plays a crucial role in enabling devices to exchange data efficiently.

**默认 port:** 502

```
PORT    STATE SERVICE
502/tcp open  modbus
```

### 信息收集

```bash
nmap --script modbus-discover -p 502 <IP>
msf> use auxiliary/scanner/scada/modbusdetect
msf> use auxiliary/scanner/scada/modbus_findunitid
```

---

---

---


### 搜索引擎语法

#### FOFA

```bash
# FOFA 搜索语法
port="502"
```

#### Shodan

```bash
# Shodan 搜索语法
port:502
```

#### ZoomEye

```bash
# ZoomEye 搜索语法
port:502
```

---

## 📖 参考资料

- [HackTricks - 502-modbus](https://book.hacktricks.wiki/en/network-services-pentesting/502-modbus.html)

