/
win_sqlps_download.yml
34 lines (34 loc) · 1.38 KB
/
win_sqlps_download.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
title: SQLPS PowerShell Download and Execution
status: experimental
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, to Download files or spawn a child process of powershell.exe using 'IEX'. Script blocks are not logged in this case, so this utility helps to bypass protection mechanisms based on the analysis of these logs.
references:
- https://docs.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
- https://www.bleepingcomputer.com/news/security/microsoft-warns-of-brute-force-attacks-targeting-mssql-servers/
-
tags:
- attack.execution
- attack.t1059.001
- attack.defense_evasion
- attack.t1127
- attack.t1218
author: Matt Anderson ('@nosecurething')
date: 2022-07-11
logsource:
category: process_creation
product: windows
detection:
selection1:
Image|endswith: 'sqlps.exe'
selection2:
OriginalFileName|endswith: 'sqlps.exe'
selection3:
CommandLine|contains|all:
- 'DownloadString'
- 'IEX'
filter:
ParentImage|endswith: 'sqlagent.exe'
condition: (selection1 or selection2) and selection3 and not filter
falsepositives:
- unknown