# Firmadyne 安裝 & 韌體漏洞示範 - 環境 ubuntu 18.04 - 需先安裝 [binwalk](https://github.com/ReFirmLabs/binwalk) - [Firmadyne](https://github.com/firmadyne/firmadyne ) --- 1. 安裝set up  --- 2. 安裝binwalk  --- 3. 安裝 binary  再一次執行 ./download.sh --- 4. 安裝QEMU  --- 5. 使用方法  --- 6. 攻擊示範 [Netgare CVE](https://www.exploit-db.com/exploits/45909) 分析韌體檔案系統,先以binwalk拆解  進入到squashfs 檔案系統  找到目標(漏洞)檔案 > 組合技: find . -name [filename] find . -name boardDataWW.php  小結:exec函數在到 $_REQUEST['macAddress'] 的時候沒有做處裡並直接執行系統命令 下一步透過 firmadyne 模擬韌體      成功模擬畫面  進入到有漏洞的目錄  啟動burpsuite,firefox proxy設好  ifconfig 查看目前虛擬機器後分配的ip  > 198.168.0.99 用tcpdump 來監聽icmp  依照php if 內要求,先送出正確格式  burpsuite查看,確認能成功送出和回應  接著修改macAddress內容,加上ping指令後送出  此時icmp也成功收到  此時即可開始攻擊 複製etc/passwd 到當前目錄  成功拿到passwd  下一步拿reverse shell 先去找到github 上的[reverseshell](https://github.com/pentestmonkey/php-reverse-shell) 接著用[python架設一個簡易的網頁伺服器](https://blog.gtwang.org/web-development/python-simplehttpserver-web-server/) 建立exploit 檔案,修改ip位置  啟動httpserver  回到burpsuite修改並下載我們的RS後送出  接著nc來監聽1234port  測試結果要將 wget 後面ip改成tap01才行(待理解為甚麼)  可看到server 有收到  最後網址列輸入exploit.php,成功拿到shell  ###### tags: `IOT`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up