自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Dionaea低交互式蜜罐部署詳解

安全 網(wǎng)站安全
Dionaea(捕蠅草) 低交互式蜜罐是Honeynet Project的開(kāi)源項(xiàng)目,起始于 Google Summer of Code 2009,是Nepenthes(豬籠草)項(xiàng)目的后繼。Honeynet Project是成立于1999年的國(guó)際性非盈利研究組織,致力于提高因特網(wǎng)的安全性,在蜜罐技術(shù)與互聯(lián)網(wǎng)安全威脅研究領(lǐng)域具有較大的影響力。

1. Dionaea 低交互式蜜罐簡(jiǎn)介

Dionaea(捕蠅草) 低交互式蜜罐(http://dionaea.carnivore.it) 是Honeynet Project的開(kāi)源項(xiàng)目,起始于Google Summer of Code 2009,是Nepenthes(豬籠草)項(xiàng)目的后繼。Honeynet Project 是成立于 1999 年的國(guó)際性非盈利研究組織,致力于提高因特網(wǎng)的安全性,在蜜罐技術(shù)與互聯(lián)網(wǎng)安全威脅研究領(lǐng)域具有較大的影響力。

Dionaea蜜罐的設(shè)計(jì)目的是誘捕惡意攻擊,獲取惡意攻擊會(huì)話與惡意代碼程序樣本。它通過(guò)模擬各種常見(jiàn)服務(wù),捕獲對(duì)服務(wù)的攻擊數(shù)據(jù),記錄攻擊源和目標(biāo) IP、端口、協(xié)議類型等信息,以及完整的網(wǎng)絡(luò)會(huì)話過(guò)程,自動(dòng)分析其中可能包含的 shellcode 及其中的函數(shù)調(diào)用和下載文件,并獲取惡意程序。

有別于高交互式蜜罐采用真實(shí)系統(tǒng)與服務(wù)誘捕惡意攻擊,Dionaea 被設(shè)計(jì)成低交互式蜜罐,它為攻擊者展示的所有攻擊弱點(diǎn)和攻擊對(duì)象都不是真正的產(chǎn)品系統(tǒng),而是對(duì)各種系統(tǒng)及其提供的服務(wù)的模擬。這樣設(shè)計(jì)的好處是安裝和配置十分簡(jiǎn)單,蜜罐系統(tǒng)幾乎沒(méi)有安全風(fēng)險(xiǎn),不足之處是不完善的模擬會(huì)降低數(shù)據(jù)捕獲的能力,并容易被攻擊者識(shí)別。

2. Dionaea 的整體結(jié)構(gòu)和工作機(jī)制 Dionaea是運(yùn)行于Linux上的一個(gè)應(yīng)用程序,將程序運(yùn)行于網(wǎng)絡(luò)環(huán)境下,它開(kāi)放Internet上常見(jiàn)服務(wù)的默認(rèn)端口,當(dāng)有外來(lái)連接時(shí),模擬正常服務(wù)給予反饋,同時(shí)記錄下出入網(wǎng)絡(luò)數(shù)據(jù)流。網(wǎng)絡(luò)數(shù)據(jù)流經(jīng)由檢測(cè)模塊檢測(cè)后按類別進(jìn)行處理,如果有 shellcode 則進(jìn)行仿真執(zhí)行;程序會(huì)自動(dòng)下載 shellcode 中指定下載或后續(xù)攻擊命令指定下載的惡意文件。從捕獲數(shù)據(jù)到下載惡意文件,整個(gè)流程的信息都被保存到數(shù)據(jù)庫(kù)中,留待分析或提交到第三方分析機(jī)構(gòu)。

Dionaea 整體結(jié)構(gòu)和工作機(jī)制如圖:

??

Dionaea低交互式蜜罐部署詳解

??

3. Dionaea 蜜罐安裝過(guò)程 Dionaea 目前版本是 0.1.0,采用源碼安裝。軟件運(yùn)行依賴于以下庫(kù):libev,libglib,libssl,liblcfg,libemu,python,sqlite,readline,cython,lxml,libudns,libcurl,libpcap。

安裝過(guò)程詳見(jiàn) http://dionaea.carnivore.it/#compiling,需要注意的是安裝 Python-3.2 時(shí)注意按說(shuō)明修改 setup.py 以確保 zlib 庫(kù)能正確安裝。

安裝時(shí)要注意依賴庫(kù)成功安裝,否則 Dionaea 可能不能正常工作。

安裝詳細(xì)過(guò)程: 

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,所以請(qǐng)確保該目錄存在,并允許讀寫(xiě)權(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)行后開(kāi)啟的模塊,記錄文件的保存位置和擴(kuò)展功能的參數(shù)等信息。默認(rèn)配置下 Dionaea 自動(dòng)選擇一個(gè)網(wǎng)絡(luò)接口進(jìn)行監(jiān)聽(tīng)。 

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:后臺(tái)運(yùn)行。
-g:指定啟動(dòng)后切換到某個(gè)用戶組,默認(rèn)下保持當(dāng)前組。
-G:收集垃圾數(shù)據(jù),用于調(diào)試內(nèi)存泄露。不能用于 valgrind 軟件。
-h:幫助信息。
-H:幫助信息,包括默認(rèn)值信息。
-l:選擇事件記錄級(jí)別,可以選擇 all, debug, info, message, warning, critical, error 這些值,多選使用“,”做分隔,排除使用“-”。
-L:選擇域,支持通配符“*”和“?”,多選使用“,”,排除使用“-”。
-u:指定啟動(dòng)后切換到某個(gè)用戶,默認(rèn)下保持當(dāng)前用戶。
-p:記錄 pid 到指定文件。
-r:指定啟動(dòng)后切換根目錄到指定目錄,默認(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ì)過(guò)程:

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

移動(dòng)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

瀏覽器訪問(wèn):http://你的IP:8000

??

Dionaea低交互式蜜罐部署詳解

??

 

6. 結(jié)束

低交互式蜜罐的普遍弱點(diǎn),即對(duì)網(wǎng)絡(luò)服務(wù)的模擬與真實(shí)服務(wù)存在差距,可能無(wú)法捕獲某些對(duì)環(huán)境敏感的攻擊,可以搭配其他專用服務(wù)蜜罐一起使用,來(lái)不斷進(jìn)行完善。

Kippo(SSH蜜罐開(kāi)源軟件)

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

 

責(zé)任編輯:藍(lán)雨淚 來(lái)源: FreebuF
相關(guān)推薦

2019-01-29 07:06:57

2020-12-18 08:00:00

Python開(kāi)發(fā)Web

2010-02-24 09:39:25

Python交互式

2011-06-13 18:54:12

2023-10-16 16:14:32

數(shù)據(jù)中心

2024-07-25 08:58:16

GradioPython數(shù)據(jù)應(yīng)用

2023-07-28 14:13:15

Streamlit開(kāi)源Python庫(kù)

2021-10-18 13:31:28

Web應(yīng)用交互式

2011-12-27 20:12:56

平板

2011-04-28 13:09:46

交互式智能白板投影機(jī)

2020-04-06 20:47:42

FishShellLinux

2018-05-21 14:44:33

LinuxshellPython

2010-12-09 21:46:26

Scapy

2011-09-01 15:54:10

app應(yīng)用

2013-02-18 08:39:15

powershell

2021-06-29 10:23:19

卡巴斯基交互防護(hù)VR

2011-11-14 13:25:57

惠普復(fù)合一體機(jī)

2011-08-31 12:09:47

投影儀方案解析

2009-10-21 14:38:23

IronPython交互式解釋器

2021-10-27 16:03:43

Python編程語(yǔ)言代碼
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)