Questions

Does my script run?

No. The deobfuscator reads the script as a syntax tree and works out values from the code, the way you would by hand: it joins strings, applies -f, -replace and -join, turns character codes into text, decodes base64 and decompresses data. When a call such as Invoke-Expression or powershell -EncodedCommand is given a string it has worked out, that string becomes the next layer. No PowerShell runs, and the deobfuscator itself runs in a sandbox with no network access.

Who can see my script and the result?

Anyone with the result's link, and no one else: each result is at its own random, unlisted address that search engines are told not to index. Your script is never listed, shown to other visitors or shared.

We keep the scripts submitted to the site. Don't submit anything you aren't allowed to share with us.

What can I paste?

A PowerShell script, or the command line that started it. For powershell.exe and pwsh, -EncodedCommand in any of its short forms (-e, -ec, -enc…) and -Command are read, and the other options are skipped. For cmd.exe, variables set with set are expanded, with substrings (%X:~4,1%), replacements (%X:a=b%), carets and delayed expansion (/v:on), and PowerShell reading its script from echo or the clipboard. A base64 string on its own is decoded if it is an encoded command. Files can be UTF-8 or UTF-16.

What does it undo?

String concatenation, reordering with -f, -replace, -split and -join, character codes and [char] casts, base64, -bxor, Deflate and GZip compression, SecureStrings whose key is in the script, environment variables, backticks, random letter case, and the ways Invoke-Obfuscation spells Invoke-Expression ($ShellId[1]+$ShellId[13]+'x', $env:ComSpec, Get-Variable '*mdr*' and others). Invoke-Expression, [ScriptBlock]::Create, $ExecutionContext.InvokeCommand, Start-Process and powershell -EncodedCommand each start a new layer.

Why does a layer still look obfuscated?

Some values only exist when the script runs: what it downloads, the date, random numbers, files on the machine, or a string built up in a loop. The deobfuscator leaves code like that as it is. If it couldn't read a layer at all, a warning above the layers says so, and the layer is shown as found.

What do the findings mean?

A finding means the script contains the names that a technique uses: an AMSI bypass names AmsiUtils or AmsiScanBuffer, a download cradle downloads a string and runs it, a scheduled task is created with schtasks or Register-ScheduledTask. Each finding links to the lines it is on. It says what the code mentions, not whether it would work. A script with no findings isn't necessarily safe: read the last layer.

Where do the indicators come from?

From the text of every layer: URLs, host names, IP addresses, file and registry paths, and the names of scheduled tasks and services. Some will be harmless, such as a Microsoft address. Defang turns example.com into example[.]com, for pasting into reports and tickets.

What are embedded files?

Windows programs (PE files) and shellcode found in the script as base64, hex or byte arrays, also when they are GZip-compressed or XORed with a key the script uses. You can download each one as a .bin file. To see what shellcode does, upload it to Shellcode Emulator.

What are the limits?

Scripts up to 2 MB, and 30 seconds to deobfuscate one. 30 scripts an hour from one address; a script that was already deobfuscated is reused and doesn't count.

What does it use?

psdeob 0.2.0, our deobfuscator, built on minusone, the open-source PowerShell deobfuscator from Airbus CERT (commit 48d85ed, with a few fixes of ours). minusone parses the script with tree-sitter and works out values; psdeob adds more of PowerShell's operators and .NET methods, cmd.exe and powershell.exe command lines, and the layers.

Is there an API?

No. Deobfuscate PowerShell is a website only.