iT邦幫忙

0

linux centos logwatch 日誌 求幫忙看看是否被入侵或攻擊

匿名 2014-01-03 10:54:344330 瀏覽

昨天日誌出現了這些訊息,請問我要如何才能避免,並查證目前是否有被入侵或測試呢?

A total of 10 possible successful probes were detected (the following URLs
contain strings that match one or more of a listing of strings that
indicate a possible exploit):

/data/openwebmail/images/iconsets/Vertito.English/?C=../../../../../../../../../../../../boot.ini HTTP Response 200
/icons/?C=/etc/passwd HTTP Response 200
/?/../../../../../../../../../boot.ini HTTP Response 200
/data/openwebmail/images/iconsets/Vertito.English/?C=/etc/passwd HTTP Response 200
/?/../../../../../../../../../etc/passwd HTTP Response 200
/icons/?C=../../../../../../../../../../../../etc/passwd HTTP Response 200
/icons/?C=../../../../../../../../../../../../boot.ini HTTP Response 200
/data/openwebmail/images/iconsets/Vertito.English/?C=/boot.ini HTTP Response 200
/icons/?C=/boot.ini HTTP Response 200
/data/openwebmail/images/iconsets/Vertito.English/?C=../../../../../../../../../../../../etc/passwd HTTP Response 200
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

6
wiseguy
iT邦超人 1 級 ‧ 2014-01-03 11:25:02
最佳解答

這看起來是在偵測 web server 有沒有目錄遊走的漏洞。比如抓取 boot.ini 是判斷 OS 是不是 windows;而抓取 /etc/passwd 當然就是判斷 OS 是不是 Linux。

一般來說,這是攻擊的前兆。如果被對方偵測出一些重要資訊 (比如 OS 種類、版本,或 Web Server 種類、版本) 就可以藉此查到 OS/server 的安全漏洞,並進而開始攻擊入侵。

所以你可以使用像是 fail2ban 之類的工具或是其它類似的工具來阻擋偵測。

看更多先前的回應...收起先前的回應...
匿名 檢舉

我的主機只有openmail,沒有對外的公開網站

fail2ban我原本就有安裝了,但是沒有被ban掉的訊息,前面也有fortigate硬防,並加上中華電信的資安艦隊入侵防禦,不曉得他怎麼還能溜進來作測試=_=

請問有何方法可以查看是否有被入侵成功呢,HTTP Response 200 應該是有回應的訊息,怕怕的

這個是我另一個問題,因為一直沒人回答,若您有空,請您抽空幫我看看,謝謝
http://ithelp.ithome.com.tw/question/10144069

James iT邦大師 6 級 ‧ 2014-01-03 17:23:30 檢舉

1.可以自己用瀏覽器開看看回應訊息是什麼。
2.fail2ban預設是404錯誤才會攔,如果要加攔其它PARTEN要改filter.d裡的設定。

匿名 檢舉

試了,只能停留在文件小圖示目錄裡
vertito.english裡

我是這樣測試不知是否正確

http://公司ip/data/openwebmail/images/iconsets/Vertito.English/?C=/etc/passwd

只能停留在小圖示區裡,看到的都是小圖

httpd之前已有關閉links功能

但是因為像/?/../../../../../../../../../etc/passwd
這一長串看不懂,而且訊息又是HTTP Response 200
想說是不是指令碼或是link之類的,不知是否會有問題,所以才上來請教

還有入侵防護一直提醒我的httpd有開放來源目錄直接連結(Source Code Disclosure),但是我看都是只能連到一些Q&A還有一些說明檔,就一直沒有管它,一方面也不知道如何做,想請教您是否知道應該如何關閉,像會demo能直接連到這些地方

/data/openwebmail/doc/faq.txt
/data/openwebmail/images/iconsets/Text.Chinese.Simplified/icontext
/data/openwebmail/doc/thttpd.speedycgi.txt

James iT邦大師 6 級 ‧ 2014-01-06 08:27:09 檢舉
James iT邦大師 6 級 ‧ 2014-01-06 08:39:09 檢舉

/?C=/etc/passwd------------------------------->這種是絕對路徑
/?C=../../../../../../../../../etc/passwd----->這種是相對路徑,../代表上一層目錄
如果無論檔案是否存在都回應相同訊息,代表你的系統不會經由此種方式洩漏系統資訊。但是最好還是把相關PARTTEN加到fail2ban中,避免這些擾人的訊息。

匿名 檢舉

請問你是指這個部份嗎,因為我英文不好看不太懂,

<pre class="c" name="code">Directory Listings

If no file from the DirectoryIndex directive can be located in the directory, then mod_autoindex can generate a listing of the directory contents. This is turned on and off using the Options directive. For example, to turn on directory listings for a particular directory, you can use:


<Directory /usr/local/apache2/htdocs/listme>
  Options +Indexes
</Directory>
To prevent directory listings (for security purposes, for example), you should remove the Indexes keyword from every Options directive in your configuration file. Or to prevent them only for a single directory, you can use:


<Directory /usr/local/apache2/htdocs/dontlistme>
  Options -Indexes
</Directory>

我httpd裡面沒什麼東西,因為httpd是為了要讓openmail用的

我搜尋只找到這個,我把-號加上去了

<pre class="c" name="code">Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
    Options -Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
James iT邦大師 6 級 ‧ 2014-01-07 08:35:59 檢舉

Source Code Disclosure

應該是源始碼洩漏,不是目錄直接連接。源始碼洩漏是說使用者可以直接取得網站的程式碼而不是網站程式碼的執行結果,如果只是TXT檔可以取得,應該算是IDS的誤判,而且你使用的是Open Source的程式,只要測試設定資料庫連線的設定檔不能從網路瀏覽器取得勍好了。

匿名 檢舉

只要測試設定資料庫連線的設定檔不能從網路瀏覽器取得勍好了

請問這個要怎麼設定呢?是指哪個

基本上我是sendmail+httpd+openmail而以,

James iT邦大師 6 級 ‧ 2014-01-07 10:37:56 檢舉

openmail 我沒有架過,一般WEB程式都會有一個設定檔,裡面可能會有資料庫連線密碼,設定檔有時是副檔名為conf的文字檔,如果apache沒有過濾的話有可能從外部使用瀏覽器就可以觀看這個設定檔。另外也要小心文字編輯器自動產生的備份檔。

匿名 檢舉

google大神找不到相關資料,我無法確定是否有設定正確,

不知您是否能給我個更明確的方向,謝謝

ayu iT邦好手 2 級 ‧ 2014-01-11 04:34:29 檢舉

IDS誤判的可能性很高的! 畢竟它是用一些通則來做判斷,
但這些通則未必適用於各種web應用.
很久以前, 任職機關有執行過IDS, 掌管資安的說我的openwebmail是舊版有資安漏洞,
但事實上明明是當時的最新版, 高度懷疑那時的IDS沒有更新判斷方式而誤判.
我自己再用過新版的Nessus偵測就沒這問題.
因此 IDS 只能做為參考, 不可做為評量依據.

Openwebmail完全沒有用到資料庫, 這部份不需擔心了.

我要發表回答

立即登入回答