
Summary
The 'PowerShell Keylogging Script' rule detects the use of Win32 API functions that can be exploited in PowerShell scripts to capture user keystrokes. Attackers may employ this technique to obtain sensitive information such as credentials or other valuable data. The rule queries specific events categorized as process actions from the Windows operating system and targets scripts employing functions associated with keylogging functionalities, such as 'GetAsyncKeyState' or 'NtUserGetAsyncKeyState'. The rule emphasizes the investigation process, outlining steps to assess script content, execution chains, and user behavior to identify potential threats. Recommendations for response include isolating affected hosts, evaluating the necessity of PowerShell usage by users, implementing preventive measures, initiating incident response procedures, and holistic system scanning post-detection to identify residual effects of the compromise. The rule underscores risk mitigation in environments where PowerShell is utilized for automation and management, aiming to enhance security against unauthorized keystroke capture activities.
Categories
- Endpoint
- Windows
Data Sources
- Process
- Application Log
- Script
ATT&CK Techniques
- T1056
- T1056.001
- T1059
- T1059.001
- T1106
Created: 2021-10-15