偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Dionaea低交互式蜜罐部署詳解

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

1. Dionaea 低交互式蜜罐簡介

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

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

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

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

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

??

Dionaea低交互式蜜罐部署詳解

??

3. Dionaea 蜜罐安裝過程 Dionaea 目前版本是 0.1.0,采用源碼安裝。軟件運行依賴于以下庫: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 可能不能正常工作。

安裝詳細過程: 

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ù)運行,可選擇不同的運行環(huán)境、任務(wù)和篩選事件記錄內(nèi)容。配置文件則具體規(guī)定蜜罐運行后開啟的模塊,記錄文件的保存位置和擴展功能的參數(shù)等信息。默認配置下 Dionaea 自動選擇一個網(wǎng)絡(luò)接口進行監(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]

選項的意義分別是:

-c:指定運行程序所使用的配置文件,默認下配置文件是/opt/dionaea/etc/dionaea.conf。
-D:后臺運行。
-g:指定啟動后切換到某個用戶組,默認下保持當前組。
-G:收集垃圾數(shù)據(jù),用于調(diào)試內(nèi)存泄露。不能用于 valgrind 軟件。
-h:幫助信息。
-H:幫助信息,包括默認值信息。
-l:選擇事件記錄級別,可以選擇 all, debug, info, message, warning, critical, error 這些值,多選使用“,”做分隔,排除使用“-”。
-L:選擇域,支持通配符“*”和“?”,多選使用“,”,排除使用“-”。
-u:指定啟動后切換到某個用戶,默認下保持當前用戶。
-p:記錄 pid 到指定文件。
-r:指定啟動后切換根目錄到指定目錄,默認下不切換。
-V:顯示版本信息。
-w:設(shè)定進程工作目錄,默認下為/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ù)。

安裝詳細過程:

ubuntu 12.04 默認已安裝 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行中。 

運行

cd /opt/DionaeaFR

python manage.py collectstatic
python manage.py runserver 0.0.0.0:8000

瀏覽器訪問:http://你的IP:8000

??

Dionaea低交互式蜜罐部署詳解

??

 

6. 結(jié)束

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

Kippo(SSH蜜罐開源軟件)

Glastopf(Web應用攻擊誘捕軟件) 

參考文檔:

本文基本上參考代恒,諸葛建偉前輩下面這2篇文章。

??http://netsec.ccert.edu.cn/zhugejw/files/2011/09/Dionaea低交互式蜜罐介紹.pdf?? http://netsec.ccert.edu.cn/zhugejw/files/2011/09/Dionaea低交互式蜜罐部署實踐.pdf

 

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

2019-01-29 07:06:57

2020-12-18 08:00:00

Python開發(fā)Web

2010-02-24 09:39:25

Python交互式

2011-06-13 18:54:12

2024-07-25 08:58:16

GradioPython數(shù)據(jù)應用

2023-10-16 16:14:32

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

2011-12-27 20:12:56

平板

2023-07-28 14:13:15

Streamlit開源Python庫

2021-10-18 13:31:28

Web應用交互式

2011-04-28 13:09:46

交互式智能白板投影機

2010-12-09 21:46:26

Scapy

2018-05-21 14:44:33

LinuxshellPython

2020-04-06 20:47:42

FishShellLinux

2025-06-09 09:03:58

2011-09-01 15:54:10

app應用

2013-02-18 08:39:15

powershell

2021-06-29 10:23:19

卡巴斯基交互防護VR

2011-08-31 12:09:47

投影儀方案解析

2012-04-10 08:47:38

iPad

2021-10-27 16:03:43

Python編程語言代碼
點贊
收藏

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