<?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 Chkirbene Malek on Medium]]></title>
        <description><![CDATA[Stories by Chkirbene Malek on Medium]]></description>
        <link>https://medium.com/@chkirbenmelek?source=rss-03c66fec784b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*bxw5Qqy6Dq3TAHjz</url>
            <title>Stories by Chkirbene Malek on Medium</title>
            <link>https://medium.com/@chkirbenmelek?source=rss-03c66fec784b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 17:06:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chkirbenmelek/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[Wazuh Active Response with Shuffle SOAR]]></title>
            <link>https://medium.com/@chkirbenmelek/wazuh-active-response-with-shuffle-soar-a369fa627042?source=rss-03c66fec784b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a369fa627042</guid>
            <dc:creator><![CDATA[Chkirbene Malek]]></dc:creator>
            <pubDate>Sat, 29 Mar 2025 21:26:51 GMT</pubDate>
            <atom:updated>2025-03-29T21:26:51.393Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*noUlddx5TyvosraV-FvzTg.png" /><figcaption>The created workflow</figcaption></figure><p><strong>Introduction</strong></p><p>In today’s cybersecurity landscape, rapid incident response is crucial. <strong>Wazuh</strong> provides <strong>Active Response</strong> to mitigate threats automatically, but integrating <strong>Shuffle SOAR</strong> enhances automation and orchestration. This combination streamlines detection and response, reducing manual intervention.</p><p>This article explores how to configure <strong>Shuffle SOAR</strong> to automate <strong>Wazuh’s Active Response</strong>, with a practical workflow example.</p><p><strong>Requirements</strong></p><ul><li>Shuffle (SOAR)</li><li>A SIEM (We will use Wazuh)</li></ul><p><strong>Integrating Shuffle SOAR with Wazuh</strong></p><p>Edit the Wazuh server configuration file /var/ossec/etc/ossec.conf and add a configuration similar to the following with a Shuffle webhook URI:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*xH0Qi5UTk35czkmWmk-vgg.png" /><figcaption>Integrating Shuffle</figcaption></figure><p>Integration configured with a specific rule (ID: 31103) that sends alerts to Shuffle.</p><p><strong>Wazuh Active Response: firewall-drop</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*NVzJWWqzUB0w6K3cmn4eIg.png" /><figcaption>firewall-drop</figcaption></figure><p>This Wazuh active response blocks attacker IPs using local firewall rules when threats are detected.</p><p><strong>How it works:</strong></p><ol><li>Detects threat (e.g. sql injection attempt)</li><li>Runs firewall-drop command</li><li>Adds temporary block (iptables/Windows Firewall)</li><li>Applies only to the affected machine (local)</li></ol><p><strong>Simulated SQL Injection Attack Attempt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*EJ300wrhe8opWqMPs8ULXw.png" /></figure><p><strong>Alert in wazuh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*HR3yGVUqIAEkUsNHzK-eUw.png" /></figure><p>Get alerts flowing into Shuffle — Since we can now get alerts into Shuffle via our webhook, we are interested when rule ID 31103 is triggered.</p><p><strong>Note:</strong> Ensure that your webhook is started, it should look like the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*nQDZ5wcOWlInH2OfpvZbRA.png" /><figcaption>Webhook should be started so as to start receiving alerts from Wazuh.</figcaption></figure><ul><li>When you click on your alerts from Wazuh, it should look something like this</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*2LJSOFHmMNlaOIpDYv_wSQ.png" /><figcaption>A sample alert from Wazuh in Shuffle.</figcaption></figure><p><strong>Shuffle’s <em>Repeat Back to Me</em> Function</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*N6zoAEdw6gFzivDltRsjQg.png" /></figure><ul><li>Acts like an echo: Shuffle instantly repeats whatever input you send it.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*xCXPSr6UV9rRFc9d-LDwdg.png" /></figure><p><strong>Using User Input with Subflows for Approval Workflows in Shuffle</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*y5IyfB4yk6USrZnaUILnGw.png" /><figcaption>User input node setup.</figcaption></figure><p>The <em>User Input</em> app becomes especially powerful when combined with <strong>subflows</strong> in Shuffle. Here’s how it works for approval processes:</p><ul><li>Create a dedicated approval workflow (subflow) containing:</li><li>User Input node (configured with Approve/Reject options)</li><li>Email/Slack notification triggers</li><li>Decision logic based on the response</li></ul><p>Now when we rerun the executions we get the following result for the user input node, which is OK since Shuffle knows that we are waiting for a human to approve or deny the sent request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*R4oSgTBVp6uK4_Z_p6Wdjg.png" /></figure><p><strong>Creating a Subflow to Send Email Notifications</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*04GM0i3s_FGdARCr1y4Sqg.png" /><figcaption>subflow created</figcaption></figure><ul><li>In Shuffle, create a new workflow (name it “Email_Notification”)</li><li>Add an <em>Email</em> action node (Gmail/SMTP/etc.)</li></ul><p>We will use the email app in Shuffle to send the curated email below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*sgvwN2aOFBSlDhUaUy6N3Q.png" /><figcaption>Email to be sent to Network Admin</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*fb9lKydznDmqCsfDDeoDZQ.png" /><figcaption>Email Network Admin Receives</figcaption></figure><p>hen the network admin approves or denies by clicking the link, they get an approval in a tab that opens that looks like the two pictures below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*T03wHyvrJsynaC1Jm-1vLA.png" /></figure><p>Once this step is done, our main workflow (workflow 1) should progress or stop depending on what link was clicked by the network admin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*hljx16l6xrzrDjsTi5fOpw.png" /><figcaption>Successfully triggered user input response.</figcaption></figure><p>The Next Step is Obtaining Wazuh API Authentication Token Using cURL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*qHKelE9KqaU-KWayY6y0ag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*iSyEHKE3Vu4I4yimil8e8Q.png" /><figcaption>Obtaining Wazuh API Authentication Token</figcaption></figure><p><strong>You need a Wazuh token to securely authenticate your API requests with the Wazuh server.</strong> This JWT token (like eyJhbG...) acts as your access key to fetch alerts, manage agents, or trigger active responses through Wazuh&#39;s API.<strong>Without it, the API will reject all your commands</strong> — it’s like trying to use a admin console without logging in first.</p><p><strong>Next Step: Configure Active Response via Wazuh API</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*nk1pKy_Xm-2ijKbM0YlpZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*PNPEgckCW4O8XCoBPWrVMA.png" /></figure><ul><li>Uses the token from http_1 for authentication</li><li>PUT request to enable active response</li><li>Requires JSON payload specifying:</li><li>Command type (firewall-drop)</li><li>Target IP to block</li><li>Custom arguments</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*yejNaRjnMO1l2flMxWRiXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*PRU7d44zDCtEJxD83DwbPw.png" /><figcaption>success active response</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*C6vbW9vb0yGVGFTKMyIxfA.png" /><figcaption><strong>Blocking IP</strong></figcaption></figure><p>In summary:</p><p>This automated security workflow detects SQL injection attacks via Wazuh, routes alerts to Shuffle for processing, then requests manual approval from network administrators before blocking malicious IPs through Wazuh’s API combining automated detection with human oversight for balanced threat response</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a369fa627042" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuring pfSense to Send Logs to Wazuh via Syslog]]></title>
            <link>https://medium.com/@chkirbenmelek/configuring-pfsense-to-send-logs-to-wazuh-via-syslog-48f456ecd019?source=rss-03c66fec784b------2</link>
            <guid isPermaLink="false">https://medium.com/p/48f456ecd019</guid>
            <dc:creator><![CDATA[Chkirbene Malek]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 17:22:54 GMT</pubDate>
            <atom:updated>2025-02-13T17:22:54.797Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In modern cybersecurity, centralized log management is crucial for monitoring network activities and detecting potential threats. Wazuh, an open-source security platform, provides powerful log analysis and threat detection capabilities. By integrating <strong>pfSense</strong>, a widely used open-source firewall, with <strong>Wazuh</strong> via <strong>Syslog</strong>, administrators can enhance network visibility and security monitoring.</p><p>This guide will walk you through the process of configuring <strong>pfSense</strong> to send logs to <strong>Wazuh.</strong></p><h3>Configuring pfSense to Send Logs to Wazuh via Syslog</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*2j8fcRuXB9aLAe7Kk5gBHg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*jV3dHmzhnrQe88J-EJlPNA.png" /></figure><p>To enable remote logging in <strong>pfSense</strong>, navigate to <strong>Status → System Logs → Settings</strong> and scroll down to the <strong>Remote Logging Options</strong> section. Check <strong>Enable Remote Logging</strong>, then enter the IP address of your <strong>Wazuh server</strong> (e.g., 10.1.200.50) in the <strong>Remote Syslog Servers</strong> field. Set the <strong>Remote Syslog Port</strong> to 514, which is the default for Syslog. Next, select the log facilities you want to send, such as <strong>Firewall, System, and DHCP</strong>. For better compatibility with Wazuh,Don’t forget tp choose the <strong>RFC 5424</strong> format. Finally, save the settings to apply the configuration.</p><h3>Configuring Wazuh Server to Receive pfSense Logs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*S2-W5KXH4cZxlNHLrS4zxg.png" /></figure><p>To configure Wazuh to receive logs from <strong>pfSense</strong>, edit the <strong>ossec.conf</strong> file on the Wazuh server. In the &lt;remote&gt; section, add the Syslog connection with port 514, using the UDP protocol, and set the <strong>allowed IP</strong> to the <strong>pfSense interface IP</strong> (e.g., 10.1.200.254). The <strong>local IP address</strong> of the Wazuh server should match the one set in the pfSense remote logging settings. After saving the changes, restart the Wazuh Manager and check the logs to confirm that pfSense logs are being received. If you see the logs, the setup is successful.</p><h3>Testing Log Reception on Wazuh Manager with tcpdump</h3><p>To verify that pfSense logs are reaching the Wazuh server, use <strong>tcpdump</strong> to capture Syslog traffic. Run tcpdump on the Wazuh server to listen for UDP packets on port <strong>514</strong>, ensuring logs are being transmitted. If packets from the pfSense IP appear in the output, the connection is successful. Otherwise, check pfSense’s remote logging settings and firewall rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CtX9VYEFpU7_RuBBoBxe9Q.png" /><figcaption>Example of a pfSense Log Received by Wazuh</figcaption></figure><h3>Creating a Decoder and Rules for Matching pfSense Logs in Wazuh</h3><p>We created a <strong>decoder</strong> and <strong>rules</strong> in Wazuh to properly analyze and categorize <strong>pfSense logs</strong>. By default, Wazuh may not recognize pfSense logs correctly, as they have a specific format. The <strong>decoder</strong> helps extract important details like source IP, destination IP, and protocol from the raw logs. The <strong>rule</strong> then matches specific events, such as blocked traffic, and assigns them a severity level. This allows Wazuh to generate alerts for security-relevant events, making it easier to monitor and respond to potential threats in the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UcBwN5QcVFV0ADazqTmaNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nZYW3JkNfd1iWYo2LQqatg.png" /><figcaption>Testing a pfSense Log with a Custom Decoder in Wazuh</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*82VpWRZdt8-1RAvCQz-E9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TaX5JQnmjJmynX7p6iIArA.png" /><figcaption>Testing a pfSense Log with a Custom Rule in Wazuh</figcaption></figure><h3>pfSense Logs Successfully Integrated with Wazuh</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c86Nx1-jvvelqhwyJJGFkA.png" /></figure><p><strong>Note:</strong> While it is possible to install the <strong>Wazuh agent</strong> directly on <strong>pfSense</strong>, it is <strong>not recommended</strong> due to compatibility and performance concerns. pfSense is a firewall appliance, and adding extra software like the Wazuh agent may affect its stability and security. Instead, using <strong>remote Syslog logging</strong> to send logs to a dedicated Wazuh server is the best practice for efficient monitoring without impacting pfSense’s performance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48f456ecd019" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>