Pcap-Analyzer
主要功能
1.展示數(shù)據(jù)包基本信息
2.分析數(shù)據(jù)包協(xié)議
3.分析數(shù)據(jù)包流量
4.繪制出訪問IP經(jīng)緯度地圖
5.提取數(shù)據(jù)包中特定協(xié)議的會(huì)話連接(WEB,F(xiàn)TP,Telnet)
6.提取會(huì)話中的敏感數(shù)據(jù)(密碼)
7.簡單的分析數(shù)據(jù)包中的安全風(fēng)險(xiǎn)(WEB攻擊,暴力破解)
8.提取數(shù)據(jù)報(bào)中的特定協(xié)議的傳輸文件或者所有的二進(jìn)制文件
效果展示
首頁:

基本數(shù)據(jù)展示:

協(xié)議分析:

流量分析:

訪問IP經(jīng)緯度地圖:

會(huì)話提取:

攻擊信息警告:

文件提取:

安裝部署過程:
運(yùn)行環(huán)境:Python 2.7.X
操作系統(tǒng):Linux (以Ubuntu 15.10為例)
1.Python相關(guān)環(huán)境配置(Ubuntu默認(rèn)安裝Python2.7不需要額外安裝Python)
Python包管理器安裝:sudo apt-get install python-setuptools python-pip
2.相關(guān)第三方依賴庫安裝:
sudo apt-get install tcpdump graphviz imagemagick python-gnuplot python-crypto python-pyx
sudo pip install scapy
sudo pip install Flask
sudo pip install Flask-WTF
3.修改配置文件
注意修改config.py配置文件中的目錄位置
UPLOAD_FOLDER = '/home/dj/PCAP/' 上傳的PCAP文件保存的位置
FILE_FOLDER = '/home/dj/Files/' 提取文件時(shí)保存的位置,下面必須要有All、FTP、Mail、Web子目錄,用于存放提取不同協(xié)議的文件
PDF_FOLDER = '/home/dj/Files/PDF/' PCAP保存為PDF時(shí)保存的位置
4.服務(wù)器安裝
Gunicorn服務(wù)器:pip install gunicorn
Nginx服務(wù)器:sudo apt-get install nginx
server {
listen 81;
server_name localhost;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
#root html;
#index index.html index.htm;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8000;
}
error_page 500 502 503 504 /50x
5.啟動(dòng)系統(tǒng):
進(jìn)入系統(tǒng)所在目錄:../pcap-analyzer
通過Gunicorn服務(wù)器服務(wù)器啟動(dòng)系統(tǒng),運(yùn)行命令:gunicorn -c deploy_config.py run:app
此時(shí)只能本地訪問系統(tǒng),地址: http://127.0.0.1:8000
啟動(dòng)Nginx服務(wù)器:sudo service nginx start
此時(shí)其他主機(jī)也可訪問該系統(tǒng),地址:http://服務(wù)器IP:81
分析優(yōu)化
對數(shù)據(jù)包的分析結(jié)果的準(zhǔn)確率可通過修改配置文件來提高,修正
替換./app/utils/GeoIP/GeoLite2-City.mmdb的IP地址經(jīng)緯度數(shù)據(jù)庫文件能提高IP經(jīng)緯度地圖的準(zhǔn)確率
修改./app/utils/protocol/目錄中的各個(gè)TCP/IP協(xié)議棧的表示號(hào)和對應(yīng)的協(xié)議名稱可修正協(xié)議分析結(jié)果
修改./app/utils/waring/HTTP_ATTACK文件可提高數(shù)據(jù)包中HTTP協(xié)議攻擊的準(zhǔn)確率