<?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 Mbah Edmund on Medium]]></title>
        <description><![CDATA[Stories by Mbah Edmund on Medium]]></description>
        <link>https://medium.com/@mbahedmund?source=rss-4b8562515952------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KusPjKIqNAQV-260SJrWfg.jpeg</url>
            <title>Stories by Mbah Edmund on Medium</title>
            <link>https://medium.com/@mbahedmund?source=rss-4b8562515952------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 14:45:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mbahedmund/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[Extracting IP Addresses from Server Logs with Python Regex: A SOC Analyst’s First Automation Win]]></title>
            <link>https://medium.com/@mbahedmund/extracting-ip-addresses-from-server-logs-with-python-regex-a-soc-analysts-first-automation-win-f126175be7c6?source=rss-4b8562515952------2</link>
            <guid isPermaLink="false">https://medium.com/p/f126175be7c6</guid>
            <category><![CDATA[log-analysis]]></category>
            <category><![CDATA[it-automation]]></category>
            <category><![CDATA[regex]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Mbah Edmund]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 11:43:55 GMT</pubDate>
            <atom:updated>2026-06-11T11:43:55.537Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6tBcXS8A8F08pLe9" /></figure><p>As a Security Operations Center (SOC) analyst, one of the most frequent and critical tasks is sifting through mountains of log data to identify suspicious activity. After completing Google’s IT Automation with Python Professional Certificate, I was eager to put my new skills into practice. My first personal project: a simple yet powerful Python script that uses regular expressions (regex) to extract all IP addresses from web server logs.</p><p>Here’s the story, the script, and what I learned.</p><h3>Why This Matters in Security Operations</h3><p>Server logs (Apache, Nginx, etc.) contain a wealth of information: timestamps, requested resources, status codes, user agents, and most importantly client IP addresses. Malicious actors, scrapers, bots, and potential attackers all leave their IP footprints behind.</p><p>Manually hunting for IPs in large log files is tedious and error-prone. Automating this with Python allows analysts to quickly surface IPs for further investigation (geolocation, threat intelligence lookups, blocklisting, etc.).</p><h3>The Script</h3><pre>import re<br><br>text = &#39;&#39;&#39;<br>54.36.149.41 - - [22/Jan/2019:03:56:14 +0330] &quot;GET /filter/27|13%20%D9%85%DA%AF%D8%A7%D9%BE%DB%8C%DA%A9%D8%B3%D9%84,27|%DA%A9%D9%85%D8%AA%D8%B1%20%D8%A7%D8%B2%205%20%D9%85%DA%AF%D8%A7%D9%BE%DB%8C%DA%A9%D8%B3%D9%84,p53 HTTP/1.1&quot; 200 30577 &quot;-&quot; &quot;Mozilla/5.0 (compatible; AhrefsBot/6.1; +http://ahrefs.com/robot/)&quot; &quot;-&quot;<br>31.56.96.51 - - [22/Jan/2019:03:56:16 +0330] &quot;GET /image/60844/productModel/200x200 HTTP/1.1&quot; 200 5667 &quot;https://www.zanbil.ir/m/filter/b113&quot; &quot;Mozilla/5.0 (Linux; Android 6.0; ALE-L21 Build/HuaweiALE-L21) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36&quot; &quot;-&quot;<br>... [truncated for brevity] ...<br>&#39;&#39;&#39;<br><br>def ips(text):<br>    # Regex pattern for IPv4 addresses (simple but effective for most logs)<br>    pattern = r&quot;\d{2,3}\.\d{2,3}\.\d{2,3}\.\d{2,3}&quot;<br>    matches = re.findall(pattern, text)<br>    <br>    if matches:<br>        print(&quot;IP addresses found:&quot;, matches)<br>    else:<br>        print(&quot;No match found&quot;)<br>ips(text)<br>print(&quot;\nTotal GET requests:&quot;, text.count(&quot;GET&quot;))</pre><h3>How It Works</h3><ol><li><strong>Import re</strong>: Python’s built-in regular expressions module.</li><li><strong>The Pattern</strong> r”\d{2,3}\.\d{2,3}\.\d{2,3}\.\d{2,3}”:</li></ol><ul><li>\d{2,3} matches 2 or 3 digits (covering most valid IPv4 octets).</li><li>\. matches the literal dot separator.</li><li>This is a pragmatic pattern for quick log parsing. For production use, you could tighten it further with (?:25[0–5]|2[0–4][0–9]|[01]?[0–9][0–9]?) for each octet.</li></ul><p>3<strong>. re.findall()</strong>: Returns all non-overlapping matches as a list.</p><p>4.<strong> Bonus</strong>: A simple text.count(“GET”) to get an idea of request volume.</p><p>When run, it outputs something like:</p><pre>IP addresses found: [&#39;54.36.149.41&#39;, &#39;31.56.96.51&#39;, &#39;31.56.96.51&#39;, &#39;40.77.167.129&#39;, ...]<br>Total GET requests: 15</pre><h3>What I Learned from Google’s IT Automation with Python Course</h3><p>This project was directly inspired by the course modules on Python basics, string manipulation, and regular expressions. The course emphasizes practical automation exactly what SOC analysts need to reduce repetitive work and focus on high-value threat hunting.</p><p>Key takeaways applied here:</p><ul><li>Regex is incredibly powerful for unstructured text like logs.</li><li>Writing reusable functions (def ips(text)) makes scripts easier to expand.</li><li>Starting simple and iterating is the best way to build confidence.</li></ul><p>This script is just the beginning. Next, I plan to build a more robust log parser that flags suspicious patterns (e.g., excessive 404s from one IP, SQL injection attempts, etc.).</p><p>If you’re a SOC analyst, sysadmin, or aspiring automation enthusiast, I highly recommend Google’s IT Automation with Python course on Coursera. It’s practical, hands-on, and immediately applicable to real security work.</p><p>This was my first post sharing a small automation win after finishing the certificate. More security scripting stories coming soon stay tuned..</p><h4>#Python #SOC #CyberSecurity #Regex #LogAnalysis #ITAutomation #GoogleCareerCertificates</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f126175be7c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Threat Intelligence]]></title>
            <link>https://medium.com/@mbahedmund/threat-intelligence-11598661ef36?source=rss-4b8562515952------2</link>
            <guid isPermaLink="false">https://medium.com/p/11598661ef36</guid>
            <dc:creator><![CDATA[Mbah Edmund]]></dc:creator>
            <pubDate>Mon, 26 Jan 2026 09:02:13 GMT</pubDate>
            <atom:updated>2026-01-26T09:02:13.891Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Cybersecurity Report: Threat Intelligence Analysis Using VirusTotal</em></strong></p><p><strong>SAMPLE 1</strong></p><p><strong><em>Background</em>: </strong>This report analyzes a suspected malicious artifact using VirusTotal for multi-engine scanning and Hybrid Analysis for in-depth behavioral sandboxing.</p><p><strong><em>Scope</em></strong></p><ul><li>Analyzed indicator(s): Hash: 9001567e2025f83c936b8746fd3b01e44572f70d8ddec39b75b9459f7e5089c8</li><li>Tools used: VirusTotal (public), Hybrid Analysis</li><li>Limitations : public submission, sandbox evasion techniques</li></ul><p><strong>Methodology</strong></p><ol><li>Upload sample to VirusTotal</li><li>Submit identical sample to Hybrid Analysis for static + dynamic analysis</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DxDKP7__qlXDDpRLQnVL3g.png" /><figcaption><em>Figure 1: Hash of sample before Analysis</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbG_h8hl720tSTvhEXbGEQ.png" /><figcaption><em>Figure 2: Sample File Properties</em></figcaption></figure><p><strong>Threat Intelligence Sources</strong></p><p><strong><em>VirusTotal Analysis</em></strong></p><p><strong>Overview</strong>: Threat intelligence is the process of collecting, analyzing, and interpreting key indicators to understand emerging threats and stay ahead of malicious actors. It enables organizations to anticipate attacks, strengthen defenses, and make informed security decisions. Its importance cannot be overstated, as it transforms raw data into actionable insights that improve overall cybersecurity readiness. VirusTotal aggregates detections from 70+ antivirus engines and provides community-driven intelligence.</p><p><strong>Key Findings :</strong></p><ul><li>Detection Ratio: 61/73 , Classified as Trojan.msil/loki, Trojan.Inject3.50001</li><li>First Seen : 2020–08–10 06 : 10 :14 UTC</li><li>File Details: SHA-256: 9001567e2025f83c936b8746fd3b01e44572f70d8ddec39b75b9459f, size: 637.00 KB (652288 bytes), type: Win32 EXE</li><li>Community Score: 61/72</li><li>Comment: -File present on vx-underground.org | virus.exchange.</li></ul><p><strong>Interpretation</strong> [Explain severity implications]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iJWXuQrEkrHb_XDA8t-XxA.png" /><figcaption><em>Figure 3: VirusTotal Detection Engines</em> <em>Figure</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Up5cwhV7IDvlauZy5bAiFg.png" /><figcaption><em>Figure4: VirusTotal Graph Summary</em></figcaption></figure><p><strong>Portable Executable Info</strong></p><p><strong>.NET Details</strong></p><p>Module Version Id: <a href="https://www.virustotal.com/gui/search/netguid%253A8e4d5b28-d094-472a-81a4-2db4035a31e9">8e4d5b28-d094–472a-81a4–2db4035a31e9</a></p><p>TypeLib Id: <a href="https://www.virustotal.com/gui/search/netguid%253Aa4ea8724-e876-460b-abf3-09324c46e794">a4ea8724-e876–460b-abf3–09324c46e794</a></p><p><strong>Header</strong></p><p>Target Machine: Intel 386 or later processors and compatible processors</p><p>Compilation Timestamp: 2020–08–10 03:10:14 UTC</p><p>Entry Point: 479582</p><p>Contained Sections :3</p><p><strong>MITRE ATT&amp;CK Tactics and Techniques</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGUhdk9xJB0WgosoJFuvow.png" /></figure><p>Stage 1: Execution</p><p>The malware started by running its code discreetly. It used low-level Windows system calls Native API (T1106) and hid within legitimate system processes using Shared Modules (T1129) to avoid raising initial alarms.</p><p>Stage 2: Privilege Escalation</p><p>To gain higher system access, the malware injected its code into trusted, already-running processes using Process Injection (T1055). This allowed it to operate with administrative rights, which are needed to access protected system areas.</p><p>Stage 3: Defense Evasion</p><p>The malware actively worked to stay hidden. It checked if it was being run inside a security researcher’s virtual machine or sandbox with Virtualization/Sandbox Evasion (T1497), and would stop if detected. It also used Reflective Code Loading (T1620) to run directly from memory and avoid leaving files on disk, and attempted to disable security tools via Impair Defenses (T1562).</p><p>Stage 4: Discovery</p><p>Before stealing data, the malware explored the system. It gathered computer details with System Information Discovery (T1082), listed all running programs with Process Discovery (T1057), and scanned files and folders with File and Directory Discovery (T1083) to understand what information was available.</p><p>Stage 5: Credential Access</p><p>The malware then focused on stealing login information. It extracted password hashes from system memory using OS Credential Dumping (T1003) and searched for unprotected passwords or keys with Unsecured Credentials (T1552) stored in files and settings.</p><p>Stage 6: Collection</p><p>After obtaining credentials, it collected additional valuable data from the local drives using Data from Local System (T1005), including documents and email files via Email Collection (T1114), preparing everything for theft.</p><p>Stage 7: Command &amp; Control</p><p>Finally, the malware communicated with the attacker’s server using normal-looking web traffic with Application Layer Protocol (T1071), sending the stolen data over an Encrypted Channel (T1573) to avoid detection during transmission.</p><p><strong>SAMPLE 2</strong></p><p><strong>Background</strong> This report analyzes a suspected malicious artifact using VirusTotal for multi-engine scanning and Hybrid Analysis for in-depth behavioral sandboxing.</p><p><strong>Scope</strong></p><ul><li>Analyzed indicator(s): Hash: 178ba564b39bd07577e974a9b677dfd86ffa1f1d0299dfd958eb883c5ef6c3e1</li><li>Tools used: VirusTotal (public), Hybrid Analysis</li></ul><p><strong>Methodology</strong></p><ol><li>Upload sample to VirusTotal</li><li>Submit identical sample to Hybrid Analysis for static + dynamic analysis</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*klIpPmdi6OgImn4ZC2EWbg.png" /><figcaption><em>Figure 1: Hash of sample before Analysis</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*axhiTQDMA_lYOlnsqQEaVQ.png" /><figcaption><em>Figure 2: Sample File Properties</em></figcaption></figure><p><strong>Threat Intelligence Sources</strong></p><p><strong>VirusTotal Analysis</strong></p><p><strong>Key Findings:</strong></p><ul><li>Detection Ratio: [57/72] Classified as Win32 EXE executable windows win32 pe peexe</li><li>First Seen : [2020–04–23 19 :25 :23 UTC]</li><li>File Details: SHA-256: 178ba564b39bd07577e974a9b677dfd86ffa1f1d0299dfd958eb883c, 208.00 KB (212992 bytes), File type: Win32 EXE</li><li>Community Score: 57/72</li><li>Comment: — File present on vx-underground.org | virus. exchange.</li><li><strong>Interpretation</strong> [Explain severity implications]</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PbrE5QPcjAkt7cmOqzDL6g.png" /><figcaption><em>Figure 3: VirusTotal Detection Engines</em> <em>Figure</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q_HJ7NV8AYWT91pAu351kQ.png" /><figcaption><em>Figure4: VirusTotal Graph Summary</em></figcaption></figure><p><strong>Header</strong></p><p>Target Machine: Intel 386 or later processors and compatible processors</p><p>Compilation Timestamp: 2020–04–24 02:04:11 UTC</p><p>Entry Point: 13299</p><p>Contained Sections: 6</p><p><strong>Signature verification</strong></p><p>File is not signed</p><p><strong>File Version Information</strong></p><p>Copyright: Copyright © INCA Internet. 2000–2003</p><p>Product: nProtect KeyCrypt Program Database DLL</p><p>Description: nProtect KeyCrypt Program Database DLL</p><p>Original Name: pkpdb.dll</p><p>Internal Name: npkpdb.dll</p><p>File Version: 2003, 10, 1, 1</p><p>Comments: nProtect KeyCrypt Program Database DLL</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11598661ef36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Email Header Analysis & Phishing Investigation Home Lab]]></title>
            <link>https://medium.com/@mbahedmund/email-header-analysis-phishing-investigation-home-lab-0cc1c6164b25?source=rss-4b8562515952------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cc1c6164b25</guid>
            <dc:creator><![CDATA[Mbah Edmund]]></dc:creator>
            <pubDate>Sun, 25 Jan 2026 13:09:21 GMT</pubDate>
            <atom:updated>2026-01-25T13:09:21.075Z</atom:updated>
            <content:encoded><![CDATA[<h3>Email Header Analysis &amp; Phishing Investigation Home Lab</h3><p><strong><em>Documentation by MBAH EDMUND</em></strong></p><p>In this home lab, I dive into the world of email headers, phishing investigations, and forensic analysis using open-source tools. This guide walks you through the setup, analysis, and key insights from spoofed emails. Whether you’re a cybersecurity enthusiast or just curious about how phishing works, this lab will equip you with practical skills to trace email origins and spot red flags.</p><h4>Objective</h4><ul><li>Understand how email headers work</li><li>Learn to trace the real origin of an email</li><li>Identify common spoofing and phishing techniques</li><li>Practice forensic analysis using open-source tools</li><li>Document the full investigation workflow</li></ul><h3>Lab Topology</h3><p>An overview of the Kali VM where the analysis will be performed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aRGoJO5KW8clKiPCMVd6Ug.png" /><figcaption>screenshot 1</figcaption></figure><h3><strong>Tools Used</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*wHd0vNgi74MQ9ucIqf58oA.jpeg" /><figcaption>Tools used and their purpose</figcaption></figure><h3>Lab Setup Steps (with Screenshots)</h3><ul><li>Kali VM running overview.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aRGoJO5KW8clKiPCMVd6Ug.png" /><figcaption>screenshot 2</figcaption></figure><ul><li>An overview of the phishing email opened in Thunderbird with some headers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MpBBTfa763_DLj1umHTaRw.png" /><figcaption>screenshot 3</figcaption></figure><ul><li>A view of all important headers in Sublime Text.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5fS9gLrtjBhFEYAIEPs6A.png" /><figcaption>screenshot 4</figcaption></figure><ul><li>Analysis and results of the header using MX Toolbox header analysis.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vYVikrrnBV4XivZo39-Y9Q.png" /><figcaption>screenshot 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*imQquFdoV32YR86t3a_v3A.png" /><figcaption>screenshot 6</figcaption></figure><p>Important email headers can be seen in the above screenshots.</p><ul><li>Authentication results using PhishTool.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cAndqNdcXDx3P8iQVxynhw.png" /><figcaption>screenshot 7</figcaption></figure><ul><li>Verifying the IP address using VirusTotal.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iXcpJpBt0L5fZhoIXrOJGg.png" /><figcaption>screenshot 8</figcaption></figure><h3>Sample Phishing Email Headers (Lab Output)</h3><p>Below is a sanitized header example from the lab:</p><ul><li>Received: from mail-40140.protonmail.ch (185.70.40.140) by SA2PEPF00001509.mail.protection.outlook.com (10.167.242.41) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Wed, 1 May 2024 20:04:11 +0000</li><li>X-IncomingTopHeaderMarker: OriginalChecksum:C17AD509B4FA1C33AD6837AF53B05160C3206DAEA597C784A116FBD1E13D3CAA;UpperCasedChecksum:255DA5C4E53258A65E29BCEB32930DEF55AEEE0D3B9737CDFDDA32BCBDDF73A9;SizeAsReceived:1160;Count:10</li><li>From: <a href="/service/mailto:alerts@chase.com">alerts@chase.com</a></li><li>Date: Wed, 01 May 2024 20:04:05 +0000</li><li>Message-ID: &lt;i7g9MMh5NtErtaOzQZEp3D-i-u3FWwdo0wY5mhD8Q1vIvv1yeLj-jMWPAn-HP3FugKsucesWSubO0Vns8GRFYG0aH4MyU2paqP6yUnRcgaU=@protonmail.com&gt;</li><li>X-Pm-Message-ID: 55310a2549b19d9ae8e8c9d77cff7bf967e0fa21</li><li>Subject: Your Bank Account has been blocked due to unusual activities</li><li>To: Bob Sanders &lt;<a href="/service/mailto:bob.sanders@corhalitech.com">bob.sanders@corhalitech.com</a>&gt;</li><li>Reply-To: <a href="/service/mailto:kellyellin426@proton.me">kellyellin426@proton.me</a></li><li>Return-Path: <a href="/service/mailto:kellyellin426@proton.me">kellyellin426@proton.me</a></li></ul><h3>Step-by-Step Analysis Walkthrough</h3><ol><li>Highlights the real origin IP (185.70.40.140).</li><li>The ‘Reply-To’ email address <a href="/service/mailto:kellyellin426@proton.me">kellyellin426@proton.me</a> is inconsistent with the ‘From’ email address <a href="/service/mailto:alerts@chase.com">alerts@chase.com</a>. Also, the ‘Return-Path’ domain proton.me is inconsistent with the ‘From’ domain chase.com.</li><li>The DMARC tests have failed. The authentication mechanisms (SPF and/or DKIM) have not passed with an authenticated identifier that is in sufficient alignment with the ‘From’ domain chase.com, as specified by the domain’s DMARC policy.</li><li>The sender’s IP address seems harmless as per investigations using VirusTotal.</li></ol><h3>Key Findings &amp; Red Flags Learned</h3><ul><li>Spoofed “From” header is trivial — never trust it</li><li>The true origin is always the first Received line from a non-trusted server</li><li>Reply-To and Return-Path are the real criminal addresses</li><li>DMARC test failed, making the email more suspicious</li></ul><h3>Conclusion</h3><p>This lab proves that email spoofing is extremely easy in an unconfigured environment and why organizations must enforce SPF, DKIM, DMARC, and train users never to trust the visible “From” address alone.</p><h3>References</h3><ul><li>RFC 5322 — Internet Message Format</li><li>MX Toolbox Header Analyzer</li><li>Email Header Analysis (by TCM)</li><li>“Practical Packet Analysis” by Chris Sanders (for Wireshark part).</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cc1c6164b25" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>