Skip to navigation

Threat reportAPTTL-2026-4945

Suspected APT37 Python Backdoor Delivered via AI Deepfake Impersonation Spear-Phishing Campaign

highACTIVE

Genians reports a suspected APT37 (North Korea) spear-phishing campaign that delivers ZIP-compressed LNK files impersonating officials and institutions. A chain of obfuscated batch scripts, curl.exe and a legitimate Python 3.10 Embed runtime installs a compiled-Python remote command execution backdoor persisted by a scheduled task. First disclosed .

Key facts

IdentifiersTL-2026-4945
Also known asPython-in-a-Cat, AI Deepfake Impersonation Campaign
SeverityHIGH
First disclosed
Affected productsMicrosoft Windows (LNK shortcut, cmd.exe, PowerShell, Task Scheduler, curl.exe); Hancom Hangul Word Processor (HWP) - decoy document format
AttributionAPT37 (medium confidence)
Nation-state nexusNorth Korea
MalwareIoT Reaper, RemCom
MITRE ATT&CK techniquesT1005 Data from Local System, T1027.010 Command Obfuscation, T1033 System Owner/User Discovery, T1036.003 Rename Legitimate Utilities, T1036.008 Masquerade File Type, T1053.005 Scheduled Task, T1059.001 PowerShell, T1059.003 Windows Command Shell, T1059.006 Python, T1071.001 Web Protocols, T1082 System Information Discovery, T1132.001 Standard Encoding and 4 more in the attack flow
MotivationESPIONAGE
Target sectorsgovernment administration, defense, police - law enforcement, research, think tanks
Target regionssouth korea
Detection rules9 (1 shown free)
Sources5 cited sources

Detection coverage

As of 2026-11-01, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-4945 across Splunk SPL, Microsoft KQL and Sigma, covering 29 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: APT37 TL-2026-4945 LNK Environment-Variable Substring Obfuscated Command Execution

Detects cmd.exe or powershell.exe started with a command line that is rebuilt character by character through repeated environment-variable substring expansion (%var:~offset,length%). This is the stage 1-2 LNK payload used by the suspected APT37 ZIP/LNK spear-phishing chain (T1027.010, T1059.003, T1059.001, T1204.002) that rebuilds 'cmd.exe /k' and a PowerShell '-executionpolicy bypass' call and ends in the curl.exe / Python Embed backdoor install. The pattern is behaviour-based and does not depend on a lure name, hash or domain.

Splunk SPL

index=sysmon earliest=-24h sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 (Image="*cmd.exe" OR Image="*powershell.exe")
```comment("Four or more consecutive %var:~offset,length% expansions in one command line indicate character-by-character command rebuilding")```
| regex CommandLine="(%\w{3,}:~-?\d+,\d+%){4,}"
| stats count min(_time) as firstTime max(_time) as lastTime values(CommandLine) as CommandLine values(ParentImage) as ParentImage values(ParentCommandLine) as ParentCommandLine by host User Image
| convert ctime(firstTime) ctime(lastTime)

Microsoft KQL

DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("cmd.exe", "powershell.exe")
// Four or more consecutive %var:~offset,length% expansions = command rebuilt char by char (APT37 LNK stage)
| where ProcessCommandLine matches regex @"(%\w{3,}:~-?\d+,\d+%){4,}"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine

Sigma

title: APT37 LNK Obfuscated Environment-Variable Substring Command Execution
id: 4b7a1c52-9e3d-4f6a-8c21-5d0e7a93b114
status: experimental
description: Detects cmd.exe or powershell.exe launched with a command line rebuilt through repeated environment-variable substring expansion (%var:~offset,length%), as used by the suspected APT37 ZIP/LNK stage in TL-2026-4945.
references:
    - https://www.genians.co.kr/en/blog/threat_intelligence/python
author: Threadlinqs Team
date: 2026/11/01
tags:
    - attack.initial_access
    - attack.t1566.001
    - attack.execution
    - attack.t1204.002
    - attack.t1059.003
    - attack.t1059.001
    - attack.defense_evasion
    - attack.t1027.010
    - attack.t1140
    - attack.g0067
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        Image|endswith:
            - '\cmd.exe'
            - '\powershell.exe'
    selection_obf:
        CommandLine|re: '(%\w{3,}:~-?\d+,\d+%){4,}'
    condition: all of selection_*
falsepositives:
    - Legacy administrative batch files that rely heavily on substring expansion
level: high

Known false positives:

  • Legacy installer or administrative batch scripts that use several %var:~n,m% substring expansions on one command line
  • Software packaging tools that build command lines from environment variables

Tuning notes: Raise or lower the {4,} repetition threshold to trade noise against coverage. Exclude known packaging or deployment parent processes by ParentImage. Enable Sysmon EventCode 1 with full command-line capture. Correlate hits with a ZIP-extracted .lnk parent (explorer.exe, 7zFM.exe, WinRAR.exe) for higher fidelity.

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)
  • APT37 TL-2026-4945 Renamed curl.exe Downloader Staged in LOCALAPPDATA · unlock with TL Creds
  • APT37 TL-2026-4945 Renamed Python Embed Runtime codeflush.exe Executing [indicator] · unlock with TL Creds
  • APT37 TL-2026-4945 Python Backdoor HTTP C2 Beaconing from Renamed Runtime · unlock with TL Creds
  • APT37 TL-2026-4945 Batch Stager Python Embed Download and Runtime Staging · unlock with TL Creds
  • APT37 TL-2026-4945 Backdoor File Drops in MusicLibrariesPackage and LOCALAPPDATA · unlock with TL Creds
  • APT37 TL-2026-4945 Child Processes of the Python Backdoor Host (exec-based RCE) · unlock with TL Creds
  • APT37 TL-2026-4945 Scheduled Task Persistence for Renamed Python Backdoor · unlock with TL Creds
  • APT37 TL-2026-4945 C2 Infrastructure DNS and Network Connections · unlock with TL Creds

Indicators of compromise

As of 2026-11-01, Threadlinqs Intelligence tracks 29 indicators of compromise for TL-2026-4945.

Sample indicators (3 of 29)

  • IP address: 51.158.21[.]1
  • Domain: kmot[.]co[.]kr
  • File hash: 255155bad9af5e2c6cf550ff2a95219d

Defanged, TLP:CLEAR. Full set of 29 indicators: unlock with TL Creds.

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

Community OSINT corroboration

1 of this threat's indicators have also been reported by the open-source security community. Community sightings are unverified and are kept separate from Threadlinqs' curated indicators. Indicator values, reporters and campaign linkage are available to authenticated Red-tier users.

Technical analysis

Targets include defense and security personnel, North Korea researchers, unification-studies organizations and police investigators.

Genians Security Center (report dated 2026-05-11) analyzed an April 2026 campaign, assessed as suspected APT37 (ScarCruft / Reaper / Ricochet Chollima), that follows its earlier AI deepfake military-ID forgery campaign (Genians, 2025-09-15). Spear-phishing emails use context-specific lures: airline e-tickets, North Korea research event invitations, defense-official and police-investigator impersonation, and portal-service email ID conflict notifications. The lure is a ZIP archive containing an LNK file disguised as a work document.

Stage 1-2: The LNK embeds a command obfuscated with environment-variable substring expansion (for example %a9390f0:~offset,1%), which rebuilds 'cmd.exe /k' and a PowerShell invocation using '-executionpolicy bypass' character by character. A missing path separator in the command creates a file at %LOCALAPPDATA%\TempRpJjgMB.exe. Stage 3: curl.exe is copied from C:\Windows\System32 to %LOCALAPPDATA% as RpJjgMB.exe and used to download follow-on payloads from the C2 at kmot.co.kr/board.php. Stage 4: two files are fetched together, a decoy HWP document (a cybercrime reporting system ECRM form, shown to the victim) and a batch script GuFLjO7q.bat that runs in the background.

Stage 5-6: The batch script downloads python-3.10.0-embed-amd64.zip from python.org, extracts it to C:\Users\Public\Music\MusicLibrariesPackage, deletes python.exe, renames pythonw.exe to codeflush.exe, and downloads settingenv.cat from the C2. settingenv.cat is a compiled Python 3.10 hash-based .pyc (magic 6F 0D 0D 0A, flags 01 00 00 00, hash field zeroed) disguised with a .cat extension. A scheduled task named MicrosoftMusicLibrariesPackageTaskMachine runs 'codeflush.exe settingenv.cat' every minute, surviving reboots and process termination.

Backdoor behavior: the decompiled code hides strings with chr() construction and [::-1] reversal, and resolves __import__ indirectly via getattr(__builtins__, '__import__') to conceal the os, base64, urllib.request, urllib.parse, sys and io modules. It builds a victim identifier from os.getlogin() plus a predefined string, Base64-encodes it into an HTTP Cookie header, and sends HTTP POST requests to kmot.co.kr/board.php. The server returns Base64-encoded Python code, which is run with exec() while stdout is redirected to io.StringIO(); the output is Base64-encoded and returned to the C2. Genians describes the capabilities as file collection, system information theft and dynamic command execution.

Attribution (suspected, per Genians): reuse of IP 51.158.21.1 across 2024-2026 campaigns; repeated Cafe24 hosting and French .fr domains (choisy.fr, versonnex74.fr); the same environment-variable batch obfuscation since 2022; recurring batch/CAB naming patterns (_ms3360.bat, _pK3772.bat, _wS1825.bat, WStemp163.cab, MStemp109.cab); the HWP metadata creator account 'Lailey' seen in 2022 unification council and Seoul UN human rights office lures and in the April 2026 police lure; near-identical PHP webshell structure on compromised sites (hanainternational.net 2022, udcontest.com 2021, printory.kr 2026); and overlap of 114.207.246.156 with ableinfo.co.kr infrastructure. No CVE is exploited in this campaign; CVE-2018-15982 is mentioned in the source only in connection with APT37's 2020 attacks. No CVSS applies. BeaconBeagle returned HTTP 404 for 51.158.21.1, so no C2 correlation was available.

MITRE ATT&CK techniques by tactic:

Collection

T1005 Data from Local System

Defense Evasion

T1027.010 Command Obfuscation; T1036.003 Rename Legitimate Utilities; T1036.008 Masquerade File Type; T1140 Deobfuscate/Decode Files or Information

Discovery

T1033 System Owner/User Discovery; T1082 System Information Discovery

Persistence

T1053.005 Scheduled Task

Execution

T1059.001 PowerShell; T1059.003 Windows Command Shell; T1059.006 Python; T1204.002 Malicious File

Command and Control

T1071.001 Web Protocols; T1132.001 Standard Encoding

Initial Access

T1566.001 Spearphishing Attachment

Resource Development

T1584 Compromise Infrastructure

Remediation

Immediate actions

  • Block the listed domains and IP addresses at the perimeter and DNS, and hunt proxy/DNS logs for kmot.co.kr/board.php
  • Search endpoints for C:\Users\Public\Music\MusicLibrariesPackage, codeflush.exe, settingenv.cat and the MicrosoftMusicLibrariesPackageTaskMachine scheduled task
  • Hunt for curl.exe copied or renamed outside System32 (for example %LOCALAPPDATA%\RpJjgMB.exe)
  • Quarantine mailboxes holding ZIP attachments that contain LNK files

Workarounds

  • Restrict creation of scheduled tasks by non-administrative users
  • Restrict outbound access from user workstations to python.org downloads of embeddable runtimes where not business-justified

Longer-term hardening

  • Deploy behavior-based EDR able to detect obfuscated batch commands and multi-stage download abuse, as Genians recommends
  • Block execution of LNK files launched from archives or email attachments
  • Alert on pythonw.exe or renamed Python runtimes running from user-writable or Public paths
  • Train staff in defense, security, police and North Korea research roles on impersonation and deepfake-enabled lures

Affected and fixed versions

  • Microsoft — Windows (LNK shortcut, cmd.exe, PowerShell, Task Scheduler, curl.exe)
    Vulnerable versions: Hosts where the victim opens the LNK from a ZIP archive
  • Hancom — Hangul Word Processor (HWP) - decoy document format

Timeline

  • Year-only date (2020): APT37 exploited Adobe Flash vulnerabilities via OLE objects in HWP documents and used the Chinotto malware family (per Genians).
  • Year-only date (2022): Campaigns impersonating the National Unification Advisory Council and the Seoul UN Human Rights Office; HWP metadata creator account 'Lailey' and environment-variable batch obfuscation first linked.
  • Hauri published 'Persistent Threat Attacks by the APT37 Group', cited by Genians for earlier APT37 activity.
  • Genians published 'AI-Driven Deepfake-Based Military ID Forgery APT Campaign', whose environment-variable batch obfuscation resembles this campaign.
  • Month-level date (March 2026): North Korea's Ministry of State Security was renamed the State Intelligence Bureau, per Yonhap as cited by Genians.
  • Month-level date (April 2026): Campaign impersonating police officials delivers ZIP/LNK lures that install the Python backdoor.
  • Genians Security Center publishes its analysis of the Python backdoor campaign, attributing it to suspected APT37.
  • SecurityOnline and other outlets report on the Genians findings.

Sources cited

More from APT37

Previous and next in apt

Drafted by the Threadlinqs research pipeline from 5 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