/secskills-core:hunting-web-backdoorsfrom secskills-core
Hunts planted webshells and backdoors across PHP, JSP, ASP, and Node source trees, statically decoding obfuscation without executing payloads. Use for compromised servers, hacked CMS sites, or vetting downloaded code.
Ships in secskills-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This is not a vulnerability audit. You are looking for code an attacker
already planted — a webshell, a one-line eval backdoor, a fake plugin, a
malicious line appended to a legitimate file. The weakness that let them in is
auditing-php-applications' job; this skill finds what they left behind.
Two things make it hard. The malicious code is deliberately hidden — obfuscated,
split, or buried in a tree of thousands of legitimate files — so a naive grep
misses it. And the tells (eval, base64_decode, dynamic calls) appear in
plenty of benign code, so a naive grep also drowns you in false positives. The
work is the discrimination.
eval, assert, or system on decoded or request-derived inputauditing-php-applicationsanalyzing-malwareresponding-to-incidents; this skill is the source-tree sweep within itauditing-supply-chainanalyzing-linux-persistenceThe single rule that must not bend: the obfuscated code is the payload. Do
not run it, do not "just let PHP decode it," do not replace eval( with
echo( and execute the file, do not paste it into an online sandbox that runs
it. Deobfuscation is a static transformation:
base64_decode,
gzinflate, gzuncompress, str_rot13, hex/\xNN, strrev) applied as
string operations, not as executed PHP.eval( with file_put_contents('out.php', ...) and
running it is executing the payload if any prior layer has side effects.
Decode statically, then read."Most webshells are three or four layers of encoding around ten lines of logic" — peel to the logic, do not detonate the wrapper.
You cannot read every file. Rank candidates by cheap signals, then read the top of the list:
# 1. PHP where PHP should not be — uploads, cache, images, media dirs
find wp-content/uploads -name '*.php' -o -name '*.php[0-9]' -o -name '*.phtml' 2>/dev/null
# 2. Recently modified, clustered in time (attackers touch many files at once)
find . -name '*.php' -newermt '2026-07-01' -printf '%T+ %p\n' | sort
# 3. High entropy / long single lines — the shape of packed obfuscation
find . -name '*.php' -exec awk 'length>1000{print FILENAME": "length; nextfile}' {} \;
# 4. The dangerous-sink grep — leads, NOT verdicts (see the FP problem below)
grep -rnE '\b(eval|assert|system|passthru|shell_exec|proc_open|popen|create_function)\s*\(' --include='*.php' .
grep -rnE '(base64_decode|gzinflate|gzuncompress|str_rot13|hex2bin)\s*\(' --include='*.php' .
# 5. Request-driven code execution — the webshell core
grep -rnE '\$_(GET|POST|REQUEST|COOKIE|SERVER)\s*\[[^]]*\]\s*\(' --include='*.php' .
grep -rnE '(eval|assert|system|passthru)\s*\(\s*\$_(GET|POST|REQUEST|COOKIE)' --include='*.php' .
The most reliable single lead is variable execution of request data —
$_POST['x'](), ev[a]l($_GET[...]), ass[e]rt($_REQUEST[...]),
call_user_func($_GET['f'], ...). Legitimate code almost never dispatches a
function name straight from a superglobal.
A source tree that returns nothing for grep eval can still be backdoored.
Attackers defeat the obvious grep deliberately:
$a='ev'.'al'; $a($code); or ('e'.'v'.'a'.'l')(...).$f='system'; $f($_GET['c']);,
${'_'.'GET'}, $$x."\x65\x76\x61\x6c" is eval;
chr(101).chr(118)....array_map, array_filter, usort,
preg_replace_callback, register_shutdown_function,
ob_start with a user-controlled callback.eval: assert($str) (pre-8.0),
preg_replace('/./e', $str, ...) (pre-7.0), create_function('', $str)
(pre-8.0), mb_ereg_replace with e.So grep is a lead generator, not a coverage guarantee. When grep is empty and you still suspect infection, fall back to: entropy/long-line ranking, mtime clustering, and diffing against a known-good copy (below).
The hardest infection is a backdoor appended to or inserted into a legitimate
file — index.php, wp-config.php, a theme's functions.php, vendor/
autoloaders. The file is 99% real, so it does not stand out by name, location,
or entropy overall. Find these by comparison, not by inspection:
# Diff the tree against a pristine copy of the same CMS/plugin version
# (download the exact version from wordpress.org / the vendor)
diff -rq ./site /known-good/wordpress-6.x/
# WordPress core/plugin integrity via checksums
wp core verify-checksums; wp plugin verify-checksums --all
# git/composer/npm: what changed vs the committed/locked state
git status --porcelain; git diff
If you have no known-good baseline, the tells are: code after the closing
?> of an otherwise-normal file, a lone eval/base64_decode line wedged at
the top of a config file, or a <?php ... ?> block whose style clashes with
the surrounding file.
The presence of a removed language feature tells you something:
preg_replace with the /e modifier — removed in PHP 7.0. Its presence
means the backdoor targets (or predates) PHP 5.x.create_function() and string-argument assert() as code execution —
removed in PHP 8.0. Common in older shells; on a PHP 8 server they would
fault, which is itself a signal about when the code was planted.Fingerprints speed triage but do not replace reading the code:
IOC strings in this section are bracket-broken —
ev[a]liseval,ass[e]rtisassert. Written literally they matchBackdoor:PHP/Chopperand this file, a defensive hunting skill, gets quarantined on download. The grep patterns above are intact and safe to copy. See "Antivirus false positives" in the repo README.
<?php @ev[a]l($_POST['pass']);?> (or
assert), often under 30 bytes. Tiny, so easy to miss and easy to append.A signature hit confirms a shell. It does not confirm you found them all — attackers plant several, and the second one rarely matches the first's family.
responding-to-incidents. Deletion alone loses the timeline and, if you
miss the entry point, the attacker re-plants within hours.auditing-php-applications (source) or responding-to-incidents
(logs); a cleaned site with the hole still open is re-infected by morning.eval, so it's a backdoor." Templating engines, caches, and
frameworks use eval legitimately. The tell is eval on decoded or
request-derived input, not eval itself.Fetch public advisories, specifications, and vendor reports as Markdown:
curl -sL "https://defuddle.md/<url>" # scheme in the path is optional
This strips page boilerplate — roughly 78% fewer tokens on a prose page — and returns the full text rather than a summary, so you can grep it and trust a negative result.
Three things it is not for. Fetch JSON and API responses raw, because readability extraction mangles structured data. Fetch authenticated or JavaScript-rendered pages directly, because it retrieves them anonymously. And never route adversary infrastructure (phishing links, C2, malware hosting), client-owned hosts, or engagement URLs through it — the request leaves your machine to a third party, and for live adversary infrastructure it also tips off the operator.
Some sites block the extractor and return an error blob rather than the page —
{"error":"Failed to fetch: 418 I'm a teapot"} from freedesktop.org, for
instance. That is the fetch being refused, not the source saying the thing
does not exist. Re-fetch the URL directly before drawing any conclusion from
it.
auditing-php-applications — the vulnerability that let the shell inanalyzing-malware — deep reverse of a single recovered shell, its C2 and
capabilitiesresponding-to-incidents — evidence handling, scoping, and the wider IR this
sweep sits insideanalyzing-linux-persistence — host-level persistence beyond the web rootwriting-yara-rules — turning a confirmed family into a reusable signatureWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
webshell, backdoor, malware-hunting, obfuscation, incident-response
npx claudepluginhub trilwu/secskills --plugin secskills-core30 skills in this plugin
/analyzing-binariesReverse engineer compiled binaries, firmware, and mobile app packages using triage, static disassembly, decompilation, and dynamic instrumentation. Use when analyzing an executable, ELF/PE/Mach-O file, firmware image, or stripped binary, recovering an algorithm or protocol, or working a CTF reversing challenge./analyzing-dotnet-assembliesReverse engineer .NET assemblies and executables with dnSpyEx, ILSpy, and de4dot — identifying and unwrapping obfuscators and packers, deobfuscating control flow and string encryption, handling single-file and NativeAOT publishes, and patching IL. Use when a binary is a managed PE, when ILSpy shows mangled names or empty method bodies, or when analyzing .NET malware, a loader, or a Windows application./analyzing-2 plugins ship this exact skill · first indexed Aug 4, 2026
Other plugins' skills for the same job