{{#include ../banners/hacktricks-training.md}} # 프로토콜 정보 **BACnet**은 **건물 자동화 및 제어**(BAC) 네트워크를 위한 **통신 프로토콜**로, **ASHRAE**, **ANSI**, 및 **ISO 16484-5 표준** 프로토콜을 활용합니다. 이는 건물 자동화 및 제어 시스템 간의 통신을 촉진하여 HVAC 제어, 조명 제어, 출입 통제 및 화재 감지 시스템과 같은 애플리케이션이 정보를 교환할 수 있도록 합니다. BACnet은 상호 운용성을 보장하고, 특정 서비스에 관계없이 컴퓨터화된 건물 자동화 장치가 통신할 수 있도록 합니다. **기본 포트:** 47808 ```text PORT STATE SERVICE 47808/udp open BACNet -- Building Automation and Control NetworksEnumerate ``` # 열거 ## 수동 ```bash pip3 install BAC0 pip3 install netifaces import BAC0 import time myIP = '/' #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 ``` ## 자동화 ```bash nmap --script bacnet-info --script-args full=yes -sU -n -sV -p 47808 ``` 이 스크립트는 외부 장치로서 BACnet 네트워크에 참여하려고 하지 않으며, 단순히 BACnet 요청을 IP 주소가 지정된 장치로 직접 전송합니다. ## Shodan - `port:47808 instance` - `"Instance ID" "Vendor Name"` {{#include ../banners/hacktricks-training.md}}