Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON fields get moved over (Refactor JSON output) #1145

Closed
YamatoSecurity opened this issue Jul 28, 2023 · 0 comments · Fixed by #1146
Closed

JSON fields get moved over (Refactor JSON output) #1145

YamatoSecurity opened this issue Jul 28, 2023 · 0 comments · Fixed by #1146
Assignees
Labels
bug Something isn't working
Milestone

Comments

@YamatoSecurity
Copy link
Collaborator

The following strings in CommandLine fields cause fields to move over in JSON output.
For example:
CommandLine: "C:\Windows\System32\WUDFHost.exe" -HostGUID:{193a1820-d9ac-4997-8c55-be817523f6aa} -IoEventPortName:\UMDFCommunicationPorts\WUDF\HostProcess-5a100a46-6754-48bf-98b6-dfb4c811c821 -SystemEventPortName:\UMDFCommunicationPorts\WUDF\HostProcess-b38dbe39-ce8b-4a71-8054-d0accc0482d4 -IoCancelEventPortName:\UMDFCommunicationPorts\WUDF\HostProcess-61321756-2096-4402-9b44-c68086290bbe -NonStateChangingEventPortName:\UMDFCommunicationPorts\WUDF\HostProcess-e0d636ca-60f5-4943-b7be-84693e092f71 -LifetimeId:ef873069-e8fe-4ac0-9ef4-6ab5ebfed851 -DeviceGroupId:-HostArg:0

becomes the following:

{
  "Timestamp": "2022-06-07 14:52:30.489 +00:00",
  "Computer": "WN5IELM6OTU.swutrust.local",
  "Channel": "Sec",
  "EventID": 4688,
  "Level": "info",
  "RecordID": 58393,
  "RuleTitle": "Proc Exec",
  "Details": {
    "Cmdline": "\"C:\\Windows\\System32\\WUDFHost.exe\" -HostGUID:{193a1820-d9ac-4997-8c55-be817523f6aa} -IoEventPortName:\\UMDFCommunicationPorts\\WUDF\\HostProcess-5a100a46-6754-48bf-98b6-dfb4c811c821 -SystemEventPortName:\\UMDFCommunicationPorts\\WUDF\\HostProcess-b38dbe39-ce8b-4a71-8054-d0accc0482d4 -IoCancelEventPortName:\\UMDFCommunicationPorts\\WUDF\\HostProcess-61321756-2096-4402-9b44-c68086290bbe -NonStateChangingEventPortName:\\UMDFCommunicationPorts\\WUDF\\HostProcess-e0d636ca-60f5-4943-b7be-84693e092f71 -LifetimeId:ef873069-e8fe-4ac0-9ef4-6ab5ebfed851 | -HostArg:0\"",
    "-DeviceGroupId": "C:\\Windows\\System32\\WUDFHost.exe",
    "Proc": "0x4d8",
    "PID": "WN5IELM6OTU$",
    "User": "0x3e7"
  }
}

Another example: CommandLine: powershell.exe -ExecutionPolicy Restricted -Command Write-Host 'Final result:1';

becomes this in JSON:

  "Details": {
    "Cmdline": "powershell.exe -ExecutionPolicy Restricted -Command Write-Host 'Final | 1';",
    "result": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
    "Proc": "0x1c58",
    "PID": "WN5IELM6OTU$",
    "User": "0x3e7"
  }

@hitenkoku Is this difficult to fix? If this will take time, maybe we can ask @fukusuket to take a look at it?
(I can send an evtx file to test by DM.)

@YamatoSecurity YamatoSecurity added the bug Something isn't working label Jul 28, 2023
@hitenkoku hitenkoku self-assigned this Jul 28, 2023
@hitenkoku hitenkoku added this to the v2.8.0 milestone Jul 28, 2023
hitenkoku added a commit that referenced this issue Jul 29, 2023
@hitenkoku hitenkoku linked a pull request Jul 29, 2023 that will close this issue
hitenkoku added a commit that referenced this issue Aug 3, 2023
hitenkoku added a commit that referenced this issue Aug 3, 2023
@hitenkoku hitenkoku modified the milestones: v2.8.0, v2.9.0 Aug 31, 2023
@YamatoSecurity YamatoSecurity changed the title JSON fields get moved over JSON fields get moved over (Refactor JSON output) Aug 31, 2023
hitenkoku added a commit that referenced this issue Sep 2, 2023
hitenkoku added a commit that referenced this issue Sep 2, 2023
…t value of details, allfieldinfo, extrafieldinfo #1145"

This reverts commit 364b544.
hitenkoku added a commit that referenced this issue Sep 13, 2023
style: cargo fmt

WIP:

fix(afterfact/detection/message): fixed misprocessing of details field in JSON output #1145
hitenkoku added a commit that referenced this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants