Advertisement
jessemoore

InstallSysmon-Mod

Feb 8th, 2022
1,456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # 10-02-2021 DFIR-Jesseee
  2. # For CyberForce 2021
  3. # Reference https://textkool.com/en/ascii-art-generator?hl=default&vl=default&font=Red%20Phoenix&text=Install%20Sysmon
  4. #
  5. #
  6. $ASCII = @"
  7. .___                   __           .__   .__         _________                                        
  8. |   |  ____    _______/  |_ _____   |  |  |  |       /   _____/___.__.  ______  _____    ____    ____  
  9. |   | /    \  /  ___/\   __\\__  \  |  |  |  |       \_____  \<   |  | /  ___/ /     \  /  _ \  /    \  
  10. |   ||   |  \ \___ \  |  |   / __ \_|  |__|  |__     /        \\___  | \___ \ |  Y Y  \(  <_> )|   |  \
  11. |___||___|  //____  > |__|  (____  /|____/|____/    /_______  // ____|/____  >|__|_|  / \____/ |___|  /
  12.          \/      \/             \/                         \/ \/          \/       \/              \/  
  13.                                                                                                        By DFIR-Jesseee
  14. "@
  15. #
  16. #
  17. $ASCII
  18. #Iif you can't get the script to run do the Bypasss below
  19. Set-ExecutionPolicy -Scope CurrentUser Bypass -Force
  20. #
  21. Invoke-WebRequest https://github.com/olafhartong/sysmon-modular/archive/refs/heads/master.zip -OutFile "$env:tmp/Sysmon-Mod.zip" -ErrorAction SilentlyContinue
  22. Expand-Archive -LiteralPath $env:tmp\Sysmon-Mod.zip -DestinationPath $env:tmp -ErrorAction SilentlyContinue
  23. cd $env:tmp/sysmon-modular-master
  24. Invoke-WebRequest https://live.sysinternals.com/Sysmon64.exe -OutFile "$env:tmp/sysmon-modular-master/sysmon.exe" -ErrorAction SilentlyContinue
  25. . .\Merge-SysmonXml.ps1
  26. Merge-AllSysmonXml -Path ( Get-ChildItem '[0-9]*\*.xml') -AsString | Out-File sysmonconfig.xml
  27. ./sysmon.exe -accepteula -i sysmonconfig.xml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement