action: global
title: Defrag Deactivation
author: Florian Roth, Bartlomiej Czyz (@bczyz1)
date: 2019/03/04
modified: 2020/11/05
description: Detects the deactivation and disabling of the Scheduled defragmentation task as seen by Slingshot APT group
references:
    - https://securelist.com/apt-slingshot/84312/
tags:
    - attack.persistence
    - attack.s0111
detection:
    condition: all of them
falsepositives:
    - Unknown
level: medium
---
id: 958d81aa-8566-4cea-a565-59ccd4df27b0
logsource:
    category: process_creation
    product: windows
detection:
    selection1:
        Image|endswith: '\schtasks.exe'
        CommandLine|contains:
            - '/delete'
            - '/change'
        CommandLine|contains|all:
            - '/TN'
            - '\Microsoft\Windows\Defrag\ScheduledDefrag'
---
id: c5a178bf-9cfb-4340-b584-e4df39b6a3e7
logsource:
    product: windows
    service: security
    definition: 'Requirements: Audit Policy : Audit Other Object Access Events > Success'
detection:
    selection3:
        EventID: 4701
        TaskName: '\Microsoft\Windows\Defrag\ScheduledDefrag'
