Detection rules › Sigma

Uncommon GrantedAccess Flags On LSASS

Status
test
Severity
medium
Log source
category process_access, product windows
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects process access to LSASS memory with uncommon access flags 0x410 and 0x01410

Known false positives

  • Legitimate software accessing LSASS process for legitimate reason

MITRE ATT&CK coverage

TacticTechniques
Credential Access

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 10: ProcessAccess

Rule body

title: Uncommon GrantedAccess Flags On LSASS
id: 678dfc63-fefb-47a5-a04c-26bcf8cc9f65
related:
    - id: 32d0d3e2-e58d-4d41-926b-18b520b2b32d
      type: obsolete
status: test
description: Detects process access to LSASS memory with uncommon access flags 0x410 and 0x01410
references:
    - https://docs.microsoft.com/en-us/windows/win32/procthread/process-security-and-access-rights
    - https://onedrive.live.com/view.aspx?resid=D026B4699190F1E6!2843&ithint=file%2cpptx&app=PowerPoint&authkey=!AMvCRTKB_V1J5ow
    - https://web.archive.org/web/20230208123920/https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for_22.html
    - https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment
    - https://web.archive.org/web/20230420013146/http://security-research.dyndns.org/pub/slides/FIRST2017/FIRST-2017_Tom-Ueltschi_Sysmon_FINAL_notes.pdf
author: Florian Roth (Nextron Systems)
date: 2022-03-13
modified: 2023-11-30
tags:
    - attack.credential-access
    - attack.t1003.001
    - attack.s0002
    - detection.threat-hunting
logsource:
    category: process_access
    product: windows
detection:
    selection:
        TargetImage|endswith: '\lsass.exe'
        GrantedAccess|endswith: '10'
    # Absolute paths to programs that cause false positives
    filter1:
        SourceImage:
            - 'C:\Program Files\Common Files\McAfee\MMSSHost\MMSSHOST.exe'
            - 'C:\Program Files\Malwarebytes\Anti-Malware\MBAMService.exe'
            - 'C:\Program Files\Windows Defender\MsMpEng.exe'
            - 'C:\PROGRAMDATA\MALWAREBYTES\MBAMSERVICE\ctlrupdate\mbupdatr.exe'
            - 'C:\Windows\System32\lsass.exe'
            - 'C:\Windows\System32\msiexec.exe'
            - 'C:\WINDOWS\System32\perfmon.exe'
            - 'C:\WINDOWS\system32\taskhostw.exe'
            - 'C:\WINDOWS\system32\taskmgr.exe'
            - 'C:\WINDOWS\system32\wbem\wmiprvse.exe'
            - 'C:\Windows\SysWOW64\msiexec.exe'
            - 'C:\Windows\sysWOW64\wbem\wmiprvse.exe'
    # Windows Defender
    filter2:
        SourceImage|startswith: 'C:\ProgramData\Microsoft\Windows Defender\'
        SourceImage|endswith: '\MsMpEng.exe'
    # Microsoft Gaming Services
    filter3:
        SourceImage|startswith: 'C:\Program Files\WindowsApps\'
        SourceImage|endswith: '\GamingServices.exe'
    # Process Explorer
    filter4:
        SourceImage|endswith:
            - '\PROCEXP64.EXE'
            - '\PROCEXP.EXE'
    # VMware Tools
    filter5:
        SourceImage|startswith: 'C:\ProgramData\VMware\VMware Tools\'
        SourceImage|endswith: '\vmtoolsd.exe'
    # Antivirus and EDR agents
    filter6:
        SourceImage|startswith:
            - 'C:\Program Files\'
            - 'C:\Program Files (x86)\'
        SourceImage|contains: 'Antivirus'
    filter_nextron:
        # SourceImage|startswith: 'C:\Windows\Temp\asgard2-agent\'  # Can be a manual THOR installation
        SourceImage|endswith:
            - '\thor64.exe'
            - '\thor.exe'
            - '\aurora-agent-64.exe'
            - '\aurora-agent.exe'
    filter_ms_products:
        SourceImage|contains|all:
            - '\AppData\Local\Temp\'
            - '\vs_bootstrapper_'
        GrantedAccess: '0x1410'
    # Generic Filter for 0x1410 filter (caused by so many programs like DropBox updates etc.)
    filter_generic:
        SourceImage|startswith:
            - 'C:\Program Files\'
            - 'C:\Program Files (x86)\'
            - 'C:\WINDOWS\system32\'
    filter_wer:
        SourceCommandLine: 'C:\WINDOWS\system32\wermgr.exe -upload'
    filter_localappdata:
        SourceImage|contains|all:
            - 'C:\Users\'
            - '\AppData\Local\'
        SourceImage|endswith:
            - '\Microsoft VS Code\Code.exe'
            - '\software_reporter_tool.exe'
            - '\DropboxUpdate.exe'
            - '\MBAMInstallerService.exe'
            - '\WebEx\WebexHost.exe'
            - '\Programs\Microsoft VS Code\Code.exe'
            - '\JetBrains\Toolbox\bin\jetbrains-toolbox.exe'
    filter_xampp:
        SourceImage|endswith: '\xampp-control.exe'
        GrantedAccess: '0x410'
    filter_games:
        SourceImage|contains: '\SteamLibrary\steamapps\'
        GrantedAccess:
            - '0x410'
            - '0x10'
    condition: selection and not 1 of filter*
falsepositives:
    - Legitimate software accessing LSASS process for legitimate reason
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter*

Stage 1: selection

selection:
    TargetImage|endswith: '\lsass.exe'
    GrantedAccess|endswith: '10'

Stage 2: not filter*

filter1:
    SourceImage:
        - 'C:\Program Files\Common Files\McAfee\MMSSHost\MMSSHOST.exe'
        - 'C:\Program Files\Malwarebytes\Anti-Malware\MBAMService.exe'
        - 'C:\Program Files\Windows Defender\MsMpEng.exe'
        - 'C:\PROGRAMDATA\MALWAREBYTES\MBAMSERVICE\ctlrupdate\mbupdatr.exe'
        - 'C:\Windows\System32\lsass.exe'
        - 'C:\Windows\System32\msiexec.exe'
        - 'C:\WINDOWS\System32\perfmon.exe'
        - 'C:\WINDOWS\system32\taskhostw.exe'
        - 'C:\WINDOWS\system32\taskmgr.exe'
        - 'C:\WINDOWS\system32\wbem\wmiprvse.exe'
        - 'C:\Windows\SysWOW64\msiexec.exe'
        - 'C:\Windows\sysWOW64\wbem\wmiprvse.exe'
filter2:
    SourceImage|startswith: 'C:\ProgramData\Microsoft\Windows Defender\'
    SourceImage|endswith: '\MsMpEng.exe'
filter3:
    SourceImage|startswith: 'C:\Program Files\WindowsApps\'
    SourceImage|endswith: '\GamingServices.exe'
filter4:
    SourceImage|endswith:
        - '\PROCEXP64.EXE'
        - '\PROCEXP.EXE'
filter5:
    SourceImage|startswith: 'C:\ProgramData\VMware\VMware Tools\'
    SourceImage|endswith: '\vmtoolsd.exe'
filter6:
    SourceImage|startswith:
        - 'C:\Program Files\'
        - 'C:\Program Files (x86)\'
    SourceImage|contains: 'Antivirus'
filter_nextron:
    SourceImage|endswith:
        - '\thor64.exe'
        - '\thor.exe'
        - '\aurora-agent-64.exe'
        - '\aurora-agent.exe'
filter_ms_products:
    SourceImage|contains|all:
        - '\AppData\Local\Temp\'
        - '\vs_bootstrapper_'
    GrantedAccess: '0x1410'
filter_generic:
    SourceImage|startswith:
        - 'C:\Program Files\'
        - 'C:\Program Files (x86)\'
        - 'C:\WINDOWS\system32\'
filter_wer:
    SourceCommandLine: 'C:\WINDOWS\system32\wermgr.exe -upload'
filter_localappdata:
    SourceImage|contains|all:
        - 'C:\Users\'
        - '\AppData\Local\'
    SourceImage|endswith:
        - '\Microsoft VS Code\Code.exe'
        - '\software_reporter_tool.exe'
        - '\DropboxUpdate.exe'
        - '\MBAMInstallerService.exe'
        - '\WebEx\WebexHost.exe'
        - '\Programs\Microsoft VS Code\Code.exe'
        - '\JetBrains\Toolbox\bin\jetbrains-toolbox.exe'
filter_xampp:
    SourceImage|endswith: '\xampp-control.exe'
    GrantedAccess: '0x410'
filter_games:
    SourceImage|contains: '\SteamLibrary\steamapps\'
    GrantedAccess:
        - '0x410'
        - '0x10'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
GrantedAccesseq0x10excludes:GrantedAccess field:"GrantedAccess" value:"0x10"
GrantedAccesseq0x410excludes:GrantedAccess field:"GrantedAccess" value:"0x410"
SourceImagematch\SteamLibrary\steamapps\excludes:SourceImage field:"SourceImage" value:"\SteamLibrary\steamapps\"
SourceImageends_with\DropboxUpdate.exeexcludes:SourceImage field:"SourceImage" value:"\DropboxUpdate.exe"
SourceImageends_with\JetBrains\Toolbox\bin\jetbrains-toolbox.exeexcludes:SourceImage field:"SourceImage" value:"\JetBrains\Toolbox\bin\jetbrains-toolbox.exe"
SourceImageends_with\MBAMInstallerService.exeexcludes:SourceImage field:"SourceImage" value:"\MBAMInstallerService.exe"
SourceImageends_with\Microsoft VS Code\Code.exeexcludes:SourceImage field:"SourceImage" value:"\Microsoft VS Code\Code.exe"
SourceImageends_with\Programs\Microsoft VS Code\Code.exeexcludes:SourceImage field:"SourceImage" value:"\Programs\Microsoft VS Code\Code.exe"
SourceImageends_with\WebEx\WebexHost.exeexcludes:SourceImage field:"SourceImage" value:"\WebEx\WebexHost.exe"
SourceImageends_with\software_reporter_tool.exeexcludes:SourceImage field:"SourceImage" value:"\software_reporter_tool.exe"
SourceImagematchC:\Users\excludes:SourceImage field:"SourceImage" value:"C:\Users\"
SourceImagematch\AppData\Local\excludes:SourceImage field:"SourceImage" value:"\AppData\Local\"
SourceImagestarts_withC:\Program Files (x86)\excludes:SourceImage field:"SourceImage" value:"C:\Program Files (x86)\"
SourceImagestarts_withC:\Program Files\excludes:SourceImage field:"SourceImage" value:"C:\Program Files\"
SourceImagematchAntivirusexcludes:SourceImage field:"SourceImage" value:"Antivirus"
GrantedAccesseq0x1410excludes:GrantedAccess field:"GrantedAccess" value:"0x1410"
SourceImagematch\AppData\Local\Temp\excludes:SourceImage field:"SourceImage" value:"\AppData\Local\Temp\"
SourceImagematch\vs_bootstrapper_excludes:SourceImage field:"SourceImage" value:"\vs_bootstrapper_"
SourceImageends_with\xampp-control.exeexcludes:SourceImage field:"SourceImage" value:"\xampp-control.exe"
SourceImageends_with\GamingServices.exeexcludes:SourceImage field:"SourceImage" value:"\GamingServices.exe"
SourceImagestarts_withC:\Program Files\WindowsApps\excludes:SourceImage field:"SourceImage" value:"C:\Program Files\WindowsApps\"
SourceImageends_with\MsMpEng.exeexcludes:SourceImage field:"SourceImage" value:"\MsMpEng.exe"
SourceImagestarts_withC:\ProgramData\Microsoft\Windows Defender\excludes:SourceImage field:"SourceImage" value:"C:\ProgramData\Microsoft\Windows Defender\"
SourceImageends_with\vmtoolsd.exeexcludes:SourceImage field:"SourceImage" value:"\vmtoolsd.exe"
SourceImagestarts_withC:\ProgramData\VMware\VMware Tools\excludes:SourceImage field:"SourceImage" value:"C:\ProgramData\VMware\VMware Tools\"
SourceCommandLineeqC:\WINDOWS\system32\wermgr.exe -uploadexcludes:SourceCommandLine field:"SourceCommandLine" value:"C:\WINDOWS\system32\wermgr.exe -upload"
SourceImageends_with\PROCEXP.EXEexcludes:SourceImage field:"SourceImage" value:"\PROCEXP.EXE"
SourceImageends_with\PROCEXP64.EXEexcludes:SourceImage field:"SourceImage" value:"\PROCEXP64.EXE"
SourceImageends_with\aurora-agent-64.exeexcludes:SourceImage field:"SourceImage" value:"\aurora-agent-64.exe"
SourceImageends_with\aurora-agent.exeexcludes:SourceImage field:"SourceImage" value:"\aurora-agent.exe"
SourceImageends_with\thor.exeexcludes:SourceImage field:"SourceImage" value:"\thor.exe"
SourceImageends_with\thor64.exeexcludes:SourceImage field:"SourceImage" value:"\thor64.exe"
SourceImageeqC:\PROGRAMDATA\MALWAREBYTES\MBAMSERVICE\ctlrupdate\mbupdatr.exeexcludes:SourceImage field:"SourceImage" value:"C:\PROGRAMDATA\MALWAREBYTES\MBAMSERVICE\ctlrupdate\mbupdatr.exe"
SourceImageeqC:\Program Files\Common Files\McAfee\MMSSHost\MMSSHOST.exeexcludes:SourceImage field:"SourceImage" value:"C:\Program Files\Common Files\McAfee\MMSSHost\MMSSHOST.exe"
SourceImageeqC:\Program Files\Malwarebytes\Anti-Malware\MBAMService.exeexcludes:SourceImage field:"SourceImage" value:"C:\Program Files\Malwarebytes\Anti-Malware\MBAMService.exe"
SourceImageeqC:\Program Files\Windows Defender\MsMpEng.exeexcludes:SourceImage field:"SourceImage" value:"C:\Program Files\Windows Defender\MsMpEng.exe"
SourceImageeqC:\WINDOWS\System32\perfmon.exeexcludes:SourceImage field:"SourceImage" value:"C:\WINDOWS\System32\perfmon.exe"
SourceImageeqC:\WINDOWS\system32\taskhostw.exeexcludes:SourceImage field:"SourceImage" value:"C:\WINDOWS\system32\taskhostw.exe"
SourceImageeqC:\WINDOWS\system32\taskmgr.exeexcludes:SourceImage field:"SourceImage" value:"C:\WINDOWS\system32\taskmgr.exe"
SourceImageeqC:\WINDOWS\system32\wbem\wmiprvse.exeexcludes:SourceImage field:"SourceImage" value:"C:\WINDOWS\system32\wbem\wmiprvse.exe"
SourceImageeqC:\Windows\SysWOW64\msiexec.exeexcludes:SourceImage field:"SourceImage" value:"C:\Windows\SysWOW64\msiexec.exe"
SourceImageeqC:\Windows\System32\lsass.exeexcludes:SourceImage field:"SourceImage" value:"C:\Windows\System32\lsass.exe"
SourceImageeqC:\Windows\System32\msiexec.exeexcludes:SourceImage field:"SourceImage" value:"C:\Windows\System32\msiexec.exe"
SourceImageeqC:\Windows\sysWOW64\wbem\wmiprvse.exeexcludes:SourceImage field:"SourceImage" value:"C:\Windows\sysWOW64\wbem\wmiprvse.exe"
SourceImagestarts_withC:\WINDOWS\system32\excludes:SourceImage field:"SourceImage" value:"C:\WINDOWS\system32\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
GrantedAccessends_with
  • 10 corpus 4 (sigma 4)
field:"GrantedAccess" kind:ends_with value:"10"
TargetImageends_with
  • \lsass.exe corpus 16 (sigma 16)
field:"TargetImage" kind:ends_with value:"\lsass.exe"