宅色夫:現在看到的 ld 其實是 loader 的縮寫,因為以前 linker 跟 loader 不分
這篇文章部份內容似乎不大正確,/etc/ld.so.preload 在 Ubuntu 預設就不會存在,請其他大大幫忙確認一下
他那個其實也是翻譯的,他附的來源中的
2.3. Prevention and Response
In addition, in order to check if your system is infected, you can search for “ld.so” files — if any of the files do not contain the string ‘/etc/ld.so.preload’, your system may be compromised.
所以他講的檢查方法其實也不完全適用每台 Linux
最簡單的還是直接封鎖那兩個 CoC Server 的 IP
目前查到的方式都是用--newer-than抓以現在維基準的一個range的時間來當作spec
翻譯:
進一步說,想要檢查你的系統有沒有被感染,可以搜尋「ld.so」檔案--如果有一個這種檔案裡面沒有「/etc/ld.so.preload」這樣的字串,你的系統可能被入侵了
小弟當時用了兩行命令:
sudo find / -name 'ld*.so'
strings /lib/x86_64-linux-gnu/
ld-2.27.so | grep ld.so.preload
呃...
strings /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.27.so | grep ld.so.preload
沒有找到 ld.so.preload 字串,該怎麼辦?
更新版,你再試一次,把回應傳上來:
for file in$(sudo find / -name 'ld*.so') ; do strings $file | grep -q ld.so.preload || echo not found in $file ; done
更新版,你再試一次,把回應傳上來:
for file in$(sudo find / -name 'ld*.so') ; do strings $file | grep -q ld.so.preload || echo not found in $file ; done
not found in /usr/lib/debug/lib/x86_64-linux-gnu/
ld-2.27.so
not found in /usr/lib/debug/lib/x86_64-linux-gnu/
ld-2.27.so
Startup finished in 4.715s (firmware) + 162ms (loader) + 1.822s (kernel) + 3.290s (userspace) = 9.991s
graphical.target reached after 2.888s in userspace
那個 debug 的版本可能沒有那個字串,我這邊也有同樣回應,但是一般版就正常
一般版的就有 /etc/ld.so.preload