[閒聊] 每日CTF

作者: abcd991276 (QQ)   2024-03-07 17:06:25
題目:
Try reversing this file? Can ya?
I forgot the password to this file. Please find it for me?
解題:
他就給一個名叫ret的執行檔,執行會要求密碼,密碼正確才給flag
就反組譯找答案
#!/bin/bash
echo "Attempting disassembly of $1 ..."
objdump -Dj .text $1 > $1.ltdis.x86_64.txt
if [ -s "$1.ltdis.x86_64.txt" ]
then
echo "Disassembly successful! Available at: $1.ltdis.x86_64.txt"
echo "Ripping strings from binary with file offsets..."
strings -a -t x $1 > $1.ltdis.strings.txt
echo "Any strings found in $1 have been written to $1.ltdis.strings.txt
with file offset"
else
echo "Disassembly failed!"
echo "Usage: ltdis.sh <program-file>"
echo "Bye!"
fi
在檢查完的 ret.ltdis.strings.txt 中直接找到 flag , password 什麼的就算了

Links booklink

Contact Us: admin [ a t ] ucptt.com