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

New rules: RSA & bigint #982

Merged
merged 2 commits into from
Jan 21, 2025
Merged

New rules: RSA & bigint #982

merged 2 commits into from
Jan 21, 2025

Conversation

Ana06
Copy link
Member

@Ana06 Ana06 commented Jan 20, 2025

We need to add 009c2377b67997b0da1579f4bbc822c1 to the test files: mandiant/capa-testfiles#273

Closes #962 :bowtie:

Copy link
Collaborator

@mike-hunhoff mike-hunhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @Ana06 , thank you! I've left a few minor comments for your review. I've also merged mandiant/capa-testfiles#273.

data-manipulation/encryption/use-bigint-function.yml Outdated Show resolved Hide resolved
data-manipulation/encryption/use-bigint-function.yml Outdated Show resolved Hide resolved
data-manipulation/encryption/rsa/rsa-encrypt.yml Outdated Show resolved Hide resolved
data-manipulation/encryption/rsa/rsa-encrypt.yml Outdated Show resolved Hide resolved
data-manipulation/encryption/rsa/rsa-encrypt.yml Outdated Show resolved Hide resolved
Ana06 added 2 commits January 21, 2025 19:07
Add new `data-manipulation/encryption/use-bigint-function.yml` rule to
identify bigint functions as these functions may help reverse engineers
identifying crypto. Example of bigint functions identified by this rule:
- `bi_copi`
- `bi_permanent`
- `bi_depermant`
- `bi_free`

Reference:
- https://github.com/ezhangle/krypton/blob/147d69429bfb03cce7113dca6dba36e77f8a9325/src/bigint.c
- https://github.com/bnoordhuis/mongrel2/blob/3e9b57d82aeb627be0aebfb346199bfdfd67e530/src/crypto/bigint.c
Add new rule `data-manipulation/encryption/rsa/rsa-encrypt.yml` that
identifies the RSA encryption implementation from:
- https://github.com/ezhangle/krypton/blob/147d69429bfb03cce7113dca6dba36e77f8a9325/src/rsa.c#L232
- https://github.com/bnoordhuis/mongrel2/blob/3e9b57d82aeb627be0aebfb346199bfdfd67e530/src/crypto/rsa.c#L233

Rename current RSA encryption/decryption rules in the nursery to add
`via WinAPI` to prevent name conflict.
Copy link
Collaborator

@mike-hunhoff mike-hunhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@mike-hunhoff mike-hunhoff merged commit 7085102 into mandiant:master Jan 21, 2025
3 checks passed
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.

RSA & bigint
2 participants