Importing LoremCorp challenges

This commit is contained in:
Jan Groß
2018-07-08 19:07:37 -04:00
parent aba24b087a
commit 2c718972c7
37 changed files with 40783 additions and 0 deletions

16
looking_good/getFlag.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
#Get everything from the data segment
DATA_SEGMENT=$(readelf -p '.data' auth.o)
#Get the adress of the factory user variable and strip leading 0s
USERNAME_ADDRESS=$(readelf -s auth.o | grep "DEFAULT_FACTORY_USER" | awk '{print $2}' | sed 's/^0*//')
#Get the username value from the data segment, remove th adress column
USERNAME=$(echo "$DATA_SEGMENT" | grep $USERNAME_ADDRESS | awk '{print $3}')
echo "Username: $USERNAME"
#Repeat for the password
PASSWORD_ADDRESS=$(readelf -s auth.o | grep "DEFAULT_FACTORY_PW" | awk '{print $2}' | sed 's/^0*//')
PASSWORD=$(echo "$DATA_SEGMENT" | grep $PASSWORD_ADDRESS | awk '{print $3}')
echo "Password: $PASSWORD"
echo "Login and find the flag at loremcorp.ctf.minzkraut.com:8787/login.php"