-
Notifications
You must be signed in to change notification settings - Fork 527
Description
Integration Name
Windows [windows]
Dataset Name
Powershell
Integration Version
3.3.0
Agent Version
9.2.4
OS Version and Architecture
Windows any version
User Goal
Current documentation for AI generated Suspicious Powershell Script mentions it detects PowerShell script with unusual data characteristics, such as obfuscation
However the rule appears to use ML job high_info_content("powershell.file.script_block_text") that per doc looks at detecting anomaly related to the size of scripts
Existing Features
There are other rules such as https://www.elastic.co/guide/en/security/8.19/potential-powershell-obfuscated-script.html which do detect obfuscated script
The documentation https://www.elastic.co/guide/en/security/8.19/suspicious-powershell-script.html appears misleading
What did you see?
To correct the documentation potential changes from current packages/security_detection_engine/kibana/security_rule/1781d055-5c66-4adf-9d60-fc0fa58337b6_210.json could be :
- "description": "A machine learning job detected a PowerShell script with unusual data characteristics, such as obfuscation, that may be a characteristic of malicious PowerShell script text blocks.",
+ "description": "A machine learning job detected a PowerShell script with unusually high information content, which may indicate a large, complex, or potentially obfuscated script that could be characteristic of malicious PowerShell activity.",
And :
- "note": "## Triage and analysis\n\n> **Disclaimer**:\n> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.\n\n### Investigating Suspicious Powershell Script\n\nPowerShell is a powerful scripting language used for task automation and configuration management in Windows environments. Adversaries often exploit its capabilities to execute malicious scripts, leveraging obfuscation to evade detection. The 'Suspicious Powershell Script' detection rule employs machine learning to identify unusual script characteristics, such as obfuscation, indicating potential threats. By analyzing these anomalies, the rule aids in early threat detection and mitigation.\n\n### Possible investigation steps\n\n- Review the alert details to identify the specific PowerShell script or command that triggered the detection, focusing on any obfuscated elements.\n- Examine the source endpoint and user account associated with the alert to determine if the activity aligns with expected behavior or if it appears suspicious.\n- Check the execution history on the affected endpoint for any other unusual or unauthorized PowerShell commands or scripts executed around the same time.\n- Investigate the network activity from the source endpoint to identify any connections to known malicious IP addresses or domains.\n- Correlate the alert with other security events or logs, such as antivirus alerts or firewall logs, to gather additional context and assess the potential impact.\n- Consult threat intelligence sources to determine if the detected script or its components are associated with known malware or attack campaigns.\n\n### False positive analysis\n\n- Legitimate administrative scripts may trigger the rule due to obfuscation techniques used for efficiency or security. Review the script's purpose and source to determine its legitimacy.\n- Automated deployment tools often use PowerShell scripts that appear obfuscated. Identify and whitelist these tools to prevent unnecessary alerts.\n- Security software updates might use obfuscated scripts for protection against tampering. Verify the update source and add exceptions for known trusted vendors.\n- Custom scripts developed in-house for specific tasks may use obfuscation for intellectual property protection. Document and exclude these scripts after confirming their safety.\n- Regularly review and update the list of exceptions to ensure that only verified non-threatening scripts are excluded, maintaining the effectiveness of the detection rule.\n\n### Response and remediation\n\n- Isolate the affected system from the network to prevent further spread of the potential threat and to contain any malicious activity.\n- Terminate any suspicious PowerShell processes identified on the affected system to halt the execution of potentially harmful scripts.\n- Conduct a thorough review of the PowerShell script logs and execution history on the affected system to identify any unauthorized or malicious commands executed.\n- Restore the affected system from a known good backup if any malicious activity is confirmed, ensuring that the backup is free from compromise.\n- Update and patch the affected system to the latest security standards to close any vulnerabilities that may have been exploited.\n- Implement enhanced monitoring for PowerShell activity across the network, focusing on detecting obfuscation and unusual script characteristics.\n- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.",
+ "note": "## Triage and analysis\n\n> **Disclaimer**:\n> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.\n\n### Investigating Suspicious Powershell Script\n\nPowerShell is a powerful scripting language used for task automation and configuration management in Windows environments. Adversaries often exploit its capabilities to execute malicious scripts. The 'Suspicious Powershell Script' detection rule employs machine learning to identify scripts with unusually high information content, which may indicate large, complex, or potentially malicious PowerShell activity. By analyzing these anomalies, the rule aids in early threat detection and mitigation.\n\n### Possible investigation steps\n\n- Review the alert details to identify the specific PowerShell script or command that triggered the detection, paying attention to the script's size and complexity.\n- Examine the source endpoint and user account associated with the alert to determine if the activity aligns with expected behavior or if it appears suspicious.\n- Check the execution history on the affected endpoint for any other unusual or unauthorized PowerShell commands or scripts executed around the same time.\n- Investigate the network activity from the source endpoint to identify any connections to known malicious IP addresses or domains.\n- Correlate the alert with other security events or logs, such as antivirus alerts or firewall logs, to gather additional context and assess the potential impact.\n- Consult threat intelligence sources to determine if the detected script or its components are associated with known malware or attack campaigns.\n\n### False positive analysis\n\n- Legitimate administrative scripts may trigger the rule if they are unusually large or complex. Review the script's purpose and source to determine its legitimacy.\n- Automated deployment tools often use PowerShell scripts with high information content due to their extensive functionality. Identify and whitelist these tools to prevent unnecessary alerts.\n- Security software and system management tools might execute large PowerShell scripts during updates or configuration tasks. Verify the source and add exceptions for known trusted vendors.\n- Custom scripts developed in-house for specific tasks may be large or complex by necessity. Document and exclude these scripts after confirming their safety and purpose.\n- Regularly review and update the list of exceptions to ensure that only verified non-threatening scripts are excluded, maintaining the effectiveness of the detection rule.\n\n### Response and remediation\n\n- Isolate the affected system from the network to prevent further spread of the potential threat and to contain any malicious activity.\n- Terminate any suspicious PowerShell processes identified on the affected system to halt the execution of potentially harmful scripts.\n- Conduct a thorough review of the PowerShell script logs and execution history on the affected system to identify any unauthorized or malicious commands executed.\n- Restore the affected system from a known good backup if any malicious activity is confirmed, ensuring that the backup is free from compromise.\n- Update and patch the affected system to the latest security standards to close any vulnerabilities that may have been exploited.\n- Implement enhanced monitoring for PowerShell activity across the network, focusing on detecting scripts with high information content and unusual characteristics.\n- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.",
Anything else?
No response