
Scanner Bot Honey Trap
Phillip Harrington Jul 2026
First published on LinkedIn, June 2026.
CommentsTL;DR: The CloudFront function in front of Reuse Lists sends scanner bots a 301 to the NIST page for the exact CVE they're probing for. Polite revenge, about 150 lines, running at the edge.
This came up while building Reuse Lists, the checklist app I'm working on. A CloudFront function runs on every request before it reaches the app, and it answers scanner bots with a redirect to the NIST page for the bug they're scanning for.
Specifically: CVE-2024-4577, the PHP-CGI argument-injection bug from 2024. By volume, it's the noisiest probe in the Reuse Lists logs. Every flavor of ?-d allow_url_include=on you can imagine, plus the usual /wp-admin, /.env, /.git, /xampp, /telescope, /actuator and /wp-login.php, plus a long tail of credential-file probes like /service-account.json and /aws-ses.env.
The Trap
The function checks two things: the URI and the query string. If either matches a scanner pattern, it returns this:
return {
statusCode: 301,
statusDescription: 'Moved Permanently',
headers: {
location: { value: 'https://nvd.nist.gov/vuln/detail/CVE-2024-4577' },
},
};Catching the PHP-CGI probe is the satisfying part. PHP-CGI reads a query string key that starts with - as a command-line flag ( -d changes a PHP setting). That's the old trick, and CVE-2024-4577's twist was sneaking the dash past Windows as a soft hyphen. In my logs, the probes show up as keys that start with a plain -. So:
var qsKeys = Object.keys(request.querystring || {});
var isPhpCgiProbe = false;
for (var i = 0; i < qsKeys.length; i++) {
if (qsKeys[i].charAt(0) === '-' || qsKeys[i] === '') {
isPhpCgiProbe = true;
break;
}
}(CloudFront Functions started out on an ES5.1 runtime, hence var and a plain for loop.)
The path checks are a chain of regexes covering the categories that actually show up in the logs: WordPress paths, framework debug endpoints (Laravel Telescope, Spring Actuator, Symfony Profiler, Yii debug), Docker registry, Atlassian Jira, F5 BIG-IP, Microsoft Exchange ECP, observability stacks, and a deep set of credential filenames.
False Positives
Why it won't trap a real visitor:
- Reuse Lists has no
.phpfiles, no.sqlfiles, no.envserved publicly, and no/wp-*paths. - Legitimate query strings (
utm_*,q=,filter=) never start with-. - The trap runs before host canonicalization, so it catches probes against all four of the app's domain variants in one shot.
- If I ever add a route called
/actuatoror/telescope, I'll notice on day one.
Why the CVE Page
The CVE page is just for fun. A 404 would do the same job. But I get a small, real pleasure out of picturing a scanner operator looking at their dashboard and seeing a 301 to the NIST page for the exact bug they were probing for.
Bots that follow the redirect get a reading assignment. Bots that don't burn a few CPU cycles on a 301. Either way, I get one line in the access log, and it costs a fraction of a cent.
Your 404s are a shopping list
Before you write a single rule, pull a week of 404s from your logs and sort them by path. The scanners have already told you what they're looking for. Block what shows up, not what a blog post (even this one) says to.