天天看點

植入式攻擊入侵檢測解決方案

中國廣東省深圳市龍華新區民治街道溪山美地

518131

+86 13113668890

+86 755 29812080

版權 © 2014 http://netkiller.github.io

版權聲明

轉載請與作者聯系,轉載時請務必标明文章原始出處和作者資訊及本聲明。

植入式攻擊入侵檢測解決方案

文檔出處:

<a href="http://netkiller.github.io/" target="_top">http://netkiller.github.io</a>

<a href="http://netkiller.sourceforge.net/" target="_top">http://netkiller.sourceforge.net</a>

2014-12-25

摘要

我的系列文檔

<a href="http://netkiller.github.io/architect/index.html" target="_top">netkiller architect 手劄</a>

<a href="http://netkiller.github.io/developer/index.html" target="_top">netkiller developer 手劄</a>

<a href="http://netkiller.github.io/php/index.html" target="_top">netkiller php 手劄</a>

<a href="http://netkiller.github.io/python/index.html" target="_top">netkiller python 手劄</a>

<a href="http://netkiller.github.io/testing/index.html" target="_top">netkiller testing 手劄</a>

<a href="http://netkiller.github.io/cryptography/index.html" target="_top">netkiller cryptography 手劄</a>

<a href="http://netkiller.github.io/linux/index.html" target="_top">netkiller linux 手劄</a>

<a href="http://netkiller.github.io/debian/index.html" target="_top">netkiller debian 手劄</a>

<a href="http://netkiller.github.io/centos/index.html" target="_top">netkiller centos 手劄</a>

<a href="http://netkiller.github.io/freebsd/index.html" target="_top">netkiller freebsd 手劄</a>

<a href="http://netkiller.github.io/shell/index.html" target="_top">netkiller shell 手劄</a>

<a href="http://netkiller.github.io/security/index.html" target="_top">netkiller security 手劄</a>

<a href="http://netkiller.github.io/www/index.html" target="_top">netkiller web 手劄</a>

<a href="http://netkiller.github.io/monitoring/index.html" target="_top">netkiller monitoring 手劄</a>

<a href="http://netkiller.github.io/storage/index.html" target="_top">netkiller storage 手劄</a>

<a href="http://netkiller.github.io/mail/index.html" target="_top">netkiller mail 手劄</a>

<a href="http://netkiller.github.io/docbook/index.html" target="_top">netkiller docbook 手劄</a>

<a href="http://netkiller.github.io/version/index.html" target="_top">netkiller version 手劄</a>

<a href="http://netkiller.github.io/database/index.html" target="_top">netkiller database 手劄</a>

<a href="http://netkiller.github.io/postgresql/index.html" target="_top">netkiller postgresql 手劄</a>

<a href="http://netkiller.github.io/mysql/index.html" target="_top">netkiller mysql 手劄</a>

<a href="http://netkiller.github.io/nosql/index.html" target="_top">netkiller nosql 手劄</a>

<a href="http://netkiller.github.io/ldap/index.html" target="_top">netkiller ldap 手劄</a>

<a href="http://netkiller.github.io/network/index.html" target="_top">netkiller network 手劄</a>

<a href="http://netkiller.github.io/cisco/index.html" target="_top">netkiller cisco ios 手劄</a>

<a href="http://netkiller.github.io/h3c/index.html" target="_top">netkiller h3c 手劄</a>

<a href="http://netkiller.github.io/multimedia/index.html" target="_top">netkiller multimedia 手劄</a>

<a href="http://netkiller.github.io/perl/index.html" target="_top">netkiller perl 手劄</a>

<a href="http://netkiller.github.io/radio/index.html" target="_top">netkiller amateur radio 手劄</a>

<a href="http://netkiller.github.io/devops/index.html" target="_top">netkiller devops 手劄</a>

目錄

<a href="http://netkiller.github.io/journal/security.implants.html#what">1. 什麼是植入式攻擊?</a>

<a href="http://netkiller.github.io/journal/security.implants.html#why">2. 為什麼駭客會在你的系統裡面植入木馬?</a>

<a href="http://netkiller.github.io/journal/security.implants.html#when">3. 什麼時候被挂馬?</a>

<a href="http://netkiller.github.io/journal/security.implants.html#where">4. 在那裡挂馬的?</a>

<a href="http://netkiller.github.io/journal/security.implants.html#who">5. 誰會在你的系統裡挂馬?</a>

<a href="http://netkiller.github.io/journal/security.implants.html#how">6. 怎樣監控植入式攻擊</a>

<a href="http://netkiller.github.io/journal/security.implants.html#idp41395376">6.1. 程式與資料分離</a>

<a href="http://netkiller.github.io/journal/security.implants.html#idp41398160">6.2. 監控檔案變化</a>

<a href="http://netkiller.github.io/journal/security.implants.html#idp41398416">6.3. 安裝日志收集程式</a>

<a href="http://netkiller.github.io/journal/security.implants.html#idp41406112">7. 延伸閱讀</a>

什麼是植入式攻擊,通俗的說就是挂馬,通過各種手段将木馬上傳到你的系統,修改原有程式,或者僞裝程式是你很難發現,常住系統等等。

通常挂馬攻擊駭客都是有目的的很少會破壞你的系統,而是利用你的系統。

例如,使用你的網絡作ddos攻擊,下載下傳你的資料資料賣錢等等

有時你到一家新公司,接手一堆爛攤子,俗稱“擦屁股”。這是中國是離職,中國式裁員,中國式工作交接.....的結果,各種奇葩等着你。

你接手第一項工作就是工作交接,最重要的工作可能就是檢查系統後門。通常工作交接少有積極配合的,全要靠你自己。

98%是駭客入侵,1%是内人幹的,1%是開後門僅僅為了工作友善。

本文對現有的系統無能為力,隻能監控新的入侵植入

程式包括腳本,變異檔案等等,通常是隻讀權限

資料是指由程式生成的檔案,例如日志

将程式與資料分離,存放在不同目錄,設定不同權限, 請關注“延伸閱讀”中的文章,裡面有詳細介紹,這裡略過。

我們這裡關注一旦運作的程式被撰改怎麼辦,包括入侵進入與合法進入。總之我們要能快速知道那些程式檔案被修改。前提是我們要将程式與資料分離,才能更好地監控程式目錄。

我使用 incron 監控檔案變化

安裝日志推送程式

配置觸發事件

/srv/bin/monitor.sh 腳本

/etc 與 /www 目錄中的任何檔案被修改都回運作/srv/bin/monitor.sh腳本,/srv/bin/monitor.sh腳本通過/usr/local/bin/rlog程式将檔案路徑資料發給遠端主機172.16.0.10。

配置收集端端口,編輯檔案logging/init.d/ucollection

然後根據incron.log給相關管理人員發送郵件或短信警報等等,關于怎麼發郵件與短信不再本文談論範圍,有興趣留意我的官網。

<a href="http://netkiller.github.io/journal/mysql.security.html" target="_top">資料庫記錄安全解決方案</a>

<a href="http://netkiller.github.io/journal/tomcat.html" target="_top">tomcat 安全配置與性能優化</a>

<a href="http://netkiller.github.io/journal/security.html" target="_top">linux 系統安全與優化配置</a>

<a href="http://netkiller.github.io/journal/refresh.html" target="_top">網站防刷方案</a>

<a href="http://netkiller.github.io/journal/security.php.html" target="_top">php 安全與性能</a>

<a href="http://netkiller.github.io/storage/incron.html" target="_top">http://netkiller.github.io/storage/incron.html</a>