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

vmray: escape characters #2428

Closed
mr-tz opened this issue Oct 2, 2024 · 6 comments · Fixed by #2433
Closed

vmray: escape characters #2428

mr-tz opened this issue Oct 2, 2024 · 6 comments · Fixed by #2433
Assignees
Labels
bug Something isn't working vmray related to VMRay sandbox report analysis
Milestone

Comments

@mr-tz
Copy link
Collaborator

mr-tz commented Oct 2, 2024

raw:

<deref type="str" value="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RecentDocs"/>

parsed feature currently:

call 354: RegOpenKeyExA(SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RecentDocs, 0, 131097)

should unescape the \\ and other similar items

@mr-tz mr-tz added bug Something isn't working vmray related to VMRay sandbox report analysis labels Oct 2, 2024
@mr-tz mr-tz closed this as completed Oct 2, 2024
@mr-tz mr-tz reopened this Oct 2, 2024
@mr-tz
Copy link
Collaborator Author

mr-tz commented Oct 2, 2024

Matt confirmed that it doesn't work. Still need to find where it's going wrong.

@mwilliams31 mwilliams31 self-assigned this Oct 2, 2024
@mr-tz
Copy link
Collaborator Author

mr-tz commented Oct 2, 2024

I think this may be where we need to improve String feature extraction:

yield String(param.deref.value), ch.address

@mike-hunhoff
Copy link
Collaborator

Yes, appears to be a bug in the string extraction. Updating the rule to use /SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\RecentDocs/i works. I'll push a fix.

@mike-hunhoff mike-hunhoff added this to the v7.4 milestone Oct 2, 2024
@mr-tz
Copy link
Collaborator Author

mr-tz commented Oct 2, 2024

raw summary JSON vs. XML

❯ grep "SOFTWARE" -C2 7244847/logs/summary_v2.json                                                                                                                                                                                           
      ],
      "original_reg_key_names": [
        "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RecentDocs"
      ],
      "reg_key_name": "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RecentDocs",
      "verdict": "clean",
      "ref_gfncalls": [

❯ grep "SOFTWARE" -C2 7244847/logs/flog.xml                                                                                                                                                                                                  
		<param name="hKey" type="void_ptr" value="0xffffffff80000001"/>
		<param name="lpSubKey" type="ptr" value="0x5b490ff544">
			<deref type="str" value="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RecentDocs"/>
		</param>
		<param name="ulOptions" type="unsigned_32bit" value="0x0"/>

@mike-hunhoff mike-hunhoff mentioned this issue Oct 2, 2024
19 tasks
@mr-tz
Copy link
Collaborator Author

mr-tz commented Oct 2, 2024

I think this may be where we need to improve String feature extraction:

yield String(param.deref.value), ch.address

adding param.deref.value.replace("\\\\", "\\") does the trick here for me

@mr-tz mr-tz self-assigned this Oct 2, 2024
@mwilliams31 mwilliams31 removed their assignment Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vmray related to VMRay sandbox report analysis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants