File Decoded From Base64/Hex Via Certutil.EXE

Detects the execution of certutil with either the "decode" or "decodehex" flags to decode base64 or hex encoded files. This can be abused by attackers to decode an encoded payload before execution

Sigma rule (View on GitHub)

 1title: File Decoded From Base64/Hex Via Certutil.EXE
 2id: cc9cbe82-7bc0-4ef5-bc23-bbfb83947be7
 3status: test
 4description: Detects the execution of certutil with either the "decode" or "decodehex" flags to decode base64 or hex encoded files. This can be abused by attackers to decode an encoded payload before execution
 5references:
 6    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil
 7    - https://unit42.paloaltonetworks.com/new-babyshark-malware-targets-u-s-national-security-think-tanks/
 8    - https://news.sophos.com/en-us/2021/04/13/compromised-exchange-server-hosting-cryptojacker-targeting-other-exchange-servers/
 9    - https://twitter.com/JohnLaTwC/status/835149808817991680
10    - https://learn.microsoft.com/en-us/archive/blogs/pki/basic-crl-checking-with-certutil
11    - https://lolbas-project.github.io/lolbas/Binaries/Certutil/
12author: Florian Roth (Nextron Systems), Jonhnathan Ribeiro, oscd.community
13date: 2023-02-15
14modified: 2024-03-05
15tags:
16    - attack.defense-evasion
17    - attack.t1027
18logsource:
19    category: process_creation
20    product: windows
21detection:
22    selection_img:
23        - Image|endswith: '\certutil.exe'
24        - OriginalFileName: 'CertUtil.exe'
25    selection_cli:
26        CommandLine|contains|windash:
27            - '-decode ' # Decode Base64
28            - '-decodehex ' # Decode Hex
29    condition: all of selection_*
30falsepositives:
31    - Unknown
32level: medium

References

Related rules

to-top