BLOG · WEBSITES & SHOPS

Bot attacks on websites:
what bots look for and what we check

Bot attacks hit every website, small ones too. Which files and logins bots look for, what answer they should get and what we check for our clients.

6 min read

Auf Deutsch lesen

A dark monolith of glass and metal in front of a curved wall of blue pixels, where small amber points of light burn outWebsites & shops

Bot attacks hit every website, including the small site of a trade business or a practice: automated programs ask for known weak spots around the clock, without knowing who owns the website. Whether that turns into damage does not depend on the size of the company, but on how the server answers. In this post we show what bots look for, what answer they should get and what we check for our clients.

Why do bots attack small websites too?

Because bots do not look for companies, they look for mistakes. They go through address after address and ask the same questions everywhere. A small website is just as interesting to them as a large one, as long as there is a simple mistake to find.

The goal is almost always the same: logins, customer data or a server that can be used for other purposes, such as spam or further attacks. Nobody is picked on purpose. Whoever has an open spot gets hit.

What do bots look for on websites?

Most bots are not only after WordPress but after files that contain logins. These groups come up again and again on websites of every kind:

What is requestedWhy it is valuable to attackers
.env filesMany applications keep passwords and keys there
The .git folderIt lets someone download the source code with its history
Config and key files (config.json, .aws, .ssh)Direct access to servers and services
Backups and archives (.sql, .zip, backup)Complete databases with customer data
WordPress folders (wp-admin, wp-content, wp-includes)Old plugins and themes with known gaps
wp-login.php and xmlrpc.phpEntry points for guessing passwords at scale
phpMyAdmin and similar database panelsDirect access to the database

Two patterns are typical. Broad sweeps knock once on every address on the internet, for example with xmlrpc.php. Targeted series, on the other hand, try hundreds of variants of one file, such as /.env.production, /.env.save or /api/.env.

Most of these requests pretend to be a normal browser. Blocking a list of typical senders therefore helps little.

What answer should bots get?

The server must not answer any of these requests with content. A status 200 on /.env or /.git/config means: the file is public, and an attacker already has it.

Good answers are:

  • 410 Gone for paths that will never exist on the website, such as PHP and WordPress paths on a website without WordPress. Status 410 says: there is nothing here, and nothing will come. The web server can answer this itself, without asking the actual application. That is fast and costs almost no computing time.
  • 404 Not Found or 403 Forbidden for files and hidden folders, because they are not in the public folder in the first place. More on status 404.
  • Protection against password guessing on the login and the maintenance access: after a few failed attempts the address is blocked for a while.

A filter in front, such as a web application firewall, catches part of the requests. But it does not replace a server that serves nothing useful. Many requests still get through.

Which mistake is most often behind it?

A typical finding from our checks: project files are publicly reachable, because the web root is the project folder itself. Mistakes like this do not come from an attack but from the setup.

The web root is the folder the web server shows to the outside. If it is also the folder that holds the code with its version history, files that were never meant to be public become reachable too, such as the .git folder. Exactly these paths are what the bots ask for.

The fix is usually short: block hidden folders in the web server, change the affected logins, run the check again. But the mistake only shows up when someone looks from the outside on purpose.

What do we check for our clients?

In a security check we ask the questions the bots ask, and check what your website answers. This happens only from the outside, without touching anything, and only with your signed agreement.

Our security agent OpidNeon checks the known attack paths and proves every hit. Then a person reviews every finding before it goes into the report. You get a dated report with the risk and the fix for each spot.

You can go through this list with your provider beforehand:

  • Are files such as .env, .git, backups (.zip, .sql) or logs kept outside the web root?
  • Does the server answer hidden folders such as /.git/ with 403 or 404, not with content?
  • Are CMS, themes and plugins up to date, and are unused plugins deleted rather than just deactivated?
  • Is xmlrpc.php switched off if you do not need it?
  • Is the admin login protected against password guessing, with two-factor sign-in?
  • Is the maintenance access (SSH, FTP) protected against repeated failed attempts?
  • Is there a backup that is stored separately and has been restored at least once?
  • Have you set up SPF, DKIM and DMARC for your domain?

If you cannot answer several points with certainty, an outside check is the quickest way to the answer. How we go about it is described in the post Website security check: how we work.

Conclusion: bots knock everywhere, the answer is what counts

Every website gets these requests, whatever its size or sector. It only gets dangerous where the server gives something away. If you want to know what your website answers to requests like these, we check it with your written permission: website security check for €490 per website. A free quick check of the public settings is on the same page, or write to us via contact.

Sources

Bot attacksWebsite securityWordPress securityxmlrpc.phpSecurity check

FREQUENTLY ASKED QUESTIONS

Answered briefly.

01Do bots attack small websites too?
Yes. The bots are not looking for particular companies; they try the same paths on every reachable address. A small website gets the same requests as a large one.
02Is a website without WordPress safe from these requests?
It is safe from the WordPress gaps, but not from everything else. Many bots look for files such as .env and .git, which can end up public by mistake with any technology.
03Is a filter in front of the server enough protection?
A filter in front catches part of the traffic, but not all of it. What matters is that the server itself serves nothing useful to these requests.
04What does status 410 mean for these requests?
410 Gone means: this address does not exist and never will. Many websites answer typical attack paths this way, without asking the actual application.
05How do I find out whether my website exposes files such as .git or .env?
With an outside security check. We check exactly these paths, only with your written permission, for €490 per website.

ABOUT THE AUTHOR

Hamada

Founder & CEO of WebDrift

Combines system administration, software architecture and automation with an eye for thoughtful design. Your contact from the first idea to launch.