偽裝成 .. 的木馬資料夾 - Linux

Table of Contents

※ 引述《james732 (好人超)》之銘言:
: 今天去處理一台疑似被入侵的電腦
: 發現在 /tmp 底下竟然有兩個 '..' 資料夾 XD
: drwxrwxrwt 6 root root 1202 Oct 14 03:30 .
: drwxr-xr-x 46 root root 1536 Sep 27 16:18 ..
: drwxr-xr-x 4 root root 1536 Sep 22 23:52 ..
: 大概有點像這個樣子 XD
: 用 find 輸出的結果類似這樣:
: /tmp/.. /file1
: /tmp/.. /file2
: 可以看到它其實是 .. 後面加上一個印不出來的字元
: 不過這種鬼東西,我還真不知道要怎麼刪掉 orz
: 因此想上來請教一下,對這樣的目錄要怎麼處理呢?

(不知道我想法有沒有問題...有錯請指正@@)

法一

我覺得問題在於無法(或不易)打出那個"看不見的字元"

解決方法就是利用shell的tab completion

讓shell幫你把檔名補完 就不需自己手動打了

若是bash 請在家目錄下新增檔名為".inputrc"的檔案

內容是"\t": menu-complete

然後cd到/tmp

rm -r <TAB> 個幾次 看到那資料夾出現就把它刪了

請參考:

1. bash的tab-completion

http://hints.macworld.com/article.php?story=20050904022246573

2. tcsh的tab-completion

http://hints.macworld.com/article.php?story=20020215085858541

法二

用FileZilla或WinSCP連到該機器

然後直接從檔案總管裡刪資料夾

--

All Comments

Agatha avatarAgatha2010-10-19
原來如此,我怎麼會沒想到 tab...
非常感謝你的回覆!
Liam avatarLiam2010-10-20
專業又簡單~連我新手都看得懂了LOL
Bethany avatarBethany2010-10-25
zsh好像就直接可以用tab輪流選....