webshell-hunt

webshell-hunt is a skill for Claude Code, Codex from asaotomo/DeepSentry. It costs 40 tokens per session (573 once invoked), scanned A, original, Apache-2.0.

A webshell-hunting guide for searching web directories for hidden backdoors and suspicious recently changed files. A webshell is a malicious web-accessible script that can let an attacker run commands on a server.

In plain words
What is it for?
Use it to investigate compromised PHP or JSP sites, inspect suspicious files, identify obfuscated command-execution code, record file hashes, and connect findings with web-access logs.
Why use it?
It combines quick code-pattern searches with file age, location, and content checks to reduce false alarms. It also preserves evidence and recommends isolating confirmed files instead of immediately deleting them.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/asaotomo/deepsentry/webshell-hunt
Any agent
npx skills add asaotomo/DeepSentry --skill webshell-hunt
Clone the repo
git clone --depth 1 https://github.com/asaotomo/DeepSentry

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 webshell-hunt

README.md
[![agentmods](https://agentmods.dev/badge/skills/asaotomo/deepsentry/webshell-hunt.svg)](https://agentmods.dev/skills/asaotomo/deepsentry/webshell-hunt)
Your own site
<a href="https://agentmods.dev/skills/asaotomo/deepsentry/webshell-hunt"><img src="https://agentmods.dev/badge/skills/asaotomo/deepsentry/webshell-hunt.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00040 $0.00573
Opus 5 $0.00020 $0.00287
Sonnet 5 $0.00008 $0.00115
Haiku 4.5 $0.00004 $0.00057

Measured 4d ago against content hash 14e4b5c866e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

webshell-hunt 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 4d ago.

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.

skills/webshell-hunt/SKILL.md · 63 lines

What it actually says

Webshell 狩猎 Skill

何时使用

  • 用户要求在 Web 目录中查找后门/木马
  • 应急响应中需要快速定位 Webshell
  • CMS/框架目录出现异常文件

工作流程

阶段 1: 签名扫描(快速但误报多)

find /var/www -name "*.php" -exec grep -l "eval\s*(" {} \; 2>/dev/null
find /var/www -name "*.php" -exec grep -l "base64_decode" {} \; 2>/dev/null
find /var/www -name "*.jsp" -exec grep -l "Runtime.getRuntime" {} \; 2>/dev/null

阶段 2: 行为分析(降低误报)

# 最近 30 天修改的 PHP 文件
find /var/www -name "*.php" -mtime -30 -ls 2>/dev/null

# 非框架目录的可疑文件
find /var/www -name "*.php" -not -path "*/vendor/*" -not -path "*/node_modules/*" -mtime -7

阶段 3: 内容确认

对可疑文件使用 read_filecat 查看内容,识别:

  • <?php @eval($_POST[...]); ?> — 一句话木马
  • base64_decode + eval 组合 — 混淆后门
  • system() / exec() / shell_exec() — 命令执行

阶段 4: 处置建议

  • 确认后建议隔离(移动到 quarantine 目录)而非直接删除
  • 记录文件 hash: md5sum <file>
  • 检查同目录其他文件和访问日志

输出格式

## Webshell 狩猎报告
- 扫描范围: [目录路径]
- 可疑文件: [路径 | 修改时间 | 风险特征]
- 确认木马: [路径 | 类型 | 内容摘要]
- 建议措施: [隔离/删除/监控]

注意事项

  • jQuery/CMS 核心文件常有 eval,需结合路径判断
  • 优先行为分析(mtime)而非纯签名
  • 高危删除操作需用户确认
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. 4d ago First seen · 63 lines · 40 tokens per session scan A 14e4b5c866e6

Subscribe to this mod's changes

webshell-hunt is a skill published in the GitHub repository asaotomo/DeepSentry (24 stars, last pushed today), licensed Apache-2.0. It adds 40 tokens to every session and 573 once invoked, about $0.0002 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

go-expert

Expert-level Go development with Go 1.22+ features, concurrency, standard library, and production-grade best practices.

personamanagmentlayer/pcl · 27 tokens

skill-creator

Create, install, or update skills in the workspace. Use when (1) installing a skill from a URL or remote source, (2) creating a new skill from scratch, (3) updating or restructuring existing skills. Always use this skill for any skill installation or creation task.

zhayujie/CowAgent · 61 tokens

image-generation

Generate or edit images from text prompts. Use when the user asks to create, draw, design, or edit an image, illustration, photo, icon, poster, or any visual content.

zhayujie/CowAgent · 41 tokens

release-notes

Draft concise release notes.

ollama/ollama · 9 tokens

smart-docs

AI-powered comprehensive codebase documentation generator. Analyzes project structure, identifies architecture patterns, creates C4 model diagrams, and generates professional technical documentation. Use when users need to document codebases, understand software architecture, create technical specs, or generate…

sopaco/deepwiki-rs · 80 tokens

litho-document-skill

This skill should be used when the user asks to "generate project documentation", "analyze codebase architecture", "create C4 architecture diagrams", "document a repository", "generate technical docs", "使用 Litho 生成文档", "分析代码库架构", "生成架构文档", "为项目生成技术文档", "生成 C4 模型文档", "为这个项目写文档", "自动生成文档", "帮我分析这个代码库", or any request…

sopaco/deepwiki-rs · 185 tokens