03 Jun Open Source Tools and Cybersecurity for Oil and Gas: A Linux Administrator’s Perspective
You’ve been handed a Linux historian server sitting one hop from a SCADA network and told to “secure it.” The standard CIS Benchmark hardening guide assumes internet connectivity, modern kernels, and maintenance windows. You have none of those. This guide gives you a working security architecture built from open source tools, configured for the specific constraints of oil and gas OT environments.
Quick Summary: Key Takeaways
- Deploy Wazuh, auditd, Zeek, Suricata, and Lynis as your core open source security stack on OT-adjacent Linux hosts.
- Oil and gas Linux environments face unique risks at the OT/IT boundary. Historian servers and HMI systems are the highest-value pivot points for attackers.
- NERC CIP-007, IEC 62443-3-3, and NIST SP 800-82 Rev 3 all map to concrete Linux controls you can implement today.
- Passive monitoring tools like Zeek are non-negotiable in OT environments. Active scanning against PLC subnets can trigger process faults.
- The goal is a defensible, auditable Linux posture that satisfies compliance requirements without breaking real-time data collection.
Prerequisites for This Guide
- Linux distribution: RHEL 8/9, Ubuntu 22.04 LTS, or CentOS Stream 9 on historian/HMI hosts
- Root or sudo access to target systems
- Network SPAN port or tap at the OT/IT boundary for Zeek deployment
- Wazuh manager reachable from OT-adjacent Linux hosts (local network, no cloud dependency)
- Familiarity with auditd rule syntax, nftables, and PAM configuration
Why Oil and Gas Linux Environments Break Standard Hardening Playbooks
Standard Linux hardening assumes you can reboot after a kernel update, run package upgrades on a schedule, and scan your own systems without consequence. In oil and gas, those assumptions fail immediately.
OT/IT convergence in oil and gas refers to the integration of operational technology networks (PLCs, DCS systems, field sensors) with corporate IT infrastructure for data collection and reporting. The Linux hosts caught in the middle (historian servers, HMI systems, engineering workstations) inherit the worst of both worlds: IT-level attack surface with OT-level uptime requirements.
A SCADA-adjacent Linux host is any Linux system with direct network access to industrial control system segments, including historian servers that pull real-time process data from PLCs and push it to enterprise reporting layers. The control system threat landscape requires specialized approaches beyond standard IT hardening, which is why industrial cybersecurity for oil and gas operations increasingly focuses on hardware-enforced boundary controls alongside host-level protections.
Legacy kernel versions are common. Operations teams running OSIsoft PI or Wonderware on RHEL 7 won’t approve a kernel upgrade that requires a reboot of a system collecting pipeline pressure data continuously. That means eBPF-based tooling and modern AppArmor profiles are often off the table. You work with what’s running, not what you’d prefer.
The threat model is also different. Ransomware targeting oil and gas doesn’t just encrypt files; it disrupts operational processes. Nation-state actors have demonstrated interest in pipeline control systems. Insider threats with physical control room access represent a category most enterprise IT hardening guides never address. Your security posture has to account for all three.
The OT/IT Attack Surface: Where Linux Hosts Are Most Exposed
Map your Linux hosts against the Purdue Model zones before you configure anything. The zone determines your threat model and your tool constraints.
Historian Servers: The Primary Pivot Point
Linux historian servers sit at Level 3/3.5 of the Purdue Model, collecting real-time process data from PLCs at Level 1-2 and feeding enterprise reporting at Level 4. That dual connectivity makes them the most common lateral movement path in oil and gas incidents. Compromise a historian, and you have read access to process data and a network path toward field devices.
HMI Systems and Engineering Workstations
HMI systems running Linux have direct write access to field devices. This isn’t data exfiltration territory; this is operational impact territory. A compromised HMI can issue commands to PLCs. Engineering workstations running Linux for simulation or configuration management are frequently under-hardened because they’re classified as IT assets, but they often have OT network routes that IT security teams don’t know exist.
Remote Access Infrastructure
Jump hosts, VPN concentrators, and bastion servers running Linux are the primary initial access vector in oil and gas incidents. These systems face the internet or corporate WAN and connect directly into OT segments. They need the most aggressive hardening posture of any Linux host in your environment.
CVEs targeting industrial Linux software (historian applications, SCADA middleware, OPC servers) are tracked separately from standard Linux CVEs. Check ICS-CERT advisories alongside NVD, because the vulnerability that matters for your historian isn’t in the standard Linux feed.
Best Open Source Cybersecurity Tools for Oil and Gas Linux Environments
Can a Linux administrator realistically defend an oil and gas environment using only open source tools? Yes, with one honest caveat: you’ll have coverage gaps in OT protocol deep inspection that commercial tools address more completely. Here’s what the open source stack gets you.
- Wazuh: A SIEM and host-based intrusion detection platform that runs entirely on-premises, supports air-gapped deployments with a local manager, and accepts custom decoders for ICS-specific log formats from historian and SCADA software.
- Zeek: A passive network traffic analysis engine that generates structured connection logs without active probing, safe for OT network segments where active scanning can trigger process faults.
- Suricata: A network IDS/IPS with community rulesets for Modbus, DNP3, and EtherNet/IP protocol dissection, deployable on a Linux tap host at the OT/IT boundary. Note: Suricata’s native Modbus deep packet inspection requires custom rules. The out-of-box ruleset won’t catch protocol-level anomalies without tuning.
- Lynis: A host-based compliance auditing tool that baselines hardening posture on Linux systems, including historian and HMI hosts, and produces a hardening index score you can use as a proxy compliance metric.
- OpenVAS/Greenbone: A vulnerability scanner you configure with passive-safe scan policies. Disable SYN flood checks and service enumeration against PLC subnets, schedule against Linux management plane only, during maintenance windows.
- auditd: The non-negotiable baseline. Every Linux host in an OT environment needs auditd running with rules specific to ICS operational paths.
| Tool | Active/Passive | OT Protocol Support | Air-Gap Ready | Resource Footprint | Compliance Mapping |
|---|---|---|---|---|---|
| Wazuh | Passive (agent) | Via custom decoders | Yes | Medium | NERC CIP, NIST 800-82 |
| Zeek | Passive only | Modbus, DNP3, EtherNet/IP | Yes | Medium-High | NIST 800-82 SI-4 |
| Suricata | Both | Modbus, DNP3 (with rules) | Yes | High | IEC 62443-3-3 SR 6.2 |
| Lynis | Passive (local) | None | Yes | Low | CIS Benchmark, NERC CIP |
| OpenVAS | Active | Limited | Yes (local) | High | NIST 800-82 RA-5 |
| auditd | Passive (kernel) | None | Yes | Low | NERC CIP-007, IEC 62443 |
Configuring auditd for ICS-Adjacent Linux Hosts
What Default Rules Miss
Default auditd rules don’t watch historian data directories, SCADA application binaries, or USB device insertion events. Those are your three highest-risk audit gaps in an oil and gas environment. Fix them before anything else.
Add these rules to /etc/audit/rules.d/ics-hardening.rules:
# Watch historian data directory for unauthorized writes
-w /opt/osisoft/piserver/data -p wa -k historian_data_write
# Monitor SCADA application binary execution
-w /usr/local/bin/scada_app -p x -k scada_exec
# Detect USB device insertion (common air-gap malware vector)
-a always,exit -F arch=b64 -S open -F path=/dev/bus/usb -k usb_insert
# Audit sudoers changes
-w /etc/sudoers -p wa -k sudoers_change
-w /etc/sudoers.d/ -p wa -k sudoers_change
# Monitor network interface configuration changes
-a always,exit -F arch=b64 -S sethostname -S setdomainname -k network_config
# Capture failed authentication to SCADA service accounts
-w /var/log/auth.log -p wa -k auth_events
On high-throughput historian hosts, excessive syscall auditing can add latency to real-time data collection. Audit by path rather than by syscall where possible, and avoid -a always,exit -S all patterns that generate noise proportional to process I/O volume.
Log Forwarding in Air-Gapped Environments
Configure audisp-remote to ship logs to your Wazuh manager on the IT side of the OT/IT boundary. If the network path doesn’t allow direct TCP connections, use file-based log shipping with rsync over a one-way data diode path. The Wazuh manager ingests auditd log files directly — you don’t need the agent socket to be live for log collection to work.
Compliance Mapping: NERC CIP, IEC 62443, and NIST SP 800-82
How do NERC CIP requirements map to Linux controls?
NERC CIP-007 (Systems Security Management) requires port and service restrictions, patch management documentation, and security event monitoring. On a Linux host, CIP-007 R1 maps to nftables or iptables rules restricting inbound connections to only required ports. CIP-007 R4 maps to auditd and Wazuh agent deployment for event logging. CIP-007 R5 maps to PAM configuration and SSH hardening for authentication controls.
IEC 62443-3-3 Security Levels and Linux Hardening Depth
IEC 62443-3-3 defines Security Levels SL1 through SL4. SL1 requires basic authentication and logging. Auditd plus PAM password controls satisfy this. SL2 adds multi-factor authentication for privileged accounts and network segmentation evidence. SSH key-based auth plus documented nftables rules cover it. SL3 requires continuous monitoring and anomaly detection. Wazuh with custom ICS decoders and Zeek at the OT/IT boundary address this level.
NIST SP 800-82 Rev 3
NIST SP 800-82 Rev 3 is the most Linux-administrator-friendly of the three frameworks. Its control catalog maps closely to NIST SP 800-53, which means CIS Benchmark Level 1 and Level 2 controls satisfy most of the relevant requirements. SI-4 (System Monitoring) maps to Wazuh and Zeek. SI-2 (Flaw Remediation) maps to your offline patch repository workflow. RA-5 (Vulnerability Scanning) maps to OpenVAS with OT-safe scan policies.
Where the frameworks conflict: NERC CIP patch timelines assume IT-style velocity. If you can’t patch a production historian on the required schedule, document compensating controls. Network segmentation evidence, auditd coverage of the vulnerable binary’s execution paths, and application whitelisting via AppArmor all qualify as documented mitigations for unpatched CVEs.
Run lynis audit system on your historian host and check the hardening index score. A score of 70 or above indicates a posture that maps reasonably to NERC CIP-007 audit readiness. Below 60, you have gaps an auditor will flag.
Hardening Historian and HMI Hosts Without Breaking Operations
Service Minimization
Disable everything not required for data collection and replication. But validate against your SCADA vendor’s supported configuration matrix before removing packages. OSIsoft PI and similar historian platforms have documented OS dependency lists — removing a seemingly unused library can break the data collection service silently.
Use systemctl list-units --type=service --state=running to enumerate running services, then cross-reference against your historian vendor’s documentation. Disable non-required services with systemctl disable --now servicename.
Network Filtering and SSH Hardening
Restrict inbound connections on historian hosts to only the PLCs and DCS systems that legitimately push data. Log all drops. A basic nftables ruleset for a historian host looks like this:
nft add rule inet filter input ip saddr 10.0.1.0/24 tcp dport 5450 accept
nft add rule inet filter input ip saddr 10.0.2.5 tcp dport 22 accept
nft add rule inet filter input counter drop log prefix "historian_drop: "
For SSH on OT jump hosts, set these in /etc/ssh/sshd_config:
PermitRootLogin no
PasswordAuthentication no
AllowUsers admin1 admin2
X11Forwarding no
AllowAgentForwarding no
ClientAliveInterval 300
ClientAliveCountMax 2
AppArmor Profiles for Historian Processes
Confine historian application processes to only the filesystem paths and network connections they legitimately require. If you’re on a kernel that supports AppArmor (RHEL 8+ with the apparmor package, Ubuntu 22.04 natively), generate a base profile with aa-genprof while the historian service runs normally, then enforce it. This limits blast radius if the historian process is compromised through an application-layer vulnerability.
Patch Management and Vulnerability Scanning Under OT Constraints
Offline Patch Repositories
Set up a local mirror using apt-mirror (Debian/Ubuntu) or reposync (RHEL/CentOS) on an IT-side server. Synchronize it on a schedule, then configure your air-gapped OT Linux hosts to pull from the local mirror. This gives you patch delivery without direct internet access from OT segments.
OpenVAS Scan Policy for OT Environments
Create a dedicated scan policy in Greenbone that disables the following check categories: denial-of-service tests, brute-force authentication tests, and any checks that generate traffic patterns resembling attacks. Target only the Linux management plane IP addresses, not the OT network segment. Schedule scans during planned maintenance windows and coordinate with operations before running.
Tracking ICS-Specific CVEs
Standard Linux vulnerability feeds don’t include CVEs for historian middleware, OPC servers, or SCADA application layers. Subscribe to ICS-CERT advisories and your SCADA vendor’s security bulletin mailing list separately. The CVE that matters for your OSIsoft PI installation won’t appear in a standard yum updateinfo list cves output.
Oil and Gas Linux Security Checklist
Immediate Actions (Do These Now)
- Deploy auditd with ICS-specific rules covering historian data paths, USB insertion, and sudoers changes. Maps to: NERC CIP-007 R4, IEC 62443-3-3 SR 6.2
- Harden SSH: disable password auth, restrict AllowUsers, set ClientAliveInterval. Maps to: NERC CIP-007 R5, NIST SP 800-82 IA-2
- Run
lynis audit systemand record your baseline hardening index score. Maps to: NERC CIP-007 audit readiness baseline - Disable all non-required services on historian and HMI hosts. Maps to: NERC CIP-007 R1, IEC 62443-3-3 SR 1.1
- Configure nftables to restrict inbound connections and log all drops. Maps to: NERC CIP-007 R1, NIST SP 800-82 SC-7
Short-Term Actions (Within 30 Days)
- Deploy Wazuh agents on all OT-adjacent Linux hosts with a local manager. Maps to: NERC CIP-007 R4, NIST SP 800-82 SI-4
- Deploy Zeek on a network tap at the OT/IT boundary, validate Modbus and DNP3 parser output. Maps to: IEC 62443-3-3 SR 6.2, NIST SP 800-82 SI-4
- Set up an offline patch mirror for air-gapped OT Linux hosts. Maps to: NERC CIP-007 R2, NIST SP 800-82 SI-2
- Configure PAM to prevent interactive login for SCADA service accounts. Maps to: NERC CIP-007 R5, IEC 62443-3-3 SR 1.3
Planned Actions (60-90 Days)
- Author AppArmor profiles for historian application processes. Maps to: IEC 62443-3-3 SL2, NIST SP 800-82 SI-7
- Configure OpenVAS with an OT-safe scan policy and run a baseline vulnerability assessment. Maps to: NIST SP 800-82 RA-5, NERC CIP-007 R2
- Deploy Suricata at the IT/OT boundary with tuned Modbus and DNP3 rulesets. Maps to: IEC 62443-3-3 SR 6.2
- Document compensating controls for any deferred patches, referencing network segmentation and auditd coverage. Maps to: NERC CIP-007 R2 compensating control documentation
Frequently Asked Questions
What is the best SIEM for oil and gas Linux environments?
Wazuh is the strongest open source option for oil and gas Linux environments. It runs entirely on-premises, supports air-gapped deployments with a local manager, and accepts custom decoders for historian and SCADA log formats. Its agent-based architecture works on legacy RHEL and Ubuntu versions common in OT environments.
How do I monitor ICS network traffic on Linux?
Deploy Zeek on a Linux host connected to a SPAN port or network tap at the OT/IT boundary. Zeek’s built-in protocol parsers handle Modbus and DNP3 traffic passively, generating structured connection logs without active probing. Never run active scanning tools like Nmap against PLC subnets — the traffic patterns can trigger process faults on field devices.
Is Wazuh good for SCADA security?
Wazuh covers the Linux host layer well: file integrity monitoring, auditd log ingestion, and custom rule creation for ICS-specific events. It doesn’t natively parse OT network protocols. Pair it with Zeek for network-level visibility to get complete coverage of the SCADA-adjacent Linux host attack surface.
What open source tools are used for ICS security?
The standard open source ICS security stack includes Zeek for passive network analysis, Suricata for IDS at network boundaries, Wazuh for host-based detection and SIEM, auditd for kernel-level audit logging, and Lynis for compliance auditing. OpenVAS handles vulnerability scanning when configured with OT-safe scan policies.
How do you harden Linux in SCADA environments?
Start with service minimization, SSH hardening, and auditd rule deployment — none of these require reboots or risk operational disruption. Add nftables rules to restrict network access to only required connections. Then layer in Wazuh agents and AppArmor profiles during planned maintenance windows. The sequence matters: audit first, then restrict, then monitor.
Your single prioritized next step: run lynis audit system on your highest-risk Linux host today. The hardening index output will tell you exactly where your gaps are, and you can map every flagged item directly to the checklist above. Subscribe to the linuxrockstar.com newsletter for ongoing OT/IT security guides and Linux hardening tutorials built for industrial environments.

Clifford Robinson writes for Linux Rock Star, a blog dedicated to Linux and UNIX security. He specializes in creating high-quality content focused on system auditing, hardening, and compliance, aiming to make these topics accessible and actionable for system administrators, auditors, and developers. Clifford is passionate about providing valuable insights into Linux security, ensuring that the content is both informative and freely available to help readers secure their systems effectively.
Sorry, the comment form is closed at this time.