elastic / detection-rules

https://www.elastic.co/guide/en/security/current/detection-engine-overview.html
Other
1.92k stars 492 forks source link

Fix Windows File Path for RTA schtask_escalation #3981

Closed shashank-elastic closed 1 month ago

shashank-elastic commented 1 month ago

Pull Request

Issue link(s): Reported in Community Slack

image

Summary - What I changed

How To Test

(venv) PS C:\Users\shashank_suryanaraya\detection-rules> python -m rta -n schtask_escalation
[+] Scheduled Task Privilege Escalation
shashank_suryanaraya @ e2e-release-windows-server-2022 > schtasks.exe /query /tn test-task-rta
ERROR: The system cannot find the file specified.
exit code = 1

shashank_suryanaraya @ e2e-release-windows-server-2022 > schtasks.exe /create /tn test-task-rta /ru system /tr "cmd.exe /c whoami.exe > task.log" /sc onlogon
SUCCESS: The scheduled task "test-task-rta" has successfully been created.

shashank_suryanaraya @ e2e-release-windows-server-2022 > schtasks.exe /run /tn test-task-rta
SUCCESS: Attempted to run the scheduled task "test-task-rta".

task.log
--- NOT FOUND ----

shashank_suryanaraya @ e2e-release-windows-server-2022 > schtasks.exe /delete /tn test-task-rta /f
SUCCESS: The scheduled task "test-task-rta" was successfully deleted.

(venv) PS C:\Users\shashank_suryanaraya\detection-rules>

Checklist

Contributor checklist

protectionsmachine commented 1 month ago

Bug - Guidelines

These guidelines serve as a reminder set of considerations when addressing a bug in the code.

Documentation and Context

Code Standards and Practices

Testing

Additional Checks