Network Security 3

Security Onion Architecture and Components

Security Onion is an open-source suite of Network Security Monitoring (NSM) tools that run on an Oracle Linux distribution, which was previously based on Ubuntu. It provides a comprehensive integrated environment designed to simplify the deployment of NSM solutions. The platform serves three core functions for the cybersecurity analyst: full packet capture and data types, network-based and host-based intrusion detection systems (NIDS/HIDS), and alert analyst tools. Security Onion can be installed as a standalone system or as a distributed sensor and server platform. While some components are owned and maintained by corporations like Cisco and Riverbend Technologies, they are made available as open source.

The detection tools within the Security Onion VM include several specialized components. CapME is a web application used for viewing pcap transcripts rendered by the tcpflow or Zeek tools. Snort is a signature-based Network Intrusion Detection System that serves as a primary source of alert data indexed in analysis tools. Zeek (formerly Bro) is a NIDS that utilizes a behavior-based approach to intrusion detection. OSSEC is a host-based intrusion detection system integrated into the suite, while Wazuh is a more full-featured solution providing endpoint protection mechanisms such as host logfile analysis, file integrity monitoring, vulnerability detection, configuration assessment, and incident response. Suricata is another NIDS that uses a signature-based approach and can also be utilized for inline intrusion prevention.

Core Analysis Tools and Alert Generation

Security Onion integrates its data and logs into a single platform through a specific set of analysis tools. Sguil provides the high-level console for investigating security alerts and serves as the primary starting point for investigations. It allows analysts to pivot directly to other tools for deeper context. Kibana acts as the interactive dashboard interface to the Elasticsearch data (part of the ELK stack), allowing for complex querying and flexible visualizations of NSM data. Wireshark is integrated for full packet capture application and can be opened directly from other tools to display relevant traffic. Zeek serves as a network traffic analyzer and security monitor, inspecting all traffic on a network segment to provide accurate transaction logs and file content.

Security alerts are notification messages generated by these NSM tools and security devices. In Sguil, these alerts are integrated into a timestamped queue. An analyst's role involves working through this queue to investigate, classify, escalate, or retire alerts. Alerts generally include five-tuple information which consists of the Source IP (SrcIPSrcIP), the Source Layer 4 port (SPortSPort), the Destination IP (DstIPDstIP), the Destination Layer 4 port (DPortDPort), and the IP protocol number (PrPr). Alerts also include timestamps and identifiers for the device that generated the alert.

The Sguil Interface and Management

The Sguil application window features a real-time event queue where fields provide critical metadata for investigations. The Status (STST) field is color-coded by priority level: very low, low, medium, and high, with colors ranging from light yellow to red. The Count (CNTCNT) field indicates the number of times an event has been detected for the same source and destination IP addresses, representing correlated events. The Sensor field identifies the agent reporting the event, and the Alert ID is a two-part number representing the sensor and the specific event number. The Date/Time field provides the timestamp, which for correlated events refers to the first occurrence.

The Event Message field contains the identifying text for the event, configured in the rule that triggered the alert. Sguil allows analysts to view the associated rule in the right-hand pane by selecting the "Show Rule" checkbox. For event handling, Sguil allows analysts to expire false positives, escalate events (using the F9F9 key), or classify them into seven pre-built categories. Analysts can also use the Query Builder in Sguil to construct searches, though they must account for the fact that Sguil stores IP addresses in an integer representation using functions like INET_ATON()INET\_ATON().

Snort Rule Structure and Sources

Snort rules are composed of a rule header and rule options. The rule header contains the action to be taken (e.g., alert, log, or pass), the protocol, addressing (source and destination IPs), port information, and the direction of traffic flow (represented by −>->). For example, a header might look like alert ip any any -> any any. Rule options are enclosed in parentheses and contain variable metadata, such as the msg: text describing the alert, content: which refers to specific literal text in the packet data (e.g., uid=0(root)), and references like a URL or sid (a unique numeric identifier for the rule). The rev: field indicates the specific revision of the rule represented by the sid.

There are three common sources for Snort rules. GPL rules are older rules created by Sourcefire and distributed under GPLv2; they are not Cisco Talos certified. ET (Emerging Threats) rules are collected from multiple sources by a division of Proofpoint, Inc. VRT (Vulnerability Research and Analysis Team) rules are created and maintained by Cisco Talos; these are available immediately to subscribers and to registered users after a 3030-day delay. Additionally, Snort Community Rules are public sets curated by the open-source community and "Snort Integrators" who distribute them commercially.

Alert Evaluation and Classification

Security incidents are classified using a medical diagnostic scheme to determine accuracy. A True Positive occurs when an alert is verified as an actual security incident. A False Positive (also called a benign trigger) is an alert generated by innocent traffic that does not indicate an exploit. A True Negative occurs when no security incident happens and the system correctly ignores benign activity. A False Negative is the most dangerous scenario, where an exploit occurs but remains undetected by security systems. Retrospective Security Analysis (RSA) is a process used to discover false negatives by applying new threat intelligence or rules to archived network security data.

Risk analysis methods include Deterministic and Probabilistic analysis. Deterministic analysis evaluates risk based on known vulnerabilities and describes the worst-case scenario, assuming all information to accomplish an exploit is known. Probabilistic analysis estimates the potential success of an exploit by calculating the statistical likelihood that each step in an exploit chain will succeed. This method assumes that details like port numbers can only be predicted with a certain degree of confidence.

The ELK Stack and Data Management

Security Onion includes the Elastic Stack (ELK), which consists of Elasticsearch, Logstash, and Kibana. Elasticsearch is an open-core, cross-platform enterprise search engine that uses an inverted index data structure for fast full-text searching and stores data in JSON format. Logstash enables the collection and normalization of network data into indexes. Kibana provides the graphical interface for managing indices and creating visualizations. Beats are software plugins (clients/agents) that ship operational data from various software vendors (like Apache, Nginx, or AWS) directly into Elasticsearch or via Logstash.

Effective NSM requires data reduction to limit the volume of data stored and processed. Data normalization is the process of combining data from various sources into a common format (schema). This is necessary because data like IPv6 addresses (2001:db8:acad:1111:2222::332001:db8:acad:1111:2222::33), MAC addresses (A7:03:DB:7C:91:AAA7:03:DB:7C:91:AA), and dates can be represented in multiple formats. Data archiving is also critical; Sguil alert data is retained for 3030 days by default as specified in the securityonion.conf file, though data can be moved to external storage based on organizational compliance requirements.

Investigating and Enhancing Operations

Analysts investigate more than just logs; they perform deeper analysis such as extracting executable files from pcap traffic or investigating system calls. OSSEC rules can detect changes in host-based parameters; if malware fools an OS kernel into allowing unauthorized system calls to the API, these triggers appear in Sguil. Analysts can then pivot to Kibana to filter for OSSEC indices and see indicators of kernel interaction. For file analysis, Sguil allows analysts to submit hash values to online sites to check for matches with known malware. In Kibana, "Zeek Hunting" (labeled as bro_files) can display information regarding all files that have entered the network.

Workflow management in a Security Operations Center (SOC) increases efficiency and accountability by ensuring all alerts are treated properly. While Sguil provides basic workflow management, third-party systems are often used for larger operations. Automated queries can be used to search for complex security incidents that might evade standard detection tools. Dashboards in Kibana or Squert enhance this work by providing interactive visualizations that allow analysts to focus on specific details across large datasets.

Questions & Discussion

What are the primary lab environments used in this course? The course utilizes two main Virtual Machines: CyberOps Workstation for Lab 1 and Security Onion for Lab 2. These are x86 only, and while they may work via emulation on macOS, it is noted that they will be slow.

What are some specific lab objectives mentioned? Significant objectives include performing live monitoring of IDS events, configuring customized firewall rules to block malware-hosting servers, and analyzing pcap files to extract executable files. Advanced labs involve isolating compromised hosts using 5-tuples and interpreting HTTP and DNS data to isolate threat actors involved in SQL injection or DNS exfiltration highlights.