Skip to navigation

Threat reportThreat IntelligenceTL-2026-0739

Research: ~90% of Leaked Malware Source Code Contains Exploitable Software Weaknesses (Vouvoutsis, Patsakis & Casino, arXiv:2606.05945)

ACTIVE

Academic researchers static-analyzed 658 leaked malware source-code projects from VX-Underground (paired against 249 benign open-source projects) with Cppcheck, Bandit, Snyk, and Semgrep and found close to 90% contained at least one recognized software weakness. Disabled TLS certificate validation in C2 clients (CWE-295) leaves command-and-control traffic open to interception, and over 40% of weaknesses were shared across multiple malware families (e.g. WannaCry, Emotet, Torpig) — meaning defenders can turn bugs in malware itself into a disruption opportunity.

Key facts

IdentifiersTL-2026-0739
Also known asMalware source code is full of bugs, Coding habits and cognitive styles in malware developers
SeverityINFO
Affected productsN/A (research corpus) Leaked malware source-code projects (VX-Underground)
Weaknesses (CWE)CWE-295, CWE-327, CWE-798, CWE-561, CWE-563, CWE-457, CWE-476, CWE-120, CWE-353, CWE-89
MalwareEmotet - S0367, Torpig, WannaCry - S0366
ToolsBandit, Cppcheck, OWASP ZAP, Semgrep, Snyk, nmap, sqlmap - S0225
MITRE ATT&CK techniquesT1003 OS Credential Dumping, T1008 Fallback Channels, T1027 Obfuscated Files or Information, T1041 Exfiltration Over C2 Channel, T1056 Input Capture, T1059 Command and Scripting Interpreter, T1071 Application Layer Protocol, T1095 Non-Application Layer Protocol, T1105 Ingress Tool Transfer, T1185 Browser Session Hijacking, T1210 Exploitation of Remote Services, T1486 Data Encrypted for Impact and 7 more in the attack flow
MotivationUNKNOWN
Detection rules9 (1 shown free)
Sources7 cited sources

Detection coverage

As of 2026-06-09, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-0739 across Splunk SPL, Microsoft KQL and Sigma, covering 26 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: Malware C2 Client Disables TLS Certificate Validation (CWE-295) — Exploitation

Detects the all-trusting .NET certificate-validation callback (ServerCertificateValidationCallback returning $true) that leaked-malware C2 clients install to accept any server certificate. Per arXiv:2606.05945 this CWE-295 weakness is the single most defender-exploitable bug: it lets blue teams and takedown operators intercept/sinkhole the C2 channel. The override pattern in PowerShell script-block telemetry is a high-confidence malicious signal.

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1071.001, T1573.002, T1557
  • Data sources: windows_powershell_scriptblock, windows_security
  • Severity: high
  • Confidence: high

Splunk SPL

index=windows sourcetype="WinEventLog:Microsoft-Windows-PowerShell/Operational" EventCode=4104
| eval sb=lower(ScriptBlockText)
| where like(sb,"%servercertificatevalidationcallback%") AND (like(sb,"%{ $true }%") OR like(sb,"%return true%") OR like(sb,"%=> true%") OR like(sb,"%servicepointmanager%"))
| stats count min(_time) as firstTime max(_time) as lastTime values(ScriptBlockText) as scripts by host User
| where count > 0
| `ctime(firstTime)` | `ctime(lastTime)`
| eval cwe="CWE-295", note="All-trusting TLS cert callback — C2 interception opportunity"

Microsoft KQL

// Mirror of the SPL exploitation detection for cross-platform parity
let window = 24h;
DeviceEvents
| where Timestamp > ago(window)
| where ActionType in ("PowerShellCommand", "ScriptContent")
| extend sb = tolower(tostring(AdditionalFields))
| where sb has "servercertificatevalidationcallback" and (sb has "{ $true }" or sb has "return true" or sb has "servicepointmanager")
| project Timestamp, DeviceName, InitiatingProcessAccountName, InitiatingProcessFileName, AdditionalFields
| extend Cwe = "CWE-295"

Sigma

title: PowerShell Installs All-Trusting TLS Certificate Validation Callback (Malware C2 CWE-295)
id: 7b1d6e0a-4f21-49c8-9a2e-1c3f5a7d0739
status: experimental
description: Detects PowerShell installing a ServerCertificateValidationCallback that unconditionally returns true, disabling TLS certificate validation as seen in leaked-malware C2 clients (CWE-295), enabling defender-side C2 interception.
references:
    - https://arxiv.org/abs/2606.05945
    - https://cwe.mitre.org/data/definitions/295.html
author: Threadlinqs Team
date: 2026/06/09
tags:
    - attack.command_and_control
    - attack.t1071.001
    - attack.t1573.002
    - attack.credential_access
    - attack.t1557
logsource:
    product: windows
    category: ps_script
detection:
    selection_cb:
        ScriptBlockText|contains: 'ServerCertificateValidationCallback'
    selection_true:
        ScriptBlockText|contains:
            - '{ $true }'
            - 'return true'
            - '=> true'
            - 'ServicePointManager'
    condition: selection_cb and selection_true
falsepositives:
    - Legacy internal tooling intentionally bypassing self-signed certificate errors
    - Security/test automation validating endpoints with self-signed certs
level: high

Known false positives:

  • Legacy internal tooling intentionally bypassing self-signed certificate errors
  • Security/test automation validating endpoints with self-signed certs

Tuning notes: Allowlist known developer/test hosts and signed internal automation accounts. Raise confidence when the callback override is followed within minutes by an outbound HTTPS beacon to a single gate path or a DNS lookup for a non-existent kill-switch domain.

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple)
  • Process Disables TLS Verification via Command Line (CWE-295) — Exploitation · unlock with TL Creds
  • Registry Run-Key Persistence by Non-Validating C2 Host (CWE-295 context) — Post-Exploitation · unlock with TL Creds
  • Periodic Fixed-Interval HTTPS Beacon to Single Gate Path (C2) — C2/Lateral · unlock with TL Creds
  • Unverified SSL Context Created by Script Interpreter (CWE-295) — Exploitation · unlock with TL Creds
  • Spearphishing Attachment Spawns Script Interpreter (Initial Access) — Post-Exploitation Setup · unlock with TL Creds
  • C2 Web Panel SQL Injection / XSS Probe in Adversary Infrastructure (CWE-89/CWE-79) — C2/Lateral · unlock with TL Creds
  • Weak/Predictable Ransomware Key Generation (CWE-327) — Post-Exploitation · unlock with TL Creds
  • Hard-Coded Kill-Switch Domain Lookup Near TLS Beacon (C2) — C2/Lateral · unlock with TL Creds

Indicators of compromise

As of 2026-06-09, Threadlinqs Intelligence tracks 26 indicators of compromise for TL-2026-0739.

26 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

This is a defensive threat-intelligence research note, not a product vulnerability. Vasilis Vouvoutsis, Constantinos Patsakis, and Fran Casino (University of Piraeus / associated research groups) published "Exploring the connection between coding habits and cognitive styles in malware developers" (arXiv:2606.05945v1, submitted 4 June 2026; covered by Help Net Security on 9 June 2026). The authors assembled a corpus of 658 leaked malware source-code projects from the VX-Underground repository and compared them against 249 benign open-source projects (including Python and JavaScript packages and security tooling such as nmap, sqlmap, and OWASP ZAP), analyzing them with four static application security testing (SAST) tools: Cppcheck for general C/C++ defects, Bandit for Python security issues, Snyk for dependency/package vulnerabilities, and Semgrep for pattern-based weaknesses.

The headline finding is that close to 90% of the analyzed malware projects contained at least one recognized software weakness. Poor code quality was the single most frequent category — missing integrity checks, unused/dead variables, and dead code dominated the results. Critically for defenders, a notable subset of samples shipped with TLS/SSL certificate validation disabled in their C2 client code (Improper Certificate Validation, CWE-295), which means an operator-in-the-path can intercept, decrypt, manipulate, or sinkhole the malware's command-and-control channel — an adversary-in-the-middle posture that the malware's own bug enables. More than 40% of the identified weaknesses involved code fragments shared across multiple malware families, indicating heavy code reuse and copy-paste among threat-actor codebases; the same exploitable bug therefore generalizes across families rather than being a one-off. Structural software metrics (cyclomatic complexity per function, maintainability index) were measured on the 463 of 658 projects (~70%) that supported structural measurement; malware showed smaller codebases, reduced documentation, higher per-function cyclomatic complexity, and minimal use of abstraction (classes, closures), consistent with development optimized for expedience, operational secrecy, and evasion rather than maintainability.

The study positions itself alongside the Malvuln project (cataloging exploitable bugs in malware since 2021). Operationally, the defensive takeaways are: (1) treat malware C2 clients with disabled certificate validation as interceptable — blue teams and takedown operators can perform TLS interception or impersonate C2 to enumerate, sinkhole, or disrupt; (2) shared/reused weaknesses mean a single detection or disruption technique can scale across families; and (3) the limitations matter — the corpus is C/C++-heavy and reflects only publicly leaked malware, so findings may not generalize to actively maintained, closed adversary toolchains. The named families (WannaCry, Emotet, Torpig) are illustrative of the reuse pattern and not the subject of new vulnerability disclosures here.

MITRE ATT&CK techniques by tactic:

Credential Access

T1003 OS Credential Dumping; T1557 Adversary-in-the-Middle

Command and Control

T1008 Fallback Channels; T1071 Application Layer Protocol; T1095 Non-Application Layer Protocol; T1105 Ingress Tool Transfer; T1568 Dynamic Resolution; T1573 Encrypted Channel

Defense Evasion

T1027 Obfuscated Files or Information; T1497 Virtualization/Sandbox Evasion

Exfiltration

T1041 Exfiltration Over C2 Channel

Collection

T1056 Input Capture; T1185 Browser Session Hijacking

Execution

T1059 Command and Scripting Interpreter

Lateral Movement

T1210 Exploitation of Remote Services

Impact

T1486 Data Encrypted for Impact; T1490 Inhibit System Recovery

Discovery

T1497 Virtualization/Sandbox Evasion

Persistence

T1547 Boot or Logon Autostart Execution

Initial Access

T1566 Phishing

Remediation

Immediate actions

  • Where malware C2 clients are observed disabling TLS certificate validation (CWE-295), prioritize TLS interception / man-in-the-path of the C2 channel for sinkholing, enumeration, and disruption during authorized takedown operations
  • Add detections for C2 over TLS that does not validate server certificates as a high-confidence malicious-traffic signal

Workarounds

  • Treat publicly-leaked-malware findings as a lower bound; actively maintained closed adversary toolchains may not share these weaknesses

Longer-term hardening

  • Build a knowledge base of recurring, reused malware weaknesses (shared across >40% of families) so a single disruption technique can scale across multiple families
  • Incorporate malware-source SAST findings (Cppcheck/Bandit/Snyk/Semgrep) into threat-research workflows to identify defender-exploitable bugs
  • Track the Malvuln catalog of exploitable malware bugs as an ongoing intelligence source

Affected and fixed versions

  • N/A (research corpus) — Leaked malware source-code projects (VX-Underground)
    Vulnerable versions: 658 analyzed projects (~90% with >=1 weakness)

Timeline

  • Torpig (Sinowal/Anserin) banking trojan studied and partially taken over by researchers; its leaked source later enters corpora like the one analyzed here.
  • WannaCry is halted by registering its hard-coded kill-switch domain — a canonical example, cited by the study, of a malware author's own bug being exploited to neutralize a campaign.
  • WannaCry global ransomware outbreak; its code (and EternalBlue-based spread) becomes a reference family for later source-reuse analysis.
  • Malvuln project begins publicly cataloging exploitable vulnerabilities in malware, establishing the 'bugs in malware' defensive research lineage.
  • Emotet botnet disrupted by international law enforcement (Operation Ladybird); referenced among the families showing shared code weaknesses.
  • Vouvoutsis, Patsakis & Casino submit 'Exploring the connection between coding habits and cognitive styles in malware developers' to arXiv (2606.05945v1).
  • Study compares the 658 leaked malware projects against 249 benign open-source projects (most-downloaded Python/JavaScript packages plus nmap, sqlmap, OWASP ZAP); malware is found to be predominantly C/C++ while benign code is predominantly Python/JavaScript, with structural metrics computed on the 463 (~70%) projects supporting measurement.
  • Help Net Security publishes coverage: ~90% of 658 leaked malware projects contain at least one software weakness; disabled TLS certificate validation exposes C2 to interception; >40% of weaknesses shared across families.

Sources cited

Previous and next in threat intel

Drafted by the Threadlinqs research pipeline from 7 sources; published ; last updated —.

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats