diff --git a/network-services-pentesting/47808-udp-bacnet.md b/network-services-pentesting/47808-udp-bacnet.md index 5e6a57ae0..3d960909c 100644 --- a/network-services-pentesting/47808-udp-bacnet.md +++ b/network-services-pentesting/47808-udp-bacnet.md @@ -6,7 +6,7 @@ Otras formas de apoyar a HackTricks: * Si deseas ver tu **empresa anunciada en HackTricks** o **descargar HackTricks en PDF** Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)! * Obtén el [**oficial PEASS & HackTricks swag**](https://peass.creator-spring.com) -* Descubre [**La Familia PEASS**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family) +* Descubre [**The PEASS Family**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family) * **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **síguenos** en **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.** * **Comparte tus trucos de hacking enviando PRs a los** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repositorios de github. @@ -27,13 +27,24 @@ PORT STATE SERVICE ## Manual ```bash pip3 install BAC0 +pip3 install netifaces + import BAC0 -bbmdIP = ':47808' -bbmdTTL = 900 -bacnet = BAC0.connect(bbmdAddress=bbmdIP, bbmdTTL=bbmdTTL) #Connect -bacnet.vendorName.strValue -#I couldn't find how to obtain the same data as nmap with this library or any other -#talk me if you know how please +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 ``` ## Automático ```bash @@ -50,13 +61,13 @@ Este script no intenta unirse a una red BACnet como un dispositivo externo, simp
-Aprende hacking en AWS desde cero hasta experto con htARTE (HackTricks AWS Red Team Expert)! +Aprende hacking en AWS de cero a héroe con htARTE (Experto en Equipos Rojos AWS de HackTricks)! Otras formas de apoyar a HackTricks: * Si deseas ver tu **empresa anunciada en HackTricks** o **descargar HackTricks en PDF** ¡Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)! * Obtén la [**merchandising oficial de PEASS & HackTricks**](https://peass.creator-spring.com) -* Descubre [**The PEASS Family**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family) +* Descubre [**La Familia PEASS**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family) * **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **síguenos** en **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.** * **Comparte tus trucos de hacking enviando PRs a los repositorios de** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud).