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

AES MixColumns detection #749

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# generated using capa explorer for IDA Pro
Copy link
Collaborator

Choose a reason for hiding this comment

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

❤️

rule:
meta:
name: encrypt data using AES MixColumns step
namespace: data-manipulation/encryption/aes
authors:
- "@mr-tz"
scope: function
att&ck:
- Defense Evasion::Obfuscated Files or Information [T1027]
mbc:
- Defense Evasion::Obfuscated Files or Information::Encryption-Standard Algorithm [E1027.m05]
- Cryptography::Encrypt Data::AES [C0027.001]
references:
- https://en.wikipedia.org/wiki/Rijndael_MixColumns
examples:
- 1e9fc7f32bd5522dd0222932eb9f1d8bd0a2e132c7b46cfcc622ad97831e6128:0x40e3de
features:
- and:
# for (c = 0; c < 4; c++)
- characteristic: loop
- instruction:
- and:
- mnemonic: cmp
- operand[1].number: 0x4
# b[c] = r[c] << 1;
- instruction:
- and:
- description: implicitly removes high bit
- mnemonic: shl
- operand[1].number: 0x1
# b[c] ^= h * 0x1B;
- instruction:
- and:
- description: Rijndael's Galois field
- mnemonic: xor
- operand[1].number: 0x1B
- optional:
- instruction:
- and:
- description: b[c] = ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we be a little more descriptive here? I think I understand the intent but I had to think about it for a second 😅

mr-tz marked this conversation as resolved.
Show resolved Hide resolved
- mnemonic: mov
- operand[0].offset: 0x0