"AI-powered threat detection" usually means a product page. In practice, the useful part is narrower and very practical. Joomla and the web server already record most of what an attack looks like, and nobody reads those logs. An LLM is good at reading them, summarising, and pointing at the three lines that matter. It's bad at being the only control. This post shows what we do, starting with a real example.
What one site's logs showed
On a Joomla site we reviewed this month, we looked at Joomla's User Actions Log (#__action_logs):
| Event | Count, 9 July – 15 October 2026 |
|---|---|
| Failed logins | 43,307, of which 43,304 on /administrator |
| Successful logins | 130 |
| Usernames tried | 5 |
| Peak month | September: 28,752 failures |
| Source IP addresses | unknown: IP logging was off |
Three conclusions, and none of them needed AI. The admin login is under constant, low-skill password guessing. It's aimed at a handful of usernames the attackers have found or guessed. And we couldn't block by source, because the log didn't record it. The fixes are boring and effective: protect /administrator at the web server, enforce MFA, turn on IP logging (Users → User Actions Log → Options → IP Logging). They're in our hardening guide.
The point: most "threat detection" starts with reading what you already have. That's where an LLM helps, if you feed it the right extract.
Get the data out first
# terminal – failed logins per day, per target app and username (adjust the prefix)
mysql -e "SELECT DATE(log_date) AS day,
JSON_UNQUOTE(JSON_EXTRACT(message, '$.app')) AS app,
JSON_UNQUOTE(JSON_EXTRACT(message, '$.username')) AS username,
ip_address, COUNT(*) AS attempts
FROM jos_action_logs
WHERE message_language_key = 'PLG_ACTIONLOG_JOOMLA_USER_LOGIN_FAILED'
AND log_date > NOW() - INTERVAL 30 DAY
GROUP BY day, app, username, ip_address
ORDER BY day DESC, attempts DESC;" mydb > failed-logins.tsv
# admin actions that change the site: new users, group changes, extensions, config
mysql -e "SELECT log_date, message_language_key, user_id, message
FROM jos_action_logs
WHERE message_language_key REGEXP 'USER_(REGISTERED|UPDATED)|GROUP|EXTENSION_(INSTALLED|ENABLED)|CONFIG_UPDATED|PLUGIN'
AND log_date > NOW() - INTERVAL 30 DAY ORDER BY log_date DESC;" mydb > admin-changes.tsv
# web server: POSTs to the admin, and requests for PHP files in upload folders
awk '$6 ~ /POST/ && $7 ~ /^\/administrator/' /var/log/nginx/example.com.access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head -20 > admin-posts.txt
grep -E '"(GET|POST) /(images|media|tmp)/[^ ]*\.php' /var/log/nginx/example.com.access.log | tail -50 > upload-php.txt
Aggregate before you send anything to a model. Thousands of raw lines cost tokens and hide the pattern. One line per day, username and IP doesn't.
Where an LLM actually helps
1. A weekly digest a person will read
Nobody reads 40,000 log lines. Everybody reads five sentences. We send the aggregated files above with a fixed prompt:
You are reviewing security logs of a Joomla 6 site for its administrator.
Input: (1) failed logins aggregated per day/app/username/IP, (2) admin changes, (3) admin POSTs per IP,
(4) requests for PHP files in upload folders.
Write at most 8 bullet points:
- what changed compared with a normal week (volume, new usernames, new IPs, new targets);
- any admin change that looks unusual (new Super User, extension installed outside office hours, config changes);
- any request for a PHP file in images/, media/ or tmp/ that returned 200 – mark it URGENT.
Only state what the data shows. If something can't be determined from the data, say so.
The last line matters. Without it, models fill gaps with plausible stories ("likely a botnet from…").
2. Explaining one suspicious thing
A request you don't understand, a file you didn't put there, a plugin you don't remember installing. Paste it with context ("Joomla 6.2, this file appeared in images/ yesterday") and ask what it does. For obfuscated PHP backdoors (eval(base64_decode(…)) chains), an LLM decodes and explains in seconds what used to take an hour. Do this on a copy of the file, never by running it.
3. Reviewing extension code before you install it
For a small extension from an unknown vendor, ask a model to look for the classic Joomla mistakes: SQL built by string concatenation instead of bind(), missing Session::checkToken() on state-changing tasks, missing authorise() checks in controllers, file uploads without extension/MIME checks, unserialize() on request data. It's a first pass that tells you where to look, not a security audit.
Where it doesn't help
- As a control. An LLM in the request path deciding "is this request malicious?" adds latency and cost, fails open on outages, and can be talked into answers. Blocking belongs to the web server, the WAF and Joomla's own checks.
- On raw logs with personal data, unless you have decided that's acceptable. IPs and usernames are personal data. Aggregate, truncate IPs if you can, and know where the data goes.
- As the only reader. The digest is a prompt for a person to look, not a verdict.
Automating the digest
We run the extraction as a small script from cron on Monday mornings and send the files with the prompt above to an LLM API (the pattern is in calling LLM APIs from Joomla). The output goes to the site's admin mailbox. Ten minutes a week of reading has caught more problems for us than any security dashboard. That includes 43,000 failed logins like the ones above, which had gone unnoticed for three months.
