| Title | Default PowerSploit Schtasks Persistence | |:---------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------| | Description | Detects the creation of a schtask via PowerSploit Default Configuration | | ATT&CK Tactic | | | ATT&CK Technique | | | Data Needed | | | Trigger | | | Severity Level | high | | False Positives | | | Development Status | experimental | | References | | | Author | Markus Neis | | Other Tags | | ## Detection Rules ### Sigma rule ``` title: Default PowerSploit Schtasks Persistence status: experimental description: Detects the creation of a schtask via PowerSploit Default Configuration references: - https://github.com/0xdeadbeefJERKY/PowerSploit/blob/8690399ef70d2cad10213575ac67e8fa90ddf7c3/Persistence/Persistence.psm1 author: Markus Neis date: 2018/03/06 logsource: product: windows service: sysmon detection: selection: ParentImage: - '*\Powershell.exe' CommandLine: - '*\schtasks.exe*/Create*/RU*system*/SC*ONLOGON*' - '*\schtasks.exe*/Create*/RU*system*/SC*DAILY*' - '*\schtasks.exe*/Create*/RU*system*/SC*ONIDLE*' - '*\schtasks.exe*/Create*/RU*system*/SC*HOURLY*' condition: selection tags: - attack.execution - attack.persistence - attack.privelege_escalation - attack.t1053 - attack.t1086 - attack.s0111 - attack.g0022 - attack.g0060 falsepositives: - False positives are possible, depends on organisation and processes level: high ``` ### Kibana query ``` (ParentImage.keyword:(*\\\\Powershell.exe) AND CommandLine.keyword:(*\\\\schtasks.exe*\\/Create*\\/RU*system*\\/SC*ONLOGON* *\\\\schtasks.exe*\\/Create*\\/RU*system*\\/SC*DAILY* *\\\\schtasks.exe*\\/Create*\\/RU*system*\\/SC*ONIDLE* *\\\\schtasks.exe*\\/Create*\\/RU*system*\\/SC*HOURLY*)) ``` ### X-Pack Watcher ``` curl -s -XPUT -H \'Content-Type: application/json\' --data-binary @- localhost:9200/_xpack/watcher/watch/Default-PowerSploit-Schtasks-Persistence <