CpawCTF Q7.[Reversing] Can you execute ?
拡張子がないファイルを貰ってこのファイルを実行しろと言われたが、どうしたら実行出来るのだろうか。
この場合、UnixやLinuxのとあるコマンドを使ってファイルの種類を調べて、適切なOSで実行するのが一般的らしいが…
問題ファイル: exec_me
とあるコマンドとはfileのことだろう。
$ file exec_me
exec_me: ELF 64-bit LSB executable, x86-64,
version 1 (SYSV), dynamically linked,
interpreter /lib64/ld-linux-x86-64.so.2,
for GNU/Linux 2.6.24,
BuildID[sha1]=663a3e0e5a079fddd0de92474688cd6812d3b550,
not stripped
ELFはExecutable and Linking Formatの略で、実行可能かつリンク可能な形式であり、Linuxで標準バイナリ形式として採用されているもの。
VirtualBox上のUbuntu 19.04.3で実行権限を与えて実行する。
$ ls -l exec_me
-rw-rw-r-- ...
$ chmod u+x exec_me
$ ls -l exec_me
-rwxrw-r-- ...
$ ./exec_me
cpaw{Do_you_know_ELF_file?}
答え:cpaw{Do_you_know_ELF_file?}