hacktricks/network-services-pentesting/47808-udp-bacnet.md

75 lines
4.3 KiB
Markdown
Raw Normal View History

<details>
<summary><strong>Apprenez le piratage AWS de zéro à héros avec</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Expert en équipe rouge AWS de HackTricks)</strong></a><strong>!</strong></summary>
Autres façons de soutenir HackTricks:
* Si vous souhaitez voir votre **entreprise annoncée dans HackTricks** ou **télécharger HackTricks en PDF**, consultez les [**PLANS D'ABONNEMENT**](https://github.com/sponsors/carlospolop)!
* Obtenez le [**swag officiel PEASS & HackTricks**](https://peass.creator-spring.com)
* Découvrez [**La famille PEASS**](https://opensea.io/collection/the-peass-family), notre collection exclusive de [**NFTs**](https://opensea.io/collection/the-peass-family)
* **Rejoignez le** 💬 [**groupe Discord**](https://discord.gg/hRep4RUj7f) ou le [**groupe Telegram**](https://t.me/peass) ou **suivez-nous** sur **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* **Partagez vos astuces de piratage en soumettant des PR aux** [**HackTricks**](https://github.com/carlospolop/hacktricks) et [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) dépôts GitHub.
</details>
2022-04-28 16:01:33 +00:00
# Informations sur le protocole
**BACnet** est un **protocole de communication** pour les réseaux de contrôle et d'automatisation des bâtiments (BAC) qui exploite le protocole standard **ASHRAE**, **ANSI** et **ISO 16484-5**. Il facilite la communication entre les systèmes de contrôle et d'automatisation des bâtiments, permettant des applications telles que le contrôle HVAC, le contrôle de l'éclairage, le contrôle d'accès et les systèmes de détection d'incendie d'échanger des informations. BACnet garantit l'interopérabilité et permet aux dispositifs informatisés d'automatisation des bâtiments de communiquer, indépendamment des services spécifiques qu'ils fournissent.
**Port par défaut :** 47808
```text
PORT STATE SERVICE
47808/udp open BACNet -- Building Automation and Control NetworksEnumerate
```
2023-06-03 13:10:46 +00:00
# Énumération
2023-06-03 13:10:46 +00:00
## Manuel
```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
```
2023-06-03 13:10:46 +00:00
## Automatique
```bash
nmap --script bacnet-info --script-args full=yes -sU -n -sV -p 47808 <IP>
```
Ce script ne tente pas de rejoindre un réseau BACnet en tant que périphérique étranger, il envoie simplement des requêtes BACnet directement à un périphérique adressable par IP.
2022-05-01 13:49:36 +01:00
## Shodan
* `port:47808 instance`
* `"ID d'instance" "Nom du fournisseur"`
2022-04-28 16:01:33 +00:00
<details>
<summary><strong>Apprenez le piratage AWS de zéro à héros avec</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Expert Red Team AWS de HackTricks)</strong></a><strong>!</strong></summary>
2022-04-28 16:01:33 +00:00
Autres façons de soutenir HackTricks:
2022-04-28 16:01:33 +00:00
* Si vous souhaitez voir votre **entreprise annoncée dans HackTricks** ou **télécharger HackTricks en PDF**, consultez les [**PLANS D'ABONNEMENT**](https://github.com/sponsors/carlospolop)!
* Obtenez le [**swag officiel PEASS & HackTricks**](https://peass.creator-spring.com)
* Découvrez [**La famille PEASS**](https://opensea.io/collection/the-peass-family), notre collection exclusive de [**NFT**](https://opensea.io/collection/the-peass-family)
* **Rejoignez le** 💬 [**groupe Discord**](https://discord.gg/hRep4RUj7f) ou le [**groupe Telegram**](https://t.me/peass) ou **suivez-nous** sur **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* **Partagez vos astuces de piratage en soumettant des PR aux** [**HackTricks**](https://github.com/carlospolop/hacktricks) et [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) dépôts GitHub.
2022-04-28 16:01:33 +00:00
</details>