<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by SchesmuTwo on Medium]]></title>
        <description><![CDATA[Stories by SchesmuTwo on Medium]]></description>
        <link>https://medium.com/@akramtalibi1902?source=rss-3a68f2e1b0e5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RFfvQrHvqSZAvzVpbmNCvw.jpeg</url>
            <title>Stories by SchesmuTwo on Medium</title>
            <link>https://medium.com/@akramtalibi1902?source=rss-3a68f2e1b0e5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 00:22:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akramtalibi1902/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI-Powered SOC: Automating Incident Response with Machine Learning and SOAR Tools]]></title>
            <link>https://medium.com/@akramtalibi1902/ai-powered-soc-automating-incident-response-with-machine-learning-and-soar-tools-70ab343e9402?source=rss-3a68f2e1b0e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/70ab343e9402</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[soc]]></category>
            <dc:creator><![CDATA[SchesmuTwo]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 09:55:31 GMT</pubDate>
            <atom:updated>2024-09-23T09:55:31.853Z</atom:updated>
            <content:encoded><![CDATA[<h4>Use case : Integrating ML into SOC for Automating Response Actions Using SOAR</h4><h3>Introduction</h3><p>In today’s ever-evolving cybersecurity landscape, integrating advanced technologies like Machine Learning (ML) into Security Operations Centers (SOC) has become a necessity. This article delves into how to enhance SOC operations by leveraging ML models in conjunction with Security Orchestration, Automation, and Response (SOAR) tools ..</p><p>A write-up of the entire project has been published , where I provide a detailed, step-by-step guide across multiple parts. Below are the links to the Medium articles:</p><p><strong>Part 1: </strong><a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d"><strong>Designing SOC Architecture, PfSense, and Kali Linux Setup</strong></a></p><p><strong>Part 2: </strong><a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055"><strong>Configuring Active Directory and Implementing Wazuh for SIEM</strong></a></p><p><strong>Part 3: </strong><a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d"><strong>Integrating TheHive, Cortex, and MISP, and Creating Detection Rules</strong></a></p><h3>Table of Contents</h3><ol><li>Objective</li><li>Background</li><li>Why Implement Machine Learning in SOC Response Automation?</li><li>Implementation Steps</li><li>Workflow Example: Automating Phishing Attack Detection and Response</li></ol><h3>1. Objective</h3><p>The primary goal of this project is to offer a comprehensive guide on integrating ML into SOCs to streamline incident detection and response. By coupling ML techniques with SOAR tools like TheHive, Cortex, and MISP, SOC teams can handle threats faster, more accurately, and with less manual effort.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TH9gPJhR8rF0GQTL7SuZ5Q.png" /><figcaption>SOC Powered By Ai</figcaption></figure><h3>2. Background</h3><p>A typical SOC setup involves key components such as a firewall (PfSense), a SIEM solution (Wazuh), an attacker machine (Kali Linux), and Active Directory for network management. Adding ML to this setup can significantly improve the efficiency of incident responses by reducing false positives and enabling proactive threat mitigation. This project aims to show how these tools can be integrated with SOAR systems to achieve seamless automation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4voIggtKmoORTWqlz5uNpA.png" /><figcaption>SOC net Architecture</figcaption></figure><h3>3. Why Machine Learning for SOC Response Automation?</h3><p>Integrating ML into SOCs provides several key benefits:</p><ul><li><strong>Improved Detection Accuracy</strong>: ML models can analyze large datasets and identify anomalies more accurately than traditional rule-based methods.</li><li><strong>Reduction of False Positives</strong>: By training ML models on historical incidents, false positives are minimized, allowing SOC teams to focus on real threats.</li><li><strong>Proactive Threat Mitigation</strong>: ML can identify patterns that suggest an attack is likely, enabling preventive measures before the threat fully materializes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ERR5nucgj9bUkMakiVl_TQ.png" /><figcaption>ML role in our SOC lab</figcaption></figure><h3>4. Implementation Steps</h3><p>Here’s a step-by-step guide on how to implement Machine Learning in your SOC for automating response actions using SOAR tools.</p><h4>Step 1: Set Up the Data Pipeline</h4><ul><li><strong>Data Collection</strong>: Establish a continuous data flow from SIEM (Wazuh), firewalls (PfSense), network traffic logs, and threat intelligence sources (MISP).</li><li><strong>Data Labeling</strong>: Categorize historical data into ‘benign,’ ‘malicious,’ or ‘false positives’ to build a labeled dataset for training supervised ML models.</li></ul><h4>Step 2: Choose the Right ML Model</h4><p>Depending on your specific use case, select from a variety of ML models:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m3Pc9J_RIA3YVswfD1pivQ.png" /></figure><p>Different Use Cases for ML Models</p><p>●<strong> Classification Models:</strong> These models are ideal for situations where labeled data is available. For example, if your SOC handles many phishing incidents, you can train a classifier like Random Forest to categorize alerts as either phishing or non-phishing based on past incidents. Similarly, SVM can be used to detect specific attack types, such as malware based on signature patterns.</p><p>● <strong>Anomaly Detection Models :</strong> These models are suitable when normal behavior is well-defined, but potential threats are unknown. Anomaly detection models can flag activities that deviate from established patterns, such as an unexpected large data transfer, potentially indicating data exfiltration. This is particularly useful for detecting insider threats or zero-day attacks.</p><p>●<strong> Natural Language Processing Models : </strong>NLP models can automatically process and analyze unstructured text, such as emails, threat intelligence reports, or incident tickets. For example, BERT can classify incoming emails as potential phishing attempts, while GPT can summarize long incident reports or extract key details for quicker analysis.</p><h4>Step 3: Integrating ML Models with SOAR Tools</h4><ul><li><strong>TheHive Integration</strong>: Use ML models to automatically create cases in TheHive when suspicious activity is detected.</li><li><strong>Cortex Playbooks</strong>: Automate responses based on the ML model’s output. For instance, isolate a compromised host if a high-risk activity is detected.</li><li><strong>MISP Integration</strong>: Automatically share new Indicators of Compromise (IoCs) detected by the ML model with MISP for continuous threat intelligence updates.</li></ul><h4>Step 4: Designing Adaptive Playbooks</h4><p>Configure dynamic playbooks that adapt based on the confidence score from the ML model. For example, high-confidence alerts trigger immediate actions like blocking IP addresses, while medium-confidence alerts require manual review.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tSwwF4t5dlgnGWwYppuNOg.png" /></figure><h4>Step 5: Build Feedback Loops</h4><ul><li><strong>Incident Review</strong>: Regularly assess flagged incidents and adjust both ML models and SOAR playbooks accordingly.</li><li><strong>Human-in-the-Loop</strong>: Incorporate feedback from SOC analysts to fine-tune the ML models over time, ensuring continuous improvement.</li></ul><h3>VI. Workflow Example: Automating Phishing Attack Detection and Response</h3><p>In this section, we will explore how to automate the detection and response to phishing attacks using machine learning and SOAR tools like TheHive, Cortex, and MISP. The workflow demonstrates how ML models can identify phishing emails, assess the threat, and trigger automated responses through SOAR.</p><h4>Attack Scenario: Phishing Email Attack</h4><p>Phishing is a prevalent social engineering technique where attackers send emails designed to manipulate recipients into:</p><ul><li>Clicking malicious links leading to fake login pages.</li><li>Opening malware-laden attachments.</li><li>Providing sensitive information, such as credentials or financial data.</li></ul><p>The goal of this automation process is to detect and neutralize the phishing threat before the victim interacts with the malicious content.</p><h4>Workflow Steps:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-7KrRVAVQOjTTu_zJaSR3g.png" /></figure><p><strong>1. Detecting Phishing Email (Initial Detection)</strong></p><p><strong>Data Source</strong>: Wazuh (SIEM), Email Security Gateway (e.g., Proofpoint), Network Logs, MISP.</p><p><strong>Description</strong>:</p><ul><li>The system scans incoming emails and detects potential phishing indicators based on factors such as:</li><li>Suspicious domain names (e.g., “paypa1.com” instead of “paypal.com”).</li><li>Embedded URLs leading to known malicious websites, as identified by threat intelligence platforms like MISP.</li><li>Suspicious attachments (e.g., .exe, .zip) often associated with phishing attacks.</li><li>Wazuh generates an alert for any detected anomalies and forwards it to TheHive for investigation.</li></ul><p><strong>2. Machine Learning Model Analysis</strong></p><p><strong>ML Model</strong>: Natural Language Processing (NLP) Model (e.g., BERT) or Classification Model (e.g., Random Forest).</p><p><strong>Action</strong>:</p><ul><li>The email’s metadata, such as the subject, sender, attachments, and URLs, is analyzed by a pre-trained ML model.</li><li>The model assesses factors like suspicious URLs, attachments, and common phishing language patterns (e.g., urgent calls to action like “Your account is compromised, click here to resolve”).</li><li>The model assigns a phishing probability score, for example, a 90% confidence level that the email is phishing.</li></ul><p><strong>3. Automated Case Creation in TheHive</strong></p><p><strong>SOAR Tool</strong>: TheHive (Case Management)</p><p><strong>Action</strong>:</p><ul><li>The ML model flags the email as a high-risk phishing attempt.</li><li>A high-priority case is automatically created in TheHive, which includes:</li><li>Email metadata (sender, subject, URLs, attachments).</li><li>The phishing probability score from the ML model.</li><li>Indicators of Compromise (IoCs) like malicious URLs or IP addresses from MISP.</li><li>The case is escalated to the SOC team for review.</li></ul><p><strong>4. Cortex Automated Playbook Triggered</strong></p><p><strong>SOAR Tool</strong>: Cortex (Automated Response)</p><p><strong>Action</strong>:Cortex triggers an automated playbook to respond to the phishing threat. Actions include:</p><ul><li><strong>Block Phishing URLs</strong>: The malicious URLs are blocked in the firewall (PfSense) and URL filtering systems.</li><li><strong>Quarantine Suspicious Emails</strong>: The suspicious email is quarantined to prevent user interaction. If the email has already been opened, additional actions such as endpoint isolation are initiated.</li><li><strong>Notify Targeted User</strong>: The target user receives a notification warning them about the phishing attempt.</li><li><strong>Alert SOC Team</strong>: The SOC team is alerted to ensure rapid response to the potential attack.</li></ul><p><strong>5. Remediation and Additional Responses</strong></p><ul><li><strong>Credential Theft</strong>: If the phishing attack attempted to steal credentials, and the credentials were compromised, the following steps are taken:</li><li><strong>Password Reset</strong>: Cortex triggers an automatic password reset in Active Directory for the affected user.</li><li><strong>Malware Scan</strong>: If the malicious attachment was opened, the system triggers a malware scan and quarantines the compromised machine if necessary.</li><li><strong>Blacklist Malicious Senders</strong>: The sender’s email address is blacklisted to prevent future attacks.</li></ul><p><strong>6. Threat Intelligence Sharing with MISP</strong></p><p><strong>MISP Integration</strong>:</p><ul><li>Indicators of Compromise (IoCs) identified during the phishing incident are shared with MISP.</li><li>These IoCs are made available to other organizations, helping them block similar phishing threats.</li></ul><p><strong>7. Analyst Review and Feedback Loop</strong></p><p><strong>Feedback to ML Model</strong>:</p><ul><li>If the phishing detection is accurate, the incident is marked as a true positive and used to further train the ML model.</li><li>In case of a misclassification (false positive), the incident is flagged for review, and the ML model is adjusted to improve future detection.</li></ul><h3><strong>Conclusion :</strong></h3><p>This article serves as a theoretical guide on how Machine Learning can be integrated into a Security Operations Center (SOC) to automate response actions using SOAR tools.</p><p>The steps and workflow provided offer a foundation for understanding the potential of AI-driven automation in SOCs. In the upcoming article, I will dive into the practical implementation of these concepts in our SOC, covering real-world use cases and detailed configurations.</p><p>Thank you for reading! If you found this insightful, be sure to follow for more updates, and let’s connect on <a href="https://www.linkedin.com/in/akram-talibi-186622190/"><strong>LinkedIn</strong></a> to continue the conversation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70ab343e9402" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Your Own Lab SOC: A Step-by-Step Guide to Creating a SOC from Scratch — Part 3]]></title>
            <link>https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d?source=rss-3a68f2e1b0e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6698687fe37d</guid>
            <category><![CDATA[misp]]></category>
            <category><![CDATA[edr]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[soar]]></category>
            <category><![CDATA[security-analysts]]></category>
            <dc:creator><![CDATA[SchesmuTwo]]></dc:creator>
            <pubDate>Thu, 22 Aug 2024 12:41:18 GMT</pubDate>
            <atom:updated>2024-08-22T13:03:33.499Z</atom:updated>
            <content:encoded><![CDATA[<h3>Build Your Own SOC Lab: A Step-by-Step Guide to Creating a SOC from Scratch — Part 3</h3><h3>introduction</h3><p>In Part 3, we’ll turn our attention to advanced integrations and security automation within your SOC lab. This section will guide you through integrating SOAR tools like TheHive, Cortex, and MISP with your existing setup. Additionally, we’ll cover creating detection rules in Wazuh to enhance threat detection and response capabilities. This part will elevate your SOC lab from a basic setup to a fully operational security operations center, ready to handle real-world threats.</p><h4>Part 1: <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d</a></h4><h4>Part 2: <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055</a></h4><h3>Table of Contents:</h3><ol><li><strong>Designing the SOC Architecture — — — — — — — — — —— — → Part 1</strong></li><li><strong>Configuring the PfSense Firewall — — — — — — — —— — — — → Part 1</strong></li><li><strong>Setting Up the Attacker Machine (Kali Linux) — -— — — — — → Part 1</strong></li><li><strong>Configuring Active Directory (AD) — — — — — — — — — — - — → Part 2</strong></li><li><strong>Implementing Wazuh for SIEM — — — — — — — — —— — — → Part 2</strong></li><li><strong>Integrating SOAR: TheHive, Cortex, and MISP — —— — — → Part 3</strong></li><li><strong>Connecting Wazuh SIEM with TheHive for Enhanced Security→ Part 3</strong></li><li><strong>Creating Detection Rules in Wazuh for Threat Detection — → Part 3</strong></li></ol><p>here’s a reminder of our Soc Lab Net Architecture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4voIggtKmoORTWqlz5uNpA.png" /></figure><h3>6. Integrating SOAR: TheHive, Cortex, and MISP</h3><h3>Thehive</h3><p><strong>TheHive</strong> is an open-source Security Incident Response Platform (SIRP) designed to assist Security Operations Centers (SOCs) in managing and investigating security incidents. It provides a comprehensive set of features that enable efficient case management, collaboration, and incident tracking.</p><h3>Cortex</h3><p><strong>Cortex</strong> is an open-source security analysis and response engine designed to help Security Operations Centers (SOCs) automate the analysis of observables (such as IP addresses, URLs, domain names, file hashes) and execute responsive actions. Cortex allows for extensive analysis using a variety of built-in analyzers and responders, making it a crucial tool for enhancing incident response capabilities.</p><h3>MISP</h3><p><strong>MISP</strong> (Malware Information Sharing Platform) is an open-source threat intelligence platform designed to facilitate the sharing, storing, and correlating of Indicators of Compromise (IoCs) and threat intelligence information. MISP enhances the ability of organizations to detect, respond to, and prevent cyber threats by enabling the collaborative sharing of threat data.</p><h4>Now let’s Implement SAOR</h4><p><strong>a. Install Docker on Ubuntu Desktop / server:</strong></p><pre>sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io</pre><p><strong>b. Create the </strong><strong>docker-compose.yml File:</strong></p><ul><li>Create a docker-compose.yml file within this directory:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AL-siOg6cfx6PbAyxeEa7w.png" /></figure><p>Copy the configuration from the provided GitHub link and paste it into your docker-compose.yml file:</p><ul><li><a href="https://github.com/ls111-cybersec/thehive-cortex-misp-docker-compose-lab11update/blob/main/docker-compose.yml">Docker Compose Configuration</a></li></ul><p><strong>c. Start the Docker Containers:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TtgH6pCxqFOaaZ9Qqz6IwA.png" /></figure><p>Once you have your Docker containers up and running, you can access the interfaces for each service as follows:</p><ul><li><strong>MISP</strong>: Access it through the IP ip.</li><li><strong>TheHive</strong>: Access it via <a href="http://ip:9000.">http://ip:9000.</a></li><li><strong>Cortex</strong>: Access it via <a href="http://ip:9001/">http://ip:9001</a>.</li></ul><h4>How to Integrate Cortex &amp; MISP with TheHive</h4><p><strong>a. Log into TheHive:</strong></p><ul><li>Use the default credentials to log into TheHive’s interface.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AZLsx3v_YqTPfMyJLmIu8A.png" /></figure><p><strong>b. Set Up MISP:</strong></p><ul><li>Log into MISP using the default credentials (admin@admin.test with password admin).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*e8wbmu0zbRPfoO6xwTGZcQ.png" /></figure><ul><li>Change the password .</li><li>Add an organization in MISP.</li><li>Create a new user (labuser1@akram.local) and set a secure password.</li><li>Generate an authentication key for API access.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w0WqBzgVdfkC-hOXfiTGDA.png" /></figure><p><strong>c. Configure Cortex:</strong></p><ul><li>Log into Cortex using the default credentials (cortexadmin with password admin).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UvPh4vQNHzagCNLI1ZwRkA.png" /></figure><ul><li>Create an organization in Cortex similar to MISP.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*B1J57SSpjL6hW-b0sqkJ1A.png" /></figure><ul><li>Add a user to the organization with the same credentials (labuser1@akram.local and a secure password).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OugYXi5tgyzavK4nbiNmww.png" /></figure><ul><li>Generate an API key for Cortex.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LpQpSxSKkkavTCWw0CB2eg.png" /></figure><p><strong>d. Integrate Cortex and MISP with TheHive:</strong></p><ul><li>In TheHive, configure the connections to MISP and Cortex using the respective API keys.</li></ul><p><strong>e. Set Up TheHive:</strong></p><ul><li>Create an organization in TheHive.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iniykykgALJ2zKqCllIRUw.png" /></figure><ul><li>Add the same user (labuser1@akram.local) with the same password as before to maintain consistency.</li><li>Log in as the new user to access TheHive’s dashboard.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7WfGwa4zD15DOpeh6tkjYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LBrWENp6Ty19XG-p71J1sw.png" /></figure><p><strong>f. Configure Analyzers in Cortex:</strong></p><ul><li>Obtain API keys for VirusTotal and MalwareBazaar by creating accounts on their platforms.</li><li>Use these keys to configure the analyzers in Cortex.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*odxoTn8KAWjokkcGM9zDhg.png" /></figure><h3>7. Connecting Wazuh SIEM with TheHive for Enhanced Security</h3><p>This lab assumes you are using the provided Wazuh VirtualBox image (.OVA) that I used, which did not have Python preinstalled.</p><pre>sudo yum install python3</pre><p><strong><em>STEP2 — Install The Hive Python module using PIP</em></strong></p><p>This is the Python module that will be referenced in the custom integration script that we will be creating in the next step. I have tested this module with version 5.2.1 of The Hive and its working at the time of this writeup.</p><pre>sudo /var/ossec/framework/python/bin/pip3 install thehive4py</pre><p><strong><em>STEP3 — Creating the custom integration script</em></strong></p><p>script will need to be created in /var/ossec/integrations/ and called <a href="http://custom-w2thive.py/">custom-w2thive.py</a> I used nano to create/edit the script, however, you can use whatever text editor you like for this.</p><p>This script has the</p><pre>lvl_threshold</pre><p>variable set to</p><pre>0</pre><p>, meaning that all alerts created by Wazuh will be forwarded to The Hive. This has the potential to create a lot of noise if you have a lot of agents you are monitoring on your network so you may want to consider setting this to a higher level to only alert on more serious classifications.</p><blockquote>Please check the Wazuh ruleset classifications in the <a href="https://documentation.wazuh.com/current/user-manual/ruleset/rules-classification.html">manual</a> they range from 0–15 with explanations for each.</blockquote><p><strong><em>STEP4 — Setting up permissions and ownership</em></strong></p><p>In this step, we make sure that Wazuh has the correct permissions to run the above scripts that we just created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQjCyxZDzC6l6kwpoBZeag.png" /></figure><p><strong><em>STEP5 — Final integration step — enabling the integration in the Wazuh manager configuration file</em></strong></p><p>modify /var/ossec/etc/ossec.conf and insert the below code.</p><p>You will need to insert the IP address for your The Hive server inside the &lt;hook_url&gt; tags as well as insert your API key inside the &lt;api_key&gt; tags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hGP-_MZo5IdYFQrY69aW1A.png" /></figure><p>Yeeyy Working !!</p><h3>8. Creating Detection Rules in Wazuh for Effective Threat Detection</h3><h4>Navigate to the Rules Directory</h4><p>On the Wazuh Manager, navigate to the directory where custom rules are stored. This is typically /var/ossec/etc/rules.</p><pre>cd /var/ossec/etc/rules</pre><h3>4. Define Custom Rules</h3><p>Add your custom rules to this file. Below are example rules for detecting Kerberoasting, Password Spraying, and Silver Ticket attacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_TiLXvgekqvdsw1WxNyW7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u6Am99nBSmpK9wJw2VBCxw.png" /></figure><h3>Conclusion</h3><p>In this guide, we’ve successfully set up a comprehensive SOC lab environment tailored for training purposes. By integrating tools like TheHive, Cortex, and MISP, you now have a versatile platform to practice and refine your cybersecurity skills. This lab provides a realistic environment for simulating attacks, analyzing threats, and honing your incident response strategies. Whether you’re preparing for real-world scenarios or just beginning your journey in cybersecurity, this SOC lab serves as an invaluable resource for hands-on learning and skill development. With everything in place, you’re ready to dive into the world of cybersecurity training and become proficient in managing and mitigating security threats.</p><h4>Part 1 : <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d</a></h4><h4>Part 2 : <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055</a></h4><h4>Reach me on<a href="https://www.linkedin.com/in/akram-talibi-186622190/"> Linkedin</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6698687fe37d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Your Own Lab SOC: A Step-by-Step Guide to Creating a SOC from Scratch — Part 2]]></title>
            <link>https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055?source=rss-3a68f2e1b0e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/56e17f04d055</guid>
            <category><![CDATA[soc-analyst]]></category>
            <category><![CDATA[pfsense]]></category>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[cortex]]></category>
            <dc:creator><![CDATA[SchesmuTwo]]></dc:creator>
            <pubDate>Thu, 22 Aug 2024 12:38:12 GMT</pubDate>
            <atom:updated>2024-08-22T13:02:51.246Z</atom:updated>
            <content:encoded><![CDATA[<h3>Build Your Own SOC Lab: A Step-by-Step Guide to Creating a SOC from Scratch — Part 2</h3><h3>Introduction</h3><p>Part 2 of this guide focuses on building out the core services that will power your SOC. Here, we’ll configure Active Directory (AD), implement Wazuh for SIEM, and ensure that these services are fully integrated into your environment. These components are essential for monitoring, managing, and responding to security incidents, making your SOC lab more functional and realistic.</p><h4>Part 1: <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d</a></h4><h4>Part 3: <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d</a></h4><h3>Table of Contents:</h3><ol><li><strong>Designing the SOC Architecture — — — — — — — — — — —— — → Part 1</strong></li><li><strong>Configuring the PfSense Firewall — — — — — — — — — — — — → Part 1</strong></li><li><strong>Setting Up the Attacker Machine (Kali Linux) — - — — — — — → Part 1</strong></li><li><strong>Configuring Active Directory (AD) — — — — — — — — — —- — → Part 2</strong></li><li><strong>Implementing Wazuh for SIEM — — — — — — — — — — —— — → Part 2</strong></li><li><strong>Integrating SOAR: TheHive, Cortex, and MISP — — — — — — → Part 3</strong></li><li><strong>Connecting Wazuh SIEM with TheHive for Enhanced Security→ Part 3</strong></li><li><strong>Creating Detection Rules in Wazuh for Threat Detection — — → Part 3</strong></li></ol><p>here’s a reminder of our Soc Lab Net Architecture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4voIggtKmoORTWqlz5uNpA.png" /></figure><h3>4. Configuring Active Directory (AD)</h3><p>we’ll cover the basics of configuring Active Directory (AD) within your SOC environment. For this setup, a Domain Controller (DC) and a single client machine have been configured. You can further customize this setup according to your specific needs, such as adding more machines or roles to your domain.</p><p>This foundational AD of my setup for both DC and the machine :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*svkUlf_S-JgLXert9Iqz2w.png" /></figure><p><strong>a. Set Up the Administrator Account</strong></p><ul><li>During the initial setup of the Windows Server, create an administrator account by entering a username (default: Administrator) and a strong password. This account will have full administrative rights.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PuUiLSaem7_RrzSfeWkz-A.png" /></figure><p><strong>b. Install Active Directory Domain Services</strong></p><ul><li>Open <strong>Server Manager</strong> and navigate to <strong>Add Roles and Features</strong>.</li><li>Select <strong>Active Directory Domain Services (AD DS)</strong> and proceed through the wizard to install the role.</li></ul><p><strong>c. Configure Active Directory Domain Services</strong></p><ul><li>After installation, open the <strong>AD DS Configuration Wizard</strong> from the notifications flag in Server Manager.</li><li>Choose <strong>Add a new forest</strong> and enter your domain name (e.g., AKRAM.local).</li><li>Set the <strong>Forest Functional Level</strong> and <strong>Domain Functional Level</strong> to the latest versions supported by your environment.</li><li>Ensure that <strong>Domain Name System (DNS) server</strong> and <strong>Global Catalog (GC)</strong> options are checked.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IeISobKteZ4dgHOIO6bPLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pxD_lWc3DZ8T5etcdfb5ig.png" /></figure><p><strong>d. Complete the Active Directory Configuration</strong></p><ul><li>Proceed with the wizard, reviewing and confirming the DNS options, paths, and additional settings.</li><li>Install and wait for the configuration to complete. Once done, the server will restart.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PEWpuDUiRKsfLX8AqrFsSg.png" /></figure><p><strong>e. Create a User in Active Directory</strong></p><ul><li>After the server reboots, open <strong>Active Directory Users and Computers</strong> from the <strong>Server Manager</strong>.</li><li>Navigate to your domain (e.g., AKRAM.local), right-click on <strong>Users</strong> or a custom Organizational Unit (OU), and select <strong>New &gt; User</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oF3yqmQXuEPdnVLEEOzQFg.png" /></figure><ul><li>Enter the user’s details (e.g., first name, last name, and user logon name) and set a password.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*lHg-x8iS1Ny-sQUX82R-UQ.png" /></figure><p><strong>f. Configure PfSense as the Default Gateway</strong></p><ul><li>Go to <strong>Network Connections</strong> on your server and right-click the <strong>Ethernet0</strong> connection.</li><li>Select <strong>Properties</strong> and then <strong>Internet Protocol Version 4 (TCP/IPv4)</strong>.</li><li>Enter the static IP address, subnet mask, and the IP address of your PfSense firewall as the <strong>Default Gateway</strong>.</li><li>Set your DNS server IP to match your PfSense or the IP of your Domain Controller.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*doAFceUVhaMT7gxSKBk31Q.png" /></figure><p><strong>g. Configure DNS on PfSense</strong></p><ul><li>In the PfSense web interface, go to <strong>System &gt; General Setup</strong>.</li><li>Add your Active Directory Domain Controller as a DNS server under <strong>DNS Servers</strong> to ensure proper name resolution within the domain.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dv2eM7tDyGliT7KQs1Nxuw.png" /></figure><p><strong>h. configure Windows 10 machine to the Active Directory domain</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kKcEs5eNSk9MWxwgtcUKdg.png" /></figure><h3>5. Implementing Wazuh for SIEM</h3><p>Wazuh is an open-source security monitoring platform that provides unified security information and event management (SIEM) and security operations. It helps detect threats, monitor integrity, and ensure compliance across an organization’s infrastructure. Wazuh is widely used in SOC environments to gather and analyze security data from various sources, providing visibility and insight into potential security threats.</p><p><strong>a. Verify Wazuh Server Configuration:</strong></p><ul><li>Ensure the Wazuh server is running with a static IP (e.g., 192.168.3.101).</li><li>Start the necessary services using sudo systemctl start wazuh-manager and sudo systemctl start wazuh-dashboard.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EjprDoRR_3zvNHXtwSDZPw.png" /></figure><p><strong>b. Access the Wazuh Web Interface:</strong></p><ul><li>Open a browser and visit the Wazuh dashboard at <a href="https://192.168.3.101/">https://192.168.3.101.</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MbrsFVeCo1lxHnj12df2zg.png" /></figure><p><strong>c. Deploy the Windows Agent:</strong></p><ul><li>In the Wazuh dashboard, go to <strong>Agents &gt; Deploy new agent</strong>.</li><li>Select <strong>Windows</strong>, enter the server IP (192.168.3.101), and download the agent.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92bIZ89rRadzPAskc2XZUA.png" /></figure><p><strong>d. Install the Agent on the Domain Controller:</strong></p><ul><li>On the Domain Controller, run the following command to install the agent:</li></ul><pre>Invoke-WebRequest -Uri https://packages.wazuh.com/4.x/windows/wazuh-agent-4.x.x.msi -OutFile ${env:tmp}\wazuh-agent.msi; msiexec.exe /i ${env:tmp}\wazuh-agent.msi /q WAZUH_MANAGER=&#39;192.168.3.101&#39; WAZUH_AGENT_NAME=&#39;Windows-DC&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4XkyNbVuD3D9tH1Q9GTj7A.png" /></figure><ul><li>Start the agent service with NET START WazuhSvc.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SFmDNiZ665f5_ONkz1pCvA.png" /></figure><p><strong>e. Verify Agent Connection:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GrH33GJmdkBChTK9MLjuXA.png" /></figure><p>Working fine !!!</p><p><strong>f. Repeat for the Other Machine :</strong></p><p>same as before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sw06bnNQCiCOaRYRDga3-g.png" /></figure><h3>Conclusion</h3><p>Having completed Part 2, your SOC lab is now equipped with crucial services like Active Directory and Wazuh SIEM, fully integrated and operational. These enhancements transform your lab into a more sophisticated environment, allowing you to monitor network activity and manage security incidents effectively. With these elements in place, you’re ready to move on to the final phase, where we’ll focus on enhancing security automation and response capabilities.</p><h4><strong>Part 3 : </strong><a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d</a></h4><h4><strong>Part 1 : </strong><a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d</a></h4><h4>Reach me on<a href="https://www.linkedin.com/in/akram-talibi-186622190/"> Linkedin</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56e17f04d055" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Your Own Lab SOC: A Step-by-Step Guide to Creating a SOC from Scratch — Part 1]]></title>
            <link>https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-1-841d8a1ade1d?source=rss-3a68f2e1b0e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/841d8a1ade1d</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[security-operation-center]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[SchesmuTwo]]></dc:creator>
            <pubDate>Thu, 22 Aug 2024 12:29:28 GMT</pubDate>
            <atom:updated>2024-08-22T13:01:39.652Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Build Your Own SOC Lab: A Step-by-Step Guide to Creating a SOC from Scratch — Part 1</strong></h3><h3>Introduction</h3><p>A Security Operations Center (SOC) is essential for protecting an organization’s digital assets. This guide will take you step-by-step through building your own SOC, from setting up the architecture to configuring crucial tools like PfSense and Wazuh. Whether you’re a professional or an enthusiast, you’ll find practical advice to help you create a secure and efficient SOC.</p><p>To ensure that the detailed information is easily digestible, this guide will be divided into three parts, as it is too comprehensive to post all at once. The table of contents provided will help navigate through these sections/Parts efficiently.</p><h3>Table of Contents:</h3><ol><li><strong>Designing the SOC Architecture — — — — — — — — — — — — — → Part 1</strong></li><li><strong>Configuring the PfSense Firewall — — — — — — — — — —— — → Part 1</strong></li><li><strong>Setting Up the Attacker Machine (Kali Linux) — -——— — — → Part 1</strong></li><li><strong>Configuring Active Directory (AD) — — — — — — — — —— -— → Part 2</strong></li><li><strong>Implementing Wazuh for SIEM — — — — — — — — — — — — — → Part 2</strong></li><li><strong>Integrating SOAR: TheHive, Cortex, and MISP — — — —— — → Part 3</strong></li><li><strong>Connecting Wazuh SIEM with TheHive for Enhanced Security→ Part 3</strong></li><li><strong>Creating Detection Rules in Wazuh for Threat Detection — → Part 3</strong></li></ol><p>Part 2 : <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055</a></p><p>Part 3 : <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d</a></p><h3><strong>1. Designing the SOC Architecture</strong></h3><p>To begin designing the SOC architecture, it’s crucial to first outline the key components and network structure that will form the backbone of your security operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4voIggtKmoORTWqlz5uNpA.png" /><figcaption>Network Architecture of a Lab SOC</figcaption></figure><p>On VMware we will get this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*ad9tkJ3QOH5Lq7gMiVqSZg.png" /><figcaption>Lab SOC on VMware</figcaption></figure><p>In the following sections, we will discuss and break down each component of this architecture, providing detailed instructions on how to implement and configure the entire setup</p><h3>2. <strong>Configuring the PfSense Firewall</strong></h3><p>In this section, we’ll dive into configuring the PfSense firewall, a powerful open-source tool that serves as the backbone of your network security. PfSense offers a range of features that allow you to control and protect network traffic effectively. We’ll guide you through the setup process to ensure your network is secure and efficiently managed.</p><p>This table outlines the VMware network adapter configurations, detailing their roles, PfSense interface assignments, and corresponding IP subnets .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DOhg-UUo4XqJj3xI1xanaA.png" /></figure><p><strong>a. add interfaces on Pfsense :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mw_9mp0OIz3hTGYTNWlm0Q.png" /></figure><p><strong>b. configure a static IP for the LAN interface in PfSense while enabling DHCP unlike all other interfaces</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wtPx8tux2cbcf5l-L_c5yQ.png" /></figure><p><strong>c. Configure the other interfaces</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u7DmGxw0HCIJ9vhCZGxpmQ.png" /></figure><p><strong>d- IMPORTANT ! TO ACCESS PFSENSE WEB INTERFACE ! REMEBER TO</strong> <strong>DESABLE PACKET FILTRING IF YOU FACE A PROBLEM !!</strong></p><pre>xxx/root : pfctl -d</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MPGb-84CcWrHkTHWeh4PzQ.png" /></figure><p><strong>e. access to the wan adress in browser : (192.168.253.128 , in my case ) , and name the interfaces and add rules anything that suits your needs .</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_LqPIbck2Mpwt-ffKq-d0g.png" /></figure><p>all good and set</p><h3><strong>3. Setting Up the Attacker Machine (Kali Linux)</strong></h3><p>simply install the Kali Linux OS on VMware and attach it to VMnet 6. Then, configure a static IP address for the network adapter.</p><p>Here is the configuration you’ll need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*DnGq1ADi-jLnmcp8DWcXsA.png" /></figure><h3>Conclusion</h3><p>With Part 1 completed, you’ve successfully established the core infrastructure of your SOC lab. The architecture is in place, the firewall is configured, and the attacker machine is set up and ready for action. This groundwork is crucial as it sets the stage for the more advanced elements we’ll explore in the next part, where we’ll start integrating critical services into your environment.</p><h4>Part 2: <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-2-56e17f04d055</a></h4><h4>Part 3: <a href="https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d">https://medium.com/@akramtalibi1902/build-your-own-lab-soc-a-step-by-step-guide-to-creating-a-soc-from-scratch-part-3-6698687fe37d</a></h4><h4>Reach me on<a href="https://www.linkedin.com/in/akram-talibi-186622190/"> Linkedin</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=841d8a1ade1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>