T1587.001 IBM QRadar · QRadar

Detect Malware in IBM QRadar

Adversaries may develop malware and malware components that can be used during targeting. Building malicious software can include the development of payloads, droppers, post-compromise tools, backdoors, packers, C2 protocols, and the creation of infected removable media. Because malware development occurs primarily on adversary-controlled infrastructure before deployment, defenders cannot directly observe this activity. Detection must pivot to identifying proxies: compilation and build tool activity on non-developer endpoints, use of known obfuscation and packing tools, characteristics of freshly compiled executables executing immediately after creation, and behavioral patterns consistent with malware testing (sandbox evasion checks, anti-analysis routines). Threat actors such as Lazarus Group, APT29, Sandworm, Kimsuky, and Indrik Spider are known to develop bespoke malware to avoid commodity detection signatures.

MITRE ATT&CK

Tactic
Resource Development
Technique
T1587 Develop Capabilities
Sub-technique
T1587.001 Malware
Canonical reference
https://attack.mitre.org/techniques/T1587/001/

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT
  DATEFORMAT(starttime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
  sourceip,
  username,
  "filename" AS process_image,
  "CommandLine" AS command_line,
  "ParentProcessName" AS parent_image,
  CASE
    WHEN LOWER("filename") MATCHES '(msfvenom|msfconsole)' OR LOWER("CommandLine") MATCHES '(shell_reverse_tcp|shell_bind_tcp|windows/meterpreter|linux/x86/meterpreter)' THEN 'MsfvenomPayloadGeneration'
    WHEN LOWER("filename") MATCHES '(confuserex|obfuscar|dotfuscator|eazfuscator|dnguard|codeprotector)' OR LOWER("CommandLine") MATCHES '(confuserex|obfuscar|eazfuscator|dnguard)' THEN 'ObfuscatorUsage'
    WHEN LOWER("filename") MATCHES '(upx\.exe|themida|vmprotect|pecompact|aspack|mpress)' OR LOWER("CommandLine") MATCHES '(upx\s|--best|--brute|--ultra-brute)' THEN 'PackerProtectorUsage'
    WHEN LOWER("filename") MATCHES '(csc\.exe|vbc\.exe|msbuild\.exe|ilasm\.exe|cl\.exe|link\.exe)' AND NOT LOWER("ParentProcessName") MATCHES '(devenv\.exe|code\.exe|rider64\.exe|idea64\.exe|dotnet\.exe)' THEN 'CompilerOnNonDevEndpoint'
    ELSE 'Uncategorized'
  END AS detection_branch,
  LOGSOURCETYPENAME(logsourceid) AS log_source_type,
  logsourceid
FROM events
WHERE
  LOGSOURCETYPEID(logsourceid) IN (12, 13, 14)  -- Windows Security, Sysmon
  AND (QIDNAME(qid) = 'Process Create' OR EventID = '1' OR EventID = '4688')
  AND starttime > (NOW() - 86400000)
  AND (
    LOWER("filename") MATCHES '(csc\.exe|vbc\.exe|msbuild\.exe|ilasm\.exe|cl\.exe|link\.exe|rc\.exe|upx\.exe|themida|vmprotect|pecompact|aspack|mpress|confuserex|obfuscar|dotfuscator|eazfuscator|dnguard|msfvenom|msfconsole)'
    OR LOWER("CommandLine") MATCHES '(msfvenom|shell_reverse_tcp|shell_bind_tcp|windows/meterpreter|upx\s|--brute|--ultra-brute|confuserex|obfuscar|eazfuscator|dnguard)'
  )
ORDER BY starttime DESC
high severity medium confidence

QRadar AQL query detecting malware development tool execution via Windows Security (EventID 4688) or Sysmon process creation events. Identifies compiler usage on non-developer endpoints, packer/protector execution, obfuscator invocation, and Metasploit payload generation commands. Classifies each hit into a detection branch for triage.

Data Sources

Windows Security Event Log (EventID 4688)Microsoft Sysmon (EventID 1)QRadar DSM for Windows

Required Tables

events

False Positives & Tuning

  • Build servers and CI/CD agents running compilers as part of automated pipelines — filter by sourceip ranges corresponding to build infrastructure
  • IT admins running UPX to compress legitimate installers for deployment — filter by username against a known admin group
  • Penetration testing teams running Metasploit during authorized engagements — filter by time window and approved source IPs documented in change management
Download portable Sigma rule (.yml)

Other platforms for T1587.001


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1On-System C# Payload Compilation via csc.exe

    Expected signal: Sysmon Event ID 1 (Process Create): Image=csc.exe, CommandLine containing '/out:' and path to %TEMP%, ParentImage=cmd.exe. Sysmon Event ID 11 (File Create): TargetFilename ending in df00tech_payload.exe in the Temp directory, initiated by csc.exe. Security Event ID 4688 (if command line auditing enabled) for the csc.exe invocation.

  2. Test 2Executable Packing with UPX

    Expected signal: Sysmon Event ID 1: Process Create for upx.exe with CommandLine containing '--best' and the target file path. Sysmon Event ID 11: File modification event on df00tech_target.exe as UPX rewrites the PE in-place. Sysmon Event ID 3: Network connection to GitHub for the UPX download (if not pre-staged).

  3. Test 3In-Memory C# Compilation via PowerShell Add-Type

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Add-Type', '-TypeDefinition', and 'CSharpCodeProvider' (internal). PowerShell ScriptBlock Log Event ID 4104 capturing the full Add-Type invocation including the embedded C# source. Temporary .dll files may be written to %TEMP% by the CodeDom compiler with random names before being loaded and deleted.

  4. Test 4Metasploit msfvenom Payload Generation Simulation

    Expected signal: Sysmon for Linux Event ID 1 (if deployed) or auditd execve records capturing the msfvenom command invocation. The string 'msfvenom' and 'reverse_tcp' in the command line are the primary indicators. If msfvenom is present and executes, an ELF binary is created in /tmp, triggering file creation events.

Unlock Pro Content

Get the full detection package for T1587.001 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections