Monitor Building Automation Network Traffic for Security
In this article
Building automation systems (BAS) control your HVAC, lighting, elevators, and access control. They used to be isolated, but now they’re often connected to IT networks and the internet, making them a target for attackers. Monitoring the network traffic of your BAS helps you spot unauthorized access, malware, or misconfigured devices before they cause downtime or safety issues. This guide walks you through setting up basic traffic monitoring without needing a dedicated security team.
What You'll Need
- Access to the network switch or router where BAS devices (controllers, sensors, gateways) connect.
- A computer or server with a spare network port to act as the monitoring station.
- Wireshark (free) or tcpdump (command-line) installed on that machine.
- If your switches don't support port mirroring, you'll need a network TAP (test access point).
- Basic knowledge of IP addressing and how to log into your switch's management interface.
Step-by-Step
- Map your BAS network. Identify which IP subnets or VLANs carry BAS traffic. Common protocols include BACnet/IP (UDP 47808), Modbus TCP (502), and LonWorks (using IP tunneling). Write down the IP addresses of your controllers, the building controller, and any engineering workstations.
- Enable port mirroring (SPAN) on your switch. Log into the switch that connects your BAS devices. Find the port that carries the traffic you want to see (usually the uplink to the BAS server or the port connecting to the BACnet router). Configure a SPAN session to copy traffic from that port to the port where your monitoring machine is plugged in. On Cisco switches, this is
monitor session 1 source interface gi1/0/1andmonitor session 1 destination interface gi1/0/2. For other vendors, look for “Port Mirroring” or “Mirror Port” in the web interface. - Connect your monitoring machine. Plug your computer into the destination port. Make sure it has a static IP on a separate VLAN (or no IP at all) to avoid interfering with the BAS. If you’re using a TAP, connect it inline between the switch and the BAS device, then connect the TAP’s monitor port to your machine.
- Start capturing traffic. Open Wireshark, select the network interface that’s connected to the mirror port, and hit the blue shark fin icon to start. For a quick check, let it run for 10–15 minutes during normal operation. Save the capture file for later analysis.
- Filter for BAS protocols. In Wireshark’s filter bar, type
bacnetormodbusto see only that traffic. You should see regular, periodic messages (e.g., “Who-Is” broadcasts every few seconds). Note the source and destination IPs. If you see unexpected IPs or a device broadcasting constantly, that’s a red flag. - Look for anomalies. Check for: (a) traffic to or from unknown IP addresses, especially on ports 502 or 47808; (b) large bursts of data (e.g., a firmware upload or data exfiltration); (c) repeated failed connection attempts; (d) any traffic on non-standard ports. Use Wireshark’s “Statistics > Conversations” to see which IPs talk most.
- Set up continuous monitoring (optional but recommended). Instead of manual captures, use a tool like Zeek (formerly Bro) or a simple script that runs tcpdump and logs to a file. For example,
tcpdump -i eth0 -w bas_capture.pcapcan run as a service. You can then review logs daily or use a SIEM if you have one. - Create a baseline. After a week of capturing, you’ll know what “normal” looks like. Document the expected traffic patterns: which devices poll which, how often, and at what times. Any deviation from this baseline is worth investigating.
- Respond to alerts. If you see something suspicious, isolate the affected device by disconnecting it from the network or blocking its IP at the firewall. Then investigate the capture logs to understand what happened. Preserve the pcap files as evidence.
Common Mistakes
- Monitoring the wrong port. If you mirror the port that connects to the internet router instead of the BAS controller, you’ll miss the BACnet traffic. Double-check which port carries the BAS traffic.
- Forgetting about VLANs. If your BAS is on a separate VLAN, the mirror port must be configured to copy that VLAN’s traffic. Some switches require you to specify the VLAN in the SPAN configuration.
- Using a computer with a DHCP address. Your monitoring machine might grab an IP that conflicts with a BAS device. Use a static IP outside the BAS range, or no IP at all.
- Ignoring encrypted traffic. Some newer BACnet/SC uses TLS. You won’t see the payload, but you can still see the IP addresses and ports. That’s enough to spot anomalies.
- Not saving captures. If you don’t save the pcap file, you can’t go back to investigate after an incident. Always save your captures.
Tips
- Start small: monitor just one critical controller first, then expand.
- Use a dedicated network switch for the monitoring machine if possible, to avoid loading your production switch.
- Schedule regular reviews of your captures—weekly is a good start.
- If you have a firewall between the BAS and IT network, also monitor its logs for blocked attempts.
- Learn the common BACnet services: Who-Is, I-Am, ReadProperty, WriteProperty. An unexpected WriteProperty to a setpoint could be an attack.
- Consider using a free tool like Wireshark’s “Follow TCP Stream” to see the actual data being sent—but be careful not to expose sensitive building data.
Troubleshooting
- No traffic appears in Wireshark. Check that the mirror port is actually receiving data. Try pinging the BAS controller from another device to generate traffic. Also verify that your monitoring machine’s NIC is in promiscuous mode (Wireshark does this by default). If using a TAP, check the link lights.
- Only broadcast traffic shows up. You might be mirroring the wrong port. The broadcast traffic (like BACnet Who-Is) is sent to all ports, but unicast traffic only goes to the specific port. Mirror the port that connects to the BAS server or router, not the one to a single sensor.
- Wireshark shows “No interface found.” You need to run Wireshark as administrator (Windows) or with sudo (Linux). Also check that the network cable is plugged in.
- Switch performance degrades. Port mirroring can add load to the switch CPU. If you see high CPU usage, reduce the number of mirrored ports or use a TAP instead.
- Can’t log into the switch. Check the default credentials (often printed on the device) and ensure you’re on the correct VLAN. If you’re locked out, contact the vendor or your IT admin.
Frequently Asked Questions
Do I need a special license to monitor BAS traffic?
No, you can use free tools like Wireshark or tcpdump. You only need access to the network infrastructure.
Is it legal to monitor network traffic?
Yes, as long as you own the network or have authorization from the building owner. Do not capture traffic on networks you don’t manage.
What are the most common security issues in BAS networks?
Unpatched controllers, default passwords, exposed BACnet ports on the internet, and malware that spreads from IT networks.
How often should I review the captures?
At least weekly for a small building, daily for critical facilities. Automated alerts are better if you have the tools.
Can I monitor wireless BAS devices?
Yes, if the wireless access point supports mirroring to a wired port. Otherwise, you’d need to capture on the wireless controller.
What if I see a lot of traffic to a strange IP?
Don’t panic. First, verify if that IP is a known vendor or cloud service. If not, block it at the firewall and investigate the device that initiated the connection.