The ret2win binary is part of the Ropemporium project. The hmi_coolant binary was part of FIRST CTF 2021.
git
docker
Recommended: 2 displays (one for the stream, 1 for the challenges), or one 4K
optional: Ghidra 10.1.1 or later
┌───────────────┐ ┌───────────────┐
│ your computer │ TCP │remote computer│
│ ──────┼────────────────► │ │
│pwntools │ │ │
│ ┌───────┐ │ │ ┌───────┐ │
│ │ │binary │ │ │ │binary │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ └───────┘ │ │ └───────┘ │
│ ▼ │ │ │
│GDB flag1│ │ flag2│
└───────────────┘ └───────────────┘
git clone https://github.com/Z6543/hackersuli_pwntools
cd hackersuli_pwntools
docker build --tag pwnv1 .
docker run --rm -it -v `pwd`:/home/pwntools pwnv1 /usr/bin/tmux
Inside docker:
Use strings, use ghidra.
pwn -h
pwn template -h
pwn template ret2win > exploit.py
Task1: Login as engineer.
Task2: Login as administrator.
Task3: Execute arbitrary commands, get the flag.
Task4: Figure out which exploit protection could defend against this.
pwn template hmi_coolant --host 127.0.0.1 --port 5050 > exploit.py
./exploit.py DEBUG GDB