<?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 Jamiu A Adeleke on Medium]]></title>
        <description><![CDATA[Stories by Jamiu A Adeleke on Medium]]></description>
        <link>https://medium.com/@aabiodunadeleke?source=rss-f6b83c08c8d2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cMSf-GtFMF3QNBmO346HLA.jpeg</url>
            <title>Stories by Jamiu A Adeleke on Medium</title>
            <link>https://medium.com/@aabiodunadeleke?source=rss-f6b83c08c8d2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:13:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aabiodunadeleke/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[Integrating Sophos XGS Firewall with Wazuh SIEM: A Complete Step-by-Step Guide]]></title>
            <link>https://medium.com/@aabiodunadeleke/integrating-sophos-xgs-firewall-with-wazuh-siem-a-complete-step-by-step-guide-bc09b50fa60b?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc09b50fa60b</guid>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 12:53:58 GMT</pubDate>
            <atom:updated>2026-06-24T12:53:58.911Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Security teams often struggle to get meaningful alerts from their firewall infrastructure into their SIEM platform. In this guide, I’ll walk you through how to integrate <strong>Sophos XGS Firewall</strong> with <strong>Wazuh SIEM</strong> using syslog, including writing custom decoders and rules so that every authentication failure, admin configuration change, VPN login, and brute force attempt generates a proper alert — with the username and source IP clearly visible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8GHRt-IdPcVyiAPo.png" /></figure><p>By the end of this guide you will have:</p><ul><li>Sophos XGS sending logs to Wazuh over syslog (UDP port 5514)</li><li>A custom Wazuh decoder parsing all XGS log fields</li><li>Custom rules that fire on auth failures, admin changes, VPN logins, brute force, and IPSec events</li><li>Support for multiple firewalls across different branches</li></ul><h3>Prerequisites</h3><ul><li>Wazuh Manager installed and running (this guide uses v4.14)</li><li>Sophos XGS Firewall with admin access</li><li>Network connectivity between the firewall and Wazuh server on UDP port 5514</li><li>Root or sudo access on the Wazuh server</li></ul><h3>Step 1: Verify Syslog is Listening on Wazuh</h3><p>First confirm your Wazuh manager is already listening for syslog. Check your ossec.conf:</p><pre>sudo cat /var/ossec/etc/ossec.conf | grep -A6 &quot;connection&gt;syslog&quot;</pre><p>You should see a block like this:</p><pre>&lt;remote&gt;<br>    &lt;connection&gt;syslog&lt;/connection&gt;<br>    &lt;port&gt;5514&lt;/port&gt;<br>    &lt;protocol&gt;udp&lt;/protocol&gt;<br>    &lt;allowed-ips&gt;123.3.3.4/32&lt;/allowed-ips&gt;<br>    &lt;local_ip&gt;0.0.0.0&lt;/local_ip&gt;<br>&lt;/remote&gt;</pre><p>If this block doesn’t exist, add it to /var/ossec/etc/ossec.conf inside the &lt;ossec_config&gt; tags.</p><p>Confirm the port is actively listening:</p><pre>sudo ss -ulnp | grep 5514</pre><p>Expected output:</p><pre>UNCONN 0   0   0.0.0.0:5514   0.0.0.0:*   users:((&quot;wazuh-remoted&quot;,pid=XXXXX,fd=4))</pre><h3>Step 2: Configure Sophos XGS to Send Syslog</h3><ol><li>Log into your <strong>Sophos XGS admin console</strong></li><li>Navigate to <strong>System → Log Settings → Syslog</strong></li><li>Click <strong>Add</strong> and fill in the details:</li></ol><p>IP Address : Your Wazuh server IP (e.g. 123.3.3.4)<br>Port: 5514<br>Protocol: UDP<br>Log Format: Device Standard Format<br>Facility: LOCAL0</p><p>4. Select the log types to forward — at minimum enable Event, Firewall, and IDP</p><p>5. Save and apply</p><h3>Step 3: Allow the Firewall IP in Wazuh</h3><p>Edit ossec.conf to allow your firewall&#39;s IP:</p><pre>sudo nano /var/ossec/etc/ossec.conf</pre><p>Add your firewall IP to the remote block:</p><pre>&lt;remote&gt;<br>    &lt;connection&gt;syslog&lt;/connection&gt;<br>    &lt;port&gt;5514&lt;/port&gt;<br>    &lt;protocol&gt;udp&lt;/protocol&gt;<br>    &lt;allowed-ips&gt;123.3.3.4/32&lt;/allowed-ips&gt;<br>    &lt;local_ip&gt;0.0.0.0&lt;/local_ip&gt;<br>&lt;/remote&gt;</pre><p>If you have multiple firewalls across branches, add each one:</p><pre>&lt;allowed-ips&gt;123.3.3.4/32&lt;/allowed-ips&gt;<br>&lt;allowed-ips&gt;123.3.3.4/32&lt;/allowed-ips&gt;<br>&lt;allowed-ips&gt;123.3.3.4/32&lt;/allowed-ips&gt;<br>&lt;allowed-ips&gt;123.3.3.4/32&lt;/allowed-ips&gt;</pre><h3>Step 4: Verify Logs Are Arriving</h3><p>Before writing any decoder, confirm the firewall is actually sending logs:</p><pre>sudo tcpdump -i eth0 src 123.3.3.4 and port 5514 -nn -A -c 5</pre><p>You should see raw log packets like this:</p><pre>&lt;133&gt;device_name=&quot;SFW&quot; timestamp=&quot;2026-06-03T11:32:45+0100&quot; device_model=&quot;SFVH&quot; <br>device_serial_id=&quot;V010016QCHMRV06&quot; log_id=&quot;062109517507&quot; log_type=&quot;Event&quot; <br>log_component=&quot;CLI&quot; log_subtype=&quot;Admin&quot; status=&quot;Failed&quot; severity=&quot;Notice&quot; <br>log_version=1 user_name=&quot;bdsm&quot; src_ip=&quot;80.87.83.229&quot; <br>message=&quot;User &#39;bdsm&#39; failed to login from &#39;80.87.83.229&#39; using ssh <br>because of wrong credentials&quot;</pre><blockquote><strong><em>Important:</em></strong><em> Note that the </em><em>device_name field may vary across firewalls — some may send </em><em>SFW while branch firewalls may send their hostname like </em><em>akure.firewall.fcl.ng. The decoder must handle both.</em></blockquote><h3>Step 5: Write the Custom Decoder</h3><p>Wazuh’s built-in Sophos decoder (0510-sophos_fw_decoders.xml) expects the older format starting with device=&quot;SFW&quot;. The XGS format starts with device_name= which requires a custom decoder.</p><p>Edit the local decoder file:</p><pre>sudo nano /var/ossec/etc/decoders/local_decoder.xml</pre><p>Add the following decoder block:</p><pre>&lt;!-- ========================= --&gt;<br>&lt;!-- SOPHOS XGS FIREWALL       --&gt;<br>&lt;!-- ========================= --&gt;<br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;prematch&gt;device_name=&quot;&lt;/prematch&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;parent&gt;sophos-xgs&lt;/parent&gt;<br>  &lt;regex&gt;log_id=&quot;(\w+)&quot;&lt;/regex&gt;<br>  &lt;order&gt;id&lt;/order&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;parent&gt;sophos-xgs&lt;/parent&gt;<br>  &lt;regex&gt;log_type=&quot;([^&quot;]+)&quot;&lt;/regex&gt;<br>  &lt;order&gt;extra_data&lt;/order&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;parent&gt;sophos-xgs&lt;/parent&gt;<br>  &lt;regex&gt;log_component=&quot;([^&quot;]+)&quot;&lt;/regex&gt;<br>  &lt;order&gt;extra_data&lt;/order&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;parent&gt;sophos-xgs&lt;/parent&gt;<br>  &lt;regex&gt;log_subtype=&quot;([^&quot;]+)&quot;&lt;/regex&gt;<br>  &lt;order&gt;extra_data&lt;/order&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;parent&gt;sophos-xgs&lt;/parent&gt;<br>  &lt;regex&gt;severity=&quot;([^&quot;]+)&quot;&lt;/regex&gt;<br>  &lt;order&gt;extra_data&lt;/order&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;parent&gt;sophos-xgs&lt;/parent&gt;<br>  &lt;regex type=&quot;pcre2&quot;&gt;user_name=&quot;([^&quot;]+)&quot;.*src_ip=&quot;(\d+\.\d+\.\d+\.\d+)&quot;&lt;/regex&gt;<br>  &lt;order&gt;dstuser,srcip&lt;/order&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;parent&gt;sophos-xgs&lt;/parent&gt;<br>  &lt;regex type=&quot;pcre2&quot;&gt;src_ip=&quot;(\d+\.\d+\.\d+\.\d+)&quot;.*user_name=&quot;([^&quot;]+)&quot;&lt;/regex&gt;<br>  &lt;order&gt;srcip,dstuser&lt;/order&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;parent&gt;sophos-xgs&lt;/parent&gt;<br>  &lt;regex&gt;dst_ip=&quot;(\d+\.\d+\.\d+\.\d+)&quot;&lt;/regex&gt;<br>  &lt;order&gt;dstip&lt;/order&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;sophos-xgs&quot;&gt;<br>  &lt;parent&gt;sophos-xgs&lt;/parent&gt;<br>  &lt;regex&gt;message=&quot;([^&quot;]+)&quot;&lt;/regex&gt;<br>  &lt;order&gt;extra_data&lt;/order&gt;<br>&lt;/decoder&gt;</pre><h3>Step 6: Test the Decoder</h3><p>Before restarting Wazuh, test the decoder using wazuh-logtest:</p><pre>echo &#39;&lt;133&gt;device_name=&quot;TGH&quot; timestamp=&quot;2026-06-03T11:32:45+0100&quot; device_model=&quot;SHH&quot; device_serial_id=&quot;V0GYF01HM&quot; log_id=&quot;0621017365&quot; log_type=&quot;Event&quot; log_component=&quot;CLI&quot; log_subtype=&quot;Admin&quot; status=&quot;Failed&quot; severity=&quot;Notice&quot; log_version=1 user_name=&quot;bdsm&quot; src_ip=&quot;80.87.83.229&quot; message=&quot;User bdsm failed to login from 80.87.83.229 using ssh because of wrong credentials&quot;&#39; | sudo /var/ossec/bin/wazuh-logtest</pre><p>Expected Phase 2 output:</p><pre>**Phase 2: Completed decoding.<br>        name: &#39;sophos-xgs&#39;<br>        dstuser: &#39;bdsm&#39;<br>        id: &#39;062109517507&#39;<br>        srcip: &#39;80.87.83.229&#39;</pre><p>If you see No decoder matched check that device_name=&quot; appears somewhere in the log and the prematch is saved correctly.</p><h3>Step 7: Write the Custom Rules</h3><p>Edit your local rules file:</p><pre>sudo nano /var/ossec/etc/rules/local_rules.xml</pre><p>Add the following rules group at the end of the file:</p><pre>&lt;group name=&quot;sophos_xgs,firewall,&quot;&gt;<br><br>  &lt;!-- Base rule --&gt;<br>  &lt;rule id=&quot;110100&quot; level=&quot;3&quot;&gt;<br>    &lt;decoded_as&gt;sophos-xgs&lt;/decoded_as&gt;<br>    &lt;description&gt;Sophos XGS: Firewall event detected&lt;/description&gt;<br>    &lt;group&gt;sophos_xgs,firewall&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Admin configuration change --&gt;<br>  &lt;rule id=&quot;110101&quot; level=&quot;8&quot;&gt;<br>    &lt;if_sid&gt;110100&lt;/if_sid&gt;<br>    &lt;regex type=&quot;pcre2&quot;&gt;log_component=&quot;GUI&quot;.*log_subtype=&quot;Admin&quot;.*status=&quot;Successful&quot;&lt;/regex&gt;<br>    &lt;description&gt;Sophos XGS: Admin configuration change by $(dstuser) from $(srcip)&lt;/description&gt;<br>    &lt;group&gt;sophos_xgs,configuration_changed&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Admin action failure --&gt;<br>  &lt;rule id=&quot;110102&quot; level=&quot;10&quot;&gt;<br>    &lt;if_sid&gt;110100&lt;/if_sid&gt;<br>    &lt;regex type=&quot;pcre2&quot;&gt;log_component=&quot;GUI&quot;.*log_subtype=&quot;Admin&quot;.*status=&quot;Failed&quot;&lt;/regex&gt;<br>    &lt;description&gt;Sophos XGS: Failed admin action by $(dstuser) from $(srcip)&lt;/description&gt;<br>    &lt;group&gt;sophos_xgs,configuration_changed,authentication_failed&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- SSL VPN successful authentication --&gt;<br>  &lt;rule id=&quot;110103&quot; level=&quot;3&quot;&gt;<br>    &lt;if_sid&gt;110100&lt;/if_sid&gt;<br>    &lt;regex type=&quot;pcre2&quot;&gt;log_component=&quot;SSL VPN Authentication&quot;.*status=&quot;Successful&quot;&lt;/regex&gt;<br>    &lt;description&gt;Sophos XGS: SSL VPN login by $(dstuser) from $(srcip)&lt;/description&gt;<br>    &lt;group&gt;sophos_xgs,vpn,authentication_success&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- VPN/IPSec failure --&gt;<br>  &lt;rule id=&quot;110104&quot; level=&quot;6&quot;&gt;<br>    &lt;if_sid&gt;110100&lt;/if_sid&gt;<br>    &lt;regex type=&quot;pcre2&quot;&gt;log_component=&quot;IPSec&quot;.*status=&quot;Failed&quot;&lt;/regex&gt;<br>    &lt;description&gt;Sophos XGS: VPN/IPSec failure detected&lt;/description&gt;<br>    &lt;group&gt;sophos_xgs,vpn&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- VPN/IPSec expired/timeout --&gt;<br>  &lt;rule id=&quot;110105&quot; level=&quot;6&quot;&gt;<br>    &lt;if_sid&gt;110100&lt;/if_sid&gt;<br>    &lt;regex type=&quot;pcre2&quot;&gt;log_component=&quot;IPSec&quot;.*status=&quot;Expire&quot;&lt;/regex&gt;<br>    &lt;description&gt;Sophos XGS: VPN/IPSec tunnel expired or timed out&lt;/description&gt;<br>    &lt;group&gt;sophos_xgs,vpn&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Generic authentication failure --&gt;<br>  &lt;rule id=&quot;110106&quot; level=&quot;8&quot;&gt;<br>    &lt;if_sid&gt;110100&lt;/if_sid&gt;<br>    &lt;match&gt;status=&quot;Failed&quot;&lt;/match&gt;<br>    &lt;description&gt;Sophos XGS: Authentication failure for user $(dstuser) from $(srcip)&lt;/description&gt;<br>    &lt;group&gt;sophos_xgs,authentication_failed&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Brute force detection --&gt;<br>  &lt;rule id=&quot;110107&quot; level=&quot;10&quot; frequency=&quot;5&quot; timeframe=&quot;60&quot;&gt;<br>    &lt;if_matched_sid&gt;110106&lt;/if_matched_sid&gt;<br>    &lt;description&gt;Sophos XGS: Brute force attack detected from $(srcip)&lt;/description&gt;<br>    &lt;group&gt;sophos_xgs,authentication_failed,brute_force&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Generic successful authentication - catch-all excluding GUI and SSL VPN --&gt;<br>  &lt;rule id=&quot;110108&quot; level=&quot;3&quot;&gt;<br>    &lt;if_sid&gt;110100&lt;/if_sid&gt;<br>    &lt;regex type=&quot;pcre2&quot;&gt;status=&quot;Successful&quot;(?!.*log_component=&quot;GUI&quot;)(?!.*log_component=&quot;SSL VPN&quot;)&lt;/regex&gt;<br>    &lt;description&gt;Sophos XGS: Successful login by $(dstuser) from $(srcip)&lt;/description&gt;<br>    &lt;group&gt;sophos_xgs,authentication_success&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>&lt;/group&gt;</pre><blockquote><strong><em>Important note about rule ordering:</em></strong><em> In Wazuh, when multiple rules share the same parent (</em><em>if_sid), the rule with the </em><strong><em>lowest ID fires first</em></strong><em>. This is why the more specific rules (admin change </em><em>110101, SSL VPN </em><em>110103) have lower IDs than the generic catch-all (</em><em>110108). Additionally, </em><em>type=&quot;pcre2&quot; regex is used so multiple conditions can be matched in a single expression, preventing the generic rule from firing instead of specific ones.</em></blockquote><h3>Step 8: Test All Rules</h3><p>Run logtest and paste each log one at a time:</p><pre>sudo /var/ossec/bin/wazuh-logtest</pre><p>Test 1 — Admin configuration change (expect rule 110101, level 8):</p><pre>&lt;134&gt;device_name=&quot;SFW&quot; timestamp=&quot;2026-06-03T11:35:00+0100&quot; device_model=&quot;SFVH&quot; device_serial_id=&quot;V01FGHs6546BFG&quot; log_id=&quot;06217364748&quot; log_type=&quot;Event&quot; log_component=&quot;GUI&quot; log_subtype=&quot;Admin&quot; status=&quot;Successful&quot; severity=&quot;Information&quot; log_version=1 user_name=&quot;admin_central_sa&quot; src_ip=&quot;127.0.0.1&quot; message=&quot;Log Settings were changed by admin_central_sa from 127.0.0.1 using GUI&quot;</pre><p>Test 2 — Authentication failure (expect rule 110106, level 8):</p><pre>&lt;133&gt;device_name=&quot;SFW&quot; timestamp=&quot;2026-06-03T11:32:45+0100&quot; device_model=&quot;SFVH&quot; device_serial_id=&quot;V01625DREBH&quot; log_id=&quot;02745294645&quot; log_type=&quot;Event&quot; log_component=&quot;CLI&quot; log_subtype=&quot;Admin&quot; status=&quot;Failed&quot; severity=&quot;Notice&quot; log_version=1 user_name=&quot;bdsm&quot; src_ip=&quot;80.87.83.229&quot; message=&quot;User bdsm failed to login from 80.87.83.229 using ssh because of wrong credentials&quot;</pre><p>Test 3 — SSL VPN login (expect rule 110103, level 3):</p><pre>&lt;134&gt;device_name=&quot;SFW&quot; timestamp=&quot;2026-06-03T11:33:53+0100&quot; device_model=&quot;SFVH&quot; device_serial_id=&quot;V0162542BHFVCVH&quot; log_id=&quot;06183643725&quot; log_type=&quot;Event&quot; log_component=&quot;SSL VPN Authentication&quot; log_subtype=&quot;Authentication&quot; log_version=1 status=&quot;Successful&quot; severity=&quot;Information&quot; user_name=&quot;onyinyechi.uzor&quot; src_ip=&quot;102.89.45.36&quot; message=&quot;User onyinyechi.uzor authenticated successfully&quot;</pre><p>Test 4 — Branch firewall with hostname (expect rule 110101, level 8):</p><pre>&lt;134&gt;device_name=&quot;USA&quot; timestamp=&quot;2026-06-04T10:13:51+0100&quot; device_model=&quot;SFVH&quot; device_serial_id=&quot;V01001HTVD28272&quot; log_id=&quot;062837364537&quot; log_type=&quot;Event&quot; log_component=&quot;GUI&quot; log_subtype=&quot;Admin&quot; status=&quot;Successful&quot; severity=&quot;Notice&quot; log_version=1 user_name=&quot;admin_central_sa&quot; src_ip=&quot;127.0.0.1&quot; message=&quot;User admin_central_sa logged in successfully to Web Admin Console.&quot;</pre><p>Step 9: Restart Wazuh and Verify Live Alerts</p><pre>sudo systemctl restart wazuh-manager</pre><p>Confirm Wazuh started successfully:</p><pre>sudo systemctl status wazuh-manager</pre><p>Watch live alerts coming in:</p><pre>sudo tail -f /var/ossec/logs/alerts/alerts.log | grep -E &quot;110101|110102|110103|110104|110105|110106|110107|110108&quot;</pre><p>You should see alerts like:</p><pre>2026 Jun 04 09:05:38 vm-siem-rc-001-&gt;123.3.3.4<br>Rule: 110103 (level 3) -&gt; &#39;Sophos XGS: SSL VPN login by jamiu.adeleke from 197.211.59.124&#39;<br><br>2026 Jun 04 09:05:21 vm-siem-rc-001-&gt;123.3.3.4<br>Rule: 110106 (level 8) -&gt; &#39;Sophos XGS: Authentication failure for user jamiu.adelekefrom 123.3.3.4&#39;</pre><h3>Step 10: Verify Multiple Firewalls</h3><p>If you have multiple branch firewalls, check that all are generating alerts:</p><pre>sudo grep -B2 &quot;Rule: 1101&quot; /var/ossec/logs/alerts/alerts.log | grep &quot;\-&gt;&quot; | grep -oP &quot;172\.31\.[0-9]+\.1&quot; | sort | uniq -c | sort -rn</pre><p>Sample output:</p><pre>1767 123.3.3.4      ← USAfirewall (most active)<br> 169 123.3.3.4     ← Branch firewall<br>   3 123.3.3.4     ← Branch firewall</pre><h3>Troubleshooting</h3><p><strong>Logs arriving but no decoder match:</strong></p><ul><li>Run tcpdump to confirm raw logs are arriving on port 5514</li><li>Check prematch in decoder — ensure device_name=&quot; is present in the log</li><li>Run wazuh-logtest to debug decoder matching</li></ul><p><strong>Wrong rule firing:</strong></p><ul><li>Wazuh evaluates child rules by rule ID order (lowest first)</li><li>Use type=&quot;pcre2&quot; regex with multiple conditions in one expression to ensure specific rules fire before generic ones</li><li>Use wazuh-logtest -v for verbose rule debugging</li></ul><p><strong>Firewall IP blocked:</strong></p><ul><li>Ensure the firewall IP is in &lt;allowed-ips&gt; in ossec.conf</li><li>Restart wazuh-manager after adding new IPs</li></ul><p><strong>User and IP empty in alert description:</strong></p><ul><li>The decoder must extract both user_name and src_ip in the same decoder entry using a combined regex</li><li>Use type=&quot;pcre2&quot; for proper field extraction</li></ul><h3>Conclusion</h3><p>You now have a fully functional Sophos XGS to Wazuh integration that:</p><ul><li>Receives syslog from multiple firewalls across all branches</li><li>Decodes all key fields including username and source IP</li><li>Generates meaningful alerts for security events</li><li>Sends email notifications for high severity events (level 7+)</li><li>Detects brute force attacks in real time</li></ul><p>This integration gives your SOC team full visibility into firewall activity directly within Wazuh, without needing a separate tool to monitor Sophos events.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc09b50fa60b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating Huawei S310–24P4S Switch with Wazuh SIEM for Centralized Security Monitoring]]></title>
            <link>https://medium.com/@aabiodunadeleke/integrating-huawei-s310-24p4s-switch-with-wazuh-siem-for-centralized-security-monitoring-46db27916339?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/46db27916339</guid>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Tue, 19 May 2026 20:34:34 GMT</pubDate>
            <atom:updated>2026-05-19T20:34:34.307Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s cybersecurity landscape, centralized logging and monitoring of network infrastructure is critical for detecting threats, maintaining compliance, and ensuring operational visibility. This guide provides a complete, step-by-step walkthrough of integrating a Huawei switch with Wazuh SIEM (Security Information and Event Management) for real-time security monitoring.</p><p><strong>What You’ll Learn:</strong></p><ul><li>Configure syslog on Huawei switches</li><li>Set up Wazuh to receive network device logs</li><li>Create custom decoders and rules for Huawei switches</li><li>Troubleshoot common networking and configuration issues</li><li>Verify successful integration</li></ul><p><strong>Prerequisites:</strong></p><ul><li>Huawei S310–24P4S switch (or similar model)</li><li>Wazuh SIEM server installed and running</li><li>SSH/CLI access to the switch</li><li>Network connectivity between switch and Wazuh server</li><li>Basic knowledge of networking and Linux commands</li></ul><h3>Table of Contents</h3><ol><li>Architecture Overview</li><li>Phase 1: Switch Configuration</li><li>Phase 2: Wazuh Server Configuration</li><li>Phase 3: Custom Decoders and Rules</li><li>Phase 4: Verification and Testing</li><li>Phase 5: Troubleshooting</li><li>Conclusion</li></ol><h3>1. Architecture Overview</h3><h4>How It Works</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iox8mvwxQ7eh3c5XzmtHmw.png" /></figure><p>2. Phase 1: Switch Configuration<br>Step 1: Access the Switch</p><p>First, connect to your Huawei switch via SSH:</p><pre>ssh admin@123.3.3.4</pre><p>Replace 123.3.3.4 with your switch&#39;s IP address.</p><h4>Step 2: Verify Current Logging Configuration</h4><p>Before making changes, check the current state:</p><pre># View current logs<br>display logbuffer<br><br># Check information center status<br>display info-center<br><br># View network configuration<br>display ip interface brief</pre><p>Expected output:</p><pre>Interface                   IP Address/Mask    Physical Protocol<br>Vlanif1                     123.3.3.4/24      up       up</pre><h4>Step 3: Configure Syslog Server</h4><p>Enter system configuration mode and configure the syslog settings:</p><pre># Enter system view<br>system-view<br><br># Enable information center<br>info-center enable<br><br># Configure syslog server (replace with your Wazuh IP)<br>info-center loghost 123.3.3.4 facility local7<br><br># Set transport protocol and port<br>info-center loghost 123.3.3.4 transport udp port 5514<br><br># Configure log levels for different channels<br>info-center source default channel loghost log level informational<br>info-center source SNMP channel loghost log level informational<br>info-center source IFNET channel loghost log level informational<br><br># Configure timestamp format<br>info-center timestamp log date<br><br># Save configuration<br>save</pre><p>When prompted Are you sure to continue?[Y/N], type y and press Enter.</p><p>Step 4: Verify Switch Configuration</p><pre># Exit system view<br>quit<br><br># Verify syslog configuration<br>display info-center<br><br># Check loghost specifically<br>display current-configuration | include loghost</pre><p>Expected output:</p><pre>Log host:<br>        123.3.3.4, channel number 2, channel name loghost,<br>        language English, host facility local7</pre><h4>Step 5: Test Network Connectivity</h4><p>Ensure the switch can reach the Wazuh server:</p><pre>ping 123.3.3.4</pre><p><strong>Important:</strong> If ping fails, you have a network routing issue that must be resolved before proceeding.</p><h3>3. Phase 2: Wazuh Server Configuration</h3><h4>Step 1: Check Port Availability</h4><p>SSH to your Wazuh server and check if the syslog port is available:</p><pre>sudo netstat -ulnp | grep 5514</pre><p><strong>Problem:</strong> If you see rsyslogd using port 5514 (or 514):</p><pre>udp  0  0  0.0.0.0:514  0.0.0.0:*  858/rsyslogd</pre><p><strong>Solution:</strong> Disable rsyslogd from using that port:</p><pre>sudo nano /etc/rsyslog.conf</pre><p>Comment out these lines:</p><pre>#module(load=&quot;imudp&quot;)<br>#input(type=&quot;imudp&quot; port=&quot;514&quot;)</pre><p>Restart rsyslog:</p><pre>sudo systemctl restart rsyslog</pre><h4>Step 2: Configure Wazuh Remote Syslog</h4><p>Edit the Wazuh configuration:</p><pre>sudo nano /var/ossec/etc/ossec.conf</pre><p>Add the following inside the &lt;ossec_config&gt; section:</p><pre>&lt;ossec_config&gt;<br>  &lt;remote&gt;<br>    &lt;connection&gt;syslog&lt;/connection&gt;<br>    &lt;port&gt;5514&lt;/port&gt;<br>    &lt;protocol&gt;udp&lt;/protocol&gt;<br>    &lt;allowed-ips&gt;123.3.3.4/32&lt;/allowed-ips&gt;<br>  &lt;/remote&gt;<br>&lt;/ossec_config&gt;</pre><p><strong>Note:</strong> If you’re using standard port 514, change &lt;port&gt;5514&lt;/port&gt; to &lt;port&gt;514&lt;/port&gt;.</p><h4>Step 3: Enable Log Archiving (Optional)</h4><p>Find the &lt;global&gt; section and ensure these settings are enabled:</p><pre>&lt;global&gt;<br>  &lt;jsonout_output&gt;yes&lt;/jsonout_output&gt;<br>  &lt;alerts_log&gt;yes&lt;/alerts_log&gt;<br>  &lt;logall&gt;yes&lt;/logall&gt;<br>  &lt;logall_json&gt;yes&lt;/logall_json&gt;<br>  &lt;email_notification&gt;no&lt;/email_notification&gt;<br>&lt;/global&gt;</pre><p>Save and exit (Ctrl+X, Y, Enter).</p><h4>Step 4: Restart Wazuh Manager</h4><pre>sudo systemctl restart wazuh-manager<br>sudo systemctl status wazuh-manager</pre><p>Expected output:</p><pre>● wazuh-manager.service - Wazuh manager<br>     Active: active (running)</pre><p>Step 5: Verify Wazuh is Listening</p><pre>sudo netstat -ulnp | grep 5514</pre><p>Expected output:</p><pre>udp  0  0  0.0.0.0:5514  0.0.0.0:*  &lt;PID&gt;/wazuh-remoted</pre><h4>Step 6: Monitor Incoming Traffic</h4><p>Open a monitoring session to watch for incoming logs:</p><pre>sudo tcpdump -i any port 5514 and host 123.3.3.4 -vv</pre><p>You should see UDP packets arriving from the switch:</p><pre>08:10:09.161607 eth0  In  IP 123.3.3.4.38514 &gt; wazuh-server.5514: UDP, length 248<br>&lt;189&gt;May  5 2026 08:10:03 HUAWEI %%01QOS/4/hwXQoSPacketsDropInterfaceAlarm_active...</pre><p>Press Ctrl+C to stop monitoring.</p><h3>3. Phase 3: Custom Decoders and Rules</h3><p>To properly parse and alert on Huawei switch logs, we need custom decoders and rules.</p><h4>Step 1: Create Huawei Decoders</h4><pre>nano /var/ossec/etc/decoders/local_decoder.xml</pre><p>Add the following decoder configuration:</p><pre>&lt;!-- BASE HUAWEI --&gt;<br>&lt;decoder name=&quot;huawei-switch&quot;&gt;<br>  &lt;prematch&gt;HUAWEI&lt;/prematch&gt;<br>&lt;/decoder&gt;<br><br>&lt;!-- ========================= --&gt;<br>&lt;!-- AUTHENTICATION PARSING --&gt;<br>&lt;!-- ========================= --&gt;<br><br>&lt;decoder name=&quot;huawei-auth-details&quot;&gt;<br>  &lt;parent&gt;huawei-switch&lt;/parent&gt;<br>  &lt;prematch&gt;ADMIN_USER_ACCESSRESULT&lt;/prematch&gt;<br>  &lt;regex&gt;USER:([^;]+);.*IPADDRESS:([^;]+);.*ERRCODE:(\d+);RESULT:([^;]+);.*ACCESS TYPE:([^;]+);&lt;/regex&gt;<br>  &lt;order&gt;user, srcip, errcode, result, protocol&lt;/order&gt;<br>&lt;/decoder&gt;<br><br>&lt;!-- ========================= --&gt;<br>&lt;!-- SSH EVENTS --&gt;<br>&lt;!-- ========================= --&gt;<br><br>&lt;decoder name=&quot;huawei-ssh-fail&quot;&gt;<br>  &lt;parent&gt;huawei-switch&lt;/parent&gt;<br>  &lt;prematch&gt;SSH_USER_LOGIN_FAIL&lt;/prematch&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;huawei-ssh-success&quot;&gt;<br>  &lt;parent&gt;huawei-switch&lt;/parent&gt;<br>  &lt;prematch&gt;SSH_USER_LOGIN\(s\)&lt;/prematch&gt;<br>&lt;/decoder&gt;<br><br>&lt;!-- ========================= --&gt;<br>&lt;!-- QOS EVENTS --&gt;<br>&lt;!-- ========================= --&gt;<br><br>&lt;decoder name=&quot;huawei-qos-active&quot;&gt;<br>  &lt;parent&gt;huawei-switch&lt;/parent&gt;<br>  &lt;prematch&gt;hwXQoSPacketsDropInterfaceAlarm_active&lt;/prematch&gt;<br>&lt;/decoder&gt;<br><br>&lt;decoder name=&quot;huawei-qos-clear&quot;&gt;<br>  &lt;parent&gt;huawei-switch&lt;/parent&gt;<br>  &lt;prematch&gt;hwXQoSPacketsDropInterfaceAlarm_clear&lt;/prematch&gt;<br>&lt;/decoder&gt;<br><br>&lt;!-- ========================= --&gt;<br>&lt;!-- CONFIG / CLI EVENTS --&gt;<br>&lt;!-- ========================= --&gt;<br><br>&lt;decoder name=&quot;huawei-cli&quot;&gt;<br>  &lt;parent&gt;huawei-switch&lt;/parent&gt;<br>  &lt;prematch&gt;CLI/|SHELL/|CFG/|CONFIG&lt;/prematch&gt;<br>&lt;/decoder&gt;</pre><p>Save and exit.</p><h4>Step 2: Create Huawei Rules</h4><pre>nano /var/ossec/etc/rules/local_rules.xml</pre><p>Add comprehensive rules for different event types:</p><pre>&lt;group name=&quot;huawei,network,security,&quot;&gt;<br><br>  &lt;!-- ========================= --&gt;<br>  &lt;!-- BASE RULE --&gt;<br>  &lt;!-- ========================= --&gt;<br>  &lt;rule id=&quot;110001&quot; level=&quot;3&quot;&gt;<br>    &lt;decoded_as&gt;huawei-switch&lt;/decoded_as&gt;<br>    &lt;description&gt;Huawei device log detected&lt;/description&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- ========================= --&gt;<br>  &lt;!-- AUTHENTICATION (STRUCTURED) --&gt;<br>  &lt;!-- ========================= --&gt;<br><br>  &lt;rule id=&quot;110002&quot; level=&quot;5&quot;&gt;<br>    &lt;decoded_as&gt;huawei-auth-details&lt;/decoded_as&gt;<br>    &lt;field name=&quot;result&quot;&gt;success&lt;/field&gt;<br>    &lt;description&gt;Huawei Admin Login Success&lt;/description&gt;<br>    &lt;group&gt;huawei,authentication,success&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;rule id=&quot;110003&quot; level=&quot;10&quot;&gt;<br>    &lt;decoded_as&gt;huawei-auth-details&lt;/decoded_as&gt;<br>    &lt;field name=&quot;result&quot;&gt;Authentication fail&lt;/field&gt;<br>    &lt;description&gt;Huawei Admin Login Failed&lt;/description&gt;<br>    &lt;group&gt;huawei,authentication,failed,attack&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- ========================= --&gt;<br>  &lt;!-- SSH RAW EVENTS --&gt;<br>  &lt;!-- ========================= --&gt;<br><br>  &lt;rule id=&quot;110020&quot; level=&quot;8&quot;&gt;<br>    &lt;if_sid&gt;110001&lt;/if_sid&gt;<br>    &lt;match&gt;SSH_USER_LOGIN_FAIL&lt;/match&gt;<br>    &lt;description&gt;Huawei SSH Login Failed (raw)&lt;/description&gt;<br>    &lt;group&gt;huawei,authentication,attack&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;rule id=&quot;110021&quot; level=&quot;5&quot;&gt;<br>    &lt;if_sid&gt;110001&lt;/if_sid&gt;<br>    &lt;match&gt;SSH_USER_LOGIN\(s\)&lt;/match&gt;<br>    &lt;description&gt;Huawei SSH Login Success (raw)&lt;/description&gt;<br>    &lt;group&gt;huawei,authentication,audit&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- ========================= --&gt;<br>  &lt;!-- QOS EVENTS --&gt;<br>  &lt;!-- ========================= --&gt;<br><br>  &lt;rule id=&quot;110010&quot; level=&quot;10&quot;&gt;<br>    &lt;if_sid&gt;110001&lt;/if_sid&gt;<br>    &lt;match&gt;hwXQoSPacketsDropInterfaceAlarm_active&lt;/match&gt;<br>    &lt;description&gt;Huawei Interface Packet Drop ACTIVE&lt;/description&gt;<br>    &lt;group&gt;huawei,qos,network&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;rule id=&quot;110011&quot; level=&quot;5&quot;&gt;<br>    &lt;if_sid&gt;110001&lt;/if_sid&gt;<br>    &lt;match&gt;hwXQoSPacketsDropInterfaceAlarm_clear&lt;/match&gt;<br>    &lt;description&gt;Huawei Interface Recovery from Packet Drop&lt;/description&gt;<br>    &lt;group&gt;huawei,qos,network&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- ========================= --&gt;<br>  &lt;!-- CONFIG CHANGE (CRITICAL) --&gt;<br>  &lt;!-- ========================= --&gt;<br><br>  &lt;rule id=&quot;110030&quot; level=&quot;12&quot;&gt;<br>    &lt;decoded_as&gt;huawei-cli&lt;/decoded_as&gt;<br>    &lt;description&gt;Huawei Configuration Change Detected&lt;/description&gt;<br>    &lt;group&gt;huawei,configuration,critical&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>&lt;/group&gt;</pre><p>Save and exit.</p><h4>Step 3: Test Decoder Syntax</h4><p>Before restarting Wazuh, test your decoders:</p><pre>sudo /var/ossec/bin/wazuh-logtest</pre><p>Paste a sample Huawei log (from your switch logs):</p><pre>&lt;189&gt;May  5 2026 08:10:33 HUAWEI %%01SSH/5/SSH_USER_LOGOUT(s):CID=0x8093754e;The SSH user logged out. (ServiceType=stelnet, UserName=admin, UserAddress=123.3.3.1)</pre><p>Expected output:</p><pre>**Phase 1: Completed pre-decoding.<br>**Phase 2: Completed decoding.<br>       decoder: &#39;huawei-switch&#39;<br>       decoder: &#39;huawei-ssh&#39;<br>**Phase 3: Completed filtering (rules).<br>       Rule id: &#39;100109&#39;<br>       Level: &#39;3&#39;<br>       Description: &#39;Huawei: User logout&#39;</pre><p>Press Ctrl+D to exit.</p><h4>Step 4: Restart Wazuh Manager</h4><pre>sudo systemctl restart wazuh-manager<br>sudo systemctl status wazuh-manager</pre><p>Verify no errors in the log:</p><pre>sudo tail -50 /var/ossec/logs/ossec.log | grep -i error</pre><h3>4. Phase 4: Verification and Testing</h3><h4>Step 1: Generate Test Events</h4><p>SSH to the switch and create interface events:</p><pre>ssh admin@123.3.3.4<br><br>system-view<br>interface GigabitEthernet1/0/20<br>shutdown<br>undo shutdown<br>quit</pre><h4>Step 2: Monitor Wazuh Alerts</h4><p>On the Wazuh server, watch for alerts:</p><pre>sudo tail -f /var/ossec/logs/alerts/2026/May/ossec-alerts-$(date +%d).json | grep &quot;123.3.3.4&quot;</pre><p>Expected output:</p><pre>{<br>  &quot;timestamp&quot;:&quot;2026-05-05T08:15:23.456+0000&quot;,<br>  &quot;rule&quot;:{<br>    &quot;level&quot;:5,<br>    &quot;description&quot;:&quot;Huawei: Interface link down - potential connectivity issue&quot;,<br>    &quot;id&quot;:&quot;100106&quot;,<br>    &quot;groups&quot;:[&quot;huawei&quot;,&quot;switch&quot;,&quot;network_interface&quot;,&quot;availability&quot;]<br>  },<br>  &quot;agent&quot;:{&quot;id&quot;:&quot;000&quot;,&quot;name&quot;:&quot;wazuh-server&quot;},<br>  &quot;location&quot;:&quot;123.3.3.4&quot;,<br>  &quot;full_log&quot;:&quot;May  5 2026 08:15:23 HUAWEI %%01IFNET/4/LINK_STATE... Interface GE1/0/20 changed state to down&quot;<br>}</pre><p>Step 3: Check Alert Count</p><pre># Count alerts from the switch today<br>sudo grep -c &quot;123.3.3.4&quot; /var/ossec/logs/alerts/2026/May/ossec-alerts-$(date +%d).json<br><br># See which rules are being triggered<br>sudo grep &quot;123.3.3.4&quot; /var/ossec/logs/alerts/2026/May/ossec-alerts-$(date +%d).json | jq -r &#39;.rule.id&#39; | sort | uniq -c</pre><p>Example output:</p><pre>15 100101   # QoS packet drop alerts<br>   8 100103   # VTY threshold alerts<br>   2 100105   # Interface up events<br>   2 100106   # Interface down events<br>  12 100107   # Successful logins<br>   3 100109   # User logouts</pre><h4>Step 4: Verify in Wazuh Dashboard</h4><ol><li>Open your browser and navigate to: https://123.3.3.4 (or your Wazuh dashboard URL)</li><li>Login with your credentials</li><li>Navigate to: <strong>Modules</strong> → <strong>Security Events</strong></li><li>Set time range to: <strong>Last 1 hour</strong></li><li>In the search bar, enter: location:&quot;123.3.3.4&quot;</li></ol><p><strong>What you should see:</strong></p><ul><li>Real-time events from your Huawei switch</li><li>Rule names and descriptions</li><li>Severity levels</li><li>Event timeline</li><li>Top event types</li><li>Interface-specific alerts</li></ul><h3>5. Phase 5: Troubleshooting</h3><h4>Issue 1: No Logs Arriving at Wazuh</h4><p><strong>Symptoms:</strong></p><pre>sudo tcpdump -i any port 5514 -c 10<br># Shows: 0 packets captured</pre><p><strong>Diagnosis Steps:</strong></p><ol><li><strong>Test network connectivity:</strong></li></ol><pre># From Wazuh server<br>ping &lt;Switch IP&gt;<br><br># From switch<br>ping &lt;Wazuh IP&gt;</pre><p>2. <strong>Check firewall rules:</strong></p><pre># On Wazuh server<br>sudo iptables -L -n -v | grep 5514<br>sudo ufw status<br><br># Allow traffic if blocked<br>sudo ufw allow from 123.3.3.4 to any port 5514 proto udp<br>sudo firewall-cmd --permanent --add-port=5514/udp<br>sudo firewall-cmd --reload</pre><p>3.<strong> Verify routing:</strong></p><pre># From Wazuh<br>ip route get 123.3.3.4<br><br># From switch<br>display ip routing-table</pre><p><strong>Solution for Network Segmentation:</strong></p><p>If the switch and Wazuh are on different subnets (e.g., 123.3.3.x vs 123.3.3.x), contact your network team to:</p><ul><li>Enable routing between subnets</li><li>Allow UDP port 5514 from switch subnet to Wazuh</li><li>Configure proper gateway settings</li></ul><h4>Issue 2: Port Conflict with rsyslogd</h4><p><strong>Symptoms:</strong></p><pre>sudo netstat -ulnp | grep 5514<br># Shows: udp  0  0  0.0.0.0:5514  *  858/rsyslogd</pre><p>Solution:</p><pre>sudo nano /etc/rsyslog.conf<br># Comment out:<br># #module(load=&quot;imudp&quot;)<br># #input(type=&quot;imudp&quot; port=&quot;5514&quot;)<br><br>sudo systemctl restart rsyslog<br>sudo systemctl restart wazuh-manager</pre><h4>Issue 3: Logs Arriving but Not Parsed</h4><p><strong>Symptoms:</strong></p><ul><li>Logs visible in tcpdump</li><li>No alerts being generated</li><li>Generic rule 1002 triggered instead of custom rules</li></ul><p><strong>Diagnosis:</strong></p><pre># Test decoder<br>sudo /var/ossec/bin/wazuh-logtest<br># Paste a sample log and check if custom decoder matches</pre><p>Solution:</p><pre># Check decoder syntax<br>sudo cat /var/ossec/etc/decoders/huawei_decoders.xml<br><br># Check for errors<br>sudo tail -100 /var/ossec/logs/ossec.log | grep -i error<br><br># Verify decoder is loaded<br>sudo grep -r &quot;huawei-switch&quot; /var/ossec/logs/ossec.log</pre><h4>Issue 4: Permission Denied on Switch</h4><p><strong>Symptoms:</strong></p><pre>Error: Do not have permission to run the command</pre><p><strong>Solution:</strong></p><p>Request elevated privileges from your network administrator.</p><p>Or try privilege escalation:</p><pre>super<br># Enter super password if configured</pre><h4>Issue 5: Archives Empty but Alerts Present</h4><p><strong>Symptoms:</strong></p><pre>ls -lh /var/ossec/logs/archives/2026/May/ossec-archive-*.log<br># Shows: 0 bytes</pre><p><strong>This is normal if archiving is disabled.</strong> Wazuh stores:</p><ul><li><strong>Alerts</strong> (events matching rules) → /var/ossec/logs/alerts/</li><li><strong>Archives</strong> (all logs) → /var/ossec/logs/archives/ (if enabled)</li></ul><pre>sudo nano /var/ossec/etc/ossec.conf<br><br># Add in &lt;global&gt; section:<br>&lt;logall&gt;yes&lt;/logall&gt;<br>&lt;logall_json&gt;yes&lt;/logall_json&gt;<br><br>sudo systemctl restart wazuh-manager</pre><h3>6. Conclusion</h3><h4>What We Accomplished</h4><p>✅ <strong>Configured syslog</strong> on Huawei S310–24P4S switch<br> ✅ <strong>Set up Wazuh</strong> to receive network device logs<br> ✅ <strong>Created custom decoders</strong> to parse Huawei log format<br> ✅ <strong>Built comprehensive rules</strong> for security monitoring<br> ✅ <strong>Verified integration</strong> with live testing<br> ✅ <strong>Established monitoring</strong> via Wazuh dashboard</p><h4>Key Capabilities Enabled</h4><p><strong>Security Monitoring:</strong></p><ul><li>Real-time authentication tracking</li><li>Failed login detection and alerting</li><li>Configuration change auditing</li><li>Unauthorized access attempts</li></ul><p><strong>Performance Monitoring:</strong></p><ul><li>QoS packet drop detection</li><li>Interface status tracking</li><li>VTY connection threshold alerts</li><li>Network congestion identification</li></ul><p><strong>Compliance:</strong></p><ul><li>PCI DSS 10.2.4, 10.2.5, 10.2.7 requirements</li><li>GDPR Article 35 technical measures</li><li>Centralized audit trail</li><li>Tamper-proof log retention</li></ul><p>This integration provides a solid foundation for network security monitoring. The combination of Huawei’s robust logging capabilities and Wazuh’s powerful analysis engine creates a comprehensive visibility layer for your network infrastructure.</p><p>Remember: <strong>Security is a journey, not a destination.</strong> Continuously tune your rules, monitor for anomalies, and stay informed about emerging threats.</p><p>#Wazuh #SIEM #NetworkSecurity #Huawei #Cybersecurity #LogManagement #ThreatDetection #Compliance #NetworkMonitoring #SecOps</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46db27916339" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating Azure DevOps with Wazuh: A Complete Security Monitoring Guide]]></title>
            <link>https://medium.com/@aabiodunadeleke/integrating-azure-devops-with-wazuh-a-complete-security-monitoring-guide-d909aa7cda82?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d909aa7cda82</guid>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[wazuh]]></category>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Fri, 08 May 2026 08:42:46 GMT</pubDate>
            <atom:updated>2026-05-08T08:42:46.379Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In modern DevSecOps environments, monitoring your CI/CD pipeline for security threats is crucial. Azure DevOps hosts your entire software development lifecycle — from code repositories to build pipelines and deployment workflows. Every action in this ecosystem can harbor potential security risks: unauthorized code commits, suspicious pipeline modifications, permission escalations, or malicious service connection changes.</p><p>This guide demonstrates how to integrate Azure DevOps audit logs with Wazuh, an open-source SIEM (Security Information and Event Management) platform, enabling centralized security monitoring and real-time threat detection across your development infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yY0lWuvqaQWEG7yCBklhMw.png" /></figure><h3>What You’ll Achieve</h3><p>By the end of this tutorial, you’ll have:</p><ul><li><strong>Real-time audit log collection</strong> from Azure DevOps</li><li><strong>Automated security monitoring</strong> with custom detection rules</li><li><strong>Centralized visibility</strong> of all DevOps activities in Wazuh dashboard</li><li><strong>Compliance-ready audit trails</strong> for regulations like PCI-DSS, GDPR, and ISO 27001</li><li><strong>Proactive threat detection</strong> for suspicious activities like:</li><li>Unauthorized permission changes</li><li>Destructive Git operations (force pushes, branch deletions)</li><li>Pipeline and release modifications</li><li>Service connection tampering</li><li>Repository deletions</li></ul><h3>Prerequisites</h3><p>Before starting, ensure you have:</p><ul><li><strong>Azure DevOps Organization</strong> with administrative access</li><li><strong>Microsoft Entra ID</strong> (formerly Azure AD) with permissions to create app registrations</li><li><strong>Wazuh Manager</strong> (version 4.x or higher) installed and running</li><li><strong>Basic knowledge</strong> of Python, Linux command line, and JSON</li><li><strong>Auditing enabled</strong> in your Azure DevOps organization</li></ul><h3>Architecture Overview</h3><p>The integration works as follows:</p><ol><li><strong>Service Principal</strong> in Entra ID authenticates to Azure DevOps API</li><li><strong>Python script</strong> polls the Azure DevOps Audit Log API every 5 minutes</li><li><strong>Audit logs</strong> are written to a JSON file on the Wazuh server</li><li><strong>Wazuh log collector</strong> monitors the file and ingests new entries</li><li><strong>Detection rules</strong> analyze events and generate security alerts</li><li><strong>Wazuh dashboard</strong> displays alerts with full context and details</li></ol><h3>Part 1: Azure Configuration</h3><h3>Step 1.1 — Create or Use Existing App Registration</h3><ol><li>Navigate to <strong>Microsoft Entra ID</strong> in the Azure Portal</li><li>Go to <strong>App registrations</strong></li><li>Either use an existing app registration or click <strong>+ New registration</strong></li></ol><ul><li>Name: Wazuh-DevOps-Integration</li><li>Supported account types: <strong>Accounts in this organizational directory only</strong></li><li>Click <strong>Register</strong></li></ul><p>4. Note down the following values (you’ll need them later):</p><ul><li><strong>Application (client) ID</strong></li><li><strong>Directory (tenant) ID</strong></li></ul><h3>Step 1.2 — Create a Client Secret</h3><ol><li>In your app registration, go to <strong>Certificates &amp; secrets</strong></li><li>Click <strong>+ New client secret</strong></li><li>Description: Wazuh-DevOps-Secret</li><li>Expiration: Choose appropriate duration (6–12 months recommended)</li><li>Click <strong>Add</strong></li><li><strong>Copy the secret value immediately</strong> (it won’t be shown again)</li></ol><h3>Step 1.3 — Add Azure DevOps API Permissions</h3><ol><li>In your app registration, go to <strong>API permissions</strong></li><li>Click <strong>+ Add a permission</strong></li><li>Select <strong>APIs my organization uses</strong></li><li>Search for <strong>Azure DevOps</strong> (or use GUID: 49355ac-1rrd1-4r7f-aa17-267ca698)</li><li>Select <strong>Delegated permissions</strong></li><li>Check <strong>user_impersonation</strong> and any audit-related permissions</li><li>Click <strong>Add permissions</strong></li><li>Click <strong>Grant admin consent</strong> and confirm</li></ol><blockquote><strong><em>Note:</em></strong><em> Azure DevOps API permissions are primarily delegated. We’ll use client credentials flow with a workaround.</em></blockquote><h3>Step 1.4 — Add Service Principal to Azure DevOps</h3><ol><li>Navigate to <a href="https://dev.azure.com/YourOrganization">https://dev.azure.com/YourOrganization</a></li><li>Click <strong>Organization Settings</strong> (bottom left)</li><li>Go to <strong>Users</strong></li><li>Click <strong>Add users</strong></li><li>In the search box, paste your <strong>Application (client) ID</strong></li><li>Select the app when it appears</li><li>Access level: <strong>Basic</strong></li><li>Click <strong>Add</strong></li></ol><h3>Step 1.5 — Grant Audit Permissions</h3><p>To access audit logs, add the service principal to administrators:</p><ol><li>In <strong>Organization Settings</strong>, go to <strong>Permissions</strong></li><li>Select <strong>Project Collection Administrators</strong></li><li>Click <strong>Members</strong> tab</li><li>Click <strong>Add</strong></li><li>Search for your <strong>Application (client) ID</strong></li><li>Add it to the group</li></ol><h3>Step 1.6 — Enable Auditing</h3><ol><li>Go to <a href="https://dev.azure.com/YourOrganization/_settings/audit">https://dev.azure.com/YourOrganization/_settings/audit</a></li><li>Ensure <strong>Enable auditing</strong> is toggled <strong>ON</strong></li><li>If the option is unavailable, your Azure DevOps plan may not support auditing</li></ol><h3>Part 2: Wazuh Server Configuration</h3><h3>Step 2.1 — Create Directory Structure</h3><p>SSH into your Wazuh manager and create the necessary directories:</p><pre># Create log directory<br>sudo mkdir -p /var/log/AzureDevops<br>sudo chown wazuh:wazuh /var/log/AzureDevops<br>sudo chmod 750 /var/log/AzureDevops<br><br># Verify directory creation<br>ls -ld /var/log/AzureDevops</pre><h3>Step 2.2 — Create the Collection Script</h3><p>Create the Python script that will poll Azure DevOps API:</p><pre>sudo nano /var/ossec/integrations/azure_devops_audit.py</pre><p>Paste the following script:</p><pre>m#!/usr/bin/env python3<br>&quot;&quot;&quot;<br>Azure DevOps Audit Log Collector for Wazuh<br>Collects audit logs from Azure DevOps and writes them to a JSON file for Wazuh monitoring<br>&quot;&quot;&quot;<br><br>import requests<br>import json<br>import os<br>import sys<br>from datetime import datetime, timedelta<br><br># Configuration from environment variables<br>ORGANIZATION = os.environ.get(&quot;AZDO_ORG&quot;, &quot;&quot;)<br>CLIENT_ID = os.environ.get(&quot;AZDO_CLIENT_ID&quot;, &quot;&quot;)<br>TENANT_ID = os.environ.get(&quot;AZDO_TENANT_ID&quot;, &quot;&quot;)<br>CLIENT_SECRET = os.environ.get(&quot;AZDO_CLIENT_SECRET&quot;, &quot;&quot;)<br>LOG_FILE = &quot;/var/log/AzureDevops/AzureDevops_Audit_logs.json&quot;<br>API_VERSION = &quot;7.2-preview.1&quot;<br><br>def validate_config():<br>    &quot;&quot;&quot;Validate that all required configuration is present&quot;&quot;&quot;<br>    missing = []<br>    if not ORGANIZATION:<br>        missing.append(&quot;AZDO_ORG&quot;)<br>    if not CLIENT_ID:<br>        missing.append(&quot;AZDO_CLIENT_ID&quot;)<br>    if not TENANT_ID:<br>        missing.append(&quot;AZDO_TENANT_ID&quot;)<br>    if not CLIENT_SECRET:<br>        missing.append(&quot;AZDO_CLIENT_SECRET&quot;)<br>    <br>    if missing:<br>        print(f&quot;ERROR: Missing required environment variables: {&#39;, &#39;.join(missing)}&quot;)<br>        print(&quot;Please ensure these are set in /var/ossec/integrations/azure_devops.env&quot;)<br>        sys.exit(1)<br>    <br>    print(f&quot;✓ Configuration validated&quot;)<br>    print(f&quot;  Organization: {ORGANIZATION}&quot;)<br>    print(f&quot;  Client ID: {CLIENT_ID[:8]}...{CLIENT_ID[-4:]}&quot;)<br>    print(f&quot;  Tenant ID: {TENANT_ID[:8]}...{TENANT_ID[-4:]}&quot;)<br><br>def get_access_token():<br>    &quot;&quot;&quot;<br>    Obtain an access token using client credentials flow<br>    Returns: Access token string or None on failure<br>    &quot;&quot;&quot;<br>    print(&quot;\n[1/3] Requesting access token from Microsoft Entra ID...&quot;)<br>    <br>    token_url = f&quot;https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token&quot;<br>    <br>    headers = {<br>        &quot;Content-Type&quot;: &quot;application/x-www-form-urlencoded&quot;<br>    }<br>    <br>    data = {<br>        &quot;grant_type&quot;: &quot;client_credentials&quot;,<br>        &quot;client_id&quot;: CLIENT_ID,<br>        &quot;client_secret&quot;: CLIENT_SECRET,<br>        &quot;scope&quot;: &quot;499b84ac-1321-427f-aa17-267ca6975798/.default&quot;<br>    }<br>    <br>    try:<br>        response = requests.post(token_url, headers=headers, data=data, timeout=30)<br>        <br>        if response.status_code == 200:<br>            token_data = response.json()<br>            print(f&quot;✓ Access token obtained successfully&quot;)<br>            return token_data.get(&quot;access_token&quot;)<br>        else:<br>            print(f&quot;✗ Failed to obtain access token&quot;)<br>            print(f&quot;  Status Code: {response.status_code}&quot;)<br>            print(f&quot;  Response: {response.text}&quot;)<br>            return None<br>            <br>    except requests.exceptions.RequestException as e:<br>        print(f&quot;✗ Network error while obtaining token: {str(e)}&quot;)<br>        return None<br>    except Exception as e:<br>        print(f&quot;✗ Unexpected error while obtaining token: {str(e)}&quot;)<br>        return None<br><br>def fetch_audit_logs(access_token):<br>    &quot;&quot;&quot;<br>    Fetch audit logs from Azure DevOps<br>    Returns: List of audit log entries or None on failure<br>    &quot;&quot;&quot;<br>    print(&quot;\n[2/3] Fetching audit logs from Azure DevOps...&quot;)<br>    <br>    # Calculate time range (last 5 minutes)<br>    end_time = datetime.utcnow().replace(microsecond=0).isoformat() + &quot;Z&quot;<br>    start_time = (datetime.utcnow() - timedelta(minutes=5)).replace(microsecond=0).isoformat() + &quot;Z&quot;<br>    <br>    print(f&quot;  Time range: {start_time} to {end_time}&quot;)<br>    <br>    audit_url = (<br>        f&quot;https://auditservice.dev.azure.com/{ORGANIZATION}/_apis/audit/downloadlog&quot;<br>        f&quot;?format=json&amp;startTime={start_time}&amp;endTime={end_time}&amp;api-version={API_VERSION}&quot;<br>    )<br>    <br>    headers = {<br>        &quot;Authorization&quot;: f&quot;Bearer {access_token}&quot;,<br>        &quot;Accept&quot;: &quot;application/json&quot;,<br>        &quot;Content-Type&quot;: &quot;application/json&quot;<br>    }<br>    <br>    try:<br>        response = requests.get(audit_url, headers=headers, timeout=60)<br>        <br>        if response.status_code == 200:<br>            logs = response.json()<br>            <br>            if isinstance(logs, list):<br>                print(f&quot;✓ Successfully retrieved {len(logs)} audit log entries&quot;)<br>                return logs<br>            else:<br>                print(f&quot;✓ Retrieved audit logs (format: {type(logs).__name__})&quot;)<br>                return logs if logs else []<br>                <br>        elif response.status_code == 401:<br>            print(f&quot;✗ Authentication failed (401 Unauthorized)&quot;)<br>            print(f&quot;  This usually means:&quot;)<br>            print(f&quot;    - The service principal doesn&#39;t have audit log permissions&quot;)<br>            print(f&quot;    - The service principal hasn&#39;t been added to Azure DevOps&quot;)<br>            print(f&quot;    - Auditing is not enabled in Azure DevOps&quot;)<br>            return None<br>            <br>        elif response.status_code == 403:<br>            print(f&quot;✗ Access forbidden (403 Forbidden)&quot;)<br>            print(f&quot;  The service principal needs to be added to Azure DevOps organization&quot;)<br>            return None<br>            <br>        else:<br>            print(f&quot;✗ Failed to fetch audit logs&quot;)<br>            print(f&quot;  Status Code: {response.status_code}&quot;)<br>            print(f&quot;  Response: {response.text[:500]}&quot;)<br>            return None<br>            <br>    except requests.exceptions.RequestException as e:<br>        print(f&quot;✗ Network error while fetching logs: {str(e)}&quot;)<br>        return None<br>    except Exception as e:<br>        print(f&quot;✗ Unexpected error while fetching logs: {str(e)}&quot;)<br>        return None<br><br>def write_logs_to_file(logs):<br>    &quot;&quot;&quot;<br>    Write enriched logs to JSON file for Wazuh ingestion<br>    Returns: True on success, False on failure<br>    &quot;&quot;&quot;<br>    print(f&quot;\n[3/3] Writing logs to {LOG_FILE}...&quot;)<br>    <br>    if not logs:<br>        print(&quot;  No logs to write&quot;)<br>        return True<br>    <br>    try:<br>        # Ensure log directory exists<br>        log_dir = os.path.dirname(LOG_FILE)<br>        if not os.path.exists(log_dir):<br>            os.makedirs(log_dir, mode=0o750)<br>            print(f&quot;  Created log directory: {log_dir}&quot;)<br>        <br>        # Write logs with enrichment<br>        written_count = 0<br>        with open(LOG_FILE, &quot;a&quot;, encoding=&quot;utf-8&quot;) as f:<br>            for log in logs:<br>                # Enrich log entry<br>                enriched_log = {&quot;Logtype&quot;: &quot;AzureDevops&quot;}<br>                <br>                for key, value in log.items():<br>                    enriched_log[f&quot;AzureDevops.{key}&quot;] = value<br>                <br>                # Write as single-line JSON<br>                f.write(json.dumps(enriched_log, ensure_ascii=False) + &quot;\n&quot;)<br>                written_count += 1<br>        <br>        print(f&quot;✓ Successfully wrote {written_count} log entries to file&quot;)<br>        return True<br>        <br>    except PermissionError:<br>        print(f&quot;✗ Permission denied writing to {LOG_FILE}&quot;)<br>        print(f&quot;  Ensure the script has write permissions to this location&quot;)<br>        return False<br>    except Exception as e:<br>        print(f&quot;✗ Error writing logs to file: {str(e)}&quot;)<br>        return False<br><br>def main():<br>    &quot;&quot;&quot;Main execution function&quot;&quot;&quot;<br>    print(&quot;=&quot; * 70)<br>    print(&quot;Azure DevOps Audit Log Collector for Wazuh&quot;)<br>    print(f&quot;Started at: {datetime.now().strftime(&#39;%Y-%m-%d %H:%M:%S&#39;)}&quot;)<br>    print(&quot;=&quot; * 70)<br>    <br>    # Validate configuration<br>    validate_config()<br>    <br>    # Get access token<br>    access_token = get_access_token()<br>    if not access_token:<br>        print(&quot;\n&quot; + &quot;=&quot; * 70)<br>        print(&quot;FAILED: Could not obtain access token&quot;)<br>        print(&quot;=&quot; * 70)<br>        sys.exit(1)<br>    <br>    # Fetch audit logs<br>    logs = fetch_audit_logs(access_token)<br>    if logs is None:<br>        print(&quot;\n&quot; + &quot;=&quot; * 70)<br>        print(&quot;FAILED: Could not fetch audit logs&quot;)<br>        print(&quot;=&quot; * 70)<br>        sys.exit(1)<br>    <br>    # Write logs to file<br>    success = write_logs_to_file(logs)<br>    <br>    print(&quot;\n&quot; + &quot;=&quot; * 70)<br>    if success:<br>        print(&quot;SUCCESS: Audit log collection completed&quot;)<br>    else:<br>        print(&quot;FAILED: Error writing logs to file&quot;)<br>    print(f&quot;Finished at: {datetime.now().strftime(&#39;%Y-%m-%d %H:%M:%S&#39;)}&quot;)<br>    print(&quot;=&quot; * 70)<br>    <br>    sys.exit(0 if success else 1)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p>Make the script executable:</p><pre>sudo chmod +x /var/ossec/integrations/azure_devops_audit.py<br>sudo chown root:wazuh /var/ossec/integrations/azure_devops_audit.py</pre><h3>Step 2.3 — Create Environment Configuration File</h3><p>Store your credentials securely:</p><pre>sudo nano /var/ossec/integrations/azure_devops.env</pre><p>Add your Azure credentials (replace with your actual values):</p><pre>export AZDO_ORG=YourOrganizationName<br>export AZDO_CLIENT_ID=your-application-client-id<br>export AZDO_TENANT_ID=your-tenant-id<br>export AZDO_CLIENT_SECRET=your-client-secret</pre><p>Secure the file:</p><pre>sudo chmod 600 /var/ossec/integrations/azure_devops.env<br>sudo chown root:root /var/ossec/integrations/azure_devops.env</pre><h3>Step 2.4 — Test the Script Manually</h3><p>Before automating, verify the script works:</p><pre>sudo bash -c &#39;source /var/ossec/integrations/azure_devops.env &amp;&amp; python3 /var/ossec/integrations/azure_devops_audit.py&#39;</pre><p>Expected output:</p><pre>======================================================================<br>Azure DevOps Audit Log Collector for Wazuh<br>Started at: 2026-03-12 10:00:00<br>======================================================================<br>✓ Configuration validated<br>  Organization: YourOrg<br>  Client ID: 04fa34ec...e005<br>  Tenant ID: bb710607...901a<br><br>[1/3] Requesting access token from Microsoft Entra ID...<br>✓ Access token obtained successfully<br><br>[2/3] Fetching audit logs from Azure DevOps...<br>  Time range: 2026-03-12T09:55:00Z to 2026-03-12T10:00:00Z<br>✓ Successfully retrieved 5 audit log entries<br><br>[3/3] Writing logs to /var/log/AzureDevops/AzureDevops_Audit_logs.json...<br>✓ Successfully wrote 5 log entries to file<br><br>======================================================================<br>SUCCESS: Audit log collection completed<br>Finished at: 2026-03-12 10:00:05<br>======================================================================</pre><p>If you see errors, troubleshoot based on the specific error message.</p><h3>Step 2.5 — Schedule Automated Collection</h3><p>Set up a cron job to run the script every 5 minutes:</p><pre>sudo crontab -e -u root</pre><p>Select your preferred editor (nano recommended), then add:</p><pre>*/5 * * * * source /var/ossec/integrations/azure_devops.env &amp;&amp; /usr/bin/python3 /var/ossec/integrations/azure_devops_audit.py &gt;&gt; /var/log/AzureDevops/script.log 2&gt;&amp;1</pre><p>Save and exit.</p><p>Verify the cron job:</p><pre>sudo crontab -l -u root</pre><h3>Part 3: Wazuh Log Monitoring Configuration</h3><h3>Step 3.1 — Configure Wazuh to Monitor the Log File</h3><p>Edit the Wazuh configuration:</p><pre>sudo nano /var/ossec/etc/ossec.conf</pre><p>Add the following before the closing &lt;/ossec_config&gt; tag:</p><pre>&lt;!-- Azure DevOps Audit Logs --&gt;<br>  &lt;localfile&gt;<br>    &lt;log_format&gt;json&lt;/log_format&gt;<br>    &lt;location&gt;/var/log/AzureDevops/AzureDevops_Audit_logs.json&lt;/location&gt;<br>  &lt;/localfile&gt;</pre><p>Save and exit.</p><h3>Step 3.2 — Create Custom Detection Rules</h3><p>Edit the local rules file:</p><pre>sudo nano /var/ossec/etc/rules/local_rules.xml</pre><p>Add the following rule group (add it after any existing groups):</p><pre>&lt;group name=&quot;azure_devops,&quot;&gt;<br><br>  &lt;!-- Base rule: Any Azure DevOps audit log --&gt;<br>  &lt;rule id=&quot;100701&quot; level=&quot;3&quot;&gt;<br>    &lt;decoded_as&gt;json&lt;/decoded_as&gt;<br>    &lt;field name=&quot;Logtype&quot;&gt;AzureDevops&lt;/field&gt;<br>    &lt;description&gt;Azure DevOps: Audit log event&lt;/description&gt;<br>    &lt;group&gt;azure_devops,&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Security permission changes --&gt;<br>  &lt;rule id=&quot;100702&quot; level=&quot;10&quot;&gt;<br>    &lt;if_sid&gt;100701&lt;/if_sid&gt;<br>    &lt;field name=&quot;AzureDevops.ActionId&quot;&gt;^Security\.&lt;/field&gt;<br>    &lt;description&gt;Azure DevOps: Security permission modified by $(AzureDevops.ActorDisplayName)&lt;/description&gt;<br>    &lt;group&gt;azure_devops,pci_dss_10.2.5,gdpr_IV_35.7.d,hipaa_164.312.b,nist_800_53_AU.14,tsc_CC6.8,&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Destructive Git operations --&gt;<br>  &lt;rule id=&quot;100703&quot; level=&quot;9&quot;&gt;<br>    &lt;if_sid&gt;100701&lt;/if_sid&gt;<br>    &lt;field name=&quot;AzureDevops.ActionId&quot;&gt;Git\.RefDeleteEvent|Git\.ForcePush&lt;/field&gt;<br>    &lt;description&gt;Azure DevOps: Destructive Git action by $(AzureDevops.ActorDisplayName) - $(AzureDevops.ActionId)&lt;/description&gt;<br>    &lt;group&gt;azure_devops,code_integrity,&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Pipeline modifications --&gt;<br>  &lt;rule id=&quot;100704&quot; level=&quot;8&quot;&gt;<br>    &lt;if_sid&gt;100701&lt;/if_sid&gt;<br>    &lt;field name=&quot;AzureDevops.ActionId&quot;&gt;^Release\.|Build\.Pipeline&lt;/field&gt;<br>    &lt;description&gt;Azure DevOps: Pipeline modified by $(AzureDevops.ActorDisplayName) - $(AzureDevops.ActionId)&lt;/description&gt;<br>    &lt;group&gt;azure_devops,devsecops,&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- User/group membership changes --&gt;<br>  &lt;rule id=&quot;100705&quot; level=&quot;7&quot;&gt;<br>    &lt;if_sid&gt;100701&lt;/if_sid&gt;<br>    &lt;field name=&quot;AzureDevops.ActionId&quot;&gt;Group\.UpdateGroupMembership|Licensing\.Assign|Security\.ModifyPermission&lt;/field&gt;<br>    &lt;description&gt;Azure DevOps: User access change by $(AzureDevops.ActorDisplayName) - $(AzureDevops.ActionId)&lt;/description&gt;<br>    &lt;group&gt;azure_devops,access_control,&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Project settings changes --&gt;<br>  &lt;rule id=&quot;100706&quot; level=&quot;6&quot;&gt;<br>    &lt;if_sid&gt;100701&lt;/if_sid&gt;<br>    &lt;field name=&quot;AzureDevops.ActionId&quot;&gt;^Project\.&lt;/field&gt;<br>    &lt;description&gt;Azure DevOps: Project settings changed by $(AzureDevops.ActorDisplayName)&lt;/description&gt;<br>    &lt;group&gt;azure_devops,configuration_change,&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Service connection changes (high risk) --&gt;<br>  &lt;rule id=&quot;100707&quot; level=&quot;11&quot;&gt;<br>    &lt;if_sid&gt;100701&lt;/if_sid&gt;<br>    &lt;field name=&quot;AzureDevops.ActionId&quot;&gt;ServiceConnection\.&lt;/field&gt;<br>    &lt;description&gt;Azure DevOps: Service connection modified by $(AzureDevops.ActorDisplayName) - HIGH RISK&lt;/description&gt;<br>    &lt;group&gt;azure_devops,credential_access,&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>  &lt;!-- Repository deletion --&gt;<br>  &lt;rule id=&quot;100708&quot; level=&quot;12&quot;&gt;<br>    &lt;if_sid&gt;100701&lt;/if_sid&gt;<br>    &lt;field name=&quot;AzureDevops.ActionId&quot;&gt;Git\.RepositoryDestroyed&lt;/field&gt;<br>    &lt;description&gt;Azure DevOps: Repository DELETED by $(AzureDevops.ActorDisplayName) - CRITICAL&lt;/description&gt;<br>    &lt;group&gt;azure_devops,data_loss,&lt;/group&gt;<br>  &lt;/rule&gt;<br><br>&lt;/group&gt;</pre><p>Save and exit.</p><h3>Step 3.3 — Restart Wazuh Manager</h3><p>Apply the configuration changes:</p><pre>sudo systemctl restart wazuh-manager</pre><p>Verify Wazuh is running:</p><pre>sudo systemctl status wazuh-manager</pre><p>Check that Wazuh is monitoring the file:</p><pre>sudo grep -i &quot;AzureDevops&quot; /var/ossec/logs/ossec.log</pre><p>You should see:</p><pre>wazuh-logcollector: INFO: Analyzing file: &#39;/var/log/AzureDevops/AzureDevops_Audit_logs.json&#39;</pre><h3>Part 4: Testing and Verification</h3><h3>Step 4.1 — Test Rule Matching</h3><p>Use Wazuh’s log test utility:</p><pre>sudo /var/ossec/bin/wazuh-logtest</pre><p>Paste a sample Azure DevOps log entry:</p><pre>{&quot;Logtype&quot;: &quot;AzureDevops&quot;, &quot;AzureDevops.Id&quot;: &quot;test-123&quot;, &quot;AzureDevops.ActionId&quot;: &quot;Git.CreateRef&quot;, &quot;AzureDevops.ActorDisplayName&quot;: &quot;Test User&quot;, &quot;AzureDevops.Timestamp&quot;: &quot;2026-03-12T10:00:00Z&quot;, &quot;AzureDevops.ScopeDisplayName&quot;: &quot;YourOrg&quot;, &quot;AzureDevops.IpAddress&quot;: &quot;192.168.1.1&quot;, &quot;AzureDevops.Details&quot;: &quot;Created a new branch&quot;, &quot;AzureDevops.Area&quot;: &quot;Git&quot;, &quot;AzureDevops.Category&quot;: &quot;Modify&quot;}</pre><p>Press Enter. You should see:</p><pre>**Phase 3: Completed filtering (rules).<br>        id: &#39;100701&#39;<br>        level: &#39;3&#39;<br>        description: &#39;Azure DevOps: Audit log event&#39;</pre><p>Press Ctrl+C to exit.</p><h3>Step 4.2 — Generate Test Activity</h3><p>Perform actions in Azure DevOps to generate audit logs:</p><ol><li><strong>Create a new branch</strong> in any repository</li><li><strong>Make a commit</strong> to trigger Git events</li><li><strong>Edit a pipeline</strong> to trigger pipeline modification events</li><li><strong>Invite or remove a user</strong> to trigger access control events</li><li><strong>Modify project settings</strong> to trigger configuration change events</li></ol><h3>Step 4.3 — Wait for Collection or Run Manually</h3><p>Either wait 5 minutes for the cron job, or run the script manually:</p><pre>sudo bash -c &#39;source /var/ossec/integrations/azure_devops.env &amp;&amp; python3 /var/ossec/integrations/azure_devops_audit.py&#39;</pre><h3>Step 4.4 — Verify Log Collection</h3><p>Check that new logs were collected:</p><pre># Count total log entries<br>wc -l /var/log/AzureDevops/AzureDevops_Audit_logs.json<br><br># View the latest 5 entries<br>tail -5 /var/log/AzureDevops/AzureDevops_Audit_logs.json<br><br># Check cron execution log<br>tail -20 /var/log/AzureDevops/script.log</pre><h3>Step 4.5 — Verify Alert Generation</h3><p>Check that Wazuh generated alerts:</p><pre># Search for Azure DevOps alerts<br>sudo grep &quot;100701&quot; /var/ossec/logs/alerts/alerts.json<br><br># View recent alerts<br>sudo tail -20 /var/ossec/logs/alerts/alerts.json | grep -i &quot;AzureDevops&quot;</pre><p>You should see JSON alert entries containing your Azure DevOps events.</p><h3>Part 5: Dashboard Visualization</h3><h3>Step 5.1 — Access Wazuh Dashboard</h3><ol><li>Open your web browser</li><li>Navigate to your Wazuh dashboard URL (typically <a href="https://your-wazuh-server)/">https://your-wazuh-server)</a></li><li>Log in with your credentials</li></ol><h3>Step 5.2 — View Azure DevOps Events</h3><ol><li>Go to <strong>Modules → Security events</strong> or <strong>Threat Hunting</strong></li><li>Set the time range to <strong>“Last 24 hours”</strong> (top-right corner)</li><li>Add a filter:</li></ol><ul><li>Click <strong>“Add filter”</strong></li><li>Field: rule.groups</li><li>Operator: is</li><li>Value: azure_devops</li><li>Click <strong>Save</strong></li></ul><p>4. You should now see all Azure DevOps security events!</p><h3>Step 5.3 — Explore Event Details</h3><p>Click on any event to see:</p><ul><li><strong>Actor Information</strong>: Who performed the action</li><li><strong>Action Details</strong>: What was done (ActionId, Details)</li><li><strong>Timestamp</strong>: When it occurred</li><li><strong>IP Address</strong>: Source of the action</li><li><strong>Scope</strong>: Organization/Project context</li><li><strong>Full JSON</strong>: Complete audit log entry</li></ul><h3>Step 5.4 — Create Custom Visualizations (Optional)</h3><ol><li>Go to <strong>Dashboards</strong></li><li>Click <strong>Create new dashboard</strong></li><li>Add visualizations:</li></ol><ul><li><strong>Pie chart</strong>: Top actors by event count</li><li><strong>Bar chart</strong>: Actions over time</li><li><strong>Data table</strong>: Recent high-severity events</li><li><strong>Metric</strong>: Total events today</li></ul><p>4. Save your dashboard as “Azure DevOps Security Monitoring”</p><h3>Troubleshooting Common Issues</h3><h3>Issue 1: “401 Unauthorized” When Testing Script</h3><p><strong>Symptoms:</strong></p><pre>✗ Failed to obtain access token<br>  Status Code: 401</pre><p><strong>Solutions:</strong></p><ul><li>Verify AZDO_CLIENT_ID, AZDO_TENANT_ID, and AZDO_CLIENT_SECRET are correct</li><li>Ensure the client secret hasn’t expired</li><li>Check that admin consent was granted for API permissions</li><li>Generate a new client secret and update the .env file</li></ul><h3>Issue 2: “403 Forbidden” When Fetching Logs</h3><p><strong>Symptoms:</strong></p><pre>✗ Access forbidden (403 Forbidden)<br>  The service principal needs to be added to Azure DevOps organization</pre><p><strong>Solutions:</strong></p><ul><li>Verify the service principal was added to Azure DevOps (Step 1.4)</li><li>Ensure it’s in the <strong>Project Collection Administrators</strong> group</li><li>Confirm auditing is enabled in Azure DevOps organization settings</li><li>Wait a few minutes for permissions to propagate</li></ul><h3>Issue 3: No Logs Being Collected</h3><p><strong>Symptoms:</strong></p><ul><li>Script runs successfully but retrieves 0 logs</li><li>Log file has only 1 entry or is empty</li></ul><p><strong>Solutions:</strong></p><ul><li>Perform actions in Azure DevOps (create branches, modify pipelines, etc.)</li><li>Check if auditing is enabled: <a href="https://dev.azure.com/YourOrg/_settings/audit">https://dev.azure.com/YourOrg/_settings/audit</a></li><li>Verify the time range in the script (default: last 5 minutes)</li><li>Some Azure DevOps plans don’t support auditing</li></ul><h3>Issue 4: No Alerts Appearing in Dashboard</h3><p><strong>Symptoms:</strong></p><ul><li>Logs are collected but no alerts in Wazuh dashboard</li></ul><p><strong>Solutions:</strong></p><ul><li>Check Wazuh is monitoring the file: sudo grep &quot;Analyzing file.*AzureDevops&quot; /var/ossec/logs/ossec.log</li><li>Verify alerts are being generated: sudo grep &quot;100701&quot; /var/ossec/logs/alerts/alerts.json</li><li>Ensure time range in dashboard is set correctly (Last 24 hours)</li><li>Check Wazuh indexer status: sudo systemctl status wazuh-indexer</li><li>Restart Wazuh manager: sudo systemctl restart wazuh-manager</li><li>Remember: Wazuh only alerts on NEW log entries added AFTER it starts monitoring</li></ul><h3>Issue 5: Cron Job Not Running</h3><p><strong>Symptoms:</strong></p><ul><li>Script works manually but not via cron</li><li>No new entries in /var/log/AzureDevops/script.log</li></ul><p><strong>Solutions:</strong></p><ul><li>Verify cron job is configured: sudo crontab -l -u root</li><li>Check cron service is running: sudo systemctl status cron</li><li>Ensure full paths are used in cron command</li><li>Check cron execution permissions</li><li>Verify the .env file path in cron command is correct</li></ul><h3>Security Best Practices</h3><h3>1. Credential Management</h3><ul><li><strong>Rotate secrets regularly</strong> (every 3–6 months)</li><li><strong>Use Azure Key Vault</strong> for production environments instead of environment files</li><li><strong>Set appropriate file permissions</strong> (600 for .env file)</li><li><strong>Never commit credentials</strong> to version control</li><li><strong>Use separate service principals</strong> for dev/staging/production</li></ul><h3>2. Least Privilege Access</h3><ul><li><strong>Grant minimum necessary permissions</strong> to the service principal</li><li><strong>Consider read-only access</strong> if write operations aren’t needed</li><li><strong>Use dedicated service principals</strong> for each integration</li><li><strong>Regularly audit</strong> service principal permissions</li></ul><h3>3. Monitoring &amp; Alerting</h3><ul><li><strong>Set up email notifications</strong> for critical alerts (level 11+)</li><li><strong>Monitor script execution</strong> via /var/log/AzureDevops/script.log</li><li><strong>Track failed authentication attempts</strong> in Wazuh</li><li><strong>Create dashboards</strong> for executive reporting</li><li><strong>Archive logs</strong> for compliance requirements</li></ul><h3>4. Network Security</h3><ul><li><strong>Restrict outbound connections</strong> to required endpoints only:</li><li>login.microsoftonline.com (authentication)</li><li>auditservice.dev.azure.com (audit logs)</li><li><strong>Use firewall rules</strong> to limit access to Wazuh server</li><li><strong>Enable TLS/SSL</strong> for all API communications</li><li><strong>Consider using a proxy</strong> for outbound connections</li></ul><h3>Advanced Customizations</h3><h3>Custom Collection Interval</h3><p>To change from 5 minutes to another interval, edit the cron job:</p><pre># Every 10 minutes<br>*/10 * * * * source /var/ossec/integrations/azure_devops.env &amp;&amp; ...<br><br># Every hour<br>0 * * * * source /var/ossec/integrations/azure_devops.env &amp;&amp; ...<br><br># Every 15 minutes<br>*/15 * * * * source /var/ossec/integrations/azure_devops.env &amp;&amp; ...</pre><p><strong>Note:</strong> Azure DevOps audit logs may have a delay of up to 15 minutes, so polling too frequently may not yield new logs.</p><h3>Additional Detection Rules</h3><p>Add more specific rules for your organization’s needs:</p><pre>&lt;!-- Detect after-hours activity --&gt;<br>&lt;rule id=&quot;100709&quot; level=&quot;8&quot;&gt;<br>  &lt;if_sid&gt;100701&lt;/if_sid&gt;<br>  &lt;time&gt;8 pm - 6 am&lt;/time&gt;<br>  &lt;description&gt;Azure DevOps: After-hours activity detected by $(AzureDevops.ActorDisplayName)&lt;/description&gt;<br>  &lt;group&gt;azure_devops,after_hours,&lt;/group&gt;<br>&lt;/rule&gt;<br><br>&lt;!-- Detect external IP access --&gt;<br>&lt;rule id=&quot;100710&quot; level=&quot;9&quot;&gt;<br>  &lt;if_sid&gt;100701&lt;/if_sid&gt;<br>  &lt;field name=&quot;AzureDevops.IpAddress&quot; negate=&quot;yes&quot;&gt;^(10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.)&lt;/field&gt;<br>  &lt;description&gt;Azure DevOps: External IP access by $(AzureDevops.ActorDisplayName) from $(AzureDevops.IpAddress)&lt;/description&gt;<br>  &lt;group&gt;azure_devops,external_access,&lt;/group&gt;<br>&lt;/rule&gt;</pre><h3>Integration with SOAR Platforms</h3><p>Forward alerts to SOAR platforms like Shuffle, TheHive, or Cortex:</p><ol><li>Configure active response in Wazuh</li><li>Create integration scripts for your SOAR platform</li><li>Map Azure DevOps alert severity to SOAR ticket priority</li><li>Enable automated playbooks for common scenarios</li></ol><h3>Compliance Mapping</h3><p>This integration helps meet various compliance requirements:</p><h3>PCI-DSS v4.0</h3><ul><li><strong>Requirement 10.2.5</strong>: Audit all access to audit trails</li><li><strong>Requirement 10.3</strong>: Audit trail entries for system components</li></ul><h3>GDPR</h3><ul><li><strong>Article 32</strong>: Security of processing</li><li><strong>Article 35.7(d)</strong>: Measures to address risks including audit capabilities</li></ul><h3>HIPAA</h3><ul><li><strong>§164.312(b)</strong>: Audit controls</li><li><strong>§164.308(a)(1)(ii)(D)</strong>: Information system activity review</li></ul><h3>ISO 27001</h3><ul><li><strong>A.12.4.1</strong>: Event logging</li><li><strong>A.12.4.2</strong>: Protection of log information</li><li><strong>A.12.4.3</strong>: Administrator and operator logs</li></ul><h3>NIST 800–53</h3><ul><li><strong>AU-2</strong>: Audit Events</li><li><strong>AU-6</strong>: Audit Review, Analysis, and Reporting</li><li><strong>AU-14</strong>: Session Audit</li></ul><h3>Maintenance &amp; Operations</h3><h3>Daily Tasks</h3><ul><li>✅ Review high-severity alerts (level 10+)</li><li>✅ Check script execution logs for errors</li><li>✅ Verify cron job is running</li></ul><h3>Weekly Tasks</h3><ul><li>✅ Review alert trends and anomalies</li><li>✅ Update detection rules based on new threats</li><li>✅ Validate log collection is continuous</li></ul><h3>Monthly Tasks</h3><ul><li>✅ Rotate client secrets (if approaching expiration)</li><li>✅ Review service principal permissions</li><li>✅ Archive old logs per retention policy</li><li>✅ Update documentation with new use cases</li></ul><h3>Quarterly Tasks</h3><ul><li>✅ Audit all Azure DevOps integrations</li><li>✅ Review and optimize detection rules</li><li>✅ Conduct tabletop exercises using historical alerts</li><li>✅ Update Python dependencies</li></ul><h3>Conclusion</h3><p>You now have a fully functional Azure DevOps security monitoring solution integrated with Wazuh. This integration provides:</p><p>✅ <strong>Real-time visibility</strong> into all Azure DevOps activities ✅ <strong>Automated threat detection</strong> for suspicious behaviors ✅ <strong>Compliance-ready audit trails</strong> for regulatory requirements ✅ <strong>Centralized security monitoring</strong> across your DevSecOps pipeline ✅ <strong>Customizable alerting</strong> tailored to your organization’s risk profile</p><h3>Next Steps</h3><ol><li><strong>Expand coverage</strong>: Integrate other Azure services (Entra ID, Azure Monitor, etc.)</li><li><strong>Enhance rules</strong>: Add custom detection rules for your specific use cases</li><li><strong>Automate responses</strong>: Implement active response for critical alerts</li><li><strong>Train your team</strong>: Ensure SOC analysts understand Azure DevOps security events</li><li><strong>Regular reviews</strong>: Schedule periodic reviews of alerts and tune rules accordingly</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d909aa7cda82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating Microsoft Entra ID with Wazuh SIEM via Microsoft Graph API: A Complete Guide]]></title>
            <link>https://medium.com/@aabiodunadeleke/integrating-microsoft-entra-id-with-wazuh-siem-via-microsoft-graph-api-a-complete-guide-0cabed44751f?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cabed44751f</guid>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Sat, 18 Apr 2026 16:56:57 GMT</pubDate>
            <atom:updated>2026-10-17T12:39:05.119Z</atom:updated>
            <content:encoded><![CDATA[<p>Identity has become one of the most targeted attack surfaces in modern environments. From credential theft and privilege escalation to suspicious sign-ins and unauthorized administrative changes, many attacks begin at the identity layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w3LNyHG8MwC3yZ7q" /></figure><p>For organizations using Microsoft 365, Microsoft Entra ID (formerly Azure Active Directory) stores critical authentication and directory activity logs that can provide early warning signs of compromise.</p><p>By integrating Microsoft Entra ID with Wazuh SIEM through the Microsoft Graph API, security teams can centralize identity telemetry, improve threat detection, monitor administrative activity, and strengthen incident response capabilities.</p><p>In this guide, I’ll walk through the complete step-by-step process of integrating Microsoft Entra ID logs into Wazuh SIEM, including:</p><ul><li>Creating the Entra ID application registration</li><li>Assigning Microsoft Graph API permissions</li><li>Configuring Wazuh log collection</li><li>Troubleshooting common issues</li><li>Creating custom detection rules</li><li>Validating log ingestion and monitoring events</li></ul><p>Whether you’re building a home lab, improving enterprise visibility, or strengthening your SOC operations, this integration adds significant value to your SIEM environment.</p><h4>Prerequisites</h4><p>Before starting, ensure you have:</p><ul><li><strong>Azure AD Access:</strong> Global Administrator or Application Administrator role</li><li><strong>Wazuh Environment:</strong> Wazuh Manager 4.x installed and running</li><li><strong>Network Connectivity:</strong> Outbound HTTPS (443) access to graph.microsoft.com</li><li><strong>Basic Knowledge:</strong> Linux command line, JSON, and REST APIs</li></ul><h3>Part 1: Azure AD Configuration</h3><h3>Step 1: Create an App Registration</h3><p>First, we need to create an application registration in Azure AD that Wazuh will use to authenticate and access the Microsoft Graph API.</p><ol><li><strong>Navigate to Azure Portal</strong></li></ol><ul><li>Go to <a href="https://portal.azure.com/">https://portal.azure.com</a></li><li>Sign in with your Global Administrator account</li></ul><p><strong>2. Create App Registration</strong></p><ul><li>Navigate to <strong>Azure Active Directory</strong> → <strong>App registrations</strong></li><li>Click <strong>+ New registration</strong></li></ul><p><strong>Configuration:</strong></p><ul><li><strong>Name:</strong> Wazuh (or Wazuh-SIEM-Integration)</li><li><strong>Supported account types:</strong> Accounts in this organizational directory only</li><li><strong>Redirect URI:</strong> Leave blank (not needed for daemon apps)</li><li>Click <strong>Register</strong></li></ul><p><strong>3. Note Important Information</strong> After creation, copy these values (you’ll need them later):</p><pre>Application (client) ID: ***<br>   Directory (tenant) ID: ***</pre><h3>Step 2: Create Client Secret</h3><ol><li><strong>Generate Secret</strong></li></ol><ul><li>In your app registration, go to <strong>Certificates &amp; secrets</strong></li><li>Click <strong>+ New client secret</strong></li><li><strong>Description:</strong> Wazuh SIEM Integration</li><li><strong>Expires:</strong> Choose appropriate duration (I recommend 24 months)</li><li>Click <strong>Add</strong></li></ul><p><strong>2. Copy the Secret Value IMMEDIATELY</strong></p><pre>Client Secret: ***</pre><p>⚠️ <strong>IMPORTANT:</strong> You can only see this value once! Store it securely.</p><h3>Step 3: Configure API Permissions</h3><p>This is crucial — we need to grant the application permissions to read audit logs from Microsoft Graph API.</p><ol><li><strong>Add Permissions</strong></li></ol><ul><li>Go to <strong>API permissions</strong></li><li>Click <strong>+ Add a permission</strong></li><li>Select <strong>Microsoft Graph</strong></li><li>Choose <strong>Application permissions</strong> (not Delegated)</li></ul><p><strong>2. Select Required Permissions</strong> Add these permissions one by one:</p><ul><li>AuditLog.Read.All - Read audit log data</li><li>Directory.Read.All - Read directory data</li><li>IdentityRiskyUser.Read.All - Read risky user information</li><li>IdentityRiskEvent.Read.All - Read identity risk events</li><li>User.Read.All - Read all users&#39; full profiles</li></ul><p><strong>Optional but recommended:</strong></p><ul><li>SecurityEvents.Read.All - Read security events</li><li>Reports.Read.All - Read all reports</li></ul><p><strong>3. Grant Admin Consent</strong> ⚠️ <strong>Critical Step:</strong> Click <strong>Grant admin consent for [Your Organization]</strong> Without this, the permissions won’t be active and API calls will fail with 403 errors.</p><p><strong>Step 4: Verify Your Tenant Domain</strong></p><p>You need to know your exact tenant domain name for Wazuh configuration.</p><p><strong>Method 1: From Azure Portal</strong></p><ul><li>Go to <strong>Azure Active Directory</strong> → <strong>Overview</strong></li><li>Look for <strong>Primary domain</strong></li></ul><p><strong>Method 2: Using API</strong></p><pre># First, get an access token (we&#39;ll test this in a moment)<br># Then query:<br>curl -H &quot;Authorization: Bearer YOUR_TOKEN&quot; \<br>  &quot;https://graph.microsoft.com/v1.0/domains&quot; | jq -r &#39;.value[] | select(.isInitial == true) | .id&#39;</pre><p>Result: <strong>yourdomain</strong></p><p><strong>Step 5: Test API Access</strong></p><p>Let’s verify everything works before configuring Wazuh.</p><ol><li><strong>Get an Access Token</strong> Create a test script to get a token:</li></ol><pre>curl -X POST &quot;https://login.microsoftonline.com/tenet_ID/oauth2/v2.0/token&quot; \<br>     -H &quot;Content-Type: application/x-www-form-urlencoded&quot; \<br>     -d &quot;client_id=&quot; \<br>     -d &quot;scope=https://graph.microsoft.com/.default&quot; \<br>     -d &quot;client_secret=&quot; \<br>     -d &quot;grant_type=client_credentials&quot; | jq -r &#39;.access_token&#39;</pre><p>2. Test Directory Audits Endpoint</p><pre>curl -H &quot;Authorization: Bearer YOUR_TOKEN&quot; \<br>     &quot;https://graph.microsoft.com/v1.0/auditLogs/directoryAudits?\$top=5&quot; | jq</pre><p>3. Test Sign-Ins Endpoint</p><pre>curl -H &quot;Authorization: Bearer YOUR_TOKEN&quot; \<br>     &quot;https://graph.microsoft.com/v1.0/auditLogs/signIns?\$top=5&quot; | jq</pre><p>If you get JSON data back, congratulations! Your Azure AD configuration is complete. ✅</p><h3>Part 2: Wazuh Configuration</h3><p>Now let’s configure Wazuh to collect these logs automatically.</p><h3>Step 1: Create the Credentials File</h3><p>SSH into your Wazuh Manager server.</p><ol><li><strong>Create Directory</strong></li></ol><pre>sudo mkdir -p /var/ossec/wodles/azure</pre><p>2. Create Credentials File</p><pre>sudo nano /var/ossec/wodles/azure/graph_credentials</pre><p>3. <strong>Add Credentials in INI Format</strong> ⚠️ <strong>IMPORTANT:</strong> The format must be exactly like this (no JSON, no quotes):</p><pre>application_id = ***<br>   application_key = *****</pre><p>Note: Use application_id and application_key, NOT client_id and client_secret!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*8GlHGqMmiqHxSgQR5gh-BQ.png" /></figure><p><strong>4. Set Proper Permissions</strong></p><pre>sudo chown root:wazuh /var/ossec/wodles/azure/graph_credentials<br>   sudo chmod 640 /var/ossec/wodles/azure/graph_credentials</pre><p><strong>5. Verify the File</strong></p><pre>cat /var/ossec/wodles/azure/graph_credentials</pre><h3>Step 2: Configure ossec.conf</h3><ol><li><strong>Edit Configuration File</strong></li></ol><pre>sudo nano /var/ossec/etc/ossec.conf</pre><p><strong>2. Add Azure Logs Wodle</strong> Add this configuration block (usually after the &lt;office365&gt; section if you have one):</p><pre>&lt;wodle name=&quot;azure-logs&quot;&gt;<br>     &lt;disabled&gt;no&lt;/disabled&gt;<br>     &lt;interval&gt;1h&lt;/interval&gt;<br>     &lt;run_on_start&gt;yes&lt;/run_on_start&gt;<br><br>     &lt;graph&gt;<br>       &lt;auth_path&gt;/var/ossec/wodles/azure/graph_credentials&lt;/auth_path&gt;<br>       &lt;tenantdomain&gt;*****.onmicrosoft.com&lt;/tenantdomain&gt;<br>       <br>       &lt;!-- Directory Audit Logs --&gt;<br>       &lt;request&gt;<br>         &lt;tag&gt;azure-ad-directory&lt;/tag&gt;<br>         &lt;query&gt;auditLogs/directoryAudits&lt;/query&gt;<br>         &lt;time_offset&gt;30d&lt;/time_offset&gt;<br>       &lt;/request&gt;<br>       <br>       &lt;!-- Sign-In Logs --&gt;<br>       &lt;request&gt;<br>         &lt;tag&gt;azure-ad-signin&lt;/tag&gt;<br>         &lt;query&gt;auditLogs/signIns&lt;/query&gt;<br>         &lt;time_offset&gt;1d&lt;/time_offset&gt;<br>       &lt;/request&gt;<br>       <br>       &lt;!-- Risk Detections (Optional) --&gt;<br>       &lt;request&gt;<br>         &lt;tag&gt;azure-ad-risk-detections&lt;/tag&gt;<br>         &lt;query&gt;identityProtection/riskDetections&lt;/query&gt;<br>         &lt;time_offset&gt;7d&lt;/time_offset&gt;<br>       &lt;/request&gt;<br>       <br>       &lt;!-- Risky Users (Optional) --&gt;<br>       &lt;request&gt;<br>         &lt;tag&gt;azure-ad-risky-users&lt;/tag&gt;<br>         &lt;query&gt;identityProtection/riskyUsers&lt;/query&gt;<br>         &lt;time_offset&gt;30d&lt;/time_offset&gt;<br>       &lt;/request&gt;<br>     &lt;/graph&gt;<br>   &lt;/wodle&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*y53XVD4Dfpp8Ibwq191d5w.png" /></figure><p><strong>Configuration Breakdown:</strong></p><ul><li>interval: How often to check for new logs (1h = every hour)</li><li>run_on_start: Collect logs immediately when Wazuh starts</li><li>auth_path: Path to credentials file (points to DIRECTORY, not the file directly)</li><li>tenantdomain: Your exact Azure AD tenant domain</li><li>tag: Label for identifying log source in Wazuh</li><li>query: Microsoft Graph API endpoint to query</li><li>time_offset: How far back to look for logs</li></ul><p><strong>3. Save and Exit</strong></p><ul><li>Press Ctrl + X</li><li>Press Y to confirm</li><li>Press Enter to save</li></ul><h3>Step 3: Restart Wazuh Manager</h3><pre>sudo systemctl restart wazuh-manager</pre><h3>Step 4: Monitor for Success</h3><pre># Watch the logs in real-time<br>sudo tail -f /var/ossec/logs/ossec.log | grep -iE &quot;azure|graph&quot;</pre><p>What you should see:</p><pre>2026/01/20 13:16:45 wazuh-modulesd:azure-logs: INFO: Module started.<br>2026/01/20 13:16:45 wazuh-modulesd:azure-logs: INFO: Starting fetching of logs.<br>2026/01/20 13:16:45 wazuh-modulesd:azure-logs: INFO: Starting Graphs log collection for the domain &#39;****g.onmicrosoft.com&#39;.<br>2026/01/20 13:16:49 wazuh-modulesd:azure-logs: INFO: Finished Graphs log collection for request &#39;azure-ad-directory&#39;.<br>2026/01/20 13:16:53 wazuh-modulesd:azure-logs: INFO: Finished Graphs log collection for request &#39;azure-ad-signin&#39;.</pre><p>If you see this, you’re golden! ✅</p><h3>Part 3: Troubleshooting Common Issues</h3><p>During my implementation, I encountered several issues. Here’s how I solved them:</p><h4>Issue #1: “The authentication file could not be opened: [Errno 21] Is a directory”</h4><p>Error Message:</p><pre>wazuh-modulesd:azure-logs: ERROR: The authentication file could not be opened: [Errno 21] Is a directory: &#39;/var/ossec/wodles/azure&#39;</pre><p><strong>Cause:</strong> The auth_path was pointing to a directory instead of the credentials file.</p><p><strong>Solution:</strong> Wazuh expects auth_path to point to the directory, and it looks for a file named graph_credentials inside it.</p><pre># Rename credentials file to exactly &#39;graph_credentials&#39;<br>sudo mv /var/ossec/wodles/azure/credentials /var/ossec/wodles/azure/graph_credentials<br><br># Update ossec.conf to point to directory only<br>&lt;auth_path&gt;/var/ossec/wodles/azure&lt;/auth_path&gt;</pre><p><strong>Actually, this didn’t work either!</strong> The final solution was to point directly to the file:</p><pre>&lt;auth_path&gt;/var/ossec/wodles/azure/graph_credentials&lt;/auth_path&gt;</pre><h4><strong>Issue #2: “The authentication file format is not valid”</strong></h4><p>Error Message:</p><pre>wazuh-modulesd:azure-logs: ERROR: The authentication file format is not valid. Make sure that it is composed of only 2 lines with &quot;field = value&quot; format.</pre><p><strong>Cause:</strong> The credentials file was in JSON format or had incorrect field names.</p><p><strong>Wrong Format (JSON):</strong></p><pre>{<br>  &quot;tenant_id&quot;: &quot;****&quot;,<br>  &quot;client_id&quot;: &quot;****&quot;,<br>  &quot;client_secret&quot;: &quot;****&quot;<br>}</pre><p>Wrong Format (INI with section header):</p><pre>[graph]<br>tenant_id = ****<br>client_id = ****<br>secret_value = ****</pre><p>Correct Format:</p><pre>application_id = 04fa34ec-54e3-4f81-9432-44f4bdf0e005<br>application_key = &lt;YOUR_CLIENT_SECRET&gt;</pre><p><strong>Key Points:</strong></p><ul><li>Exactly 2 lines</li><li>No section headers like [graph]</li><li>Use application_id and application_key (not client_id/client_secret)</li><li>No quotes, no JSON formatting</li><li>No tenant_id line (it&#39;s specified in ossec.conf)</li></ul><h4>Issue #3: No Events Showing in Dashboard</h4><p><strong>Symptoms:</strong></p><ul><li>Wazuh logs show “Finished Graphs log collection” successfully</li><li>No errors in logs</li><li>But no events visible in Wazuh Dashboard</li></ul><pre># Check if data is being collected<br>sudo tail -50 /var/ossec/logs/alerts/alerts.json | grep azure<br><br># Check Discover in Wazuh Dashboard<br># Filter: data.azure_tag: azure-ad-graph</pre><p><strong>Cause:</strong> No audit logs existed in the specified time window.</p><p><strong>Solution:</strong></p><ol><li><strong>Check if API has data:</strong></li></ol><pre>curl -H &quot;Authorization: Bearer YOUR_TOKEN&quot; \<br>     &quot;https://graph.microsoft.com/v1.0/auditLogs/directoryAudits?\$top=5&quot; | jq &#39;.value | length&#39;</pre><p>Result: 0 (no logs in last 24 hours)</p><p>2. Expand time window:</p><pre>&lt;time_offset&gt;30d&lt;/time_offset&gt;  &lt;!-- Changed from 1d to 30d --&gt;</pre><p>3. Add sign-in logs (more frequent):</p><pre>&lt;request&gt;<br>     &lt;tag&gt;azure-ad-signin&lt;/tag&gt;<br>     &lt;query&gt;auditLogs/signIns&lt;/query&gt;<br>     &lt;time_offset&gt;7d&lt;/time_offset&gt;<br>   &lt;/request&gt;</pre><p>4. Restart and verify:</p><pre>sudo systemctl restart wazuh-manager<br>   sudo tail -f /var/ossec/logs/ossec.log | grep azure</pre><p>After this, I started seeing events! 🎉</p><h3>Issue #4: Events in Discover but Not in Events View</h3><p><strong>Symptoms:</strong></p><ul><li>Data visible in <strong>Discover</strong> with filter data.azure_tag: azure-ad-graph</li><li>Events tab shows nothing for Microsoft Graph API</li><li>2,598 hits in Discover</li></ul><p><strong>Cause:</strong> Wazuh needs decoders and rules to process and categorize the logs.</p><p><strong>Solution:</strong> Create custom decoders and rules (covered in Part 4).</p><h3>Part 4: Creating Custom Rules and Decoders</h3><p>Raw logs are collected, but we need to decode them and create detection rules for meaningful alerts.</p><h3>Step 1: Create Azure Decoders</h3><p>Decoders parse the JSON logs from Microsoft Graph API.</p><ol><li><strong>Create Decoder File</strong></li></ol><pre>sudo nano /var/ossec/etc/decoders/azure_decoders.xml</pre><p>2. Add Decoder Configuration</p><pre>&lt;!--<br>     - Azure AD Graph API decoders<br>     - Created for Microsoft Graph API integration<br>   --&gt;<br><br>   &lt;decoder name=&quot;azure-ad-graph&quot;&gt;<br>     &lt;prematch&gt;azure_tag&lt;/prematch&gt;<br>   &lt;/decoder&gt;<br><br>   &lt;decoder name=&quot;azure-ad-graph-signin&quot;&gt;<br>     &lt;parent&gt;azure-ad-graph&lt;/parent&gt;<br>     &lt;regex&gt;azure-ad-signin&lt;/regex&gt;<br>   &lt;/decoder&gt;<br><br>   &lt;decoder name=&quot;azure-ad-graph-directory&quot;&gt;<br>     &lt;parent&gt;azure-ad-graph&lt;/parent&gt;<br>     &lt;regex&gt;azure-ad-directory&lt;/regex&gt;<br>   &lt;/decoder&gt;</pre><p>3. Save and Exit</p><h3>Step 2: Create Azure Detection Rules</h3><p>Rules trigger alerts based on specific conditions in the logs.</p><ol><li><strong>Create Rules File</strong></li></ol><pre>sudo nano /var/ossec/etc/rules/azure_rules.xml</pre><p>2. Add Rule Configuration</p><pre>&lt;!--<br>     - Azure AD Graph API rules<br>     - Created for Microsoft Graph API integration<br>   --&gt;<br><br>   &lt;group name=&quot;azure,azure_ad,&quot;&gt;<br><br>     &lt;!-- Base rule for Azure Graph logs --&gt;<br>     &lt;rule id=&quot;100100&quot; level=&quot;0&quot;&gt;<br>       &lt;decoded_as&gt;azure-ad-graph&lt;/decoded_as&gt;<br>       &lt;description&gt;Azure AD Graph API events&lt;/description&gt;<br>     &lt;/rule&gt;<br><br>     &lt;!-- Sign-in events --&gt;<br>     &lt;rule id=&quot;100101&quot; level=&quot;3&quot;&gt;<br>       &lt;if_sid&gt;100100&lt;/if_sid&gt;<br>       &lt;field name=&quot;azure_aad_tag&quot;&gt;azure-ad-signin&lt;/field&gt;<br>       &lt;description&gt;Azure AD: Successful user sign-in&lt;/description&gt;<br>       &lt;group&gt;authentication_success,pci_dss_10.2.5,gdpr_IV_32.2,hipaa_164.312.b,nist_800_53_AU.14,nist_800_53_AC.7,&lt;/group&gt;<br>     &lt;/rule&gt;<br><br>     &lt;rule id=&quot;100102&quot; level=&quot;5&quot;&gt;<br>       &lt;if_sid&gt;100101&lt;/if_sid&gt;<br>       &lt;field name=&quot;status.errorCode&quot;&gt;\.+&lt;/field&gt;<br>       &lt;description&gt;Azure AD: Failed user sign-in attempt&lt;/description&gt;<br>       &lt;group&gt;authentication_failed,pci_dss_10.2.4,pci_dss_10.2.5,gdpr_IV_35.7.d,gdpr_IV_32.2,hipaa_164.312.b,nist_800_53_AU.14,nist_800_53_AC.7,&lt;/group&gt;<br>     &lt;/rule&gt;<br><br>     &lt;rule id=&quot;100103&quot; level=&quot;10&quot; frequency=&quot;5&quot; timeframe=&quot;300&quot;&gt;<br>       &lt;if_matched_sid&gt;100102&lt;/if_matched_sid&gt;<br>       &lt;same_source_ip /&gt;<br>       &lt;description&gt;Azure AD: Multiple failed sign-in attempts from same IP&lt;/description&gt;<br>       &lt;group&gt;authentication_failures,pci_dss_10.2.4,pci_dss_10.2.5,pci_dss_11.4,gdpr_IV_35.7.d,&lt;/group&gt;<br>     &lt;/rule&gt;<br><br>     &lt;rule id=&quot;100104&quot; level=&quot;8&quot;&gt;<br>       &lt;if_sid&gt;100101&lt;/if_sid&gt;<br>       &lt;field name=&quot;riskState&quot;&gt;atRisk|confirmedCompromised&lt;/field&gt;<br>       &lt;description&gt;Azure AD: Sign-in from risky user account&lt;/description&gt;<br>       &lt;group&gt;authentication_failed,pci_dss_10.2.4,gdpr_IV_35.7.d,hipaa_164.312.b,&lt;/group&gt;<br>     &lt;/rule&gt;<br><br>     &lt;!-- Directory audit events --&gt;<br>     &lt;rule id=&quot;100110&quot; level=&quot;3&quot;&gt;<br>       &lt;if_sid&gt;100100&lt;/if_sid&gt;<br>       &lt;field name=&quot;azure_aad_tag&quot;&gt;azure-ad-directory&lt;/field&gt;<br>       &lt;description&gt;Azure AD: Directory audit event&lt;/description&gt;<br>       &lt;group&gt;gdpr_IV_30.1.g,&lt;/group&gt;<br>     &lt;/rule&gt;<br><br>     &lt;rule id=&quot;100111&quot; level=&quot;5&quot;&gt;<br>       &lt;if_sid&gt;100110&lt;/if_sid&gt;<br>       &lt;field name=&quot;activityDisplayName&quot;&gt;Add user|Delete user&lt;/field&gt;<br>       &lt;description&gt;Azure AD: User account created or deleted&lt;/description&gt;<br>       &lt;group&gt;gdpr_IV_30.1.g,&lt;/group&gt;<br>     &lt;/rule&gt;<br><br>     &lt;rule id=&quot;100112&quot; level=&quot;8&quot;&gt;<br>       &lt;if_sid&gt;100110&lt;/if_sid&gt;<br>       &lt;field name=&quot;activityDisplayName&quot;&gt;Add member to role|Remove member from role&lt;/field&gt;<br>       &lt;description&gt;Azure AD: User role assignment changed&lt;/description&gt;<br>       &lt;group&gt;gdpr_IV_30.1.g,pci_dss_10.2.5,&lt;/group&gt;<br>     &lt;/rule&gt;<br><br>     &lt;rule id=&quot;100113&quot; level=&quot;10&quot;&gt;<br>       &lt;if_sid&gt;100110&lt;/if_sid&gt;<br>       &lt;field name=&quot;activityDisplayName&quot;&gt;Reset user password|Change user password&lt;/field&gt;<br>       &lt;description&gt;Azure AD: User password changed or reset&lt;/description&gt;<br>       &lt;group&gt;gdpr_IV_30.1.g,pci_dss_10.2.5,&lt;/group&gt;<br>     &lt;/rule&gt;<br><br>   &lt;/group&gt;</pre><p>3. Save and Exit</p><p><strong>Rule Breakdown:</strong></p><ul><li><strong>100100:</strong> Base rule for all Azure AD events (level 0 = no alert, just categorization)</li><li><strong>100101:</strong> Successful sign-ins (level 3 = low priority)</li><li><strong>100102:</strong> Failed sign-in attempts (level 5 = medium priority)</li><li><strong>100103:</strong> Multiple failed attempts from same IP (level 10 = high priority, potential brute force)</li><li><strong>100104:</strong> Sign-in from risky account (level 8 = high priority)</li><li><strong>100110:</strong> Directory changes (level 3 = informational)</li><li><strong>100111:</strong> User creation/deletion (level 5 = medium priority)</li><li><strong>100112:</strong> Role assignment changes (level 8 = high priority, privilege escalation)</li><li><strong>100113:</strong> Password changes (level 10 = high priority, potential compromise)</li></ul><h3>Step 3: Test Configuration</h3><pre># Test decoder/rule syntax<br>sudo /var/ossec/bin/wazuh-logtest</pre><p>Paste a sample log from your alerts:</p><pre>{&quot;id&quot;: &quot;90d86fb5-3dc3-439f-8327-c00&quot;, &quot;createdDateTime&quot;: &quot;2026-01-20T23:17:15Z&quot;, &quot;userDisplayName&quot;: &quot;Samuel Ogala&quot;, &quot;userPrincipalName&quot;: &quot;samuel@gmail.com&quot;, &quot;azure_tag&quot;: &quot;azure-ad-graph&quot;, &quot;azure_aad_tag&quot;: &quot;azure-ad-signin&quot;}</pre><p>Press Ctrl+D to exit.</p><h4>Step 4: Restart Wazuh</h4><pre>sudo systemctl restart wazuh-manager</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*Rv9lXagc4SrphBnhuJXMhQ.png" /></figure><h4>Step 5: Verify Rules Are Loaded</h4><pre># Check if rules loaded<br>sudo grep -i &quot;azure&quot; /var/ossec/logs/ossec.log<br><br># List Azure rules<br>sudo /var/ossec/bin/wazuh-logtest -l | grep azure</pre><h3>Part 5: Validation and Monitoring</h3><h3>Step 1: Verify Data Ingestion</h3><ol><li><strong>Check Wazuh Logs</strong></li></ol><pre>sudo tail -30 /var/ossec/logs/ossec.log | grep -i azure</pre><p>Expected output:</p><pre>2026/01/21 08:27:13 wazuh-modulesd:azure-logs: INFO: Starting fetching of logs.<br>   2026/01/21 08:27:17 wazuh-modulesd:azure-logs: INFO: Finished Graphs log collection for request &#39;azure-ad-directory&#39;.<br>   2026/01/21 08:27:21 wazuh-modulesd:azure-logs: INFO: Finished Graphs log collection for request &#39;azure-ad-signin&#39;.</pre><p>2. Check Alerts File</p><pre>sudo grep -r &quot;azure-ad&quot; /var/ossec/logs/alerts/ 2&gt;/dev/null | head -5</pre><p>3. Check Database</p><pre>sudo ls -lh /var/ossec/wodles/azure/azure.db<br>   sudo stat /var/ossec/wodles/azure/azure.db</pre><h3>Step 2: View Events in Wazuh Dashboard</h3><ol><li><strong>Access Dashboard</strong></li></ol><ul><li>Open Wazuh Dashboard in your browser</li><li>Navigate to <strong>Discover</strong> or <strong>Threat Hunting</strong></li></ul><p><strong>2. Add Filters</strong></p><pre>data.azure_tag: azure-ad-graph</pre><p><strong>3. You Should See:</strong></p><ul><li>Sign-in events with user details, IP addresses, locations</li><li>Directory audit events for user/group/role changes</li><li>Risk detections if available</li><li>Proper rule IDs (100101, 100102, etc.)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*xNcx9ApZgrsEFp4vUhEVnA.png" /></figure><h3>Conclusion</h3><p>Integrating Microsoft Entra ID with Wazuh SIEM using Microsoft Graph API is a practical and powerful way to improve identity monitoring.</p><p>It gives defenders visibility into authentication activity, privilege changes, risky behavior, and administrative actions, all within a centralized SIEM platform.</p><p>When combined with endpoint telemetry from Microsoft Defender and system logs from servers and workstations, Wazuh becomes a highly capable security monitoring solution.</p><p>If you’re building a modern SOC, improving blue team visibility, or strengthening security operations, this integration is well worth implementing.</p><p>#CyberSecurity #Wazuh #SIEM #MicrosoftEntraID #AzureAD #SOC #BlueTeam #ThreatDetection #SecurityOperations #MicrosoftGraphAPI</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cabed44751f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step Guide to Securing Endpoints with Wazuh SIEM: Deployment, Monitoring, and Microsoft…]]></title>
            <link>https://medium.com/@aabiodunadeleke/step-by-step-guide-to-securing-endpoints-with-wazuh-siem-deployment-monitoring-and-microsoft-a55ad663b7fb?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a55ad663b7fb</guid>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Tue, 26 Nov 2024 18:12:18 GMT</pubDate>
            <atom:updated>2024-11-26T18:12:18.337Z</atom:updated>
            <content:encoded><![CDATA[<h3>Step-by-Step Guide to Securing Endpoints with Wazuh SIEM: Deployment, Monitoring, and Microsoft Defender Log Collection</h3><p>In today’s rapidly evolving cybersecurity landscape, robust tools are essential to monitor and protect systems against potential threats. <strong>Wazuh</strong> is a powerful open-source platform that offers advanced security capabilities, including threat detection, file integrity monitoring (FIM), incident response, and compliance management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*fgApjZOqMxXWnaZA.jpg" /></figure><p>Wazuh operates within a distributed architecture comprising several key components:</p><ul><li><strong>Wazuh Agents</strong>: Lightweight agents installed on servers, endpoints, or devices to monitor activity, collect security events, and forward them to a central manager.</li><li><strong>Wazuh Manager</strong>: The processing core, responsible for analyzing security data and applying detection rules.</li><li><strong>Wazuh Indexer (Elasticsearch)</strong>: Stores and indexes logs for historical analysis and efficient querying.</li><li><strong>Wazuh Dashboard (Kibana)</strong>: A user-friendly interface for real-time security monitoring and customizable dashboards.</li><li><strong>Wazuh Server</strong>: Combines the Manager, Indexer, and Dashboard into a single, central node.</li></ul><p>This guide walks you through deploying a <strong>Wazuh Server</strong> on an Ubuntu virtual machine (VM), installing Wazuh agents on Windows and Ubuntu endpoints, and monitoring logs with the Wazuh Dashboard.</p><h3>Step 1: Deploying the Wazuh Server on Ubuntu</h3><h4>1 Update Your System</h4><p>Ensure your package repository is up to date by running:</p><pre>sudo apt update  <br>sudo su</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/0*1vAcEsFt-q484pWW" /></figure><p><strong>2. Install Wazuh Using the Assistant Script</strong><br>Run the following commands to download and execute the Wazuh installer:</p><pre>curl -sO https://packages.wazuh.com/4.9/wazuh-install.sh &amp;&amp; sudo bash ./wazuh-install.sh -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Xm5OzcswNNO5cnYP" /></figure><p><strong>3. Access the Wazuh Dashboard</strong><br>Once the installation completes, copy the provided credentials from the terminal. Open your browser and navigate to https://&lt;your_server_ip&gt; to log in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_-db7IijyGr6hEqI" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*awoELQAFsEwG-t3W" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yoH798Up_FoowNhv" /></figure><h3>Step 2: Installing Wazuh Agents</h3><h4>2.1 Installing the Wazuh Agent on Windows</h4><ol><li>Open the Wazuh Dashboard and navigate to:<br><strong>Hamburger Icon &gt; Server Management &gt; Endpoint Summary</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/0*Ls7tfMeH69-eqLJ2" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JYV5DPXD9GoHXCsE" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kH4Dbr_I-NJ1-bTC" /></figure><p>2. Download the <strong>Windows Agent Installer</strong>.</p><p>3. Open PowerShell as an administrator and execute the command below, replacing placeholders with actual values:</p><pre>Invoke-WebRequest -Uri https://packages.wazuh.com/4.x/windows/wazuh-agent-4.9.1-1.msi -OutFile $env:tmp\wazuh-agent; msiexec.exe /i $env:tmp\wazuh-agent /q WAZUH_MANAGER=&#39;&lt;Wazuh_Manager_IP&gt;&#39; WAZUH_AGENT_GROUP=&#39;default&#39; WAZUH_AGENT_NAME=&#39;&lt;Agent_Name&gt;&#39;</pre><p>WAZUH_MANAGER: Set this to your Wazuh Manager’s IP address or hostname.</p><p>WAZUH_AGENT_GROUP: Set this to the agent group you want (default is ‘default’).</p><p>WAZUH_AGENT_NAME: Customize the name for this agent (replace ‘HostWin’ with a unique name for the endpoint).</p><p>4. Start the Wazuh Agent service:</p><pre>NET START WazuhSvc</pre><p>5. Verify the connection in the <strong>Agents &gt; Manage Agents</strong> section of the Wazuh Dashboard.</p><h3>Step 3: Monitoring Logs in Wazuh</h3><h4>3.1 Configuring Local Log Monitoring</h4><p>Edit the <strong>ossec.conf</strong> file to specify which logs you want to monitor. The location of this file depends on the operating system:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*KTdaUNYphTLH-33qUxN39w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BCx728XN92FmQnXL" /></figure><p>Specify event types and IDs to monitor. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*mtToyIawgIxFOYSXf9xo9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FdkXtrqjlNOj-g0t" /></figure><p>After editing, restart the Wazuh Agent:</p><pre>NET STOP WazuhSvc  <br>NET START WazuhSvc</pre><p>Or do it manually from the window services,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SlVCvfcfiBp7MPC7" /></figure><p>Confirm the changes in the Wazuh Dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b8f0Pfw59auLAiTS" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LNnFJ0IQIcQPhwo2" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CGy5w_yZ0Rtre5l0" /></figure><h4>4.2 Forwarding Windows Event Logs</h4><ol><li>Navigate to the Wazuh Dashboard &gt; <strong>Active Endpoint</strong> section.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yDaVt6iHHuQ4sfAw" /></figure><p>2. Select the desired endpoint and modify its <strong>agent.conf</strong> file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JwlAmQ_5AMuWkYuL" /></figure><p>3. Add log paths for Windows Defender, PowerShell, Sysmon, or other logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w-px4khX0MBKjPAv" /></figure><h4>4.3 Testing Log Collection with Windows Defender</h4><p>To test the configuration, simulate an event by running a reverse PowerShell command. Windows Defender should block the execution, triggering an event log entry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h7OxCyC5nAeVrLzO" /></figure><p>Check the Wazuh Dashboard to verify that the event was logged successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0t62sWfactJz16a0" /></figure><p>This process verifies that Wazuh is accurately collecting the specified Windows Event Logs from your endpoint.</p><h3>Conclusion</h3><p>Wazuh is a powerful open-source platform that provides organizations with the tools to monitor and secure their environments. By following this guide, you’ve deployed a Wazuh server, installed agents on endpoints, and configured targeted log monitoring for enhanced security awareness.</p><p>Keep exploring Wazuh’s advanced features to ensure your systems stay secure in an ever-changing threat landscape!</p><p>#CyberSecurity #Wazuh #OpenSource #ThreatDetection #SIEM #Monitoring #Windows #Ubuntu</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a55ad663b7fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Phishing Simulations with Gophish: A Fun and Easy Guide for Cybersecurity Pros]]></title>
            <link>https://medium.com/@aabiodunadeleke/mastering-phishing-simulations-with-gophish-a-fun-and-easy-guide-for-cybersecurity-pros-e89b32529185?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e89b32529185</guid>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Thu, 24 Oct 2024 06:52:32 GMT</pubDate>
            <atom:updated>2024-10-24T06:52:32.977Z</atom:updated>
            <content:encoded><![CDATA[<p>Phishing emails are everywhere, and as we know, they’re one of the easiest ways for attackers to slip past defenses and wreak havoc on organizations. That’s why it’s crucial to train employees on how to spot and dodge these malicious traps. Enter <strong>Gophish</strong> — an open-source phishing framework that lets you simulate phishing attacks and test your organization’s defenses in a safe, controlled environment.</p><p>In this guide, I’ll walk you through how to install Gophish on a Windows machine and use it to run your very first phishing campaign. Let’s help your team avoid that dreaded “Oops, I clicked the wrong link” moment!</p><h3>System Requirements</h3><p>Before we jump into setting up Gophish, make sure your Windows machine meets these basic requirements:</p><ul><li><strong>Operating System</strong>: Windows 10 or later (because, really, it’s time to upgrade)</li><li><strong>RAM</strong>: At least 4 GB (Gophish isn’t too needy)</li><li><strong>Storage</strong>: 1 GB free space (plenty for Gophish to do its thing)</li><li><strong>Network</strong>: Internet access (to download Gophish and, of course, send out all those phishing emails!)</li></ul><h3>Step 1: Downloading and Installing Gophish</h3><ol><li>Head over to the <a href="https://github.com/gophish/gophish/releases">Gophish GitHub Releases</a> page and grab the latest Windows version (a .zip file).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PJO_sKT0RIyHPKGL" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6x_kV9bL09oM3-Iz" /></figure><p>2. Once it’s downloaded, navigate to the file, right-click, and hit <strong>Extract All</strong>. Choose a destination folder like C:\Gophish for easy access.</p><p>3. Now, it’s time to bring Gophish to life. Open <strong>Command Prompt</strong> as an administrator and navigate to the Gophish folder:</p><pre>cd C:\Gophish</pre><p>4. Run Gophish by executing the following command:</p><pre>Gophish.exe</pre><p>You should see some magical text scroll by in the Command Prompt. Gophish is now running, and you can access it through <a href="http://localhost:3333/"><strong>http://localhost:3333</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KiouFx7FH6NusvMs" /></figure><h3>Step 2: The Initial Gophish Setup</h3><p>Time to log into Gophish’s sleek web interface and start tinkering:</p><ol><li>Open your browser (Chrome, Edge, Firefox — you do you) and go to <a href="http://localhost:3333/"><strong>http://localhost:3333</strong></a>.</li><li>You’ll see the login page. The default credentials are:</li></ol><p><strong>Email</strong>: admin</p><p><strong>Password</strong>: (This appears in the Command Prompt, so copy it over)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jgpLpmMvG4ZbBQ5P" /></figure><p>3. As soon as you’re in, <strong>change the password</strong>. Yes, right now! We don’t want any unauthorized Gophish escapades.</p><p>4. Boom! You’re now staring at your very own Gophish dashboard. Time to set up your first phishing campaign.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uft5eq50OKQlh1BA" /></figure><h3>Step 3: Setting Up a Phishing Campaign</h3><h4>3.1 Creating Sending Profiles</h4><p>To send phishing emails, Gophish needs an SMTP relay. Here’s how to configure it:</p><ol><li>On the sidebar, click <strong>Sending Profiles</strong>, then hit <strong>New Profile</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pB0nPbCJJjNtWcug" /></figure><p>2. Enter the following details:</p><ul><li><strong>From</strong>: Make sure it looks like a legit email address.</li><li><strong>Host</strong>: This should be in the format of smtp.example.com:587.</li><li><strong>Username</strong> and <strong>Password</strong>: The SMTP credentials you’re using.</li></ul><p>3. Test it out by clicking <strong>Send Test Email</strong>. If it worked, congratulations! You’re one step closer to becoming a phishing master.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BvCTR9mDRjVGCypn" /></figure><h4>3.2 Crafting Landing Pages</h4><p>Landing pages are what your users see after clicking a phishing link. Here’s how to create one:</p><ol><li>Go to <strong>Landing Pages</strong> and click <strong>New Page</strong>.</li><li>Use the WYSIWYG editor to build your page, or import a real site by clicking <strong>Import Site</strong>. (Careful, though — keep it ethical!).</li><li>If you want to capture credentials, tick the <strong>Capture Submitted Data</strong> checkbox. If you’re redirecting users to a different URL after they enter their info, enter that URL in the <strong>Redirect To</strong> field.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3Vlvx0dPb3ilpMLJ" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gDq1p4T-j9W4NlPy" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bEzYgkHTG63czKSH" /></figure><h4>3.3 Designing Phishing Email Templates</h4><p>Gophish makes it easy to create email templates that will leave your targets (hopefully) questioning their life choices:</p><ol><li>Navigate to <strong>Email Templates</strong> and click <strong>New Template</strong>.</li><li>Use the HTML editor to craft your perfect phishing email, or import a real one by clicking <strong>Import Email</strong>. Remember, details matter — realistic templates lead to better results.</li><li>You can also add tracking images to track who opens your email.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dAF_ZA2bGNqy29Pk" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1-s94G0kFYJfC0cN" /></figure><h4>3.4 Setting Up Target Groups</h4><p>You can create groups of users to target in your campaigns:</p><ol><li>Head to <strong>Users &amp; Groups</strong> and click <strong>+ New Group</strong>.</li><li>Add users manually or upload them in bulk with a CSV file. Your CSV file should have the headers: <strong>First Name, Last Name, Email, Position</strong>.</li><li>Once all users are added, click <strong>Save Changes</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4AIhzBq-JXPakQi2" /></figure><h3>Step 4: Launching Your First Phishing Campaign</h3><p>You’re almost there! Now, let’s launch the campaign:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zZ2Gf4Y5pbOgyKl_" /></figure><ol><li>Go to <strong>Campaigns</strong> and click <strong>New Campaign</strong>.</li><li>Fill in the details:</li></ol><ul><li><strong>Name</strong>: What do you want to call this campaign?</li><li><strong>Email Template</strong>: Select your previously created template.</li><li><strong>Landing Page</strong>: Choose the landing page for the campaign.</li><li><strong>URL</strong>: This should point to your Gophish phishing server (your IP or a domain).</li><li><strong>Sending Profile</strong>: Choose the SMTP profile you set up.</li><li><strong>Groups</strong>: Select the user group(s) you want to target.</li></ul><p>3. You can schedule the launch or send the emails immediately. Once you’re ready, hit <strong>Launch Campaign</strong>.</p><h3>Step 5: Reviewing Campaign Results</h3><p>The fun doesn’t end with launching your campaign — you get to track the results in real-time!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9PhI-cJbpbQHnn29" /></figure><ol><li>After launching, Gophish will automatically redirect you to the <strong>Campaign Results</strong> page.</li><li>Here, you can see who opened the emails, clicked links, or submitted credentials.</li><li>To export the results for further analysis, click <strong>Export CSV</strong>. Choose either:</li></ol><ul><li><strong>Results</strong>: The current status of each target.</li><li><strong>Raw Events</strong>: The log of events as they happen.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*101vGR7yRpD8Thfz" /></figure><h3>Step 6: Wrapping Up Your Campaign</h3><ol><li>Once you’re happy with the campaign results, click <strong>Complete</strong> to close it.</li><li>If you want to delete a campaign, click <strong>Delete</strong> — but remember, this can’t be undone!</li></ol><h3>Conclusion</h3><p>Phishing simulations are an essential part of cybersecurity awareness, and with Gophish, you can run realistic campaigns that keep your employees sharp and aware of phishing dangers. By following this guide, you now have the tools to set up Gophish, launch a campaign, and review the results like a true cybersecurity pro.</p><p>Get ready to train your team, enhance your defenses, and make phishing threats a thing of the past — one campaign at a time!</p><p>#PhishingSimulation #CyberSecurity #Gophish #EmployeeTraining #Tech #EthicalHacking #PhishingAwareness</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e89b32529185" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simulating a Ransomware Attack Using Infection Monkey]]></title>
            <link>https://medium.com/@aabiodunadeleke/simulating-a-ransomware-attack-using-infection-monkey-ae4c33e472ee?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae4c33e472ee</guid>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Tue, 08 Oct 2024 05:30:42 GMT</pubDate>
            <atom:updated>2024-10-08T05:30:42.182Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s cybersecurity landscape, understanding the weaknesses in your network security is essential. Infection Monkey by Akamai is an open-source adversary simulation tool designed to emulate attacks and test your system’s defenses. It allows you to visualize how attackers might exploit gaps in your network and offers insights into mitigating potential threats.</p><p>This guide demonstrates how to deploy Infection Monkey and simulate a ransomware attack, offering a hands-on learning experience in securing network infrastructures.</p><h3>What is Infection Monkey?</h3><p>Infection Monkey is composed of two main components:</p><ol><li><strong>Agent</strong> — A configurable network worm that simulates how malware might infect machines, steal data, and spread across networks.</li><li><strong>Monkey Island</strong> — A command-and-control server used to orchestrate and visualize the simulation’s progress.</li></ol><p>Together, these components provide a comprehensive platform to identify vulnerabilities in your network.</p><h3>Step 1: Downloading and Installing Infection Monkey</h3><p>To start, download Infection Monkey from its <a href="https://github.com/guardicore/monkey">GitHub page</a>. Navigate to the <strong>Releases</strong> tab and select the appropriate version for your operating system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Snlpi0SmTR6KfInt" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oJe4oXKlihi4m2bP" /></figure><p><strong>Download link: </strong><a href="https://github.com/guardicore/monkey/releases/download/v2.3.0/InfectionMonkey-v2.3.0.exe">Infection Monkey v2.3.0</a></p><p>Once the download is complete, run the installer and follow the prompts to install the tool. Upon launching, a command prompt will appear displaying an IP address that will take you to the Infection Monkey web interface. <strong>Note</strong>: The IP address changes after each system restart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/0*_6hKnzOVAmBl4neu" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iqxkrsjL2qRjXvNC" /></figure><p>NOTE: The web interface IP address changes after every system restart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EqBxEu6IohvQiw55" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tC5aIoo5v7SWlXLc" /></figure><h3>Step 2: Running the Infection Monkey Simulation</h3><p>Infection Monkey offers two options for running simulations:</p><ol><li><strong>From Monkey Island</strong>: Run the simulation on the Monkey Island server. This simulates an attack originating from within the local network, attempting to spread across accessible machines.</li><li><strong>Manual Mode</strong>: Download the agent and run it on a selected machine to simulate an attacker who has breached a server. The Monkey will map the network, steal credentials, and propagate using various exploits.</li></ol><p>This flexibility allows administrators to test different attack scenarios based on their network setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F4YhD2M2dPVfYLwJ" /></figure><h3>Step 3: Configuring Infection Monkey</h3><p>The Infection Monkey platform offers a highly configurable environment, allowing you to customize the attack behaviors, payloads, and exploits. You can access the <strong>Configuration Tab</strong> in the web interface to adjust various settings:</p><ul><li><strong>Exploits</strong>: Test specific attack vectors, such as brute force, credential theft, or remote code execution.</li><li><strong>Payloads</strong>: Choose between different attack types, including ransomware or cryptojacking simulations.</li><li><strong>Credential Theft</strong>: Customize how the Infection Monkey attempts to steal credentials from the victim machines.</li></ul><p>This flexibility allows you to tailor the simulation to your organization’s security testing needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QPIkY_Hz9yJ5oqR8" /></figure><h3>Step 4: Installing Plugins</h3><p>Infection Monkey supports the use of plugins to enhance its functionality. The <strong>Plugins Page</strong> consists of three tabs:</p><ol><li><strong>Available Plugins</strong>: A list of plugins that can be downloaded and installed.</li><li><strong>Installed Plugins</strong>: Shows plugins that are currently installed on Monkey Island.</li><li><strong>Upload New Plugin</strong>: Allows you to upload custom plugins to extend the platform’s capabilities.</li></ol><p>In this simulation, several plugins were installed to help run the ransomware attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DKQmtyJexV15bNBU" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rbhd3qZxl8LDMKSD" /></figure><h3>Step 5: Running a Ransomware Attack Simulation</h3><h4>5.1 Preparing for the Attack</h4><p>Before starting the simulation, ensure that you create a directory containing files that can be safely encrypted. This is important because the ransomware simulation will not encrypt any files unless a valid directory is specified.</p><p><strong>Note</strong>: For this operation, you will need to turn off your Windows Defender or any anti-virus you have installed, but if you are accessing your security you will need to power them on to see if it detects such attacks.</p><ol><li>On the target machine, create a directory with some files that will be used during the simulation. This could be any test data, such as documents or images.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ycJdOdooKzMM-J-t" /></figure><p>2. Copy the path of this directory for the next step in the simulation.</p><h4>5.2 Configuring the Ransomware Attack</h4><ol><li>In the Infection Monkey web interface, navigate to the <strong>Configuration Tab</strong> and locate the <strong>Ransomware Simulation</strong> section.</li><li>Paste the directory path where the ransomware will encrypt files.</li><li>After setting the path, click on the <strong>Submit</strong> button to save your configuration.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QlxK-jl8xBJ2mRZW" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZxHSP_kefPEOPPCT" /></figure><h4>5.3 Running the Attack</h4><ol><li>Navigate to the <strong>Run Monkey</strong> tab.</li><li>Click the <strong>Run Monkey</strong> button to start the ransomware simulation.</li></ol><p>Once the attack begins, Infection Monkey will attempt to encrypt the files in the specified directory. It will generate a report indicating how many files were successfully encrypted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CLMp7H719HVFTQig" /></figure><h3>Step 6: Viewing the Security Reports</h3><p>After running the ransomware simulation, you can view detailed security reports:</p><ol><li>Navigate to the <strong>Reports</strong> tab in the Infection Monkey web interface.</li><li>The report provides a summary of successful attacks, including:</li></ol><ul><li>Number of files encrypted during the ransomware simulation.</li><li>A breakdown of how the attack propagated across the network.</li><li>Detailed logs of all exploits and credentials used during the simulation.</li></ul><p>3. You can also print or export the report for documentation and further analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_RZDLZYqAtuDi6HU" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yoIil9zFbWIGTXO3" /></figure><h3>Conclusion</h3><p>Simulating a ransomware attack using Infection Monkey allows organizations to gain invaluable insights into how real-world attackers might exploit network vulnerabilities. By understanding how such an attack could unfold, security teams can reinforce their defenses, patch weaknesses, and improve overall network security posture. Infection Monkey’s detailed reporting and extensive configuration options make it an essential tool for proactive security testing.</p><p>#CyberSecurity #InfectionMonkey #RansomwareSimulation #AdversaryEmulation #NetworkSecurity #PenTesting #Akamai #OpenSourceTools</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae4c33e472ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 2: Deploying Splunk and Integrating Apache Logs]]></title>
            <link>https://medium.com/@aabiodunadeleke/part-2-deploying-splunk-and-integrating-apache-logs-771a3cc3930d?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/771a3cc3930d</guid>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Sat, 21 Sep 2024 18:38:30 GMT</pubDate>
            <atom:updated>2024-09-21T18:38:30.225Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/984/0*siylTPEL7xmmIMcV.png" /></figure><h3>Introduction to Splunk</h3><p>Splunk is a powerful platform that allows you to search, monitor, and analyze machine-generated data. By setting up Splunk alongside your Apache web server, you can track important logs such as error and access logs, giving you insights into web traffic, performance, and potential security threats.</p><p>In this section, we will deploy a Splunk server on a separate machine, install Splunk Universal Forwarder on the Apache server, and configure them to send logs from Apache to Splunk for analysis.</p><h3>Step 1: Check and Set IP Addresses</h3><p>With both the Apache and Splunk servers set up, start by confirming their IP addresses. Use the following command on each machine:</p><pre>ifconfig</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/0*tWl8ii3-B-RNyA1z" /></figure><p><strong>Tip:</strong> It’s recommended to set static IP addresses to maintain consistency, especially for machines in a network.</p><p>When setting static IP addresses for your virtual machines, it’s important to choose IPs that are within the same subnet as the dynamic IP range provided by your network. This ensures seamless network integration. For instance, if your dynamic IP is 10.0.2.15, select a static IP close to this range, such as 10.0.2.16, 10.0.2.17, and so on. This strategy maintains network consistency and avoids potential IP conflicts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0WxCwZgHCmxbr5kT" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h89QqkhoI0SdOXxi" /></figure><p>Assigning Static IP to the Second Machine: Similarly, assign a static IP address to the second virtual machine. This ensures both machines are on the same network and can communicate with each other. Follow the same steps as before to set a static IP.</p><p><strong>If you encounter issues with connectivity (like not being able to ping or access the server on the other VM), check your VirtualBox network settings.</strong></p><p><strong>In cases where the network is set to NAT, consider changing it to Bridged Adapter for both VMs. This setting 0 the 0000VMs to appear as distinct entities on 0 network, facilitating better between them</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/0*hO8jUwFpLv42rmsL" /></figure><h3>Step 2: Install Splunk Enterprise on the Splunk Server</h3><p>To start collecting data, we need to install Splunk Enterprise on the Splunk machine. Follow these steps:</p><ul><li>Download the Splunk Enterprise package from the <a href="https://www.splunk.com/">Splunk website</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MORnhWEgGMomIVRK" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*61UyCZ-k019_LWZx" /></figure><ul><li>Navigate to the directory where the package is saved.</li></ul><p>Extract and install the package with the following command:</p><pre>tar -xzvf splunk_package.tar.gz -C /opt/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*V0jyHYcaCVOcBmfJ" /></figure><p>Change to the Splunk installation directory:</p><pre>cd /opt/splunk/bin</pre><p>Start Splunk:</p><pre>sudo ./splunk start</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/0*qfGjXPUGlOHYePT2" /></figure><p>You will be prompted to set the admin credentials for your Splunk instance. Once completed, Splunk Enterprise will launch, and you can access it through your web browser using your Splunk server’s IP address and port 8000 (e.g., <a href="http://your-splunk-server-ip:8000).">http://your-splunk-server-ip:8000).</a></p><h3>Step 3: Install Splunk Universal Forwarder on the Apache Server</h3><p>Now we need to install the <strong>Splunk Universal Forwarder</strong> on the Apache server to send logs to Splunk. Follow these steps:</p><ul><li>Download the Splunk Universal Forwarder package from the Splunk website.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3vdMt0pSPSBMY4Yp" /></figure><ul><li>Once downloaded, extract and install the package:</li></ul><pre>tar -xzvf splunkforwarder_package.tar.gz -C /opt/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/0*VT9NrP7Cx6v25hvf" /></figure><p>Change to the installation directory:</p><pre>cd /opt/splunkforwarder/bin</pre><h3>Step 4: Start Splunk Universal Forwarder</h3><p>Start the Universal Forwarder with the following command:</p><pre>sudo ./splunk start</pre><p>Like with Splunk Enterprise, you’ll need to set up credentials and accept the license agreement.</p><h3>Step 5: Configure the Splunk Universal Forwarder to Send Apache Logs</h3><p>Now we need to configure the Universal Forwarder to send logs to the Splunk server. Run the following command on your Apache server:</p><pre>/opt/splunkforwarder/bin/splunk add forward-server your-splunk-server-ip:9997</pre><p>Replace your-splunk-server-ip with the actual IP address of your Splunk server.</p><p>Next, tell the Universal Forwarder which logs to send. In this case, we’ll monitor the Apache logs:</p><pre>/opt/splunkforwarder/bin/splunk add monitor /var/log/apache2</pre><p>Finally, restart the Splunk Forwarder to apply these settings:</p><pre>/opt/splunkforwarder/bin/splunk restart</pre><h3>Step 6: Set Up Splunk to Receive Apache Logs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_3ayMLYOYymI_TNm" /></figure><p>On the Splunk server, log in to the Splunk web interface and navigate to:</p><p><strong>Settings &gt; Forwarding &amp; Receiving &gt; Configure Receiving</strong></p><p>Click “New” to add a receiving port. Set it to 9997, the port used by the Universal Forwarder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w29ShBFvPkn9o7aE" /></figure><h3>Step 7: Create an Index for Apache Logs</h3><p>In Splunk, data is stored in indexes. Let’s create an index to store the Apache logs:</p><ol><li>Go to <strong>Settings &gt; Indexes</strong>.</li><li>Click <strong>New Index</strong>.</li><li>Name the index (e.g., web).</li><li>Save your changes.</li></ol><h3>Step 8: Verify Data is Flowing into Splunk</h3><p>To ensure the data is flowing from the Apache server to Splunk, navigate to <strong>Search &amp; Reporting</strong> in the Splunk web interface and use the following search query:</p><pre>index=web</pre><p>If everything is set up correctly, you should see the Apache log data from the forwarder.</p><h3>Step 9: Troubleshooting Common Issues</h3><p>If you encounter issues with data not appearing in Splunk, here are some common troubleshooting steps:</p><p><strong>Check Network Connectivity</strong>: Use telnet or ping to verify that the Apache server can reach the Splunk server on port 9997.</p><pre>telnet your-splunk-server-ip 9997</pre><p><strong>Verify Forwarder Configuration</strong>: On the Apache server, ensure that the Universal Forwarder is set up correctly to forward data:</p><pre>/opt/splunkforwarder/bin/splunk list forward-server</pre><p>Replace 127.0.0.1 with your IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/0*StRTEA2f_xMC_ulq" /></figure><p><strong>Check Firewall Settings</strong>: Make sure the firewall on both machines allows communication over port 9997.</p><p>Now, you restart the splunk forwarder. Using:</p><pre>/opt/splunkforwarder/bin/splunk restart</pre><p>Head back to the splunk web interface &gt; app &gt; search and reporting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/0*6fxmfBHlKplHQAj7" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XAu85oPaFAGt-TI5" /></figure><p>From the image above, we can see we don’t have any log coming in yet. So let’s fix that.</p><p>All we need to do now is add logs that should be monitored. Using command:</p><pre>/opt/splunkforwarder/bin/splunk add monitor /var/log/apache2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/0*oitxfZiSu0xDrtkY" /></figure><p>Verify Data is Flowing:</p><p>On the Splunk Web interface (on your second VM), search for incoming data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wtjZ1KJ3B1PE8Mab" /></figure><h3>Conclusion</h3><p>In this part, we successfully deployed a Splunk server on a separate machine, installed the Splunk Universal Forwarder on the Apache server, and configured both machines to send Apache logs to Splunk for monitoring. This setup provides a powerful way to track and analyze your web server’s performance, security, and usage in real time.</p><p>#Splunk #ApacheLogs #LogMonitoring #DataAnalysis #Linux #ServerLogs #SplunkEnterprise #CyberSecurity</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=771a3cc3930d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Apache Web Server and Integrating with Splunk: A Step-by-Step Guide (Part 1 & Part 2)]]></title>
            <link>https://medium.com/@aabiodunadeleke/setting-up-apache-web-server-and-integrating-with-splunk-a-step-by-step-guide-part-1-part-2-e8937c94a3a2?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8937c94a3a2</guid>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Sat, 21 Sep 2024 18:10:32 GMT</pubDate>
            <atom:updated>2024-09-21T18:39:35.912Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 1: Deploying an Apache Web Server and Hosting a Website</h3><h3>Introduction to Apache Web Server</h3><p>Apache is a powerful, flexible, and widely-used open-source software that serves web content over the internet. Acting like a delivery service, Apache responds to client requests for web content by providing the necessary HTML files when a user accesses a website domain.</p><p>A key advantage of Apache and other web servers is their compatibility with multiple operating systems, including Linux, Windows, Solaris, and macOS. This cross-platform support means you can easily turn almost any computer into a server capable of hosting multiple websites.</p><p>Additionally, the Apache HTTP Server supports dynamic module loading, offering extensive capabilities for software and application integration. In this guide, we’ll walk you through the steps to install and configure an Apache HTTP server on a Linux system.</p><h3>Step 1: Install Apache Server on Linux</h3><p>Before installing Apache, it’s essential to update the Linux package database from the official repositories. This step ensures that your system is protected against security vulnerabilities and includes the latest features and updates for all packages.</p><p>To update the system repository list and install Apache, run the following commands:</p><pre>sudo apt-get update<br>sudo apt-get install apache2 -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/0*vlpMBnLK-e3a-aD1" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mK0V1pI9mveB3LMA" /></figure><h3>Step 2: Verify Apache Service Status</h3><p>Once Apache is installed, the service starts automatically on Debian-based distributions. To verify the status of the Apache service, open a web browser and enter your server’s local IP address to access the default Apache landing page.</p><p>If you don’t know your server’s IP address, use the following command:</p><pre>hostname -i</pre><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*UQnBKacmv9ppjkpL" /></figure><p>Alternatively, you can verify Apache installation using:</p><pre>apache2 -version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/0*1k-CB_xwYTLhmmPX" /></figure><p>If the Apache server’s landing page isn’t loading after entering your server’s IP address in the browser, there could be a few potential reasons for this issue. Here are some steps to troubleshoot and resolve the problem:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L8B0EM93zrVZzYAX" /></figure><p>Check if Apache is running with:</p><pre>sudo systemctl status apache2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/0*Q7pQO-7IUnEll9kr" /></figure><p>If the service is active (running), it should display a status of active (running).</p><p>If it’s not running, start it with:</p><pre>sudo systemctl start apache2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kRn6Gi5J_rFnFcw7" /></figure><p>From the output it provided, the Apache HTTP server is running correctly, which is a good sign. However, there is a warning message that might be causing some confusion:</p><pre>AH00558: apache2: Could not reliably determine the server&#39;s fully qualified domain name, using 127.0.1.1. Set the &#39;ServerName&#39; directive globally to suppress this message.</pre><p>This warning indicates that Apache is unable to determine the server’s fully qualified domain name (FQDN) and is defaulting to 127.0.1.1. While this is just a warning and does not prevent Apache from running, it might be why you’re having trouble accessing the server.</p><p>To resolve this, open the Apache configuration file:</p><pre>sudo nano /etc/apache2/apache2.conf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vp8gW_kC6FaD_cQz" /></figure><p>Add the following line at the end of the file, replacing 127.0.1.1 with your actual IP address:</p><pre>ServerName 127.0.1.1</pre><p>Save the file and exit the editor (in nano, press Ctrl + X, then Y to confirm, and Enter to save).</p><p>Then restart Apache:</p><pre>sudo systemctl restart apache2</pre><p>Verify that Apache is running without warnings:</p><pre>sudo systemctl status apache2</pre><p>Test Access Again</p><p>Open a web browser and enter your server’s IP address. If Apache is configured correctly and there are no network issues, you should see the Apache default landing page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*syLvgAtDqzVZZDZq" /></figure><h3>Step 4: Configure the Firewall to Allow Apache Access</h3><p>To ensure that external traffic can access your web server, configure the firewall to allow Apache traffic. The UFW firewall in Linux provides predefined profiles to manage services like Apache.</p><p>To list the available Apache profiles, run:</p><pre>sudo ufw app list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mrdDSiuV5Q0px5AK" /></figure><p>You’ll see options like:</p><ul><li>Apache: Allows unencrypted HTTP traffic on port 80.</li><li>Apache Full: Allows both HTTP (port 80) and HTTPS (port 443) traffic.</li><li>Apache Secure: Allows only HTTPS traffic on port 443.</li></ul><p>Since we’re not enabling SSL/TLS, we will allow only unencrypted traffic:</p><pre>sudo ufw allow &#39;Apache&#39;</pre><p>Now check the firewall status:</p><pre>sudo ufw status</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/0*gkoug_gsCggUC7jD" /></figure><h3>Step 5: Understand Apache Directories and Files</h3><p>After successfully installing and configuring the Apache server, it’s important to understand the key directories and files involved in managing website data and configurations.</p><ul><li><strong>Website Content Directory</strong>: /var/www/html is the default location where Apache stores web pages. You can create subdirectories here to host multiple websites.</li></ul><p><strong>Main Configuration Directories</strong>:</p><ul><li><strong>Ubuntu/Debian</strong>: /etc/apache2</li></ul><p><strong>Important Files</strong>:</p><ul><li><strong>Error Log</strong>: /var/log/apache2/error.log</li><li><strong>Access Log</strong>: /var/log/apache2/access.log</li><li><strong>Virtual Hosts Configurations</strong>: /etc/apache2/sites-available/ (for inactive sites) and /etc/apache2/sites-enabled/ (for active sites).</li></ul><p>Understanding these directories and files is crucial for effectively managing the Apache server. By knowing where your website content is stored and how to configure Apache, you can host and manage multiple websites on a single server seamlessly.</p><h3>Step 6: Host a Website on Apache</h3><p>To host your website, move your website files (HTML, CSS, JavaScript, etc.) into the /var/www/html directory or any other custom directory.</p><p>Example command:</p><pre>sudo cp -r /path/to/your/website/* /var/www/html/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/0*9YcvZhKKCC07RogF" /></figure><h3>Step 7: Test Your Website</h3><p>Once the files are in place, open a web browser and enter your server’s IP address or domain (e.g., 127.0.0.1) to see your hosted website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vpSE5DEPHrA_1uPY" /></figure><h3>Conclusion</h3><p>In this part, we’ve successfully deployed an Apache web server on a Linux machine, configured it, and hosted a website. We also explored basic Apache troubleshooting techniques and learned how to manage the essential directories and files. This foundation prepares us for the next step: integrating logs from this Apache server into Splunk for monitoring and analysis.</p><p>Once you’re ready to proceed, check out <a href="https://medium.com/@aabiodunadeleke/part-2-deploying-splunk-and-integrating-apache-logs-771a3cc3930d">Part 2</a> where we’ll dive into deploying Splunk and integrating it with your Apache logs!</p><p>#ApacheServer #WebHosting #Linux #OpenSource #DevOps #LinuxServer #NetworkManagement #CyberSecurity</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8937c94a3a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing Linux SSH with Rublon MFA: A Step-by-Step Guide]]></title>
            <link>https://medium.com/@aabiodunadeleke/securing-linux-ssh-with-rublon-mfa-a-step-by-step-guide-6b7349fe8566?source=rss-f6b83c08c8d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b7349fe8566</guid>
            <dc:creator><![CDATA[Jamiu A Adeleke]]></dc:creator>
            <pubDate>Sat, 21 Sep 2024 17:34:12 GMT</pubDate>
            <atom:updated>2024-09-21T17:34:12.659Z</atom:updated>
            <content:encoded><![CDATA[<p>Rublon MFA is a multi-factor authentication (MFA) solution designed to secure your organization’s data and control access to networks, servers, and applications. It supports a wide range of authentication methods, including Mobile Push, SMS Passcodes, QR Codes, WebAuthn/U2F Security Keys, and more.</p><p>In this guide, we will explore how to implement MFA for SSH on Linux using Rublon. MFA for Linux SSH adds an additional layer of security by requiring users to authenticate using multiple factors, such as passwords combined with secure authentication methods like Mobile Push or TOTP codes. Even if a password is compromised, MFA ensures that unauthorized access is prevented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SF1BZ5kofZspGghF" /></figure><h3>Known Limitations</h3><ul><li>If a user has enrolled multiple phones, only the MFA methods available on the default phone will be displayed in the SSH connector. There is no option to switch to another phone.</li><li>After enrolling a phone number for SMS authentication or the Rublon Authenticator app, one authenticator may take priority over the other, potentially causing authentication methods for the other to be unavailable in the SSH interface.</li></ul><h3>Step 1: Create an Application in the Rublon Admin Console</h3><ol><li>Sign up for the <strong>Rublon Admin Console</strong>. <a href="https://admin.rublon.net/auth/login">Here’s how</a>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kdAyM36IwFTZZ9-p" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9hpV0Ez1gK3TNc0l" /></figure><p>2. Activate <strong>Rublon Authenticator</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SeyjMEiN1ps_oRhF" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8DA6Qisxjvs0EU2S" /></figure><p>3. In the Admin Console, go to the <strong>Applications</strong> tab and click <strong>Add Application</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UhwGpLiFVT2mo6P3" /></figure><p>4. Enter a name for your application (e.g., Linux SSH) and set the type to <strong>Linux SSH</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*viXbNyHqotsp23rp" /></figure><p>5. Click <strong>Save</strong> to add the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5P9Qw70SIwKZYLzG" /></figure><p>6. Copy and save the <strong>System Token</strong> and <strong>Secret Key</strong> values, as you will need them later.</p><h3>Step 2: Install the Rublon Authenticator</h3><p>All end-users must install the Rublon Authenticator mobile app. It’s recommended that administrators also install the app.</p><ul><li>Download the Rublon Authenticator for:</li><li><a href="https://play.google.com/">Android</a></li><li><a href="https://apps.apple.com/">iOS</a></li></ul><p>After installing the app, users can authenticate using:</p><ul><li><a href="https://rublon.com/product/mobile-push/"><strong>Mobile Push</strong></a></li><li><a href="https://rublon.com/product/mobile-passcode/"><strong>Mobile Passcode</strong></a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/0*NI8Ykf8eQwC8oXPo" /></figure><h3>Step 3: Installing Rublon MFA for Linux SSH</h3><ol><li>Download the appropriate Rublon package for your Linux distribution.</li><li>Install the package:</li></ol><p><strong>Ubuntu &amp; Debian</strong>:</p><pre>sudo dpkg -i &lt;package_name&gt;</pre><p><strong>RHEL &amp; CentOS</strong>:</p><pre>sudo yum install &lt;package_name&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uVebeLXmEFiXyhJi" /></figure><p>After installation, the SSH service may be disabled. To enable and start it:</p><pre>sudo systemctl enable ssh<br>sudo systemctl start ssh<br>sudo systemctl status ssh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/0*zDU7IHwJovDN8_V7" /></figure><p>3. Edit the rublon.config file:</p><pre>sudo nano /etc/rublon.config</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/0*anoMDHax8nxnS5Kf" /></figure><ul><li>Paste the <strong>System Token</strong> and <strong>Secret Key</strong> values.</li><li>Adjust other options as necessary, or leave the default values.</li></ul><h3>Modifying the SUDO Service Configuration</h3><p>To configure the Rublon PAM module for the sudo service:</p><ol><li>Open the /etc/pam.d/sudo file.</li><li>Replace:</li></ol><pre>@include common-auth</pre><p>with:</p><pre>#@include common-auth<br>auth required pam_env.so<br>auth requisite pam_unix.so<br>auth sufficient pam_rublon.so<br>auth required pam_deny.so</pre><h3>Modifying the SU Service Configuration</h3><p>To configure the Rublon PAM module for the su service:</p><ol><li>Open the /etc/pam.d/su file.</li><li>Replace:</li></ol><pre>@include common-auth</pre><p>with:</p><pre>#@include common-auth<br>auth required pam_env.so<br>auth requisite pam_unix.so<br>auth sufficient pam_rublon.so<br>auth required pam_deny.so</pre><h3>Step 4: Enable Rublon MFA for SSH Key Authentication</h3><p>To enforce SSH key authentication with Rublon MFA:</p><h3>SSH Configuration</h3><ol><li>Edit the /etc/ssh/sshd_config file to increase the session login timeout to 15 minutes.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/0*Mj2pogT72tOuFmCd" /></figure><h3>Public Key Authentication</h3><ol><li>Edit the 01-rublon-ssh.conf file (located in /etc/ssh/sshd_config.d/ for Debian, Ubuntu, and RHEL 9):</li></ol><pre>AuthenticationMethods publickey,keyboard-interactive</pre><p>2. Set the following:</p><pre>MaxAuthTries 3<br>PubkeyAuthentication yes<br>PasswordAuthentication no</pre><h3>PAM Configuration</h3><ol><li>In the /etc/pam.d/sshd file, add:</li></ol><pre>auth requisite pam_rublon.so<br>account required pam_rublon.so</pre><p>2. For Ubuntu/Debian, replace:</p><pre>@include common-auth</pre><p>with:</p><pre>#@include common-auth</pre><p>3. Finally, verify that the service is active:</p><pre>systemctl status sshd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/0*YYHLHrQ4qUh4ox9g" /></figure><h3>Step 5: Testing Rublon Authentication</h3><p>To test Rublon authentication:</p><ol><li>Access the SSH service.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rUy6kzhvrHjzxN6o" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ns2lBIM5CT-ntfdb" /></figure><p>2. Choose an authentication method and confirm it using the Rublon Authenticator app.</p><p>3. A mobile push notification should appear on the authenticator app for confirmation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*GMgb0vc7vF98j8jH" /></figure><h3>Step 6: View Authentication Logs in the Admin Console</h3><p>Logs from the Linux SSH service can now be viewed in the <strong>Rublon Admin Console</strong>, providing insights into authentication activities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zLMbWiAM66KaHtti" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XAS_BMem79xgrGqw" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ku93LgySSXdsRB5C" /></figure><p>By following the steps outlined in this guide, you can significantly enhance the security of your Linux servers by implementing Rublon MFA for SSH. Multi-factor authentication ensures that even if a user’s password is compromised, unauthorized access is prevented by requiring a second factor of authentication. With Rublon’s seamless integration and a wide range of authentication methods, you can protect sensitive data and maintain the integrity of your systems. Whether you’re using password-based or key-based authentication, Rublon provides an extra layer of security that is both user-friendly and robust.</p><p>#CyberSecurity #MFA #LinuxSecurity #RublonMFA #SSH #TwoFactorAuthentication #Linux #ServerSecurity #ITSecurity #Authentication #SysAdmin #LinuxAdmin #SecurityBestPractices</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b7349fe8566" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>