{"id":13639,"date":"2022-08-04T22:53:53","date_gmt":"2022-08-04T19:53:53","guid":{"rendered":"https:\/\/kifarunix.com\/?p=13639"},"modified":"2024-03-09T21:02:47","modified_gmt":"2024-03-09T18:02:47","slug":"analyze-pcap-files-using-malcolm-network-traffic-analysis-tool","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/analyze-pcap-files-using-malcolm-network-traffic-analysis-tool\/","title":{"rendered":"Analyze PCAP Files using Malcolm Network Traffic Analysis tool"},"content":{"rendered":"\n
In this tutorial, you will learn how to analyze PCAP files using Malcolm network traffic analysis tool. Malcolm<\/a> can be used to analyze offline full PCAP files or can be used to monitor and analyze live network traffic. Malcolm is integrated with Suricata and Zeek (formerly Bro). These two tools can be used to analyze PCAP files.<\/p>\n\n\n\n As already mentioned, Malcolm can analyze already captured network traffic in PCAP files or can do live network traffic analysis.<\/p>\n\n\n\n In this tutorial, we will show you how to use Malcolm to analyze offline PCAPs. This is the network data that has been captured else where in form of packet captures.<\/p>\n\n\n\n Before you can proceed, you can see how to install Malcolm network traffic analysis tool on your Linux system by following the tutorial below.<\/p>\n\n\n\n Install Malcolm Network Traffic Analysis Tool on Ubuntu 22.04<\/a><\/p>\n\n\n\n Our Malcolm server is up and running. Let’s confirm the status of the docker services;<\/p>\n\n\n\n Seems all good.<\/p>\n\n\n\n Malcolm ships with web browser-based upload form that enables you to upload PCAP files and Zeek logs for analysis.<\/p>\n\n\n\n You can access this interfaces via the URL https:\/\/<malcolm-server-or-hostname>\/upload<\/strong>.<\/p>\n\n\n\n Thus, to analyze a PCAP file using Malcolm;<\/p>\n\n\n\n Once the upload is done, you can navigate back to Arkime or Kibana dashboard to view the analyzed event data.<\/p>\n\n\n\n To check the Arkime sessions, just navigate to https:\/\/<server-IP>\/sessions<\/strong>.<\/p>\n\n\n\n By default, Arkime shows data for last one hour time frame. Click the clock (as shown in the screenshot above) to adjust time frame to see more events.<\/p>\n\n\n\n You can then utilize Arkime filters to analyze your traffic. For example, let us try to find web related traffic using the filter below;<\/p>\n\n\n\n Click search or press enter once you enter the filter to filter the events. You can click Databytes\/Bytes<\/strong> to sort the events in ascending\/descending order (identify top talkers).<\/p>\n\n\n\n Sample output;<\/p>\n\n\n\n As you can see from the above, there are some interesting information the traffic. You can see some executable files. Most likely someone downloaded a malware!<\/p>\n\n\n\n You can click on the +<\/strong> button against the event session to check more details.<\/p>\n\n\n\n You can drill down further on the event sessions available.<\/p>\n\n\n\n For example, these are sample Arkime search filters;<\/p>\n\n\n\n Filter for an IP<\/p>\n\n\n\n To filter for an IP or another IP;<\/p>\n\n\n\n An IP and an IP;<\/p>\n\n\n\n Not an IP;<\/p>\n\n\n\n Sample keyword in a field;<\/p>\n\n\n\n Field exists;<\/p>\n\n\n\n You can negate the above;<\/p>\n\n\n\n Search for specific event field. E.g if specific log type is available;<\/p>\n\n\n\n Search for range in a field;<\/p>\n\n\n\n And many more!!<\/p>\n\n\n\n You can also go through other Arkime menu items to learn more.<\/p>\n\n\n\n You can also go to Kibana to check events. Navigate to https:\/\/<server-IP>\/dashboards<\/strong><\/p>\n\n\n\n Overview of the events grouped into various dashboards;<\/p>\n\n\n\n You can also navigate to Kibana Discover tab where you can search for the events.<\/p>\n\n\n\n You can further drill down to analyse your traffic.<\/p>\n\n\n\n Click on the event ><\/strong> button to see more details;<\/p>\n\n\n\n You can also filter events based on the available fields for example to search for web traffic events, use the search filter;<\/p>\n\n\n\n To add more, for example IP;<\/p>\n\n\n\n You can also choose the fields to display from the right pane.<\/p>\n\n\n\n And that brings us to the end of this tutorial on how to analyze PCAP files using Malcolm.<\/p>\n\n\n\n That is just a tip of the iceberg. Continue to explore this awesome Malcolm tool!<\/p>\n\n\n\n Analyze Network Traffic Using Brim Security<\/a><\/p>\n\n\n\nAnalyze PCAP Files using Malcolm<\/h2>\n\n\n\n
Install Malcolm Network Traffic Analysis Tool<\/h3>\n\n\n\n
Upload PCAP files to Malcolm<\/h3>\n\n\n\n
docker ps -a<\/code><\/pre>\n\n\n\n
\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nee52e3f92ffe malcolmnetsec\/nginx-proxy:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 0.0.0.0:443->443\/tcp, 127.0.0.1:5601->5601\/tcp, 0.0.0.0:488->488\/tcp, 127.0.0.1:9200->9200\/tcp malcolm-nginx-proxy-1\n7ba1348383fd malcolmnetsec\/filebeat-oss:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 127.0.0.1:5045->5045\/tcp malcolm-filebeat-1\nd7c2047fc335 malcolmnetsec\/suricata:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) malcolm-suricata-1\na76d195cd9c8 malcolmnetsec\/dashboards:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 5601\/tcp malcolm-dashboards-1\n7b4c795e0488 malcolmnetsec\/file-upload:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 80\/tcp, 127.0.0.1:8022->22\/tcp malcolm-upload-1\n2e9926a473c5 malcolmnetsec\/zeek:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) malcolm-zeek-1\n48d1795e679d malcolmnetsec\/logstash-oss:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 9001\/tcp, 127.0.0.1:5044->5044\/tcp, 9600\/tcp malcolm-logstash-1\nee660d1f4be2 malcolmnetsec\/arkime:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 8000\/tcp, 8005\/tcp, 8081\/tcp malcolm-arkime-1\n6d9cca0d5884 malcolmnetsec\/dashboards-helper:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 28991\/tcp malcolm-dashboards-helper-1\nb747c842f7e0 malcolmnetsec\/pcap-monitor:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 30441\/tcp malcolm-pcap-monitor-1\n5cfb042f6d9b malcolmnetsec\/zeek:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes malcolm-zeek-live-1\n8225437358b4 malcolmnetsec\/file-monitor:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 3310\/tcp, 8440\/tcp malcolm-file-monitor-1\n7868bfe4043c malcolmnetsec\/name-map-ui:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 8080\/tcp malcolm-name-map-ui-1\n0f5344b838b7 malcolmnetsec\/htadmin:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 80\/tcp malcolm-htadmin-1\na6f88f762a11 malcolmnetsec\/api:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 5000\/tcp malcolm-api-1\n914f5370fd1f malcolmnetsec\/freq:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 10004\/tcp malcolm-freq-1\nf328cd5a04b2 malcolmnetsec\/opensearch:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes (healthy) 9200\/tcp, 9300\/tcp, 9600\/tcp, 9650\/tcp malcolm-opensearch-1\ne3f06dcbe75c malcolmnetsec\/suricata:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes malcolm-suricata-live-1\n02af57ce2df9 malcolmnetsec\/pcap-capture:6.2.0 \"\/usr\/local\/bin\/dock\u2026\" 2 minutes ago Up 2 minutes malcolm-pcap-capture-1\n<\/code><\/pre>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
\n
<\/figure><\/a><\/div>\n\n\n\n
\n
<\/figure>\n\n\n\n
\n
Analyze PCAP Files using Malcolm<\/h3>\n\n\n\n
Arkime Sessions<\/h4>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
port.dst == 80 || port.dst == 443<\/code><\/pre>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
ip.src == IP<\/code><\/pre>\n\n\n\n
ip.src == IP || ip.src == IP<\/code><\/pre>\n\n\n\n
ip.src == IP && ip.src == IP<\/code><\/pre>\n\n\n\n
ip.src != IP<\/code><\/pre>\n\n\n\n
tags == \"*sample*\"<\/code><\/pre>\n\n\n\n
suricata.signature == EXISTS! <\/code><\/pre>\n\n\n\n
suricata.signature != EXISTS! <\/code><\/pre>\n\n\n\n
event.dataset == ssh<\/code><\/pre>\n\n\n\n
email.subject.cnt > 0<\/code><\/pre>\n\n\n\n
Viewing Event Data on OpenSearch Kibana Dashboards<\/h4>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
destination.port: (80 OR 443)<\/code><\/pre>\n\n\n\n
destination.port: (80 OR 443) AND (source.ip: 65.21.51.213 OR destination.ip: 6x.2x.5x.2x3 )<\/code><\/pre>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
Other Tutorials<\/h3>\n\n\n\n