PowerShell spawns a credential prompt from a script-launched parent
AN1440 asks for PowerShell used to mimic a UAC-style credential dialog from an unexpected parent. The rule matches PowerShell or pwsh invoking the two built-in ways a script raises a native Windows credential prompt — Get-Credential and the underlying PromptForCredential API — while the process itself was spawned from cmd.exe, wscript.exe or cscript.exe rather than a normal interactive shell, which is MITRE's ParentProcessName knob aimed at exactly this kind of script-chain launch. Cmdlet-name matching was chosen over MITRE's own CommandLine knob example (prompt text such as "Enter your password" or "CredentialRequired") because an API/cmdlet name is rarer in ordinary command lines than generic prompt wording; both of MITRE's example strings are now included in selection_prompt as well, so the rule covers its own chosen signal and MITRE's literal suggestion together. This selector only fires when Get-Credential or PromptForCredential (or one of MITRE's prompt-text strings) appears literally in PowerShell's own CommandLine — the directly typed or -Command-inlined invocation. It is blind to the same call delivered via -File <script>.ps1, where the cmdlet lives inside the script body and never appears in the parent process's CommandLine, or via -EncodedCommand, whose base64 payload by construction cannot contain a plaintext match — the two most common real-world PowerShell delivery mechanisms for scripted, non-interactive tooling. Closing that gap needs PowerShell Script Block Logging (EventID 4104), whose ScriptBlockText carries deobfuscated script content regardless of delivery mechanism, but 4104 is a distinct logsource without a ParentImage field, so folding it into this parent-scoped rule would require a second, differently-shaped analytic rather than extending this one. Script Block Logging is also off by default until Group Policy enables it, a prerequisite this rule does not assume and has not been built to use. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0521, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
Sentinel · KQL
Run this as a search.
DeviceProcessEvents| where (((FolderPath endswith "\\powershell.exe" or FolderPath endswith "\\pwsh.exe") and (ProcessCommandLine contains "PromptForCredential" or ProcessCommandLine contains "Get-Credential" or ProcessCommandLine contains "Enter your password" or ProcessCommandLine contains "CredentialRequired")) and (InitiatingProcessFolderPath endswith "\\cmd.exe" or InitiatingProcessFolderPath endswith "\\wscript.exe" or InitiatingProcessFolderPath endswith "\\cscript.exe"))
Splunk · SPL
Run this as a search.
index=* (((Image="*\\powershell.exe" OR Image="*\\pwsh.exe") AND (CommandLine="*PromptForCredential*" OR CommandLine="*Get-Credential*" OR CommandLine="*Enter your password*" OR CommandLine="*CredentialRequired*")) AND (ParentImage="*\\cmd.exe" OR ParentImage="*\\wscript.exe" OR ParentImage="*\\cscript.exe"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE (((TO_LOWER(process.executable) LIKE "*\\\\powershell.exe" OR TO_LOWER(process.executable) LIKE "*\\\\pwsh.exe") AND (TO_LOWER(process.command_line) LIKE "*promptforcredential*" OR TO_LOWER(process.command_line) LIKE "*get-credential*" OR TO_LOWER(process.command_line) LIKE "*enter your password*" OR TO_LOWER(process.command_line) LIKE "*credentialrequired*")) AND (TO_LOWER(process.parent.executable) LIKE "*\\\\cmd.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\wscript.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\cscript.exe"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,process_creation,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="7"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="Image" type="pcre2">(?i)(\\powershell\.exe$|\\pwsh\.exe$)</field> <field name="CommandLine" type="pcre2">(?i)(PromptForCredential|Get-Credential|Enter your password|CredentialRequired)</field> <field name="ParentImage" type="pcre2">(?i)(\\cmd\.exe$|\\wscript\.exe$|\\cscript\.exe$)</field> <description>PowerShell spawns a credential prompt from a script-launched parent</description> <mitre> <id>T1056.002</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.