In today’s threat landscape, MSPs must defend themselves against AI-powered cyberattacks. In this blog, we’ll look at the emerging threats against MSPs and what strategies can be used to defend against this new category of threat actors.
Background
Since LLM technology first became mainstream, there have been concerns about the cybersecurity implications. Since the release of ChatGPT in 2022, tools have been created that do end-to-end pentesting (aka cyberattacks). This might seem a bit ethereal to the average person, especially since most LLM tools used on a daily basis have safeguards built in:

As a WAF provider, we were initially curious about this after noticing OpenAI and other providers starting to index MSP tools (just like a search engine spider). From a security perspective, we view such enumeration negatively, as it is the first phase of a cyberattack. We wrote WAF rules to block AI bots to prevent indexing, and moved on to other things.
We later noticed a trend: our AI search spider rules were blocking requests that appeared to be actual exploit attempts, and other rules were blocking attacks from specialized AI bots. At this point, we decided to investigate the threat landscape and the effectiveness of our own products with some real-world testing. The results were quite interesting.
MSP AI cyberattack threat testing methodology
When trying to cut through the ethereal and get to the heart of the technology, it can be a challenge. Ultimately, there are a variety of tools out there, with different levels of maturity, required setup, etc. After a failed attempt at getting PentestGPT configured, we landed on a very simple setup using the following tools:
- OpenCode (a command-line development tool that integrates with various LLMs)
- opencode-pentester (a set of AI agents/etc. for OpenCode that does the end-to-end attacking)
- OpenRouter – a multi-LLM platform that we used to connect OpenCode to our AI of choice (in this case, it’s DeepSeek V4 Flash 0731 )
All the software is open source, and DeepSeek is a very low-cost model. This stack was deployed on a basic Ubuntu VPS with modest resources. We opted for this arrangement since we think it best resembles what threat actors would use for AI-powered cyberattacks (and if the low-cost models are effective at exploiting systems, it stands to reason that the advanced models would be too).
We did a series of tests, and the results are as follows.
| Test | Complete takeover by AI? | Critical Findings | Total findings |
| Pre-test (no WAF) | Yes | 2 | 13 |
| Blackbox (attack WAF via IP) | No | 0 | 4 |
| Greybox 1.0 (attack WAF via URL) | Yes | 1 | 10 |
| Bigbox WAF (CloudFlare free tier) | Yes | 3 | 16 |
| Greybox 2.0 (attack WAF with anti-AI rules) | No | 0 | 5 |
AI against a known vulnerable system
As a pre-test, we set up our AI-powered cyberattack stack against a defenseless instance of the DVAPI. This is a training API for pentesting and contains a number of vulnerabilities. As expected, the bot was able to exploit the system. The assessment identified 13 total findings (2 critical, 2 high, 4 medium, 4 low, and one informational):
| ID | Severity | Title | CVE | Tool | Status |
|---|---|---|---|---|---|
| 316 | critical | NoSQL injection – authentication bypass on /api/login | none applicable | manual | exploited |
| 322 | critical | SSRF via /api/addNoteWithLink – arbitrary URL fetch incl. cloud metadata & localhost | none applicable | manual | exploited |
| 315 | high | Broken Authentication – weak JWT secret (secret123) allows token forgery / privilege escalation | none applicable | hashcat/manual | exploited |
| 321 | high | BOLA/IDOR – read other users’ private notes via /api/getNote (user-supplied username) | none applicable | manual | exploited |
| 314 | medium | Verbose error handling exposes stack traces + flag (Sever Misconfiguration) | none applicable | manual | confirmed |
| 317 | medium | Cleartext HTTP – no TLS/HTTPS (credentials & JWT tokens transmitted in plaintext) | none applicable | testssl | confirmed |
| 323 | medium | Missing rate limiting & account lockout on authentication (login brute-force permitted) | none applicable | manual | confirmed |
| 324 | medium | NoSQL operator injection in /api/getticket ticketno parameter | none applicable | manual | confirmed |
| 313 | low | Swagger UI / API documentation exposed without authentication | none applicable | manual | confirmed |
| 318 | low | Missing security headers on application pages | none applicable | nikto | confirmed |
| 319 | low | Non-standard 404 handling – catch-all HTTP 200 for unknown paths | none applicable | ffuf | confirmed |
| 320 | info | Framework fingerprinting via X-Powered-By: Express | none applicable | curl | confirmed |
| 325 | low | User enumeration via /api/register (username already registered response) | none applicable | manual | confirmed |
As you can see, all the buzz about AI-powered cyberattacks has some substance to it – the bot was able to identify that this was a DVAPI deployment, find working credentials, and perform a number of exploits. It was able to perform a complete takeover of the vulnerable system – establishing that the bot is a capable actor.

AI against a black-box WAF
When it comes to pentesting, different levels of information are given to replicate different threats. In our use case (external threat actor trying to mass-exploit systems on the Internet), we opted for a black-box test on the assumption that MSPs won’t be sharing their defense tactics with threat actors.
By default, the Automation Theory Reverse Proxy as a Service with WAF is configured to prevent enumeration on the Internet – so only the public IP would be known by an IoT scanner (no details about the application, underlying server, etc. can be determined). We gave the bot the IP of one of our test instances and ran the same test. The assessment identified 4 total findings (0 critical, 0 high, 1 medium, 1 low, 2 informational)
| ID | Severity | Title | CVE | Tool | Status |
|---|---|---|---|---|---|
| 29 | medium | TLS hostname mismatch: certificate CN=*.<REDACTED>.com does not match hostname <REDACTED> | none applicable | nikto | confirmed |
| 24 | info | Reverse proxy service identified via TLS cert (CN=*.<REDACTED>.com) | none applicable | nmap | confirmed |
| 25 | low | TLS 1.2 CBC ciphers enabled (LUCKY13 / CVE-2013-0169) | CVE-2013-0169 | testssl.sh | confirmed |
| 26 | info | Reverse proxy returns 503 for all paths/methods (no backend, no reachable application) | none applicable | curl | confirmed |
The bot flagged that the wildcard certificate didn’t match the IP address, that an older cipher suite was enabled (for compatibility), and otherwise identified that it was talking to a reverse proxy. However, it was unable to traverse the reverse proxy, locate the vulnerable application, or exploit it. All of these findings are for the reverse proxy itself, indicating 100% effectiveness in keeping the vulnerabilities away from the AI – as long as the attacking bot never learns the hostname.
This is the exact result we want in an MSP AI cyberattack scenario. But most MSPs can’t rotate an FQDN that’s been in production for years. So we stress-tested the harder scenario next.
AI cyberattack (1.0) against a grey-box WAF
While a black-box attack scenario is most likely, over the years we’ve seen a real-world trend: attackers scrape lists of infrastructure for domains, and then recycle those domains in future campaigns. For example, we’ve seen campaigns in which bots send WordPress exploits to RMM servers running Windows. The only way we could explain this behavior (which was systematic) is that the attackers were working from historical data (probably trying to exploit MSPs’ public websites). Given this pattern, we wanted to test the effectiveness of the WAF when the attacker knows which application is present and can communicate with the app (in essence, if an AI MSP attacker has the FQDN).
The results were different in an unexpected way. The AI took a different approach, likely due to the presence of the WAF. The assessment identified 10 total findings (1 critical, 6 high, 3 medium, 0 low, 0 informational). It seemingly decided to play capture-the-flag during this test, highlighting the non-deterministic nature of AI.
# | OWASP API Top 10 (2023) | Severity | Endpoint | Root Cause |
|---|---|---|---|---|
| 1 | API1 Broken Object Level Authorization (BOLA) | High | GET /api/getNote | No object-level ownership check on username param |
| 2 | API2 Broken Authentication (weak JWT) | High | POST /api/login, JWT | Hardcoded secret123; client-trusted isAdmin claim |
| 3 | API3 Broken Object Property Level Authorization (BOPLA) | High | POST /api/register | Mass-assignment of score at registration |
| 4 | API4 Unrestricted Resource Consumption | High | POST /api/profile/upload | No upload size limit (≥50 MB triggers flag) |
| 5 | API5 Broken Function Level Authorization (BFLA) | High | DELETE /api/user/<username> | No role check; only admin special-cased |
| 6 | API10 Unsafe Consumption of APIs (NoSQLi in auth) | High | POST /api/login | Unsanitized Mongo operator ($ne) injection |
| 7 | API7 Server-Side Request Forgery (SSRF) | Critical | POST /api/addNoteWithLink | Arbitrary server-side URL fetch; no scheme/host allowlist |
| 8 | API6 Unrestricted Access to Sensitive Business Flows | Medium | POST /api/addTicket | No rate limiting / anti-automation on ticketing flow |
| 9 | API8 Security Misconfiguration (verbose errors) | Medium | global (invalid JWT) | Production error handler returns full stack traces + secrets |
| 10 | API9 Improper Inventory Management | Medium | POST /api/allChallenges | Unreleased/hidden challenges exposed; flag in description |
The first interesting factor is that despite the critical vulnerabilities dropping 50%, the total number of high-severity findings grew (which might be an error made by the AI – the NoSQL injection listed as critical in the first test was detected again but classified as a medium-severity finding). We can see that the WAF was blocking malicious payloads, but the AI didn’t offer any observations about it. It created a user account via the registration link on the login page and then performed all the exercises.
Since the AI was able to compromise the application despite the WAF, this was the turning point for our experiment. It became obvious that we needed to enhance the WAF to block non-malicious requests from malicious sources. While most security practitioners lament the potential threat of AI bots, we’ve taken this as a design specification and created a new iteration of our product offering to protect against these threats.
However, one more data point was needed: how do the big-box WAFs handle this type of threat?
AI cyberattack against big-box (Cloudflare) WAF
In a previous blog post, we benchmarked Cloudflare’s WAF, and the free tier (which a number of MSPs use) didn’t perform well. The free tier of Cloudflare is designed for “high severity” threats (think national news headline events, like Heartbleed, Log4J, etc.). This is fine for general-purpose websites, but isn’t adequate for MSP tools.
We tested the free tier of CloudFlare (as we did before). The AI again took a different approach with this scan, detailing 3 critical, 6 high, 6 medium, and one low findings (noting that the previously critical SSRF vulnerability is still classified as a high-severity finding, and the weak JWT is now flagged as critical). The AI was able to perform a full takeover, and looking at the Cloudflare logs, we’re able to see that only 1.06% of the AI bot traffic was actually blocked.
| ID | Severity | Title | CVE | Tool | Status |
|---|---|---|---|---|---|
| 333 | critical | NoSQL injection in /api/login allows authentication bypass | curl | exploited | open |
| 335 | critical | Weak JWT HS256 secret allows admin token forgery (Broken Authentication) | python | exploited | open |
| 347 | critical | BFLA: DELETE /api/user/:username allows any user to delete arbitrary accounts (Ch5) | curl | exploited | open |
| 339 | high | BOLA/IDOR: /api/getNote retrieves arbitrary user’s note via username param | curl | confirmed | open |
| 340 | high | SSRF in /api/addNoteWithLink fetches arbitrary URLs incl internal services | curl | confirmed | open |
| 341 | high | Broken Function Level Auth (BFLA): admin-only /api/getticket callable by any user | curl | confirmed | open |
| 343 | high | BOPLA: register allows mass assignment of score and solves (Ch3) | curl | confirmed | open |
| 345 | high | NoSQL injection in /api/getticket exposes admin ticket (BFLA Ch5) | curl | confirmed | open |
| 348 | high | SSRF to internal flag service on port 8443 via /api/addNoteWithLink | curl | confirmed | open |
| 334 | medium | Sensitive stack-trace disclosure on /api/profile error handler (flag leak) | curl | confirmed | open |
| 337 | medium | auth session cookie missing HttpOnly/Secure/SameSite flags | curl | confirmed | open |
| 338 | medium | No rate limiting / account lockout on /api/login | curl | confirmed | open |
| 342 | medium | Improper inventory management: unreleased challenges 11-12 exposed (flag leak) | curl | confirmed | open |
| 344 | medium | Public Swagger UI /api documentation exposed (Ch8 misconfig) | curl | confirmed | open |
| 346 | medium | Profile upload accepts polyglot files; serves raw content as image (Ch4) | curl | confirmed | open |
| 336 | low | Missing security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy) | curl | confirmed | open |

Clearly, the free Cloudflare WAF won’t protect against AI MSP cyberattacks.
AI cyberattack (2.0) – robust defenses
The grey-box failure taught us a couple of things. First, AI bots aren’t just using traditional WAF bypass methods; they actually will send legitimate requests and payloads, and systematically test to determine the nature of the defenses. Second, once the AI can authenticate, it doesn’t need to use exploit payloads that WAFs normally block.
We set our sights on creating a system that would solve the general problem of identifying malicious bots. We ended up creating a behavioral scoring system that is an inverse duck test: if it doesn’t look like a duck, swim like a duck, or quack like a duck, it’s not a duck. These rules are designed to identify the bad-but-not-exploit requests and block them.
With that, our post-test with our AI identifying rules has one proxy-layer access control added: the login page is blocked. This resembles common industry practice, and since the DVAPI has a user registration process on the login page, preventing the bot from legitimately signing up creates a more realistic test scenario for us.
We continued to iterate over our rules until we hit two important benchmarks:
- We prevented a takeover of the application
- All critical vulnerabilities were mitigated
We were successful in this goal, with our new rules eliminating all critical vulnerabilities and bringing the total number of findings down to 5 (0 critical, 1 high, 3 medium, and 1 low):
ID | Severity | Title | CVE | Tool | Status |
|---|---|---|---|---|---|
| 328 | high | NoSQL injection in /api/register username (MongoDB operator injection) | none applicable | curl | exploited |
| 327 | medium | Verbose error / stack-trace disclosure on /api/profile invalid JWT leaks absolute paths + flag | none applicable | curl | exploited |
| 329 | medium | Username enumeration via /api/register NoSQL boolean oracle | none applicable | curl | exploited |
| 330 | medium | Missing rate limiting / no lockout on /api/register (unlimited account creation) | none applicable | curl | exploited |
| 331 | low | Security header / info-disclosure issues: x-powered-by: Express and permissive CSP with unsafe-inline | none applicable | curl | exploited |

While it might be unnerving that the WAF didn’t stop 100% of attacks, it’s important to remember that no security technology exists in a vacuum. The WAF reduced the total number of vulnerabilities by 62% and prevented the AI bot from breaching the application (even after it tried over 13,000 times to brute-force the authentication token).
During our final test, the WAF blocked 5,688 malicious requests. Our behavioral scoring accounted for 2,608 of the 5,688 blocked requests — nearly half – on top of everything the existing configuration caught.



Defending against MSP AI cyberattacks
For MSPs trying to defend themselves, getting defensive architecture in place before an attack is critical. As much as possible, we want to make the MSP surface area a black box, which was 100% effective in preventing the AI from seeing the vulnerabilities in the underlying application.
We’ve written extensively about this in the past, and our blog post, Defending the MSP Toolstack in a Zero-Day World, details the process. In a nutshell, getting infrastructure between the server and the Internet that can prevent enumeration is critical for creating the black box environment to secure the infrastructure. Many MSPs (with the best of intentions) fall into the trap of “majoring in the minors” and do lots of HTTP header hardening and TLS cipher suite tuning – but never address the issue of the server being naked on the Internet.
A Layer 7 reverse proxy with WAF is the gold standard for such a technology – and once the server is behind the proxy/WAF, access controls (like our login page restriction above) can significantly improve the security posture of the application.
Even when your MSP isn’t a black box, behavioral scoring will protect against advanced threats. Security has always been a multi-layer endeavor, and we think that a layer like this has a place in the stack of every MSP with on-prem infrastructure.