Network Traffic Forensics for Malware Detection using PCAP Analysis
Introduction :
This data analysis focuses on identifying malware presence using passive network traffic analysis on the PCAP dataset dated 2020-04-24. The file was analyzed using Wireshark without executing any malicious code. A layered approach was applied by examining DNS, HTTP, TCP, and IP-level behavior to detect suspicious communication patterns.
The analysis emphasizes indicators such as command-and-control (C2) communication, periodic beaconing, abnormal traffic bursts, and suspicious data transfers. Multiple independent observations were correlated to confirm the presence of malware activity within the network.
Objectives :
1. To identify the infected host based on abnormal network behavior
2. To detect malware communication patterns such as command-and-control (C2) and beaconing
3. To analyze DNS, HTTP, and TCP traffic for malicious indicators
4. To observe abnormal traffic patterns such as bursts, short-lived sessions, and asymmetric data flow
5. To confirm malware presence using multiple correlated evidences
PCAP DESCRIPTION :
The PCAP file contains captured network traffic from an infected Windows host communicating with external infrastructure. The dataset includes DNS queries, HTTP requests and responses, TCP sessions, and encrypted traffic over TLS.
The traffic reveals repeated connections to specific external IPs/domains, periodic communication intervals, and abnormal session behavior. These patterns indicate automated communication typically associated with malware, including possible payload delivery and command-and-control interaction.
https://www.malware-traffic-analysis.net/2020/04/24/index.html
Architecture of Work :
Procedure of work :
The given PCAP file (2020-04-24 Malware Traffic Dataset) was analyzed using Wireshark to detect suspicious network activity. Initially, the overall traffic was inspected to understand communication patterns and identify unusual behavior. Using Statistics → Conversations → IPv4, the infected host 10.4.24.104 was identified based on its frequent and abnormal communication with multiple external IP addresses.
Protocol-based filtering was then applied using dns, http, and tcp filters to analyze specific traffic types. DNS queries were examined for repetitive or unusual patterns, indicating automated behavior, while HTTP traffic was inspected using TCP stream analysis to detect possible data transfers from external servers. TCP communication further revealed continuous data exchange, suggesting command-and-control (C2) activity or payload delivery.
Finally, statistical analysis was performed using Python to compute packet size, packet rate, and throughput, and the results were visualized using graphs. These graphs showed bursty traffic patterns, high data transfer spikes, and irregular packet behavior. By correlating these indicators, the presence of malware activity in the network was confirmed.
Inference: Indicators of Malware Presence
1. High Outbound Traffic Pattern
🔸 Why it matters
Infected hosts usually initiate frequent outbound connections to communicate with attacker-controlled servers.
🔸 How it was analyzed in Wireshark
Statistics → Conversations → IPv4
Sorted by Packets and Bytes
🔸 Observation
The internal IP 10.4.24.104 shows a significantly higher number of packets exchanged with multiple external IPs such as 54.36.108.120.
🔸 Evidence
🔸 Conclusion
The abnormal outbound communication confirms suspicious behavior and possible malware infection.
2. Internal vs External IP Analysis
🔸 Why it matters
Malware typically resides inside a private network and initiates communication with multiple external servers to receive commands or exfiltrate data.
🔸 How it was analyzed in Wireshark
Statistics → Conversations → IPv4
Identification of private IP range (10.x.x.x) vs public IP addresses
🔸 Observation
From the conversation table, the internal IP 10.0.0.149 is observed communicating with a large number of external/public IP addresses such as:
- 8.28.7.83
- 23.51.133.119
- 31.13.66.19
- 34.98.72.95
- 35.190.29.196
The number of packets and bytes exchanged with these external IPs is significantly higher compared to other internal communications.
🔸 Evidence (Screenshot)
🔸 Conclusion
The internal host 10.0.0.149 is actively initiating communication with multiple external servers, which is abnormal behavior. This strongly indicates that the system is likely infected and communicating with external command-and-control (C2) infrastructure.
3. Bursty and Periodic HTTP Traffic Pattern (Beaconing Behavior)
🔸 Why it matters
Malware often communicates in two ways:
- Burst traffic → when sending/receiving data
- Low periodic traffic → small “check-in” signals (beacons)
This combination is important because normal user activity is random, but malware communication is automated and patterned.
🔸 How it was analyzed in Wireshark
Statistics → I/O Graphs
Filter applied: http.request
Interval set to: 1 second
🔸 Observation
From the graph, the HTTP traffic shows a distinct bursty pattern:
- Initial phase shows high spikes (up to ~40 packets/sec)
- Followed by long idle periods with almost no traffic
- Later, small repeated spikes appear at intervals
This indicates:
- Data transfer happens in bursts
- Followed by quiet waiting periods
- Then small periodic communication resumes
🔸 Evidence (Screenshot)
🔸 Conclusion
This irregular yet repeating pattern strongly suggests malware beaconing behavior. The infected host is likely:
- Sending bulk data in bursts (possible payload transfer)
- Then switching to low periodic communication (C2 check-ins)
Such behavior is a clear indicator of automated malware communication, not human browsing activity.
4. Excessive DNS Requests from a Single Host
🔸 Why it matters
Malware often uses DNS queries to continuously discover command-and-control (C2) servers or resolve domains dynamically. Unlike normal users, malware generates DNS traffic automatically and at high frequency, making it a strong indicator of compromise.
🔸 How it was analyzed in Wireshark
DNS traffic was filtered using:
dns
The packet list was examined to identify:
- Source IP generating requests
- Frequency of DNS queries
- Variety of domains being accessed
🔸 Observation
From the DNS traffic, the internal host 10.0.0.202 is repeatedly generating DNS queries within a very short time span.
The host is resolving multiple domains such as:
- google.com
- yahoo.com
- bing.com
- amazon.com
- cloudflare-related domains
Additionally, queries and responses appear continuously without normal browsing gaps, indicating automated behavior rather than human activity.
🔸 Evidence (Screenshot)
🔸 Conclusion
The high volume and continuous DNS queries originating from a single host (10.0.0.202) strongly indicate automated domain resolution activity. This pattern is commonly associated with malware performing:
- Command-and-control (C2) communication
- Domain discovery
- Background beaconing
This behavior confirms suspicious activity and supports the presence of malware.
5. Suspicious Repeated HTTP Requests to External Server
🔸 Why it matters
Malware often communicates with external servers using HTTP requests. Unlike normal browsing, malware generates repeated and automated requests to the same server to download payloads, fetch updates, or maintain communication with a command-and-control (C2) server.
🔸 How it was analyzed in Wireshark
HTTP traffic was filtered using:
http.request
The packet list was analyzed to observe:
- Source IP generating requests
- Destination server
- Type and frequency of HTTP requests
🔸 Observation
From the filtered traffic, the internal host 10.0.0.202 is sending multiple HTTP GET requests to the external IP 104.26.3.17.
Key findings:
- A large number of GET requests are sent continuously
-
Requests include paths like:
-
/wp-content/... -
/wp-includes/... -
/images/...
-
- The requests occur rapidly and in sequence, indicating automated behavior
This pattern is not typical human browsing, as it lacks pauses and shows structured repeated access.
🔸 Evidence (Screenshot)
🔸 Conclusion
The repeated and rapid HTTP requests from 10.0.0.202 to a single external server strongly indicate automated communication behavior. This is commonly associated with malware performing:
- Payload retrieval
- Command-and-control communication
- Background data exchange
This supports the presence of suspicious or malicious activity.
6. Suspicious File Transfer and Automated HTTP Resource Activity
🔸 Why it matters
Attackers commonly use HTTP (Port 80) to transfer malicious content because it blends with normal web traffic. Instead of directly downloading executable files, modern malware often downloads multiple scripts (JavaScript), styles, or images that can later be used to execute hidden payloads or communicate with external servers.
🔸 How it was analyzed in Wireshark
HTTP objects were extracted using:
File → Export Objects → HTTP
This allows inspection of all files transferred over HTTP including scripts, images, and other web resources.
🔸 Observation
A large number of HTTP objects were observed being downloaded from external domains such as www.ubuntugeek.com, along with requests to third-party services like pagead2.googlesyndication.com and images.intellitxt.com.
The traffic included multiple JavaScript (.js) files, CSS files, and images, indicating repeated automated resource fetching. The high frequency and variety of downloaded files suggest non-human browsing behavior.
🔸 Evidence (Screenshot)
🔸 Conclusion
The presence of continuous HTTP object downloads, especially multiple JavaScript files from external domains, indicates automated behavior rather than normal user browsing. This pattern is commonly associated with malware activity where scripts are used to fetch additional payloads or establish communication with remote servers.
🔸 Observation
From the TCP conversation analysis, the internal host 10.0.0.149 is initiating multiple connections to various external IP addresses across ports such as 80 and 443.
Key findings:
A large number of TCP sessions are created rapidly
Each session contains low packet counts (approximately 10–40 packets)
Very minimal data transfer (only a few kilobytes per session)
Connections terminate quickly and are repeatedly re-established
Multiple different external IPs are contacted within a short time interval
This behavior does not reflect normal user activity, as typical sessions persist longer and transfer more data.
🔸 Evidence
🔸 Conclusion
The presence of repeated, short-lived TCP sessions with minimal data exchange indicates automated communication behavior. This pattern is commonly associated with malware performing scanning, probing, or repeated connection attempts to external infrastructure, suggesting potential compromise of the host system.
10. Throughput Analysis
🔸 Why it matters
Throughput reflects the volume of data transferred over time. Sudden spikes often indicate bulk data transfer, which may correspond to payload delivery or data exfiltration activities.
🔸 How it was analyzed in Scapy
Scapy was used to process the PCAP file, group packets over time intervals, and calculate bytes-per-second to visualize traffic flow.
🔸 Observation
The throughput graph showed multiple sharp spikes instead of a smooth pattern, indicating bursts of high data transfer within short time intervals rather than consistent traffic flow.
🔸 Evidence (Screenshot)
🔸 Conclusion
The presence of irregular spikes in throughput indicates burst-based data transfer behavior. This pattern is commonly associated with malware activity, confirming periods of high data movement and potential malicious operations.


Comments
Post a Comment