<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Delay No More</title><link>https://lck920.github.io/</link><description>Recent content on Delay No More</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 13 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://lck920.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>Part 2 - Configuring a Vulnerable Environment</title><link>https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/</link><pubDate>Wed, 13 May 2026 00:00:00 +0000</pubDate><guid>https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/</guid><description>&lt;p&gt;With the lab fully built, the next step is to deliberately introduce insecure configurations - the kind of misconfigurations and legacy settings that still appear in real enterprise networks more often than expected.&lt;/p&gt;
&lt;p&gt;Legacy systems, forgotten infrastructure, rushed deployments, and weak operational practices can all create exploitable attack surfaces inside production environments.&lt;/p&gt;
&lt;p&gt;In this part of the series, the goal is to intentionally weaken selected systems inside the &lt;strong&gt;Business-in-a-Box&lt;/strong&gt; homelab while simultaneously configuring &lt;strong&gt;Wazuh&lt;/strong&gt; to monitor and detect the resulting attack activity.&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;⚠️ &lt;strong&gt;Disclaimer:&lt;/strong&gt; Every configuration change in this section is strictly for the homelab. None of this should be applied to a production environment.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;Before starting, ensure all VMs are up and Wazuh has been fully configured with agents deployed to the relevant machines.&lt;/p&gt;
&lt;h2 id="what-were-doing-and-why"&gt;What We&amp;rsquo;re Doing (and Why)
&lt;/h2&gt;&lt;p&gt;Each misconfiguration below is paired with a &lt;strong&gt;detection note&lt;/strong&gt; explaining how Wazuh catches the resulting activity. This is the blue team layer sitting alongside the red team setup.&lt;/p&gt;
&lt;h3 id="1-enable-ssh-on-project-x-corp-server"&gt;1. Enable SSH on project-x-corp-server
&lt;/h3&gt;&lt;p&gt;We open SSH on the corporate server and deliberately weaken its configuration by enabling password authentication and permitting root login — two settings that are disabled by default for good reason.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Commands run on &lt;code&gt;project-x-corp-server&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo apt install openssh-server -y
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl start ssh &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; ssh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo ufw allow &lt;span class="m"&gt;22&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo ufw &lt;span class="nb"&gt;enable&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt;, we make two key changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PasswordAuthentication yes&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PermitRootLogin yes&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then set root&amp;rsquo;s password and restart SSH:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo passwd root &lt;span class="c1"&gt;# set to: november&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl restart ssh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="SSH service in project-x-corp-server is active." class="gallery-image" data-flex-basis="363px" data-flex-grow="151" height="481" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot1.png" width="728"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="PasswordAuthentication yes and PermitRootLogin yes lines visible and uncommented in /etc/ssh/sshd_config, showing the deliberate weakening." class="gallery-image" data-flex-basis="288px" data-flex-grow="120" height="656" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot2.png" width="789"&gt;&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;🔍 &lt;strong&gt;Detection Note:&lt;/strong&gt; &lt;code&gt;project-x-corp-server&lt;/code&gt; does &lt;strong&gt;not&lt;/strong&gt; have a Wazuh agent installed. This is intentional — it demonstrates the detection gap that exists when a machine has no endpoint monitoring. An attacker could brute-force this box and no SIEM alert would fire.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;h3 id="2-enable-ssh-on-project-x-linux-client"&gt;2. Enable SSH on project-x-linux-client
&lt;/h3&gt;&lt;p&gt;The same process is applied to the Linux client machine, with one key difference — this machine &lt;strong&gt;does&lt;/strong&gt; have a Wazuh agent, so failed SSH attempts will be caught.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo apt install openssh-server -y
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl start ssh &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; ssh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo ufw allow &lt;span class="m"&gt;22&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Enable password authentication in &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; and restart SSH as above. Also set root&amp;rsquo;s password to &lt;code&gt;november&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="SSH service in project-x-linux-client is active." class="gallery-image" data-flex-basis="362px" data-flex-grow="151" height="488" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot3.png" width="738"&gt;&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;🔍 &lt;strong&gt;Detection Note (Wazuh Rule ID: 5760):&lt;/strong&gt; Wazuh has a built-in rule that fires on &lt;code&gt;sshd: authentication failed&lt;/code&gt; events. View it under &lt;strong&gt;Server Management -&amp;gt; Rules -&amp;gt; 5760&lt;/strong&gt;.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;&lt;img alt="Rule ID 5760 searched and the rule detail showing the description “sshd: authentication failed” and its rule group." class="gallery-image" data-flex-basis="619px" data-flex-grow="258" height="467" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot4.png" srcset="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot4_hu_7469c9837960fb6e.png 800w, https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot4.png 1205w" width="1205"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Creating a Wazuh Alert for Failed SSH:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;Explore -&amp;gt; Alerting -&amp;gt; Monitors&lt;/strong&gt;, create a new monitor with the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Title: &lt;code&gt;3 Failed SSH Attempts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Data source index: &lt;code&gt;wazuh-alerts-4.x-*&lt;/code&gt;, Time field: &lt;code&gt;@timestamp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Data filters: &lt;code&gt;process.name = sshd&lt;/code&gt; and &lt;code&gt;rule.groups = authentication_failed&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Trigger condition: count &amp;gt; 2, Severity: Medium (3)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="3-configure-the-mailhog-smtp-email-connection"&gt;3. Configure the MailHog SMTP Email Connection
&lt;/h3&gt;&lt;p&gt;&lt;img alt="MailHog Diagram" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="mailhog_drawio.png"&gt;&lt;/p&gt;
&lt;p&gt;MailHog should already be running from the setup phase. Confirm the container is active on &lt;code&gt;project-x-corp-server&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /home/mailhog
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo docker compose up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;On &lt;code&gt;project-x-linux-client&lt;/code&gt;, start the email poller in the background:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /home &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; ./email_poller.sh &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This script polls the MailHog API every 30 seconds and simulates a user checking their inbox — a critical piece for the phishing simulation in Part 3.&lt;/p&gt;
&lt;p&gt;&lt;img alt="email_poller.sh script running in the background in project-x-linux-client, confirming that it is active." class="gallery-image" data-flex-basis="369px" data-flex-grow="153" height="478" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot5.png" width="736"&gt;&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;🔍 &lt;strong&gt;Detection Note:&lt;/strong&gt; Since &lt;code&gt;project-x-corp-server&lt;/code&gt; has no Wazuh agent, email activity originating from it creates a monitoring blind spot — intentionally mirroring real-world scenarios where email infrastructure goes unmonitored.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;h3 id="4-enable-winrm-on-project-x-win-client"&gt;4. Enable WinRM on project-x-win-client
&lt;/h3&gt;&lt;p&gt;Windows Remote Management (WinRM) is a legitimate administration protocol, but it&amp;rsquo;s a commonly abused attack path for lateral movement. We enable it on the Windows client to expose this surface.&lt;/p&gt;
&lt;p&gt;Open an &lt;strong&gt;Administrator PowerShell&lt;/strong&gt; session on &lt;code&gt;project-x-win-client&lt;/code&gt; and run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;powershell&lt;/span&gt; &lt;span class="n"&gt;-ep&lt;/span&gt; &lt;span class="n"&gt;bypass&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Enable-PSRemoting&lt;/span&gt; &lt;span class="n"&gt;-force&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;winrm&lt;/span&gt; &lt;span class="n"&gt;quickconfig&lt;/span&gt; &lt;span class="n"&gt;-transport:https&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Set-Item&lt;/span&gt; &lt;span class="n"&gt;wsman&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="p"&gt;\&lt;/span&gt;&lt;span class="n"&gt;localhost&lt;/span&gt;&lt;span class="p"&gt;\&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;\&lt;/span&gt;&lt;span class="n"&gt;trustedhosts&lt;/span&gt; &lt;span class="p"&gt;*&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;net&lt;/span&gt; &lt;span class="n"&gt;localgroup&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Remote Management Users&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt; &lt;span class="n"&gt;administrator&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Restart-Service&lt;/span&gt; &lt;span class="n"&gt;WinRM&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="PowerShell window on project-x-win-client showing the output of Enable-PSRemoting -force and Restart-Service WinRM executing successfully — confirming WinRM is enabled." class="gallery-image" data-flex-basis="737px" data-flex-grow="307" height="249" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot6.png" width="765"&gt;&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;🔍 &lt;strong&gt;Detection Note (Wazuh Rule ID: 60106):&lt;/strong&gt; WinRM connections use Kerberos authentication, which generates Windows Event ID &lt;code&gt;4624&lt;/code&gt; with &lt;code&gt;logonProcessName: Kerberos&lt;/code&gt;. Wazuh catches this under rule 60106 (&lt;code&gt;Windows Logon Success&lt;/code&gt;).&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Creating a Wazuh Alert for WinRM Logon:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Create a monitor titled &amp;ldquo;WinRM Logon&amp;rdquo; with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data filters: &lt;code&gt;data.win.eventdata.logonProcessName = Kerberos&lt;/code&gt; and &lt;code&gt;data.win.system.eventID = 4624&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Trigger condition: count &amp;gt; 1, Severity: Medium (3)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="5-enable-rdp-on-project-x-dc-domain-controller"&gt;5. Enable RDP on project-x-dc (Domain Controller)
&lt;/h3&gt;&lt;p&gt;Navigate to &lt;strong&gt;Settings -&amp;gt; System -&amp;gt; Remote Desktop&lt;/strong&gt; on the domain controller and toggle it &lt;strong&gt;On&lt;/strong&gt;. This exposes RDP (port 3389) on the DC — the highest-value machine in the network.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Windows Settings screen on project-x-dc showing the Remote Desktop is turned on" class="gallery-image" data-flex-basis="303px" data-flex-grow="126" height="632" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot7.png" width="800"&gt;&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;🔍 &lt;strong&gt;Detection Note (Wazuh Rule ID: 92653):&lt;/strong&gt; Successful RDP logins generate Event ID &lt;code&gt;4624&lt;/code&gt; with &lt;code&gt;logonProcessName: User32&lt;/code&gt;. Search for it in Wazuh under &lt;strong&gt;Explore -&amp;gt; Discover&lt;/strong&gt; using &lt;code&gt;data.win.eventdata.logonProcessName: User32&lt;/code&gt;.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;h3 id="6-create-a-sensitive-file-on-project-x-dc"&gt;6. Create a Sensitive File on project-x-dc
&lt;/h3&gt;&lt;p&gt;This simulates the crown jewels of our fictional company. On the domain controller, create:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Path: &lt;code&gt;C:\Users\Administrator\Documents\ProductionFiles\secrets.txt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Content: anything representing sensitive data (the lab uses &lt;code&gt;DEEBOODAH&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Windows File Explorer on project-x-dc showing the ProductionFiles folder inside Documents, with secrets.txt visible inside it." class="gallery-image" data-flex-basis="320px" data-flex-grow="133" height="590" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot8.png" width="789"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Configure Wazuh File Integrity Monitoring (FIM):&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In Wazuh, go to &lt;strong&gt;Server Management -&amp;gt; Endpoint Groups -&amp;gt; Windows -&amp;gt; Files -&amp;gt; agent.conf&lt;/strong&gt; and add:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;syscheck&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;directories&lt;/span&gt; &lt;span class="na"&gt;check_all=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;yes&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;report_changes=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;yes&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;realtime=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;yes&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; C:\Users\Administrator\Documents\ProductionFiles
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/directories&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;frequency&amp;gt;&lt;/span&gt;60&lt;span class="nt"&gt;&amp;lt;/frequency&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/syscheck&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Wazuh agent.conf editor in the browser showing the &lt;syscheck&gt; block added at the bottom of the file, monitoring the ProductionFiles path." class="gallery-image" data-flex-basis="741px" data-flex-grow="309" height="362" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot9.png" srcset="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot9_hu_c83696022f3341ef.png 800w, https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot9.png 1119w" width="1119"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Wazuh Endpoint Security -&gt; File Integrity Monitoring -&gt; Inventory tab with project-x-dc selected, showing the secrets.txt file path appearing in the monitored file list." class="gallery-image" data-flex-basis="548px" data-flex-grow="228" height="803" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot10.png" srcset="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot10_hu_a2a7e52d5c352ea4.png 800w, https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot10_hu_14d881b955e79712.png 1600w, https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot10.png 1834w" width="1834"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Creating a Custom FIM Alert:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;Server Management -&amp;gt; Rules -&amp;gt; local_rules.xml&lt;/strong&gt;, add:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;group&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;syscheck&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;rule&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;100002&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;level=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;10&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;field&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;file&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;secrets.txt&lt;span class="nt"&gt;&amp;lt;/field&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;match&amp;gt;&lt;/span&gt;modified&lt;span class="nt"&gt;&amp;lt;/match&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;description&amp;gt;&lt;/span&gt;File integrity monitoring alert - access to secrets.txt file detected&lt;span class="nt"&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/rule&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;&amp;lt;/group&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then create a Wazuh monitor titled &amp;ldquo;File Accessed&amp;rdquo; with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data filters: &lt;code&gt;syscheck.event = modified&lt;/code&gt; and &lt;code&gt;full_log contains secrets.txt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Trigger condition: count &amp;gt; 1, Severity: High (2)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="7-prepare-the-exfiltration-target-on-project-x-attacker"&gt;7. Prepare the Exfiltration Target on project-x-attacker
&lt;/h3&gt;&lt;p&gt;Enable SSH on the Kali machine and create a placeholder file for the incoming exfiltrated data:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl start ssh.service
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;touch /home/attacker/my_exfil.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;On &lt;code&gt;project-x-win-client&lt;/code&gt;, open &lt;code&gt;gpedit.msc&lt;/code&gt; (navigate to &lt;code&gt;C:\Windows\System32\gpedit.msc&lt;/code&gt;, right-click, Run as Administrator), then enable:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Computer Configuration -&amp;gt; Administrative Templates -&amp;gt; Network -&amp;gt; Lanman Workstation -&amp;gt; Enable insecure guest logons&lt;/strong&gt; (set to Enabled)&lt;/p&gt;
&lt;p&gt;Then run in PowerShell:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Set-ItemProperty&lt;/span&gt; &lt;span class="n"&gt;-Path&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters&amp;#34;&lt;/span&gt; &lt;span class="n"&gt;-Name&lt;/span&gt; &lt;span class="n"&gt;AllowInsecureGuestAuth&lt;/span&gt; &lt;span class="n"&gt;-Value&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt; &lt;span class="n"&gt;-Force&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="Group Policy Editor open on project-x-win-client showing the “Enable insecure guest logons” policy set to Enabled" class="gallery-image" data-flex-basis="514px" data-flex-grow="214" height="887" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot11.png" srcset="https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot11_hu_132f5935c60a22ba.png 800w, https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot11_hu_197f4b2ac3728e81.png 1600w, https://lck920.github.io/p/part-2-configuring-a-vulnerable-environment/screenshot11.png 1903w" width="1903"&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The lab is now intentionally vulnerable and monitored. In Part 3, we run the actual attack — following the full cyber attack lifecycle from reconnaissance all the way to persistence.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Part 1 - Homelab Setup: Building a Business-in-a-Box</title><link>https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/</link><pubDate>Tue, 12 May 2026 00:00:00 +0000</pubDate><guid>https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/</guid><description>&lt;p&gt;Instead of spinning up a collection of random virtual machines and calling it a homelab, I wanted to build something more meaningful - a small enterprise-like environment that resembles how a real corporate network is structured.&lt;/p&gt;
&lt;p&gt;I call this the &lt;strong&gt;Business-in-a-Box&lt;/strong&gt; homelab, inspired by the &lt;strong&gt;Project Security E101&lt;/strong&gt; course. The goal is to simulate a corporate domain network called &lt;strong&gt;Project X&lt;/strong&gt;, complete with internal services, security monitoring, and an attacker node for running controlled offensive exercises.&lt;/p&gt;
&lt;p&gt;Think of it as a self-contained training ground for practising both &lt;strong&gt;attack&lt;/strong&gt; and &lt;strong&gt;defence&lt;/strong&gt; in a realistic but isolated environment.&lt;/p&gt;
&lt;h2 id="lab-architecture"&gt;Lab Architecture
&lt;/h2&gt;&lt;p&gt;The entire environment runs on &lt;strong&gt;Oracle VirtualBox&lt;/strong&gt; using a private &lt;strong&gt;NAT network&lt;/strong&gt;: &lt;code&gt;10.0.0.0/24&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This setup keeps the lab isolated from the host machine, allows safe execution of offensive tooling, and still permits controlled outbound internet access for updates.&lt;/p&gt;
&lt;p&gt;The architecture includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Active Directory infrastructure&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enterprise workstations&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security monitoring platforms&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Internal email services&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Offensive security systems&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="figure-1---overall-homelab-architecture"&gt;Figure 1 - Overall Homelab Architecture
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Overall Homelab Architecture" class="gallery-image" data-flex-basis="395px" data-flex-grow="164" height="527" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/network-topology.png" srcset="https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/network-topology_hu_4dec02cb1f57d056.png 800w, https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/network-topology.png 869w" width="869"&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 1 shows the overall structure of the Business-in-a-Box homelab, including the domain controller, enterprise workstations, email server, security server, and monitoring components.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id="suggested-screenshots-to-include"&gt;Suggested screenshots to include
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;VirtualBox VM list showing all homelab machines&lt;/li&gt;
&lt;li&gt;VirtualBox NAT network configuration&lt;/li&gt;
&lt;li&gt;IP configuration from Windows using &lt;code&gt;ipconfig&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;IP configuration from Linux using &lt;code&gt;ip a&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Successful &lt;code&gt;ping&lt;/code&gt; test between hosts&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="virtual-machines"&gt;Virtual Machines
&lt;/h2&gt;&lt;p&gt;Each &lt;strong&gt;VM&lt;/strong&gt; represents a specific role commonly found in a corporate environment.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;&lt;strong&gt;Hostname&lt;/strong&gt;&lt;/th&gt;
 &lt;th style="text-align: right"&gt;&lt;strong&gt;IP Address&lt;/strong&gt;&lt;/th&gt;
 &lt;th&gt;&lt;strong&gt;Operating System&lt;/strong&gt;&lt;/th&gt;
 &lt;th&gt;&lt;strong&gt;Role&lt;/strong&gt;&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;project-x-dc&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;&lt;strong&gt;10.0.0.5&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Windows Server 2025&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;Domain Controller (AD/DNS/DHCP)&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;project-x-corp-server&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;&lt;strong&gt;10.0.0.8&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Ubuntu Server 22.04&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;Jumpbox &amp;amp; Email Server&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;project-x-sec-box&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;&lt;strong&gt;10.0.0.10&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Ubuntu Server 22.04&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;Wazuh SIEM Server&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;project-x-win-client&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;&lt;strong&gt;10.0.0.100&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Windows 11 Enterprise&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;Domain Workstation&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;project-x-linux-client&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;&lt;strong&gt;10.0.0.101&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Ubuntu Desktop 22.04&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;Developer Workstation&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;project-x-sec-work&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;&lt;strong&gt;10.0.0.103&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Security Onion&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;Network Monitoring Workstation&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;project-x-attacker&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;&lt;strong&gt;10.0.0.50&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Kali Linux 2024.4&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;Attacker Node&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The minimum specifications per &lt;strong&gt;VM&lt;/strong&gt; range from &lt;strong&gt;1 CPU / 2 GB RAM&lt;/strong&gt; for lighter machines, such as the corporate server and attacker node, up to &lt;strong&gt;2 CPU / 4 GB RAM&lt;/strong&gt; for heavier systems such as the domain controller, Windows client, and security server.&lt;/p&gt;
&lt;h3 id="suggested-screenshots-to-include-1"&gt;Suggested screenshots to include
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;VirtualBox VM settings for one Windows host&lt;/li&gt;
&lt;li&gt;VirtualBox VM settings for one Linux host&lt;/li&gt;
&lt;li&gt;Hostname configuration screen or terminal output&lt;/li&gt;
&lt;li&gt;VM resource allocation page&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="core-services"&gt;Core Services
&lt;/h2&gt;&lt;p&gt;The homelab uses several core services to make the environment behave like a small enterprise network.&lt;/p&gt;
&lt;h3 id="active-directory"&gt;Active Directory
&lt;/h3&gt;&lt;p&gt;The &lt;strong&gt;domain controller&lt;/strong&gt; is hosted on &lt;strong&gt;&lt;code&gt;project-x-dc&lt;/code&gt;&lt;/strong&gt; and runs &lt;strong&gt;Windows Server 2025&lt;/strong&gt;. It provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Active Directory Domain Services (ADDS)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DNS services&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DHCP services&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Centralised authentication&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Domain policy management&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All Windows workstations in the lab are joined to the domain &lt;strong&gt;&lt;code&gt;corp.project-x-dc.com&lt;/code&gt;&lt;/strong&gt;. This provides centralised authentication and policy management, similar to what would be found in a real enterprise environment.&lt;/p&gt;
&lt;h3 id="suggested-screenshots-to-include-2"&gt;Suggested screenshots to include
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;Windows Server Manager dashboard&lt;/li&gt;
&lt;li&gt;Active Directory Users and Computers&lt;/li&gt;
&lt;li&gt;DNS Manager showing domain records&lt;/li&gt;
&lt;li&gt;DHCP configuration screen&lt;/li&gt;
&lt;li&gt;Successful Windows domain join screen&lt;/li&gt;
&lt;li&gt;Windows login using a domain account&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="linux-domain-integration"&gt;Linux Domain Integration
&lt;/h2&gt;&lt;p&gt;To support a mixed operating system environment, the Linux workstation is joined to the Active Directory domain using &lt;strong&gt;Samba Winbind&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This allows Linux systems to authenticate using domain credentials and helps simulate a realistic environment where Windows and Linux machines coexist.&lt;/p&gt;
&lt;p&gt;Useful validation commands include:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;realm list
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wbinfo -u
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;id johnd@corp.project-x-dc.com
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="suggested-screenshots-to-include-3"&gt;Suggested screenshots to include
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;realm list&lt;/code&gt; output&lt;/li&gt;
&lt;li&gt;&lt;code&gt;wbinfo -u&lt;/code&gt; showing domain users&lt;/li&gt;
&lt;li&gt;&lt;code&gt;id &amp;lt;domain-user&amp;gt;&lt;/code&gt; output&lt;/li&gt;
&lt;li&gt;Winbind service status&lt;/li&gt;
&lt;li&gt;Linux login using domain credentials&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mailhog-email-infrastructure"&gt;MailHog Email Infrastructure
&lt;/h2&gt;&lt;p&gt;The email infrastructure is powered by &lt;strong&gt;MailHog&lt;/strong&gt;, a lightweight tool that acts as a fake &lt;strong&gt;SMTP server&lt;/strong&gt;. It runs inside a &lt;strong&gt;Docker container&lt;/strong&gt; on &lt;strong&gt;&lt;code&gt;project-x-corp-svr&lt;/code&gt;&lt;/strong&gt; and is central to the phishing simulations later in this series.&lt;/p&gt;
&lt;p&gt;MailHog replaces the need for a real external email provider. This means email-based attack simulations can remain fully contained inside the lab.&lt;/p&gt;
&lt;h3 id="mailhog-ports"&gt;MailHog ports
&lt;/h3&gt;&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;&lt;strong&gt;Service&lt;/strong&gt;&lt;/th&gt;
 &lt;th style="text-align: right"&gt;&lt;strong&gt;Port&lt;/strong&gt;&lt;/th&gt;
 &lt;th&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;SMTP&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;&lt;strong&gt;1025&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Captures outgoing emails sent by lab scripts or applications&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Web Interface&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;&lt;strong&gt;8025&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Allows captured emails, headers, and content to be inspected&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;REST API&lt;/strong&gt;&lt;/td&gt;
 &lt;td style="text-align: right"&gt;N/A&lt;/td&gt;
 &lt;td&gt;Enables automated interaction for scripted attack scenarios&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="figure-2---mailhog-email-simulation-workflow"&gt;Figure 2 - MailHog Email Simulation Workflow
&lt;/h3&gt;&lt;p&gt;&lt;img alt="MailHog Email Simulation Workflow" class="gallery-image" data-flex-basis="713px" data-flex-grow="297" height="521" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/mailhog-email-workflow.png" srcset="https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/mailhog-email-workflow_hu_12a328cce5dd73b.png 800w, https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/mailhog-email-workflow.png 1548w" width="1548"&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 2 shows how MailHog runs inside Docker on &lt;code&gt;project-x-corp-svr&lt;/code&gt; and how the Linux client uses an email poller script to simulate inbox activity.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;On the &lt;strong&gt;&lt;code&gt;project-x-linux-client&lt;/code&gt;&lt;/strong&gt; side, a dedicated Bash script called &lt;strong&gt;&lt;code&gt;email_poller.sh&lt;/code&gt;&lt;/strong&gt; runs in the background and periodically polls the MailHog API to simulate a user checking their inbox. When a new email arrives, the script prints an alert to the terminal.&lt;/p&gt;
&lt;h3 id="suggested-screenshots-to-include-4"&gt;Suggested screenshots to include
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;MailHog web inbox&lt;/li&gt;
&lt;li&gt;Example captured email&lt;/li&gt;
&lt;li&gt;Email headers inside MailHog&lt;/li&gt;
&lt;li&gt;&lt;code&gt;docker ps&lt;/code&gt; showing the MailHog container&lt;/li&gt;
&lt;li&gt;Docker Compose file or MailHog startup command&lt;/li&gt;
&lt;li&gt;&lt;code&gt;email_poller.sh&lt;/code&gt; running in terminal&lt;/li&gt;
&lt;li&gt;MailHog API response&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="security-stack"&gt;Security Stack
&lt;/h2&gt;&lt;p&gt;The defensive side of the homelab is built around &lt;strong&gt;Wazuh&lt;/strong&gt; and &lt;strong&gt;Security Onion&lt;/strong&gt;. Wazuh provides host-based monitoring, while Security Onion provides network-level visibility.&lt;/p&gt;
&lt;h3 id="figure-3---security-monitoring-and-defence-architecture"&gt;Figure 3 - Security Monitoring and Defence Architecture
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Security Monitoring and Defence Architecture" class="gallery-image" data-flex-basis="493px" data-flex-grow="205" height="582" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/wazuh-monitoring-topology.png" srcset="https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/wazuh-monitoring-topology_hu_aadc6f2150aa5518.png 800w, https://lck920.github.io/p/part-1-homelab-setup-building-a-business-in-a-box/wazuh-monitoring-topology.png 1196w" width="1196"&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 3 shows how endpoint activity is collected and forwarded into the security server, where it can be used for threat defence, incident response, and defensive analysis.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="wazuh-siem"&gt;Wazuh SIEM
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Wazuh&lt;/strong&gt; is the main defensive tool in this homelab. It runs on &lt;strong&gt;&lt;code&gt;project-x-sec-box&lt;/code&gt;&lt;/strong&gt; and uses an agent-based model. Lightweight agents are installed on monitored machines and forward telemetry back to the central Wazuh Server.&lt;/p&gt;
&lt;p&gt;The three core components are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Wazuh Agents&lt;/strong&gt; - installed on &lt;code&gt;project-x-win-client&lt;/code&gt;, &lt;code&gt;project-x-linux-client&lt;/code&gt;, and &lt;code&gt;project-x-dc&lt;/code&gt;. They monitor host-level activity such as system logs, file changes, and rootkit detection.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wazuh Server&lt;/strong&gt; - receives all agent data, decodes logs, and runs them against a ruleset library to flag indicators of compromise.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wazuh Indexer and Dashboard&lt;/strong&gt; - stores telemetry data and provides a web interface for visualising alerts and performing forensic investigation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;During attack simulations, Wazuh is used to observe the digital footprint left behind at each stage of the attack lifecycle, from initial access to persistence.&lt;/p&gt;
&lt;h3 id="suggested-screenshots-to-include-5"&gt;Suggested screenshots to include
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;Wazuh dashboard homepage&lt;/li&gt;
&lt;li&gt;Wazuh agent list showing connected hosts&lt;/li&gt;
&lt;li&gt;Security events dashboard&lt;/li&gt;
&lt;li&gt;Failed login detection alert&lt;/li&gt;
&lt;li&gt;File Integrity Monitoring alert&lt;/li&gt;
&lt;li&gt;MITRE ATT&amp;amp;CK mapping page&lt;/li&gt;
&lt;li&gt;Vulnerability detection results&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="security-onion"&gt;Security Onion
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Security Onion&lt;/strong&gt; runs on &lt;strong&gt;&lt;code&gt;project-x-sec-work&lt;/code&gt;&lt;/strong&gt; and complements Wazuh by providing network-level visibility.&lt;/p&gt;
&lt;p&gt;While Wazuh focuses on host-based monitoring, Security Onion handles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Network Security Monitoring (NSM)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Packet capture&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Traffic analysis&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Suricata alerts&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Zeek logs&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Threat hunting&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This provides visibility across the lab network, even in situations where host-based telemetry is limited or unavailable.&lt;/p&gt;
&lt;h3 id="suggested-screenshots-to-include-6"&gt;Suggested screenshots to include
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;Security Onion dashboard&lt;/li&gt;
&lt;li&gt;Packet capture interface&lt;/li&gt;
&lt;li&gt;Suricata alert view&lt;/li&gt;
&lt;li&gt;Zeek log search&lt;/li&gt;
&lt;li&gt;Traffic analysis view&lt;/li&gt;
&lt;li&gt;PCAP investigation screen&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="offensive-environment"&gt;Offensive Environment
&lt;/h2&gt;&lt;p&gt;The attacker machine, &lt;strong&gt;&lt;code&gt;project-x-attacker&lt;/code&gt;&lt;/strong&gt;, runs &lt;strong&gt;Kali Linux 2024.4&lt;/strong&gt; and is loaded with the tools used throughout the attack simulation.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;&lt;strong&gt;Tool&lt;/strong&gt;&lt;/th&gt;
 &lt;th&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Hydra&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Brute-force password attacks&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;NetExec (&lt;code&gt;nxc&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Credential spraying and lateral movement&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Evil-WinRM&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Remote shell access to Windows systems over WinRM&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;XFreeRDP&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Remote Desktop Protocol access&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;SecLists&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Curated wordlists for credential attacks&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;These tools are used only inside the isolated homelab network for controlled security testing.&lt;/p&gt;
&lt;h3 id="suggested-screenshots-to-include-7"&gt;Suggested screenshots to include
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;Kali Linux desktop or terminal&lt;/li&gt;
&lt;li&gt;Hydra brute-force output&lt;/li&gt;
&lt;li&gt;NetExec credential spraying output&lt;/li&gt;
&lt;li&gt;Evil-WinRM shell access&lt;/li&gt;
&lt;li&gt;XFreeRDP session to Windows workstation&lt;/li&gt;
&lt;li&gt;Wazuh alert generated from offensive activity&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="test-credentials"&gt;Test Credentials
&lt;/h2&gt;&lt;p&gt;Weak credentials are intentionally configured throughout the lab to make the attack simulation possible. These credentials are for homelab use only.&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Do not use these credentials outside the lab. They are intentionally weak and should never be reused in real systems.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;&lt;strong&gt;Account&lt;/strong&gt;&lt;/th&gt;
 &lt;th&gt;&lt;strong&gt;Password&lt;/strong&gt;&lt;/th&gt;
 &lt;th&gt;&lt;strong&gt;Host&lt;/strong&gt;&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Administrator&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;@Deeboodah1!&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;project-x-dc&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;johnd@corp.project-x-dc.com&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;@password123!&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;project-x-win-client&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;jane@linux-client&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;@password123!&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;project-x-linux-client&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;sec-user@sec-box&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;@password123!&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;project-x-sec-box&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;attacker&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;attacker&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;project-x-attacker&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;This completes the foundational setup of the &lt;strong&gt;Business-in-a-Box&lt;/strong&gt; cybersecurity homelab. The environment now includes a domain controller, enterprise workstations, internal email infrastructure, security monitoring platforms, and an attacker node.&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;Part 2&lt;/strong&gt;, I will deliberately misconfigure several services across the lab to create a realistically vulnerable environment and connect those activities into Wazuh for detection.&lt;/p&gt;</description></item></channel></rss>