{"id":"4096a49c-7de4-4da0-a230-c66ccd56ea5a","title":"Suspicious PowerShell Get Current User","description":"Detects the use of PowerShell to identify the current logged user.","author":"frack113","status":"test","level":"low","date":"2022-04-04","modified":"","tags":["attack.discovery","attack.t1033"],"technique_ids":["T1033"],"logsource":{"product":"windows","category":"ps_script","definition":"Requirements: Script Block Logging must be enabled"},"falsepositives":["Legitimate PowerShell scripts"],"references":["https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1033/T1033.md#atomic-test-4---user-discovery-with-env-vars-powershell-script","https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1033/T1033.md#atomic-test-5---getcurrent-user-with-powershell-script"],"source_path":"rules/windows/powershell/powershell_script/posh_ps_susp_get_current_user.yml","source_sha256":"1b7cf01d85dd0f2748e17a55f6f28cdc021ff89a778469ff712d6c8d327c1f43","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_susp_get_current_user.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Suspicious PowerShell Get Current User\nid: 4096a49c-7de4-4da0-a230-c66ccd56ea5a\nstatus: test\ndescription: Detects the use of PowerShell to identify the current logged user.\nreferences:\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1033/T1033.md#atomic-test-4---user-discovery-with-env-vars-powershell-script\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1033/T1033.md#atomic-test-5---getcurrent-user-with-powershell-script\nauthor: frack113\ndate: 2022-04-04\ntags:\n    - attack.discovery\n    - attack.t1033\nlogsource:\n    product: windows\n    category: ps_script\n    definition: 'Requirements: Script Block Logging must be enabled'\ndetection:\n    selection:\n        ScriptBlockText|contains:\n            - '[System.Environment]::UserName'\n            - '$env:UserName'\n            - '[System.Security.Principal.WindowsIdentity]::GetCurrent()'\n    condition: selection\nfalsepositives:\n    - Legitimate PowerShell scripts\nlevel: low\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1033","id":"T1033","name":"System Owner/User Discovery","page":"techniques/enterprise/T1033/"}],"data_path":"data/detection-rules/4096a49c-7de4-4da0-a230-c66ccd56ea5a.json","kind":"sigma"}
