新聞中心
1. Dionaea 低交互式蜜罐簡介

創(chuàng)新互聯(lián)專注于德令哈網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠為您提供德令哈營銷型網(wǎng)站建設(shè),德令哈網(wǎng)站制作、德令哈網(wǎng)頁設(shè)計(jì)、德令哈網(wǎng)站官網(wǎng)定制、成都微信小程序服務(wù),打造德令哈網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供德令哈網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。
Dionaea(捕蠅草) 低交互式蜜罐(http://dionaea.carnivore.it) 是Honeynet Project的開源項(xiàng)目,起始于Google Summer of Code 2009,是Nepenthes(豬籠草)項(xiàng)目的后繼。Honeynet Project 是成立于 1999 年的國際性非盈利研究組織,致力于提高因特網(wǎng)的安全性,在蜜罐技術(shù)與互聯(lián)網(wǎng)安全威脅研究領(lǐng)域具有較大的影響力。
Dionaea蜜罐的設(shè)計(jì)目的是誘捕惡意攻擊,獲取惡意攻擊會話與惡意代碼程序樣本。它通過模擬各種常見服務(wù),捕獲對服務(wù)的攻擊數(shù)據(jù),記錄攻擊源和目標(biāo) IP、端口、協(xié)議類型等信息,以及完整的網(wǎng)絡(luò)會話過程,自動分析其中可能包含的 shellcode 及其中的函數(shù)調(diào)用和下載文件,并獲取惡意程序。
有別于高交互式蜜罐采用真實(shí)系統(tǒng)與服務(wù)誘捕惡意攻擊,Dionaea 被設(shè)計(jì)成低交互式蜜罐,它為攻擊者展示的所有攻擊弱點(diǎn)和攻擊對象都不是真正的產(chǎn)品系統(tǒng),而是對各種系統(tǒng)及其提供的服務(wù)的模擬。這樣設(shè)計(jì)的好處是安裝和配置十分簡單,蜜罐系統(tǒng)幾乎沒有安全風(fēng)險(xiǎn),不足之處是不完善的模擬會降低數(shù)據(jù)捕獲的能力,并容易被攻擊者識別。
2. Dionaea 的整體結(jié)構(gòu)和工作機(jī)制 Dionaea是運(yùn)行于Linux上的一個應(yīng)用程序,將程序運(yùn)行于網(wǎng)絡(luò)環(huán)境下,它開放Internet上常見服務(wù)的默認(rèn)端口,當(dāng)有外來連接時,模擬正常服務(wù)給予反饋,同時記錄下出入網(wǎng)絡(luò)數(shù)據(jù)流。網(wǎng)絡(luò)數(shù)據(jù)流經(jīng)由檢測模塊檢測后按類別進(jìn)行處理,如果有 shellcode 則進(jìn)行仿真執(zhí)行;程序會自動下載 shellcode 中指定下載或后續(xù)攻擊命令指定下載的惡意文件。從捕獲數(shù)據(jù)到下載惡意文件,整個流程的信息都被保存到數(shù)據(jù)庫中,留待分析或提交到第三方分析機(jī)構(gòu)。
Dionaea 整體結(jié)構(gòu)和工作機(jī)制如圖:
??
??
3. Dionaea 蜜罐安裝過程 Dionaea 目前版本是 0.1.0,采用源碼安裝。軟件運(yùn)行依賴于以下庫:libev,libglib,libssl,liblcfg,libemu,python,sqlite,readline,cython,lxml,libudns,libcurl,libpcap。
安裝過程詳見 http://dionaea.carnivore.it/#compiling,需要注意的是安裝 Python-3.2 時注意按說明修改 setup.py 以確保 zlib 庫能正確安裝。
安裝時要注意依賴庫成功安裝,否則 Dionaea 可能不能正常工作。
安裝詳細(xì)過程:
OS:ubuntu 12.04 (32-bit)
# 安裝依賴
apt-get update
apt-get isntall aptitude
aptitude install libudns-dev libglib2.0-dev libssl-dev libcurl4-openssl-dev libreadline-dev libsqlite3-dev python-dev libtool automake autoconf build-essential subversion git-core flex bison pkg-config
其余的依賴,必須從源代碼安裝,我們將安裝到路徑/opt/dionaea,所以請確保該目錄存在,并允許讀寫權(quán)限。
mkdir /opt/dionaea
cd /opt/dionaea
安裝其他依賴
liblcfg
git clone git://git.carnivore.it/liblcfg.git liblcfg
cd liblcfg/code
autoreconf -vi
./configure --prefix=/opt/dionaea
make install
cd ..
cd ..
libemu
git clone git://git.carnivore.it/libemu.git libemu
cd libemu
autoreconf -vi
./configure --prefix=/opt/dionaea
make install
cd ..
libnl
apt-get install libnl-3-dev libnl-genl-3-dev libnl-nf-3-dev libnl-route-3-dev
libev
wget http://dist.schmorp.de/libev/Attic/libev-4.04.tar.gz
tar xfz libev-4.04.tar.gz
cd libev-4.04
./configure --prefix=/opt/dionaea
make install
cd ..
Python 3.2
wget http://www.python.org/ftp/python/3.2.2/Python-3.2.2.tgz
tar xfz Python-3.2.2.tgz
cd Python-3.2.2/
./configure --enable-shared --prefix=/opt/dionaea --with-computed-gotos --enable-ipv6 LDFLAGS="-Wl,-rpath=/opt/dionaea/lib/ -L/usr/lib/i386-linux-gnu/"
make
make install
cd /opt/dionaea/bin
ln python3.2 /usr/bin/python3
cd ..
sqlite 3.3.7
wget http://www.sqlite.com.cn/Upfiles/source/sqlite-3.3.7.tar.gz
tar xzf sqlite-3.3.7.tar.gz
cd sqlite-3.3.7
mkdir /home/sqlite-3.3.7
./configure --prefix=/home/sqlite-3.3.7
make && make install && make doc
cd /home/sqlite-3.3.7/bin/
ln sqlite3 /usr/bin/sqlite3
Cython
wget http://cython.org/release/Cython-0.15.tar.gz
tar xfz Cython-0.15.tar.gz
cd Cython-0.15
/opt/dionaea/bin/python3 setup.py install
cd ..
libpcap
wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
tar xfz libpcap-1.1.1.tar.gz
cd libpcap-1.1.1
./configure --prefix=/opt/dionaea
make
make install
cd ..
編譯安裝dionaea
git clone git://git.carnivore.it/dionaea.git dionaea
cd dionaea
autoreconf -vi
./configure --with-lcfg-include=/opt/dionaea/include/
--with-lcfg-lib=/opt/dionaea/lib/
--with-python=/opt/dionaea/bin/python3.2
--with-cython-dir=/opt/dionaea/bin
--with-udns-include=/opt/dionaea/include/
--with-udns-lib=/opt/dionaea/lib/
--with-emu-include=/opt/dionaea/include/
--with-emu-lib=/opt/dionaea/lib/
--with-gc-include=/usr/include/gc
--with-ev-include=/opt/dionaea/include
--with-ev-lib=/opt/dionaea/lib
--with-nl-include=/opt/dionaea/include
--with-nl-lib=/opt/dionaea/lib/
--with-curl-config=/usr/bin/
--with-pcap-include=/opt/dionaea/include
--with-pcap-lib=/opt/dionaea/lib/
make
make install
安裝結(jié)束
4. Dionaea 使用方法
Dionaea 根據(jù)命令參數(shù)運(yùn)行,可選擇不同的運(yùn)行環(huán)境、任務(wù)和篩選事件記錄內(nèi)容。配置文件則具體規(guī)定蜜罐運(yùn)行后開啟的模塊,記錄文件的保存位置和擴(kuò)展功能的參數(shù)等信息。默認(rèn)配置下 Dionaea 自動選擇一個網(wǎng)絡(luò)接口進(jìn)行監(jiān)聽。
Dionaea 具體的命令格式如下:
dionaea [-c, --config=FILE] [-D, --daemonize] [-g, --group=GROUP]
[-G, --garbage=[collect|debug]][-h, --help] [-H, --large-help]
[-l, --log-levels=WHAT] [-L, --log-domains=WHAT] [-u, --user=USER]
[-p, --pid-file=FILE] [-r, --chroot=DIR] [-V, --version] [-w, --workingdir=DIR]
選項(xiàng)的意義分別是:
-c:指定運(yùn)行程序所使用的配置文件,默認(rèn)下配置文件是/opt/dionaea/etc/dionaea.conf。
-D:后臺運(yùn)行。
-g:指定啟動后切換到某個用戶組,默認(rèn)下保持當(dāng)前組。
-G:收集垃圾數(shù)據(jù),用于調(diào)試內(nèi)存泄露。不能用于 valgrind 軟件。
-h:幫助信息。
-H:幫助信息,包括默認(rèn)值信息。
-l:選擇事件記錄級別,可以選擇 all, debug, info, message, warning, critical, error 這些值,多選使用“,”做分隔,排除使用“-”。
-L:選擇域,支持通配符“*”和“?”,多選使用“,”,排除使用“-”。
-u:指定啟動后切換到某個用戶,默認(rèn)下保持當(dāng)前用戶。
-p:記錄 pid 到指定文件。
-r:指定啟動后切換根目錄到指定目錄,默認(rèn)下不切換。
-V:顯示版本信息。
-w:設(shè)定進(jìn)程工作目錄,默認(rèn)下為/opt/dionaea。
例子:
切換到 cd /opt/dionaea/bin
# ./dionaea -l all,-debug -L '*'
# ./dionaea -l all,-debug -L 'con*,py*'
# ./dionaea -u nobody -g nogroup -r /opt/dionaea/ -w /opt/dionaea -p /opt/dionaea/var/dionaea.pid
5. 安裝 DionaeaFR
DionaeaFR(https://github.com/RootingPuntoEs/DionaeaFR)是用于前端web展示Dionaea的數(shù)據(jù)。
安裝詳細(xì)過程:
ubuntu 12.04 默認(rèn)已安裝 python 2.7.3
切換到cd /opt/,下載DionaeaFR
git clone https://github.com/RootingPuntoEs/DionaeaFR.git
安裝pip,django,nodejs
apt-get install python-pip
pip install Django
pip install pygeoip
pip install django-pagination
pip install django-tables2
pip install django-compressor
pip install django-htmlmin
pip install django-filter
django-tables2-simplefilter:
https://github.com/benjiec/django-tables2-simplefilter
python setup.py install
SubnetTree:
git clone git://git.bro-ids.org/pysubnettree.git
python setup.py install
nodejs:
http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
tar xzvf node-v0.8.16.tar.gz
cd node-v0.8.16
./configure
make
make install
npm install -g less
apt-get install python-netaddr
下載GeoIP 和 GeoLiteCity
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
解壓GeoIP 和 GeoLiteCity
gunzip GeoLiteCity.dat.gz
gunzip GeoIP.dat.gz
移動GeoIP 和 GeoLiteCity到 /opt/DionaeaFR/DionaeaFR/static
mv GeoIP.dat /opt/DionaeaFR/DionaeaFR/static
mv GeoLiteCity.dat /opt/DionaeaFR/DionaeaFR/static
修改SQLite路徑
cd /opt/DionaeaFR/DionaeaFR
vim settings.py
第17行,SQLite路徑更改為
/opt/dionaea/var/dionaea/logsql.sqlite
如果你安裝dionaea的目錄不在/opt/,那就find下。
find / -name logsql.sqlite ,把查找到的路徑替換到17行中。
運(yùn)行
cd /opt/DionaeaFR
python manage.py collectstatic
python manage.py runserver 0.0.0.0:8000
瀏覽器訪問:http://你的IP:8000
??
??
6. 結(jié)束
低交互式蜜罐的普遍弱點(diǎn),即對網(wǎng)絡(luò)服務(wù)的模擬與真實(shí)服務(wù)存在差距,可能無法捕獲某些對環(huán)境敏感的攻擊,可以搭配其他專用服務(wù)蜜罐一起使用,來不斷進(jìn)行完善。
Kippo(SSH蜜罐開源軟件)
Glastopf(Web應(yīng)用攻擊誘捕軟件)
參考文檔:
本文基本上參考代恒,諸葛建偉前輩下面這2篇文章。
??http://netsec.ccert.edu.cn/zhugejw/files/2011/09/Dionaea低交互式蜜罐介紹.pdf?? http://netsec.ccert.edu.cn/zhugejw/files/2011/09/Dionaea低交互式蜜罐部署實(shí)踐.pdf
網(wǎng)站標(biāo)題:Dionaea低交互式蜜罐部署詳解
網(wǎng)頁路徑:http://m.fisionsoft.com.cn/article/cogccco.html


咨詢
建站咨詢
