前幾天遇到一個問題在分析代碼時,樣本是替換了Linux的命令文件,然後想要遠程調試虛擬機上的elf樣本,開始是用的Remote Linux debugger方式,結果attach時候報錯:
The debugger could not attach to the selected process.
This can perhaps indicate the process was just terminated, or that you don't have the necessary privileges.
說是已經終止或者沒有權限,但是沒有搜到爲什麼,最後使用了Remote Linux debugger。
先將程序跑起來,然後使用gdbserver比如我這裏命令就是
gdbserver --remote-debug 0.0.0.0:23946 --attach (需要調試的pid)
然後ida設置好遠程調試,F9就可以調試了。至於Remote Linux debugger爲什麼不行,等待以後再研究