mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
48 lines
1.9 KiB
Markdown
48 lines
1.9 KiB
Markdown
{{#include ../banners/hacktricks-training.md}}
|
|
|
|
# Informacije o protokolu
|
|
|
|
**BACnet** je **protokol komunikacije** za mreže automatizacije i kontrole zgrada (BAC) koji koristi **ASHRAE**, **ANSI** i **ISO 16484-5 standard** protokol. Omogućava komunikaciju među sistemima automatizacije i kontrole zgrada, omogućavajući aplikacije kao što su kontrola HVAC-a, kontrola osvetljenja, kontrola pristupa i sistemi za detekciju požara da razmenjuju informacije. BACnet obezbeđuje interoperabilnost i omogućava kompjuterizovanim uređajima za automatizaciju zgrada da komuniciraju, bez obzira na specifične usluge koje pružaju.
|
|
|
|
**Podrazumevani port:** 47808
|
|
```text
|
|
PORT STATE SERVICE
|
|
47808/udp open BACNet -- Building Automation and Control NetworksEnumerate
|
|
```
|
|
# Enumeracija
|
|
|
|
## Ručno
|
|
```bash
|
|
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
|
|
```
|
|
## Automatski
|
|
```bash
|
|
nmap --script bacnet-info --script-args full=yes -sU -n -sV -p 47808 <IP>
|
|
```
|
|
Ovaj skript ne pokušava da se pridruži BACnet mreži kao strano uređaj, već jednostavno šalje BACnet zahteve direktno na uređaj koji ima IP adresu.
|
|
|
|
## Shodan
|
|
|
|
- `port:47808 instance`
|
|
- `"Instance ID" "Vendor Name"`
|
|
|
|
{{#include ../banners/hacktricks-training.md}}
|