This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
PowerShell Script with Encryption/Decryption Capabilities
editPowerShell Script with Encryption/Decryption Capabilities
editIdentifies the use of Cmdlets and methods related to encryption/decryption of files in PowerShell scripts, which malware and offensive security tools can abuse to encrypt data or decrypt payloads to bypass security solutions.
Rule type: query
Rule indices:
- winlogbeat-*
- logs-windows.*
Severity: medium
Risk score: 47
Runs every: 5m
Searches indices from: now-9m (Date Math format, see also Additional look-back time
)
Maximum alerts per execution: 100
References: None
Tags:
- Elastic
- Host
- Windows
- Threat Detection
- Defense Evasion
- PowerShell
Version: 1
Rule authors:
- Elastic
Rule license: Elastic License v2
Rule query
editevent.category:process and powershell.file.script_block_text : ( ( "Cryptography.AESManaged" or "Cryptography.RijndaelManaged" or "Cryptography.SHA1Managed" or "Cryptography.SHA256Managed" or "Cryptography.SHA384Managed" or "Cryptography.SHA512Managed" or "Cryptography.SymmetricAlgorithm" or "PasswordDeriveBytes" or "Rfc2898DeriveBytes" ) and ( CipherMode and PaddingMode ) and ( ".CreateEncryptor" or ".CreateDecryptor" ) ) and not user.id : "S-1-5-18"
Framework: MITRE ATT&CKTM
-
Tactic:
- Name: Defense Evasion
- ID: TA0005
- Reference URL: https://attack.mitre.org/tactics/TA0005/
-
Technique:
- Name: Deobfuscate/Decode Files or Information
- ID: T1140
- Reference URL: https://attack.mitre.org/techniques/T1140/
-
Technique:
- Name: Obfuscated Files or Information
- ID: T1027
- Reference URL: https://attack.mitre.org/techniques/T1027/