Notes

Who's Attacking My URL Shortener?

A few years ago, I setup a url shortener for eliot.sh – this was in an era of wanting to self-host everything, and a bit.ly alternative seemed like a good idea at the time.1 The solution I chose, Shlink, happens to log all the requests that are made to my domain, even if there isn't a valid short url for that slug. I thought it would be cool to explore what's being pinged the most.

So, I wrote a small script to parse the CSV export from Shlink, and check which endpoints have been visited the most. I've compiled the results in the table below:

URLVisits
/632
/446
/.env73
/admin.php51
/wp-admin/js/about.php46
/admin.php46
/wp-admin/js/about.php46
/about.php44
/dropdown.php43
/.env43
/about.php42
/wp-admin/images/about.php41
/simple.php41
/wp-includes/style-engine/about.php40
/dropdown.php40
/wp-admin/images/about.php40
/wp-admin/images/index.php40
/wp-admin/css/index.php39
/wp-admin/images/index.php39
/wp-includes/Requests/about.php39
/alfanew.php38
/alfanew.php38
/wp-content/themes/seotheme/mar.php38
/wp-admin/css/index.php37
/wp-includes/style-engine/about.php37
/wp-content/themes/about.php36
/.well-known/about.php36
/simple.php36
/atomlib.php36
/wp-admin/css/about.php36
/wp-includes/ID3/about.php36
/wp.php35
/wp-includes/images/about.php35
/wp-admin/includes/about.php35
/wp-admin/css/colors/coffee/cloud.php35
/cgi-bin/about.php35
/classwithtostring.php35
/wp-content/themes/about.php35
/wp-admin/includes/about.php35
/wp-content/about.php35
/.well-known/pki-validation/about.php35
/wp-includes/customize/about.php35
/wp-admin/css/colors/index.php35
/wp-content/plugins/seoplugins/mar.php35
/repeater.php35
/wp-content/plugins/Cache/Cache.php35
/wp-admin/images/cloud.php35
/wp-includes/rest-api/about.php34
/wp-admin/dropdown.php34
/wp-content/plugins/seoplugins/mar.php34
Export results by URL for top 50 endpoints

Interestingly, almost every URL on this list is a PHP URL, with the exception of .env. I guess I would have to attribute this to people being awful at configuring Wordpress instances? I would assume that these bots are basically just scanning for vulnerabilities, usually to then abuse them. Sadly, the Shlink logs don't include IP information (or at least in this export) but I'd be curious to see where these attacks are actually coming from – I'd expect they're almost entirely from outside the U.S.

Another note: while investigating some of these files, I came across some website doing SEO optimization based on user searches, which leads to hilarious sites like this being indexed. I appreciate the related search terms.2

If we filter out .php files from our results, the new "most attacked" list looks like this:

URLVisits
/632
/446
/.env73
/.env43
/.git/config29
//feed/26
/.git/config22
/chosen19
/randkeyword.PhP818
/index.html17
/.well-known/12
/randkeyword.PhP812
/.vscode/sftp.json12
/admin/controller/extension/extension/11
/sites/default/files/11
/_next/static/chunks/main-app-f5c8d25c8479457f.js9
/_next/static/chunks/webpack-093bf5b136190ec1.js9
/_next/static/chunks/fd9d1056-cc48c28d170fddc2.js9
/.vscode/sftp.json9
/config.json9
/debug/default/view?panel=config9
/chosen8
/index.html8
/_next/static/chunks/69-1b6d135f94ac0e36.js8
/_next/static/chunks/250-d7e0a94ebe194dac.js8
/_next/static/chunks/app/page-4bc3ff0974b539ee.js8
/.aws/credentials8
/files/8
/images/8
/uploads/8
/?rest_route=/wp/v2/users/8
/telescope/requests8
/.DS_Store8
/_all_dbs8
/login.action8
/server-status8
/ecp/Current/exporttool/microsoft.exchange.ediscovery.exporttool.application8
/v2/_catalog8
/about8
/server8
/phpinfo7
/new/7
/ynz.PhP76
/randkeyword.PhP76
/ioxi002.PhP76
/phpinfo6
/.env.bak6
/wordpress/6
/wp/6
Export results by URL for top 50 endpoints other than .php files

There are still a few Wordpress related exploits here, but most are now unrelated. .aws/credentials is self-explanatory, as is .env.bak. I'm personally curious what information might be gained from a .DS_Store file? Maybe a way of mapping a site to find information that's not public? I also wonder why those specific _next urls are being visited so often, given the site isn't actually running NextJS.

More than anything else, though, these attacks are a sober reminder that nothing on the open internet is safe, and there are a lot of bad people who are willing to ruin your life for their personal gain. Maybe I should start redirecting /.env to a fake .env and see who tries to login with it...

Footnotes

  1. It was, in fact, a pretty good idea! I ended up using it a lot for various school projects, and it's also just fun to use. Thanks, r/selfhosted!

  2. Funnily enough, this site also has Cloudflare bot detection enabled. I guess they learned their lesson, but forgot to reset their database?