Skip to content

Guide · Agent skill

How to use the PowerShell Malware Deobfuscator agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains how to install and use the deobfuscating-powershell-obfuscated-malware agent skill, which lets an AI agent work through an obfuscated PowerShell script layer by layer. It is written for incident responders and malware analysts who may not have used agent skills before. By the end you will know what the skill does, how to add it to your agent, how to ask for help with a script, and what precautions to take.

PowerShell Malware Deobfuscatormukul975/Anthropic-Cybersecurity-Skills · Apache-2.0

Quick start

  1. 1Download the skill. Download the ZIP of deobfuscating-powershell-obfuscated-malware from this page.
  2. 2Unzip it into the right folder. Place the folder in ~/.claude/skills/ for personal use, or in .claude/skills/ inside a project. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
  3. 3Install the requirements. Install Python 3.9+, the regex pip package, and PowerShell 5.1+ or 7+. Optionally run Install-Module PSDecode.
  4. 4Prepare an isolated environment. Set up a VM or sandbox and keep the suspicious script inside it. Confirm you are authorised to analyse the sample.
  5. 5Ask for the analysis. Describe the outcome you need, such as the final command, the dropped payload or the C2 endpoints, and provide the script.
  6. 6Verify the results. Check each recovered command and extracted indicator against the original script before using it.

What an agent skill is and what this one does

An agent skill is a folder of instructions and supporting files that an AI agent can load when a task matches it. This skill is for analysing PowerShell scripts that have been hidden with encoding, string tricks or indirect execution calls.

When you give the agent a suspicious script, it follows a structured process. It identifies which obfuscation techniques are present, such as Base64 encoding, split strings, character-code tricks and repeated Invoke-Expression calls. It decodes what it can and pulls out indicators such as URLs, IP addresses, domains, file paths and registry keys. The bundled Python scripts automate parts of this, and the agent writes up the recovered commands for an analyst to review.

  • Identifies techniques such as -EncodedCommand, FromBase64String, string concatenation, [char] arrays, backtick insertion, $env: abuse, SecureString, compression and XOR
  • Uses the PSDecode and PowerDecode tools, and optionally CyberChef for manual transformations
  • Replaces Invoke-Expression calls with Write-Output to capture the script content that would otherwise run
  • Produces a report structured around obfuscation layers, results and extracted indicators

Install the skill in Claude Code or the Claude apps

Download the ZIP of the skill from this page. The ZIP contains the SKILL.md file and its supporting folders, including scripts, references and assets.

For a personal setup, unzip the folder into ~/.claude/skills/ so it is available across your projects. To limit it to one project, unzip it into the .claude/skills/ folder inside that project.

In the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal: ~/.claude/skills/
  • Project only: .claude/skills/ inside the project folder
  • Claude apps: Settings → Capabilities → Skills

Install the tools the skill needs

The skill needs Python 3.9 or later and PowerShell 5.1 or PowerShell 7 or later, since PowerShell provides the AST access the analysis relies on. The scripts also require the regex pip package.

PSDecode is optional but recommended. It is a PowerShell module installed with the command below. PowerDecode is an optional external GitHub project at https://github.com/Malandrone/PowerDecode. CyberChef is optional and useful for manual encoding transformations.

  • Python 3.9+ and the regex pip package (used by scripts/process.py)
  • PowerShell 5.1+ or PowerShell 7+
  • PSDecode (optional)
  • PowerDecode (optional, external project)
  • CyberChef (optional, for manual transformations)
  • An isolated VM or sandbox is recommended for any script execution
Install-Module PSDecode

Run the skill safely on a suspicious script

Do the analysis inside an isolated virtual machine or sandbox. The skill itself suggests this, and it is the most important precaution. Scripts that execute samples can still cause harm if isolation fails.

Keep the sample inside the isolated environment. Do not copy the agent's output or the sample onto a production machine without review. Only use the skill where you are authorised to analyse the sample; the skill frames its use around authorised testing and analysis.

  • Use a VM or sandbox for analysis
  • Do not run unknown malware just to see what it does
  • Confirm you have authorisation to analyse the sample

Ask the agent for a deobfuscation in plain language

Once the skill is installed, you trigger it by describing the task. Paste or point the agent to the script and say what you need. Useful requests name the outcome you want, such as the final command, the payload location or the C2 endpoints.

Example requests you might type:

  • Deobfuscate this PowerShell script from the compromised host and tell me what the final command does.
  • This script uses -EncodedCommand. Decode it and list every URL, IP address and domain it contacts.
  • Remove the Invoke-Expression layers from this script and show me the payload it drops.
  • Identify the obfuscation techniques in this PowerShell file and write up the recovered commands for review.

Review the output and build on it

The agent writes up the recovered commands and indicators for an analyst to check. Treat the result as analysis to verify, not as a final answer. Confirm each recovered command and indicator against the original script before you act on it.

The output follows an analysis report structure: obfuscation layers identified, layer-by-layer results, and extracted indicators grouped into URLs, IP addresses, file system artifacts and registry keys. The skill notes that it maps to MITRE ATT&CK techniques and NIST CSF categories, which can help when writing detections.

  • Check each decoded layer against the original script
  • Record URLs, IPs, domains, file paths and registry keys as indicators
  • Use observed tradecraft to inform detection work

What people use it for

  • Recovering the final command from a Base64 -EncodedCommand line taken from a compromised Windows machine during incident response.
  • Extracting URLs, IP addresses and domains from a multi-layer script to find payload download and C2 endpoints.
  • Documenting the obfuscation techniques in an observed PowerShell script to help a security team write detections.
  • Producing a structured write-up of decoded layers for an analyst's incident report.

Frequently asked questions

Is the PowerShell Malware Deobfuscator agent skill free?

The skill is published under the Apache-2.0 licence, as stated on this page. Check the licence file in the downloaded ZIP for the full terms. The optional tools it mentions, such as PSDecode, PowerDecode and CyberChef, are separate projects with their own terms.

What do I need to install before using this skill?

You need Python 3.9 or later, PowerShell 5.1 or PowerShell 7 or later, and the regex pip package used by process.py. PSDecode, PowerDecode and CyberChef are optional. An isolated VM or sandbox is recommended for running any script.

Where do I put the skill folder for Claude?

For personal use, unzip it into ~/.claude/skills/. To limit it to one project, unzip it into .claude/skills/ inside that project. In the Claude apps, you can upload it under Settings → Capabilities → Skills.

Can this skill run malware safely?

The skill is designed for analysis, but it can run scripts, so it does not make execution safe by itself. Use a VM or sandbox, and only analyse samples you are authorised to examine. If isolation fails, scripts that execute samples can still cause harm.

What is the difference between PSDecode and PowerDecode?

The source names both as tools the skill uses to automate deobfuscation, and it lists PSDecode as a PowerShell module you can install with Install-Module PSDecode. PowerDecode is an external GitHub project. The source does not compare their capabilities in detail, so check each project's documentation before choosing.

Should I use this skill on my own PowerShell scripts?

Probably not. The skill is aimed at obfuscated malware and suspicious scripts from incidents. For routine scripts you wrote yourself, the obfuscation analysis adds little value.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits incident responders and malware analysts who need to recover commands, payloads and C2 endpoints from obfuscated PowerShell and can work inside an isolated environment. It is a poor fit for running unknown samples without isolation, for routine scripts you wrote yourself, or for analysis you are not authorised to perform. Verify every recovered result before acting on it.

Download the skill