1 | 1 | | # QuoteDB (Vulnerable TCP Server) |
2 | 2 | | |
3 | | - | under construction |
| 3 | + | QuoteDB is a command line server which runs on Win32. It is vulnerable |
| 4 | + | by design with the purpose of being an application to practice reverse engineering / exploit development on. |
| 5 | + | |
| 6 | + | It is intended to be compiled with ASLR and DEP protections enabled. A compiled version with these enabled is in the releases section. |
| 7 | + | |
| 8 | + | I created this program while taking the EXP-301 course to practice for the exam. |
| 9 | + | |
| 10 | + | ## Goal |
| 11 | + | |
| 12 | + | The intended way to approach this challenge is to download the .exe, and create an exploit which bypasses ASLR and DEP to give a reverse shell. |
| 13 | + | |
| 14 | + | You should not look at the source code until solved, if you want to practice reverse engineering. |
| 15 | + | |
| 16 | + | ## How to compile |
| 17 | + | |
| 18 | + | To compile without any protections: |
| 19 | + | - `gcc main.c -o main.exe -l ws2_32` |
| 20 | + | |
| 21 | + | To compile with DEP: |
| 22 | + | - `gcc main.c -o main.exe -l ws2_32 '-Wl,--nxcompat,'` |
| 23 | + | |
| 24 | + | To compile with ASLR: |
| 25 | + | - `gcc main.c -o main.exe -l ws2_32 '-Wl,--dynamicbase'` |
| 26 | + | |
| 27 | + | To compile with DEP + ASLR: |
| 28 | + | - `gcc main.c -o main.exe -l ws2_32 '-Wl,--nxcompat,--dynamicbase'` |
| 29 | + | |
| 30 | + | ## How to run |
| 31 | + | |
| 32 | + | To run on the default port (3700): |
| 33 | + | - `.\main.exe` |
| 34 | + | |
| 35 | + | To run on a custom port: |
| 36 | + | - `.\main.exe -p PORT` |
| 37 | + | |
| 38 | + | ## Solution |
| 39 | + | |
| 40 | + | A solution PoC script is included (`poc.py`). I recommend that you don't look at it until after solving the challenge, as it will spoil the fun. |