Skip to content

Commit bc654dc

Browse files
authored
Add end to end validation and updated documents (#306)
1 parent 1b9fc2c commit bc654dc

4 files changed

Lines changed: 313 additions & 11 deletions

File tree

Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
---
2+
sidebar_position: 11
3+
---
4+
5+
:::info
6+
**Document Creation:** 23 September 2025. **Last Edited:** 23 September 2025. **Authors:** Syed Mahmood Aleem Huzaifa.
7+
**Effective Date:** 23 September 2025. **Expiry Date:** 23 September 2026.
8+
:::
9+
10+
### Overview
11+
This project aimed to design and validate a Security Orchestration, Automation, and Response (SOAR) pipeline entirely on community editions of open-source tools. The intent was to replicate the core capabilities of a modern SOC (Security Operations Center) — detection, enrichment, case management, and automation — without relying on enterprise licenses.
12+
13+
The chosen stack included:
14+
15+
1. **Wazuh** – SIEM and endpoint monitoring platform.
16+
17+
2. **Suricata** – Network Intrusion Detection System (NIDS).
18+
19+
3. **MISP** – Threat intelligence sharing and enrichment platform.
20+
21+
4. **TheHive** – Security Incident Response Platform (SIRP).
22+
23+
5. **Cortex** – Analyzer engine for automated enrichment.
24+
25+
The project was divided into nine sequential phases (Phases 1–9), each delivering one layer of capability. This page consolidates these phases and validates the pipeline by tracing the journey of a malicious IOC through every stage - from initial detection in Wazuh/Suricata through MISP enrichment, TheHive escalation, Cortex automation, and finally analyst case closure.
26+
27+
### Phase-by-Phase Explanations
28+
29+
### Phase 1 – Wazuh Core Setup
30+
Link to [Phase 1](https://redback-operations.github.io/redback-documentation/docs/cybersecurity/Blue%20Team/Research/Automated%20Threat%20Hunting/Phase%201%20-%20Core%20Setup%20and%20Wazuh%20Deployment).
31+
32+
**Why this phase matters**:
33+
No SOAR pipeline can function without a central log ingestion and correlation layer. Wazuh was chosen because it combines SIEM capabilities (log analysis, rule correlation, dashboards) with endpoint monitoring (File Integrity Monitoring, rootkit detection).
34+
35+
**What was done**:
36+
37+
1. Installed Wazuh Manager on Ubuntu 22.04.
38+
39+
2. Deployed Wazuh Agents on Debian endpoints to forward system logs.
40+
41+
3. Configured secure manager-agent communication using TLS certificates.
42+
43+
4. Verified integration using the Wazuh Dashboard (Kibana plugin or web UI).
44+
45+
**Validation**:
46+
Triggered simple test events (e.g., failed SSH logins) and confirmed alerts appeared in the Wazuh Dashboard. Agents were listed as active, and rule-based alerts (from Wazuh’s built-in rule set) were generated.
47+
48+
**Link to next phase**:
49+
This established the detection backbone. Suricata logs and threat intelligence feeds would later enrich the data flowing through Wazuh.
50+
51+
### Phase 2 – Suricata + Wazuh (Network Threat Detection)
52+
Link to [Phase 2](https://redback-operations.github.io/redback-documentation/docs/cybersecurity/Blue%20Team/Research/Automated%20Threat%20Hunting/Phase%202%20-Network%20Threat%20Detection%20Integration%20%E2%80%93%20Suricata%20+%20Wazuh).
53+
54+
**Why this phase matters**:
55+
While Wazuh can monitor endpoints, modern threats often exploit network-based vulnerabilities. By integrating Suricata with Wazuh, the project gained visibility into live network traffic.
56+
57+
**What was done**:
58+
59+
Installed Suricata 6.0.8 on Ubuntu.
60+
61+
Configured it to run in AF-PACKET mode to capture live traffic.
62+
63+
Enabled EVE JSON output, directing logs to /var/log/suricata/eve.json.
64+
65+
Configured Wazuh to parse Suricata alerts by editing ossec.conf.
66+
67+
Loaded the Emerging Threats Open ruleset, which includes detection for botnets, C2 servers, and common exploit attempts.
68+
69+
**Validation**:
70+
Simulated malicious network traffic (e.g., connecting to a known blacklisted IP). Suricata generated an alert in eve.json. Wazuh ingested the alert and triggered rule correlation, displaying it in the dashboard.
71+
72+
**Link to next phase**:
73+
This phase provided network-layer detection, which when combined with IOC enrichment from MISP, would allow alerts to be contextualized.
74+
75+
### Phase 3 – MISP Deployment
76+
Link to [Phase 3](https://redback-operations.github.io/redback-documentation/docs/cybersecurity/Blue%20Team/Research/Automated%20Threat%20Hunting/Phase%203%20-%20MISP%20Threat%20Intelligence%20Platform%20Deployment).
77+
78+
**Why this phase matters**:
79+
Detection without context leads to alert fatigue. Analysts need to know if an IP/domain is just unusual or actively associated with malware or attacks. MISP solves this by storing and sharing structured IOCs.
80+
81+
**What was done**:
82+
83+
1. Deployed MISP on Kali Linux.
84+
85+
2. Configured MySQL, PHP, and Apache services for the web interface.
86+
87+
3. Created an admin user and organization.
88+
89+
4. Added test IOCs: IP (1.2.3.4), domain (malicious.test), and a file hash.
90+
91+
5. Published these as events, making them available to API queries.
92+
93+
**Validation**:
94+
Queried the MISP API directly to confirm that IOCs were retrievable. Ensured that Cortex’s MISP Analyzer could also pull events from MISP.
95+
96+
**Link to next phase**:
97+
With MISP in place, Wazuh could now enrich alerts by checking observables against known IOCs.
98+
99+
### Phase 4 – Wazuh–MISP Enrichment Automation
100+
Link to [Phase 4](https://redback-operations.github.io/redback-documentation/docs/cybersecurity/Blue%20Team/Research/Automated%20Threat%20Hunting/Phase%204%20-%20Wazuh%E2%80%93MISP%20Automation%20and%20Alert%20Enrichment).
101+
102+
**Why this phase matters**:
103+
Without automation, analysts would need to manually query threat intelligence for each alert - a time-consuming process. Integration ensures enrichment happens at detection time.
104+
105+
**What was done**:
106+
107+
1. Installed the custom-misp Python script.
108+
109+
2. Modified local_rules.xml in Wazuh to run this script on matching alerts (e.g., suspicious IPs, hashes).
110+
111+
3. Configured the script to query the MISP API and return enrichment tags.
112+
113+
4. Verified enriched alerts were displayed in Wazuh Dashboard with additional context.
114+
115+
**Validation**:
116+
Generated an alert using a known malicious IP (1.2.3.4). Wazuh triggered the enrichment script, queried MISP, and tagged the alert with IOC context (e.g., “Threat Level: High, Category: C2”).
117+
118+
**Link to next phase**:
119+
Enriched alerts would later be forwarded to TheHive, ensuring that analysts saw intelligence-backed alerts, not raw data.
120+
121+
### Phase 5 – TheHive + Cortex Deployment
122+
Link to [Phase 5](https://redback-operations.github.io/redback-documentation/docs/cybersecurity/Blue%20Team/Research/Automated%20Threat%20Hunting/Phase%205%20-%20SOAR%20Deployment-The%20Hive%20and%20Cortex).
123+
124+
**Why this phase matters**:
125+
SIEMs detect and enrich alerts, but analysts need a platform to manage investigations, assign tasks, and escalate cases. TheHive provides this functionality, while Cortex powers observable enrichment.
126+
127+
**What was done**:
128+
129+
1. Deployed TheHive 5.2.4 and Cortex 3.1.6 via Docker Compose.
130+
131+
2. Connected TheHive to Elasticsearch (for indexing) and Cassandra (for storage).
132+
133+
3. Installed Cortex analyzers: AbuseIPDB, VirusTotal, MISP Analyzer.
134+
135+
4. Configured TheHive to connect to Cortex using API keys.
136+
137+
**Validation**:
138+
Created a test case in TheHive with an IP observable. Ran the AbuseIPDB analyzer through Cortex. The report (abuse confidence score, categories) was attached back to the observable.
139+
140+
**Link to next phase**:
141+
With TheHive + Cortex live, Wazuh alerts could now be escalated into TheHive for case management and automated analysis.
142+
143+
### Phase 6 – Behavioural Detection and Testing
144+
Link to [Phase 6](https://redback-operations.github.io/redback-documentation/docs/cybersecurity/Blue%20Team/Research/Automated%20Threat%20Hunting/Phase%206%20-%20Behavioural%20Rules%20and%20Testing).
145+
146+
**Why this phase matters**:
147+
IOC-based detection is useful but incomplete. Behavioural detection identifies patterns of malicious activity even when no IOC match exists.
148+
149+
**What was done**:
150+
151+
1. Configured Wazuh rules for SSH brute-force (multiple failed logins in short time).
152+
153+
2. Monitored suspicious PowerShell commands on endpoints.
154+
155+
3. Added rules for Suricata to flag malicious IP communication.
156+
157+
4. Tested each by simulating attacks (e.g., brute-force SSH, scripted PowerShell).
158+
159+
**Validation**:
160+
Alerts fired as expected and appeared in TheHive after Wazuh–TheHive integration. Enrichment confirmed whether behaviours were linked to known IOCs.
161+
162+
**Link to next phase**:
163+
Behavioural rules combined with IOC intelligence provided comprehensive coverage for both known and unknown threats.
164+
165+
### Phase 7 – Wazuh–TheHive Integration
166+
Link to [Phase 7](https://redback-operations.github.io/redback-documentation/docs/cybersecurity/Blue%20Team/Research/Automated%20Threat%20Hunting/Phase%207%20-%20Wazuh%20&%20The%20Hive%20Integration).
167+
168+
**Why this phase matters**:
169+
Analysts shouldn’t have to monitor both Wazuh and TheHive. Centralizing alerts in TheHive streamlines workflows.
170+
171+
**What was done**:
172+
173+
1. Configured Wazuh to forward alerts via TheHive API.
174+
175+
2. Mapped Wazuh fields to TheHive alert schema (title, description, severity, source, observables).
176+
177+
3. Verified alerts enriched in Wazuh (from MISP) were fully visible in TheHive.
178+
179+
**Validation**:
180+
Triggered alerts appeared in TheHive’s Alerts section with metadata intact. Analysts could promote alerts directly to cases.
181+
182+
**Link to next phase**:
183+
Now that alerts were centralized, Cortex analyzers could be run directly from TheHive.
184+
185+
### Phase 8 – Cortex Observables
186+
Link to [Phase 8](https://redback-operations.github.io/redback-documentation/docs/cybersecurity/Blue%20Team/Research/Automated%20Threat%20Hunting/Phase%208%20-%20Cortex%20Observables).
187+
188+
**Why this phase matters**:
189+
Analysts often need to validate observables (IP, hash, domain) in external sources. Cortex enables automated checks without leaving TheHive.
190+
191+
**What was done**:
192+
193+
1. Configured Cortex analyzers (AbuseIPDB, MISP Analyzer, VirusTotal).
194+
195+
2. Attached observables to cases in TheHive.
196+
197+
3. Ran analyzers and confirmed reports were attached back to the case.
198+
199+
**Validation**:
200+
When running AbuseIPDB on a malicious IP, the report showed abuse categories (e.g., SSH brute-force) and confidence score.
201+
202+
**Link to next phase**:
203+
While Phase 8 required manual analyzer execution, Phase 9 introduced automation to remove analyst effort.
204+
205+
### Phase 9 – Cortex Automation
206+
Link to [Phase 9](https://redback-operations.github.io/redback-documentation/docs/cybersecurity/Blue%20Team/Research/Automated%20Threat%20Hunting/Phase%209%20-%20Cortex%20Automation).
207+
208+
**Why this phase matters**:
209+
Manual enrichment wastes analyst time. Automation ensures observables are enriched immediately upon alert creation.
210+
211+
**What was done**:
212+
213+
1. Configured TheHive notification rules (e.g., trigger on ArtifactCreated).
214+
215+
2. Linked the rule to Cortex analyzers (AbuseIPDB, VirusTotal).
216+
217+
3. Tested by injecting a malicious IP observable from Wazuh.
218+
219+
**Validation**:
220+
AbuseIPDB ran automatically, returning a report without analyst intervention. The report was attached to the observable in TheHive.
221+
222+
**Link to final validation**:
223+
This completed the SOAR loop, ensuring that alerts arriving in TheHive were already enriched and ready for analyst action.
224+
225+
### Example of a validation scenario
226+
227+
A malicious IP (1.2.3.4) published in MISP was used to validate the full workflow:
228+
229+
1. *Detection*: Suricata flagged communication → Wazuh alert created.
230+
231+
2. *Enrichment*: Wazuh triggered custom script → MISP tags added.
232+
233+
3. *Escalation*: Alert forwarded into TheHive.
234+
235+
4. *Automation*: Cortex ran AbuseIPDB automatically → report attached.
236+
237+
5. *Case Handling*: Analyst promoted alert to case, added notes, and closed as True Positive.
238+
239+
This confirms the pipeline can detect, enrich, escalate, automate, and resolve incidents in real time.
240+
241+
### Future Scope
242+
This project demonstrates the feasibility of building a SOAR pipeline entirely with community tools. Each phase contributed incrementally:
243+
244+
*Phases 1–2*: Core detection layer (host + network).
245+
246+
*Phases 3–4*: Intelligence enrichment (MISP).
247+
248+
*Phases 5–7*: Orchestration and centralized case management (TheHive).
249+
250+
*Phases 8–9*: Automated enrichment and analysis (Cortex).
251+
252+
**Strengths**:
253+
254+
1. Real-time enrichment reduced manual triage time.
255+
256+
2. TheHive centralized alert and case management.
257+
258+
3. Cortex automation provided instant IOC validation.
259+
260+
**Limitations**:
261+
262+
1. Community editions lack enterprise scalability.
263+
264+
2. Manual configuration (scripts, custom rules) required maintenance.
265+
266+
3. Advanced case workflows (SLA, dashboards) limited compared to paid SOAR.
267+
268+
### Conclusion
269+
270+
The project successfully validated an end-to-end SOAR workflow across detection, enrichment, orchestration, automation, and response. Despite using only free/community editions, the stack demonstrated the capabilities required for modern SOCs.
271+
272+
This marks the closure of the project - proving that a functioning SOAR pipeline can be achieved with open-source tools, and providing a foundation for future enhancements (e.g., scaling, machine learning-based correlation, or additional analyzers).

docs/cybersecurity/Blue Team/Research/Automated Threat Hunting/Phase 7 - Wazuh & The Hive Integration.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ sidebar_position: 8
33
---
44

55
:::info
6-
**Document Creation:** 3 September 2025. **Last Edited:** 3 September 2025. **Authors:** Syed Mahmood Aleem Huzaifa.
7-
**Effective Date:** 3 September 2025. **Expiry Date:** 3 September2026.
6+
**Document Creation:** 3 September 2025. **Last Edited:** 9 September 2025. **Authors:** Syed Mahmood Aleem Huzaifa.
7+
**Effective Date:** 9 September 2025. **Expiry Date:** 9 September 2026.
88
:::
99

1010
### Overview
@@ -26,7 +26,7 @@ Before Wazuh can send alerts to TheHive, we need to set up an organisation and c
2626
3. Generate the API Key
2727
1. Edit the new user profile.
2828
2. Click **"Reveal"** under API Key.
29-
3. Copy the key somewhere safe you’ll need it in the Wazuh configuration.
29+
3. Copy the key somewhere safe - you’ll need it in the Wazuh configuration.
3030

3131
### Step 2: Install TheHive Python Module on Wazuh
3232
TheHive integration uses a Python library called thehive4py to send alerts. We need to install it inside Wazuh’s built-in Python environment.
@@ -285,7 +285,7 @@ echo "test" | sudo tee -a /etc/wazuh_test.txt
285285
Example: Trigger an authentication failure alert:
286286
```ssh nouser@localhost
287287
```
288-
(Type any password it will fail and create an alert.)
288+
(Type any password - it will fail and create an alert.)
289289

290290
If everything works, you’ll see messages in:
291291
```
@@ -296,9 +296,38 @@ sudo tail -n 50 /var/ossec/logs/integrations.log
296296
Automatically, the cases are created as shown below
297297
![Wazuh Hive Alerts](img\wazuh-hivealerts.png)
298298

299+
### Highlights of The Hive
300+
1. Integration ensures Wazuh alerts are automatically forwarded to TheHive as cases.
301+
302+
2. Removes manual work of copying alerts, giving analysts a single central platform.
303+
304+
3. Alerts are enriched with artifacts (IPs, URLs, domains) for immediate investigation.
305+
306+
4. Permissions and API keys ensure secure communication between Wazuh and TheHive.
307+
308+
5. Logging confirms whether alerts are created successfully, helping with troubleshooting.
309+
310+
6. Sets the foundation for advanced automation in future phases (e.g., Cortex enrichment).
311+
299312
### Conclusion
300313
This phase represents a major milestone in building an automated security operations pipeline, as it bridges the gap between detection and investigation. With the Wazuh ↔ TheHive integration in place, alerts no longer remain siloed within Wazuh but are automatically forwarded into TheHive, where they are transformed into actionable cases. This ensures that analysts can immediately work on verified incidents within a centralized platform rather than wasting time manually transferring data. In practice, this reduces friction, accelerates the response process, and makes sure that no critical alerts are overlooked due to human error or delays.
301314

302315
Beyond convenience, the integration adds structure and scalability to incident management. By feeding enriched alerts into TheHive, security teams can leverage case workflows, collaborative features, and task assignments that are built into TheHive’s design. This allows multiple analysts to coordinate effectively on the same incident, track progress, and document findings in one place. It also improves accountability, since every case in TheHive is linked to its originating Wazuh alert, creating an auditable chain of events.
303316

304-
From a strategic perspective, this integration lays the groundwork for more advanced automation in later phases, such as linking with Cortex for automated analysis, enriching cases with external threat intelligence, or triggering response actions directly from TheHive. What begins here as a simple alert forwarding mechanism evolves into the foundation of a full Security Orchestration, Automation, and Response (SOAR) pipeline. In other words, Phase 7 does not just close the loop between detection and investigation — it transforms the security workflow into a proactive, scalable, and collaborative system that strengthens the organization’s overall security posture.
317+
From a strategic perspective, this integration lays the groundwork for more advanced automation in later phases, such as linking with Cortex for automated analysis, enriching cases with external threat intelligence, or triggering response actions directly from TheHive. What begins here as a simple alert forwarding mechanism evolves into the foundation of a full Security Orchestration, Automation, and Response (SOAR) pipeline. In other words, Phase 7 does not just close the loop between detection and investigation - it transforms the security workflow into a proactive, scalable, and collaborative system that strengthens the organization’s overall security posture.
318+
319+
### What Else Can Be Done in TheHive
320+
321+
1. **Case Management**: Create, assign, and track incident cases with built-in workflows.
322+
323+
2. **Collaboration**: Multiple analysts can work together on the same case with shared notes and tasks.
324+
325+
3. **Observables & Enrichment**: Add observables (IP, domain, hash) and run Cortex analyzers for automated enrichment.
326+
327+
4. **Dashboards & Metrics**: Visualize incident trends, case distribution, and response times.
328+
329+
5. **Custom Workflows**: Define templates, tags, and response playbooks for consistency.
330+
331+
6. **API & Automation**: Extend TheHive with scripts, connectors, and integrations with other tools.
332+
333+
7. **Audit & Accountability**: Maintain a clear record of who did what and when for compliance.

docs/cybersecurity/Blue Team/Research/Automated Threat Hunting/Phase 8 - Cortex Observables.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ sidebar_position: 9
33
---
44

55
:::info
6-
**Document Creation:** 3 September 2025. **Last Edited:** 3 September 2025. **Authors:** Syed Mahmood Aleem Huzaifa.
7-
**Effective Date:** 3 September 2025. **Expiry Date:** 3 September2026.
6+
**Document Creation:** 3 September 2025. **Last Edited:** 9 September 2025. **Authors:** Syed Mahmood Aleem Huzaifa.
7+
**Effective Date:** 9 September 2025. **Expiry Date:** 9 September 2026.
88
:::
99

1010
### Overview
@@ -36,4 +36,4 @@ Select the observable and click *“Run analyzers.” TheHive displays available
3636
After analyzer jobs complete, click the observable to view detailed reports. Reports reveal findings such as malicious IP status, malware hash matches, or URL blocklist presence. These results are attached to the observable in TheHive, enabling efficient investigation continuation.
3737
![Report View](img\Viewing_Report.png)
3838
Analysis_of_a_report.png
39-
![Report Analysis View](img\Analysis_of_a_report.png)
39+
![Report Analysis View](img\Analysis_of_a_report.png)

0 commit comments

Comments
 (0)