amsi-bypass

amsi-bypass is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 93 tokens per session (3,946 once invoked), scanned A, original, MIT.

A guide to disabling or evading AMSI, the Windows interface that lets applications request malware scans of scripts and in-memory code. It focuses on PowerShell, VBScript, JScript, and .NET execution.

In plain words
What is it for?
Using memory patching, reflection, and obfuscation during authorized red-team work when AMSI blocks in-memory scripts or .NET assemblies.
Why use it?
It addresses cases where security software inspects scripts after they are decoded, so simple text obfuscation is not enough.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Good fit Using memory patching, reflection, and obfuscation during authorized red-team work when AMSI blocks in-memory scripts or .NET assemblies.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ShulkwiSEC/bb-huge
agentmods
npx agentmods add skills/shulkwisec/bb-huge/amsi-bypass

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for amsi-bypass

README.md
[![agentmods](https://agentmods.dev/badge/skills/shulkwisec/bb-huge/amsi-bypass/github.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/amsi-bypass)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/amsi-bypass"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/amsi-bypass/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for amsi-bypass

Your own site · 80×15
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/amsi-bypass"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/amsi-bypass.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,946 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.03946
Opus 5 $0.00046 $0.01973
Sonnet 5 $0.00019 $0.00789
Haiku 4.5 $0.00009 $0.00395

Measured 9d ago against content hash b7dd64618e45, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

amsi-bypass scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/curated/amsi-bypass/SKILL.md · 327 lines

How it starts

The opening of the file, as written. The whole thing — 327 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AMSI Bypass

When to Use

  • When operating on a Windows target during a Red Team engagement where PowerShell or .NET memory execution is required, but an EDR/AV is actively inspecting script contents via AMSI.
  • To execute tools like Mimikatz, Rubeus, SharpHound, or BloodHound directly in memory without dropping detectable binaries to disk.
  • When standard obfuscation fails because AMSI inspects content AFTER deobfuscation at the interpreter level.
  • When needing to load custom .NET assemblies via Assembly.Load() which AMSI intercepts.

When NOT to use: If you need to bypass on-disk AV signature detection, use av-edr-evasion-techniques. For process injection after bypass, use process-hollowing.

Prerequisites

  • Administrative or user-level access on a Windows target (AMSI bypass doesn't always require admin)
  • PowerShell 5.1+ or PowerShell Core on the target
  • Understanding of x86/x64 calling conventions for patching techniques
  • For debugging: x64dbg or WinDbg for verifying patches

Workflow

Phase 1: Understanding AMSI Architecture

# Concept: AMSI (Antimalware Scan Interface) is a Windows API that allows applications
# to request AV scans of arbitrary content BEFORE it executes. 

# The scan flow:
# 1. User types PowerShell command → PowerShell.exe receives it
# 2. PowerShell calls AmsiScanBuffer() or AmsiScanString() in amsi.dll
# 3. amsi.dll forwards the content to registered AV providers (e.g., Defender)
# 4. AV returns AMSI_RESULT (Clean, Detected, etc.)
# 5. If Detected → PowerShell blocks execution with an error

# Key DLL functions in amsi.dll:
# - AmsiInitialize()     → Creates AMSI context for the application
# - AmsiOpenSession()    → Opens a scan session
# - AmsiScanBuffer()     → Scans raw byte buffer (PRIMARY TARGET)
# - AmsiScanString()     → Scans string content
# - AmsiCloseSession()   → Closes session
# - AmsiUninitialize()   → Destroys AMSI context

# Attack surface: If we corrupt AmsiScanBuffer() or AmsiOpenSession(),
# ALL subsequent scans return "clean" regardless of actual content.

Read the full file on GitHub · 327 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 327 lines · 93 tokens per session scan A b7dd64618e45

Subscribe to this mod's changes

amsi-bypass is a skill published in the GitHub repository ShulkwiSEC/bb-huge (22 stars, last pushed 2mo ago), licensed MIT. It adds 93 tokens to every session and 3,946 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

amsi-bypass

Bypass the Windows Antimalware Scan Interface (AMSI) using memory patching, reflection, and obfuscation techniques. Execute undetected PowerShell, VBScript, JScript, and .NET assemblies in-memory without triggering Microsoft Defender or third-party AV/EDR solutions. Use this skill during Red Team engagements when…

akashrpatil/awesome-offensive-security-skills · 93 tokens

wmi-event-subscriptions

Establish highly stealthy, fileless persistence on compromised Windows systems using WMI (Windows Management Instrumentation) Event Subscriptions. Create malicious Event Filters, Event Consumers, and FilterToConsumer Bindings to execute payloads (reverse shells, beacons, keyloggers) triggered by system events …

akashrpatil/awesome-offensive-security-skills · 101 tokens

process-hollowing

Execute advanced evasion by injecting malicious code into the memory space of a legitimate, suspended process (Process Hollowing). This skill details techniques to bypass static and dynamic analysis by masking malicious activity behind trusted processes like svchost.exe or explorer.exe.

akashrpatil/awesome-offensive-security-skills · 56 tokens

hunting-for-anomalous-powershell-execution

Hunt for malicious PowerShell activity by analyzing Script Block Logging (Event 4104), Module Logging (Event 4103), and process creation events. The analyst parses Windows Event Log EVTX files to detect obfuscated commands, AMSI bypass attempts, encoded payloads, credential dumping keywords, and suspicious download…

adriannoes/awesome-agentic-ai · 102 tokens

hunting-fileless-and-in-memory-threats

Hunts for fileless and in-memory threats by correlating PowerShell script-block logs, encoded-command usage, in-memory loading patterns, and registry-resident payloads from Windows telemetry. Activates for requests to hunt fileless malware, detect in-memory execution, or find registry-resident and reflective-loading…

meltedinhex/analyst-ai-pack · 72 tokens

wmi-execution

Utilize Windows Management Instrumentation (WMI) to execute malicious payloads, establish lateral movement, and execute commands stealthily across an Active Directory environment without dropping binaries to disk or relying on traditional Service Creation (PsExec) mechanics.

akashrpatil/awesome-offensive-security-skills · 54 tokens