Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
setuid(0) と execve("/bin/bash",NULL,NULL) を呼び出すプログラムを作成しました。
それから私はやったchown root:root a.out && chmod +s a.out
chown root:root a.out && chmod +s a.out
実行する./a.outと、ルート シェルが表示されます。ただし、gdb a.out通常のユーザーとしてプロセスを開始し、ユーザーシェルを起動します。
./a.out
gdb a.out
それで... suided root プログラムをデバッグできますか?
gdbルートとして実行することによってのみ。(つまりNo.)
gdb
セキュリティ上の理由から、通常のユーザーは、他のユーザー (特に root) に属するプロセスを追跡することはできません。