- Machine
- Jewel
- OS
- Linux
- Difficulty
- Medium
- Steps
- 3
- Added
- 23 Mar 2023
A Rails deserialization RCE gives a shell; a cracked backup hash and a 2FA-gated sudo gem rule give root.
How it went
- 0nmap
An nmap scan shows a Git service on 8000 and a Rails blog on 8080.
- 1Rails RCE
Rails 5.2.2.1 is vulnerable to a deserialization RCE through a profile update, giving a shell and the user flag.
- 2bill
A SQL dump in /var/backups yields hashes; bill's cracks to spongebob.
- 3sudo gem (2FA)
bill can sudo gem but it needs a TOTP; a Google Authenticator seed in his home generates the code, and gem's sudo rule spawns a root shell.