Skip to content

Instantly share code, notes, and snippets.

@shortstack
Created February 9, 2023 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shortstack/185de7071cc29a0907f96f51cacf7c32 to your computer and use it in GitHub Desktop.
Save shortstack/185de7071cc29a0907f96f51cacf7c32 to your computer and use it in GitHub Desktop.
Deploy Sysmon With A LimaCharlie D&R Rule
deploy_sysmon:
detect:
event: OS_SERVICES_REP
op: and
rules:
- op: is platform
name: windows
- op: contains
not: true
case sensitive: false
path: event/SVCS/?/SVC_NAME
value: sysmon
respond:
- action: task
command: put --payload-name sysmon.exe --payload-path "C:\Windows\Temp\sysmon.exe"
- action: wait
duration: 10s
- action: task
command: >-
put --payload-name sysmonconfig.xml --payload-path
"C:\Windows\Temp\sysmon.xml"
- action: wait
duration: 10s
- action: task
command: >-
run --shell-command "C:\Windows\Temp\sysmon.exe -accepteula -i
C:\Windows\Temp\sysmon.xml"
- action: wait
duration: 10s
- action: task
command: file_del "C:\Windows\Temp\sysmon.exe"
- action: task
command: file_del "C:\Windows\Temp\sysmon.xml"
is_enabled: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment