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

improve TCP/UDP socket creation matching #964 #993

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dhruvak001
Copy link
Contributor

@dhruvak001 dhruvak001 commented Feb 4, 2025

Fixes #964

I have also added number: 17 = IPPROTO_UDP , can make the rule more precise by explicitly matching cases where the UDP protocol is specified. (but not needed specifically)

[x] No CHANGELOG update needed
[x] No new tests needed
[x] No documentation update needed

@dhruvak001
Copy link
Contributor Author

@williballenthin can you please review it, the example given initially in the code is said to be not existing.

@mike-hunhoff
Copy link
Collaborator

mike-hunhoff commented Feb 21, 2025

@dhruvak001 your updates to the rule create udp socket are causing the rule to no longer match for the test sample 203BD48BCC18434314AD60F4C8BC21E3D3422EB0624B22B827410F9BC63B4082:0x401240. You'll need to review the referenced function 0x401240 in a disassembly tool (Ghidra/IDA/etc.) to determine why the changes are not matching as expected. The referenced sample 203BD48BCC18434314AD60F4C8BC21E3D3422EB0624B22B827410F9BC63B4082 can be found at https://github.com/mandiant/capa-testfiles.

You can also use https://github.com/mandiant/capa/blob/master/scripts/show-features.py to view the features that capa extracts for the referenced function to debug the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve TCP/UDP socket creation matching
2 participants