
Photo by
yui001
OverTheWire:Behemoth2
前回の記事で取得したパスワードで接続。
ssh behemoth2@behemoth.labs.overthewire.org -p 2221
とりあえず実行してみる。
behemoth2@behemoth:~$ /behemoth/behemoth2
touch: cannot touch '26952': Permission denied
^C
何かファイルを作ろうとして、応答無しになった。
とりあえず [CTRL]+C で実行を止め、トレースして詳しく見てみよう。
behemoth2@behemoth:~$ ltrace /behemoth/behemoth2
__libc_start_main(0x804856b, 1, 0xffffd774, 0x8048660 <unfinished ...>
getpid() = 27015
sprintf("touch 27015", "touch %d", 27015) = 11
__lxstat(3, "27015", 0xffffd640) = -1
unlink("27015") = -1
geteuid() = 13002
geteuid() = 13002
setreuid(13002, 13002) = 0
system("touch 27015"touch: cannot touch '27015': Permission denied
<no return ...>
--- SIGCHLD (Child exited) ---
<... system resumed> ) = 256
sleep(2000
自身のプロセスID をファイル名にしてファイルを作成し 2000秒スリープしていることが判った。
スリープ後は何をするのだろう?
デバッガで調べてみよう。
ここから先は
3,939字
¥ 500

この記事が気に入ったらチップで応援してみませんか?