A backdoor is a hidden method of bypassing a system’s authentication mechanism. It allows unauthorized access, often without the knowledge of the system owner. Backdoors can be introduced intentionally (e.g., for remote administration) or by attackers.
Why it matters
In 2006, the US National Institute of Standards and Technology (NIST) published the standard NIST SP 800–90A, an algorithm for random number generation. The standard includes Dual_EC_DRBG, an algorithm with an algorithmic weakness that very likely allowed the NSA to break encryptions which made use of this random number generation algorithm. It’s a cryptographic backdoor.
In 2015, it was discovered that Juniper Networks’ Netscreen firewalls had hardcoded passwords (source).
In 2024, the XZ Utils backdoor was discovered by a professional software developer who wondered why a program used an unexpected amount of processing power. We were lucky. This backdoor introduced a vulnerability to the code which would have allowed attackers to bypass the sshd authentication. That would have been a big deal as it’s so widespread across the internet.
What can I do?
Leaking secrets is a common issue, especially for open source projects. It’s just easy to have a hardcoded password in the beginning of a project that is never removed. I’ve already written an article about how to deal with that:
Leaking Secrets How it happens and how you prevent it
The same tools allow you to search for secrets within your code.
When you want to find rootkits on your base-system, rkhunter might be useful.
For containers, you might want to make them read-only:
The only action that helps to make sure your code doesn’t have backdoors is to do code reviews and audits.
More in this series
In this series about application security (AppSec), we already explained some of the techniques of the attackers π and also techniques of the defenders π:
- Part 1: SQL Injections ππ
- Part 2: Don’t leak Secrets π
- Part 3: Cross-Site Scripting (XSS) ππ
- Part 4: Password Hashing π
- Part 5: ZIP Bombs π
- Part 6: CAPTCHA π
- Part 7: Email Spoofing π
- Part 8: Software Composition Analysis (SCA) π
- Part 9: XXE attacks ππ
- Part 10: Effective Access Control π
- Part 11: DoS via a Billion Laughs π
- Part 12: Full Disk Encryption π
- Part 13: Insecure Deserialization ππ
- Part 14: Docker Security π
- Part 15: Credential Stuffing ππ
- Part 16: Multi-Factor Authentication (MFA/2FA) π
- Part 17: ReDoS π
- Part 18: Backdoors π
- Part 19: Phishing π
The following articles are about to come:
- Secure Messaging π
- Cryptojacking π
- Backups π
- CSRF π
- Cookies π
- Clipboard Hijacking π
- Certificates π
- Content Security Policy (CSP) π
- Server-Side Request Forgery (SSRF) π
- JSON Web Tokens (JWT) π
- Social Engineering π
- Font Manipulation π
- (Sub)domain Takeover π
- Virtual Private Networks (VPNs) π
- Brute Force Attacks π
- Network Scanning π
- Mobile Device Management (MDM) π
- Cryptotrojans π
- Single-Sign-On π
- Race Condition Attacks in Blockchains π
- Network Separation π
- 3 Applications of garbled fonts most developers don’t know π