项目作者: 0daysimpson

项目描述 :
A PowerShell client for retrieving and searching Sysmon logs
高级语言: PowerShell
项目地址: git://github.com/0daysimpson/Get-SysmonLogs.git
创建时间: 2019-06-25T03:28:54Z
项目社区:https://github.com/0daysimpson/Get-SysmonLogs

开源协议:MIT License

下载


Overview

  1. NAME
  2. Get-SysMonLogs
  3. DESCRIPTION
  4. A PowerShell client for retrieving and searching Sysmon logs.
  5. SYNTAX
  6. Get-SysMonLogs [[-ComputerName] <Object>] [[-Count] <Object>] [[-FilePath] <Object>] [[-Search] <array>]
  7. [[-Since] <datetime>] [[-Until] <datetime>] [-File] [-Network] [-Process] [-DNS] [-all]
  8. [-GetOldest] [<CommonParameters>]

Features

  • Serializes Sysmon logs into Powershell objects
  • Supports remote log retrieval
  • Extensible

Installation

  1. Install Sysmon - https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon
  2. Configure monitoring rules
  3. Import function into profile.ps1

Usage

Example 1 - All process events

PS C:\> Get-SysmonLogs -Process

  1. Name : Process terminated
  2. Process terminated :
  3. RuleName :
  4. UtcTime : 2019-06-25 04:00:18.308
  5. ProcessGuid : {1ec4209f-9c51-5d11-0000-00108b2d8105}
  6. ProcessId : 11464
  7. Image : C:\Windows\System32\conhost.exe
  8. Name : Process terminated
  9. Process terminated :
  10. RuleName :
  11. UtcTime : 2019-06-25 04:00:18.302
  12. ProcessGuid : {1ec4209f-9c51-5d11-0000-0010822c8105}
  13. ProcessId : 21896
  14. Image : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  15. Name : Process Create
  16. Process Create :
  17. RuleName :
  18. UtcTime : 2019-06-25 04:00:17.406
  19. ProcessGuid : {1ec4209f-9c51-5d11-0000-00108b2d8105}
  20. ProcessId : 11464
  21. Image : C:\Windows\System32\conhost.exe
  22. FileVersion : 10.0.17763.404 (WinBuild.160101.0800)
  23. Description : Console Window Host
  24. Product : Microsoft® Windows® Operating System
  25. .... snipped ...
  26. ParentImage : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  27. ParentCommandLine : powershell.exe -command "& ...

Example 2 - All DNS requests

PS C:\> Get-SysmonLogs -DNS

  1. Name : Dns query
  2. Dns query :
  3. RuleName :
  4. UtcTime : 2019-06-25 03:28:56.281
  5. ProcessGuid : {1ec4209f-3533-5d10-0000-001082bcf800}
  6. ProcessId : 9484
  7. QueryName : github-cloud.s3.amazonaws.com
  8. QueryStatus : 0
  9. QueryResults : type: 5 s3-1-w.amazonaws.com;52.216.9.235;
  10. Image : C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

Sysmon Event Table

  1. ID Tag Event
  2. 1 ProcessCreate Process Create
  3. 2 FileCreateTime File creation time
  4. 3 NetworkConnect Network connection detected
  5. 4 n/a Sysmon service state change (cannot be filtered)
  6. 5 ProcessTerminate Process terminated
  7. 6 DriverLoad Driver Loaded
  8. 7 ImageLoad Image loaded
  9. 8 CreateRemoteThread CreateRemoteThread detected
  10. 9 RawAccessRead RawAccessRead detected
  11. 10 ProcessAccess Process accessed
  12. 11 FileCreate File created
  13. 12 RegistryEvent Registry object added or deleted
  14. 13 RegistryEvent Registry value set
  15. 14 RegistryEvent Registry object renamed
  16. 15 FileCreateStreamHash File stream created
  17. 16 n/a Sysmon configuration change (cannot be filtered)
  18. 17 PipeEvent Named pipe created
  19. 18 PipeEvent Named pipe connected
  20. 19 WmiEvent WMI filter
  21. 20 WmiEvent WMI consumer
  22. 21 WmiEvent WMI consumer filter
  23. 22 DNSQuery DNS query