47808 - Bacnet

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

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


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

47808/udp - BACnet

协议 Information

BACnet is a communications protocol for Building Automation and Control (BAC) networks that leverages the ASHRAE, ANSI, and ISO 16484-5 standard protocol. It facilitates communication among building automation and control systems, enabling applications such as HVAC control, lighting control, access control, and fire detection systems to exchange information. BACnet ensures interoperability and allows computerized building automation devices to communicate, regardless of the specific services they provide.

默认 port: 47808

PORT      STATE SERVICE
47808/udp open  BACNet -- Building Automation and Control NetworksEnumerate

信息收集

Manual

pip3 install BAC0
pip3 install netifaces

import BAC0
import time

myIP = '<Your IP>/<MASK>' #You need to be on the same subnet as the bacnet device. Example: '192.168.1.4/24'
bacnet = BAC0.connect(ip=myIP)
bacnet.whois() #Broadcast request of bacnet devices
time.sleep(5)  #Wait for devices to respond
for i, (deviceId, companyId, devIp, numDeviceId) in enumerate(bacnet.devices):
    print(f"-------- Device #{numDeviceId} --------")
    print(f"Device:     {deviceId}")
    print(f"IP:         {devIp}")
    print(f"Company:    {companyId}")
    readDevice = bacnet.readMultiple(f"{devIp} device {numDeviceId} all")
    print(f"Model Name: {readDevice[11]}")
    print(f"Version:    {readDevice[2]}")
    # print(readDevice) #List all available info about the device

Automatic

nmap --script bacnet-info --script-args full=yes -sU -n -sV -p 47808 <IP>

This script does not attempt to join a BACnet network as a foreign device, it simply sends BACnet requests directly to an IP addressable device.

Shodan

# Shodan 搜索语法
port:47808

ZoomEye

# ZoomEye 搜索语法
port:47808

📖 参考资料