Skip to content

Adversary Tradecraft: Emulating Mustang Panda’s Use of MAVInject in Recent Campaigns

In cybersecurity, the adage “what’s old is new” continues to hold true as attackers resurface longstanding techniques or repurpose them with new twists and adaptations. The popularization of Living Off the Land Binaries (LOLBins) — legitimate, Windows-native tools commonly abused for malicious uses — is a great example of this. Many of these methods have existed for decades yet remain effective in the modern security landscape, especially as many organizations are still ill-advised and unequipped to combat them. Being able to spot Mustang Panda’s use of MAVInject in recent campaigns is very important for security teams.

 

The LOLBin star for today’s blog is Microsoft Application Virtualization Injector (MAVInject) which is (un)surprisingly still kicking since its first buzz around 2017. We’ll cover its particular role in a novel attack chain reported by Trend Micro researchers whereby the threat group Mustang Panda combines legitimate components with malicious payloads to reduce likelihood of detection.

 

In this blog we’ll emulate the infection chain described in the report and analyze the activity it produces in Graylog. Throughout and at the end of the post, we share threat hunting and detection approaches that you can apply in your own environments.

 

Attack Overview

The attack likely starts with a spear-phishing email attachment. When executed by the victim, IRSetup.exe is used to drop multiple files to the system. In the case of the Trend Micro report, the files were placed in a newly created C:\ProgramData\session directory.

The report’s execution flow diagram seen below shows how the kill chain progresses from the initial dropper all the way to payload execution, ultimately leading to Command and Control (C2) communication to the attacker-controlled server www[.]militarytc[.]com over port 443.

Attack flow chart

 

Key elements

  • exe opens a decoy PDF to distract the victim while the malicious payload is deployed in the background.
  • The legitimate Electronic Arts (EA) application OriginLegacyCLI.exe is executed to sideload EACore.dll, which contains the actual malicious functionality. The DLL is a modified version of Mustang Panda’s TONESHELL backdoor.
  • The malware checks if ESET security software is running on the host by looking for its associated processes ekrn.exe or egui.exe.
  • If present, it uses MAVInject to inject itself into the legitimate Windows application waitfor.exe and triggers code that establishes the connection to its C2 server.
  • Otherwise, MAVInject is skipped and the code is directly injected into waitfor.

 

“DLL? Sideloading?? Injection???”, one might be thinking as they read through that. Not to worry, these concepts will be demystified as we emulate the chain ourselves later.

 

It seems that Mustang Panda might’ve found this use of MAVInject to fly under the radar of ESET software specifically, though that remains unclear – ESET since responded that this technique is not a bypass to its protections.

 

Persistence

 While researching this attack, we came across a report on Any.Run that exhibits a similar kill chain. It includes a persistence mechanism via registry Run key that wasn’t mentioned in the original report.

This mechanism enables the malware to maintain its foothold on the compromised host. Even if the system is restarted, it will be re-infected once the user logs in.

 

Emulating the Adversary

 

Lab setup

To emulate and analyze the attack, we’ve set up a lab environment with Graylog Enterprise 6.1.7 and Illuminate Windows Security Event Logs Content Pack enabled to parse, normalize and enrich the logs. Graylog Security is also included to integrate Sigma rule detections.

 

A Windows Server 2022 system will serve as our “victim host”. Its configuration sends System, Security, PowerShell/Operational, and Defender event logs via Graylog Sidecar to our Graylog instance. Auditing is explicitly enabled for process execution (command line included), registry changes in commonly abused locations, and file system changes in the ProgramData folder.

 

We’ve built custom binaries — programs, that is — that closely mimic the malware’s core functionality based on Trend Micro’s analysis, all bundled into a custom IRSetup dropper. To trigger the Mavinject flow, we placed “dummy” programs that mimic ESET running processes. This works because the malware only checks for the process names.

 

Detonating the mimic malware

Aaaaand, detonate💥!

We see that the mimic dropper wrote files to the ProgramData\session folder and auto-launched the decoy PDF. Waitfor.exe is also running in Task Manager.

 

 

 

It looks like the infection chain of our mimic malware followed through. Let’s hop over to Graylog to get a detailed view of the activity that occurred.

 

IRSetup dropper

 IRSetup.exe itself isn’t malware — it’s created using a legitimate Windows software installer builder named Setup Factory, in this case abused to drop and execute the malicious files. Attackers favor legitimate tools to blend into environments and make it harder for detection logic to separate malicious from benign activity. It also saves them the trouble of implementing these components themselves.

 

While we don’t have the actual Setup Factory installer, our mimic dropper does replicate its main function. In the screenshot below we see activity marking the beginning of the infection, sorted by ascending time (read top to bottom):

  1. Event ID 4688 (process creation) shows IRSetup.exe being executed
  2. This is followed by file system events where the installer writes the PDF, EACore.dll, and OriginLegacyCLI.exe files to C:\ProgramData\session
  3. The installer proceeds to execute OriginLegacyCLI.exe

 

 

This is where the fun begins (props if you know that reference). Shown below is the rest of the infection chain following OriginLegacyCLI.exe execution. We’ll break down each part and write some threat hunting queries along the way.

 

 

EACore DLL sideloading

 

OriginLegacyCLI.exe gets executed in block 1. We don’t have the visibility from these Windows events to see EACore.dll getting sideloaded as a result (Sysmon would help with that), but we can infer that it happened based on the activity following.

OriginLevacy CLI Exe shown in logs from Mustang Panda’s Use of MAVInject

So, what is DLL sideloading? Before that even, what’s a DLL?

 

A DLL, or Dynamic Link Library, is a shared file used by Windows programs to perform certain functions without having to include all the necessary code within the program itself. Developers load and import ready-made code libraries from DLLs into their applications so they don’t have to reinvent functionality that’s already been written.

 

DLL sideloading is a technique where a legitimate application unknowingly loads a malicious DLL instead of the intended one, allowing attackers to execute their code while appearing legitimate. It’s similar to DLL hijacking, the difference being that the attacker places the trojanized DLL alongside the target application EXE and directly invokes the application to proxy execute the DLL.

 

In the Mustang Panda infection chain, the attacker positions the legitimate, signed 3rd-party application OriginLegacyCLI.exe and a tampered EACore.dll in the same directory. When OriginLegacyCLI.exe runs, it follows a search order to look for the DLL it needs by name, in this case “EACore.dll”, and load it.

 

 

DLLs in the same folder as the application take priority in the search order hierarchy. OriginLegacyCLI finds that the backdoored EACore.dll matches its search first, and loads it unaware that it’s been swapped. Upon load or import of functionality, the malicious code housed in the DLL gets executed.

 

This method is highly effective because it exploits trust in legitimate applications and is difficult to identify, helping malware evade security detections. For this reason it’s often a preferred execution method by Red Teams and threat actors alike.

 

ESET check and RegSvr32

 

At this point the malicious code in EACore is running under the mask of OriginLegacyCLI, and we move to block 2.

 

According to the Trend Micro report, the malware checks for ESET running on the system and, if present, “registers EACore.dll using regsvr32.exe to execute the DLLRegisterServer function”, seen in the command line:

“C:\Windows\System32\regsvr32.exe” /s “C:\ProgramData\session\EACore.dll”

EACORE dll being run for Mustang Panda’s Use of MAVInject

 

Put simply, RegSvr32 is a Windows utility that can be abused to proxy execute malicious code. Instead of EACore invoking its own function, it takes the long way of having RegSvr32 do it. The result is the start of the next infection phase now under the parent process of regsvr32.exe.

 

Again, we see the use of a built-in Windows utility in an attempt to thwart detections.

 

DLL injection via MAVInject

 

Now for what we’ve all been waiting for. If you’re here, you’ve probably weathered the technical hailstorm that was the last few sections, and to that I give a swift salute.

 

We’re now in block 4, where we see waitfor.exe process creation followed by DLL injection into that process using MAVInject.

waitfor process and dll injection using MAVInject for Mustang Panda’s Use of MAVInject

 

So, DLL injection.

 

In this context, DLL injection is a method of executing malicious code inside of another, often legitimate, running process. It takes a DLL and forces the separate process to load and execute it, enabling malicious activity under the guise of that process.

 

As we see above, the malware first launches the legitimate Windows program waitfor.exe with the intent to inject into it.

“C:\Windows\SysWOW64\waitfor.exe” “Event19030087251541”

 

It captures the process ID (PID) 6896 of the newly spawned waitfor.exe to be referenced during injection.

It then runs Mavinject.exe to inject itself, EACore.dll, into waitfor.exe referencing its PID 6896.

“C:\Windows\SysWOW64\mavinject.exe” 6896 /INJECTRUNNING “C:\ProgramData\session\EACore.dll”

 

Once EACore.dll is injected into waitfor.exe, it establishes a network connection to the C2 server for control over the compromised system.

 

That’s the gist. If you’re here for the details, it triggers an execution flow to decrypt, allocate and execute shellcode that opens a reverse shell to the C2 and sends information about the victim host. The C2 server communicates with the host using a custom command protocol.

 

We can hunt for MAVInject DLL injection using the following query in Graylog.

process_command_line:/.* \/INJECTRUNNING .*/

 

INJECTRUNNING for Mustang Panda’s Use of MAVInject

 

Looking for waitfor.exe spawned under regsvr32.exe is another useful query.

process_name:waitfor.exe AND process_parent_name:regsvr32.exe

 

 

Decoy PDF

 

As a little bonus, our mimic dropper also opens the decoy PDF.

Mimic dropper opens a decoy pdf

 

Run key persistence

 

Going back to the start of this blog post, we identified that the malware might also set autostart persistence in the registry to survive reboots.

 

In block 3 above, there are registry modification events that show the malware creating a Run key under `HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run`.

 

Viewing the details of Event ID 4657 (registry value was modified) in Graylog, we see that the key name masquerades as Microsoft Edge Auto Launch. It’s set to execute OriginLegacyCLI.exe (and therefore the EACore.dll TONESHELL backdoor) upon user logon in order to re-infect the system.

 

 

We can hunt for registry HKCU\Run key persistence with event IDs 4657 or 4663. Here is an example query using ID 4663 to uncover registry Run key writes from OriginLegacyCLI.exe (Bear in mind that this won’t catch instances where OriginLegacyCLI is renamed or replaced, remove the process_name condition to cover those).

event_code:4663 AND process_name:OriginLegacyCLI.exe AND file_path:/.*\\Software\\Microsoft\\Windows\\CurrentVersion\\Run/

 

 

Detections

 

We recommend the following SigmaHQ rules to detect this attack chain and similar events:

 

We can easily add these rules with Graylog Security. Add the SigmaHQ repository and import all, then search for and enable the rules.

 

For “Potentially Suspicious Child Process of Regsvr32” you will have to add waitfor.exe to the Image list, like so.

 

 

 

Indicators

 

These indicators will primarily be useful for hunting past intrusions that went unnoticed. They have little effectiveness in detecting future intrusions by Mustang Panda as threat actors tend to burn or alter their tools and infrastructure between campaigns.

 

OriginLegacyCLI.exe (legitimate application targeted for sideloading) SHA-256:
91357E6E5A8DB3D9D3B23CE4368425A148683287D917D927EE2BB6E835C87EBE

 

EACore.dll (modified TONESHELL backdoor) SHA-256:
DC673D59A6A9DF3D02E83FD03AF80E117BEA20954602AE416540870B1B3D13C4

 

Registry HKCU/Run key (persistence mechanism) Name:
MicrosoftEdgeAutoLaunch_DAC5ED36BBAC4D19045B4BAFA91EF8729

Value:
“c:\programdata\session\OriginLegacyCLI.exe”

www[.]militarytc[.]com:443 (C2 server hostname and port)

193[.]56[.]255[.]179 (C2 server IP address)

 

In general, look for Mavinject.exe execution and outbound network connections from unexpected Windows programs. Ensure that execution of Potentially Unwanted Programs (PUPs) and unauthorized software is tracked in your environment.

 

Graylog Detections

Graylog has provided the Sigma Rules and Indicators here to share threat detection intelligence with those not running Graylog Security. Note that Graylog Security customers receive a content feed including Sigma Rules, Anomaly Detectors, Dashboards, and other content to meet various security use cases.

 

To learn how Graylog can help you improve your security posture, contact us today or watch a demo.

About Graylog
At Graylog, our vision is a secure digital world where organizations of all sizes can effectively guard against cyber threats. We’re committed to turning this vision into reality by providing Threat Detection & Response that sets the standard for excellence. Our cloud-native architecture delivers SIEM, API Security, and Enterprise Log Management solutions that are not just efficient and effective—whether hosted by us, on-premises, or in your cloud—but also deliver a fantastic Analyst Experience at the lowest total cost of ownership. We aim to equip security analysts with the best tools for the job, empowering every organization to stand resilient in the ever-evolving cybersecurity landscape.

About Version 2 Limited
Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

BullWall Launches Virtual Server Protection to Combat Ransomware Attacks on VMware Environments

VEJLE, Denmark & WILMINGTON, Del., March 17, 2025 – BullWall, a leading provider of ransomware resilience for critical IT infrastructure, announces the launch of BullWall Virtual Server Protection (VSP) for VMware, a cutting-edge solution designed to safeguard organizations against the escalating threat of ransomware attacks targeting VMware vSphere and ESXi platforms.

As cybercriminals increasingly exploit vulnerabilities in virtual environments, ransomware attacks on VMware ESXi servers have surged, with average ransom demands reaching $5 million per attack in 2024. BullWall VSP is a first-of-its-kind security solution that prevents unauthorized access and encryption attempts on ESXi hosts, ensuring businesses remain resilient against cyber threats.

“The rising number of ransomware attacks on VMware infrastructure is a wake-up call for organizations worldwide,” said Jan Lovmand, BullWall CTO. “With BullWall Virtual Server Protection for VMware, businesses can proactively defend their critical infrastructure against unauthorized access, encryption, and data exfiltration.”

According to the IT Director at a large UK Hospital, “the Bullwall component for VMware ESXi is very impressive and provides immediate protection for one of our biggest concerns – an area of our infrastructure we have been unable to protect until now. The added MFA protection for login on ESXi hosts via SSH provides protection against access and encryption from the outside which we didn’t have and considered a weakness in our defense.”

Key Features of BullWall VSP for VMware

Multi-Factor Authentication (MFA) for SSH logins – Prevents unauthorized access and exploitation of admin privileges.

Real-time threat detection and mitigation – Continuously monitors running processes and files for ransomware activity.

File protection on datastores & virtual disks – Detects and halts critical file encryption and system corruption.

Intruder entrapment technology – Identifies and traps hidden threats attempting to breach server environments.

Automated 24/7 response and remediation – Instantly isolates threats to ensure continuous security.

Seamless integration with security operations – Supports compliance and cyber insurance requirements with immutable access records.

With advanced monitoring and automated remediation, BullWall VSP reduces recovery efforts, lowers cyber insurance costs, and strengthens compliance, making it an essential cybersecurity layer for VMware infrastructures.

With offices in the United States, the United Kingdom and Denmark, BullWall has over 600 customers across 19 countries, helping to put an end to ransomware on a global scale. For more information, visit https://bullwall.com/

About Bullwall
BullWall is a fast-growing international cybersecurity solution provider with a dedicated focus on protecting critical data during active ransomware attacks. We are the only security solution able to contain both known and unknown ransomware variants in seconds, preventing encryption and exfiltration across all data storage types.

About Version 2 Limited
Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

Can you get hacked by opening an email? What businesses should know

Summary: Think your inbox is safe? Think again. A click on a seemingly innocent email can harm your system. Here’s how to stay safe.

Businesses rely on emails to run teams smoothly, communicate with customers, and keep managers in the loop. But what if emails go rogue? Could the next email you open infect your network with ransomware or spyware agents?

Sadly, the answer is yes. A single email can compromise an entire business network. Clicking attachments or following fake links can lead to identity theft attacks, malware infestations, data loss, and, eventually, financial damage.

Email security is a critical concern for every business. Let’s cut through the myths surrounding email phishing attacks. This article will explain everything you need to know and suggest relevant security responses.

The hidden threats linked to malicious emails

Countering email security threats demands a calm, methodical approach. Threat management starts with understanding how opening a phishing email can affect your network.

Previously, companies could easily suffer malware infection by opening a suspicious email. Mail clients lacked protection against Javascript attacks, allowing criminals to access user devices directly.

Fortunately, today’s webmail systems are more robust. It’s hard to acquire an email virus simply by opening a message. Virus scanners screen incoming mail before users click, flagging potential threats and avoiding one-click infections.

The bad news is that email security has gone underground. Attackers use subtle methods to persuade users to take risky actions. And they often succeed. Criminals could conceal a malicious payload inside a seemingly innocent email attachment. Or they could redirect readers to unprotected websites.

That’s why we call attachments “hidden threats.” Criminals use deception to create false trust. Targets need to remain vigilant and question every email they receive. Understanding what to look for is critically important.

The most common types of malicious email attachments

Attackers can attach almost any file type to a phishing email. However, not all file types carry the same threat level. Some are harder to detect than others. Let’s run through some common email phishing attacks and explain how they work.

Executable files: The most dangerous attachments

Executable file extensions like .bat, .exe, .com, and .bin are at the top of the email phishing food chain. They should be your top priority when designing email security strategies.

The reason is that executable files automatically launch code when users open them. There are no intermediate steps or additional user actions. Malware executes, embeds itself on the victim’s device, and starts to spread. The user often does not know that the attack is underway.

Executables also routinely evade email security filters, appearing legitimate to casual readers. But one click can lead to severe security consequences.

Infected documents and PDFs

Office documents (such as docx, doc, .xls, or .xlsx) are also attractive vectors for phishing email attacks, but for a slightly different reason. Attackers can seed documents with malicious scripts or macros.

Normally, macros are tools that save time and automate complex processes. However, criminals can use them to execute malware inside applications.

Using documents has some critical advantages. Spreadsheets, PDFs, or Word files are familiar to office workers. Employees might mistake malicious attachments for client contracts, invoices, or strategic documents.

Attackers also improve their chances of success via urgent language. Emails urge recipients to open the document or risk damaging consequences. That’s all superficial. The real consequences materialize after the malicious macro executes.

PDFs play a similar role. In this case, attackers can seed documents with Javascript scripts. However, PDFs have another benefit: attackers can embed links within the PDF attachment, sending targets to fake websites where criminals harvest personal information.

Hidden malware in compressed files

Compressed file formats include .rar and .zip extensions. We commonly use both formats to transfer large files efficiently, but both file formats can become threat vectors.

Compressed files could hold anything. Without opening the file, recipients have no idea whether the content is legitimate or malicious. Intelligent attackers disguise compressed formats as valuable documents or applications, the kind of files targets may need to open. When they do so, the malware executes automatically.

Archives have another benefit: attackers can add password protection. Password protection blocks antivirus software and suggests to victims that the file is authentic – even if that is far from true.

File extension tricks attackers use

Another thing to remember is that appearances are often deceptive when dealing with email attachments. Attackers can use file masking to disguise the nature of attachments and make identifying them harder.

Images and video files are common examples. Recipients may think the attachment is a standard .jpg image. Clever attackers link the image to the target’s personal or professional life. It could be a real estate portfolio or a product listing – at least on the surface. However, a malicious executable lies beneath the surface.

 

Why deceptive emails fool even careful employees

There are many ways to deceive targets with a phishing email, from PDFs to camouflaged images. But here’s the critical point: any employee can open a suspicious email or download an attachment they should avoid. Nobody is immune. That’s why phishing is such a persistent security issue.

Phishers play on human nature. They mimic legitimate communications from trusted entities, like banks or corporate partners we deal with daily. They prompt rash actions by using an urgent tone and creating false fears. And they use techniques like spoofing and masking to create a veneer of authenticity.

The most sophisticated phishers take these techniques even further. They research their victims and adopt familiar styles of address. They leverage personal information purchased on the Dark Web to profile targets and fine-tune their email content.

Drive-by downloads heighten risks still further. These downloads occur almost invisibly. Victims visit compromised websites via links that appear innocent. No amount of cybersecurity training can prevent infections that occur in the background, without any initial symptoms.

Email security: Preventing hacks and viruses

Hidden threats and devious phishing attacks may seem intimidating but don’t panic. While you could get hacked by clicking a single email, you probably won’t if you adopt email security best practices.

Adopt a strict policy on opening attachments

Treat all email attachments as suspicious by default unless you have requested the file. This policy applies even to attachments from colleagues or trusted partners.

If you receive an unrequested attachment, don’t open it. Ask the sender for verification that the attachment is genuine and what it contains.

Update your PDF reader

PDF attachments are far more dangerous if your reader is out of date. Attackers leverage exploits in older versions while developers plug security gaps with each iteration. Update your reader regularly, preferably as soon as new versions become available.

If possible, upgrade to more secure PDF software. Sophisticated readers include sandboxing to contain potential threats and file validation to screen for malware.

Patch your browser and email client

The same applies to updating your web browser and email application (if you use one). Any web-facing tool may contain exploits or backdoors for malware infection. Regular updates neutralize recently identified vulnerabilities.

Scan emails for viruses and malware

Don’t rely on security tools provided by email services. Scan every incoming attachment with dependable antivirus software that leverages global threat databases. Robust antivirus defenses defend your network edge when other systems fail. Your wider network should remain safe, even if you click on a dangerous file.

Understand how to identify phishing links

Remember: attachments aren’t the only email security threat. Clicking a phishing link can also lead to malware infection or the exposure of personal information. Training employees to avoid fake websites is critically important.

Fake links tend to have convincing anchor text but deceptive URLs. For instance, URLs contain subtle deviations from legitimate versions. Fake websites also tend to contain errors or factual mistakes (such as false tax numbers).

How can NordLayer help

Companies are not alone when dealing with malicious attachments and links. NordLayer’s expertise can help you screen every email before cyber-attacks occur.

Our Download Protection scans every attachment automatically using advanced NordVPN Threat Protection technology. Our solution detects and removes malware instantly before it infects your system. It also gives you an overview of scanned files and allows you to track malicious activity.

Download Protection integrates seamlessly with other NordLayer security tools, adding another essential line of defense.

NordLayer’s Web Protection safeguards your business by blocking access to scam, phishing, and malicious websites. If a user inadvertently clicks on a phishing link, our system will intercept and prevent the connection, protecting your organization from potential security threats.

Ease your email attachment anxiety. Contact the NordLayer team and book a demo to find a security solution for your team.

Frequently asked questions

Can you get a virus from opening an email?

Yes. Malware can execute directly from an email via malicious scripts. However, this is unlikely with proper security measures. Infection via attachments and malicious links is much more common.

Is it safe to reply to an unknown email?

Yes, but you should always exercise caution. Phishers may engage you in conversation to build trust and deliver malware. Ask senders to verify their identities before proceeding. If they cannot do this, end the conversation and report the phishing email.

Never open attachments from unknown senders, and avoid following links in emails from strange contacts. Always ask who has sent the message, what they want, and whether they are who they claim to be.

What to do if you click on a phishing link?

Firstly, don’t panic. If a download prompt appears, decline the transfer. Don’t interact with any forms or links on the phishing website. Leave the site as quickly as possible.

To be safe, disconnect your device from the internet and run a system scan. You may want to change critical passwords (a good security practice anyway). And report the fake website to Google.

 

About Nord Security
The web has become a chaotic space where safety and trust have been compromised by cybercrime and data protection issues. Therefore, our team has a global mission to shape a more trusted and peaceful online future for people everywhere.

About NordLayer
NordLayer is an adaptive network access security solution for modern businesses – from the world’s most trusted cybersecurity brand, Nord Security.

The web has become a chaotic space where safety and trust have been compromised by cybercrime and data protection issues. Therefore, our team has a global mission to shape a more trusted and peaceful online future for people everywhere.

About Version 2 Limited
Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

IoT Sensor Data into Graylog: A Lab Guide

Graylog has always been associated with log management, metrics, SIEM and security monitoring—but it’s also a great tool for creative, low-cost experiments in a home lab. I wanted to use it for real-world sensor data, so I built a DIY temperature and humidity monitor using an ESP-WROOM-32 development board and a DHT22 sensor. This project shows you how to create a lightweight API endpoint on the ESP32, poll it regularly using Graylog’s HTTP API input, and visualize the results in a live dashboard.

I wanted a way to integrate temperature and humidity status into Graylog and send alerts for temperature and low humidity for my equipment room.  Really, my guitar room! I wanted to ensure the humidity was not going below a certain level, potentially causing damage to my prized guitars.

Hardware Used

  • ESP-WROOM-32 (ESP32) development board
  • DHT22 Digital Temperature & Humidity Sensor
  • A few jumper wires
  • A WiFi Network for it to connect to
  • A Graylog Instance on the same network
  • An HTTP API Input configured on Graylog

ESP-WROOM-32

DHT22 Sensor

The DHT22 data pin is connected to GPIO4. Power comes from the ESP32’s 3.3V rail.

DHT22 Temp Humidity sensor

Wiring It Up

The Arduino Code

Arduino is a great way to experiment with many sensors and modules. With most ESP32 boards having WiFi, Bluetooth and a very large community you can almost do anything. You will require the Arduino IED on Windows or Linux to load the code onto an ESP32 Module.  There many aftermarket ESP32 boards so finding the correct board in the IDE can be tricky.  A little trial and error might be necessary.

How This Setup Works

The ESP32 hosts a web server on port 80. When a GET request is sent to “http://ipaddress/sensor”, it responds with the current temperature (in both Celsius and Fahrenheit) and humidity in JSON format. I used the AsyncWebServer, DHT, and ArduinoJson libraries.

Here’s the code running on the ESP32:


#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <DHT.h>
#include <ArduinoJson.h>

// http://<ESP32_IP>/sensor (how to poll the data)

// WiFi credentials
const char* ssid = "ssidname";
const char* password = "ssidpassword";

// Define DHT type & GPIO
#define DHTPIN 4
#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);
AsyncWebServer server(80);

// Define device location
const char* deviceLocation = "Room Location"; // Change this to machine your sensor location

void setup() {
  Serial.begin(115200);
  dht.begin();

  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");

  server.on("/sensor", HTTP_GET, [](AsyncWebServerRequest *request){
    float tempC = dht.readTemperature();
    float tempF = dht.readTemperature(true);
    float humidity = dht.readHumidity();

    if (isnan(tempC) || isnan(tempF) || isnan(humidity)) {
      request->send(500, "application/json", "{\"error\":\"Failed to read from DHT sensor\"}");
      return;
    }

    StaticJsonDocument<200> jsonDoc;
    jsonDoc["location"] = deviceLocation;
    jsonDoc["temperature_C"] = tempC;
    jsonDoc["temperature_F"] = tempF;
    jsonDoc["humidity"] = humidity;

    String jsonResponse;
    serializeJson(jsonDoc, jsonResponse);
    request->send(200, "application/json", jsonResponse);
  });

  server.begin();
}

void loop() {
  // Nothing needed in loop since server runs asynchronously
}

The Output

Once it’s running, you  can visit http://<ESP32_IP>/sensor to get output like this:

{
"location": "Location Name",
"temperature_C": 20,
"temperature_F": 68,
"humidity": 44.1
}

Getting Data into Graylog

To get this data into Graylog, I set up an HTTP API input. This input type is perfect for ingesting structured JSON from IoT devices or scripts. Note: I did not setup advanced token security or any other more secure setup. This could include an API key in your Arduino setup.  This was for basic use and always for best practice, secure your stuff.

Temp Input Screenshot

Here’s the approach:

  • The ESP32 code doesn’t push data—it just serves it in this case.
  • I scheduled the input to poll every 6 hours
  • It hits the /sensor endpoint, and then pulls the data to Graylog.

Visualizing It in Graylog

Once the data is flowing in, it’s easy to build a dashboard that gives you a real-time view of your environment. I created widgets to show temperature and humidity over time, and also added gauges for current values.

If you want to get creative, you can even trigger alerts for thresholds—like if the humidity spikes or the temp drops below safe levels for a server rack or in my case, the guitar room 🙂

Ideas for Future Expansion

  • Add multiple sensors and Graylog inputs for different rooms
  • Include motion or door sensors
  • Combine sensor data with home firewall logs to correlate physical presence with network activity
  • Use anomaly detection to flag environmental shifts

Final Thoughts

This was a fun way to get another project into Graylog alerts. Feeding in structured JSON from a homemade sensor opens the door to a wide range of creative monitoring setups.

If you try something similar or take it further, I’d love to hear about it.

About Graylog
At Graylog, our vision is a secure digital world where organizations of all sizes can effectively guard against cyber threats. We’re committed to turning this vision into reality by providing Threat Detection & Response that sets the standard for excellence. Our cloud-native architecture delivers SIEM, API Security, and Enterprise Log Management solutions that are not just efficient and effective—whether hosted by us, on-premises, or in your cloud—but also deliver a fantastic Analyst Experience at the lowest total cost of ownership. We aim to equip security analysts with the best tools for the job, empowering every organization to stand resilient in the ever-evolving cybersecurity landscape.

About Version 2 Limited
Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

How to find SonicWall devices on your network

Latest SonicWall vulnerabilities: SMA100 Series #

SonicWall has issued an advisory for its SMA100 Series appliances. 

  • CVE-2025-32819 and has been rated high with a CVSS score of 8.8.
  • CVE-2025-32820 and has been rated high with a CVSS score of 8.3.
  • CVE-2025-32821 and has been rated medium with a CVSS score of 6.7.

What is the impact? #

When chained together, the vulnerabilities could allow a remote authenticated attacker to bypass system checks leading to potential remote code execution. It does not affect SonicWall Firewall or SMA 1000 series appliances.

Are updates or workarounds available? #

The vendor advises users to update to platform-hotfix (10.2.1.15-81sv or later) as soon as possible. The vendor also advises its customers to configure multifactor authentication (MFA) and enable WAF on the appliance.

How to find potentially vulnerable systems with runZero #

From the Service Inventory, use the following query to locate systems running potentially vulnerable firmware:

hw:"SonicWall SMA100" OR (_asset.protocol:http AND http.head.server:="SonicWALL SSL-VPN Web Server")

January 2025: SMA1000 Series #

SonicWall has issued an advisory for its SMA1000 Series appliances. The vendor reported that this vulnerability may be actively exploited in the wild.

This vulnerability has been designated CVE-2025-23006 and has been assigned a CVSS score of 9.8 (critical).

What is the impact? #

The vulnerability would allow for a remote unauthenticated attacker to execute arbitrary operating system commands. The vulnerability was discovered within the SMA1000 Appliance Management Console (AMC) and Central Management Console (CMC). It does not affect SonicWall Firewall or SMA 100 series appliances.

Are updates or workarounds available? #

The vendor advises users to update to platform-hotfix (12.4.3-02854 or later) as soon as possible. The vendor also advises its customers to follow the steps outlined in the Best Practices section of the SMA1000 Administration Guide. Access to the console should also be restricted to trusted networks.

How to find potentially vulnerable systems with runZero #

From the Service Inventory, use the following query to locate systems running potentially vulnerable firmware:

hw:"SonicWall SMA1000" OR _asset.protocol:http (last.html.title:="Appliance Management Console Login" OR last.html.title:="Central Management Console Login" OR http.head.server:="SMA/%" OR (favicon.ico.image.mmh3:"16866410" AND (last.html.title:"WorkPlace" OR html.title:"WorkPlace")))

September 2024: SonicOS and SSLVPN #

SonicWall disclosed a vulnerability that affects SonicOS management access and SSLVPN software on SonicWall Gen 5, Gen 6, in addition to Gen 7 devices running SonicOS version 7.0.1-5035 or earlier.

CVE-2024-40766 is rated critical with CVSS score of 9.3, and potentially allows for unauthorized resource access by an attacker.

What is the impact? #

Successful exploitation of this vulnerability potentially results in unauthorized resource access and in some cases could lead to a DoS after causing vulnerable devices to crash.

Are updates or workarounds available? #

SonicWall recommends restricting management access to trusted sources or disabling WAN management from the public Internet. Additionally, SonicWall has released updated firmware which is available for download from mysonicwall.com.

How to find potentially vulnerable systems with runZero #

From the Asset Inventory, use the following query to locate systems running potentially vulnerable software:

hw:"SonicWall"

About runZero
runZero, a network discovery and asset inventory solution, was founded in 2018 by HD Moore, the creator of Metasploit. HD envisioned a modern active discovery solution that could find and identify everything on a network–without credentials. As a security researcher and penetration tester, he often employed benign ways to get information leaks and piece them together to build device profiles. Eventually, this work led him to leverage applied research and the discovery techniques developed for security and penetration testing to create runZero.

About Version 2 Limited
Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.