<?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 Olaniyi Oluwaseyi on Medium]]></title>
        <description><![CDATA[Stories by Olaniyi Oluwaseyi on Medium]]></description>
        <link>https://medium.com/@olaniyiseyi02?source=rss-3e1048cfbf94------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*D3yBxHlvkHHApuwr</url>
            <title>Stories by Olaniyi Oluwaseyi on Medium</title>
            <link>https://medium.com/@olaniyiseyi02?source=rss-3e1048cfbf94------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:50:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@olaniyiseyi02/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[Insider Threat Simulation and Incident Response]]></title>
            <link>https://medium.com/@olaniyiseyi02/insider-threat-simulation-and-incident-response-027e4422f8e1?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/027e4422f8e1</guid>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Mon, 10 Aug 2026 22:12:59 GMT</pubDate>
            <atom:updated>2026-08-10T22:12:59.442Z</atom:updated>
            <content:encoded><![CDATA[<p>This week brings together everything I’ve learned so far. I’ll be running the full attack-and-defence exercise myself, start to finish — playing both the intruder and the analyst who catches them.</p><p>The scenario I’m working with is an insider threat: a rogue employee on the Windows machine pulls a confidential client database, encodes it to slip past detection, sends it out over the internal network to a listener I control, and then tries to wipe the evidence. As the SOC analyst, my job is to prove every step of that happened, using the tools and skills I’ve built over the past five weeks.</p><p>I’ve broken the week into three phases: first, executing the attack myself; second, investigating it as the analyst; and third, writing up a formal incident response report.</p><p>On the Windows machine, I set up a new folder named Espionage and configured Wazuh’s File Integrity Monitoring to watch it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*yhB0bZika3jHpshOMos7Zw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4vnuG5f1YrReCAHbq2pfsg.png" /></figure><p>I restarted the Wazuh agent and created a text file in the folder to confirm it was now being monitored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*xzEre5QZ-9JKm_fwbKmPAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j9xUr7UIembkYvXxohGNig.png" /></figure><p>The new folder is now being monitored</p><p><strong>Phase One: Red Team Execution</strong></p><p>The first step was to open a listener on port 8080 on the Kali machine. This allows Kali to capture incoming traffic from any machine on the same host network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*kYwDIMB-eGR8HblmA-EMrg.png" /></figure><p>Next, I staged and encoded a file on the Windows machine, the way an attacker would.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4R1jrlpQh14-_yd7GJZOQw.png" /></figure><p>The next step was to exfiltrate the encoded content from the Windows machine to the Kali machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wca2SgI2DNe6QLMo7XfcOw.png" /></figure><p>With that done, the encoded payload showed up in the Kali terminal as the output of the listener catching the incoming POST request. I copied that Base64 output and saved it into a text file for safekeeping, since I’d need it later to decode and verify the exfiltrated data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9PbqwA-R7YP8QSwKSO_GBg.png" /></figure><p>The last step of this stage was cleanup, making sure no evidence was left behind. On the Windows machine, I deleted the files I’d created and encoded inside the Espionage directory, mimicking how an attacker would try to cover their tracks after exfiltrating the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*yGM8EGk9KJfijtKnuwSKUA.png" /></figure><p><strong>Phase Two:Blue Team Investigation</strong></p><p>The first stage of this phase is FIM ivestigation,Since the attacker already infiltrated the windows system and deleted the file that was exfiltrated, there is no evidence of an attack on the windows machine,but since the folder was set to be monitored,there is a record on the wazuh dashboard that can tell us everything we need to know about what was done in the folder.</p><p>On the wazuh dashboard,i collected the following evidence</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gRUiqNnbdoaoSIHylCOUuQ.png" /></figure><p>The alerts that fired when the file was created and encoded</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*yYSNK14gcPTCNFiTtUbjRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*oC0winUVoMOiu8L70SUVQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*UlhwhfWw_KjMPIMkSVKqqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*eOnGb8TFRMw5qpZUsKaNKA.png" /></figure><p>The alerts that fired when both files were deleted</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*UfNMAtfe4LwPbGl6hrJ1XA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*kuIMslYGYMit3K_TAlNO2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*3OgX5eo3WFckdeCPxyDrSA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*kWuZ0nhIXJzvRkHQ5083rw.png" /></figure><p>Stage one is done, and I got a bonus find along the way: my Wazuh ruleset had already auto-tagged the deletion events with MITRE ATT&amp;CK IDs — T1070.004 (File Deletion) and T1485 (Data Destruction). That lines up perfectly with the T1070 mapping I need for my report, so I&#39;ll be pulling that straight into my evidence.Here’s the timeline I built from my four FIM events:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*Hwh0yEd6RUYCAVGyI6umWw.png" /></figure><p>Two things I want to highlight in my analysis:</p><ol><li><strong>The hashes survive the deletion.</strong> I have full sha1_after and sha256_after values for both files, captured at creation — before the attacker ever deleted them. That&#39;s my direct answer to why deletion doesn&#39;t destroy the evidence: the file content is gone from disk, but Wazuh already recorded its cryptographic fingerprint and metadata, and that record lives on independently of the file itself.</li><li><strong>The two deletions land 46ms apart</strong> (15:05:36.372 vs 15:05:36.418) — consistent with a single Remove-Item -Path &quot;C:\Espionage\*&quot; wildcard command wiping both files almost simultaneously, rather than two separate manual deletions. I&#39;ll note that in my timeline narrative.</li></ol><p>The second stage of this phase was decoding the evidence. The Base64 string I’d saved from the Kali attacker machine was decoded using CyberChef, revealing the original plain text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8daKrDODF7aALEGGajvrRg.png" /></figure><p>The plain text reveals the following information<br>Client: Cyberster<br>ACCT: 4459<br>PW: AdminPassword2026!</p><p>Note to consider: I recovered this payload from my own Kali listener, since I controlled both sides of the simulation. In a real incident, I wouldn’t have access to the attacker’s infrastructure — this data would instead need to come from a network packet capture, proxy or DLP logs, or PowerShell script block logging (Event ID 4104) on the endpoint.</p><p>Without one of those in place, I could confirm exfiltration occurred but not recover what was taken — a gap worth flagging on its own.</p><p>The third stage of this phase was detection engineering, to make sure the same attack pattern doesn’t slip through the environment silently again. Since the attack relied on a .b64 file extension to store the encoded payload, and file creation with that extension inside a sensitive directory isn&#39;t normal behavior, it warranted a specific, high-priority alert.</p><p>So I wrote a custom Wazuh rule that fires whenever a file ending in .b64 is created or modified inside the Espionage directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*PAH2W41GY-Uyn-jx7F14Ug.png" /></figure><p>I set the rule ID to 100010 (above 100000, as required) and severity to Level 10. I parented it to rule 554 using if_sid.I also added type=&quot;pcre2&quot; to the file field, which enables full regex support so the case-insensitive flag and pattern matching actually work.</p><p>I recreated the files and encoded them on the Windows machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*VK2JHVg9KnSWL-7eOMeU3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*txrq3vqBbpiIqp220Ygj7w.png" /></figure><ul><li><strong>Rule 100010</strong> triggered on system_cache.b64 in C:\Espionage</li><li><strong>Level 10</strong>, as specified</li><li><strong>MITRE ID </strong><strong>T1074.001</strong> resolved correctly this time, auto-enriching with tactic Collection and technique Local Data Staging</li><li>Custom description showing clearly: <em>“Suspicious .b64 file created in C:\Espionage — possible data staging/exfiltration”</em></li><li>Full syscheck metadata (hashes, permissions, timestamp) captured alongside it</li></ul><p><strong>Phase Three:Incident Response Report</strong></p><p><strong>Executive Summary</strong></p><p>On August 10, 2026, an insider threat incident was identified and investigated on a Windows endpoint (agent 010, 192.168.202.133). The incident involved an employee accessing a confidential client database, encoding the file to evade detection, exfiltrating it to an external host over the network, and subsequently attempting to delete evidence of the activity.</p><p>File Integrity Monitoring (Wazuh FIM) flagged the creation of two files in C:\Espionage: a client database file and a Base64-encoded copy, created approximately 20 seconds apart. Shortly afterward, an outbound HTTP POST request was observed transmitting the encoded file to an external host. Both files were deleted within minutes of exfiltration in an apparent attempt to conceal the activity.</p><p>Analysis of the FIM alerts reconstructed a complete timeline of the incident, including exact timestamps, file hashes, and user context for each stage. The exfiltrated payload was recovered and decoded, confirming its contents matched the original client database file exactly. In response, a custom Wazuh detection rule (ID 100010, Level 10) was authored and deployed to flag .b64 file creation within C:\Espionage, mapped to MITRE ATT&amp;CK technique T1074.001 (Local Data Staging), and verified against a live test to ensure future occurrences are detected in real time.</p><p>This report documents all four stages of the incident — unauthorized access, data staging, exfiltration, and anti-forensic activity — and details the detection gap that allowed it to succeed undetected in real time, along with the remediation now in place. Full technical findings are presented in the sections that follow, structured according to NIST SP 800–61 incident response phases.</p><p><strong>Initial Detection</strong></p><p>The incident was first identified through Wazuh File Integrity Monitoring (FIM) alerts on the C:\Espionage directory, configured to monitor for unauthorized file activity on the Windows endpoint (agent 010, 192.168.202.133). Two file creation events were logged within 21 seconds of each other, indicating the staging of a sensitive file followed immediately by an encoded copy — a pattern consistent with data preparation for exfiltration.</p><p><strong>Timeline of Events</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*y2vRhO2yBgKv0DP16tylYA.png" /></figure><p><strong>Data Staging and Obfuscation</strong></p><p>File client_database.txt was created first, containing what analysis confirmed to be client account credentials. Approximately 20 seconds later, an encoded copy (system_cache.b64) appeared in the same directory, consistent with use of a living-off-the-land binary such as certutil.exe to Base64-encode the file — a technique that avoids triggering signature-based antivirus detection while remaining simple to reverse. This maps to <strong>T1027 (Obfuscated Files or Information)</strong> and <strong>T1074.001 (Local Data Staging)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*yYSNK14gcPTCNFiTtUbjRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*oC0winUVoMOiu8L70SUVQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*UlhwhfWw_KjMPIMkSVKqqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*eOnGb8TFRMw5qpZUsKaNKA.png" /></figure><p><strong>Exfiltration</strong></p><p>Network evidence showed an outbound HTTP POST request from the endpoint to an external host shortly after the encoded file was created, consistent with <strong>T1048 (Exfiltration Over Alternative Protocol)</strong>. No corresponding FIM event exists for this step, since the transmission did not create, modify, or delete any file on disk — FIM alone cannot detect data leaving the network layer, which represents a visibility gap addressed further in the Post-Incident Activity section.</p><p><strong>Payload Recovery</strong></p><p>The captured payload was decoded using CyberChef’s “From Base64” operation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*8daKrDODF7aALEGGajvrRg.png" /></figure><p>This confirms the exfiltrated content matched the original file exactly, establishing that sensitive client credential data left the environment intact.</p><p><strong>Anti-Forensic Activity</strong></p><p>Both files were deleted 46 milliseconds apart at 15:05:36, consistent with a single wildcard deletion command rather than two manual actions. This maps to <strong>T1070.004 (Indicator Removal: File Deletion)</strong> and <strong>T1485 (Data Destruction)</strong>. Despite deletion, cryptographic hashes (SHA-1, SHA-256) and full file metadata captured by FIM at creation time survived independently of the files themselves, preserving the evidence chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*UfNMAtfe4LwPbGl6hrJ1XA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*kuIMslYGYMit3K_TAlNO2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*3OgX5eo3WFckdeCPxyDrSA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*kWuZ0nhIXJzvRkHQ5083rw.png" /></figure><p><strong>Containment, Eradication &amp; Recovery</strong></p><p><strong>Containment</strong></p><p>Once I confirmed the endpoint had transmitted sensitive data to an external host, I identified the following as immediate containment steps:</p><ul><li>Isolate the affected endpoint (agent 010, 192.168.202.133) from the network to stop any further data loss, while keeping the system intact for forensic review.</li><li>Block outbound traffic to the destination host and port I identified in the exfiltration event, at the firewall or proxy level.</li><li>Disable or suspend the user account involved, since this activity was consistent with misuse of legitimate access rather than an external compromise.</li><li>Preserve the Wazuh FIM alert data, file hashes, and any available network logs as evidence, making sure nothing gets altered before I review it further.</li></ul><p><strong>Eradication</strong></p><ul><li>Check for any additional copies of the exfiltrated file, encoded artifacts, or tooling used to automate the staging/exfiltration process, on this endpoint or elsewhere on the network.</li><li>Review the endpoint more broadly for persistence mechanisms or other indicators of compromise beyond what I captured in this timeline, since insider activity like this is often not an isolated action.</li><li>Treat the credentials contained in the exfiltrated file — the client account details in client_database.txt — as compromised, and rotate them immediately.</li></ul><p><strong>Recovery</strong></p><ul><li>Restore the endpoint’s network access only once I’ve confirmed there’s no further malicious activity or residual risk.</li><li>Roll out my custom Wazuh detection rule (ID 100010) across other relevant endpoints, not just this one, so the same staging pattern gets caught in real time if it happens again.</li><li>Keep the affected user account and endpoint under closer monitoring for a defined period after reinstatement, given the insider nature of this incident.</li></ul><p><strong>Post-Incident Activity</strong></p><p><strong>Detection Gap and Remediation</strong></p><p>Before this incident, my environment had no mechanism to flag the specific behavior that made this attack possible: encoding a file for exfiltration inside C:\Espionage. FIM was already capturing file creation and deletion events, but nothing distinguished routine file activity from the specific pattern of a .b64 file appearing in that directory — which is exactly the kind of low-noise, easily-missed signal an insider would rely on.</p><p>To close that gap, I wrote a custom Wazuh rule (ID 100010, Level 10) that fires specifically on .b64 file creation within C:\Espionage, layered on top of the existing FIM rule (554) already covering that directory. I mapped it to MITRE ATT&amp;CK technique T1074.001 (Local Data Staging), and verified it by recreating the same file-creation step from the original incident — the rule fired correctly, at the right severity, with the MITRE tag resolving as expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*2iojOG24_uWUqrGCcfW8iQ.png" /></figure><p><strong>What it detects:</strong> Any .b64 file created inside C:\Espionage. It layers on top of Wazuh&#39;s default FIM rule (554), narrowing a broad &quot;file created&quot; signal down to one specific pattern — a Base64-encoded file appearing where it has no legitimate reason to exist.</p><p><strong>Why Level 10:</strong> A .b64 file in this directory isn&#39;t routine activity; encoding a file is a known technique for evading content-based detection ahead of exfiltration. That warrants a higher-priority alert than default file creation events (Level 5), so it stands out to an analyst instead of getting lost in normal FIM noise.</p><p><strong>Improvement over the default ruleset:</strong> Rule 554 alone can’t distinguish a harmless file from a staged exfiltration artifact — every file in the directory triggers it at the same low severity. This rule adds that distinction, and maps it directly to MITRE T1074.001, so the alert is both higher-priority and immediately actionable, without an analyst having to manually connect it to a technique.</p><p><strong>Lessons Learned</strong></p><p>A few things stood out to me working through this end to end:</p><ul><li><strong>FIM has a blind spot at the network layer.</strong> I could see the file get created, encoded, and deleted, but the exfiltration step itself — the actual data leaving the network — left no FIM trace at all. Without network packet capture, proxy/DLP logging, or PowerShell script block logging in place, I would only have been able to prove that exfiltration happened, not what was actually taken. That’s a real gap I’d want closed in a production environment.</li><li><strong>Deletion doesn’t erase the evidence.</strong> Even after both files were removed from disk, I still had their full SHA-1 and SHA-256 hashes and metadata from the moment they were created. That’s what let me confirm exactly what was staged, even after the attacker tried to cover their tracks.</li><li><strong>User context in FIM has limits.</strong> The syscheck.uname_after field gave me file ownership (Administrators), not the actual logged-in user who performed the action. In a real investigation, I&#39;d want to pair FIM with Windows Security auditing or EDR telemetry to get a reliable link between an event and the specific user account behind it.</li><li><strong>Detection engineering closes gaps, but only after they’re found.</strong> My custom rule now catches this exact pattern going forward, but it only exists because I already knew what to look for from investigating this incident. It’s a reminder that detection coverage is built reactively as often as proactively, and that gap analysis after an incident is where a lot of the real value is.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=027e4422f8e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Malware Analysis and Incident response]]></title>
            <link>https://medium.com/@olaniyiseyi02/malware-analysis-and-incident-response-51e073e37eb0?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/51e073e37eb0</guid>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 17:56:39 GMT</pubDate>
            <atom:updated>2026-08-09T17:56:39.060Z</atom:updated>
            <content:encoded><![CDATA[<p>During this week’s malware analysis exercise, I obtained two malware samples from the theZoo repository and stored them in a dedicated directory. To ensure proper containment, I configured the directory permissions to restrict access to the owner only. In a real-world environment, this practice prevents the malware from spreading to or being accessed by other users or groups on the system. The two samples selected for analysis were a ransomware variant — WannaCry — and an infostealer — Zeus — chosen deliberately to represent two distinct malware categories.</p><p>I selected WannaCry and Zeus deliberately to cover two distinct malware categories. WannaCry represents ransomware and is extensively documented, making it easy to verify my findings against existing research. Zeus represents an infostealer, targeting credential theft rather than encryption. This pairing ensures the analysis covers two fundamentally different attack behaviors and indicator profiles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*TAJkHoUB4bWvExi7ye4hEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*6E_igeAA69l-hf8Sr7Lnsw.png" /></figure><p>Both malware samples were downloaded directly from the theZoo repository using curl and extracted using the standard repository password <strong>“infected”</strong>. Upon extraction, the following files were revealed:</p><ul><li><strong>WannaCry:</strong> ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa.exe — a 3.5MB Windows executable</li><li><strong>Zeus:</strong> invoice_2318362983713_823931342io.pdf.exe — a 247KB Windows executable disguised with a double extension to appear as a legitimate PDF invoice</li></ul><p>An immediate observation worth noting is that the Zeus sample revealed its social engineering intent through its filename alone — before any formal analysis had even begun. The use of a .pdf.exe double extension is a well known technique designed to trick users into believing they are opening a document rather than executing a program.</p><p>Immediately after extraction, both samples were hashed using SHA256 and MD5 before any analysis began. Hashing at this stage is critical — it establishes a verified fingerprint of each sample, ensuring the files have not been tampered with and providing reliable identifiers for cross-referencing against threat intelligence databases such as VirusTotal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*Wp5y89Ijxp58AEDoiDnYIg.png" /></figure><p>The following hashes were recorded:</p><p><strong>WannaCry:</strong></p><ul><li>SHA256: ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa</li><li>MD5: 84c82835a5d21bbcf75a61706d8ab549</li></ul><p><strong>Zeus (ZeroAccess):</strong></p><ul><li>SHA256: 69e966e730557fde8fd84317cdef1ece00a8bb3470c0b58f3231e170168af169</li><li>MD5: ea039a854d20d7734c5add48f1a51c34</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*wV06NKphFlflXPuCSz95mg.png" /></figure><p>Prior to any analysis, the Kali VM was airgapped by disabling the NAT network adapter in VMware settings, completely isolating it from internet connectivity. This is a critical containment step — executing or analysing malware on a network-connected machine risks the samples communicating with live C2 infrastructure, spreading across the network, or exfiltrating data.</p><p>To confirm the airgap was successful, connectivity tests were performed inside the VM:</p><pre>ping -c 2 google.com<br>curl -v https://google.com</pre><p>Both commands failed with <strong>“Temporary failure in name resolution”</strong> and <strong>“Could not resolve host”</strong> respectively — confirming the machine had no internet access and was fully isolated before analysis began.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*3jM-BZ8VntQj_BTxNrVbXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R7mdEYMFq5pYpXj4LWc_xw.png" /></figure><p>With the VM fully airgapped, the malware executables were set to read-only permissions to prevent accidental execution during static analysis. This is an important safety measure — static analysis requires only reading the file, never running it. Restricting the files to read-only ensures that no accidental double-click or mistyped command can detonate the malware outside of a controlled environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*4Qe59JEAlP4AkeIPBITawg.png" /></figure><p>The 444 permission setting translates to read-only access for the owner, group, and all other users — removing all write and execute permissions entirely. In a real-world malware analysis lab, this step is standard practice and forms part of the containment checklist before any examination of a live sample begins.</p><p>Before proceeding to static analysis, a baseline network capture was performed on the host-only network interface using tcpdump. The purpose of a baseline capture is to record normal system network activity before any malware interaction, establishing a clean reference point. When compared against post-execution network traffic captured during dynamic analysis, the baseline makes it straightforward to identify any new or suspicious connections introduced by the malware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*dMKKdzHhiihDXDo4DYgdtQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*IZRqF3NYPHXYWWbbNLdMhg.png" /></figure><p>The baseline capture was conducted with the system fully airgapped and pfSense powered off to prevent any internet connectivity. As a result, eth0 showed no organic traffic, so local activity (ping to loopback, ARP query, and an interface down/up cycle) was manually generated to produce a representative baseline capture (97 packets).</p><p>The capture reflects normal isolated system activity with no external network communication present — confirming a clean pre-analysis environment prior to malware execution.</p><p>Malware analysis is broadly divided into two approaches — static analysis and dynamic analysis.</p><p><strong>Static analysis</strong> involves examining a malware sample without executing it. This approach is safe, reversible, and forms the foundation of any malware investigation. It allows an analyst to gather information about the file’s structure, metadata, embedded content, and indicators of compromise without triggering any malicious behaviour.</p><p><strong>Dynamic analysis</strong> involves executing the malware in a controlled sandbox environment and observing its behaviour in real time — including network connections, file system changes, registry modifications, and process activity. This approach reveals what the malware actually does when it runs, uncovering indicators that static analysis alone cannot expose.</p><p>For this investigation, static analysis was performed first using a combination of tools, before proceeding to dynamic analysis via the ANY.RUN sandbox.</p><p><strong>Tool 1: file command</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gAWd3IFXxvivGFpnf51U9g.png" /></figure><p>Key Observations</p><p><strong>WannaCry:</strong></p><ul><li>Targets <strong>Windows 4.00</strong> — deliberately broad compatibility to infect as many systems as possible</li><li>Only <strong>4 sections</strong> — relatively simple structure</li></ul><p><strong>Zeus:</strong></p><ul><li>Targets <strong>Windows XP (5.01)</strong> — common corporate/banking environment target</li><li><strong>6 sections</strong> — more complex structure than WannaCry</li><li><strong>Disguised as invoice PDF</strong> — classic social engineering to trick victims into opening it</li></ul><p><strong>Tool 2: exiftool</strong></p><p>The second tool used was exiftool. Exiftool reads metadata embedded in the binary such as the compilation timestamp, original filename, linker version, language settings, and code signing information. This metadata is embedded by the compiler at build time and can reveal useful information about the malware’s origin and development environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vZTTLC-lpwMXdb2NHUxDRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VyaUzDdmukw-J_C5i-_lOQ.png" /></figure><p><strong>WannaCry:</strong></p><ul><li>File size of 3.5 MB suggests embedded payloads packed within the binary</li><li>Compilation timestamp of 2010:11:20 predates the 2017 attack by seven years, indicating either extended development or deliberate timestamp falsification</li><li>Company name falsified as <strong>Microsoft Corporation</strong> to impersonate a trusted vendor</li><li>Internal name and original filename both set to <strong>diskpart.exe</strong>, disguising the malware as a legitimate Windows disk management tool</li><li>Object file type reveals a <strong>Dynamic Link Library</strong> despite presenting as a standalone executable</li><li>File version 6.1.7601.17514 confirms targeting of <strong>Windows 7 SP1</strong> specifically</li><li>The falsified vendor name, internal filename, and file description form a coordinated masquerading strategy to evade detection</li></ul><p><strong>Zeus:</strong></p><ul><li>Compact file size of 253 KB compared to WannaCry</li><li>Compilation timestamp of 2013:11:25 falls within Zeus’s known active period, suggesting no tampering</li><li>Filename invoice_...pdf.exe exploits user trust in financial documents</li><li>OS version 5.1 confirms targeting of <strong>Windows XP</strong>, common in banking environments at the time</li><li>Built using Visual Studio 2010 (Linker Version 10.0)</li><li>Unlike WannaCry, Zeus carried no falsified metadata — deception was purely at the filename level</li></ul><p><strong>Tool 3: binwalk</strong></p><p>The next tool adopted for this analysis was binwalk. Binwalk scans the binary for embedded file signatures — packers and droppers commonly contain compressed or encrypted secondary executables hidden inside the outer file, and binwalk finds those embedded payloads and can extract them. This makes it particularly valuable for identifying whether a sample is self-contained or carries additional components that deploy during execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TP4MK6TJ4tbSMPtQkM9G0Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hsZAmeDecyAMKUFgC7DJPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wPQQAbWxrcEPVRSLCB84-g.png" /></figure><p><strong>WannaCry:</strong></p><ul><li>Binwalk revealed WannaCry is a fully self-contained ransomware toolkit with an entire encrypted ZIP archive packed inside the binary</li><li>AES S-Box and AES Inverse S-Box found within the binary confirms native AES encryption implementation for locking victim files</li><li>Key embedded components discovered:</li><li>b.wnry — ransom wallpaper displayed on victim&#39;s desktop</li><li>c.wnry — configuration file containing C2 server addresses</li><li>r.wnry — ransom note displayed to victims</li><li>s.wnry — 3MB core encryption engine</li><li>t.wnry — embedded Tor client for anonymous C2 communication</li><li>u.wnry — decryption tool shown to victims who pay</li><li>taskdl.exe — deletes temp files to cover tracks</li><li>taskse.exe — spreads ransomware across the network</li><li>Ransom notes in <strong>28 languages</strong> confirm WannaCry was deliberately engineered for a global attack</li><li>Requires no external downloads — everything needed to execute the full attack is packed into one file</li></ul><p><strong>Zeus:</strong></p><ul><li>Internal structure is significantly simpler compared to WannaCry</li><li>An embedded <strong>StuffIt Deluxe Segment</strong> indicates compressed or obfuscated data designed to hinder static analysis</li><li>An embedded <strong>XML document</strong> likely contains C2 server configuration and bot settings — consistent with Zeus’s known behaviour of storing remote configuration within the binary</li></ul><p><strong>Tool 4: strings</strong></p><p>The next tool used was strings, run against both samples in two modes — ASCII and 16-bit little-endian Unicode. Both modes are necessary because Windows malware commonly hides readable content such as URLs, registry keys, and commands in Unicode, which an ASCII-only scan would miss entirely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*3Qufqkgk9yk0WhjlzddB_A.png" /></figure><p>From each strings output, the results were searched for indicators of compromise including IP addresses, domain names, URLs, registry keys, and anything resembling a command, password, or credential. These indicators form the foundation of the static IOC list and provide early intelligence about the malware’s intended behaviour and network infrastructure before any execution takes place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*EaVLJKGKugB_s5bMxWFs_Q.png" /></figure><p><strong>WannaCry:</strong></p><ul><li>Unicode string extraction returned no readable URLs, IP addresses, or registry keys</li><li>This is consistent with the binwalk findings — WannaCry’s payload is stored inside an encrypted ZIP archive embedded within the binary, meaning all meaningful strings are locked and only become readable when the malware decrypts and loads them into memory at runtime</li><li>The absence of readable strings in static analysis is itself a significant finding, confirming that WannaCry employs runtime decryption as an anti-analysis technique to evade static detection tools</li></ul><p><strong>Zeus:</strong></p><ul><li>URL and IP address extraction returned no results, consistent with the obfuscated StuffIt segment identified during binwalk analysis</li><li>However, a partial registry path <strong>Software\</strong> was recovered from the unicode strings output</li><li>While incomplete, this fragment is significant — Zeus is well documented to interact with the Windows registry for persistence and credential harvesting, and this finding provides early static evidence of registry activity that will be confirmed during dynamic analysis</li><li>The limited string output overall suggests Zeus also employs obfuscation to conceal its configuration and behaviour from static analysis tools</li></ul><p>The ASCII strings output was then searched for indicators of compromise using grep, targeting URLs, domain names, IP addresses, registry keys, and suspicious commands. While WannaCry returned minimal readable content due to its heavily encrypted payload, Zeus revealed two notable findings — the domain <strong>corect.com</strong>, a known ZeroAccess C2 domain, and an <strong>hKey registry fragment</strong>, confirming early static evidence of registry interaction consistent with persistence or credential harvesting behaviour.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*0NDtKXhK-lo0ruQVCZ72wg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*IaM7096TZeM7ZktWrl1xeA.png" /></figure><p><strong>WannaCry:</strong></p><ul><li>The only readable string recovered was a reference to Microsoft.Windows.Common-Controls, further confirming the fake Microsoft branding identified during exiftool analysis</li><li>Registry extraction returned a large wall of obfuscated encrypted text rather than clean readable keys, confirming WannaCry aggressively obfuscates its internal strings</li><li>No IP addresses or C2 domains were recoverable, consistent with all network indicators being locked inside the encrypted ZIP archive identified during binwalk</li><li>WannaCry’s near-complete resistance to string extraction is deliberate — forcing analysts toward dynamic analysis to uncover its true behaviour</li></ul><p><strong>Zeus:</strong></p><ul><li>URL extraction recovered <strong>corect.com</strong> — a domain historically associated with C2 infrastructure and the first significant network IOC of this investigation</li><li>Registry extraction returned an <strong>hKey</strong> fragment, confirming Zeus interacts with the Windows registry for credential harvesting or persistence</li><li>IP address extraction returned 6.0.0.0 which appears to be a version string rather than an active network indicator</li></ul><p>The final stage of static analysis involved searching both sample hashes against the VirusTotal database. Rather than uploading the files directly, the SHA256 hashes were searched — this approach is safer as it avoids submitting live malware samples to an external platform while still retrieving full detection and behavioral intelligence from VirusTotal’s database.</p><p><strong>WannaCry:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e6VLbS7uBGban8ClOrb6bg.png" /></figure><p><strong>Detection:</strong></p><ul><li><strong>66 out of 71</strong> security vendors flagged the sample as malicious</li><li>Community score of <strong>-2990</strong> — universally recognised as dangerous</li><li>Popular threat label: <strong>ransomware.wannacry/wannacryptor</strong></li><li>Threat categories: <strong>Ransomware, Trojan, Worm</strong> — confirming its multi-functional nature</li><li>Family labels: wannacry, wannacryptor, wanna</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*og-9OTb8u2y8cdMr-3yPgg.png" /></figure><p><strong>Details Tab:</strong></p><ul><li>Creation timestamp confirmed as <strong>2010–11–20</strong> — consistent with exiftool findings</li><li>First seen in the wild: <strong>2013–05–04</strong> — three years before the 2017 outbreak</li><li>First submission to VirusTotal: <strong>2017–05–12</strong> — the day of the global attack</li><li>Known under multiple names including diskpart.exe, WannaCry.EXE, and WannaCrypt0r.exe — confirming the masquerading behaviour identified during static analysis</li><li>DetectItEasy confirmed an <strong>encrypted ZIP archive with 36 files</strong> packed inside — consistent with binwalk findings</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wIhjEHJZMwofysa6xbzGTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gSSP-k9PmHMhHAayxOtGFg.png" /></figure><p><strong>Relations Tab:</strong></p><ul><li>Contacted <strong>180 IP addresses</strong> across multiple countries including US, Germany, Denmark, France and India</li><li>Notable flagged IPs: 128.31.0.39 (8/91 detections) and 131.188.40.189 (9/91 detections)</li><li>Contacted <strong>39 domains</strong> primarily reverse DNS lookups confirming active network scanning behaviour</li><li><strong>3 URLs contacted</strong> including http://x1.c.lencr.org/ — associated with certificate validation</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fMc6S4Wrn4bIPcbLfQ3yNw.png" /></figure><p><strong>Behavior Tab:</strong></p><ul><li>Multiple sandbox environments analysed the sample including CAPE Sandbox, Microsoft Sysinternals, and Dr.Web vxCube</li><li>CAPE Sandbox identified <strong>10 malicious behaviors</strong> and <strong>7 network indicators</strong></li><li>Microsoft Sysinternals recorded <strong>99+ suspicious signals</strong> confirming extremely aggressive system activity</li></ul><p><strong>Zeus:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-sHN1inK3h0bDfxuXZ7aqw.png" /></figure><p><strong>Detection:</strong></p><ul><li><strong>64 out of 71</strong> security vendors flagged the sample as malicious</li><li>Community score of <strong>-433</strong></li><li>Popular threat label: <strong>trojan.zaccess/sirefef</strong></li><li>Threat categories: <strong>Trojan, Dropper, PUA</strong></li><li>Family labels: zaccess, sirefef, wldcr</li><li>Notable vendor detections include CrowdStrike Falcon at <strong>100% malicious confidence</strong> and Cynet at <strong>malicious score 99</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cMSgw54iUFqpu_HScc6z6w.png" /></figure><p><strong>Details Tab:</strong></p><ul><li>Creation timestamp: <strong>2013–11–25</strong> — consistent with exiftool findings and known Zeus activity period</li><li>First seen in the wild: <strong>2019–07–10</strong> — suggesting the sample circulated privately before public discovery</li><li>First submission to VirusTotal: <strong>2013–11–25</strong> — same day as compilation, indicating rapid detection</li><li>Built with <strong>Microsoft Visual C++ 16.00</strong> and <strong>Visual Studio 2010</strong> — consistent with linker version identified during exiftool analysis</li><li>DetectItEasy confirmed <strong>PE32 executable</strong> with no packing detected</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vMxA3eSQqQPY2Zwzh9VdQ.png" /></figure><p><strong>Relations Tab:</strong></p><ul><li>Contacted <strong>362 IP addresses</strong> across Taiwan, South Korea, Japan, China, Pakistan and Bangladesh — indicating broad botnet scanning behaviour</li><li>Contacted <strong>204 domains</strong> — significantly more than WannaCry, consistent with Zeus’s known peer-to-peer botnet communication style</li><li>Two URLs contacted including a suspicious <strong>fake Adobe Flash Player update URL</strong> — fpdownload.macromedia.com/get/flashplayer/update/... — a classic Zeus delivery and persistence mechanism</li><li><strong>MaxMind GeoIP lookup</strong> contacted — Uses geolocation to profile victims and tailor behaviour based on location</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bgmwkIDEcmIuGH-nKhQAVw.png" /></figure><p><strong>Behavior Tab:</strong></p><ul><li>Multiple sandbox environments analysed the sample including Microsoft Sysinternals, Dr.Web vxCube, and Zenbox</li><li>Activity summary revealed <strong>5 malware detections, 2 trojans, and 1 evader</strong></li><li><strong>1 HIGH severity IDS rule</strong> triggered — confirming detectable malicious network activity</li><li>Dropped files include <strong>1 PE DLL, 1 PE EXE, 236 other files, and 1 text file</strong> — confirming Zeus drops multiple components on execution</li><li>Network communications recorded: <strong>2 HTTP, 223 DNS, 331 IP connections</strong> — extremely high DNS activity consistent with Zeus’s domain generation and botnet peer discovery behaviour</li><li><strong>11 LOW and 35 INFO MITRE signatures</strong> mapped — confirming broad ATT&amp;CK technique coverage</li></ul><p><strong>Key Observation: </strong><em>Following static analysis, VirusTotal and behavioral tags revealed that the sample labelled ZeusBankingVersion_26Nov2013 is not the Zeus Banking Trojan as initially assumed, but rather </em><strong><em>ZeroAccess (Sirefef)</em></strong><em> — a rootkit and botnet focused on click fraud and cryptocurrency mining.</em></p><p><em>This highlights a critical lesson — filenames and repository labels should never be trusted at face value, and accurate identification must always be based on actual analysis results.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*lCOGbMr8WRbNLB2jw02xhw.png" /></figure><p>Following the completion of all static analysis tools, the findings from strings, binwalk, exiftool, and VirusTotal were consolidated into an initial IOC list. This list captures every indicator of compromise identified across both samples during static analysis — including file hashes, fake metadata, embedded components, C2 domains, registry fragments, and suspicious filenames.</p><p>This IOC list serves as the static intelligence baseline for the investigation. It will be expanded during dynamic analysis as additional indicators are uncovered through live execution in the ANY.RUN sandbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*ky9VqQdof3TMiG7rf2zsVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*dekYwTAn-wB9gk6FIee0pQ.png" /></figure><p><strong>Dynamic analysis</strong></p><p>Dynamic analysis involves running the sample in a controlled environment and observing its behavior in real time, rather than just inspecting it statically. For this stage, I re-enabled the NAT adapter to restore internet connectivity, then used ANY.RUN to carry out the analysis. The first sample analyzed was the WannaCry file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*lTRNfplm2zPUleZhR4SceQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*uGJQ0TgWomI7mJZrKvHJaA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KRBJoWfuNIxmEBMAFCqpyA.png" /></figure><p>Once the ransomware sample was executed, its behavior was monitored throughout the run. Shortly after execution, a ransom note was displayed on the desktop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V2REf5fAUgV3KasB4r4exw.png" /></figure><p>While the file was running, several notable indicators were observed: DNS requests being made, outbound connections to source IPs across multiple geographic locations, a flagged network threat, and a number of processes spawned by the sample.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*OHv0etEITpeIHhbi6KKgqw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*FnLR1NePOOxwN0YyeeUweQ.png" /><figcaption>Connection requests</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*ogwezqGlQ59mlZm70sHhkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*U2dvOKKR15ThBQrrqNm7wQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*Ser4sjz6PwGHp5MOQSzYOA.png" /><figcaption>Processes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*PBWUjpbKgIfLsr1Ef2ofNw.png" /><figcaption>DNS Requests</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*qF_WvNEyAkZpbw-fiOG_yw.png" /><figcaption>Network Threats</figcaption></figure><p>Once execution completed, new files had also been dropped onto the desktop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*4RVzhLy3A3CRHpsEB1mYhg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*yLkOtDsD4_8ZfwOCSiZl0A.png" /></figure><p><strong>Sample details</strong><br> File name: ed01ebfb...41aa.exe<br> SHA256 hash: ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa<br> PID: 2224<br> This is WannaCry ransomware detonating in a sandbox. Everything below is what it did, step by step.</p><p><strong>Step 1 — Clearing the way for encryption</strong><br> Before locking any files, the malware makes sure nothing can get in its way:</p><ul><li>Hides its dropped files (attrib +h) so they&#39;re not easily visible</li><li>Gives “Everyone” full permission over every file (icacls) so it can encrypt files even if normal permissions would otherwise block it</li><li>Runs taskdl.exe, a helper tool WannaCry uses to clean up temporary files after encryption is done</li></ul><p><strong>Step 2 — Displaying the ransom note</strong><br> A batch file and a VBScript run one after another — this is how WannaCry sets up the ransom note as the desktop wallpaper and creates shortcuts. It then launches @WanaDecryptor@.exe, which is the actual popup window victims see, demanding payment.</p><p><strong>Step 3 — Destroying the ability to recover</strong><br> This is the most damaging part. The malware runs a series of commands to make sure the victim can’t just restore their files from a backup:</p><ul><li>Deletes Windows’ built-in file history/shadow copies (vssadmin, WMIC shadowcopy delete) — this is what the &quot;Previous Versions&quot; restore feature normally relies on</li><li>Tells Windows to ignore boot failures and disables Startup Repair (bcdedit)</li><li>Deletes the Windows Server backup catalog (wbadmin)</li></ul><p>Put together, these actions wipe out shadow copies, disable automatic repair, and delete the backup catalog — making recovery extremely difficult without an external backup.</p><p><strong>Step 4 — Reaching out to the internet</strong></p><ul><li>Some background network noise (NetBIOS/LLMNR broadcasts) — this is normal Windows behavior, not malicious on its own</li><li>A lookup to google.com — likely just a check to confirm internet access</li><li>The real concern: a process called taskhsvc.exe connects to three different countries using ports that include 9001 — a port strongly associated with <strong>Tor</strong>, which WannaCry is known to use to contact its operators anonymously</li><li>The sandbox’s own threat detector flagged this traffic as matching known malware/malspam infrastructure</li></ul><p>After the analysis concluded, the PCAP file and the full analysis report were downloaded for further review.</p><p>Public link share: <a href="https://app.any.run/tasks/318c5e03-35d9-40f7-90f7-f3873c788dad">https://app.any.run/tasks/318c5e03-35d9-40f7-90f7-f3873c788dad</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9PbH7ur8d-IoaDkrYG9HA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pDvkwWQalzc_gEYRdGBXmw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JWCUDG-UsBoXEtDIFSpXKw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UE67Y43yZtUtWLOP3MWnAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LBzszt3hpTxgTyMc-AKUzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kaxTycFxzCQS7SpvHBtj7g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ixPYgSOQsUt9d_udOFfkKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tcUAIl1JuQSSDJAqMBWU5w.png" /></figure><p><strong>Bottom line</strong><br> This sample follows WannaCry’s typical playbook: remove permission barriers → encrypt files and drop a ransom note → destroy every recovery option → communicate with its operators over Tor. The shadow-copy deletion and backup destruction commands stand out as the strongest, most specific signals for building a detection rule, since legitimate software rarely runs all of them together in sequence.</p><p>The next sample analyzed was ZeroAccess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nzgz1ivbagLGwYCzDrZUYg.png" /></figure><p>Once the malware began running, it dropped and installed a fake Flash Player component as part of its execution. In total, the run generated 5 processes, 2 HTTP requests, 71 established connections, 2 DNS requests, and 16 flagged network threats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*lDWvQQplphfuQeA-Gr1Lxw.png" /><figcaption>Processes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*wSWNE3pSXIs938Ed1rUwXw.png" /><figcaption>Http request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*29GELA83vCIOQt86-Yd_3Q.png" /><figcaption>Connections</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*oK6MH_wdOcKIGFJIoC4RMg.png" /><figcaption>DNS Requests</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*sY-iYOiGvt_0Vm_2U3Zy8w.png" /><figcaption>Network Threats</figcaption></figure><p><strong>Sample details</strong><br> File name: invoice_23183629837..._pdf.exe<br> MD5: EA039A854D20D7734C5ADD48F1A51C34</p><p>It&#39;s disguised as a PDF invoice but is actually an executable. Tested on Windows 7 32-bit.</p><p><strong>Step 1 — The disguise</strong><br> The file is named to look like a harmless invoice PDF, but it’s really an .exe. Once run, it silently installs a fake program called InstallFlashPlayer.exe and pops up a fake error message saying the Flash installer failed — this is meant to make the victim think nothing malicious happened, just a failed download.</p><p><strong>Step 2 — Hiding inside trusted processes</strong><br> The malware creates two child processes — InstallFlashPlayer.exe and cmd.exe. More importantly, it also injects itself into explorer.exe, a core, trusted Windows process. This is a classic ZeroAccess move: instead of running as its own obvious process, it hides inside a process the system (and antivirus) already trusts, making it much harder to spot and remove.</p><p><strong>Step 3 — Fake “legitimate” network activity</strong><br> The malware reaches out to two addresses — fpdownload.macromedia.com (a real Adobe update server) and a MaxMind IP-lookup service — but both requests come back as 404 errors. These aren&#39;t real update checks; they&#39;re just cover traffic to reinforce the &quot;Flash installer failed&quot; story, and possibly to figure out the victim&#39;s location.</p><p><strong>Step 4 — The real threat: peer-to-peer communication</strong><br> This is the most important finding. The infected services.exe process starts sending small data packets over UDP port 16471 to many different IP addresses around the world (US, Taiwan, Slovenia, Singapore, and more) — not domain names, just raw IPs.</p><p>This is how ZeroAccess talks to its command-and-control(C2) network. Instead of relying on one central server (which security teams could simply block), it spreads communication across many infected machines. That makes the whole network much harder to shut down.</p><p><strong>Confirmed by detection tools:</strong></p><ul><li>16 separate network threat alerts fired, almost all reading: <strong>“ET MALWARE ZeroAccess UDP traffic detected”</strong></li><li>Both InstallFlashPlayer.exe and the infected services.exe were flagged as malicious</li></ul><p>After the analysis concluded, the PCAP file and the full analysis report were downloaded for further review.</p><p>Public link share: <a href="https://app.any.run/tasks/9d51dc32-60ae-4fc0-8a37-4105f11d2856">https://app.any.run/tasks/9d51dc32-60ae-4fc0-8a37-4105f11d2856</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wK9Q2a8wPGWxUuSZajcTIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjK-X9hOKG4Gh0o4Y0AECw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_QCjBF4fqu5ePynF0SrVA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9SSs5G29sAIHtTjfK52Pkw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OOsootN2b9zC9Lv6QZ7VMQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yq5v3sgz4ng1xL5VYXrCbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AWo_PMmoyuw3EwctzilNvQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bCk4eCG4RDc_TRmFo9KkbQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yj7JQ-heZIoLuTIBnIWa6Q.png" /></figure><p><strong>Bottom line</strong><br> This sample follows ZeroAccess’s typical playbook: disguise itself as a routine download (a fake invoice, then a fake Flash installer) → inject into a trusted system process (explorer.exe) to hide and persist → generate decoy network traffic to look legitimate → establish a peer-to-peer command-and-control channel over UDP port 16471, spreading communication across many external IPs instead of relying on one central server.</p><p>Once the ANY.RUN analysis was complete, the VM was air-gapped again, and the IOC list was updated to reflect the findings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*sthRVkFhOLC6GW8dcVQDmQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*DCsGVE-oTcCu1Id28LomZA.png" /></figure><p><strong>Detection Engineering and Incident Response</strong></p><p>Since Suricata wasn’t running live during the ANY.RUN sandbox analysis, it couldn’t capture any of the malware’s network traffic in real time. To work around this, I replayed the PCAP files I’d downloaded from ANY.RUN through Suricata offline. Before doing so, I created a separate log directory for each sample, so their output would be saved independently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*8fP2zSzt01khrtqKJcRGdQ.png" /></figure><p>Suricata read the WannaCry PCAP (167 packets, 15629 bytes), started its engine, processed everything, and stopped cleanly. The one warning (rule 1000003, SYN-only to port 1513) is just a default rule quirk about direction, not an error.</p><p>To check what was logged</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*J6pFjxmY_mDfg_bQ3PnVTA.png" /></figure><p><strong>What this is:</strong> Every single alert here is signature 1:2200121, &quot;SURICATA Ethertype unknown&quot; — and the raw packet bytes (01:80:C2:00:00:00 destination, FE:E7:CC:7F source pattern repeating) are actually <strong>STP (Spanning Tree Protocol) BPDU frames</strong> — a Layer 2 network management protocol switches use to prevent loops. This is background network noise, not malware traffic.</p><p><strong>What this means for the analysis:</strong> The default Suricata ruleset did <strong>not</strong> fire on any of the actual WannaCry-relevant traffic — no alert on the Tor C2 connections (ports 9001/9101/443), no alert on the SMB/ransomware behavior. It only flagged unrelated protocol chatter that happened to be present in the capture.</p><p>This is exactly a gap between custom rule and default rule worth documenting: <strong>the default ruleset missed the malicious traffic entirely</strong>, which is precisely the justification for writing custom rules targeting the specific observed IOCs (the Tor-associated C2 IPs/ports) rather than relying on generic signatures.</p><p>I also checked what was logged in the eve.json file. To make the output more readable, I piped it into jq for proper formatting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*4w_EriEjVmmx53cTEALNgA.png" /></figure><p>eve.json shows the exact same picture as fast.log: every alert is signature_id: 2200121 (&quot;SURICATA Ethertype unknown&quot; / STP noise), severity: 3 (low). No additional detail on anything WannaCry-relevant hiding underneath.</p><p>Next, I replayed the ZeroAccess PCAP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*RYu91QGKO9bvuSsjJznfeQ.png" /></figure><p>273 packets, 21853 bytes processed from the ZeroAccess PCAP. Same warning as before (harmless).</p><p>I checked what was logged in the fast.log file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*s3IBdg7USFg5RzBLIyzp5w.png" /></figure><p>Unlike the wannacry file,Two different signatures fired here, not just STP noise:</p><p><strong>Signature 2200121</strong> (STP background chatter) — same as WannaCry, not malware-related.</p><p><strong>Signature 2240007 — “SURICATA DNS Invalid opcode”</strong> — this one’s meaningful. It’s firing on traffic between 85.114.128.127:53 ANY.run host (192.168.100.10), and that IP is exactly the one flagged red/malicious in the ANY.RUN capture earlier (InstallFlashPlayer.exe repeatedly querying port 53 to that German-hosted IP). Suricata is essentially saying: <em>this traffic is claiming to be DNS, but it&#39;s malformed/non-standard DNS</em> — which is a strong signal of either C2 communication disguised as DNS, or a non-standard protocol tunneling over port 53 to evade detection. That&#39;s a very plausible malware behavior pattern (DNS tunneling/C2-over-53 is common).</p><p>Next, I checked what was logged in the eve.json file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*9_9ToXtyoksSHw8K_IRzjQ.png" /></figure><p>This confirmed and added detail to what I saw in fast.log — the JSON gave me the full 5-tuple for the DNS-anomaly alert:</p><ul><li><strong>src_ip</strong>: 85.114.128.127 (the flagged malicious IP from my ANY.RUN capture)</li><li><strong>src_port</strong>: 53 (masquerading as DNS)</li><li><strong>dest_ip</strong>: 192.168.100.10 (my sandbox host)</li><li><strong>dest_port</strong>: 52150 (a random high ephemeral port — the client side)</li><li><strong>proto</strong>: UDP</li><li><strong>signature</strong>: “SURICATA DNS Invalid opcode”, severity 3</li></ul><p>This was good evidence for my report — I now had the exact flow details, not just a log line. It confirmed that 85.114.128.127:53 sent malformed DNS-labeled traffic to my host, which lined up with what I saw in ANY.RUN (repeated queries from InstallFlashPlayer.exe to that same IP on port 53, flagged red).</p><p><strong>Custom Rules for Both Samples</strong></p><p>Based on the findings from my ANY.RUN analysis, I wrote four custom Suricata rules for the WannaCry sample, targeting its Tor-based command-and-control behavior and network reconnaissance:</p><ul><li><strong>Rule 1</strong> — Tor C2 communication (port 9001)</li><li><strong>Rule 2</strong> — Tor C2 communication (port 9101)</li><li><strong>Rule 3</strong> — Network threat detection</li><li><strong>Rule 4</strong> — DNS connectivity check</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MIatfHapdjVMoZxlLc0fZQ.png" /></figure><p>I reloaded the new rules</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h1KRDJ_7fshDUf5x0aVxrw.png" /></figure><p>For the ZeroAccess sample, I wrote six rules covering its peer-to-peer C2 traffic, decoy behavior, and infrastructure indicators:</p><ul><li><strong>Rule 5</strong> — ZeroAccess P2P UDP botnet traffic</li><li><strong>Rule 6</strong> — Fake Flash update DNS query</li><li><strong>Rule 7</strong> — GeoIP victim profiling</li><li><strong>Rule 8</strong> — Fake Flash HTTP download</li><li><strong>Rule 9</strong> — ZeroAccess C2 domain</li><li><strong>Rule 10</strong> — TCP fallback rule, in case of a direct connection</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ax-oEI4auCv9XTG1UtuSw.png" /></figure><p>I then proceeded to load the rule configurations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iONmz0FItHjEWfVVAS5vYA.png" /></figure><p>I replayed both pcap files and checked what suricata picks up</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G-nFkO0I3xDDuJ5G2WrevA.png" /></figure><p>Both replays ran cleanly with only my custom rules loaded (-S /etc/suricata/rules/local.rules) — same packet counts as before (273 for ZeroAccess, 167 for WannaCry), confirming nothing else interfered.</p><p>To check what was logged on the wannacry fast.log file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zMGHJQPWcNEf_Lup6bGgGA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ycdHvqX-ORet683HzKnipA.png" /></figure><p>My custom WannaCry rules fired and matched real traffic in isolation:</p><ul><li><strong>sid:9000001</strong> — “WannaCry Tor C2 Connection port 9001” — matched TCP traffic to 128.199.55.207:9001</li><li><strong>sid:9000002</strong> — “WannaCry Tor C2 Connection port 9101” — matched TCP traffic to 128.31.0.39:9101</li><li><strong>sid:9000003</strong> — “WannaCry HTTPS C2 Communication” — matched TCP traffic to 212.47.240.10:443 — fired three times, consistent with repeated outbound connection attempts</li><li><strong>sid:9000004</strong> — “WannaCry DNS Connectivity Check” — matched UDP DNS query confirming WannaCry’s pre-execution internet connectivity check</li></ul><p>Each alert maps directly to behaviour observed during the ANY.RUN dynamic analysis session, confirming that the rules are grounded in real malware traffic rather than generic signatures.</p><p>To check what was logged in the zeus fast.log file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H1vb_FxCQuu2k1SRIddGoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TbIgT8ynAyrJCOqWviIZHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Ac2cxKAyCOz7_7q0LUvvw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dOHuXzUWI48BImyTdWq4Fw.png" /></figure><p>The ZeroAccess PCAP replay produced even more significant results, with multiple custom rules firing across different traffic categories:</p><ul><li><strong>sid:9000004</strong> — “WannaCry DNS Connectivity Check” — fired on the ZeroAccess PCAP as well, confirming both samples perform a pre-execution internet connectivity check via DNS</li><li><strong>sid:9000005</strong> — “ZeroAccess P2P Botnet UDP Traffic port 16471” — fired repeatedly across dozens of unique IP addresses, confirming ZeroAccess’s aggressive peer-to-peer botnet scanning behaviour across multiple countries</li><li><strong>sid:9000006</strong> — “ZeroAccess Fake Flash Update DNS Query” — matched DNS query to fpdownload.macromedia.com, confirming the fake Adobe Flash update lure identified during static analysis</li><li><strong>sid:9000007</strong> — “ZeroAccess GeoIP Victim Profiling” — matched TCP connection to 49.13.77.253, confirming ZeroAccess profiles victim geolocation before proceeding</li><li><strong>sid:9000008</strong> — “ZeroAccess Fake Adobe Flash Download” — matched TCP connection to 23.197.141.14:80, confirming the HTTP download attempt of the fake Flash installer</li></ul><p>The volume of sid:9000005 alerts across dozens of unique destination IPs confirms ZeroAccess’s defining characteristic — aggressive peer-to-peer botnet communication scanning the internet for other infected nodes to recruit into its botnet network.</p><p><strong>Custom Wazuh Rules</strong></p><p>Since Suricata is a network-based detection system, it only picks up traffic that actually crosses the network. To cover what Suricata can’t see, my Wazuh rules had to be built around the host-based findings from my ANY.RUN dynamic analysis instead.</p><p><strong>WannaCry:</strong></p><ul><li>Spawned taskhsvc.exe — Tor client process</li><li>Connected to Tor relays on ports 9001 and 9101</li><li>Used taskse.exe for spreading</li></ul><p><strong>ZeroAccess:</strong></p><ul><li>Spawned InstallFlashPlayer.exe — fake installer</li><li>services.exe made P2P UDP connections</li><li>Registry modifications for persistence</li></ul><p>I write 5 custom wazuh rules</p><p>On the wazuyh manager in the local_rule.xml file,i added the following rules</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*zy7b9fhj5xCP1SHM0UZxxw.png" /></figure><p>Since Windows process creation and network connection events are captured by Sysmon, I installed and configured Sysmon on the Windows VM, then updated ossec.conf so Wazuh would ingest that data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*ZJQB3KWDfH7FrUF6hFOwmQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*knAJaT8j6oZ9K1B35WAqRw.png" /></figure><p>In the ossec.conf file, I added the Sysmon log block and confirmed it was being actively monitored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JlSiFQ6bP-1vH1XJNqQEZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*wRD9pY1V_A6NtyVpXZhJ3w.png" /></figure><p>To confirm the rules were working, I recreated each event by running commands that would trigger them, since I couldn’t execute actual malware in this environment.</p><p><strong>Taskhsvc.exe process started</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u4cqiK3vCA84IqLqQKa1sw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OsWbM_pafeebFEWXEAMyoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*lXbW4MOvdth4bR0uWSWMkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*lo2fT13uAlgF4KsaNH16KQ.png" /></figure><p>Rule 100005 fired exactly as designed. Full details:</p><ul><li><strong>rule.id: 100005</strong>, level 12 — “WannaCry Tor client process created — taskhsvc.exe”</li><li>MITRE tag confirmed: <strong>T1090.003</strong>, tactic Command and Control, technique Multi-hop Proxy</li><li>Process lineage: PowerShell spawned the renamed test binary (taskhsvc.exe) from C:\Windows\Temp\</li><li>Even though I renamed Notepad to taskhsvc.exe, Sysmon still captured its true internal metadata (originalFileName: NOTEPAD.EXE) — showing that renaming a file alone doesn&#39;t defeat proper endpoint telemetry</li></ul><p><strong>Taskse.exe process started</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgj9zmBRBqyuLJtIobRt3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sk5bqfMj0qn5XEfph07VRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*TTrgYYZsXbxCaaMWNuap6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*txFfLbToa0R_l18nbac6vw.png" /></figure><ul><li><strong>rule.id: 100006</strong>, level 12 — “WannaCry network spreading component detected — taskse.exe”</li><li>MITRE tag confirmed: <strong>T1210</strong>, tactic Lateral Movement, technique Exploitation of Remote Services</li><li>Process lineage: PowerShell spawned the renamed test binary (taskse.exe) from C:\Windows\Temp\</li><li>Same as before, Sysmon captured the true internal metadata (originalFileName: NOTEPAD.EXE), confirming the detection isn&#39;t fooled by the rename</li></ul><p><strong>Process to install fake adobe flash player starts</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--bhxa85jXOYY-_f7tMGEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0pBWMwrtSvEogqYyXnegYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*mp6_yX5WtoOKdrbqui_pog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*xhTUgYSTANMF3y0tkubz4A.png" /></figure><ul><li><strong>rule.id: 100007</strong>, level 12 — “ZeroAccess fake Flash installer dropped”</li><li>MITRE tag confirmed: <strong>T1036.005</strong>, tactic Defense Evasion, technique Match Legitimate Name or Location</li><li>Process lineage: PowerShell spawned the renamed test binary (InstallFlashPlayer.exe) from C:\Windows\Temp\</li><li>Sysmon again captured the true internal metadata (originalFileName: NOTEPAD.EXE), confirming the rename didn&#39;t evade detection</li></ul><p><strong>Registry run ke persistent query</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ix06hUE-s2wgWZ0IwDS5RA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EMzpyucDZ-iiwNnjFZV48g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*6XOBa_kMDU475GtuiGMBrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*n5enIa42OGx9d1ve4pjwUw.png" /></figure><p>Lastly, P2P UDP connection to botnet network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*1AqizdswxaqRb1jVlGEGiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PHmPsWbtId-g9QWZD6HS5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*bkmUKSYY7_j9b13lOW3AgA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*9BeVCQ9APpp745z2Pi2d5g.png" /></figure><ul><li><strong>rule.id: 100008</strong>, level 14 — “ZeroAccess P2P botnet UDP traffic detected on port 16471”</li><li>MITRE tag confirmed: <strong>T1571</strong>, tactic Command and Control, technique Non-Standard Port</li><li>Traffic detail: UDP connection from PowerShell (PID 1100) to 8.8.8.8:16471 (destination hostname dns.google), source port 53525</li></ul><p>All wazuh rules were successfullt fired!.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51e073e37eb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Firewall installation and integration with wazuh]]></title>
            <link>https://medium.com/@olaniyiseyi02/firewall-installation-and-integration-with-wazuh-dd46d0d2968a?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd46d0d2968a</guid>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 14:50:05 GMT</pubDate>
            <atom:updated>2026-07-27T13:11:21.608Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the past few weeks, Wazuh has been successfully deployed across the machines to monitor and log host-based events, while Suricata handled monitoring and reporting on network-based events. This week, I deployed pfSense — a firewall designed to sit between all network traffic flowing through the system.</p><p><strong>Installing and configuring pfSense</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2oLk2uGFXkDu6bzTJlGxoQ.png" /></figure><p>I downloaded the pfSense ISO and installed it on VMware Workstation, configuring it with two network adapters. The reason for the two adapters is that I’d be removing the NAT adapter from the other VMs entirely — so all the network traffic would naturally have to pass through pfSense first before reaching the internet. This setup means every bit of traffic can be filtered and monitored along the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hYLeIuUgqOWCMreRPasfPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P8HfhXlQc5ZENdPYbAlvVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7C_0Kf334kv_rWhcnwnRJA.png" /></figure><p>Once the installation finished, I moved on to configuring pfSense. The first step was assigning an IP address — noting that pfSense’s IP needs to fall within the same host-only range as the other machines. To confirm this, I checked the host-only IP addresses already assigned to the other VMs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*TM_qJLY5OmgWLFVN5ajlEQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*O_LVYctL95AILVQsSKZtKA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*1P-AtUBx_z2PE_GJibOuiA.png" /></figure><p>Since the Host-only adapter sits on the 192.168.202.X network, I assigned pfSense&#39;s LAN IP address as 192.168.202.100 to match that same subnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*tRVlXlG8YzFhS-fjWbaTYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*trMusS8CRlLqb_oz7ImFvw.png" /></figure><p>With the LAN IP address successfully configured, the pfSense dashboard should now be reachable through a web browser using that IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jEVZJ9zk1bVT5zh4SrWi9Q.png" /></figure><p>The default login credentials are username admin and password pfsense, and the password can be changed from within the dashboard once logged in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*knypPwx4qPKVTIS6jbikIw.png" /></figure><p>With that done, I disabled the NAT adapter on the Kali and Ubuntu machines, cutting off their direct internet access so all traffic would instead have to route through pfSense. Rather than physically removing the adapter in VMware settings, I chose to disable it at the OS level: on the Ubuntu server, I ran ip link set ens33 down, and on the Kali machine I disconnected the NAT wired connection to bring the interface down. The Windows machine didn&#39;t need any changes, since it already communicated with pfSense, Kali, and the Ubuntu server directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IdaHXYw0R2QemlHZ7gZW3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*rOdUYGepXrT_LZ7REooZFQ.png" /></figure><p>With that done, I moved on to configuring pfSense to forward its syslogs to my Wazuh dashboard. To have the Ubuntu server route its network traffic through pfSense, I edited the network config file to point to pfSense’s IP address as the default gateway, then saved the configuration with sudo netplan apply.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*u_0rtUvaVfgR1qkjC6GyBg.png" /></figure><p>Similarly, on the Kali machine, I set the eth0 IP address as static and pointed its default gateway to pfSense by adding the following lines to the network config file:</p><pre>auto eth0<br>iface eth0 inet static<br> address 192.168.202.129<br> netmask 255.255.255.0<br> gateway 192.168.202.100<br> dns-nameservers 8.8.8.8 1.1.1.1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*KYG1kRaDr8gp9nFZcgyLTA.png" /></figure><p>In the /etc/NetworkManager/NetworkManager.conf file, I added the following line so eth0 would be treated as unmanaged and wouldn&#39;t be assigned a dynamic IP:</p><pre>[keyfile]<br>unmanaged-devices=interface-name:eth0</pre><p>I then restarted the network and used the ip route command to verify eth0&#39;s default gateway.</p><p>Challenge: NetworkManager restarted successfully, but networking itself didn&#39;t come back up. I resolved this by flushing the interface with sudo ip addr flush dev eth0 and trying again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*wsyK3mLTpjlBBB_u8t7yJg.png" /></figure><p>To confirm all machines had internet access and were communicating effectively, I sent ping requests to each one simultaneously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*Jo3ZNeNUF91w-1vSxiIOFg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*VoB4lui1trTNapl3HOfv0Q.png" /></figure><p>These results confirmed that with pfSense set as the default gateway, both VMs had regained internet access.</p><p><strong>Creating a firewall rule on the pfSense dashboard</strong></p><p>First, I created an ICMP block rule on the LAN interface and enabled logging. Second, I created a rule that allows and logs all LAN traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EFXS4QzC7BH_AkuNXVxqMw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*PiX_JP31ARsv1Gg68N8PCQ.png" /></figure><p><strong>Integrating pfsense with wazuh</strong></p><p>First i checked if all the agents are still active and wazuh services are running</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*ASJ8L0lWgFyhB91UTdSAcw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*RR3k68bc-VbOaQHDoq7TMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lwgiz7CmaRCsLm7RpoGUEg.png" /></figure><p>The agents showed as disconnected on the Wazuh dashboard. I figured this was because, with the NAT adapter disconnected, the agents were no longer pointing to the Wazuh server. To fix this, I edited the ossec.conf file to point to 192.168.202.130.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NlwfGXgZiUAzzEpAICBN0Q.png" /></figure><p>On the Ubuntu server, in /var/ossec/etc/ossec.conf, I added the following under the remote section:</p><pre>&lt;remote&gt;<br>  &lt;connection&gt;syslog&lt;/connection&gt;<br>  &lt;port&gt;514&lt;/port&gt;<br>  &lt;protocol&gt;udp&lt;/protocol&gt;<br>  &lt;allowed-ips&gt;192.168.202.100&lt;/allowed-ips&gt;<br>&lt;/remote&gt;</pre><p>The connection field specifies the type of logs being forwarded to the Wazuh manager, port 514 is the communication port used — which is blocked by default, so I ran sudo ufw allow 514/udp to open it — and allowed-ips is set to pfSense&#39;s IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*uv3n03IV-Gs0SpUMneWjCQ.png" /></figure><p>save the configuration and restart wazuh services</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*gnhSyVLn3lZDOSCY_5iu9g.png" /></figure><p>On the pfSense dashboard, I navigated to System Logs, and under Remote Logging Options, set the Source Address to LAN and the Remote Log Server to the Ubuntu Wazuh server’s IP address. I then checked the boxes to forward both System and Firewall events to Wazuh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TWxq6IoJlsvf6PDolWKD5g.png" /></figure><p>Save the configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eSBgnbgpjQ3bYqIZR6QO0g.png" /></figure><p>The pfsense would forward logs to wazuh</p><p>Threat Intelligence integration</p><p>Threat intelligence refers to information about existing or emerging threats — attackers, their tools, tactics, and infrastructure — that has been gathered, processed, and analyzed to help an organization make better security decisions.</p><p>I integrated VirusTotal with Wazuh. VirusTotal is an online service that scans files and URLs using multiple antivirus engines and website scanners to detect viruses, worms, trojans, and other malicious content.</p><p>To start, I created a free VirusTotal account to obtain an API key, which comes with a limit of 4 lookups per minute on the free tier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n4WKeUud9l_8Pnzqy6-mYw.png" /></figure><p>I configured VirusTotal to run whenever an FIM alert fires. In previous weeks, I had already set up the Desktop, log, and /etc directories to be monitored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*zNIlXfJxgMKgVocw9FYHEg.png" /></figure><p>On the Wazuh server side, I added the following lines to the local_rules.xml file, under the integration section referenced in ossec.conf.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*pmpDJZbGALF2Kct1wMgxdw.png" /></figure><p>These rules generate alerts for changes detected by FIM scans in the /home/kali/Desktop directory. To tie these FIM rules into VirusTotal, I added a line to the ossec.conf file so that a VirusTotal query is triggered automatically whenever rule 100200 or 100201 fires.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*OWc8R6_v3HFfQ1wQN-G-Og.png" /></figure><p>I created a test file named “me” in the Desktop directory to confirm the FIM alert fired as expected on the Wazuh dashboard. VirusTotal automatically scanned the file and returned a clean result, with no threats detected — confirming the pipeline works correctly for benign files before testing it against something malicious.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qRqabqVO5TDWNee-VUXlrg.png" /></figure><p>To validate detection on the other end, I downloaded a known-malicious test file into the same directory to see whether VirusTotal would flag it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*qzh39vOa08foIHWBCE3E4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kauA7JZCC7nwfdb9V8vRNQ.png" /></figure><p>The VirusTotal query fired automatically and flagged the file as malicious, with 65 out of the available antivirus engines detecting it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*SXs1MhTv6CnjIjRvl_GJ7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*ApJWwiwB8_R09TODRalD5g.png" /></figure><p><strong>MITRE ATT&amp;CK Framework</strong></p><p>I mapped three alerts from past sessions to the MITRE ATT&amp;CK framework: the Nmap scan, the SSH brute-force attempt, and the VirusTotal malicious file detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qiTgl1hPDLjOgrT01KFJ8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b8GsOuSINJ_NZUln5UVk-Q.png" /></figure><p>For the Nmap scan, the corresponding MITRE ATT&amp;CK ID is T1046, mapped to the Network Service Discovery tactic, with a severity level of 10.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*so47NX3GNrWCl5FLUiWmnQ.png" /></figure><p>For the SSH brute-force attempt, the corresponding MITRE ATT&amp;CK ID is T1110, mapped to the Credential Access tactic, with a severity level of 10.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KwSfy3tTo4_y609YFgtQDQ.png" /></figure><p>For the VirusTotal malicious file scan, the corresponding MITRE ATT&amp;CK ID is T1203, mapped to the Network Service Discovery tactic, with a severity level of 12.</p><p><strong>Integrating the URLhaus (abuse.ch) threat feed as a CDB list</strong></p><p>To download the feed in plaintext, convert it to CDB format, and set the correct ownership, I ran the following commands on the Wazuh server:</p><pre>curl -s https://urlhaus.abuse.ch/downloads/text_online/ -o /tmp/urlhaus_ips.txt<br>awk &#39;{print $0&quot;:&quot;}&#39; /tmp/urlhaus_ips.txt &gt; /var/ossec/etc/lists/urlhaus-blacklist<br>sudo chown wazuh:wazuh /var/ossec/etc/lists/urlhaus-blacklist</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*FdetA7Cw5MOrlYD_p_7ZDw.png" /></figure><p>Next, I registered the list in the ossec.conf file under the ruleset section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*Doyb6dhxd5mxauAdGxhJxA.png" /></figure><p>Next, I wrote a rule that checks group membership against the list — once a URL matching an entry on the list is identified, the rule fires an alert.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*bXKnYCkvEqzsniuh8cDogA.png" /></figure><p><strong>Generating Indicators of Compromise</strong></p><p>First, I ran an Nmap scan against the Kali machine, followed by a failed and then successful SSH login attempt, and then dropped an EICAR test file to simulate a malicious file detection. To test the CDB match list, I used a curl request with a connect-timeout targeting one of the flagged IP addresses on the CDB list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*IVKbLmEhnqTLO4Dmaeu2YA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*jwtNQviCAWThvOFJIbE9Vw.png" /></figure><p>On the Wazuh dashboard, all four alerts fired simultaneously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*uqtbC-SZ1MjC6maFJuo3hQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*FpGtMa7oFpwTEz74388_OQ.png" /></figure><p>The Nmap alert fired first. In a real attack scenario, this IOC indicates a probe against the network to identify open or vulnerable ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*EjA77hIC3qVhiIupE0G4Mw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*NPTiOHQsydnnU_yXl5b-Bg.png" /></figure><p>Next, a failed SSH login was observed, followed by a successful one — indicating that port 22 (SSH) had been identified as open during the Nmap scan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*5WHPTr1LGSyqmlrSQAtwGQ.png" /></figure><p>Next, a malicious file was added to the system and flagged by VirusTotal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*CgC-WHoRSEhlSLCS2z6bEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*Y7V7cnQttg9v2Zv8CHCJAw.png" /></figure><p>Lastly, an alert was fired showing an outbound connection attempt to a known-malicious address flagged via the CDB list.</p><p>Together, these four consecutive actions — reconnaissance, unauthorized access, malicious file execution, and an attempted outbound connection to malicious infrastructure — confirm that the machine has been compromised.</p><p>Summary</p><p>Monitoring detected a full attack chain against 192.168.202.129: reconnaissance scanning, a successful SSH login following one failed attempt, a malicious file dropped on the host, and an outbound connection attempt to known C2 infrastructure. Details and recommended actions for each indicator are below.</p><p><strong>Indicators Observed</strong></p><p>1. Port Scan — 192.168.202.130 → 192.168.202.129:3306</p><ul><li>Source: Suricata (ET Open, sig 2010937) / Wazuh rule 100310</li><li>Finding: 13 hits flagging inbound scanning to MySQL port 3306 — a sweep, not an isolated probe. MITRE T1046 (Network Service Discovery).</li><li>Action: Treat 192.168.202.130 as hostile. Check what else it scanned; isolate if internal.</li></ul><p>2. SSH Login — Failed then Successful — 192.168.202.130 → user ‘kali’</p><ul><li>Source: Wazuh sshd decoder</li><li>Finding: Failed login (rule 5760, T1110.001/T1021.004) immediately followed by successful login (rule 5715, T1078/T1021) from the same IP that ran the scan. Attacker found SSH exposed and got in on the second try.</li><li>Action: Treat as confirmed unauthorized access. Review session activity, reset the ‘kali’ password, move to key-based SSH auth only.</li></ul><p>3. Malicious File — SHA1 3395856ce81f2b7382dee72602f798b642f14140</p><ul><li>Source: VirusTotal (via Wazuh integration)</li><li>Finding: File dropped at /home/kali/Desktop/eicar.com right after the login above, flagged malicious by 66/68 AV engines. MITRE T1203 (Exploitation for Client Execution).</li><li>Action: Isolate the host. Preserve the file for forensics. Scan for persistence (cron jobs, added SSH keys, startup scripts).</li></ul><p>4. C2 Connection Attempt — 192.168.202.129 → 110.37.12.8:50702</p><ul><li>Source: URLhaus (abuse.ch) via CDB list / Wazuh rule 100300</li><li>Finding: Two outbound attempts to a URLhaus-listed malware/C2 IP, both timed out (no channel established). MITRE T1071 (Application Layer Protocol / C2).</li><li>Action: Block the IP at the firewall now. Watch for retries to related infrastructure.</li></ul><p><strong>Analysis</strong></p><p>These four events form a single, coherent chain: scan → access → payload → attempted callback. The Nmap scan revealed that SSH was exposed; the same source IP logged in shortly afterward; a malicious file appeared immediately after that login; and the host then attempted to reach known C2 (command-and-control) infrastructure. No connection to the C2 IP was confirmed, so there’s no evidence of successful exfiltration or an active channel — but the sequence itself is a high-confidence indicator of compromise, not background noise.</p><p><strong>Conclusion</strong></p><p>This should be treated as a confirmed incident. Priority actions: isolate 192.168.202.129, preserve logs and the dropped file for forensic review, reset the ‘kali’ account credentials (along with any accounts sharing that password), block 110.37.12.8 at the firewall, and check whether other hosts show the same file hash or attempted the same outbound connection.</p><p><strong>Vulnerability Assessment with Wazuh</strong></p><p>In the Wazuh manager’s ossec.conf file, I confirmed that vulnerability detection was enabled — and where it wasn&#39;t, I enabled it and restarted the Wazuh manager for the change to take effect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*1QImizmbFRiPb1prBZBE7w.png" /></figure><p>On the Wazuh dashboard, I checked that both the Windows and Kali agents were reporting their software inventory, since the vulnerability module works by comparing each agent’s installed packages against the CVE database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IiqZSL8aHX0AtSRmb30qzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*A0vfsyCpcM9GofLfUiCRXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*41sOspPA4z9AgPOm_xPgRA.png" /></figure><p>For the Kali agent, vulnerability detection wasn’t working — this turned out to be because Kali is Debian-based, and Wazuh doesn’t officially support Debian-based distributions for vulnerability detection. As a result, I focused on the Windows agent’s findings and selected four vulnerabilities to work through in detail.</p><p><strong>CVE-2024–43599 — Remote Desktop Client RCE</strong></p><ul><li>CVSS: 8.8 (High) — AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H</li><li>Affected: FreeRDP and downstream Remote Desktop <em>clients</em> (not the server) on Windows 10/11 and Server editions</li><li>Weakness: CWE-416 (Use After Free)</li><li>What an attacker can do: If a user connects to a malicious or compromised RDP server, that server can execute arbitrary code on the connecting client’s machine. Requires user interaction (initiating the connection) but no prior access.</li><li>Fix: Apply the October 2024 Microsoft security update for the affected Windows build.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*R2uOFpMmcCeQSRHtWtGH8g.png" /></figure><p><strong>CVE-2024–43582 — Remote Desktop Protocol <em>Server</em> RCE</strong></p><ul><li>CVSS: 8.1 (High) — attack complexity High (attacker must win a race condition)</li><li>Affected: The built-in Windows RDP server component (Windows 10/11, Server editions)</li><li>Weakness: CWE-416 (Use After Free)</li><li>What an attacker can do: A remote, unauthenticated attacker sends malformed packets to the RDP service; successful exploitation (after winning a timing race condition) allows code execution with the privileges of the RPC service. Two public PoC/exploit references exist.</li><li>Fix: Apply the corresponding October 2024 KB for your build (e.g., KB5044277 for 1809, KB5044273 for 21H2/22H2, KB5044280/85 for Windows 11).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*BJB8LqW8xFTyGZ1d2AfzIw.png" /></figure><p><strong>CVE-2024–43581 — Microsoft OpenSSH for Windows RCE</strong></p><ul><li>CVSS: 7.1 (High) — AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H</li><li>Affected: Microsoft’s OpenSSH for Windows component (Windows 10/11, Server editions)</li><li>Weakness: CWE-73 (External Control of File Name or Path)</li><li>What an attacker can do: Requires low privileges and user interaction, but a successful attack allows remote code execution via a specially crafted SSH-related file/path manipulation.</li><li>Fix: Same October 2024 KB set as above (bundled with the monthly cumulative update).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*7gzyaqKwDDNCxcRqkRr0Gw.png" /></figure><p><strong>CVE-2024–43553 — NT OS Kernel Elevation of Privilege</strong></p><ul><li>CVSS: 7.0 (High), CVSS v3.1</li><li>Affected: Microsoft Windows 11 Pro 10.0.22000.2538 (your agent’s current build — confirmed vulnerable, needs to be ≥ 10.0.22000.3260)</li><li>Weakness: OS-level kernel privilege escalation</li><li>What an attacker can do: With existing low-level local access, exploit a kernel flaw to escalate to SYSTEM privileges — a classic second-stage move after initial foothold, not an initial entry vector itself.</li><li>Fix: Update to Windows 11 build 10.0.22000.3260 or later via Windows Update / the relevant cumulative KB.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*48UKi4h3tS4gyqG1nnp1LQ.png" /></figure><p><strong>Prioritized Vulnerability List</strong></p><p>Here’s the priority ranking for the four vulnerabilities identified on the Windows agent, written out as a list rather than a table:</p><p><strong>1. CVE-2024–43599 — Remote Desktop Client RCE</strong><br> CVSS 8.8 (High) | Remote Desktop Client | Network-exposed via outbound RDP connections | No confirmed public exploit<br><em>Reasoning:</em> Highest CVSS of the four, and only requires a user to connect to a malicious/compromised RDP server once — highest realistic likelihood given how routinely RDP clients get used.</p><p><strong>2. CVE-2024–43582 — Remote Desktop Protocol Server RCE</strong><br> CVSS 8.1 (High) | RDP Server | Network-exposed via inbound port 3389 | <strong>Public exploit confirmed — 2 PoCs available</strong><br> <em>Reasoning:</em> Slightly lower CVSS than #1, but moved to #2 specifically because of confirmed public exploit code plus an unauthenticated, network-facing attack surface — this is the kind of context that should override a small CVSS gap.</p><p><strong>3. CVE-2024–43581 — Microsoft OpenSSH for Windows RCE</strong><br> CVSS 7.1 (High) | OpenSSH for Windows | Network-exposed if SSH service is running | No confirmed public exploit<br> <em>Reasoning:</em> Lower CVSS and requires low privileges plus user interaction, reducing practical likelihood compared to #1 and #2.</p><p><strong>4. CVE-2024–43553 — NT OS Kernel Elevation of Privilege</strong><br> CVSS 7.0 (High) | Windows 11 Pro (NT Kernel), build 10.0.22000.2538 — fixed in 10.0.22000.3260+ | Local attack vector only | No confirmed public exploit<br> <em>Reasoning:</em> Lowest CVSS of the four and local-only — valuable as a privilege-escalation follow-on after initial access, but not an initial entry point, so it ranks last despite being rated High.</p><p><strong>Patch + Verification Loop</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*RVX33gudnL3AUv-BtApNjA.png" /></figure><p><strong>CVE-2024–43553 — NT OS Kernel Elevation of Privilege — Remediation Attempt</strong></p><ul><li>Original finding: CVSS 7.0 (High), Windows-Agent (009), build 10.0.22000.2538. Fix requires build ≥ 10.0.22000.3260.</li><li>Patch action attempted: Windows Update GUI (Check for updates) — reported no available updates, with the most recent successful installation dated October 2024.</li><li>Root cause identified: DNS resolution for windowsupdate.microsoft.com failed, while general internet connectivity (www.microsoft.com, google.com) succeeded. The same pattern was observed earlier for powershellgallery.com. This confirms the host&#39;s network specifically blocks Microsoft&#39;s update/package-distribution domains via DNS, rather than the system being genuinely current or the update check failing for a generic reason.</li><li>Verification outcome: CVE-2024–43553 remains present and could not be remediated through standard local patch channels.</li><li>Recommended action in a real environment: Escalate to network/IT administrators to allowlist the required Microsoft update domains, or provision an internal WSUS/update mirror for managed devices on this network. Local-only remediation attempts are insufficient when the underlying restriction is at the network layer.</li></ul><p><strong>Custom Dashboard Creation</strong></p><p>First, I built a custom dashboard that tracks alert count by severity over the last 7 days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8i_8RnfIijiZHtIE_mgibA.png" /></figure><p>Secondly, I created a dashboard that displays agent health status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3J26z-1VdRs-V8WULqGYBA.png" /></figure><p>Thirdly, I created a dashboard showing the top 10 rules by alert count.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cFv848ascPvBDVks4z8Uww.png" /></figure><p>Next, I created a dashboard for the top IP sources generating alerts, covering both Auth and Suricata alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UeIQOtrrSCMvpnoQnuTyKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cPrsgdo2RDvcOkwB_By1OA.png" /></figure><p>Combining all panels into a dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lntx0WDgCZ3TfLFN7abAyA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd46d0d2968a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Suricata installation and Custom rules]]></title>
            <link>https://medium.com/@olaniyiseyi02/suricata-installation-and-custom-rules-131b2cba0432?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/131b2cba0432</guid>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Sun, 12 Jul 2026 14:37:29 GMT</pubDate>
            <atom:updated>2026-07-12T14:37:29.140Z</atom:updated>
            <content:encoded><![CDATA[<p>This week, i integrated Wazuh with a Network Intrusion Detection System (NIDS) deployed on our Kali Linux endpoint. The NIDS will continuously monitor network traffic on the endpoint, analysing packets in real time to identify and alert on any suspicious or anomalous activity.</p><p>For this lab, we will be deploying Suricata as our network intrusion detection system on the Kali Linux machine. Suricata is an open source NIDS that inspects network traffic in real time, detecting and alerting on potentially malicious or abnormal activity based on predefined detection rules.</p><p>To install Suricata, run the following commands:</p><p>sudo apt-get update</p><p>sudo apt-get install suricata -y</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*2IKQamcgqzc-294N9I2iDA.png" /></figure><p>Once the installation is complete, the next step is to download and extract the Emerging Threats Suricata ruleset.</p><p><strong>What are emerging threats?</strong></p><p>Emerging Threats is an open-source project that maintains a continuously updated library of detection rules and threat signatures for intrusion detection systems like Suricata. These rules are developed by security researchers and reflect the current threat landscape, allowing Suricata to detect known attack patterns and malicious network traffic without the need to write rules from scratch. Think of it as a threat intelligence feed that keeps your NIDS informed and effective.</p><p>To download and extract the Emerging Threats ruleset, run the following commands:</p><p>cd /tmp/ &amp;&amp; curl -LO <a href="https://rules.emergingthreats.net/open/suricata-7.0/emerging.rules.tar.gz">https://rules.emergingthreats.net/open/suricata-7.0/emerging.rules.tar.g</a>z</p><p>sudo tar -xvzf emerging.rules.tar.gz</p><p>sudo mkdir -p /etc/suricata/rules</p><p>sudo mv rules/*.rules /etc/suricata/rules/</p><p>sudo find /etc/suricata/rules -name &quot;*.rules&quot; -exec chmod 640 {} \;</p><p>sudo suricata-update</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*DqnGOrK0ifmliDGmChrZbA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*u7tPDw20ZYMKYi36ikc-eQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*UOAQAtJf7nOXTORIon85zA.png" /></figure><p>Run the command sudo suricata -T -c /etc/suricata/suricata.yaml -v 2&gt;&amp;1 | tail -10 to load the configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*aoMorTQxv-Ba3KI5PfQR3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*0C6VFOnol0gqXKgMCvk3NA.png" /></figure><p><strong>Configuring Suricata</strong></p><p>Next, we need to modify the Suricata configuration file located at /etc/suricata/suricata.yaml. Update the following variables to match your environment:</p><pre>HOME_NET: &quot;&lt;Kali_IP&gt;&quot;</pre><pre>EXTERNAL_NET: &quot;any&quot;</pre><pre>stats:<br>  enabled: yes</pre><pre>af-packet:<br>  - interface: eth1</pre><pre>default-rule-path: /etc/suricata/rules<br>- &quot;*.rules&quot;</pre><p>Swap &lt;Kali_IP&gt; for your Kali machine&#39;s actual IP. HOME_NET tells Suricata which network counts as internal/protected, and EXTERNAL_NET marks everything else as outside traffic. Set the af-packet interface to whichever network interface Suricata should be watching — in this lab, that&#39;s eth1. The default rule path points to /etc/suricata/rules, and the rule-file entry uses a *.rules wildcard, so it picks up every file in that folder ending in .rules.</p><p>Once all the configuration changes have been saved, restart the Suricata service to apply them by running the following command: sudo systemctl restart suricata</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*eV9Vw0ssBnj9Ff6l8vxPdg.png" /></figure><p>To confirm Suricata was actually up and watching traffic on eth1, I tailed the fast.log file at /var/log/suricata using sudo tail -f /var/log/suricata/fast.log, then generated some real traffic to test it — pinging the Ubuntu server and running an Nmap scan against it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*ddcyzipQjlyWcg9-BS0XPg.png" /></figure><p>fast.log was successfully logging the network traffic.</p><p><strong>Writing custom rules for Suricata</strong></p><p>A Suricata rule is made up of two parts. First comes the header, which defines the action, protocol, source address and port, traffic direction, and destination address and port. After that is the options section, wrapped in parentheses, holding all the conditions that need to be true for the rule to trigger. The structure looks like this:</p><p>alert tcp any any -&gt; any any (msg:&quot;Example&quot;; content:&quot;test&quot;; sid:1000001; rev:1;)</p><p>Here, the action is alert (log the event), the protocol is tcp, the source is any IP on any port, the arrow shows traffic flowing from source to destination, and the destination is likewise any IP on any port. Within the parentheses, msg is what shows up in the alert text, content is the byte string that must be present in the packet&#39;s payload, sid is the rule&#39;s unique ID, and rev tracks its revision number.</p><p><strong>Custom rule 1: detecting an Nmap scan.</strong> Nmap sends packets with distinct characteristics depending on the scan type — a SYN scan sends TCP packets with only the SYN flag set, a NULL scan sends packets with no flags at all, and a FIN scan sends packets with only the FIN flag set.</p><p>I opened /etc/suricata/local.rules and added rules to catch all three — NULL, FIN, and SYN — targeting scans aimed at the Kali machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YCGymIl1xUZlUgVcmzR35A.png" /></figure><p><strong>Custom rule 2: detecting an HTTP exploit attempt.</strong> HTTP-based attacks often carry telltale strings in the request’s URI or body — things like directory traversal sequences (../ repeated several times), or common exploit-framework signatures showing up in the User-Agent header. I wrote a rule to look for one of these patterns and fire an alert when it appears.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bs2Q2whUjksbKYqgdJNzIw.png" /></figure><p><strong>Custom rule 3: detecting an ICMP flood.</strong> An ICMP flood happens when a huge number of ping requests get fired off rapidly from one source to a single destination. A lone ping is completely ordinary — it’s only once you’re seeing hundreds per second that it becomes a denial-of-service attempt. I set a threshold so the rule only fires once 20 ping requests arrive from the same source within a 5-second window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JW6KKwtkuPAHlAC1I-qsnA.png" /></figure><p>After saving the rules, I didn’t need to explicitly point to local.rules in suricata.yaml, since the rule-files setting is already configured with a wildcard that loads every .rules file in /etc/suricata/rules. I then reloaded the configuration to check it with:</p><p>sudo suricata -T -c /etc/suricata/suricata.yaml -v 2&gt;&amp;1 | tail -10</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fH8QIRbjvqkOa_iwyv7ajg.png" /></figure><p>Alternatively, the rules could also be reloaded with:</p><p>sudo suricatasc -c &quot;reload-rules&quot;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xPfcZDEpG_eR325Zvz9G3g.png" /></figure><p>To confirm all the rules loaded with no errors, I checked:</p><p>sudo tail -30 /var/log/suricata/suricata.log</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5pxe3vm9ZRR_vIu3OKf9rg.png" /></figure><p>Next, I needed to trigger each alert by simulating a scan, a ping flood, and an exploit attempt from the Ubuntu machine. On the Kali machine, I ran:</p><p>sudo tail -f /var/log/suricata/fast.log</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nfo70sP42OFFoqnejXT2tg.png" /></figure><p><strong>Challenge:</strong> I noticed the Kali machine was constantly logging a SYN scan alert in fast.log. On closer inspection, this turned out to be the Kali agent&#39;s routine traffic to the Wazuh server (the Ubuntu machine) — nothing malicious, just normal agent-to-manager communication. Since I knew this traffic was expected and legitimate, I decided to exclude ports 1514 and 1515 from my rule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6YXxJbopTLM-BZLrJ8CQKw.png" /></figure><p>I reloaded the configuration once more, so fast.log would now only log genuine Nmap scans. From the Ubuntu machine, I ran the -sS, -sN, and -sF Nmap scans against the Kali machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*FMtp8UJvFT-gbBZp4Tzl8w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g5t2HURhznFGDsJRRim5BA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*m-a09guHTt6_TBGVA6Hs-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8K__39r1Gdz4_WdLPQplbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*RP8IEwaOt3T6OfY0acJu7g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTCBxWlVUwBuxJvDlgFVZg.png" /></figure><p>From the Ubuntu machine, I also pinged the Kali machine 25 times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*sulTRlRcukXzQfxazMn-eQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92lB659pCnoOnfjvm6Np6A.png" /></figure><p>For the last custom rule — the HTTP exploit detection — I attempted to access the /etc/passwd directory from the Ubuntu machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*P203gIOyHnKzh3ZBbHprKg.png" /></figure><p><strong>Challenge:</strong> On the first attempt, the connection to the Kali server failed — it turned out Apache2 wasn’t running. I started Apache2 on the Kali machine and tried again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uTZ8YPdcv6AFxWZ_eSSdAA.png" /></figure><p>All three custom rules are working correctly!</p><p><strong>Rule 1: Catching Nmap Port Scans (SYN, NULL, and FIN)</strong></p><p><strong>What it’s trying to catch:</strong> Someone scanning a network with Nmap to find out which ports are open — usually the very first thing an attacker does before trying to break in further.</p><p>Nmap has a few different ways of scanning, and I built rules for three of them:</p><p><strong>SYN scan</strong> — This is Nmap’s default scan. It sends a single, incomplete connection request to a port and never finishes it. The problem is, this looks almost identical to how <em>every</em> normal connection starts (your browser, SSH, anything). So one lone request like this isn’t actually suspicious on its own.</p><p><strong>NULL scan</strong> — This one sends a packet with nothing on it at all — no flags, nothing. No real device or app ever does this. It only makes sense as a scanning trick.</p><p><strong>FIN scan</strong> — This sends a packet that normally means “I’m done, close this connection” — but to a port that was never opened in the first place. Like the NULL scan, this never happens in normal, everyday traffic.</p><p><strong>What I had to fix:</strong></p><p>The SYN scan rule was the tricky one. At first, I set it to alert on <em>any</em> single SYN-style packet — and it immediately went off constantly, because that’s exactly what a normal connection looks like at the start. I had to change it so it only alerts when the <em>same computer</em> sends a burst of 20 or more of these packets within 5 seconds. That pattern — many attempts, very fast — is what an actual scan looks like, and it’s not something a normal connection ever does.</p><p>Even after that fix, I still got false alarms — this time from Wazuh itself, since the agent and manager talk to each other frequently on two specific ports (1514 and 1515). So I told the rule to ignore traffic on those two ports specifically, while still watching everything else. That way, real infrastructure traffic doesn’t get flagged, but an actual scan still would.</p><p>The NULL and FIN scan rules didn’t need any of this fixing — because those flag patterns never show up in normal traffic, one single occurrence is already suspicious enough on its own.</p><p><strong>Rule 3: Catching a Web Attack (Directory Traversal)</strong></p><p><strong>What it’s trying to catch:</strong> Someone trying to trick a website into showing them files it was never meant to serve — like system files — by sneaking special characters (../../../) into a web request. This is a well-known trick used to &quot;escape&quot; out of the website&#39;s intended folder and reach other parts of the machine.</p><p><strong>What it looks for:</strong> The rule checks the actual web request (specifically, the part of the address after the domain name) for that repeated ../../../ pattern. Since there&#39;s no normal reason a real request would ever contain that, spotting it even once is a strong signal something&#39;s wrong.</p><p><strong>What I had to fix:</strong> Before I could even test the rule, I ran into a separate snag — I couldn’t reach the web server on the Kali machine at all. It turned out Apache (the web server software) simply wasn’t running yet, so there was nothing actually listening to receive my test request. Once I started Apache, the request went through properly. After that, the rule logic itself didn’t need any changes — I just had to be careful that my <em>test</em> request actually contained the exact pattern the rule was looking for, and that the rule was checking the right part of the request (the address itself, not the whole network packet) — otherwise it risked flagging unrelated traffic that just happened to contain similar-looking text somewhere else.</p><p><strong>Rule 3: Catching a Ping Flood (Denial-of-Service)</strong></p><p><strong>What it’s trying to catch:</strong> Someone (or something) sending an overwhelming number of pings at a target, fast enough to try to overload it. A normal ping here and there is completely harmless — the danger is only in the <em>volume and speed</em>.</p><p><strong>What it looks for:</strong> Regular pings, but specifically counts how many arrive from the same source in a short window. If one computer sends 50 or more pings within 5 seconds, that’s treated as a flood attempt rather than normal network activity.</p><p><strong>What I had to fix:</strong> This one wasn’t actually a problem with the rule — it was a problem with how I tried to <em>test</em> it. I first tried to generate a flood of pings using a command that requires admin/root permissions to run at full speed, and without those permissions, the flood never actually happened — so the rule had nothing to catch. Once I either used the right permissions or manually sped up the ping rate enough to genuinely cross the threshold, the rule worked as expected. It was a good reminder that a rule can be completely correct and still look “broken” if the test itself never actually recreates the situation the rule is watching for.</p><p><strong>Integrating Suricata with Wazuh</strong></p><p>To enable Wazuh to collect and analyse Suricata alerts, we need to configure the Wazuh agent on the Kali machine to monitor Suricata’s log output. Add the following block to the Wazuh agent configuration file located at /var/ossec/etc/ossec.conf:</p><pre>&lt;localfile&gt;<br>    &lt;log_format&gt;json&lt;/log_format&gt;<br>    &lt;location&gt;/var/log/suricata/eve.json&lt;/location&gt;<br>&lt;/localfile&gt;</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*4K8Knf2CwXVTLgf7.png" /></figure><p>This tells the Wazuh agent to read Suricata’s eve.json log file, which contains detailed records of all network events and alerts detected by Suricata, and forward them to the Wazuh manager for analysis and alerting.</p><p>Once the changes have been saved to the Wazuh agent configuration file, restart the Wazuh agent to apply them by running the following command:<br>sudo systemctl restart wazuh-agent</p><p>On the Wazuh manager, I confirmed that the Suricata decoder and corresponding rules were available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0J1eMKctrrbn-cgkwUGLsg.png" /></figure><p>This means that simulating a ping, Nmap scan, and HTTP exploit attempt from the Kali machine toward the Ubuntu server should show up as logged events on the Wazuh dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*H2eCUTky48cAQKHg1Mwizw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HvcHT_Y1Aig5MtK3Vg_qRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*W46oIsn2AuAIe6caIYk6hA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*pUSEm1zlChI7VtP3fipFIw.png" /></figure><p>Next up: an Nmap scan from the Kali machine targeting the Ubuntu server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*avBCzBDNW0D1BUc6afaSTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*172FplCbn9jfI31SK-Ipqg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*TpjM4U4y8i775dbu71yKew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*qvwf2bkG67dB4ytYGB4uaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QACOyD99j1v0DPUAGPKz-Q.png" /></figure><p><strong>GeoIP Blocking and Firewall Rules</strong></p><p>GeoIP blocking works by pulling a list of IP address ranges assigned to specific countries and loading them into a firewall ruleset. On Linux, the go-to tool for this is iptables paired with ipset — a kernel-level data structure built for efficiently matching huge numbers of IP addresses without the performance hit of checking every single IP against thousands of individual firewall rules.</p><p><strong>Installing the required packages</strong></p><p>On the Kali machine, I installed the necessary packages:</p><p>sudo apt install -y iptables ipset xtables-addons-common xtables-addons-dkms</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*48LzorwD0h8KRYOnRPMH2g.png" /></figure><p><strong>Downloading country IP blocklists</strong></p><p>ipdeny.com hosts CIDR lists broken down by country. I picked three countries I have zero legitimate reason to receive traffic from: North Korea (kp), Russia (ru), and China (cn).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*haoEKwdcfZOYtd5tmkZX6A.png" /></figure><p>I checked the IP address format for china zone</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*WWLne2yIYGD_J1mDKrVaFQ.png" /></figure><p><strong>Create ipsets and populate them</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0klmezv_Ez55Z0y3jAi7-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2hLgwl_zKg8aGIyn_AU8jA.png" /></figure><p>Create iptables rules</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*di9U61XbJJTIqbkPnpSehw.png" /></figure><p>To verify a real IP would work i ran the command grep -m1 “^” cn.zone to check a china ip address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1AjnUTKCNmRq66ss4-LIw.png" /></figure><p>To confirm the block was actually working, I picked the IP address 1.0.1.5 and tested it with sudo ipset test block_cn 1.0.1.5 — it came back as blocked, confirming the rule was effective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*NmqpRvX9TtPCQ0nvElUUmg.png" /></figure><p><strong>UFW + /etc/hosts Domain Blocking</strong></p><p>On the Kali machine, I edited /etc/hosts to redirect specific domains to localhost, using www.example.com and www.domain.com as my test domains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TOuFYJzTE6kd9eLwiD2eA.png" /></figure><p>To test the block, I ran curl -v <a href="https://www.example.com./">https://www.example.com.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RzL0hvuUEaMDTpaLFYYDMw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=131b2cba0432" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Detection and Active response]]></title>
            <link>https://medium.com/@olaniyiseyi02/custom-detection-and-active-response-8e6fe3eee48d?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e6fe3eee48d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-technology]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Sat, 04 Jul 2026 11:15:55 GMT</pubDate>
            <atom:updated>2026-07-04T11:15:55.434Z</atom:updated>
            <content:encoded><![CDATA[<p>Having successfully configured Wazuh and connected all agents in the lab, the next step is to configure File Integrity Monitoring (FIM) to track real time changes across key directories on both the Kali and Windows agents.</p><p><strong>What is real time monitoring and report changes?</strong></p><p>The realtime attribute instructs the Wazuh agent to actively watch a directory and immediately fire an alert the moment any change is detected, rather than waiting for a scheduled scan. The report_changes attribute goes a step further by recording the actual content of what changed, not just the fact that a change occurred. Together, these two attributes provide security analysts with an immediate and detailed view of any modifications taking place on a monitored system.</p><p><strong>Configuring monitored directories on the Kali agent</strong></p><p>On the Kali agent, two critical directories were configured for monitoring:</p><p>/etc — This directory stores system wide configuration files. Any unauthorized modification here could indicate configuration tampering, privilege escalation, or persistent backdoor activity.</p><p>/var/log — This directory contains most system and application logs. Monitoring it ensures that any attempt to tamper with or delete log files is immediately detected and alerted on.</p><p>Run the command sudo nano /var/ossec/etc/ossec.conf to edit the ossec configuration file.</p><p>In the file monitoring section, i added the two directories i want to monitor</p><p>&lt;directories check_all=”yes” report_changes=”yes” realtime=”yes”&gt;/var/log&lt;/directories&gt;</p><p>&lt;directories check_all=”yes” report_changes=”yes” realtime=”yes”&gt;/etc&lt;/directories&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*20RdDvrm7ez3rf2rcCqv4A.png" /></figure><p>Sudo systemctl restart wazuh-agent to initiate the changes on the wazuh manager.</p><p><strong>Configuring monitored directories on the Windows agent</strong></p><p>On the Windows agent, the C:\Windows\System32 directory was configured for monitoring. This directory contains critical Windows operating system files, and any unauthorized modification to files within it is a strong indicator of malware activity, rootkit installation, or system level tampering.</p><p>To add this directory for monitoring, open Notepad as administrator and navigate to the ossec.conf file located at C:\Program Files (x86)\ossec-agent\. Under the File Integrity Monitoring section, add the following line:</p><p>&lt;directories check_all=&quot;yes&quot; report_changes=&quot;yes&quot; realtime=&quot;yes&quot;&gt;C:\Windows\System32&lt;/directories&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ipVNSUaqc_Xh2BgaXQ8Mw.png" /></figure><p>Run the command Restart-Service -Name WazuhSvc to restart the wazuh agent and initiate the changes on the wazuh dashboard.</p><p><strong>Setting a scan frequency</strong></p><p>A syscheck_frequency value was also configured alongside real time monitoring to define how often Wazuh performs a full baseline scan of all monitored directories. For this lab, the frequency was set to 300 seconds, ensuring a complete integrity check runs every five minutes across all monitored directories on both the Kali and Windows agents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*b9VFhdRC8yy6nODZ0TWvDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I6GFUR06cUZ0iE2smv7VNQ.png" /></figure><p>To verify that our File Integrity Monitoring configuration is working as expected, we will make a deliberate and controlled change to a monitored file and observe whether Wazuh detects and alerts on it in real time.</p><p>In this case, we will be modifying the permissions of the log file alternatives.log.1 from rw-r--r-- (read and write for owner, read only for group and others) to rw-rw-r-- (read and write for both owner and group, read only for others).</p><p>To apply this change, run the following command:</p><p>sudo chmod 664 alternatives.log.1</p><p>This change is intentional and allows us to confirm that Wazuh is actively monitoring file attribute changes, not just file content modifications. Any permission change on a monitored file will be immediately captured and reported as a security event on the Wazuh dashboard in real time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*zwUhj6cNVFSoYCBtbOB1Ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*3L221fq-w5ZPaqRq-8GC9w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*X7LruW-zumOSJrUOAU3fNA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B_oVjPqqfr3WKkMYQPeihg.png" /></figure><p>This report documents a File Integrity Monitoring (FIM) test event generated on a Wazuh-monitored Kali Linux agent, captured by the syscheck module after a permission change on a monitored log file.</p><p><strong>Kali Agent Alert Summary</strong></p><p>File Path: /var/log/alternatives.log.1<br>Type of Change: Permission change (rw-r — r — → rw-rw-r — )<br>Timestamp: Jul 1, 2026 @ 21:09:02.661<br>Agent: 005 (Kali-Agent)<br>Rule / Alert ID: Rule 550 (Level 7)<br>User: root (uid 0)</p><p><strong>Alert Detail</strong></p><p>● Rule 550, Level 7, groups: ossec, syscheck, syscheck_entry_modified, syscheck_file</p><p>● MITRE ATT&amp;CK T1565.001 (Stored Data Manipulation) — Tactic: Impact</p><p>● Compliance: GDPR II_5.1.f, GPG13 4.11, HIPAA 164.312.c.1/c.2, NIST 800–53 SI.7, PCI DSS 11.5, TSC PI1.4/PI1.5/CC6.1/CC6.8/CC7.2/CC7.3</p><p>● Content integrity: syscheck.diff reports no content changes — only the permission bits changed; MD5/SHA1/SHA256 and file size are unchanged from baseline</p><p><em>Full log: “File ‘/var/log/alternatives.log.1’ modified. Mode: realtime. Changed attributes: permission. Permissions changed from ‘rw-r — r — ‘ to ‘rw-rw-r — ‘.”</em></p><p><strong>Next Steps If the Actor Were Unknown</strong></p><p>I would treat this as a low confidence but worth checking signal. Loosened permissions on a log file are a common precursor to log tampering, and the change maps to a recognised ATT&amp;CK data manipulation technique.</p><p>The file owner is root, but ownership alone does not tell me which account or process actually ran the chmod command. So I would correlate the alert timestamp at Jul 1, 2026 @ 21:09:02.661 with the auth and sudo logs and shell history on agent 005 to find the responsible session.</p><p>I would also check whether it ties to a known admin task such as a package update, an Ansible run, or a logrotate and alternatives operation, since this is a system managed file. Combined with the unchanged hashes and content, the drift is plausibly benign.</p><p>If no legitimate explanation surfaces, I would isolate or closely monitor the host, check for related changes and new or modified accounts, and rotate credentials as needed. I would document all findings and once confirmed, revert the permission and tighten alerting to prevent recurrence.</p><p><strong>Creating Custom Rules in Wazuh</strong></p><p>While the default Wazuh ruleset is extensive and covers a wide range of threat scenarios, it may not always align with the specific needs of every organization or the particular threat actors targeting them. In a real world SOC environment, security teams regularly create custom detection rules to monitor for activity that is unique to their environment, their assets, or the threats they face.</p><p>Custom rules allow analysts to go beyond what comes out of the box and tailor Wazuh’s detection capabilities to match the organization’s specific security requirements, whether that means detecting unusual access patterns, monitoring proprietary applications, or flagging activity that the default rules would otherwise miss.</p><p><strong>How Are Alerts Generated and Rules Applied?</strong></p><p>Understanding how Wazuh processes logs and fires alerts is essential before writing custom rules.</p><p>When a raw log arrives from an agent, it is first passed through the Wazuh decoder. The decoder parses the log and extracts the relevant fields from it, such as the timestamp, IP address, username, event type, and other key data points. This process transforms an unstructured raw log into structured, readable data that Wazuh can work with.</p><p>Once the log has been decoded and the fields extracted, the parsed data is then checked against the configured ruleset. Wazuh evaluates the data against each rule and if a match is found, an alert is fired and displayed on the dashboard.</p><p>In summary, the flow is: raw log received from agent → decoded and parsed → fields extracted → checked against rules → alert generated.</p><p>Custom rules for Wazuh live in /var/ossec/etc/rules/local_rules.xml on the manager. Like the default rules, they&#39;re written in XML, but their IDs need to start above 100000 to avoid colliding with Wazuh&#39;s built-in rule IDs.</p><p>For this setup, I’ll be building three custom rules:</p><ol><li>Alert when 5 failed SSH login attempts hit the Ubuntu machine from the same source IP within a 3-minute window</li><li>Alert when a new user account is created on the Kali machine</li><li>Alert when a USB device is detected on the Windows machine</li></ol><p><strong>Rule 1: SSH brute-force detection</strong></p><p>sudo nano /var/ossec/etc/rules/local_rules.xml</p><p>Add the following:</p><pre>&lt;group name=&quot;local,syslog,sshd,&quot;&gt;<br>&lt;rule id=&quot;100002&quot; level=&quot;10&quot; frequency=&quot;5&quot; timeframe=&quot;120&quot;&gt;<br>  &lt;if_matched_sid&gt;5760&lt;/if_matched_sid&gt;<br>  &lt;same_source_ip /&gt;<br>  &lt;description&gt;SSH brute force detected from $(srcip)&lt;/description&gt;<br>  &lt;group&gt;authentication_failed,&lt;/group&gt;<br>  &lt;mitre&gt;<br>    &lt;id&gt;T1110&lt;/id&gt;<br>  &lt;/mitre&gt;<br>&lt;/rule&gt;<br>&lt;/group&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*7YkA9eg5x8TgnHUJYx_4zQ.png" /></figure><p>Here, rule id is the unique identifier for the alert, level is its severity rating, frequency is how many matches are needed before the rule triggers, and timeframe is the window of time (in seconds) those matches have to occur within.<br>Restart the wazuh-manager for the changes to take effect.</p><p>On the Kali machine, attempt to SSH into the Ubuntu server using an incorrect password five times in a row.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*1dMNsyMd73Nye2DSEMCr5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*BNoRkKPL_pmuYjdRanKd4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*Q-E_XmEXIxEPv_DTNtYVqw.png" /></figure><p>After five consecutive failed SSH login attempts from the Kali machine, the alert fired successfully.</p><p><strong>Rule 2 : New user account creation on the Kali machine</strong></p><p>Similar to the previous rule, open the custom rules XML file and add the following block:</p><pre>&lt;group name=&quot;local,syslog,adduser,&quot;&gt;<br>&lt;rule id=&quot;100003&quot; level=&quot;8&quot;&gt;<br>  &lt;if_sid&gt;5902&lt;/if_sid&gt;<br>  &lt;description&gt;New User added: $(dstuser),verify this was authorized&lt;/description&gt;<br>  &lt;group&gt;syslog,useradd,&lt;/group&gt;<br>  &lt;mitre&gt;<br>    &lt;id&gt;T1136.001&lt;/id&gt;<br>  &lt;/mitre&gt;<br>&lt;/rule&gt;<br>&lt;/group&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*b7u8cnENUgFVdUCrN9yGQQ.png" /></figure><p>Reload the Wazuh manager so the rule updates go live. Then, on the Kali box, spin up a test account with sudo adduser Test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*P02YzHCSnJwIjbQ1CwUJ1w.png" /></figure><p>The Wazuh dashboard should show a new alert once this happens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*SP771VbZdCysnSjD16vQLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*w5yrqbzFSyTuMgs0M4u8Mw.png" /></figure><p>With that, both custom rules are up and running.</p><p><strong>Rule 3:USB device</strong></p><p>Follow the same approach to get Windows alerting on USB insertion: open the .xml configuration file and add the block below.</p><pre>&lt;group name=&quot;windows,usb,&quot;&gt;<br>  &lt;!-- RULE 3: USB Insertion Detection — Windows --&gt;<br>  &lt;rule id=&quot;100004&quot; level=&quot;10&quot;&gt;<br>    &lt;if_sid&gt;60227&lt;/if_sid&gt;<br>    &lt;description&gt;USB storage device inserted on $(win.system.computer)&lt;/description&gt;<br>    &lt;mitre&gt;<br>      &lt;id&gt;T1091&lt;/id&gt;<br>    &lt;/mitre&gt;<br>  &lt;/rule&gt;<br>&lt;/group&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*fCjA-Y-XUlXrlnfwjKo6qg.png" /></figure><p>Restart the Wazuh manager on the Ubuntu server, plug a USB device into the Windows agent, and check for the event on the Wazuh dashboard.</p><p><strong>Challenge:</strong> No USB event showed up on the manager side. After digging into it, I traced the issue to Event ID 6416 — the Plug and Play device log entry in Windows&#39; Security log — which isn&#39;t captured by default. It only gets logged once the matching Advanced Audit Policy subcategory is switched on.</p><p>To enable it, run the following from an elevated Command Prompt or PowerShell on the Windows endpoint:<br>auditpol /set /subcategory:&quot;Plug and Play Events&quot; /success:enable<br>Then confirm it took effect:<br>auditpol /get /subcategory:&quot;Plug and Play Events&quot;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*T144s4oOZ_YjeDEN38zEFg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NtNoCgNjrcbkS6krh8HVlQ.png" /></figure><p>After that fix, I unplugged the USB device and plugged it back in — and this time the alert fired successfully on the Wazuh manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X9-uB7sADk16D32iEITong.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*GQii4gXMzWWszU0oPuvomA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*jLMvRJ0mMmJ4qLGyiIG9VQ.png" /></figure><p>With that, all three custom rules are fully operational.</p><p><strong>Rules Tuning Note</strong></p><p><strong>Rule 100002 — SSH Brute Force Detection</strong></p><p><strong>Rule 100002</strong> detects a brute-force SSH login attempt: more than 5 failed authentication attempts from the same source IP within a 120-second window. It relies on a supporting base rule, 5760, which classifies individual failed SSH login events, and uses if_matched_sid, frequency=&quot;5&quot;, timeframe=&quot;120&quot;, and &lt;same_source_ip /&gt; to correlate repeated failures from one IP.</p><p>It was tested by generating repeated failed SSH login attempts from the same source IP against the monitored host. The rule fired as expected, and alerts were confirmed in /var/ossec/logs/alerts/alerts.log on the Wazuh manager.</p><p><strong>Rule 100003 — New User Account Creation (Linux)</strong></p><p>This rule detects when a new user account is created on a Linux host via useradd/adduser, escalating the event from the default low-severity syslog classification to a level-8 alert for review, since account creation can indicate either legitimate administration or a persistence technique (MITRE T1136.001).</p><p>It was tested by running sudo adduser Test on the Kali endpoint. The command generated the expected event, and an alert was confirmed on the Wazuh dashboard.</p><p><strong>Rule 100004 — USB Device Insertion (Windows)</strong></p><p>This rule detects when a USB storage device is plugged into a monitored Windows endpoint, alerting on Plug and Play device events (Event ID 6416) via if_sid mapped to the confirmed base rule (60227), flagged under MITRE T1091 (Replication Through Removable Media).</p><p>It was tested by physically inserting a USB device into the Windows agent machine. The first test produced no alert — troubleshooting traced this to Windows not logging Event ID 6416 by default, since the Plug and Play Events subcategory of Advanced Audit Policy is disabled out of the box.</p><p>After enabling it on the endpoint with: auditpol /set /subcategory:&quot;Plug and Play Events&quot; /success:enable and confirming with: auditpol /get /subcategory:&quot;Plug and Play Events&quot; the USB device was removed and reinserted. This second test successfully generated an alert on the Wazuh manager, confirming the rule and the underlying audit policy configuration were both correctly tuned.</p><p><strong>Summary</strong></p><p>All three custom rules are confirmed operational end to end — from raw log/event generation on the endpoint, through Wazuh decoding and rule matching, to alert visibility on the Wazuh manager/dashboard</p><p><strong>LOG ANALYSIS</strong></p><p>On the Kali machine, I deliberately triggered authentication failure logs — first by entering a wrong password at login, then by repeatedly attempting to switch to the root user with an incorrect password, all as part of this analysis.</p><p><strong>Log Analysis Report — Authentication Failures</strong></p><p>Source(s) covered: Linux (Kali-Agent)<br>Scope: Authentication failure events generated during controlled testing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*bqGW20pihSPIG56gW5ZKYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*wBv4IPRDWzy4aw570BcHcg.png" /></figure><p><em>Linux — Kali-Agent (192.168.8.137, agent.id 005)<br>Event Type: Local Login Failure (Screen Lock)<br>unix_chkpwd Password Check Failed</em></p><p><strong>Raw event detail:<br></strong>Jul 03 19:44:10 kali unix_chkpwd[261569]: password check failed for user (kali)<br>Rule ID: 5557<br>Rule level: 5<br>Rule groups: pam, syslog, authentication_failed<br>MITRE: T1110.001 (Password Guessing) / Credential Access<br>Decoder: unix_chkpwd</p><p><strong>What it means:</strong> This alert comes from a low-level Linux tool called unix_chkpwd, which is the part of the system PAM (the login-checking system) calls on to actually compare the password you typed against the stored one. So this isn&#39;t a separate event — it&#39;s the &quot;under the hood&quot; confirmation that a password check failed, triggered by whatever you were doing on the surface (in this case, unlocking the screen).</p><p><strong>Is it a problem?</strong> No. This matches a wrong password entered on purpose during testing. One failed attempt like this isn’t something to worry about. It would only be worth digging into if it kept happening quickly and repeatedly, or if it came from a login session that shouldn’t be active in the first place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*wK15QRuEpEdMUV3RjZtzJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*6Ah3joIaGn4fHBk8960xwQ.png" /></figure><p><em>PAM: User Login Failed (xfce4-screensaver-dialog)</em></p><p><strong>Raw event detail:<br></strong>Jul 03 19:44:10 kali xfce4-screensaver-dialog[261403]: pam_unix(xfce4-screensaver:auth): authentication failure; logname=kali uid=1000 euid=1000 tty=:0.0 ruser= rhost= user=kali<br>Rule ID: 5503<br>Rule level: 5<br>Rule groups: pam, syslog, authentication_failed<br>MITRE: T1110.001 (Password Guessing) / Credential Access<br>Decoder: pam</p><p><strong>What it means:</strong> This alert is the login-checking system (PAM) recording the same failed unlock attempt as before, at the exact same moment. A couple of details in the log confirm this happened locally, right on the machine itself, rather than someone trying to get in remotely — there’s no remote username or remote address listed anywhere in the log. So really, this and the previous alert are just two different ways of recording the same single mistake.</p><p><strong>Is it a problem?</strong> No. This lines up with an intentional wrong password typed at an already-unlocked, logged-in desktop. Since it’s clearly local and not remote, there’s no reason for concern here — unless this kind of failure started happening over and over quickly, which would point to something more like a repeated break-in attempt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*Zo0A3HSi1e8eCnSgmVqPLg.png" /></figure><p><em>Event Type: Privilege Escalation Failure (su)<br>FAILED SU (to root)</em></p><p><strong>Raw event detail:<br></strong>Jul 03 19:44:25 kali su[261684]: FAILED SU (to root) kali on pts/0<br>Rule ID: 5301<br>Rule level: 5<br>Rule description: User missed the password to change UID (user id)<br>Rule groups: syslog, su, authentication_failed<br>Decoder: su</p><p><strong>What it means:</strong> This alert comes directly from the su command itself — the tool people use to switch to another user account, in this case trying to become the all-powerful &quot;root&quot; (admin) account. The log shows exactly who tried it (kali), what account they were trying to become (root), and that it happened from an actual terminal window someone was typing into, not through a script or a remote connection.</p><p><strong>Is it a problem?</strong> Not in this case, since it was a deliberate test. But this kind of event deserves a bit more attention than a normal failed login, because trying to become admin is a bigger deal than just logging in. On its own, one failed attempt like this usually isn’t alarming — but it would be worth investigating if it happened repeatedly, at odd hours, or from an account that has no real reason to need admin access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*XwEVJ5Bk9TNpzI8TYv4BSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*vrEGPtA1XIrOj89HY_0UXA.png" /></figure><p><em>PAM: User Login Failed (su)</em></p><p><strong>Raw event detail:<br></strong>Jul 03 19:44:29 kali su[261752]: pam_unix(su:auth): authentication failure; logname=kali uid=1000 euid=0 tty=/dev/pts/0 ruser=kali rhost= user=root<br>Rule ID: 5503<br>Rule level: 5<br>Rule groups: pam, syslog, authentication_failed<br>MITRE: T1110.001 (Password Guessing) / Credential Access<br>Decoder: pam</p><p><strong>What it means:</strong> This is the login-checking system (PAM) recording that same failed attempt to become root, logged just four seconds after the su command&#39;s own log entry. The details confirm the same story: kali was trying to become root, and the system rejected it at the password-check stage.</p><p><strong>Is it a problem?</strong> No. This is essentially a second copy of the same failed attempt already covered above — not a new event, just the same action being logged by a different part of the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*I1r1Var2n4_WDCMb7PAaTQ.png" /></figure><p><em>unix_chkpwd Password Check Failed (root)</em></p><p><strong>Raw event detail:<br></strong>Jul 03 19:44:29 kali unix_chkpwd[261762]: password check failed for user (root)<br>Rule ID: 5557<br>Rule level: 5<br>Rule groups: pam, syslog, authentication_failed<br>MITRE: T1110.001 (Password Guessing) / Credential Access<br>Decoder: unix_chkpwd</p><p><strong>What it means:</strong> This is the same low-level password-check tool from earlier (unix_chkpwd), but this time it&#39;s checking the password against the root account instead of kali. It confirms the failure happened right at the point of verifying the root password — matching up with the attempted switch to root.</p><p><strong>Is it a problem?</strong> No. Like the two alerts before it, this isn’t a new or separate event — it’s the third and final log entry generated by that same single failed attempt to become root.</p><p><strong>One action, three alerts.</strong> All three alerts from the “su” attempt actually came from one single action — trying to switch to root with the wrong password. Wazuh has three different parts (su, PAM, and unix_chkpwd) that each log their own record of what happened, so one real attempt shows up as three separate alerts. This is completely normal behavior, but it&#39;s worth remembering when counting alerts or setting thresholds for things like brute-force detection — otherwise you might think three attempts happened when it was really just one.</p><p><strong>Everything here was expected.</strong> Every alert in this report came from tests I ran on purpose — typing a wrong password at screen unlock, and trying to become root with a wrong password. None of it points to anything suspicious.</p><p><strong>This all happened locally, not remotely.</strong> Every alert shows signs that this activity happened right at the machine itself, not from somewhere else on the network. That’s an important detail, because a real brute-force attack usually comes from a remote location, not the local keyboard.</p><p><strong>What would actually be worth worrying about.</strong> If this same type of alert showed up again but <em>wasn’t</em> explained by known testing — especially repeated attempts to become root, or attempts that show signs of coming from somewhere else on the network — that’s when it should get flagged for a closer look.</p><p><strong>Summary</strong></p><p><strong>Screen unlock — wrong password typed</strong></p><ul><li>The system’s password checker rejected the login. Routine.</li><li>The login system (PAM) recorded the same failed attempt. Routine.</li></ul><p><strong>Trying to become root — wrong password typed</strong></p><ul><li>The command to switch to root failed. Routine.</li><li>The login system (PAM) recorded that failed switch to root. Routine.</li><li>The password checker rejected the password specifically for the root account. Routine.</li></ul><p>All five alerts trace back to just two real actions — one wrong password at screen unlock, and one wrong password while trying to become root — each one logged from a few different angles by the system. Nothing here points to a real problem; everything matches expected, intentional testing</p><p>.</p><p><strong>Windows Agent Log analysis</strong></p><p>I deliberately entered the wrong password first when logging into my Windows agent, then followed up with the correct one. The failed attempts are tagged under Event ID 4625, while the successful login falls under Event ID 4624 — and separately, Event ID 4672 fires to note that special privileges were assigned to that logon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*82My8ow1HL872yoQ38S1lw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3mjfJwW2uI2YtQ76bqGTBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L2PGV_RysmVJQaRxd-0PSA.png" /></figure><p><strong>Log Analysis Report — Windows Authentication Events</strong></p><p>Windows (Windows-Agent) Scope: Authentication-related events generated during controlled testing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WUC22pm3rRjjyh7KIUY4IA.png" /></figure><p><em>Windows — Windows-Agent (192.168.8.1, agent.id 009)<br>Event Type: Interactive Logon (Failure and Success)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*dzFIT2KBFd-eSWFZWjHFqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*PWI9zgbpadhWD1ly1I3ErQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*7w3d45zk2gXbUlPXHO51qA.png" /></figure><p><em>Event ID 4625: Logon Failure (Unknown user or bad password)</em></p><p><strong>Raw event detail:<br></strong>Event ID: 4625 <br>Computer: Seyi-1 <br>Logon Type: 2 (Interactive) <br>Authentication Package: Negotiate Logon <br>Process: User32 <br>Process Name: C:\Windows\System32\svchost.exe <br>IP Address: 127.X.X.X | Port: 0 <br>Subject: SEYI-1$ / WORKGROUP (S-1–5–18) <br>Target User SID: S-1–0–0 <br>Status: 0xc000006d <br>Failure Reason: %%2304 <br>Timestamp: Jul 3, 2026 @ 22:11:24<br>Rule ID: 60122 <br>Rule level: 5 <br>Rule groups: windows, windows_security, authentication_failed <br>MITRE: T1531 (Account Access Removal) / Impact</p><p><strong>What it means:</strong> This is a failed login attempt on the Windows machine itself. A couple of technical details in the log confirm this — the system couldn’t match the password to a real account, and the type of login recorded matches someone sitting right at the machine’s own lock screen, not someone connecting in from elsewhere. <br>The address and process listed in the log are also exactly what you’d expect for a normal local login attempt, nothing tied to a remote connection.</p><p><strong>Is it a problem?</strong> No. This matches an intentional wrong-password entry during testing. It would only be worth a closer look if this kept happening rapidly and repeatedly, showed up at an odd hour, or had signs of coming from somewhere other than the machine itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*KONmkzQfhjyiEsiG7Z9Yhg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*7ssYQxFhUBlYUs-9Uhwqfg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*GMuyua6aS0eHqH_CqEd5KA.png" /></figure><p><em>Event ID 4624: Logon Success (Non-network/service local logon)</em></p><p><strong>Raw event detail:<br></strong>Event ID: 4624 <br>Computer: Seyi-1 <br>Logon Type: 11 (Cached interactive/credential logon) <br>Authentication Package: Negotiate Process <br>Name: C:\Windows\System32\svchost.exe <br>IP Address: 127.X.X.X<br>Subject: SEYI-1$ / WORKGROUP (S-1–5–18) <br>Target Account: [redacted personal Microsoft account] <br>Timestamp: Jul 3, 2026 @ 22:11:29<br>Rule ID: 67022 <br>Rule level: 3 <br>groups: windows, WEF <br>Rule description: Non network or service local logon</p><p><strong>What it means:</strong> This alert confirms a successful login to the account, happening just 5 seconds after the earlier failed attempt. The type of login recorded is exactly what’s expected for a Microsoft account signing in using saved (cached) credentials. Because the success happened so quickly after the failure, it strongly suggests both events are really just one login session — a mistyped password, immediately followed by the correct one.</p><p><strong>Is it a problem?</strong> No. This is exactly what you’d expect to see right after a wrong password entry — the same person getting it right on the next try. There’s nothing here suggesting the account was accessed by anyone else; it’s the same machine, the same account, and no signs of anything unusual.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*lWMnmYL5x2czBEauOSr2IQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*-xTxWLHwtAK4JmA_Ija2SA.png" /></figure><p><em>Event Type: Privileged Logon<br>Event ID 4672: Special Privileges Assigned to New Logon</em></p><p><strong>Raw event detail: <br></strong>Event ID: 4672 <br>Computer: Seyi-1 <br>Account Name: [redacted personal Microsoft account] <br>Timestamp: Jul 3, 2026 @ 22:08:24<br>Rule ID: 67028 <br>Rule level: 3 <br>Rule groups: windows, WEF <br>MITRE: T1484 (Domain Policy Modification) / Defense Evasion, Privilege Escalation</p><p><strong>What it means:</strong> This alert shows that the account was given a set of powerful, sensitive permissions the moment it logged in. That sounds alarming, but it’s actually automatic — Windows does this every single time an administrator-level account logs in, whether or not anything suspicious is happening. It’s not evidence that someone tried to grab extra permissions; it’s just Windows noting that an already-privileged account is now active.</p><p><strong>Is it a problem?</strong> Not on its own. This kind of alert only becomes meaningful with context — whether the account is actually supposed to have admin rights, whether the login happened at a normal time and place, and whether it’s paired with anything else unusual. In this case, it’s simply a known admin account logging into its own machine, so there’s nothing here that needs further action.</p><p><strong>Observations Across Findings</strong></p><p><strong>A failed login followed quickly by a success is a normal pattern.</strong> These two events together — one mistake, then the correct password seconds later — are a useful example of what “normal human error” looks like in the logs. This is different from a real brute-force attempt, where you’d typically see many failures in a row with no eventual success, or failures coming from somewhere other than where the final successful login happens.</p><p><strong>The “special privileges” alert needs context to mean anything.</strong> On its own, this type of alert is routine and expected for any known admin account logging in. But it’s also exactly the kind of alert that becomes important in a real investigation — if it showed up on an account that isn’t supposed to have admin rights, at a strange hour, or right after signs of someone hopping between systems, that same alert would go from “nothing to worry about” to “worth investigating immediately.”</p><p><strong>Summary</strong></p><p>Here’s the plain-language summary:</p><p><strong>Wrong password typed at login</strong></p><ul><li>The login failed because the password didn’t match any known account. Routine.</li></ul><p><strong>Correct password typed right after</strong></p><ul><li>The login succeeded, just 5 seconds after the failed attempt. Routine.</li></ul><p><strong>Admin account privileges noted</strong></p><ul><li>Windows automatically recorded that the account logging in has administrator rights. Routine.</li></ul><p>All three alerts trace back to one real action — a mistyped password immediately corrected by the right one — plus a routine, automatic note that the account involved has admin-level access. Nothing here points to a real problem.</p><p><strong>Account creation on windows</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*eiSo4_1me9vqwnuGMvAofw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*wKdvqhu66KTMRRQ4_Nu9HA.png" /></figure><p><strong>Kali_alerts.csv</strong> — I ran a query against my Kali alerts, filtering it down to the critical ones: failed logins, PAM sessions, and new user creation events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yaSf2ZVg13Mf1nnO34Adng.png" /></figure><p><strong>windows_alerts.csv</strong> — I ran queries against my Windows alerts and exported the results to a CSV.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SaM65K8w-DpmJO5llsuYxw.png" /></figure><p><strong>Active Response on wazuh</strong></p><p>Active Response is Wazuh’s module for automatically executing scripts on a monitored endpoint when a specific alert fires, it helps security teams automate response actions based on specific triggers, so high-priority incidents get addressed quickly and consistently, which is especially valuable when security teams are resource-constrained. Wazuh ships with several out-of-the-box scripts (e.g. blocking an IP via firewall, disabling a user account).</p><p>Example is the SSH brute-force rule ialready built (rule 100002), the classic pairing is: <strong>rule fires → active response blocks the attacking IP automatically.</strong></p><p><strong>Configuring Active response</strong></p><p>Open ossec.conf on the Manager and locate the active-response block — that&#39;s where the response actions get defined. I need to set up a response that fires the firewall-drop command whenever the SSH brute-force condition is triggered. <br>firewall-drop comes built into Wazuh by default and works by adding an iptables rule to block incoming traffic from the offending IP. I&#39;m setting the threshold at five failed SSH authentication attempts, and using a 3-minute timeout for testing — long enough to actually observe the block being applied and then lifted, without sitting around waiting forever.</p><p>Add the follow line to the Active response section</p><p>&lt;active-response&gt;<br> &lt;disabled&gt;no&lt;/disabled&gt;<br> &lt;command&gt;firewall-drop&lt;/command&gt; <br>&lt;location&gt;local&lt;/location&gt;<br> &lt;rules_id&gt;100002&lt;/rules_id&gt;<br> &lt;timeout&gt;180&lt;/timeout&gt; &lt;/active-response&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*imEOAP1U-7muIqfX6jHdPQ.png" /></figure><p>Restart the Wazuh manager so the changes take effect. To confirm the configuration worked, I ran 5 failed SSH login attempts on the Kali machine to trigger the alert tied to rule ID 100002.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*dGITA5v5sOluLfyMY71T5Q.png" /></figure><p>After the 5th attempt, the SSH connection stopped responding entirely. I checked the Wazuh dashboard to see whether the event had been logged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*dwb4HgL6Hb8sh6uG88pTcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*Ov09ZbMKi4ezxYd6X8vtSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*-c0-QMNkvfZ-DRTaQqQiqw.png" /></figure><p>The active response fired successfully. To dig a bit deeper, while the Kali IP was still flagged, I checked the Ubuntu server’s iptables to confirm the IP actually showed up in the block list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*IoYsEHTrdQ_Uvm_nV__0EA.png" /></figure><p>To verify the 3-minute block duration was actually enforced, I re-ran the iptables check on the server after waiting out the full 3 minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*ShxR1RifbP4YX2C9WjFPmA.png" /></figure><p>Sure enough, the Kali IP address was unblocked once the timeout elapsed.</p><p><strong>Active Response — Risks and Safeguards for Production Use</strong></p><p>Our test worked well in a controlled setting: we intentionally failed SSH login 5 times, rule 100002 fired, and firewall-drop blocked the Kali IP for 3 minutes. Real environments introduce two problems this test didn&#39;t have to deal with.</p><p><strong>False positives.</strong> In our case, we knew the failures were intentional. A real user who mistypes their password five times gets the same treatment — and if their IP is shared (an office NAT, a jump box, a VPN gateway), the block can lock out everyone behind it, not just the person who made the mistake.</p><p><strong>IP spoofing.</strong> We blocked the Kali IP because it genuinely was the source. But any rule keyed off source IP is only as reliable as that IP being real and unspoofable. An attacker who can fake failed-auth traffic as coming from a critical server could trick the same logic into blocking infrastructure you can’t afford to lose — a self-inflicted outage with no actual compromise needed.</p><p><strong>Safeguards before production:</strong></p><ol><li>Allowlist critical infrastructure (load balancers, DNS, jump boxes) so they can never be auto-blocked.</li><li>Keep first-offense timeouts short; escalate only for repeat offenders.</li><li>Scope to local or defined-agent, never all, so one bad trigger can&#39;t cascade fleet-wide.</li><li>Alert a human the moment a block fires, so false positives can be reversed immediately.</li><li>Stage in a lab first — prove the rule, response, and timeout reversal, exactly as we did here, before pointing it at real traffic.</li></ol><p>The core idea: our test was safe because we controlled the conditions that triggered it. Production traffic doesn’t offer that guarantee, which is what these safeguards are for.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e6fe3eee48d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wazuh Integration with Suricata]]></title>
            <link>https://medium.com/@olaniyiseyi02/wazuh-integration-with-suricata-ae156a071462?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae156a071462</guid>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Sun, 28 Jun 2026 18:22:12 GMT</pubDate>
            <atom:updated>2026-06-28T20:41:06.886Z</atom:updated>
            <content:encoded><![CDATA[<p>In this lab, we will be integrating Wazuh with a Network Intrusion Detection System (NIDS) deployed on our Kali Linux endpoint. The NIDS will continuously monitor network traffic on the endpoint, analysing packets in real time to identify and alert on any suspicious or anomalous activity.</p><p>For this lab, we will be deploying Suricata as our network intrusion detection system on the Kali Linux machine. Suricata is an open source NIDS that inspects network traffic in real time, detecting and alerting on potentially malicious or abnormal activity based on predefined detection rules.</p><p>To install Suricata, run the following commands:</p><p>sudo apt-get update</p><p>sudo apt-get install suricata -y</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*pcv-BXRgJJc_9tR6-JErcA.png" /></figure><p>Once the installation is complete, the next step is to download and extract the Emerging Threats Suricata ruleset.</p><p><strong>What are emerging threats?</strong></p><p>Emerging Threats is an open-source project that maintains a continuously updated library of detection rules and threat signatures for intrusion detection systems like Suricata. These rules are developed by security researchers and reflect the current threat landscape, allowing Suricata to detect known attack patterns and malicious network traffic without the need to write rules from scratch. Think of it as a threat intelligence feed that keeps your NIDS informed and effective.</p><p>To download and extract the Emerging Threats ruleset, run the following commands:</p><p>cd /tmp/ &amp;&amp; curl -LO <a href="https://rules.emergingthreats.net/open/suricata-7.0/emerging.rules.tar.gz">https://rules.emergingthreats.net/open/suricata-7.0/emerging.rules.tar.gz</a></p><p>sudo tar -xvzf emerging.rules.tar.gz</p><p>sudo mkdir -p /etc/suricata/rules</p><p>sudo mv rules/*.rules /etc/suricata/rules/</p><p>sudo find /etc/suricata/rules -name &quot;*.rules&quot; -exec chmod 640 {} \;</p><p>sudo suricata-update</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*DqnGOrK0ifmliDGmChrZbA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*u7tPDw20ZYMKYi36ikc-eQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*URa6lDvbsLApVgE2iHFwIg.png" /></figure><p>Run the command sudo suricata -T -c /etc/suricata/suricata.yaml -v 2&gt;&amp;1 | tail -10 to load the configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*aoMorTQxv-Ba3KI5PfQR3w.png" /></figure><p><strong>Configuring Suricata</strong></p><p>Next, we need to modify the Suricata configuration file located at /etc/suricata/suricata.yaml. Update the following variables to match your environment:</p><pre>HOME_NET: &quot;&lt;Kali_IP&gt;&quot;<br><br>EXTERNAL_NET: &quot;any&quot;<br><br>stats:<br>  enabled: yes<br><br>af-packet:<br>  - interface: eth1</pre><p>Replace &lt;Kali_IP&gt; with the actual IP address of your Kali machine. The HOME_NET variable tells Suricata which network to treat as internal and protected, while EXTERNAL_NET defines all other traffic as external. The af-packet interface should be set to the network interface you want Suricata to monitor. In this lab, we are using eth1.</p><p>Once all the configuration changes have been saved, restart the Suricata service to apply them by running the following command: sudo systemctl restart suricata</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*qtVNvGT3AJ6YlqKUhlVU-Q.png" /></figure><p><strong>Integrating Suricata with Wazuh</strong></p><p>To enable Wazuh to collect and analyse Suricata alerts, we need to configure the Wazuh agent on the Kali machine to monitor Suricata’s log output. Add the following block to the Wazuh agent configuration file located at /var/ossec/etc/ossec.conf:</p><pre>&lt;localfile&gt;<br>    &lt;log_format&gt;json&lt;/log_format&gt;<br>    &lt;location&gt;/var/log/suricata/eve.json&lt;/location&gt;<br>&lt;/localfile&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*4TsETEgG-JtXaaWzoccqNg.png" /></figure><p>This tells the Wazuh agent to read Suricata’s eve.json log file, which contains detailed records of all network events and alerts detected by Suricata, and forward them to the Wazuh manager for analysis and alerting.</p><p>Once the changes have been saved to the Wazuh agent configuration file, restart the Wazuh agent to apply them by running the following command:<br>sudo systemctl restart wazuh-agent</p><p><strong>Attack Emulation</strong></p><p>Wazuh automatically parses data from /var/log/suricata/eve.json and generates related alerts on the Wazuh dashboard. To verify that the integration is working correctly, we will simulate some network activity and observe how Suricata detects it and how Wazuh displays the resulting alerts.</p><p>First, ping the Kali endpoint from the Wazuh server to generate ICMP traffic:<br>ping -c 10 &quot;&lt;Kali_IP&gt;&quot;<br>Next, run an Nmap scan against the Kali IP address to simulate a reconnaissance attempt, which Suricata should detect and alert on:<br>sudo nmap -sS &lt;Kali_IP&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*kA2W3zDtikTuqSMUyt1xiw.png" /></figure><p>Once these commands are executed, navigate to the Wazuh dashboard and check the Kali agent for new alerts. You should begin seeing Suricata-generated events appearing in real time, confirming that the integration between Suricata and Wazuh is working as expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HUUKfAGPBf7p8oIGibMhvw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aj3Sj9yknXT902tRx2Lw0A.png" /></figure><p>We now have a fully working <strong>Wazuh + Suricata NIDS integration</strong> where:</p><ul><li>Suricata is detecting network scans and threats on your Kali endpoint</li><li>Wazuh agent is forwarding those alerts to the manager</li><li>The Wazuh dashboard is displaying everything in real time.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae156a071462" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a SIEM Lab with Wazuh: A Hands-On File Monitoring Guide]]></title>
            <link>https://medium.com/@olaniyiseyi02/building-a-siem-lab-with-wazuh-a-hands-on-file-monitoring-guide-08a92bde76bf?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/08a92bde76bf</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Thu, 25 Jun 2026 03:01:22 GMT</pubDate>
            <atom:updated>2026-06-25T03:01:22.287Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Introduction</blockquote><p>In this lab setup, we will be installing and configuring Wazuh as our Security Information and Event Management (SIEM) solution. This hands-on guide walks through deploying a fully functional security monitoring environment from scratch.</p><blockquote><strong>Lab Overview</strong></blockquote><p>This lab consists of the following components:</p><p><strong>Server:</strong></p><ul><li>Wazuh Server/Manager deployed on Ubuntu 24.04</li></ul><p><strong>Agent:</strong></p><ul><li>Windows Agent</li></ul><p>By the end of this lab, you will have hands-on experience with the following:</p><ul><li><strong>Wazuh Server Deployment</strong> — Installing and configuring the Wazuh manager on Ubuntu 24.04</li><li><strong>Agent Deployment</strong> — Connecting both Windows and Ubuntu machines as Wazuh agents</li><li><strong>File Integrity Monitoring (FIM)</strong> — Detecting and alerting on unauthorized file changes</li></ul><p><strong>Installing Wazuh</strong></p><p>To get started, navigate to <a href="https://documentation.wazuh.com/current/quickstart.html">https://documentation.wazuh.com/current/quickstart.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LfnRF9xfk3pBMAJIGEYlA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fm1PDVlTG9Vrn_RIE2T74w.png" /></figure><p>This page contains everything needed for a successful installation, including:</p><ul><li>Installation guides</li><li>Hardware requirements</li><li>Supported operating systems</li><li>Deployment methods</li><li>Initial configuration steps</li></ul><p>The documentation is beginner-friendly and provides step-by-step instructions for setting up the Wazuh manager, dashboard, and agents.</p><p><strong>Virtual Machine Requirements</strong></p><p>If you are installing Wazuh on a virtual machine using VirtualBox, proper resource allocation is very important. Wazuh can be resource-intensive, especially when running the manager and dashboard together.</p><p>To ensure smooth performance, configure your VirtualBox settings with at least the following:</p><ul><li>4 CPU cores</li><li>8GB RAM</li><li>50GB hard disk space</li></ul><p>Allocating these resources helps prevent performance issues during installation, indexing, and log monitoring activities.</p><p>On your Ubuntu virtual machine, run the command curl -sO https://packages.wazuh.com/4.7/wazuh-install.sh &amp;&amp; sudo bash ./wazuh-install.sh -a -i to download and install Wazuh. This command will automatically download the official Wazuh installation script and install all the necessary components on your machine, including the Wazuh indexer, Wazuh manager and Wazuh dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QMQWbfzqUKv-ZgxhzAYivg.png" /></figure><p>Once the installation is complete, you will be provided with login credentials that will grant you access to the Wazuh dashboard. You can access the Wazuh web interface by navigating to it https://&lt;Ubuntu IP&gt;:443 in your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cyaivRnForWCthtA7C1fAQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jP3HlzFNrSR8l0275fXAPw.png" /></figure><p>The Wazuh server has been successfully installed and configured on our Ubuntu machine.</p><p><strong>Deploying Windows agent.</strong></p><p>While it is possible to deploy a Wazuh agent automatically by visiting the Wazuh website and downloading the agent GUI installer, we will be using the manual deployment method for this setup.</p><p>On the Wazuh dashboard, click on the <strong>Add an Agent</strong> button to begin the process of deploying your first agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mGpkvAHW7HE4sQ-Hc1DkBA.png" /></figure><p>A new page will appear prompting you to fill in the following details:</p><ul><li><strong>Operating System</strong> — Select the operating system of the agent to be deployed</li><li><strong>Server IP Address</strong> — Enter the IP address of your Ubuntu machine</li><li><strong>Agent Name</strong> — Provide a name for the agent</li><li><strong>Group</strong> — Select the group the agent will belong to; for this setup we will use the <strong>default</strong> group</li></ul><p>Once all the required details have been filled in, a command to install the Wazuh agent on the target system will be automatically generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fi62OiSlPEroj1YlzDe-UQ.png" /></figure><p>On your Windows machine, open <strong>PowerShell as administrator</strong> and run the provided command to complete the agent installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*FuNvbfzGCPF8QMFTqGrt2w.png" /></figure><p>Once the Wazuh agent installation is complete on the Windows machine and the Wazuh service has been started, the agent will automatically connect to the Wazuh manager and appear as an active agent on the dashboard, and you should begin receiving live security event feeds from the Windows machine in real time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kp4tCnFXsGaKRa9a0TBJ8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LuN_vjAl3Bl1wjWOkr3oiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCP0-9siXeu0dwxeS44i4g.png" /></figure><p>We can now view and monitor events and logs coming from the Windows agent in real time. Since Wazuh also functions as an Extended Detection and Response (XDR) solution, it offers a wide range of security capabilities beyond just log monitoring. These include vulnerability detection, system scanning, file integrity monitoring and much more, making it a comprehensive security monitoring and response platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*2l_RNJN8g-BvO6FNNZ_GPA.png" /></figure><p>To generate new logs and observe real-time responses on the Wazuh manager, we will install an application on the Windows machine. Open PowerShell on the Windows machine and run the command winget install mozilla to install Mozilla Firefox. This will trigger installation logs that will be captured and forwarded to the Wazuh manager in real time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*63W3DhPUK3KOWiJLeP2Nlg.png" /></figure><p>As soon as the Mozilla Firefox installation begins and completes on the Windows machine, the entire installation process will be captured and logged as a security event on the Wazuh manager dashboard, demonstrating the real-time monitoring capabilities of Wazuh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QlFfX612wccsYa08hJ0CRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Vgc8eZK5lfwxXeHpQISbA.png" /></figure><p>The Wazuh vulnerability scanner has completed its scan and confirmed that the Windows agent is currently free from any known threats or vulnerabilities.</p><p><strong>File Integrity Monitoring</strong></p><p>File Integrity Monitoring (FIM) is a security feature that allows us to monitor and detect any unauthorised or suspicious changes made to specific files, folders or directories on a monitored system, alerting us in real time whenever a modification, addition or deletion is detected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uXTo6AkE1sjCDpoKhiTWbQ.png" /></figure><p>By default, no files or directories are assigned for integrity monitoring on the Windows agent, which is why there is currently no real-time FIM data being displayed. To assign a file or directory for monitoring, navigate to the Program Files/ossec-agent directory on the Windows machine. Inside this directory, you will find the <strong>ossec.conf</strong> configuration file. Open this file as an administrator and add the desired directory path to enable file integrity monitoring on that location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*hWNrE8qFjpevTz8K6jbN5Q.png" /></figure><p>On the Windows machine, create a new folder of your choice. in the case of the setup, I created a new directory named FIM TEST FOLDER</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wFaFiIbfNTG77EwF89TQUQ.png" /></figure><p>Copy the path of the directory you want to monitor and open the ossec.conf file. Under the File Integrity Monitoring section, add the following line &lt;directories realtime=&quot;yes&quot;&gt;(path to the new directory)&lt;/directories&gt;. For this setup we will be using &lt;directories realtime=&quot;yes&quot;&gt;C:\Users\Seyi\Desktop\FIM TEST FOLDER&lt;/directories&gt;. Save the changes once done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L33hd7aMpARjmT32k-_vdA.png" /></figure><p>After saving the changes, restart the Wazuh service by running the command NET START WazuhSvc in PowerShell. Once the service has restarted, the newly added directory will be successfully registered for file integrity monitoring on the Wazuh manager dashboard, and any changes made to that directory will be monitored and logged in real time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0tu4JxqZBjCoQQFciGTAiw.png" /></figure><p>Any activity or changes that occur within this directory, such as file creation, modification or deletion, will now be captured and logged as a security event on the Wazuh manager dashboard in real time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TdbEZ_QT2kTYOLmpV0ph-g.png" /></figure><p>i’ll create a new text document, log file.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iv8vaqGL9vy5X0o-JFaRhQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NcVuW09qRrFHmsxJ8rdm3g.png" /></figure><p>You can click on the event to view full log details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zxTiXw9CI3tHt9uAZZB0Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08a92bde76bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SUBNETTING]]></title>
            <link>https://medium.com/@olaniyiseyi02/subnetting-c7fbcfc1bc46?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7fbcfc1bc46</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Fri, 19 Jun 2026 21:53:51 GMT</pubDate>
            <atom:updated>2026-06-19T21:53:51.524Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Understanding Subnetting</strong></p><p>Subnetting is the process of modifying a subnet mask to divide a network into smaller or larger logical networks depending on our needs.</p><p>Before diving deeper into subnetting, it is important to understand how decimal numbers relate to binary numbers, because subnetting calculations are performed using binary.</p><p><strong>Decimal and Binary in IP Addressing</strong></p><p>The numbers we usually see in an IP address (for example, 255.255.255.0) are written in decimal format. However, computers process network information in binary, which uses only 1s and 0s.</p><p>An IP address consists of four decimal sections, called octets.</p><p>Each octet contains 8 bits, and</p><p>8 bits = 1 byte</p><p>4 octets = 32 bits total in an IPv4 address</p><p>So an IPv4 address is made up of 32 bits or 4 bytes.</p><p><strong>Binary Conversion Using Powers of Two</strong></p><p>To convert decimal numbers into binary, we use the powers of 2 that correspond to the eight positions in an octet:</p><p>128 64 32 16 8 4 2 1</p><p>Each position can either be:</p><ul><li><strong>1</strong> → the value is included</li><li><strong>0</strong> → the value is not included</li></ul><p>For example:</p><p><strong>255 in binary</strong></p><p>128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255</p><p>So all positions are used:</p><p>11111111</p><p><strong>254 in binary</strong></p><p>128 + 64 + 32 + 16 + 8 + 4 + 2 = 254</p><p>So the last position (1) is not used:</p><p>11111110</p><p><strong>Converting a Subnet Mask to Binary</strong></p><p>Take the subnet mask:</p><p>255.255.255.0</p><p>In binary this becomes:</p><p>11111111.11111111.11111111.00000000</p><p>The 1s represent the network portion, while the 0s represent the host portion.</p><p>So in this example:</p><p>Network portion<br>11111111.11111111.11111111</p><p>Host portion<br>00000000</p><p>Determining the Number of Host Addresses</p><p>To determine how many usable IP addresses exist in a subnet, we use the formula:</p><p>2^(number of host bits) − 2</p><p>We subtract <strong>2</strong> because the following:</p><ul><li>One address is reserved for the network address</li><li>One address is reserved for the broadcast address</li></ul><p>For example, with subnet mask 255.255.255.0:</p><p>Host bits = 8</p><p>2⁸− 2<br>256 − 2 = 254 usable IP addresses</p><p>So this network can support 254 hosts.</p><p>Increasing the Number of Available Addresses</p><p>If we need more than 254 addresses, we must increase the number of host bits.</p><p>For example, if we need around 500 addresses, we need at least 9 host bits.</p><p>Binary representation:</p><p>11111111.11111111.11111110.00000000</p><p>Now we have:</p><p>Host bits = 9</p><p>2⁹-2<br>512 − 2 = 510 usable IP addresses</p><p>This subnet can now support 510 hosts.</p><p>What just happened?</p><p>What we did was modify the boundary between the network portion and the host portion of the address to accommodate a different number of hosts.</p><p>This process of adjusting the subnet mask to meet network requirements is what we call subnetting.</p><p><strong>Subnetting a Network</strong></p><p>It is risky to have all devices operating on a single network. When every device shares the same network, it can lead to congestion, security risks, and inefficient network management. To solve this problem, networks are divided into smaller networks through a process called <strong>subnetting</strong>.</p><p>Subnetting simply means dividing a large network into smaller, manageable networks by modifying the <strong>subnet mask</strong>.</p><p>In this example, we will subnet one network into <strong>five different networks</strong>.</p><p>The network address used is <strong>192.168.1.0/24</strong> with a subnet mask of <strong>255.255.255.0</strong>.</p><p>The <strong>/24</strong> represents the number of network bits in the subnet mask. In binary form, the subnet mask looks like this:</p><p>11111111.11111111.11111111.00000000</p><p>Each octet contains <strong>8 bits</strong>, meaning an IPv4 address consists of <strong>32 bits</strong> in total. In this case, the first <strong>24 bits</strong> represent the network portion of the address, while the remaining bits represent the host portion.</p><p>To create multiple networks, we borrow bits from the host portion of the address. The number of networks that can be created follows powers of two because each borrowed bit doubles the number of possible networks.</p><p>The bit values in an octet are represented as:</p><p>128 64 32 16 8 4 2 1</p><p>To create at least <strong>five networks</strong>, we look for the smallest power of two that is greater than or equal to five.</p><p>2¹ = 2 networks<br>2² = 4 networks (not enough)<br>2³ = 8 networks (sufficient)</p><p>This means we need to borrow <strong>3 bits</strong> from the host portion.</p><p>Borrowing these 3 bits modifies the subnet mask. The original subnet mask was:</p><p>11111111.11111111.11111111.00000000</p><p>After borrowing three host bits, it becomes:</p><p>11111111.11111111.11111111.11100000</p><p>The new subnet mask therefore becomes:</p><p>255.255.255.224</p><p>This corresponds to a <strong>/27 subnet mask</strong>.</p><p>To determine the subnet increment, we look at the position of the last network bit in the fourth octet.</p><p>11100000 corresponds to:</p><p>128 64 32 16 8 4 2 1</p><p>The last network bit aligns with <strong>32</strong>, so the subnet increment is <strong>32</strong>.</p><p>Starting from the original network address <strong>192.168.1.0</strong>, we add the increment value to generate the subnet ranges.</p><p>The first five subnetworks are therefore:</p><p>192.168.1.0–192.168.1.31<br>192.168.1.32–192.168.1.63<br>192.168.1.64–192.168.1.95<br>192.168.1.96–192.168.1.127<br>192.168.1.128–192.168.1.159</p><p>All of these subnetworks use the same subnet mask:</p><p>255.255.255.224 (/27)</p><p>Each subnet contains <strong>32 total IP addresses</strong>. However, two addresses cannot be assigned to devices: the <strong>network address</strong> and the <strong>broadcast address</strong>. This leaves:</p><p>2⁵ − 2 = <strong>30 usable IP addresses per subnet</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8dajxnAQADK2Mt3x6Nf_A.png" /></figure><p>Subnetting allows networks to be organised more efficiently, improves security, reduces broadcast traffic, and makes network management easier.</p><p>Instead of one massive network where every device sees every other device, organisations can separate departments, reduce risk, and control traffic flow far more effectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7fbcfc1bc46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IP Addressing Explained: Public, Private, Static, and Dynamic]]></title>
            <link>https://medium.com/@olaniyiseyi02/ip-addressing-explained-public-private-static-and-dynamic-eba8ca834db3?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/eba8ca834db3</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 21:29:26 GMT</pubDate>
            <atom:updated>2026-06-17T21:29:26.151Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is an IP address?</strong></p><p>An Internet Protocol (IP) address is a unique numerical label assigned to every device on a network. Think of it like a home address for your device. It allows data on the network to know where it should go and where it came from.</p><p>Every device connected to a network must have an IP address so that other devices can identify and communicate with it. For example, an IP address may look like this: 192.168.1.10. This address identifies a specific device on the network.</p><p><strong>Public and Private IP Addresses</strong></p><p>IP addresses are generally categorised into public and private addresses.</p><p>A public IP address is the address your network uses on the internet. It is assigned by your Internet Service Provider (ISP) and is visible to the rest of the internet. When devices on your home network access the internet, they appear to other networks using this public IP address.</p><p>A private IP address, on the other hand, is used within a local network such as a home or office network. These addresses are only visible to devices within that network. An example of a private IP address is 192.168.1.5. Devices in the same network can communicate with each other using these private addresses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZM90fL6yv1CViOtf17Cs4Q.png" /></figure><p><strong>Static and Dynamic IP Addresses</strong></p><p>IP addresses can also be classified based on how they are assigned.</p><p>A static IP address is fixed and does not change. These addresses are typically used for devices that require a consistent address, such as servers, printers, and other network infrastructure.</p><p>A dynamic IP address changes periodically and is automatically assigned when a device connects to the network. This process is handled by DHCP, which stands for Dynamic Host Configuration Protocol. Most home devices such as laptops, phones, and smart TVs use dynamic IP addresses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ov_jxrLJ70y8rJpgKg7nCA.png" /></figure><p><strong>Understanding IP Ranges</strong></p><p>Consider the IP address 192.168.1.10.</p><p>In a typical home network using a subnet mask of 255.255.255.0, valid device addresses usually range from 192.168.1.1 to 192.168.1.254.</p><p>There are two addresses in this range that cannot be assigned to devices.</p><p>The first is the network address, which in this case is 192.168.1.0. This address represents the network itself.</p><p>The second is the broadcast address, which is 192.168.1.255. This address is used to send messages to every device on the network simultaneously.</p><p><strong>What is a Subnet Mask?</strong></p><p>A subnet mask determines which part of an IP address represents the network and which part represents the host, meaning the device.</p><p>For example, a common subnet mask is 255.255.255.0.</p><p>The subnet mask helps devices determine whether another device is within the same network or outside the network.</p><p><strong>Network and Host Portion of an Address</strong></p><p>Consider the following example:</p><p>IP Address: 192.168.1.10<br>Subnet Mask: 255.255.255.0</p><p>In this case, the network portion is 192.168.1, and the host portion is the final number 10.</p><p>This means every device on the same network will share the first three sections of the address, appearing as 192.168.1.x. Only the last number changes to identify each device.</p><p>Examples include 192.168.1.2, 192.168.1.15, 192.168.1.120, and 192.168.1.200.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hkFLepOFbLXxpcs9h9u3-Q.png" /></figure><p><strong>Understanding the ‘255’ in a Subnet Mask</strong></p><p>Whenever you see 255 in an octet of a subnet mask, it means that portion of the IP address is fixed as part of the network and does not change for devices on that network.</p><p>For example, if the subnet mask is 255.255.255.0, the first three sections of the IP address represent the network portion. This means all devices on that network will share the same first three numbers.</p><p>So if the network is 192.168.1.x, every device on that network will start with 192.168.1.</p><p>Similarly, consider the subnet mask 255.255.0.0.</p><p>If a device has the IP address 192.168.2.10, the first two sections represent the network portion. This means every device on that network will have an IP address that begins with 192.168, while the remaining sections will vary to identify individual devices.</p><p><strong>The Default Gateway</strong></p><p>The default gateway is the device that connects your local network to other networks. In most home and office environments, this device is the router.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VcylV3jnnRlJLRlMekXGrg.png" /></figure><p>An example of a default gateway address is 192.168.1.1.</p><p>The default gateway acts as the exit point for traffic leaving the local network.</p><p>If a device wants to communicate with another device within the same network, it communicates directly. However, if the destination is outside the local network, the device sends the data to the default gateway. The router then forwards the request to the appropriate external network.</p><p>Imagine you want to access netflix.com, which exists on a different network somewhere on the internet.</p><p>Your device first sends the request to the default gateway, which is your router. The router then forwards that request to the internet. Once the response is received, the router sends the data back to your device.</p><p>In this way, the router enables communication between your local network and other networks across the internet.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eba8ca834db3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The OSI Model and the 7 Layers Explained]]></title>
            <link>https://medium.com/@olaniyiseyi02/the-osi-model-and-the-7-layers-explained-3a3198295a2d?source=rss-3e1048cfbf94------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a3198295a2d</guid>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Olaniyi Oluwaseyi]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 09:11:54 GMT</pubDate>
            <atom:updated>2026-06-16T09:21:06.287Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is the OSI model?</strong></p><p>The OSI model (Open Systems Interconnection Reference Model) is the process data takes to traverse our network through encapsulation and decapsulation. The OSI model can be used to operate different protocols. By understanding the OSI model, we can communicate with anyone in information technology in a way they can understand; it does not matter if they work in your organisation or another.</p><p>The OSI Model can be seen as a universal language for computer networking. It is based on the concept of splitting up a communication system into seven abstract layers, each one stacked upon the last.</p><p><strong>Why is the OSI model important?</strong></p><p>The OSI model is a 7-layer framework that standardises how computers communicate over a network. It is essential in modern networking for the following reasons:</p><p><strong>Interoperability:</strong> Allows devices and software from different vendors to communicate using a common standard.</p><p><strong>Troubleshooting:</strong> Helps engineers quickly isolate network issues to a specific layer, whether physical, transport, or application.</p><p><strong>Modular Design:</strong> Each layer is independent, so one layer can be updated without disrupting the rest.</p><p><strong>Common Language:</strong> Gives IT professionals a shared vocabulary when discussing network issues.</p><p><strong>Security:</strong> Helps identify where attacks occur, for example, DDoS at Layers 3 and 4 and phishing at Layer 7, and where to apply defences.</p><p>In short, the OSI model is the blueprint of modern networking. It keeps the internet organised, understandable, and fixable.</p><p><strong>What are the 7 Layers of the OSI Model?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8XYv1nJV-SPL0lPLlfQHrg.png" /></figure><p><strong>Layer 7 — Application Layer</strong></p><p>This is the layer that we see. It is the only layer that directly interacts with user data because any time we are interacting with an application, we are operating at Layer 7 of the OSI model. The common application protocols that operate on this layer include HTTP, FTP, SMTP, TELNET, and DNS.</p><p>Attacks at this layer:</p><ul><li><strong>Phishing</strong> — Attackers craft fake emails or websites to steal credentials from users</li><li><strong>Cross-Site Scripting (XSS)</strong> — Malicious scripts are injected into web applications to steal data or hijack sessions</li><li><strong>SQL Injection</strong> — Attackers inject malicious queries into web application inputs to access or manipulate databases</li><li><strong>HTTP Floods</strong> — A type of DDoS attack that overwhelms web servers with a massive volume of HTTP requests</li></ul><p><strong>Layer 6 — Presentation Layer</strong></p><p>This layer is responsible for making data ready for the application layer to use. This layer is in charge of encryption, translating, and compression of data.</p><p>Attacks at this layer:</p><ul><li><strong>SSL Stripping</strong> — Attackers downgrade a secure HTTPS connection to HTTP, exposing data in plain text</li><li><strong>Man-in-the-Middle (MitM)</strong> — Attackers intercept encrypted data between two parties during transmission</li><li><strong>Malformed Data Attacks</strong> — Attackers send incorrectly formatted or malicious data to crash or exploit the receiving application</li></ul><p><strong>Layer 5 — Session Layer</strong></p><p>This layer is responsible for communication management between devices, including start, stop, and restart. Control and tunnelling protocols are often found on the session layer.</p><p>Attacks at this layer:</p><ul><li><strong>Session Hijacking</strong> — Attackers steal a valid session token to impersonate a legitimate user without needing their password</li><li><strong>Session Fixation</strong> — Attackers force a victim to use a specific session ID that the attacker already knows, allowing them to take over the session after login</li><li><strong>Brute Force against Sessions</strong> — Attackers repeatedly try different session IDs to guess a valid one</li></ul><p><strong>Layer 4 — Transport Layer</strong></p><p>Known as the “Post Office” layer because this layer is responsible for end-to-end communication between two devices. This layer takes large data and breaks it down into segments to be sent across the network, then puts them back together on the other side. The common protocols found at this layer are the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).</p><p>Attacks at this layer:</p><ul><li><strong>SYN Flood</strong> — Attackers send a large number of TCP SYN requests to a server without completing the handshake, exhausting server resources and causing a denial of service</li><li><strong>UDP Flood</strong> — Attackers overwhelm a target with UDP packets, consuming bandwidth and causing the system to become unresponsive</li><li><strong>Port Scanning</strong> — Attackers use tools like Nmap to discover which ports are open on a target system, identifying potential entry points</li></ul><p><strong>Layer 3 — Network Layer</strong></p><p>The network layer is responsible for data transfer between two different networks. It breaks up segments from the transport layer into smaller units called &#39;packets&#39; on the sender’s device and reassembles these packets on the receiving device. This is often referred to as the router layer because this is where routers determine how to forward traffic, specifically looking at the destination IP. Anything relating to IP, subnet masking, and routing all happens on the network layer.</p><p>Attacks at this layer:</p><ul><li><strong>IP Spoofing</strong> — Attackers forge the source IP address in packets to disguise their identity or impersonate a trusted device</li><li><strong>ICMP Flood (Ping Flood)</strong> — Attackers overwhelm a target with ICMP echo requests, consuming resources and causing disruption</li><li><strong>Routing Table Poisoning</strong> — Attackers manipulate routing tables to redirect legitimate traffic through malicious paths, enabling interception or disruption</li></ul><p><strong>Layer 2 — Data Link Layer</strong></p><p>This layer is the foundation of communication. The data link layer facilitates data transfer between two devices on the same network. It takes packets from the network layer and breaks them into smaller pieces called frames. This layer can also be referred to as the MAC (Media Access Control) layer, which is associated with the network card on our devices.</p><p>Attacks at this layer:</p><ul><li><strong>ARP Spoofing</strong> — Attackers send fake ARP messages to link their MAC address to a legitimate IP address, allowing them to intercept traffic on the local network</li><li><strong>MAC Flooding</strong> — Attackers overwhelm a network switch with fake MAC addresses, forcing it into a mode where it broadcasts all traffic to every device on the network</li><li><strong>VLAN Hopping</strong> — Attackers exploit misconfigured switches to gain access to VLANs they should not have access to</li></ul><p><strong>Layer 1 — Physical Layer</strong></p><p>This layer is the physics of the network. It is associated with the physical entities responsible for keeping a network running, such as cables, connectors, and switches. When this layer is dysfunctional, you have a physical problem that needs troubleshooting.</p><p>Attacks at this layer:</p><ul><li><strong>Physical Tampering</strong> — Attackers physically interfere with network hardware, cables, or devices to disrupt or intercept communications</li><li><strong>Wiretapping</strong> — Attackers physically tap into network cables to eavesdrop on data being transmitted</li><li><strong>Jamming</strong> — Attackers use devices to emit signals that disrupt wireless communications, causing denial of service on Wi-Fi networks</li><li><strong>Hardware Implants</strong> — Malicious hardware devices are secretly inserted into network infrastructure to intercept or manipulate data</li></ul><p><strong>How Data is Sent Through the OSI Model</strong></p><ul><li><strong>Application (Layer 7)</strong> — Data is created, for example, an email or web request.</li><li><strong>Presentation (Layer 6)</strong> — Data is formatted, encrypted, or compressed.</li><li><strong>Session (Layer 5)</strong> — A session and connection are established.</li><li><strong>Transport (Layer 4)</strong> — Data is broken into segments, and ports and reliability are added through TCP or UDP.</li><li><strong>Network (Layer 3)</strong> — Segments become packets, and IP addresses are added for routing.</li><li><strong>Data Link (Layer 2)</strong> — Packets become frames, and MAC addresses are added.</li><li><strong>Physical (Layer 1)</strong> — Frames become bits, which are electrical signals, light, or radio waves sent over the wire.</li></ul><p><strong>A Simple Analogy</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7PptEhlfesIGyDbEJcOZqQ.png" /></figure><p>Think of the OSI model like placing an order on a shopping app:</p><ul><li><strong>Layer 7 — Application:</strong> You place an order on a shopping app</li><li><strong>Layer 6 — Presentation:</strong> The order is translated into the store’s language and format</li><li><strong>Layer 5 — Session:</strong> A call and session is opened between you and the store</li><li><strong>Layer 4 — Transport:</strong> The store splits your large order into separate boxes</li><li><strong>Layer 3 — Network:</strong> Each box is labeled with your home address</li><li><strong>Layer 2 — Data Link:</strong> Each box gets a barcode for the local courier</li><li><strong>Layer 1 — Physical:</strong> The boxes are physically loaded onto a delivery truck</li></ul><p>A simple acronym to remember the 7 layers from top to bottom is &#39;<strong>Angry Programmers Sometimes Throw Network Devices Physically&#39;.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a3198295a2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>