The PureLogs infostealer campaign is a textbook example of a technique that is spreading fast: use normal Windows tools to silently steal everything on your machine. Here is how it works, why it is so hard to stop, and what defenders can do.
When most people think about malware, they imagine a suspicious file downloaded from a shady website. The reality in 2026 looks very different. Today’s most effective attacks start with an ordinary-looking email, use tools that are already installed on your computer, and never write the most dangerous parts of the attack to your hard drive at all. The recent PureLogs campaign analyzed by FortiGuard Labs is one of the clearest examples of this approach, and understanding it helps explain a broader pattern that appears across dozens of criminal operations.
The short version: a fake invoice email delivers a compressed archive. Inside is a JavaScript file. That file quietly starts a PowerShell session, loads a malicious program entirely in memory, hides it inside a legitimate Windows process, and proceeds to steal every credential, session token, browser cookie, cryptocurrency wallet file, and password it can find. Nothing obviously suspicious ever appears on screen.
Why Attackers Use JavaScript as the Opening Move
JavaScript is not just a web browser language. Windows ships with a built-in component called the Windows Script Host that can run JavaScript files directly from the desktop, from inside archives, or when double-clicked from an email attachment. Attackers exploit this because it requires no installation, no admin rights, and no special software. The victim just has to open the file.
MITRE ATT&CK classifies this as T1059.007, Command and Scripting Interpreter: JavaScript, noting that attackers abuse JavaScript for execution both inside and outside browsers. In the PureLogs campaign, the JavaScript file inside the archive did not immediately do anything visible. Instead it decrypted a set of PowerShell commands, stored them in hidden environment variables on the machine, and then quietly launched PowerShell to run them. To confuse security analysts, the script was padded with garbled text and fake comments written in Chinese, Japanese, and Russian, making it look like incomprehensible noise.
The user believed they were opening a purchase order confirmation. The script was quietly preparing the next stage of a credential-theft operation.
This use of JavaScript as a bridge between the social engineering trick and the actual malware is a deliberate design choice. The JavaScript stage itself does not steal anything. It just unlocks the door. That separation makes it easier to swap out components and harder for security tools to attribute the activity to a specific malware family.
Why PowerShell Is the Weapon of Choice for the Next Stage
PowerShell is a powerful command-line tool built into every modern version of Windows. System administrators use it every day for legitimate work. That legitimacy is exactly why attackers love it. When PowerShell runs, most systems assume it is doing something authorized. MITRE tracks this behavior as T1059.001, Command and Scripting Interpreter: PowerShell.
In the PureLogs campaign, PowerShell was launched with a set of arguments specifically chosen to reduce visibility. It ran with a hidden window so nothing appeared on screen, it bypassed execution policy restrictions to avoid prompts, and it avoided loading the user’s profile to leave fewer traces. The script it ran was encoded in Base64 and then additionally encrypted with XOR, meaning that even if someone captured the command line, they would see what looked like random gibberish. Once decoded and decrypted, the PowerShell session loaded the next-stage malware entirely in memory, a technique called fileless execution that bypasses antivirus tools that look for suspicious files on disk.
Hiding Inside a Trusted Windows Process
Once the PowerShell stage completes its work, the PureLogs attack takes one more step to evade detection. It uses a technique called process hollowing, where the malicious code is injected into a legitimate, trusted Windows application so that from the outside it looks like that program is running normally. MITRE classifies this as T1055.012.
In the PureLogs campaign analyzed by FortiGuard Labs, the chosen host process was MsBuild.exe, a genuine Microsoft developer tool used to compile software projects. Using a trusted developer tool to run malicious code has its own MITRE classification: T1127.001, Trusted Developer Utilities Proxy Execution. Because MsBuild.exe is signed by Microsoft, many security tools and analysts initially treat it as trustworthy. The malicious activity happening inside it has to be detected through behavioral signals rather than simple reputation checks, which is a much harder problem.

What PureLogs Actually Steals
PureLogs is not just a delivery mechanism. It is a fully featured information stealer sold on a subscription basis for around $150 per month on criminal markets. Once active, the fileless module works through the machine systematically, collecting everything that could be valuable to an attacker or resold on criminal marketplaces.
The theft of session cookies and Discord tokens deserves special attention. A session cookie lets someone use a web application as if they were already logged in, without needing the password. Many services do not invalidate existing sessions when a password is changed. That means stolen session material can give attackers persistent access to email accounts, cloud storage, developer tools, and business applications even after the victim realizes something is wrong and changes their credentials. MITRE classifies this browser credential theft as T1555.003 and the clipboard monitoring as T1115.
After collecting everything, PureLogs encrypts the data using AES before sending it to a remote command-and-control server over HTTPS, making the outbound traffic look like ordinary encrypted web browsing. Without deep packet inspection tuned for anomalous patterns, this exfiltration step is difficult to detect at the network level.
Real-World Examples: The Same Pattern in Other Major Campaigns
PureLogs is not an isolated case. The combination of JavaScript, PowerShell, fileless execution, and process injection appears across a wide range of criminal malware families. The following cases all use recognizably similar logic.
SocGholish, also known as FakeUpdates, has been active since at least 2017 and is one of the most widespread JavaScript-based malware delivery systems in operation. Instead of relying on email attachments, it compromises legitimate websites and serves a fake browser update prompt. The visitor sees a convincing popup explaining that their browser needs an update. Clicking it downloads a compressed archive containing a JavaScript file with a name like Update.js or Chrome.Update.js. When run, that JavaScript launches PowerShell to pull down a further payload. ReliaQuest researchers documented two separate hands-on-keyboard intrusions in January 2026 that both traced back to SocGholish infections. In both cases the attackers transferred a Cobalt Strike beacon and were working toward ransomware deployment before being contained. Trend Micro connected SocGholish activity to RansomHub ransomware delivery, and Cyble documented it being used to deliver NetSupport RAT using the same JavaScript-to-PowerShell chain.
QakBot has been active since 2008 and began life as a tool to steal banking credentials. Over time it evolved into a delivery platform used by multiple criminal groups to distribute ransomware including Black Basta. It is distributed primarily through phishing email and uses PowerShell and process injection extensively during its operation. Notably, QakBot uses PowerShell and tools like Mimikatz for credential theft and lateral movement. The US Department of Justice dismantled QakBot infrastructure in August 2023 under Operation Duck Hunt, but the malware resurfaced within months. Menlo Security described QakBot as a major banking trojan with credential-stealing and ransomware-enabling functionality, and Zscaler documented attack chains that used multiple file formats to reach the same fileless execution goal.
Emotet started in 2014 as a banking trojan designed to steal financial credentials. It eventually evolved into something closer to a malware distribution business, renting out its infected machine network to deliver other groups’ payloads. FortiGuard Labs previously documented Emotet spreading through malicious Office documents where macros executed code to download and run additional malware. The DFIR Report documented an Emotet intrusion that progressed through Cobalt Strike activity, lateral movement across the network, data exfiltration using Rclone, and finally Quantum ransomware deployment. The initial trigger was a script running inside an Office document. The end result was a domain-wide compromise and ransomware encryption. Picus Security analysis noted that Emotet uses PowerShell scripts hidden inside VBA macros, encrypted with XOR or Base64, and run with hidden windows, a pattern nearly identical to what is seen in the PureLogs campaign.
In January 2026, Swiss Post Cybersecurity researchers identified a separate PureLogs campaign that added an additional layer of deception. After the JavaScript executed and PowerShell decoded the first-stage loader, that loader reached out to archive.org, a widely trusted file-hosting service, to download what appeared to be an ordinary PNG image file. Hidden inside the image using steganography was the encrypted PureLogs payload. The technique of hiding data inside image files is called steganography, and it is increasingly used by malware authors because image downloads look completely normal to firewalls, web proxies, and most network monitoring tools. The image passed as legitimate because it was hosted on a legitimate service and had a valid file header. After four layers of deobfuscation, researchers found the active PureLogs infostealer. The same approach was described in the May 2026 FortiGuard Labs report, where PawsRunner decrypted a download URL using RC4 and cycled through multiple network APIs to retrieve a PNG containing the final payload.
Trend Micro documented a separate PureLog Stealer campaign in March 2026 that used a completely different social engineering lure. Rather than fake invoices, it sent emails claiming the recipient’s organization had violated copyright law and needed to review the attached legal notice immediately. Inside the archive was a Python-based loader and dual .NET loaders that ran the PureLog Stealer entirely in memory, combined with an AMSI bypass to disable Windows security scanning and a registry persistence mechanism to survive reboots. Targets included organizations in healthcare, government, hospitality, and education. The campaign also incorporated screenshots and victim fingerprinting, suggesting the attackers were identifying which machines belonged to organizations worth targeting for further access rather than purely collecting credentials for bulk resale.
What Defenders Should Watch For
The PureLogs campaign and others like it are effective because every individual step looks plausible in isolation. JavaScript files are opened by users constantly. PowerShell running on a Windows machine is completely normal. HTTPS traffic to a server is ordinary web activity. MsBuild.exe is a trusted Microsoft tool. Detection requires watching for combinations of behaviors rather than single events.
Conclusion: This Is the New Normal
JavaScript and PowerShell are not dangerous because they are inherently malicious tools. They are dangerous because attackers have become very skilled at combining them with obfuscation, trusted Windows processes, in-memory execution, and credential theft modules into a single operational chain that bypasses most of the defenses organizations have traditionally relied on.
PureLogs sells for $150 a month on criminal forums and is available to anyone willing to pay. That price point means it is not just sophisticated nation-state actors using this operational model. It is criminal operators with no specialized technical skills, following a playbook that does the hard work for them. SocGholish, QakBot, Emotet, and PureLogs all demonstrate that the same basic architecture, a script to launch PowerShell, PowerShell to load malware in memory, malware to steal credentials, has become the standard template for Windows-based criminal operations.
The most effective defensive investment is not a single product or control. It is the combination of behavioral detection tuned to catch script execution chains, employee training focused specifically on compressed archive lures, and endpoint monitoring capable of identifying in-memory activity. Organizations that treat JavaScript and PowerShell alerts as background noise are accepting a very high level of undetected risk.
References
Primary research and threat reports
1. FortiGuard Labs — Phishing Campaign Deploys JavaScript-Driven PureLogs Variant to Steal Sensitive Data (May 2026)
https://www.fortinet.com/blog/threat-research/phishing-campaign-deploys-javascript-driven-purelogs-variant-to-steal-sensitive-data
2. Swiss Post Cybersecurity — Don’t Judge a PNG by Its Header: PURELOGS Infostealer Analysis (January 2026)
https://www.swisspost-cybersecurity.ch/news/purelogs-infostealer-analysis-dont-judge-a-png-by-its-header
3. Help Net Security — PureLogs Infostealer is Stealing Credentials Worldwide (May 2026)
https://www.helpnetsecurity.com/2026/05/19/purelogs-infostealer-delivery-steganography/
4. Trend Micro — Copyright Lures Mask a Multi-Stage PureLog Stealer Attack on Key Industries (March 2026)
https://www.trendmicro.com/en_us/research/26/c/copyright-lures-mask-a-multistage-purelog-stealer-attack.html
5. ReliaQuest — SocGholish: A Tale of FakeUpdates (January 2026)
https://reliaquest.com/blog/socgholish-fakeupdates/
6. Red Canary — SocGholish Threat Detection Report
https://redcanary.com/threat-detection-report/threats/socgholish/
7. Cyble — NetSupport RAT Distributed via SocGholish (May 2025)
https://cyble.com/blog/netsupport-rat-distributed-via-socgholish/
8. Trend Micro — SocGholish’s Intrusion Techniques Facilitate Distribution of Ransomware
https://www.trendmicro.com/en_us/research/25/c/socgholishs-intrusion-techniques-facilitate-distribution-of-rans.html
9. The DFIR Report — Emotet Strikes Again: LNK File Leads to Domain Wide Ransomware (2022)
https://thedfirreport.com/2022/11/28/emotet-strikes-again-lnk-file-leads-to-domain-wide-ransomware/
10. Picus Security — Emotet Technical Analysis Part 2: PowerShell Unveiled (2025)
https://www.picussecurity.com/resource/blog/emotet-technical-analysis-part-2-powershell-unveiled
11. Zscaler ThreatLabz — Hibernating Qakbot: A Comprehensive Study and In-Depth Campaign Analysis
https://www.zscaler.com/blogs/security-research/hibernating-qakbot-comprehensive-study-and-depth-campaign-analysis
12. Menlo Security — An Anatomy of HEAT Attacks Used by Qakbot Campaigns
https://www.menlosecurity.com/blog/an-anatomy-of-heat-attacks-used-by-qakbot-campaigns
13. CyberQuay — ADVERSARIAL TECHNIQUE ANALYSIS: File Recovery from Backup via WBAdmin.exe
https://aidata.services/data-security/file_recovery_from_backup_wbadmin/
MITRE ATT&CK technique references
T1059.007 — Command and Scripting Interpreter: JavaScript
https://attack.mitre.org/techniques/T1059/007/
T1059.001 — Command and Scripting Interpreter: PowerShell
https://attack.mitre.org/techniques/T1059/001/
T1055.012 — Process Injection: Process Hollowing
https://attack.mitre.org/techniques/T1055/012/
T1127.001 — Trusted Developer Utilities Proxy Execution: MSBuild
https://attack.mitre.org/techniques/T1127/001/
T1555.003 — Credentials from Password Stores: Credentials from Web Browsers
https://attack.mitre.org/techniques/T1555/003/
T1115 — Clipboard Data
https://attack.mitre.org/techniques/T1115/
This article is provided for informational and educational purposes. All referenced research is publicly available from the cited sources. Organizations should consult qualified cybersecurity professionals for incident response guidance.