NETRESEC Network Security Blog

rss

PureLogs Forensics

I analyzed some PureLogs Stealer malware infections this morning and found some interesting behavior and artifacts that I want to share.

PureLogs infections sometimes start with a dropper/downloader that retrieves a .pdf file from a legitimate website. The dropper I will demo here downloaded this file:

hxxps://www.vastkupan[.]com/wp-admin/js/Daupinslenj.pdf

This file isn’t really a PDF though, but more on that later. Here’s a CapLoader screenshot with some interesting flows from the infection:

Flows from PureLogs infection in CapLoader

The PCAP in the screenshot above comes from a sandbox execution on any.run of a file called BSN100357-HHGBM100002525.exe.

Here’s a breakdown of what happens behind the scenes in this execution:

  1. Dropper connects to www.vastkupan[.]com (DNS and TLS flows).
  2. A fake PDF (Daupinslenj.pdf) is downloaded over HTTPS.
  3. The fake PDF is decrypted to a DLL (PureLogs), which is stored in memory.
  4. InstallUtil.exe is started.
  5. The PureLogs DLL is injected into the running InstallUtil process.
  6. PureLogs connects to C2 server at 91.92.120.101:65535

The same dropper has also been run on JoeSandbox, with almost identical behavior. The vastkupan.com website belongs to a legitimate company (Västkupan Fastigheter).

The PDF that Wasn’t

This is what the downloaded “PDF” looks like:

Hex view of Daupinslenj.pdf

So, what’s up with all that “171171” data? Let’s XOR with “711” and see what we get.

Hex view of decrypted Daupinslenj.pdf

The downloaded PDF turns out to be a .NET DLL file with MD5 38d29f5ac47583f39a2ff5dc1c366f7d. This is the file that was injected into the otherwise legitimate InstallUtil process. Some PureLogs droppers use RegAsm.exe instead of InstallUtil though (see JoeSandbox and any.run).

IOC List

Droppers (MD5):

  • 711d9cbf1b1c77de45c4f1b1a82347e6
  • 6ff95e302e8374e4e1023fbec625f44b
  • e6d7bbc53b718217b2de1b43a9193786
  • a9bc0fad0b1a1d6931321bb5286bf6b7
  • 09bb5446ad9055b9a1cb449db99a7302

Dropper TLS handshake signatures:

  • JA3: 3b5074b1b5d032e5620f69f9f700ff0e
  • JA4: t12d210700_76e208dd3e22_2dae41c691ec

Payload URLs:

  • hxxps://www.vastkupan[.]com/wp-admin/js/Cicdwkknms.pdf
  • hxxps://www.vastkupan[.]com/wp-admin/js/Daupinslenj.pdf
  • hxxps://www.new.eventawardsrussia[.]com/wp-includes/Ypeyqku.pdf

Payloads (MD5):

  • ab250bb831a9715a47610f89d0998f86 (Cicdwkknms.pdf)
  • cec53e8df6c115eb7494c9ad7d2963d4 (Daupinslenj.pdf)
  • eedc8bb54465bd6720f28b41f7a2acf6 (Ypeyqku.pdf)

Decrypted payloads:

  • MD5: 38d29f5ac47583f39a2ff5dc1c366f7d
  • SHA1: fc8b0ee149027c4c02f7d44cc06cade3222bb6b6
  • SHA256: 8d7729ca0b25a677287076b4461304a21813e6f15053e190975512e58754988f

PureLogs C2:

  • 91.92.120.101:62520 (old)
  • 91.92.120.101:65535 (new)

Posted by Erik Hjelmvik on Wednesday, 02 July 2025 11:52:00 (UTC/GMT)

Tags: #PureLogs#3b5074b1b5d032e5620f69f9f700ff0e#JoeSandbox

Short URL: https://netresec.com/?b=257eead


CapLoader 2.0.1 Released

This update resolves several minor bugs, but also brings better protocol identification and a new IP lookup alert to CapLoader.

CapLoader showing Info-level alert for IP lookup using ip-api.com
Alert for IP lookup using ip-api.com in PCAP from tria.ge Transcript of ip-api.com IP lookup traffic
Transcript of ip-api.com IP lookup traffic

IP lookup services, like ip-api, checkip.amazonaws.com and ident.me, aren’t malicious, but malware often use such services to find out what the public IP address is of an infected machine. As Tony Robinson points out, in his recent External IP Lookup Rules post, malware does so to check for internet connectivity and determine the country of the infected PC. But I’ve also observed a third reason, which is when the threat actor resolves the victim’s public IP to then query a DNSBL service and check the IP’s reputation. I believe the DNSBL lookup is performed to evaluate the success rate of sending spam, such as emails with malicious attachments or links, from the victim PC.

TrickBot performing a DNSBL lookup of client’s public IP
TrickBot performing a DNSBL lookup of client’s public IP

If you want to learn more about how TrickBot used DNSBL then read GoSecure’s TrickBot […] and Spamhaus blog post or sign up for one of my network forensics training sessions.

Improved Protocol Detection

The precision of CapLoaders built-in port independent protocol identification has been improved and a few additional protocols can now be detected, including Interlock RAT.

Bug Fixes

The following bugs fixes and feature updates are included in this release:

  • Better handling of corrupt PCAP files
  • Fixed periodicity measurement inconsistency for services with more than 100 flows
  • Fixed parsing bug for duplicate QUIC packets
  • Improved speed and reliability of auto-extract PCAP from selection
  • ThreatFox API updated to use abuse.ch Auth-Key

Posted by Erik Hjelmvik on Tuesday, 01 July 2025 13:48:00 (UTC/GMT)

Tags: #CapLoader#TrickBot#DNSBL

Short URL: https://netresec.com/?b=2571527


Detecting PureLogs traffic with CapLoader

CapLoader includes a feature for Port Independent Protocol Identification (PIPI), which can detect which protocol is being used inside of TCP and UDP sessions without relying on the port number. In this video CapLoader identifies the C2 protocol used by the PureLogs Stealer malware.

The PureLogs protocol detection was added to CapLoader in the recent 2.0 release.

The PCAP file analyzed in the video is from Brad Duncan’s fantastic malware-traffic-analysis.net website.

Indicators of Compromize (IOC):

  • mxcnss.dns04.com:7702
  • 176.65.144.169:7702

Posted by Erik Hjelmvik on Monday, 09 June 2025 14:26:00 (UTC/GMT)

Tags: #CapLoader#PureLogs#malware-traffic-analysis.net#PIPI

Short URL: https://netresec.com/?b=256a8c4


CapLoader 2.0 Released

CapLoader 2.0

I am thrilled to announce the release of CapLoader 2.0 today!

This major update includes a lot of new features, such as a QUIC parser, alerts for threat hunting and a feature that allow users to define their own protocol detections based on example network traffic.

User Defined Protocols

CapLoader's Port Independent Protocol Identification feature can currently detect over 250 different protocols without having to rely on port numbers. This feature can be used to alert on rogue services like SSH, FTP, VPN and web servers that have been set up on non-standard ports to go unnoticed. But what if you want to detect traffic that isn’t using any of the 250 protocols that CapLoader identifies? CapLoader 2.0 includes a fantastic solution that solves this problem! Simply right-click a flow containing the traffic you want to identify and select “Define protocol from flow”. This creates a custom local protocol detection model based on the selected traffic.

CapLoader’s protocol identification feature may seem like magic, but it actually relies on several different statistical measurements of the traffic in order to build a model of how the protocol behaves. It's possible to define a protocol model from just a single flow, but doing so may lead to poor detection results, which is why we recommend defining protocols from at least 10 different flows. You can do this either by selecting multiple flows or services before clicking “Define protocol from” or by adding additional flows or services to a protocol model at a later point by clicking “Add flow to protocol definition”.

More Malware Protocols Detected

There are several malware C2 protocols among CapLoader’s built-in models for protocol identification. The 2.0 release has been extended to detect even more malware protocols out of the box, such as Aurotun Stealer, PrivateLoader, PureLogs, RedTail, ResolverRAT, SpyMAX, SpyNote and ValleyRAT.

These protocols can now be detected using CapLoader regardless which IP address or port number the server runs on.

QUIC Parser

CapLoader now parses the QUIC protocol, which typically runs on UDP port 443 and transports TLS encrypted HTTP/3 traffic. CapLoader doesn’t decrypt the TLS encrypted HTTP/3 traffic though, it only parses the initial QUIC packets containing the client’s TLS handshake to extract the target domain name from the SNI extension and generates JA3 hashes and JA4 fingerprints of the client’s TLS handshake.

QUIC network traffic from Active Countermeasures shown in CapLoader's services tab
Image: QUIC traffic from Active Countermeasures
  • Merlin C2 JA3: 203c2306834e5bf5ace01fb74ad1badf
  • Merlin C2 JA4: q13i0311h3_55b375c5d22e_c183556c78e2

More Alerts

There’s a fantastic service called ThreatFox, to which security researchers, incident responders and others share indicators of compromise (IOC). Many of the shared IOCs are domain names and IP addresses used by malware for payload delivery, command-and-control (C2) or data exfiltration. Various IOC lists can be downloaded from ThreatFox, so that they can be used by a DNS firewall or a TLS firewall to block malware traffic. But the IOCs can also be used for alerting and threat hunting. CapLoader downloads two IOC lists from ThreatFox when the tool is started (the data is then cached for 24 hours, so that no new download is needed until the next day). Analyzed network traffic is then matched against these downloaded offline databases to provide alerts whenever there is traffic to a domain name or IP address that has been reported to be associated with malware.

CapLoader alerts for Lumma and Remcos traffic to servers listed on ThreatFox
Image: Alerts for traffic to Lumma Stealer and Remcos servers listed on ThreatFox

We’ve also added two additional alert types in this release, one for anomalous TLS handshakes, and one for connections to suspicious domains. Both these alerts are designed primarily for threat hunting, since there’s a considerable risk that they will alert on legitimate traffic. The anomalous TLS handshake alert tries to detect odd TLS connections that are not originating from the user’s web browser or the operating system. The alert is triggered when such odd connections are made to domain names that are not well-known. This alert logic is designed to generically detect any TLS encrypted malware traffic, where the malware is using a custom TLS library instead of relying on operating system API calls for establishing encrypted connections. But this logic might also lead to false positive alerts, for example when legitimate applications use custom TLS libraries to perform tasks like checking a license or looking for software updates. The suspicious domain alert looks for connections to domain names like devtunnels.ms, ngrok.io and mocky.io, which are often used by APTs as well as crime groups.

Metrics for VPN Detection

CapLoader 2.0 displays the TCP MSS values on the Hosts tab. This value can help with determining if a host is behind a VPN. An MSS value below 1400 indicates that the host’s traffic might pass through some form of overlay network, such as a tunnel or VPN. Other indicators that can help identify VPN and tunnelled traffic is IP TTL and latency, which CapLoader also displays in the hosts tab.

Client traffic coming out of VPN concentrator with low MSS value

Improved User Experience

A lot of effort has been put into improving the user interface and general user experience for this new CapLoader release. One very important user experience factor is the responsiveness of the user interface, which has been significantly improved. Actions like sorting and filtering flows, services or alerts in CapLoader now complete around 10 times faster than before, which is very noticeable when working with multi-gigabyte capture files. Another improvement related to working with large capture files is that CapLoader now uses significantly less memory.

The transcript window in CapLoader has also received a touch-up. There is now, for example a search box that allows you to quickly find a particular keyword in a TCP or UDP transcript (thanks to Allan Christensen at SektorCERT for the idea). Actions in the transcript window, such as changing encoding or flipping up/down between flows, now also complete much faster than before.

CapLoader automatically saves the packets from selected flows or services to a pcap file in the %TEMP% directory every time the selection changes. This pcap file can be accessed from the “PCAP” icon in the top-right of the user interface. Simply drag-and-drop from CapLoader’s PCAP icon to Wireshark or NetworkMiner to open the filtered traffic. Several users have requested the ability to also perform this drag-and-drop operation directly from the selected rows. I’m happy to say that this is now possible, but you have to perform the drag-and-drop with the middle mouse button (such as the scroll wheel). Users without a middle mouse button can drag-and-drop selected rows by holding down the Ctrl key while drag-and-dropping with the right mouse button instead.

Free Trial vs Commercial Version

Many of CapLoader’s features, such as port-independent protocol identification, are only available in the commercial version of CapLoader. But the free trial version of CapLoader does include new features like the QUIC parser and alerts for suspicious domains and alerts whenever a domain name is listed on ThreatFox.

Alerts in the trial version of CapLoader
Image: Alerts on malicious and suspicious traffic in Trial version of CapLoader

Updating to CapLoader 2.0

Users who have already purchased a license for CapLoader can download a free update to version 2.0 from our customer portal or by clicking “Check for Updates” in CapLoader’s Help menu.

Posted by Erik Hjelmvik on Monday, 02 June 2025 13:47:00 (UTC/GMT)

Tags: #CapLoader#QUIC#Threat Hunting#ThreatFox

Short URL: https://netresec.com/?b=256dbbc


Comparison of tools that extract files from PCAP

One of the premier features in NetworkMiner is the ability to extract files from captured network traffic in PCAP files. NetworkMiner reassembles the file contents by parsing protocols that are used to transfer files across a network.

But there are other tools that also can extract files from PCAP files, such as Wireshark and Zeek. The file extraction support in these alternative solutions sometimes complement and sometimes overlap with that of NetworkMiner. Either way it is good that there are multiple tools that are designed to perform the same task. This allows us to compare the output from the different implementations, for example if the results from one tool seems strange or is suspected to be incorrect or incomplete.

comparing apple to orange

Tools that can reassemble and extract files from network traffic or PCAP files:

All of these tools can extract files from HTTP and FTP, but when it comes to other protocols the support varies. The following table summarizes which protocols each tool supports:

Chaos​reader Network​Miner Suri​cata tcp​flow Wire​shark Zeek
FTP
HTTP
HTTP/2
IEC-104
IMAP
LPR
NFS
njRAT
POP3
SMB
SMB2/3
SMTP
TFTP
TLS certs

I’ve been quite forgiving when compiling the table above. Tools are listed as supporting a protocol even if they only work under very specific conditions. I don’t want to name-and-shame any tool, but I strongly recommend that you verify the tools you’re using by comparing what they extract to one or two alternative tools. As an example, some tools only support a few specific commands for the protocol they claim to support. Additionally, some tools only support file extraction in one direction for protocols like HTTP or FTP, even though these protocols are regularly used to download as well as upload files.

Posted by Erik Hjelmvik on Monday, 05 May 2025 16:05:00 (UTC/GMT)

Tags: #Extract#PCAP#NetworkMiner#Suricata#tcpflow#Wireshark#Zeek#FTP#HTTP#IEC-104#IMAP#LPD#LPR#njRAT#POP3#SMB#SMB2#SMTP

Short URL: https://netresec.com/?b=255329f


Decoding njRAT traffic with NetworkMiner

I investigate network traffic from a Triage sandbox execution of njRAT in this video. The analysis is performed using NetworkMiner in Linux (REMnux to be specific).

About njRAT / Bladabindi

njRAT is a Remote Access Trojan (RAT) that can be used to remotely control a hacked computer. It has been around since 2013, but despite being over 10 years old it still remains one of the most popular backdoors used by malicious actors. Anti virus vendors usually refer to njRAT as Bladabindi.

njRAT Artefacts Extracted by NetworkMiner

NetworkMiner has a built-in parser for the njRAT Command-and-Control (C2) protocol. This njRAT parser kicks in whenever there is traffic to a well-known njRAT port, such as TCP 1177 or 5552, plus a few extra ports (like TCP 14817 that was used by the analysed sample). You’ll need NetworkMiner Professional to decode njRAT traffic to other ports, since it comes with a port-independent-protocol-identification (PIPI) feature that automatically detects the protocol regardless which port the server runs on.

As demonstrated in the video, NetworkMiner can extract the following types of artefacts from njRAT network traffic:

  • Screenshots of victim computer
  • Transferred files
  • Commands from C2 server
  • Replies from bot
  • Stolen credentials/passwords
  • Keylog data

Covered njRAT Commands and Plugins

These njRAT commands and plugins are mentioned in the video:

  • CAP = Screen Capture
  • ret = Get Passwords
  • inv = Invoke Plugin
  • PLG = Plugin Delivery
  • kl = Key Logger
  • Ex = Execute Plugin
  • Ex proc = Process List
  • Ex fm = File Manager

IOC List

  • Sample (a.exe): cca1e0b65d759f4c58ce760f94039a0a
  • C2 server: 5.tcp.eu.ngrok[.]io:14817
  • njRAT inv (dll): 2d65bc3bff4a5d31b59f5bdf6e6311d7
  • njRAT PLG (dll): c179e212316f26ce9325a8d80d936666
  • njRAT ret (dll): ac43720c43dcf90b2d57d746464ad574
  • Splitter: Y262SUCZ4UJJ

Posted by Erik Hjelmvik on Monday, 28 April 2025 06:00:00 (UTC/GMT)

Tags: #njRAT#NetworkMiner#REMnux#Video#videotutorial​

Short URL: https://netresec.com/?b=2541a39


How to Install NetworkMiner in Linux

This guide shows how to install the latest version of NetworkMiner in Linux. To install an older NetworkMiner release, prior to version 3.0, please see our legacy NetworkMiner in Linux guide.

NetworkMiner + Linux

STEP 1: Install Mono and GTK2

Mono is an open source cross-platform implementation of the .NET framework, it is needed to run NetworkMiner non-Windows machines. GTK2 is not required, but it provides a more consistent look to the user interface.

Ubuntu / Linux Mint / Kali Linux / Raspberry Pi OS:

sudo apt install mono-devel
sudo apt install libgtk2.0-common

Fedora:

sudo yum install mono-devel gtk2

AlmaLinux / RHEL:

sudo dnf install epel-release
sudo dnf install mono-devel gtk2

Arch Linux:

sudo pacman -S mono gtk2

STEP 2: Install NetworkMiner

curl -o /tmp/nm.zip https://www.netresec.com/?download=NetworkMiner
sudo unzip /tmp/nm.zip -d /opt/
sudo chmod +x /opt/NetworkMiner_*/NetworkMiner.exe

STEP 3: Run NetworkMiner

mono /opt/NetworkMiner_*/NetworkMiner.exe --noupdatecheck
NetworkMiner running in Linux
Image: NetworkMiner running in Linux

Follow these steps to analyze live network traffic:

  • Click File, Receive PCAP over IP [Ctrl+R]
  • Click Start Receiving and note the listen TCP port (default is 57012)

Then run this command to sniff network traffic and send a real-time stream of captured packets to NetworkMiner:

sudo tcpdump -U -w - not tcp port 57012 | nc localhost 57012

Change 57012 in the command above if NetworkMiner is listening on a different TCP port.

This PCAP-over-IP technique can also be used to read a real-time packet stream from a remote device. It is also possible to sniff packets from Mikrotik routers by clicking File, Receive TZSP Stream.

STEP 4 (optional): Create Shortcut Command

sudo bash -c 'cat > /usr/local/bin/networkminer' << EOF
#!/usr/bin/env bash
mono $(which /opt/NetworkMiner*/NetworkMiner.exe | sort -V | tail -1) --noupdatecheck \$@
EOF
sudo chmod +x /usr/local/bin/networkminer

NetworkMiner can now be started like this:

networkminer ~/Downloads/*.pcap

Linux Distros with NetworkMiner

NetworkMiner comes pre-packaged on some Linux distributions, such as REMnux, Security Onion Desktop, CSI Linux and BlackArch.

NetworkMiner running in REMnux
Image: NetworkMiner running in REMnux

Static Download Link

The https://www.netresec.com/?download=NetworkMiner download link always delivers the latest release of NetworkMiner. If you prefer a static link, that points to a specific version of NetworkMiner, then please use this one: https://download.netresec.com/networkminer/NetworkMiner_3-0.zip

Posted by Erik Hjelmvik on Thursday, 10 April 2025 07:30:00 (UTC/GMT)

Tags: #NetworkMiner#Linux#Ubuntu#Kali

Short URL: https://netresec.com/?b=2542784


Online Network Forensics Training

UPDATE - Training Canceled

The training event in May has been canceled. We are sorry for the inconvenience.

Online Network Forensics Training

Posted by Erik Hjelmvik on Monday, 07 April 2025 06:25:00 (UTC/GMT)

Tags:

Short URL: https://netresec.com/?b=2545f68