有時候會想要看一下整個通訊過程傳了什麼東西或者是否有 Credentials 洩漏,今天介紹一個 network forensic 工具 - NetworkMiner,它可以用來從網路流量中萃取有用資訊
下載連結:https://www.netresec.com/?page=NetworkMiner
NetworkMiner 目前只支援 Windows 作業系統,但是也可以使用其他工具讓它在 Linux 或 Mac 上執行。它可以將 pcap 內的封包拆開、解析、重組,嘗試把裡面的檔案、圖片、郵件、憑證/SSL 證書、使用者帳號密碼等直接還原出來,另外它也可以即時監聽封包並分析
但是,NetworkMiner 免費版只能分析 pcap 檔案,如果是 pcapng 格式則需要付費才能分析,付費版本需要 1300 USD
pcapng 也是一種用來儲存網路封包捕捉資料的檔案格式,是舊的 pcap 格式的進化版,它會比 pcap 儲存的資料還要多,可以分析的資訊也越多。目前 Wireshark 從 v1.8 開始,預設就把封包儲存格式改成 pcapng
今天的 pcap 檔案會從 Cyberdefender - BlueSky Ransomware Lab 的題目下載,並用 NetworkMiner 分析。
首先把 pcap 檔案丟進 NetworkMiner 當中分析
分析完後會先顯示的頁面是封包出現的主機,當中包含了主機的 IP、host、以及它開放的 port 等等
接下來 Host 選項的右邊 Files 頁面,它會截取未加密的檔案,Files 右邊的 Image 頁面也是相同功能,專門截取未加密的圖片
接下來是 Credential 頁面,它會提取出封包當中明文傳送的帳號密碼
Session 頁面會顯示所有封包的兩方通訊紀錄
Parameter 是將應用層的各種參數、字串、指令、欄位內容提取出來
有了以上的功能,解 BlueSky Ransomware 這個 Lab 的一些題目就會很容易看出來了。
Q1 : Knowing the source IP of the attack allows security teams to respond to potential threats quickly. Can you identify the source IP responsible for potential port scanning activity?
開啟 Host 頁面,發現它的 Hostname、Web Server Banner 可以確定它是可疑的 IP
Q2 : During the investigation, it's essential to determine the account targeted by the attacker. Can you identify the targeted account username?
Q3 : We need to determine if the attacker succeeded in gaining access. Can you provide the correct password discovered by the attacker?
直接去看 Credential 就會看到帳號以及他的密碼
Q4 : Attackers often change some settings to facilitate lateral movement within a network. What setting did the attacker enable to control the target host further and execute further commands?
直接去看 Parameter 頁面,就會看到這串指令
可以發現它就是執行了
EXEC sp_configure 'xp_cmdshell', 1
將 xp_cmdshell 啟用後去執行後面的惡意操作
今天介紹了 NetworkMiner 工具與它的功能,快速提取封包當中的資訊,在配合解題時會很方便,但可惜的是最近出現的題目都會使用 pcapng 儲存,除非特地轉成 pcap 或者使用 tcpdump 提取 pcap,但是這個工具還是很好用。