Invocation Of Crypto-Classes From The Cryptography PowerShell Namespace

Last updated on:

Applies to: Log360Log360 Cloud

About the rule

Rule Type

Standard

Rule Description

Detects the invocation of PowerShell commands with references to classes from the System.Security.Cryptography namespace. The PowerShell namespace System.Security.Cryptography provides classes for on-the-fly encryption and decryption. These can be used for example in decrypting malicious payload for defense evasion.

Severity

Trouble

Rule Requirement

Criteria

Action1: actionname = "Process started" AND (PROCESSNAME endswith "\powershell.exe,\pwsh.exe" OR ORIGINALFILENAME = "PowerShell.EXE,pwsh.dll") AND COMMANDLINE contains "System.Security.Cryptography." AND COMMANDLINE contains ".AesCryptoServiceProvider,.DESCryptoServiceProvider,.DSACryptoServiceProvider,.RC2CryptoServiceProvider,.Rijndael,.RSACryptoServiceProvider,.TripleDESCryptoServiceProvider" select Action1.HOSTNAME,Action1.MESSAGE,Action1.COMMANDLINE,Action1.FILE_NAME,Action1.PROCESSNAME,Action1.USERNAME,Action1.PARENTPROCESSNAME,Action1.DOMAIN,Action1.ORIGINALFILENAME,Action1.PARENTPROCESSID,Action1.PROCESSID,Action1.PRODUCT_NAME,Action1.SECURITYID

Detection

Execution Mode

realtime

Log Sources

Windows