- Hands-On Network Forensics
- Nipun Jaswal
- 638字
- 2021-06-24 16:04:19
Basic filters
Network forensics requires you to pinpoint a variety of packets to establish a clear vision for the investigation. Let's explore how we can do this by going through the following steps:
Set up some basic display filters in Wireshark to only view packets of interest, as shown in the following screenshot:

We can see that simply typing in dns as the filter will display DNS packets only; however, we can see that MDNS protocol packets are also displayed.
Considering that we only require DNS packets and not MDNS protocol packets, we can set the filter as dns && !mdns, where ! denotes a NOT operation, as shown in the following screenshot:

We can see from this that we don't have an exact filter for MDNS. So, how do we filter the MDNS packets out? We can see that the MDNS protocol communicates over port 5353. Let's filter that out instead of using an !mdns filter, as shown in the following screenshot:

We can see that providing the filter dns and !(udp.port eq 5353) presents us with only the DNS packets. Here, eq means equal, the ! means NOT, and udp.port means the UDP port. This means that, in layman's terms, we are asking Wireshark to filter DNS packets while removing all the packets that communicate over UDP port 5353.
Similarly, for HTTP, we can type in http as the filter, as shown in the following screenshot:

However, we also have OCSP and Simple Service Discovery Protocol (SSDP) protocol data alongside the data that is filtered from the stream. To filter out the OCSP and SSDP protocol data, we can type in http && !ocsp, and since SSDP poses a similar problem to MDNS, we can type !udp.port==1900. This means that the entire filter becomes http && !ocsp && !udp.port==1900, as shown in the following screenshot:

We can see from this that we have successfully filtered HTTP packets. But can we search through them and filter only HTTP POST packets? Yes, we can, using the expression http contains POST && !ocsp as shown in the following screenshot.

We can see that providing the HTTP contains POST filter filters out all the non-HTTP POST requests. Let's analyze the request by right-clicking and selecting the option to follow the HTTP stream, as shown in the following screenshot:

We can see that this looks like a file that has been sent out somewhere, but since it has headers such as x-360-cloud-security-desc, it looks as though it's the cloud antivirus that is scanning a suspicious file found on the network.
Let's take note of the IP address and match it with the address resolutions, as shown in the following screenshot:

Well, the address resolutions have failed us this time. Let's search the IP on https://who.is/, as shown in the following screenshot:

Yes, it belongs to the QiHU 360 antivirus.
We can also select HTTP packets based on the response codes, as shown in the following screenshot:

We can see that we have filtered the packets using http.response.code==200, where 200 denotes a status OK response. This is handy when investigating packet captures from compromised servers, as it gives us a clear picture of the files that have been accessed and shows us how the server responded to particular requests.
It also allows us to figure out whether the implemented protections are working well, because upon receiving a malicious request, in most cases, the protection firewall issues a 404 (NOT FOUND) or a 403 (Forbidden) response code instead of 200 (OK).
Let's now jump into some case studies and make use of the basics that we just learned.
- 計算機網(wǎng)絡(luò)安全技術(shù)(第6版·慕課版)
- Enterprise Cloud Security and Governance
- 數(shù)字安全藍皮書:本質(zhì)屬性與重要特征
- 安全技術(shù)運營:方法與實踐
- 網(wǎng)絡(luò)安全技術(shù)與實訓(xùn)(第4版)(微課版)
- 可信計算3.0工程初步(第二版)
- 局域網(wǎng)交換機安全
- 物聯(lián)網(wǎng)安全滲透測試技術(shù)
- 電腦安全與攻防入門很輕松(實戰(zhàn)超值版)
- 數(shù)據(jù)保護:工作負載的可恢復(fù)性
- 網(wǎng)絡(luò)安全大數(shù)據(jù)分析與實戰(zhàn)
- 網(wǎng)絡(luò)空間安全:拒絕服務(wù)攻擊檢測與防御
- 網(wǎng)絡(luò)空間安全實戰(zhàn)基礎(chǔ)
- 云計算安全技術(shù)與應(yīng)用
- Real-World SRE