|
1 | | -import ComingSoon from '@site/src/components/ComingSoon'; |
| 1 | +--- |
| 2 | +title: "Security Onion" |
| 3 | +description: "Learn about Security Onion — an open-source Linux distribution for intrusion detection, network monitoring, and log management. Explore its architecture, components, and setup for modern SOC environments." |
| 4 | +--- |
2 | 5 |
|
3 | | -<ComingSoon /> |
| 6 | +**Security Onion** is a free and open-source **Linux distribution** for **intrusion detection**, **network security monitoring (NSM)**, and **log management**. It’s widely used in **Security Operations Centers (SOCs)**, **cybersecurity training labs**, and **enterprise monitoring setups**. |
| 7 | + |
| 8 | +Developed and maintained by **Doug Burks** and the Security Onion team, it provides an integrated suite of tools like **Snort**, **Suricata**, **Zeek**, **Wazuh**, and **Elasticsearch** — all preconfigured for rapid deployment. |
| 9 | + |
| 10 | +## Why Security Onion? |
| 11 | + |
| 12 | +Security Onion simplifies complex security infrastructure into a **single, cohesive platform**. |
| 13 | + |
| 14 | +```mermaid |
| 15 | +flowchart TD |
| 16 | + A[Network Traffic] --> B[Packet Capture] |
| 17 | + B --> C[Intrusion Detection - Snort/Suricata] |
| 18 | + B --> D[Protocol Analysis - Zeek] |
| 19 | + B --> E[Log Collection - Wazuh/OSSEC] |
| 20 | + C --> F[Elastic Stack Visualization] |
| 21 | + D --> F |
| 22 | + E --> F[Security Onion Console] |
| 23 | +``` |
| 24 | + |
| 25 | +**In simple terms:** |
| 26 | + |
| 27 | +Security Onion collects, inspects, and visualizes network data — helping analysts **detect**, **investigate**, and **respond** to security threats efficiently. |
| 28 | + |
| 29 | + |
| 30 | +## Core Components |
| 31 | + |
| 32 | +| Component | Description | |
| 33 | +| ----------------------- | ---------------------------------------------------------------------- | |
| 34 | +| **Snort / Suricata** | Network Intrusion Detection Systems (IDS/IPS) | |
| 35 | +| **Zeek (formerly Bro)** | Network analysis framework for protocol and behavior-based detection | |
| 36 | +| **Wazuh / OSSEC** | Host-based intrusion detection (HIDS) and log analysis | |
| 37 | +| **Elastic Stack (ELK)** | Elasticsearch, Logstash, and Kibana — for storing and visualizing logs | |
| 38 | +| **TheHive + Cortex** | Incident response and case management | |
| 39 | +| **CyberChef** | Data decoding, conversion, and analysis tool | |
| 40 | + |
| 41 | +## Architecture Overview |
| 42 | + |
| 43 | +```mermaid |
| 44 | +graph LR |
| 45 | + subgraph "Data Layer" |
| 46 | + A[Network Traffic] |
| 47 | + B[Host Logs] |
| 48 | + end |
| 49 | +
|
| 50 | + subgraph "Collection Layer" |
| 51 | + C1[Snort / Suricata] |
| 52 | + C2[Zeek] |
| 53 | + C3[Wazuh Agents] |
| 54 | + end |
| 55 | +
|
| 56 | + subgraph "Analysis Layer" |
| 57 | + D1[Logstash] |
| 58 | + D2[Elasticsearch] |
| 59 | + D3[TheHive] |
| 60 | + end |
| 61 | +
|
| 62 | + subgraph "Visualization Layer" |
| 63 | + E1[Kibana Dashboards] |
| 64 | + E2[Security Onion Console] |
| 65 | + end |
| 66 | +
|
| 67 | + A --> C1 |
| 68 | + A --> C2 |
| 69 | + B --> C3 |
| 70 | + C1 --> D1 |
| 71 | + C2 --> D1 |
| 72 | + C3 --> D1 |
| 73 | + D1 --> D2 |
| 74 | + D2 --> D3 |
| 75 | + D2 --> E1 |
| 76 | + D3 --> E2 |
| 77 | +``` |
| 78 | + |
| 79 | +This architecture allows real-time traffic inspection, data correlation, and security event visualization from a **single pane of glass**. |
| 80 | + |
| 81 | +## Installation Modes |
| 82 | + |
| 83 | +Security Onion supports three main deployment modes: |
| 84 | + |
| 85 | +| Mode | Use Case | |
| 86 | +| --------------- | ------------------------------------------------------- | |
| 87 | +| **Standalone** | Ideal for labs and small networks | |
| 88 | +| **Distributed** | For enterprise-scale environments with multiple sensors | |
| 89 | +| **Eval Mode** | Quick evaluation using a single VM (best for beginners) | |
| 90 | + |
| 91 | +```bash |
| 92 | +sudo so-setup |
| 93 | +``` |
| 94 | + |
| 95 | +You can select the desired mode during setup and configure sensors, managers, and storage accordingly. |
| 96 | + |
| 97 | +## Workflow: From Detection to Response |
| 98 | + |
| 99 | +```mermaid |
| 100 | +sequenceDiagram |
| 101 | + participant Net as Network Traffic |
| 102 | + participant IDS as IDS/IPS (Snort/Suricata) |
| 103 | + participant Zeek as Zeek |
| 104 | + participant Log as Logstash |
| 105 | + participant ES as Elasticsearch |
| 106 | + participant Kib as Kibana |
| 107 | + participant Hive as TheHive |
| 108 | +
|
| 109 | + Net->>IDS: Detect anomalies |
| 110 | + Net->>Zeek: Analyze protocol behavior |
| 111 | + IDS->>Log: Send alerts/logs |
| 112 | + Zeek->>Log: Send connection metadata |
| 113 | + Log->>ES: Store structured data |
| 114 | + ES->>Kib: Visualize dashboards |
| 115 | + Kib->>Hive: Escalate incidents |
| 116 | +``` |
| 117 | + |
| 118 | +This flow demonstrates how Security Onion provides **end-to-end visibility**, from detection → analysis → investigation → response. |
| 119 | + |
| 120 | +## Log Correlation Formula |
| 121 | + |
| 122 | +To understand correlation mathematically, think of Security Onion’s detection engine as: |
| 123 | + |
| 124 | +$$ |
| 125 | +A(t) = \sum_{i=1}^{n} (E_i \times W_i) |
| 126 | +$$ |
| 127 | + |
| 128 | +Where: |
| 129 | + |
| 130 | +* $ A(t) $: Alert strength at time *t* |
| 131 | +* $ E_i $: Event score (based on severity, frequency, or signature match) |
| 132 | +* $ W_i $: Weight of event importance |
| 133 | + |
| 134 | +Higher $ A(t) $ indicates higher confidence of a real incident — enabling analysts to **prioritize critical alerts** efficiently. |
| 135 | + |
| 136 | +## Real-World Use Cases |
| 137 | + |
| 138 | +| Scenario | Description | |
| 139 | +| --------------------- | ----------------------------------------------------------- | |
| 140 | +| **SOC Operations** | Centralized log management and real-time threat monitoring | |
| 141 | +| **Threat Hunting** | Searching for Indicators of Compromise (IOCs) and anomalies | |
| 142 | +| **Incident Response** | Using TheHive to manage and document security incidents | |
| 143 | +| **Training Labs** | Perfect for blue team exercises and cyber range setups | |
| 144 | + |
| 145 | +## Key Tools Inside Security Onion |
| 146 | + |
| 147 | +* **so-status** — Check system and service health |
| 148 | +* **so-allow** — Manage firewall rules and IP access |
| 149 | +* **so-import-pcap** — Import and analyze captured network traffic |
| 150 | +* **so-query** — Query Elasticsearch directly from the terminal |
| 151 | +* **so-dashboard** — Manage and monitor dashboard views |
| 152 | + |
| 153 | +```bash |
| 154 | +sudo so-import-pcap /path/to/traffic.pcap |
| 155 | +``` |
| 156 | + |
| 157 | +This command imports and indexes network captures into the Elastic Stack for retrospective analysis. |
| 158 | + |
| 159 | +## Integration with SIEM and EDR |
| 160 | + |
| 161 | +Security Onion can send data to external systems like: |
| 162 | + |
| 163 | +* **Splunk** |
| 164 | +* **Microsoft Sentinel** |
| 165 | +* **Wazuh EDR** |
| 166 | +* **Graylog** |
| 167 | +* **ArcSight** |
| 168 | + |
| 169 | +```mermaid |
| 170 | +flowchart LR |
| 171 | + SO[Security Onion] --> Splunk |
| 172 | + SO --> Sentinel |
| 173 | + SO --> Wazuh |
| 174 | + SO --> Graylog |
| 175 | + SO --> ArcSight |
| 176 | +``` |
| 177 | + |
| 178 | +This allows hybrid monitoring and advanced analytics across diverse environments. |
| 179 | + |
| 180 | +## Key Takeaways |
| 181 | + |
| 182 | +* Security Onion is an **all-in-one platform** for IDS, NSM, and log management. |
| 183 | +* Combines **Snort/Suricata**, **Zeek**, **Elastic Stack**, **Wazuh**, and **TheHive**. |
| 184 | +* Perfect for **SOC environments**, **blue team training**, and **incident response**. |
| 185 | +* Supports **distributed deployments** for scalability. |
| 186 | +* Offers **real-time dashboards** and **correlation across multiple data sources**. |
0 commit comments