<?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"><channel><title><![CDATA[Woogi's Infosec Blog]]></title><description><![CDATA[Woogi's Infosec Blog]]></description><link>https://woogi.me</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 14:13:07 GMT</lastBuildDate><atom:link href="https://woogi.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Phishing Analysis: A Blue Team Guide to Email Threat Investigation]]></title><description><![CDATA[This post covers the full analysis workflow — how email works, types of phishing, collecting artifacts, analyzing them with tools, and taking defensive action.

How Email Works
Before analyzing phishi]]></description><link>https://woogi.me/phishing-analysis-blue-team-guide</link><guid isPermaLink="true">https://woogi.me/phishing-analysis-blue-team-guide</guid><category><![CDATA[phishing]]></category><category><![CDATA[blue team]]></category><category><![CDATA[cybersecurity]]></category><category><![CDATA[email security]]></category><category><![CDATA[SOC]]></category><dc:creator><![CDATA[Jaewook Jung]]></dc:creator><pubDate>Thu, 09 Apr 2026 08:09:48 GMT</pubDate><content:encoded><![CDATA[<p>This post covers the full analysis workflow — how email works, types of phishing, collecting artifacts, analyzing them with tools, and taking defensive action.</p>
<hr />
<h2>How Email Works</h2>
<p>Before analyzing phishing, need to understand the protocols behind it.</p>
<ul>
<li><p><strong>SMTP</strong> (Simple Mail Transfer Protocol) — sends emails. TCP port 587 (TLS) or legacy port 25.</p>
</li>
<li><p><strong>POP3</strong> (Post Office Protocol) — downloads email to local client and deletes from server.</p>
</li>
<li><p><strong>IMAP</strong> (Internet Message Access Protocol) — keeps email on server, accessible from any device.</p>
</li>
</ul>
<h3>Email Delivery Flow</h3>
<pre><code class="language-plaintext">Sender's client → Outbound SMTP server → DNS lookup (recipient domain) 
→ Route through internet → Recipient SMTP server → Recipient client (POP3/IMAP)
</code></pre>
<p>The key takeaway: email passes through multiple servers. Each server adds headers. These headers are what we analyze.</p>
<hr />
<h2>Types of Phishing</h2>
<table>
<thead>
<tr>
<th>Type</th>
<th>Goal</th>
<th>Key Characteristics</th>
</tr>
</thead>
<tbody><tr>
<td><strong>Recon</strong></td>
<td>Gather information</td>
<td>Delivery receipts, tracking pixels, verify active email</td>
</tr>
<tr>
<td><strong>Credential Harvesting</strong></td>
<td>Steal logins</td>
<td>Fake login pages, look-alike domains</td>
</tr>
<tr>
<td><strong>Malware Delivery</strong></td>
<td>Execute code</td>
<td>Malicious attachments (.doc macros, .exe, .pdf.bat)</td>
</tr>
<tr>
<td><strong>Spear Phishing</strong></td>
<td>Target specific person</td>
<td>Personalized content from OSINT</td>
</tr>
<tr>
<td><strong>Whaling</strong></td>
<td>Target executives</td>
<td>Impersonation of business partners, high-value</td>
</tr>
<tr>
<td><strong>BEC</strong></td>
<td>Financial fraud</td>
<td>Impersonate CEO/CFO, request wire transfers</td>
</tr>
<tr>
<td><strong>Vishing/Smishing</strong></td>
<td>Phone/SMS phishing</td>
<td>Voice calls or texts with malicious links</td>
</tr>
</tbody></table>
<hr />
<h2>Tactics Attackers Use</h2>
<ul>
<li><p><strong>Impersonation</strong> — pretend to be a trusted entity (colleague, vendor, IT support)</p>
</li>
<li><p><strong>Sender Spoofing</strong> — forge the "From" address to look legitimate</p>
</li>
<li><p><strong>Typosquatting</strong> — register look-alike domains (e.g., <code>amaz0n.com</code>, <code>rnicrosoft.com</code>)</p>
</li>
<li><p><strong>Homograph Attacks</strong> — use unicode characters that look identical (e.g., Cyrillic "а" vs Latin "a")</p>
</li>
<li><p><strong>HTML Styling</strong> — hide the real URL behind styled buttons</p>
</li>
<li><p><strong>URL Shortening</strong> — obscure destination using bit.ly, tinyurl</p>
</li>
<li><p><strong>Legitimate Service Abuse</strong> — host payloads on Google Docs, Dropbox, OneDrive</p>
</li>
</ul>
<hr />
<h2>Collecting Artifacts</h2>
<p>This is the core of phishing analysis. Collect everything before blocking anything.</p>
<h3>Email Artifacts</h3>
<ul>
<li><p><strong>Sending address</strong> — display name vs. actual address (often different)</p>
</li>
<li><p><strong>Reply-to address</strong> — critical indicator. Attackers often set a different reply-to to bypass sender verification.</p>
</li>
<li><p><strong>Date and time</strong> — track campaign trends</p>
</li>
<li><p><strong>Originating IP</strong> — check <code>X-Sender-IP</code> or <code>X-Originating-IP</code> in headers</p>
</li>
<li><p><strong>Subject line</strong> — useful for finding similar phishing emails across mailboxes</p>
</li>
<li><p><strong>Recipients</strong> — check BCC field for hidden recipients (mass campaign indicator)</p>
</li>
</ul>
<h3>Web Artifacts</h3>
<ul>
<li><p><strong>Full URLs</strong> — copy via right-click "Copy Link Destination". Never click. Never hand-type.</p>
</li>
<li><p><strong>Root domain</strong> — determine if it's a malicious domain or a compromised legitimate site</p>
</li>
<li><p><strong>Redirect chains</strong> — follow 302 hops through multiple domains to find the actual phishing page</p>
</li>
</ul>
<h3>File Artifacts</h3>
<ul>
<li><p><strong>Attachment filename + extension</strong> — for EDR blocking rules</p>
</li>
<li><p><strong>SHA256 hash</strong> — standard for VirusTotal lookups. Avoid MD5/SHA1 (hash collision vulnerabilities).</p>
</li>
</ul>
<hr />
<h2>How to Extract Email Headers</h2>
<p>Open the <code>.eml</code> file in a text editor (Sublime Text works well).</p>
<p>Use <code>CTRL+F</code> to search for:</p>
<ul>
<li><p><code>From</code> — sender email address</p>
</li>
<li><p><code>To</code> — recipient</p>
</li>
<li><p><code>Subject</code> — subject line</p>
</li>
<li><p><code>Date</code> — timestamp</p>
</li>
<li><p><code>X-Sender-IP</code> or <code>X-Originating-IP</code> — originating IP</p>
</li>
<li><p><code>Reply-To</code> — reply address (if different from sender, suspicious)</p>
</li>
<li><p><code>Content-Transfer-Encoding</code> — check for Base64 encoded content</p>
</li>
</ul>
<p>Here's an example — opening a phishing email in Sublime Text and searching for the originating IP:</p>
<h3>Reverse DNS Lookup</h3>
<p>Once you have the sending server IP, verify it with a WHOIS lookup:</p>
<ul>
<li><p><strong>MXToolbox</strong> — <code>https://mxtoolbox.com/ReverseLookup.aspx</code></p>
</li>
<li><p>Compare the resolved hostname against the claimed sender domain</p>
</li>
<li><p>If it doesn't match, likely spoofed</p>
</li>
</ul>
<h3>Decoding Base64 Content</h3>
<p>Some phishing emails encode their body in Base64 to bypass filters.</p>
<ul>
<li><p>Open <strong>CyberChef</strong> (<code>https://gchq.github.io/CyberChef/</code>)</p>
</li>
<li><p>Paste the encoded content</p>
</li>
<li><p>Apply "From Base64" recipe</p>
</li>
<li><p>This reveals hidden URLs, embedded images, and actual email content</p>
</li>
</ul>
<hr />
<h2>Analysis Tools</h2>
<table>
<thead>
<tr>
<th>Category</th>
<th>Tools</th>
<th>Purpose</th>
</tr>
</thead>
<tbody><tr>
<td><strong>Visualization</strong></td>
<td>URL2PNG, URLScan.io</td>
<td>Safely screenshot/render URLs without visiting</td>
</tr>
<tr>
<td><strong>URL Reputation</strong></td>
<td>VirusTotal, URLhaus, PhishTank</td>
<td>Check if URL is known malicious</td>
</tr>
<tr>
<td><strong>File Reputation</strong></td>
<td>VirusTotal, Talos File Reputation</td>
<td>Check file hash against known malware</td>
</tr>
<tr>
<td><strong>Malware Sandboxing</strong></td>
<td>Any.Run, Hybrid Analysis, Joe Sandbox</td>
<td>Detonate suspicious files safely</td>
</tr>
<tr>
<td><strong>Email Analysis</strong></td>
<td>PhishTool, Thunderbird + Sublime Text</td>
<td>Parse email structure and headers</td>
</tr>
<tr>
<td><strong>WHOIS/DNS</strong></td>
<td>DomainTools WHOIS, dig, nslookup</td>
<td>Domain registration and IP ownership</td>
</tr>
</tbody></table>
<h3>Investigation Workflow</h3>
<ol>
<li><p>Extract all artifacts from the email</p>
</li>
<li><p>Check sender IP with Reverse DNS</p>
</li>
<li><p>Screenshot any URLs with URL2PNG or URLScan.io</p>
</li>
<li><p>Check URLs against VirusTotal, URLhaus, PhishTank</p>
</li>
<li><p>If attachments exist — get SHA256 hash, check VirusTotal, detonate in sandbox</p>
</li>
<li><p>Check domain registration date (WHOIS) — newly registered domains are suspicious</p>
</li>
<li><p>Document everything</p>
</li>
</ol>
<hr />
<h2>Real Investigation: Following a Redirect Chain</h2>
<p>Phishing emails often use multiple redirects to hide the actual destination. Here's a walkthrough from a real investigation.</p>
<h3>The Setup</h3>
<p>A phishing email impersonating Disney+ was targeting German users. The email contained a link — but the link didn't go directly to the phishing site.</p>
<p>First, copy the link (right-click, never click) and decode it:</p>
<h3>Following the Redirects</h3>
<p>The first URL returns an HTTP <code>302 Found</code> — a redirect:</p>
<p>Check the HTTP header to find where it's redirecting to:</p>
<p>After following the full redirect chain, we reach the actual phishing domain:</p>
<h3>Analyzing the Credential Harvester</h3>
<p>The phishing page contained JavaScript that collected user credentials. Investigating the JS revealed what data was being harvested:</p>
<p>The stolen data was POST'ed to a specific endpoint:</p>
<h3>WHOIS and Infrastructure Analysis</h3>
<p>Checking the WHOIS record — the domain was registered just <strong>2 days</strong> before the phishing email was sent:</p>
<p>The hosting server was located in <strong>Russia</strong>:</p>
<p>And the same server was hosting <strong>10+ other credential harvesters</strong>, all targeting banks:</p>
<h3>Key Takeaways from This Investigation</h3>
<ul>
<li><p>One phishing email led to a full infrastructure of credential harvesters</p>
</li>
<li><p>Redirect chains are used to evade URL reputation checks</p>
</li>
<li><p>WHOIS registration date is a strong indicator — freshly registered domains targeting your org are suspicious</p>
</li>
<li><p>Always investigate the hosting infrastructure — you might find more campaigns</p>
</li>
</ul>
<hr />
<h2>Defensive Actions</h2>
<h3>Preventative</h3>
<p><strong>SPF (Sender Policy Framework)</strong></p>
<ul>
<li><p>DNS TXT record that defines which servers can send emails for your domain</p>
</li>
<li><p>Syntax: <code>v=spf1 a: include:mailgun.org protection.outlook.com -all</code></p>
</li>
<li><p><code>-all</code> = hard fail — block unauthorized senders</p>
</li>
</ul>
<p><strong>DKIM (DomainKeys Identified Mail)</strong></p>
<ul>
<li><p>Cryptographic signature to verify email authenticity</p>
</li>
<li><p>Sender's mail server generates an encrypted hash (private key) → added to email header</p>
</li>
<li><p>Recipient server verifies with public key stored in DNS</p>
</li>
<li><p>Syntax: <code>V=DKIM1 &lt;key type&gt; &lt;public key&gt;</code></p>
</li>
</ul>
<p><strong>DMARC (Domain-based Message Authentication, Reporting &amp; Conformance)</strong></p>
<ul>
<li><p>Builds on SPF + DKIM. Lets domain owners set policy for failed authentication:</p>
<ul>
<li><p><code>p=none</code> — monitoring only</p>
</li>
<li><p><code>p=quarantine</code> — send to spam</p>
</li>
<li><p><code>p=reject</code> — block completely</p>
</li>
</ul>
</li>
<li><p>Example: <code>v=DMARC1; p=quarantine; rua=mailto:admin@company.com</code></p>
</li>
<li><p>Generates reports for monitoring authentication failures</p>
</li>
</ul>
<p><strong>Other Preventative Measures:</strong></p>
<ul>
<li><p>Spam filters (content and reputation-based)</p>
</li>
<li><p>Attachment sandboxing — detonate before delivery</p>
</li>
<li><p>External email banners — warn users about external senders</p>
</li>
<li><p>Security awareness training</p>
</li>
</ul>
<h3>Reactive</h3>
<p>When a phishing email is confirmed:</p>
<ol>
<li><p><strong>Quarantine</strong> — remove from all mailboxes that received it</p>
</li>
<li><p><strong>Notify</strong> — alert affected users immediately</p>
</li>
<li><p><strong>Block sender</strong> — add sending address/domain to mail gateway blocklist</p>
</li>
<li><p><strong>Block URLs</strong> — add malicious URLs/domains to proxy or firewall blocklists</p>
</li>
<li><p><strong>Block file hashes</strong> — add to EDR/antivirus blocklists</p>
</li>
<li><p><strong>Reset credentials</strong> — if any user clicked and submitted credentials</p>
</li>
</ol>
<h3>Sanitizing Artifacts for Reports</h3>
<p>Before sharing IOCs in reports or tickets, defang them to prevent accidental clicks:</p>
<ul>
<li><p>URLs: <code>hXXps://malicious[.]com/phish</code></p>
</li>
<li><p>IPs: <code>192.168.1[.]1</code></p>
</li>
<li><p>Emails: <code>attacker[@]evil[.]com</code></p>
</li>
</ul>
<hr />
<h2>Phishing Report Template</h2>
<p>A proper phishing analysis report should include:</p>
<ol>
<li><p><strong>Email Header Info</strong> — sender, recipient, date, originating IP, subject</p>
</li>
<li><p><strong>Artifacts &amp; Body Content</strong> — URLs, attachments, embedded content with sanitized IOCs</p>
</li>
<li><p><strong>Analysis Process &amp; Results</strong> — which tools were used, what they found</p>
</li>
<li><p><strong>Classification</strong> — recon, credential harvester, malware delivery, BEC</p>
</li>
<li><p><strong>Defensive Measures Taken</strong> — what was blocked, who was notified</p>
</li>
<li><p><strong>Attached Evidence</strong> — original .eml or .msg file, screenshots</p>
</li>
</ol>
<hr />
<h2>Key Takeaways</h2>
<ul>
<li><p>Always collect artifacts <strong>before</strong> blocking — you need the evidence</p>
</li>
<li><p>Reply-To address is one of the most reliable phishing indicators</p>
</li>
<li><p>Use SHA256 for file hash lookups (not MD5/SHA1)</p>
</li>
<li><p>Never click links directly — use right-click "Copy Link Destination" or extract from text editor</p>
</li>
<li><p>SPF + DKIM + DMARC together provide layered email authentication</p>
</li>
<li><p>Sanitize all IOCs before sharing in reports</p>
</li>
<li><p>Check domain WHOIS — newly registered domains targeting your org is a strong indicator</p>
</li>
<li><p>Investigate the infrastructure — one phishing domain often hosts many campaigns</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[[ProjectX] E101: Vulnerable Environment Setup & Wazuh Monitoring]]></title><description><![CDATA[This homelab project is included in the ProjectX course by Grant Collins.
Network Topolgy & Attack Scenario


VM System
In the course, virtual machines (VMs) are used, but I prefer using Proxmox VE to]]></description><link>https://woogi.me/projectx-e101-building-a-secure-homelab-environment</link><guid isPermaLink="true">https://woogi.me/projectx-e101-building-a-secure-homelab-environment</guid><category><![CDATA[cybersecurity]]></category><category><![CDATA[projects]]></category><category><![CDATA[Homelab]]></category><dc:creator><![CDATA[Jaewook Jung]]></dc:creator><pubDate>Tue, 03 Feb 2026 05:34:49 GMT</pubDate><content:encoded><![CDATA[<p><em>This homelab project is included in the ProjectX course by Grant Collins.</em></p>
<h2>Network Topolgy &amp; Attack Scenario</h2>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/5a00b679-5450-406a-b885-cfaecc484457.png" alt="" style="display:block;margin:0 auto" />

<h2>VM System</h2>
<p>In the course, virtual machines (VMs) are used, but I prefer using <strong>Proxmox VE</strong> to save resources.</p>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/a0565cb1-5139-468e-ac35-beabae8dde2d.png" alt="" style="display:block;margin:0 auto" />

<h2>Overall Purpose of homelab project</h2>
<ul>
<li>Comparison of Detection Integration: <code>corp-svr</code>(without EDR) vs. <code>linux-client</code> (with Wazuh Agent)</li>
</ul>
<h2>Configure a Vulnerability</h2>
<h3>Open SSH</h3>
<ul>
<li><p><code>PasswordAuthentication yes</code> : Allows users to log in using a standard password rather than a secure SSH key.</p>
<ul>
<li><p><strong>Why Insecure?</strong>: Vulnerable to brute-force attacks.</p>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/b2fd7b5d-2953-4b06-b8f1-76a992b67ac5.png" alt="" style="display:block;margin:0 auto" /></li>
</ul>
</li>
<li><p><code>PermitRootLogin yes</code> : Allows the "root" account to log in directly via SSH.</p>
<ul>
<li><p><strong>Why Insecure?</strong>: Attackers only need to guess one password to gain full control of the machine.</p>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/fc4c0393-2641-4c01-b680-0e56bed94247.png" alt="" style="display:block;margin:0 auto" /></li>
</ul>
</li>
<li><p><strong>Weak Password</strong>: Set the root password to <code>november</code> using <code>sudo passwd root</code> .</p>
</li>
</ul>
<h4>Create Detection Alert for ssh in Wazuh</h4>
<ul>
<li><p>To create a detection alert, use an SSH authentication failure sample.<br />- From the screenshot, can get <strong>decoder name</strong>, <strong>rule groups</strong>.</p>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/3f3cf2ed-9bb6-41d3-92ed-a78d95d4dafd.png" alt="" style="display:block;margin:0 auto" />
</li>
<li><p>Using the sample, create a query.</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/ddf68e36-bb8a-47f5-bffb-b033f24fcfbe.png" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/34d01192-71ed-4fec-91e4-9c4a97488fa3.png" alt="" style="display:block;margin:0 auto" />

<h3>Enable WinRM on <code>win-client</code></h3>
<ul>
<li><p><strong>What is WinRM?</strong>: allows administrators to remotely manage Windows systems, similar to how SSH works for Linux.</p>
</li>
<li><p>enable WinRM codeline<br /><code>powershell -ep bypass Enable-PSRemoting -force winrm quickconfig -transport:https Set-Item wsman:\localhost\client\trustedhosts * net localgroup "Remote Management Users" /add administrator Restart-Service WinRM</code> .</p>
</li>
</ul>
<h5><strong>How to detect activation of WinRM</strong></h5>
<p>- Event ID <code>4624</code> with a <code>logonProcessName</code> of Kerberos<br />- Wazuh Rule ID: <code>60106</code><br />- Description: User: <code>Windows Logon Success</code></p>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/3bc199c3-36c3-48f5-a42b-eef1bd15d999.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li><p>From the sample above, make data filter for alerts</p>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/fa650fc0-9024-48d5-8e78-5cae613c5670.png" alt="" style="display:block;margin:0 auto" /></li>
</ul>
<h3>Configure SMTP Email Inbox Connection</h3>
<p><code>[project-x-corp-svr]</code> -&gt; <code>[project-x-linux-client]</code></p>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/9bf44539-8e13-47d8-b42a-ed3f4bf0aa33.png" alt="Run MailHog" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/cf9f23b2-7e74-412d-bdec-ba0357654755.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li><p>Docker is used to host and orchestrate <strong>MailHog</strong>, which acts as the <strong>SMTP server</strong> for the lab environment.</p>
</li>
<li><p>The <code>email_poller.sh</code> script is run on the <strong>client machine</strong> (<code>[project-x-linux-client]</code>) to interact with the MailHog server.</p>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/2360c336-8d3e-4a67-ad1e-656a3053fb56.png" alt="" style="display:block;margin:0 auto" />
</li>
<li><p><code>[project-x-corp-svr]</code> is intentionally unmanaged to demonstrate the security 'blind spot' that occurs when monitoring tools are absent.</p>
</li>
</ul>
<h3>Enable RDP on <code>[project-x-dc]</code></h3>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/3c2c1bfd-0423-4573-a7f3-73acda5a2320.png" alt="" style="display:block;margin:0 auto" />

<h4>How to detect RDP connection in Wazuh</h4>
<ul>
<li><p>Default Wazuh Rule to detect RDP: <code>92653</code></p>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/455b1eb8-53b2-4506-b5f7-6cedbdd1463b.png" alt="" style="display:block;margin:0 auto" />
</li>
<li><p>or query <code>data.win.system.eventID: 4624 AND</code> <code>data.win.eventdata.logonProcessName: User32</code> .</p>
<ul>
<li><p>Successful authentication of Windows Security Event ID: <code>4624</code> .</p>
</li>
<li><p>UnSuccessful authentication of Windows Security Event ID: <code>4625</code> .</p>
</li>
<li><p>The value <code>User32</code> in the <code>logonProcessName</code> field indicates the use of the <code>User32.dll</code> library, which handles RDP logins.</p>
</li>
</ul>
</li>
</ul>
<h3>Setup “Sensitive File” in <code>[project-x-dc]</code></h3>
<ul>
<li><img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/98ce7158-c167-43d8-88ac-23f95a4268ad.png" alt="" style="display:block;margin:0 auto" />

make <code>secrets.txt</code> file under <code>Administrator &gt; Documents &gt; ProductionFiles</code> .</li>
</ul>
<h4>Detect file modifications in Wazuh</h4>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/7234c536-d8de-4539-8375-9df1237695cf.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li><p>Under <code>Server management &gt; Endpoint Groups &gt; Windows &gt; agent.conf</code></p>
</li>
<li><p>Put below codeblock to make file monitoring</p>
</li>
</ul>
<pre><code class="language-plaintext">&lt;syscheck&gt;
  &lt;directories check_all="yes" report_changes="yes"
  realtime="yes"&gt;C:\Users\Administrator\Documents\ProductionFiles
  &lt;/directories&gt;
  &lt;frequency&gt;60&lt;/frequency&gt;
 &lt;/syscheck&gt;
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/7da70594-1388-4749-b275-642df56ae5c0.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li><p><code>check_all="yes"</code> : check multiple file properties including file's <strong>hash</strong> (MD5, SHA1, and SHA256), permissions, owner, group, and size</p>
</li>
<li><p><code>report_changes="yes"</code> : When a text file is modified, Wazuh will actually send the alert</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/8920d3a8-6bb9-457e-9e2b-87f9ae99acad.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li>Under <code>File Integration Monitoring</code>'s <code>Inventory</code> tab, can see monitoring files inculding <code>secrets.txt</code></li>
</ul>
<h4>Create Detection Alert for File Modification</h4>
<ul>
<li>Under <code>rules</code> tab, find <code>local_rules.xml</code> and adds below code</li>
</ul>
<pre><code class="language-plaintext">&lt;group name="syscheck"&gt;
 &lt;rule id="100002" level="10"&gt;
 &lt;field name="file"&gt;secrets.txt&lt;/field&gt;
 &lt;match&gt;modified&lt;/match&gt;
 &lt;description&gt;File integrity monitoring alert - access to
sensitive.txt file detected&lt;/description&gt;
 &lt;/rule&gt;
&lt;/group&gt;
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/565f4071-3b46-468d-bd85-bd8085170050.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li><p>save and restart</p>
</li>
<li><p>Under <code>Alerting &gt; Monitors &gt; Create Monitor</code>, write configuration</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/4d601830-ef07-4a0c-a0a6-62c64a08a081.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li><p><code>full_log contains secrets.txt</code> : ensures looking at events specifically related to <code>secrets.txt</code> .</p>
</li>
<li><p><code>syscheck.event is modified</code> : When a file change is detected, Wazuh categorizes the type of action that occurred.</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/1b29ac50-c23e-4768-be37-54704686d6fa.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li>and also configure <code>Trigger Condition</code></li>
</ul>
<h3>Exfiltration Setup on Attacker Machine</h3>
<ul>
<li><code>scp</code> : allow copy files and directories between two systems through ssh</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/400d18ca-2504-48ef-a793-1dbd1e54196a.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li>create a file where to copy <code>secrets.txt</code> content</li>
</ul>
<h3>Enable Insecure guest logons for [project-x-client]</h3>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/ebe64dc8-caae-435f-b174-eaeada269ec8.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li>Under <code>File Explorer Window &gt; C:\Windows\System32 &gt; gpedit(Run as Administrator) &gt; Computer Configuration &gt; Administrative Template &gt; Network &gt; Lanman Workstation &gt; "Enable insecure guest logons" &gt; “Enabled”</code> -&gt; allows the workstation to connect to shared network resources (like an SMB share) using a guest account with <strong>zero authentication required</strong>.</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/697fe23ce91977696c393c3e/d4cd28e6-bc16-44f9-be0c-49076bdbf48f.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li>also with command line</li>
</ul>
]]></content:encoded></item></channel></rss>