Latest alertCVE-2018-11776 in Apache Struts Confirmed Exploited in the WildRead
Search all news in the platform

Detection rule

HackTool - PPID Spoofing SelectMyParent Tool Execution

HighTest-data validatedSigmaHQ (community)T1134.004

Overview

Detects the use of parent process ID spoofing tools like Didier Stevens tool SelectMyParent

Rule id
52ff7941-8211-46f9-84f8-9903efb7077d
ATT&CK techniques
T1134.004 Access Token Manipulation: Parent PID Spoofing
Severity
High
Confidence
Low
Origin
SigmaHQ (community)
SigmaHQ status
test
Used in defense packs
qilin, safepay

Validation

  1. ExperimentalSyntax checked only. Not yet tested on events.
  2. Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
  3. SIEM-validatedRun in a real SIEM, with a recorded result.

3 of 3 positive test events matched; 1 of 1 near-miss events were correctly ignored. Community rule reused unmodified from SigmaHQ. OffSet7 converted it and tested it on synthetic events.

Detection logic and queries

Queries are shown exactly as generated. Test them in your environment before you deploy them.

Sigma

Sigma (YAML) · 52ff7941-8211-46f9-84f8-9903efb7077d

Download
title: HackTool - PPID Spoofing SelectMyParent Tool Execution
id: 52ff7941-8211-46f9-84f8-9903efb7077d
status: test
description: Detects the use of parent process ID spoofing tools like Didier Stevens tool SelectMyParent
references:
    - https://pentestlab.blog/2020/02/24/parent-pid-spoofing/
    - https://www.picussecurity.com/resource/blog/how-to-detect-parent-pid-ppid-spoofing-attacks
    - https://www.ired.team/offensive-security/defense-evasion/parent-process-id-ppid-spoofing
    - https://www.virustotal.com/gui/search/filename%253A*spoof*%2520filename%253A*ppid*/files
author: Florian Roth (Nextron Systems)
date: 2022-07-23
modified: 2024-11-23
tags:
    - attack.privilege-escalation
    - attack.stealth
    - attack.t1134.004
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        - Image|endswith: '\SelectMyParent.exe'
        - CommandLine|contains:
              - 'PPID-spoof'
              - 'ppid_spoof'
              - 'spoof-ppid'
              - 'spoof_ppid'
              - 'ppidspoof'
              - 'spoofppid'
              - 'spoofedppid'
              - ' -spawnto '
        - OriginalFileName|contains:
              - 'PPID-spoof'
              - 'ppid_spoof'
              - 'spoof-ppid'
              - 'spoof_ppid'
              - 'ppidspoof'
              - 'spoofppid'
              - 'spoofedppid'
        - Description: 'SelectMyParent'
        - Hashes|contains:
              - 'IMPHASH=04D974875BD225F00902B4CAD9AF3FBC'
              - 'IMPHASH=A782AF154C9E743DDF3F3EB2B8F3D16E'
              - 'IMPHASH=89059503D7FBF470E68F7E63313DA3AD'
              - 'IMPHASH=CA28337632625C8281AB8A130B3D6BAD'
    condition: selection
falsepositives:
    - Unlikely
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_hktl_selectmyparent/info.yml

QRadar CRE

Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.

Rule name
OffSet7: HackTool - PPID Spoofing SelectMyParent Tool Execution
Rule type
Event rule (Local)
Log source types
Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1

Building blocks

  • BB:OffSet7:HackTool PPID Spoofing SelectMyParent Tool Execu:selection (match)
    Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.
    • Process Path / Process Name ends with: \SelectMyParent.exe
    • Command contains: PPID-spoof, ppid_spoof, spoof-ppid, spoof_ppid, ppidspoof, spoofppid, spoofedppid, -spawnto
    • Filename contains: PPID-spoof, ppid_spoof, spoof-ppid, spoof_ppid, ppidspoof, spoofppid, spoofedppid
    • custom property needed: Description is equal to (case-insensitive): SelectMyParent
      No QRadar property mapped for "Description": create a custom event property (regex or JSON) on the DSM first.
    • CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH') contains: IMPHASH=04D974875BD225F00902B4CAD9AF3FBC, IMPHASH=A782AF154C9E743DDF3F3EB2B8F3D16E, IMPHASH=89059503D7FBF470E68F7E63313DA3AD, IMPHASH=CA28337632625C8281AB8A130B3D6BAD

Main rule, option A (building blocks)

  1. when the event(s) were detected by one or more of these log source types: Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1
  2. when an event matches the condition built from these building blocks: BB:OffSet7:HackTool PPID Spoofing SelectMyParent Tool Execu:selection

Main rule, option B (AQL filter test)

Not available: the AQL conversion failed for this rule.

Rule response

  • Severity 7, credibility 6, relevance 7
  • Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
  • Respond no more than once per 30 minutes per Log Source (tune per environment)

Limitations

  • AQL conversion failed (field 'Description' is not supported); only the building-block design is available.
  • QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.

Splunk

Splunk SPLSearch

Search for Splunk with Windows/Sysmon field names. A scheduled search or ES correlation search also needs a schedule, time range, throttling and an adaptive response, set in your environment.

Image="*\\SelectMyParent.exe" OR CommandLine IN ("*PPID-spoof*", "*ppid_spoof*", "*spoof-ppid*", "*spoof_ppid*", "*ppidspoof*", "*spoofppid*", "*spoofedppid*", "* -spawnto *") OR OriginalFileName IN ("*PPID-spoof*", "*ppid_spoof*", "*spoof-ppid*", "*spoof_ppid*", "*ppidspoof*", "*spoofppid*", "*spoofedppid*") OR Description="SelectMyParent" OR Hashes IN ("*IMPHASH=04D974875BD225F00902B4CAD9AF3FBC*", "*IMPHASH=A782AF154C9E743DDF3F3EB2B8F3D16E*", "*IMPHASH=89059503D7FBF470E68F7E63313DA3AD*", "*IMPHASH=CA28337632625C8281AB8A130B3D6BAD*")

Splunk savedsearches.conf stanzaScheduled search template

Template stanza. Review schedule, alert actions and index/sourcetype for your environment before enabling.

[default]
dispatch.earliest_time = -30d
dispatch.latest_time = now

[HackTool - PPID Spoofing SelectMyParent Tool Execution]
description = Detects the use of parent process ID spoofing tools like Didier Stevens tool SelectMyParent
search = Image="*\\SelectMyParent.exe" OR CommandLine IN ("*PPID-spoof*", "*ppid_spoof*", "*spoof-ppid*", "*spoof_ppid*", "*ppidspoof*", "*spoofppid*", "*spoofedppid*", "* -spawnto *") OR OriginalFileName IN ("*PPID-spoof*", "*ppid_spoof*", "*spoof-ppid*", "*spoof_ppid*", "*ppidspoof*", "*spoofppid*", "*spoofedppid*") OR Description="SelectMyParent" OR Hashes IN ("*IMPHASH=04D974875BD225F00902B4CAD9AF3FBC*", "*IMPHASH=A782AF154C9E743DDF3F3EB2B8F3D16E*", "*IMPHASH=89059503D7FBF470E68F7E63313DA3AD*", "*IMPHASH=CA28337632625C8281AB8A130B3D6BAD*")

Microsoft Sentinel

Microsoft Sentinel KQL (ASIM)Hunting query

Hunting query over ASIM-normalized tables. An analytics rule also needs a schedule, entity mapping and alert grouping.

imProcessCreate
| where TargetProcessName endswith "\\SelectMyParent.exe" or (TargetProcessCommandLine contains "PPID-spoof" or TargetProcessCommandLine contains "ppid_spoof" or TargetProcessCommandLine contains "spoof-ppid" or TargetProcessCommandLine contains "spoof_ppid" or TargetProcessCommandLine contains "ppidspoof" or TargetProcessCommandLine contains "spoofppid" or TargetProcessCommandLine contains "spoofedppid" or TargetProcessCommandLine contains " -spawnto ") or (TargetProcessFileOriginalName contains "PPID-spoof" or TargetProcessFileOriginalName contains "ppid_spoof" or TargetProcessFileOriginalName contains "spoof-ppid" or TargetProcessFileOriginalName contains "spoof_ppid" or TargetProcessFileOriginalName contains "ppidspoof" or TargetProcessFileOriginalName contains "spoofppid" or TargetProcessFileOriginalName contains "spoofedppid") or TargetProcessFileDescription =~ "SelectMyParent" or (TargetProcessIMPHASH startswith "04D974875BD225F00902B4CAD9AF3FBC" or TargetProcessIMPHASH startswith "A782AF154C9E743DDF3F3EB2B8F3D16E" or TargetProcessIMPHASH startswith "89059503D7FBF470E68F7E63313DA3AD" or TargetProcessIMPHASH startswith "CA28337632625C8281AB8A130B3D6BAD")

Elastic

Elastic Lucene (ECS)Hunting query

Lucene query over ECS fields (Winlogbeat/Elastic Agent Windows mappings). A detection rule also needs an index pattern, schedule and actions.

process.executable:*\\SelectMyParent.exe OR (process.command_line:(*PPID\-spoof* OR *ppid_spoof* OR *spoof\-ppid* OR *spoof_ppid* OR *ppidspoof* OR *spoofppid* OR *spoofedppid* OR *\ \-spawnto\ *)) OR (process.pe.original_file_name:(*PPID\-spoof* OR *ppid_spoof* OR *spoof\-ppid* OR *spoof_ppid* OR *ppidspoof* OR *spoofppid* OR *spoofedppid*)) OR process.pe.description:SelectMyParent OR (winlog.event_data.Hashes:(*IMPHASH\=04D974875BD225F00902B4CAD9AF3FBC* OR *IMPHASH\=A782AF154C9E743DDF3F3EB2B8F3D16E* OR *IMPHASH\=89059503D7FBF470E68F7E63313DA3AD* OR *IMPHASH\=CA28337632625C8281AB8A130B3D6BAD*))

Elastic EQL (ECS)Hunting query

EQL query over ECS fields. Usable in an Elastic Security EQL rule after review; index pattern and schedule are set per environment.

any where process.executable:"*\\SelectMyParent.exe" or (process.command_line like~ ("*PPID-spoof*", "*ppid_spoof*", "*spoof-ppid*", "*spoof_ppid*", "*ppidspoof*", "*spoofppid*", "*spoofedppid*", "* -spawnto *")) or (process.pe.original_file_name like~ ("*PPID-spoof*", "*ppid_spoof*", "*spoof-ppid*", "*spoof_ppid*", "*ppidspoof*", "*spoofppid*", "*spoofedppid*")) or process.pe.description:"SelectMyParent" or (winlog.event_data.Hashes like~ ("*IMPHASH=04D974875BD225F00902B4CAD9AF3FBC*", "*IMPHASH=A782AF154C9E743DDF3F3EB2B8F3D16E*", "*IMPHASH=89059503D7FBF470E68F7E63313DA3AD*", "*IMPHASH=CA28337632625C8281AB8A130B3D6BAD*"))

Elastic ES|QL (ECS)Hunting query

ES|QL query over ECS fields; the FROM clause uses * and must be narrowed to your indices.

from * metadata _id, _index, _version | where ends_with(process.executable, "\\SelectMyParent.exe") or process.command_line like "*PPID-spoof*" or process.command_line like "*ppid_spoof*" or process.command_line like "*spoof-ppid*" or process.command_line like "*spoof_ppid*" or process.command_line like "*ppidspoof*" or process.command_line like "*spoofppid*" or process.command_line like "*spoofedppid*" or process.command_line like "* -spawnto *" or process.pe.original_file_name like "*PPID-spoof*" or process.pe.original_file_name like "*ppid_spoof*" or process.pe.original_file_name like "*spoof-ppid*" or process.pe.original_file_name like "*spoof_ppid*" or process.pe.original_file_name like "*ppidspoof*" or process.pe.original_file_name like "*spoofppid*" or process.pe.original_file_name like "*spoofedppid*" or process.pe.description=="SelectMyParent" or winlog.event_data.Hashes like "*IMPHASH=04D974875BD225F00902B4CAD9AF3FBC*" or winlog.event_data.Hashes like "*IMPHASH=A782AF154C9E743DDF3F3EB2B8F3D16E*" or winlog.event_data.Hashes like "*IMPHASH=89059503D7FBF470E68F7E63313DA3AD*" or winlog.event_data.Hashes like "*IMPHASH=CA28337632625C8281AB8A130B3D6BAD*"

No working conversion: Microsoft Defender XDR KQL (The target has no column for this hash type (e.g. IMPHASH).); IBM QRadar AQL (hunting query) (QRadar AQL backend has no property mapping for field "Description")

Required telemetry

Log source
product: windows · category: process_creation
Fields used
CommandLine Description Hashes Image OriginalFileName

False positives

  • Unlikely

Investigation and response

No OffSet7 investigation guidance has been written for this rule yet. Start from the false positives above and the ATT&CK technique pages.

References

Author and attribution

Author
Florian Roth (Nextron Systems)
Source
SigmaHQ · rules/windows/process_creation/proc_creation_win_hktl_selectmyparent.yml
Upstream commit
9688134317a2
Licence
Detection Rule License (DRL) 1.1

Version history

  1. Version 1Imported from SigmaHQ
  2. OffSet7 build · SigmaHQ 9688134317a2