Sheet 6
PABE Exercise Sheet 6
General Information
All solutions must be created with Python 3. If you are new to Python 3 have a look online… there are many good resources to get started such as this course, this blog post and this slide deck. Feel free to post other resources to the mailing list to help other PABE students.
Please keep in mind that you should:
-
read the task description carefully
-
push
all your changes to the GitLab repository (master
branch) before the deadline. Make also sure that the file permissions are set correctly! If you are new to Git check out this site! -
make sure that your solution (also) runs on the virtual machine (and not just your local machine); this also means that you must install all additional packages yourself from within the
solution
script (e.g.,os.system("pip install --user -r requirements.txt")
) -
make sure that the solution is an executable script named
solution
(chmod +x ./solution
) with a working shebang line at the top (e.g.,#!/usr/bin/env python3
) so that it can be executed like this:./solution
(do not name your scriptsolution.py
,Solution
,solution.sh
, … justsolution
) -
the final solution string, and only that, must be written to
stdout
and could be a number, a string, a string with the formatFLAG{some letters and digits here}
, depending on the specific task -
describe what you are doing using detailed comments for all your solution scripts! For example, use Docstrings (link) or inline comments:
1 2 3 4 5 6 7 8
def check_input_length(input_string): """ The input string must have a length greater than 42 and must also be even. """ length = len(input_string) # the final check happens here return (length > 42) and (length % 2 == 0)
This helps us to find out if you really understood the task and you are not just brute-forcing some solutions. Please do not leave any commented code (i.e., code that is not needed to solve the task) in your
solution
files! -
make sure that your
solution
executes within 10 seconds (this is a hard timeout on our server) -
All exploit scripts must be written as Python 3 scripts using the
pwntools
library (from pwn import *
)! Use therecvuntil("string goes here")
function to keep everything in sync. Otherwise you may send data faster than the server expects it and the exploit might not work. Most of thesolution
files we provided also include the possibility to debug your exploit by providing theGDB
parameter to yoursolution
script, i.e../solution GDB
. Make use of this feature to test your exploit! We suggest that you use atmux
session to debug your exploit which provides a convenient split view. -
violating any of the points above might lead to reduced final points for the specific task!
The deadline for this sheet is Tuesday, 2021-02-09 23:59:59
Task 26 – Improved PABE Service (2 Points)
Our developer team published this new PABE echo service. This time the binary is even more secured and offers some new functions. Are you ready to exploit it? Just do it then!
Once againe, edit the provided solution
template and explain your approach with meaningful comments!
Your solution should look like:
|
|
Task 27 – Two Bugs (2 Points)
This binary contains two bugs. Can you exploit both to get the flag printed?
Once again, edit the provided solution
template and explain your approach with meaningful comments!
Your solution should look like:
|
|
Task 28 – A little printer developed during Xmas (4 Points)
Our developer team just build this little printer during Xmas. We hope you enjoy our printer while the baubles are still dangling under your Xmas tree. In the meantime, try to exploit our little printer and print the flag.
Once again, edit the provided solution
template and explain your approach with meaningful comments!
Your solution should look like:
|
|
Once againe, edit the provided solution
template!
Task 29 – Some Poison for the Cash machine (4 Points)
Money is not all, but with money everything is more fun. Therefore we want to use this awesome cash machine to get our money printed. Are you even able to poison the machine in a way that it gives you a shell?
Once again, edit the provided solution
template and explain your approach with meaningful comments!
Your solution should print the flag by expxloiting the bug in the program and the output should look like this:
|
|
Task 30 – Bank Robbery 2.0 (8 Points)
You are now a member of the digital bank robber group Fang-Den-Shui which is famous for stealing money from the rich and giving it to the poor. Are you ready to proof your value?
Once again, edit the provided solution
template and explain your approach with meaningful comments!
Your solution should look like:
|
|