Using OTX Threat Intelligence to Search PCAPs for Malicious Traffic
LevelBlue Completes Acquisition of Cybereason. Learn more
Get access to immediate incident response assistance.
Get access to immediate incident response assistance.
LevelBlue Completes Acquisition of Cybereason. Learn more
CapStar Forensics is an AlienVault Open Threat Exchange (OTX) participant. OTX is open to the public, and anyone can contribute to and download the threat data (which is called a “Pulse” in OTX).
So how can security professionals use this threat intelligence to help an organization defend against potential cyberattacks? In this blog, we show an example where CapStar used an OTX threat intel feed as source information to search a packet capture (pcap) for possible malicious traffic.
First, we downloaded all the OTX pulses and extracted the indicators of compromise (IoC) related to networking, to a file. There are 4 types: IPv4, hostname, domain and URL. In total, there are 19290 unique IoC's. Here is part of the file:
Each line is a record in this file format. Each record has an IoC type followed by the IoC data.
We discussed what tool we could use to apply this threat intel to find the presence of malicious traffic in a pcap file? Many network and security professionals’ favorite tool is Wireshark for this purpose. However, due to the large number of IP addresses and hostnames, it's not practical to use Wireshark. The other good choice is to use an Intrusion Detection System (IDS). The problem with this approach is, one would have to create many IDS rules based on the specific intel, causing the investigation to slow down when the number of rules begins to be too large.
Fortunately, CapStar has a great tool for this scenario. A user can write a script that will read the threat intel in the above format and use it to match on packets very quickly.
Here is a CapStar script for just this. It consists of a few sections, each under a label.


One observation on the script is that it reuses the standard Wireshark display filter names, which are familiar to many network and security professionals. This is done to “extend” the Wireshark display filter so an investigator can implement arbitrary logic or expressions, and then perform a stateful pattern match that involves multiple packets.
We ran this script against a 1126MB malware pcap. Here is the partial output:
contacted blacklisted IP:
contacted blacklisted Hosts:
contacted blacklisted domains:
CapStar is extremely fast in processing these packets. The entire run (from clicking the Run button to seeing the result) on this 1126 MB pcap file only takes 1.97 seconds. One of the more expensive parts of this operation is loading the IoC from file. After excluding that part, it took only 1.46 seconds to process, which is equivalent to processing 6.2Gbps of traffic. At this rate, CapStar is able to easily keep up with traffic from multiple Gigabit NIC.
CapStar is designed with maximum flexibility in mind. In the fight against cyber criminals, one has to be adaptive to the ever-changing environment and requirements. In the case of applying threat intel to analyzing network packets, a user can easily tweak the above script to do more specific scenarios and actions. For example, one can:
If you are interested in giving CapStar a trial or have some challenging network scenarios you would like us to take a crack at, please send us an email info@capstarforensics.com.
Dr. Jin Qian has worked in telecommunications as well as application and server performance for many years before diving deep into the challenging field of network security. In network security, he applies the same principle of making hard things easy and making technology more accessible for professionals of various backgrounds. His belief on fighting cyber criminals is to empower cyber warriors to be more adaptive and agile than the hackers, even if the hackers may be more experienced in programming.
LevelBlue is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.