From practice
Cyberattacks in the AI era: Why software solutions are under pressure - and what to do now
How AI is changing the threat posed by cyberattacks. 10 practical measures for securely developing and operating custom software.
Hardly a day goes by without headlines about a company suffering a successful attack. What has fundamentally changed in recent months is the speed at which vulnerabilities can be found and exploited. Artificial intelligence has dramatically shifted the balance of power: attackers use AI models to find vulnerabilities in IT systems automatically and write working exploits in very little time.
A game of cat and mouse has begun, and right now the attackers are setting the pace.
With off-the-shelf software, companies depend on vendors for security updates. With custom software, they can take action themselves. To do so, they need the right resources and need to know where to start. That is what this article sets out to show.
An uneven contest: Why AI alone is not enough
At first glance, the solution sounds simple: if attackers use AI, defenders can use AI too. In practice, the two sides operate under very different conditions.
An attacker may need only one vulnerability to get into a system, regardless of existing processes or rules. The software development team, on the other hand, must close as many relevant gaps as possible and faces structural disadvantages:
- Time: Many companies have taken a long time to recognise how disruptive AI has already become. Building expertise, introducing new security tools internally, allocating budgets and adapting processes all take time. Attackers have no compliance requirements and can act immediately.
- Systems that have evolved over time: Many business-critical software systems have grown over years, run reliably and handle countless special cases. An AI audit can identify many potential vulnerabilities quickly and suggest fixes straight away. The complexity that has built up over time makes every change to the code risky, especially since older systems often lack extensive automated tests. A seemingly harmless security fix can disrupt or even bring critical business processes to a halt without anyone noticing.
In short, even with the best AI tools, fixing vulnerabilities safely takes time. Today’s attackers give teams very little of it.
10 practical measures for developing and operating custom software
You need a combination of immediate protection and long-term hardening:
1. Run regular AI-assisted audits and use AI to write tests
Specialised AI cybersecurity tools such as OpenAI Daybreak, which I use myself, can find vulnerabilities that developers miss when they are too close to the code. These tools analyse the codebase, help validate and prioritise findings, and propose specific changes. These audits should become a regular part of software development, rather than a one-off exercise.
In practice, tools such as Daybreak illustrate the dilemma described earlier. The analysis and proposed fix can be ready in minutes, but the development team remains responsible for review, testing and release. AI tools can also miss vulnerabilities or report apparent vulnerabilities that turn out to be false positives. As a result, even with AI, it still takes time for changes to reach production.
Teams should therefore use AI to write missing automated tests as well as to find vulnerabilities. This lets them incorporate proposed changes with a much lower risk of unintended side effects. Tests that verify the vulnerability has actually been fixed are also important.
For new software, security should be considered when designing the architecture. AI can also help identify potential threats through threat modelling.
2. Monitor code dependencies continuously
Most software today depends on code written by third parties, including frameworks and open-source libraries. Security researchers regularly discover vulnerabilities in these dependencies. To find out about them early, use automated security scanners to check direct and indirect dependencies in code repositories for known vulnerabilities regularly, ideally every day. Relevant findings should trigger a notification. If you use containers, scan the images you run, including base images. Operating systems, web servers and other infrastructure components also need regular vulnerability checks and updates.
Scanners should be built into development and deployment, ideally running on every pull request and before every deployment, to prevent code with known, relevant vulnerabilities from reaching production.
Frameworks and code libraries should also be updated regularly to current, supported versions. For routine updates, it is worth allowing a deliberate waiting period (a cooldown) to reduce the risk of installing newly published libraries that contain malicious code as a result of supply-chain attacks. In such incidents, libraries may be tampered with through compromised developer accounts or build processes, for example. Security updates, however, should be installed without such a delay when urgency warrants it.
For my own projects, I have also set up an agent that looks daily for security advisories relevant to my software stack (the frameworks and programming languages I use), notifies me and suggests how to address them.
3. Drastically reduce the attack surface
Anything that is unreachable from the internet cannot be attacked directly from outside. Applications and APIs should clearly separate public and internal functions. Particularly sensitive functions need protection beyond their own authentication. Administrative areas, internal systems and sensitive interfaces must be kept off the open internet. Put them in isolated network zones behind extra access controls such as a VPN or a gateway that requires sign-in with a central company account before the application is even visible. Independently of those controls, every relevant request must be checked server-side to confirm that the user or service is allowed to perform the action and access the relevant data.
4. Apply least privilege and manage secrets
Two principles are essential:
- Principle of least privilege: Database users, API keys and service accounts should have only the permissions they need to do their jobs.
- Secrets management: Credentials, passwords and API keys should never go in source code or unprotected configuration files. Manage them centrally in a dedicated vault such as Google Cloud Secret Manager, which I use in my projects. Rotate long-lived machine credentials regularly and immediately if you suspect they have been compromised. Wherever possible, use short-lived credentials or managed service identities.
5. Carry out penetration tests
Code audits and dependency scanners primarily examine code and its dependencies. Many vulnerabilities can only be identified or confirmed reliably in a running application, such as faulty authorisation checks, misconfigurations or flaws in business logic. Regular penetration tests (pentests) in development or staging, using realistic and preferably synthetic or anonymised data, simulate targeted attacks against the running application, including from the perspective of a signed-in user. Production infrastructure and its configuration must also be checked for vulnerabilities. Any such tests must be carried out under clearly defined authorisation.
6. Log consistently and set up automated alerts
Log all relevant application activity reliably, especially security events such as failed sign-ins or unusual data queries (see also the next section). Keep passwords, access tokens and unnecessary sensitive personal data out of logs. Protect log entries from unauthorised access and tampering. The second step is crucial: logs are worthless if nobody reads them.
Automated alerting rules, optionally supplemented by an AI agent, can analyse log entries continuously so that the people responsible are notified promptly when suspicious activity occurs.
7. Block suspicious requests early with firewall rules
Securing your code goes hand in hand with setting rules in a web application firewall (WAF). A WAF can block unusual requests before they reach the application.
Combined with consistent logging, this creates an effective workflow: unusual patterns in the logs lead to new or stricter rules. AI agents can help automate the creation of those rules. Review and test rules before activating them to avoid blocking legitimate requests.
8. Protect accounts against identity theft
Even well-secured software is at risk if attackers obtain valid credentials. They can simply sign in. AI has also made phishing attempts much harder to recognise as fakes.
Traditional passwords have long been insufficient. Access to code repositories, cloud environments and administrative tools should use phishing-resistant methods such as passkeys or physical FIDO2 security keys. Unlike passwords or SMS codes, these methods protect against handing over sign-in credentials through fake login pages. Account recovery needs comparable protection. Centralised account management with single sign-on (SSO) makes it possible to revoke access across systems when there is a suspected incident or a staffing change. Existing sessions must also be taken into account.
9. Secure development and deployment infrastructure
The infrastructure used to develop and release software is a target in its own right. If attackers tamper with the automated build and deployment pipeline (CI/CD), malicious code can go straight into production.
Code repositories, build systems and deployment processes therefore need strong safeguards. These include protected branches, reviews of code changes and minimal permissions for automated processes. This is particularly important for AI agents, which are taking on more software development tasks. Give them access only to the systems and data they need for the task at hand.
10. Prepare for a successful cyberattack
Even with all these security measures in place, a successful cyberattack is still possible. That makes it important to decide in advance what to do, who is responsible and how to restore operations as quickly as possible.
Regular backups of data and system configurations are essential. Store them in a way that prevents attackers from altering or deleting the backups too. It is equally important to test system recovery regularly.
Security is an ongoing process
AI has drastically changed the threat posed by cyberattacks. Complete security is impossible. What matters is raising the bar for a successful attack as high as possible, properly isolating critical systems and protecting your codebase step by step with these measures. The more consistently you apply them, the harder it becomes for automated attacks to succeed.
Want to improve the security of your custom software? I’d be happy to help you assess and implement suitable security measures.
Discuss your cybersecurity needs