this post was submitted on 28 Jan 2025
130 points (97.1% liked)
Pulse of Truth
673 readers
63 users here now
Cyber Security news and links to cyber security stories that could make you go hmmm. The content is exactly as it is consumed through RSS feeds and wont be edited (except for the occasional encoding errors).
This community is automagically fed by an instance of Dittybopper.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How would you go about doing this part? Asking for a friend who’s an idiot, totally not for me.
I use Apache2 and PHP, here's what I did:
in .htaccess you can set
ErrorDocument 404 /error-hole.php
https://httpd.apache.org/docs/2.4/custom-error.htmlin error-hole.php,
For the string, I used
dd
to generate 13 MBs of noise from/dev/urandom
and then I converted that to base64 so it would paste into error-hole.phpYou should probably hide some invisible dead links around your website as honeypots for the bots that normal users can't see.
How does this affect a genuine user who experiences a 404 on your site?
They will see a long string of base64 that takes a quarter of a second longer to load then a regular page. If it's important to you, you can make the base64 string invisible and add some HTML to make it appear as a normal 404 page.