Security

Backdoor

A backdoor is a hidden way into a system, a program or a device that allows access while bypassing its normal authentication and control mechanisms.

In this post

A backdoor is a hidden way into a system that makes it possible to bypass the normal security controls. It is used to get in without going through the front door, in other words without a password, without being logged and without anyone noticing. It can be created by an attacker after an intrusion so they can come back whenever they want, or be hidden inside a program from the very beginning, whether through carelessness or on purpose.

The image that explains it best is a house with a guarded main entrance, with a doorbell, a camera and a lock, and a side door hidden behind some bushes. Whoever knows about it comes and goes without leaving a trace. Even if the locks on the main door are changed, the hidden one keeps working. That is why backdoors are so dangerous, because they survive password changes and many clean-up measures.

A backdoor is the key hidden under the doormat. Whoever knows about it walks in whenever they like, and the owners of the house never find out.

What is a backdoor?

In computing, a system should have a single, controlled and documented way in. When any other route exists that was neither planned nor authorised by the person responsible for the system, we talk about a backdoor. It can be an account with a fixed password, a small program silently listening for commands or a piece of code that activates on a special signal.

Difference between the front door and a back door

A backdoor can come from several quite different origins. Attackers install them after getting in for the first time, to guarantee an easy return even if the initial entry point is discovered and closed. Some manufacturers include them for ease of maintenance, with service accounts and the same password on every device, and they end up becoming a risk once they are made public. And there are cases of deliberate tampering with software.

They should not be confused with an ordinary flaw or vulnerability. A vulnerability is a mistake that someone discovers and exploits. A backdoor is placed there on purpose, for a specific use. In practice the effect is similar, because both open an unplanned path. But the intent is different, and detecting and handling them requires different approaches from security teams.

Once it is open, the door can be used for almost anything. Attackers use it to steal data, install other malicious programs such as ransomware or cryptocurrency miners, add the machine to a network of remotely controlled computers or spy for months. That is why finding a backdoor forces you to ask what was done with it while it was open.

Types of backdoor by origin

Web shells and trojans installed after an intrusion

The backdoor an attacker leaves behind after an intrusion is the most common kind. When a criminal manages to get into a website or a server, the first thing they usually do is leave one or more hidden access points. That way, if the owner detects the intrusion and changes the password, the attacker can come back. On web servers they usually take the form of web shells, small files that provide a full control panel, such as the well-known c99 or China Chopper, and on computers the form of remote access trojans, or RATs. On websites, these access points are disguised among legitimate files, with names that look normal, or hidden inside plugins and themes.

Many cases of websites that get infected again and again have this origin. The owner cleans up the visible malicious file, and a few days later the problem comes back. Behind it there is another door that nobody found. That is why professional clean-ups always look for several access points, and they usually include changing every password, reviewing the users and checking the backups in case they also contain the problem.

Hidden factory accounts in connected devices

Some devices and programs include maintenance accounts created by the manufacturer, with the same username and password on every unit. Designed to make support easier, they become a risk if someone discovers them. Cameras, routers and other connected devices have suffered from this problem many times. In 2016, the Mirai network gathered hundreds of thousands of cameras and video recorders that still had their factory credentials and used them to launch some of the largest denial-of-service attacks recorded up to that point. The recommendation is to always change the default passwords of any new device, disable unused services and keep the firmware up to date. It sounds obvious, but millions of devices are still running with factory passwords. It is one of the reasons why the security of connected devices is a growing concern for authorities and businesses.

Backdoor in the software supply chain

The most unsettling case is a backdoor deliberately introduced into a legitimate program, which is then distributed to thousands of users.

How a supply chain attack reaches thousands of servers

It can be planted by an employee, a contributor to an open-source project or an attacker who compromises the vendor. Anyone who installs the program trusting its origin, and keeps it updated as recommended, unknowingly receives the backdoor.

It is the hardest variant to fight, because it attacks the trust on which the entire update system is built. It takes someone reviewing the code with a critical eye, something open-source projects try to do, but which is not always possible with volunteers and limited resources. The XZ Utils case, which closes this article, is the clearest example of this threat.

Cryptographic and hardware backdoors

The hardest ones to prove live in the mathematics or in the silicon. An encryption algorithm can be designed with a weakness that only its author knows about. That is what is suspected of the Dual EC DRBG random number generator, which NIST approved in 2006 and which two Microsoft researchers warned in 2007 could hide a master key. Documents leaked by Edward Snowden in 2013 pointed to the NSA, and NIST withdrew it the following year.

In 2015, Juniper discovered unauthorised code in the operating system of its firewalls that allowed access with a fixed password and the decryption of traffic from its virtual private networks. In hardware, chips and firmware can hide undocumented functions, which is why some governments have restricted equipment from certain manufacturers for fear of hidden access.

Maintenance access and website backdoors

Legitimate exceptional access and the debate it sparks

Not every backdoor is born from a crime. Some manufacturers leave maintenance access to debug errors or recover locked devices, and sometimes they forget to close it. At other times it is imposed by pressure from a government demanding special access to encrypted content to investigate crimes. It has been an open debate for decades, with public safety arguments set against privacy arguments. Security experts usually warn that a backdoor designed for the good guys also serves the bad guys once it is discovered or leaked. Special access is a weakness in the system, and there is no way to guarantee that only the right people will use it. History is full of examples of maintenance access that ended up in the hands of attackers.

A backdoor on a compromised website

On websites built with content management systems and shops, such as WordPress, Joomla, PrestaShop or Magento, it is one of the most common problems after a hack, and custom-built sites are not spared either. After getting in through an outdated extension or a weak password, attackers leave hidden files that let them come back. Sometimes they add an administrator account that goes unnoticed, or modify a template’s code so that it runs remote commands. All of this survives a password change if it is not thoroughly cleaned.

There are also cases of backdoors in legitimate extensions. In 2022, a well-known company selling plugins and themes for WordPress suffered an attack that added malicious code to dozens of its products, so thousands of websites that had downloaded them from its official site were infected. It is the extension-world equivalent of tampering with a vendor, and it shows that trusting the source is not an absolute guarantee.

When an infection has been confirmed, the safest option is to rebuild from a backup taken before the intrusion.

How to detect them and reduce the risk

How a backdoor is detected

Finding them is hard because their whole purpose is to go unnoticed. Some signs are files that nobody recognises, administrator accounts that were never created, strange scheduled tasks, outgoing connections to unknown destinations, recent changes to files that should not change, strange redirects from search engines or mobile devices and servers sending emails that nobody wrote. Analysis tools compare files with known clean versions and look for suspicious code patterns. In companies, intrusion detection systems and centralised logs help reveal unusual activity. Code audits review in-house and third-party software, and integrity checks make sure nothing changes without authorisation. No technique is foolproof, so the most reliable approach is to combine several and repeat them regularly. If the attack has already succeeded, the next step is to recover the hacked website and close the hole that allowed it.

How the risk is reduced

Defence starts with not trusting what you do not know. Installing software only from official sources, removing what is not used, keeping everything updated and changing the default passwords of devices closes off many possibilities. Limiting write permissions on the server and watching for changes to important files makes it harder for an attacker to leave something hidden.

If you suspect that one exists, cleaning up only the symptom is not enough. You have to find out how the attacker got in, close that route, change every credential and, in serious cases, rebuild the system from a clean backup stored off the server and taken before the intrusion. Whoever leaves one backdoor usually leaves several, and trusting a compromised system again without reviewing it thoroughly is a risky bet.

The origin of the backdoor in shared systems

The concern is as old as shared computers. A report for the United States Department of Defense, led by Willis Ware in 1970, was already warning about the hidden traps a programmer could leave behind. In 1984, Ken Thompson, one of the creators of Unix, explained in his Turing Award lecture how a tampered compiler could insert a backdoor into every program it compiled without leaving a trace in the source code. His conclusion was that trusting the source code is not enough if you do not trust whoever built the tools.

In 1993, the US government proposed the Clipper chip, which encrypted phone calls but kept a copy of the keys for the authorities, and the backlash was such that it was abandoned within a few years. In 1998, the Cult of the Dead Cow group released Back Orifice, a remote control program for Windows that made the term popular with the general public.

In 2020 it was discovered that attackers had inserted a backdoor, named Sunburst, into the updates of SolarWinds’ Orion software, which were received by some eighteen thousand organisations, including several US government agencies. It was the most serious warning about the supply chain until the XZ Utils case.

Two years of patience to slip malicious code into a compression library

On 29 March 2024, the engineer Andres Freund, who was working on a database, published an unsettling warning. He had noticed that secure connections to his test machine were taking a moment longer than usual and using more processor time. Following that tiny trail, he reached a compression library called XZ Utils, present in most Linux systems. It contained a backdoor.

The library was maintained by a single person, on a voluntary basis. From 2021 onwards, a new contributor using the name Jia Tan had gradually earned his trust with useful contributions, while other accounts pressured the maintainer to hand over more responsibility. Eventually the newcomer obtained permission to publish releases. Versions 5.6.0 and 5.6.1, from February 2024, included the malicious code, hidden in test files.

The vulnerability was given the highest possible severity rating, ten out of ten. The backdoor allowed anyone holding a certain secret key to run commands on the affected servers through the secure connection. It was detected before those versions reached most stable distributions, which averted a potential disaster on a global scale. The names used appear to be pseudonyms of an organised group.

The case of that compression library left several lessons. A critical project depended on a single exhausted volunteer, a well-known weak point. The attackers showed years of patience to gain trust. And the discovery was almost a stroke of luck. The community reacted by reviewing similar projects and supporting maintainers, but the episode was a reminder that much of the digital infrastructure rests on pieces maintained by very few people.

Frequently asked questions

Frequently asked questions about Backdoor

What is a backdoor?

It is a hidden way into a system that allows access while bypassing the normal controls, such as the password. It can be installed by an attacker after an intrusion, to come back whenever they want, or be hidden inside a program from the moment it is created, sometimes deliberately.

Where does the term backdoor come from?

It comes from the image of a house with a guarded main entrance and another hidden one through which someone can pass unseen. In computer security it refers to any access route that is neither documented nor authorised by the person responsible for the system.

Who creates a backdoor?

Attackers, to keep access after an intrusion. Sometimes manufacturers themselves, for convenience, in the form of maintenance accounts with fixed passwords. And in serious cases, people who insert malicious code into legitimate programs, as happened with a widely used compression tool in 2024.

What types of backdoor exist?

You can distinguish those left by an attacker after getting in so they can return at will, those that come from the factory as forgotten maintenance access and those hidden in software, for example in a library or an update. They also exist in the hardware and firmware of certain devices. All of them share the goal of bypassing normal authentication.

How is a backdoor detected?

You need to look for files nobody recognises, administrator accounts that were never created, strange scheduled tasks, outgoing connections to unknown destinations and recent changes to files that should not change. Analysis tools compare files with clean versions and intrusion detection systems flag unusual activity. No technique is foolproof, so it is best to combine several.

How do I know if my website has a backdoor?

There are signs such as unknown files, administrator accounts you did not create, strange redirects or a server that sends email without your permission. Security scanning tools and review services help detect them. If you have any suspicion, it is wise to ask for professional help.

Is deleting the suspicious file of a backdoor enough?

Almost never. Attackers usually leave several backdoors in different places. If only one is removed, they get back in through another. That is why, after an intrusion, the whole system has to be reviewed, every password changed and, often, everything restored from a clean backup taken before the attack.

How do you prevent a backdoor?

By keeping everything updated, using only programs from trusted sources, limiting permissions, protecting accounts with a second factor and watching for changes to files. It also helps to keep clean backups that let you return to an earlier state whenever there is reasonable doubt.

I remove backdoors and hidden access points

If your website has been infected more than once, a hidden backdoor is probably still there. I can find it and remove it completely.

About the author

Javier Afán

WordPress developer specialised in security, WooCommerce, and hacked website recovery.

I work on WordPress from a technical angle focused on security, architecture, and the decisions that really affect a project's continuity.