mitmproxy 監控封包

Posted in :

mitmproxy
https://mitmproxy.org/

An interactive console program that allows traffic flows to be intercepted, inspected, modified and replayed.

這個免費的工具滿好玩的,主要是在做中間人攻擊,操作上也很簡單,但需要client 端需要可以設定proxy,不能設定proxy 的client端軟體在 Windows 上解法比較簡單,再多安裝一個小軟體就可以讓指定的軟體有Proxy功能。

中間人攻擊在Windows上的替代方案比較多,我有用過 Microsoft 的 Fiddler 還有 Wireshark.

Fiddler Web Debugger Tool
https://msdn.microsoft.com/zh-tw/library/windows/desktop/ff966510(v=vs.85).aspx

Wireshark
https://www.wireshark.org/download.html

有了這個 mitmproxy 就可以比較簡單來來檢查電腦間封包裡的內容。目前 mitmproxy 只支援 python 3.5 以上,所以你的電腦需要安裝一下python3.

Linux + Windows 的安裝方法:

pip install mitmproxy

 

Mac OS X 的安裝方法:

預設是沒有 python3 所以要下:

brew install python3

安裝好Python 3 之後,需要安裝 virtualenv:
http://stackoverflow.max-everyday.com/2017/02/mac-pyinstaller/

$ virtualenv venv
$ . venv/bin/activate

進入 virtualenv 後執行 pip3 install mitmproxy

就可以安裝了。

 

mitmproxy 執行方法:

mitmproxy -p 8080

 

mitmproxy 執行畫面:

在 Firefox 裡設好proxy 就可以在 mitmproxy 裡看到封包內容。

 

相關文章:

解析中間人攻擊---SSL欺騙
https://read01.com/LRPA3d.html

中間人攻擊(MITMA,man in the middle attack)
http://wiki.mbalib.com/zh-tw/%E4%B8%AD%E9%97%B4%E4%BA%BA%E6%94%BB%E5%87%BB

F5 SSL forward proxy
https://www.myf5.net/post/1942.htm

FortiADC™ Deployment Guide
High-Performance SSL Inspection with FortiADC and FortiGate
http://docs.fortinet.com/uploaded/files/2879/fortiadc-dg-ssl-forward-proxy.pdf

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *