Query: write Sigma for Detects usage of the built-in PowerShell cmdlet "Enable-WindowsOptionalFeature" used as a Deployment Image Servicing and
Matching passage: Sigma rule: Detects usage of the built-in PowerShell cmdlet "Enable-WindowsOptionalFeature" used as a Deployment Image Servicing and. Logsource: windows / process_creation. Rule: title: Potential Suspicious Windows Feature Enabled - ProcCreation id: c740d4cf-a1e9-41de-bb16-8a46a4f57918 related: - id: 55c925c1-7195-426b-a136-a9396800e29b type: similar status: test description: 'Detects usage of the built-in PowerShell cmdlet "Enable-WindowsOptionalFeature" used as a Deployment Image Servicing and Management tool. Similar to DISM.exe, this cmdlet is used to enumerate, install, uninstall, configure, and update features and packages in Windows images ' references: - https://learn.microsoft.com/en-us/powershell/module/dism/enable-windowsoptionalfeature?view=windowsserver2022-ps - https://learn.microsoft.com/en-us/windows/win32/projfs/enabling-windows-projected-file-system - https://learn.microsoft.com/en-us/windows/wsl/install-on-server author: Nasreddine Bencherchali (Nextron Systems) date: 2022-12-29 tags: - attack.stealth logsource: category: process_creation product: windows detection: selection_cmd: CommandLine|contains|all: - Enable-WindowsOptionalFeature - -Online - -FeatureName selection_feature: CommandLine|contains: - TelnetServer - Internet-Explorer-Optional-amd64 - TFTP - SMB1Protocol - Client-ProjFS - Microsoft-Windows-Subsystem-Linux condition: all of selection_* falsepositives: - Legitimate usage of the features listed in the rule. level: medium
Near-miss passage: Sigma rule: Detects when a user creates a Lambda function URL configuration, which could be used to expose the function to the inter. Logsource: aws / cloudtrail. Rule: title: New AWS Lambda Function URL Configuration Created id: ec541962-c05a-4420-b9ea-84de072d18f4 status: experimental description: 'Detects when a user creates a Lambda function URL configuration, which could be used to expose the function to the internet and potentially allow unauthorized access to the function''s IAM role for AWS API calls. This could give an adversary access to the privileges associated with the Lambda service role that is attached to that function. ' references: - https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunctionUrlConfig.html - https://cloud.hacktricks.xyz/pentesting-cloud/aws-security/aws-privilege-escalation/aws-lambda-privesc - https://www.wiz.io/blog/how-to-set-secure-defaults-on-aws author: Ivan Saakov date: 2024-12-19 tags: - attack.initial-access - attack.privilege-escalation logsource: product: aws service: cloudtrail detection: selection: eventSource: lambda.amazonaws.com eventName: CreateFunctionUrlConfig condition: selection falsepositives: - Creating a Lambda function URL configuration may be performed by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. - Creating a Lambda function URL configuration from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule. level: medium