{"id":"0152550d-3a26-4efd-9f0e-54a0b28ae2f3","title":"Detection of PowerShell Execution via Sqlps.exe","description":"This rule detects execution of a PowerShell code through the sqlps.exe utility, which is included in the standard set of utilities supplied with the MSSQL Server.\nScript blocks are not logged in this case, so this utility helps to bypass protection mechanisms based on the analysis of these logs.\n","author":"Agro (@agro_sev) oscd.community","status":"test","level":"medium","date":"2020-10-10","modified":"2022-12-09","tags":["attack.execution","attack.stealth","attack.t1059.001","attack.t1127"],"technique_ids":["T1059.001","T1127"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Direct PS command execution through SQLPS.exe is uncommon, childprocess sqlps.exe spawned by sqlagent.exe is a legitimate action."],"references":["https://learn.microsoft.com/en-us/sql/tools/sqlps-utility?view=sql-server-ver15","https://lolbas-project.github.io/lolbas/OtherMSBinaries/Sqlps/","https://twitter.com/bryon_/status/975835709587075072"],"source_path":"rules/windows/process_creation/proc_creation_win_mssql_sqlps_susp_execution.yml","source_sha256":"9ae46d519eda615dd3e3390274af8612a0adc9b80c683957683d00bac709bbd5","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_mssql_sqlps_susp_execution.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Detection of PowerShell Execution via Sqlps.exe\nid: 0152550d-3a26-4efd-9f0e-54a0b28ae2f3\nstatus: test\ndescription: |\n  This rule detects execution of a PowerShell code through the sqlps.exe utility, which is included in the standard set of utilities supplied with the MSSQL Server.\n  Script blocks are not logged in this case, so this utility helps to bypass protection mechanisms based on the analysis of these logs.\nreferences:\n    - https://learn.microsoft.com/en-us/sql/tools/sqlps-utility?view=sql-server-ver15\n    - https://lolbas-project.github.io/lolbas/OtherMSBinaries/Sqlps/\n    - https://twitter.com/bryon_/status/975835709587075072\nauthor: 'Agro (@agro_sev) oscd.community'\ndate: 2020-10-10\nmodified: 2022-12-09\ntags:\n    - attack.execution\n    - attack.stealth\n    - attack.t1059.001\n    - attack.t1127\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_parent:\n        ParentImage|endswith: '\\sqlps.exe'\n    selection_image:\n        - Image|endswith: '\\sqlps.exe'\n        - OriginalFileName: 'sqlps.exe'\n    filter_image:\n        ParentImage|endswith: '\\sqlagent.exe'\n    condition: selection_parent or (selection_image and not filter_image)\nfalsepositives:\n    - Direct PS command execution through SQLPS.exe is uncommon, childprocess sqlps.exe spawned by sqlagent.exe is a legitimate action.\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1059.001","id":"T1059.001","name":"PowerShell","page":"techniques/enterprise/T1059.001/"},{"key":"enterprise/T1127","id":"T1127","name":"Trusted Developer Utilities Proxy Execution","page":"techniques/enterprise/T1127/"}],"data_path":"data/detection-rules/0152550d-3a26-4efd-9f0e-54a0b28ae2f3.json","kind":"sigma"}
