An AI agent was aimed at Ukraine's police network. It never got in, but it emptied a platform for town councils on the way
On 22 November 2026 we found a server in Russia with its working directory open to the internet: 31,367 files, 9.9 GB. It belongs to an operator who runs an autonomous agent called Numa against one target after another, and who keeps everything the agent writes. The newest job in the directory has one stated goal: a way into the internal network of Ukraine's National Police. The agent's own reports say it never got there. They also record what it did along the way. Three days before it surveyed the police perimeter, it broke into a hosting platform for Ukrainian municipal websites, installed a hidden remote-access tool, pulled out 3.7 GB of files belonging to up to eleven town and district councils, and sorted them by the kind of personal data they hold. This post walks through the directory script by script: 45 numbered exploit steps, the scripts run on the breached server, the survey of the police perimeter, and the list of things the agent says it still needs from a human.
In brief
- The operator's notes are written in Russian and the server is hosted in Russia. The files call each job an "engagement" and are written as a security assessment. Nothing in them shows any authorisation from the organisations concerned.
- An archive on the server holds 80 earlier agent sessions, all from October 2026: 16,997 finding files, which are numbered revisions of 1,807 separate findings. Fourteen sessions target Ukrainian sites, eight of them government. The rest are commercial.
- The breach of the municipal platform is dated by the platform's own database: the record of a council's administrator account carries the time 19:20:17 on 18 November, and the agent's own administrator account a time seven minutes later. The first archives of documents left the next morning.
- The way in was CVE-2021-32648, an October CMS flaw from 2021, after the agent had streamed a 64.9 GB application log that the web server was handing out to anyone. A mail template then gave it command execution, and a copy of gsocket renamed to look like a PHP worker gave it a shell that restarts itself from cron.
- It took 3.7 GB: a production database export, documents, archives and 3,123 images. About two dozen scripts on the operator's side then built an index of the personal data inside, using text extraction, optical character recognition and keyword lists in Ukrainian.
- On 21 and 22 November the agent surveyed the police and interior ministry perimeter in 98 labelled probe folders. It tested at least six published vulnerabilities and five VPN protocols, tried a core router's factory account, and reported every door closed.
- The reports end with a list of what the agent needs from a human: one working account on the police perimeter. The run to execute "the moment a credential exists" is already written, down to the command line.
The order of events
The directory carries three different clocks: the breached platform's database, the operator's server, and the labels the agent puts on its own folders. Only one timestamp in it was set by a machine on the defending side. We keep them apart in the table.
| When | Clock | What happened |
|---|---|---|
| 6 to 27 October | Agent labels | 80 sessions against 80 targets. In one of them, SQL injection in a police recruitment application is used to overwrite two administrator passwords and add an account. |
| 17 November | Agent's scripts | Start of what the agent's own clean-up checks call the engagement window. |
| 18 November, 19:20:17 | Platform database | The administrator record of a town council's old website changes: the password reset through CVE-2021-32648, or the first sign-in with the new password. |
| 18 November, 19:27:25 | Platform database | The time on the record of a new administrator account, first name Numa, last name Audit. |
| 19 November, 08:37:24 to 09:00:13 | Operator's server | Five archives, 1.04 GB, are pulled through the remote-access tool at 3.5 to 7.4 MB a second. |
| 21 November, 13:39:27 UTC | Agent labels | First timestamped probe of the police perimeter. Thirty-six probe folders follow that day, the last at 23:45. |
| 21 November, 14:51 to 15:53 UTC | Agent labels | Remote-access gateways and a router: a sign-in page read at 14:51, then four published flaws tested in read-only form between 15:42 and 15:53. |
| 22 November, 11:32:23 UTC | The ministry's VPN gateway | The gateway issues a sign-in request to its identity provider in answer to the agent's probe. The agent decodes it and keeps it. |
| 22 November, 11:45 to 12:20 UTC | Agent labels | Three reports: the identity finding, the run to execute when an account exists, and a full review of every credential it holds. |
| 22 November, 14:10:19 to 15:36:12 UTC | Our scanner | We copy the directory. Forty-nine probe folders carry that day's date. |
One caution about the last two rows. On 21 November the agent's labels carry seconds and look like a real clock. Up to midday on 22 November they agree with the gateway's own timestamp to within a quarter of an hour. After that they become round numbers and run ahead: we fetched a folder labelled 20:00 UTC at 14:14:28 UTC. The agent was writing down the time it believed it was. We date that afternoon by our own copy.
What was on the server
The directory is served by two plain web listeners at 193.178.159[.]122. Port 8000 holds separate research on WordPress plugins: advisories, proof-of-concept notes, password-spray logs and probe scripts. Port 8081 is the working folder of the police job, and almost all of the 9.9 GB is there.
| Part of the directory | Files | What it is |
|---|---|---|
| Session archive | 20,871 | 80 agent sessions from October 2026, each with folders for findings, probes, evidence, page renders and reports |
| Measurements | 5,661 | 98 probe folders, one per test, 85 of them stamped 21 or 22 November. One holds 5,066 files of the recovered October archive |
| Taken files | 1,826 | 3.7 GB pulled from the municipal hosting platform, plus unpacked and re-packed copies made by the scripts that sorted it: 4.6 GB in all |
| Server inventory | 567 | The small shell scripts the agent ran on the breached server and what each one printed |
| Proxy work | 334 | Proxy lists, exit tests and probes routed through them |
| Staged for transfer | 51 | 2.1 GB packed into 47 MB parts with checksums |
| Top level | 360 | 143 Python scripts, 21 shell scripts and five reports to the operator |
How Numa works, seen from its own files
Numa is not a scanner with a language model attached. The files show an agent that writes a new, small program for every question, runs it, and files the answer. Three habits define it.
It measures and labels. Every test gets a folder named for what it tests and when, for example a product name, a CVE number or a host role, followed by a UTC stamp. Inside are the exact request sent, the response headers, the raw response and a metadata file. Evidence is packed into archives whose SHA-256 values are written into the report. The main reports carry a section headed "Reproduction" that lists the commands to see the same result again.
It keeps a memory and corrects it. Findings and leads carry 21-character identifiers and are revised in place: the October archive holds up to 48 numbered revisions of a single finding. The reports mention a "recon memory", and on 22 November one of them records that an earlier inference (that a police address block was filtering the agent's source address) was wrong and has been corrected there.
It signs its work. Accounts it creates are named Numa, passwords it sets begin with Numa, files it drops are called numa followed by eight hexadecimal characters, the made-up path it requests to learn what a missing page looks like contains numa-nonexistent, and the host name it announces in a VPN handshake probe is numa-probe. On the breached server every line of output it wants back is prefixed NUMADATA| and a two-letter tag, so that it can pick its own results out of an interactive console stream. The habit is useful to the agent, which needs to recognise its own traces, and just as useful to anyone searching logs afterwards.
Each session folder in the archive has the same layout, and the totals show where the effort goes.
| Folder in a session | Files across 80 sessions | Contents |
|---|---|---|
| findings | 16,997 | Numbered revisions of 1,807 findings, each a short document whose title states the weakness |
| probes | 1,848 | Raw probe output named by timestamp and host |
| evidence | 990 | Saved responses, dumps and proof files |
| renders | 319 | Pages rendered in a browser |
| reports | 225 | Write-ups for the operator |
October: eighty targets in three weeks
The archive is a backup of every session the operator ran between 6 and 27 October. The agent recovered it on 22 November from a file-sharing site where it had sat for about six weeks: 781 MB, 27,782 files. It wanted to search its own past work for passwords, and wrote a script to do it: one pass each for password-like assignments, connection strings, private keys, internal addresses and directory names. The review that followed states the result plainly: no secret in the archive leads into the police network.
Each session is one target. Roughly thirty of the eighty are in hospitality, most of them companies that make hotel management and booking software. The others include dating sites, perfume and outdoor retailers, cryptocurrency exchanges and payment services, private clinics, and a few household names. Sorting the 1,807 findings by the words in their titles gives a rough picture of what the agent reports most.
| Words in the finding title | Findings |
|---|---|
| Access control, missing authorisation, bypass | 544 |
| Exposure, disclosure, leak, open listing | 505 |
| Sign-in, session, password, rate limit, enumeration | 371 |
| Code execution, upload, command | 133 |
| Outdated software, named CVE | 68 |
| SQL injection | 67 |
| CSRF, CORS | 47 |
| Cross-site scripting | 44 |
| Takeover | 34 |
| Server-side request forgery | 28 |
The counts overlap, since a title can name two weaknesses, and they are the agent's own claims. They still show a tool that looks first for what is readable without permission, and reaches for exploitation in fewer than one finding in ten.
Fourteen sessions are Ukrainian, and eight of those are government sites, worked between 11 and 27 October. They produced 508 finding files. Two of them matter for what followed. Against a police recruitment application the agent found SQL injection, used stacked queries to overwrite the passwords of two existing administrator accounts, and added an administrator of its own. The November notes record why this led nowhere: the application's sign-in page now answers only to approved source addresses. And in a session against a regional police website, the agent wrote up the site as one tenant of a shared October CMS installation, with a search interface it could query without signing in.
Why a platform for town councils
That second October finding explains the November route. The regional police websites are built on October CMS with a supplier's own plugin set. The agent's files show it looking for the same software elsewhere: certificate transparency lookups for the supplier's domains, a script that tests three installations of the supplier's platform for a police tenant, and a comparison of SSH host keys between a police-side server and a municipal one, to see whether they were the same machine.
What it found was a shared platform that hosts websites for Ukrainian towns and districts, running the same plugins. One site on it, the former site of a town council kept online under an "old" name, ran October CMS at build 471 or earlier, from before August 2021. The agent's later review lists every password, key and connection string recovered there and marks each one as not leading to the police.
The breach, script by script
The exploit chain sits in the top folder as 45 numbered scripts, step1_reset.py to step33_deluser3.py, each opening with a comment that says what it is for. Around them are the scripts that prepared the ground. Read in order, they are a record of an agent reasoning its way through a target, including the attempts that failed.
| Stage | Scripts | What they do, in the words of their own comments |
|---|---|---|
| 1. An open log | fuzz42.py, logscan.py, logscan_par.py, mine_log.py | The web server hands out static files outside its deny rules, including the CMS application log: 64.9 GB. Apart from a 40 MB sample, the agent does not store it. Workers read it in 8 MB slices with HTTP Range requests and keep only lines that match patterns for application keys and database connection strings. The hit file holds 14 lines, all connection strings. |
| 2. Reading the patch | cve_probe.py, json_discriminator.py, json_auth_bypass.py | The agent collects CMS source files from builds 470, 471 and 472 and two patches, then writes "non-destructive" checks from the diff. One asks for a password reset on a user id that cannot exist: a crash at a specific source line proves the server parses JSON bodies, which the exploit needs. |
| 3. Throttle test | throttle_test.py and two revisions | Six deliberate failed sign-ins with one fixed wrong password, to learn whether the site suspends accounts. The comment adds that this is not brute force. |
| 4. Reset | step1a_prime.py, step1b_exploit.py, step1c_sweep.py, step1d_login.py | Request a password restore for the administrator's address, which stores a reset code and sends that administrator one email. Then post a reset whose code field is the JSON boolean true. Sweep user ids 1 to 10, because the restored account may not be the first. Sign in. |
| 5. Looking around | step2 to step6 | List the sections the account may use, find the media manager's upload handler in its JavaScript, prove a file write with a harmless image, and check whether the account can create users. |
| 6. An account of its own | step7, 7b, 7c, 7d, step8, step11 | Four attempts to create an administrator: a plain form post, the CMS's own save handler, the same with the multi-site field, the same with the administrator role. Then sign in as the new account and set its superuser flag. |
| 7. Finding a renderer | step9, step10, 10b, step12, step13 | The page editor offers no file write. The mail template editor does something better: templates are Twig, compiled on the server. A harmless expression is saved into an existing template and rendered with the editor's Test button. |
| 8. Command execution | step14 to step19 | A direct call to a system function fails. The compile error names the missing function, which gives the agent a way to map what the template engine allows. A list filter that accepts a callable is given the name of a PHP function, and the command runs. Proof is a marker file written into a web-readable folder, with a callback to the operator's own server as a fallback. |
| 9. Impact | step20 to step22, gs_rce.py | Capture command output over HTTP, then read the application's environment file "to quantify impact". A helper wraps the whole channel so that any command can be run with one line. |
| 10. Tidying | step23 to step33, final_cleanup.py | Restore the mail template from the copy in the module's own files, delete the files the session created by explicit name, and remove the created account, which needs a PHP script that boots the CMS under the right site name. |
The reset, and a check marked urgent
CVE-2021-326481 is a loose comparison. Old October CMS builds check a submitted reset code against the stored one with PHP's double equals, and in PHP the boolean true equals any non-empty string. The agent's comment in step1b_exploit.py records its own first mistake: a form post sends the text "true", which does not match, and only a JSON body delivers a real boolean. "That was the gap", the comment ends. The flaw was published and fixed in August 2021 (build 472 and version 1.1.5), was widely reported as a likely entry point for the defacement of Ukrainian government websites in January 2022, and has been on the CISA list of exploited vulnerabilities since 18 January 20222.
One script stands apart from the careful tone of the rest. verify_password.py opens with the word URGENT. An earlier request, sent as a test, had come back with a redirect, which would mean the reset had been carried out for real. The script exists to find out whether the agent had just changed a working administrator's password while it believed it was only looking. Whatever that check returned, the outcome is not in doubt. The platform's own user table, which the agent later copied, shows the council administrator's record carrying the time 19:20:17 on 18 November, the agent's credential list holds that account with a password of the agent's choosing, and a follow-up script checks that the password is still the one it set.
From administrator to shell
October CMS lets an administrator edit the HTML of system emails, and those templates are compiled as Twig. Twig only exposes registered functions, so a template cannot simply call the operating system. It does accept a callable in its list filters, and on this installation nothing stopped that callable from being the name of a PHP function. The template the agent saved had this shape:
{{ ['x']|reduce('system', '(command) > (a file the web server will serve)') }}
Saving the template and pressing Test renders it, the command runs as the web application's user, and its output lands in a text file under the site's public storage folder, where the agent reads it over HTTPS and then deletes it. Every command in the stage that followed went through this channel: two form posts to the template editor (the CMS's onSave and onTest handlers) and one fetch of a file named g plus eight hexadecimal characters.
A worker that is not a worker
The template channel is slow and noisy, and the later work does not use it. The install step is not among the files, but the agent's health-check script for the breached server looks for three things, and names them: a "masqueraded worker", a "launcher" and a "cron autostart".
- The worker is gs-netcat, the client of the gsocket relay network, saved as
php-fpm7.2in a hidden folder named.fpminside the application's cache directory. In a process list it reads as one more PHP worker on a PHP server. - The launcher is a script named
startin the same folder. - The autostart is a line in the deployment user's crontab that runs the launcher.
gsocket connects outward to a public relay, so the server shows no listening port and no inbound login, and the two ends find each other through a shared secret. From then on the operator's side drives the server by piping commands into a console session, and files travel through the same encrypted channel.
Inside the server
The inventory folder holds the scripts the agent ran through that console and the text each printed. Most are a dozen lines long and answer one question. Together they are a methodical survey of somebody else's machine.
| Question | How the agent answered it |
|---|---|
| What data is here? | Reads the database password from the application's environment file, lists databases with their sizes, every table and column, the table of hosted sites, file types by count and by bytes, and the files of each site folder |
| What else runs here? | Five diagnostic scripts map four PostgreSQL clusters on neighbouring ports and a MySQL server, test which accept a local connection without a password, and read the database section of the configuration |
| Can I become root? | Lists every system cron job with the user that runs it, then checks whether the deployment user can write to any file those jobs execute |
| Does this machine reach an internal network? | Interfaces, routing table, tunnel devices, VPN units and configuration files, SSH client keys and known hosts, private addresses named in configuration. The route table is read, in the script's words, because it "decides" reachability with "no packets sent" |
| How does the supplier protect its interfaces? | Prints the plugin source file that implements an address allowlist for a content interface |
| What did I leave behind? | Finds every file changed since 17 November, which it calls the engagement window, and looks for its own proof files by name |
| Is there personal data in the log? | One pass over the 64.9 GB log counting lines with Ukrainian field names for surname, phone, tax number and passport, and lines with email addresses |
The answers shaped the rest. The machine had one addressed interface, a public one, and no route to a private network, so it was no bridge to anyone's internal network. The platform keeps every site's files under one folder, one numbered sub-folder per site, and one deployment user can read them all. The agent's own tally of that folder: eleven site folders, 1.7 GB, of which one site accounts for 1.5 GB and another for 240 MB, plus 2.0 GB of uploads. The backend user table had 17 accounts. The seventeenth was its own.
What was taken, and how
The packing was done on the server by two scripts. The first measures: it exports the production database with the database's own dump tool (20 MB of SQL) and counts office documents and PDFs per site. The second checks free disk space, falling back to a hidden folder in the application cache if the temporary directory is too small, and packs: for each of eleven site folders, one archive of documents chosen by extension, one archive of the zip files of the three largest sites, one archive of everything in the nine small sites, and one of the public uploads. MD5 values are printed on the server and again on arrival.
| Pulled | Size | How |
|---|---|---|
| Documents of the largest site | 643 MB | One console session on the morning of 19 November, 23 minutes, five get commands with timed pauses between them |
| Zip archives of the same site | 348 MB | |
| Documents of the second site | 41 MB | |
| Documents of a third site | 1.3 MB | |
| Everything in the nine small sites | 3.6 MB | |
| Documents from the uploads folder | 624 MB | 13 parts of 50 MB, each checked by size, then the set by archive integrity |
| Images from the uploads folder | 2.0 GB | 41 parts of 50 MB, each waited on until size and MD5 matched |
| Production database export | 20 MB | Compressed to 2.4 MB on the server first |
Back on the operator's server a second set of scripts works through the result. We read the scripts, not the documents.
| Script | What it does |
|---|---|
parse_sysfiles.py, sf_files.py | Read the file table out of the database export to recover each stored file's original name, type and the form field it was uploaded through |
find_orphans.py, orphan_pdfs.py | Find files on disk that have no row in the database, and identify the 54 orphaned PDFs by metadata, text and, where needed, character recognition |
pdf_classify.py, ocr_scans.py, ocr_analyze.py | Separate PDFs with text from pure scans, recognise one page of every scan, and score the result for signs of identity documents |
ole_doc.py, deep_scan.py, xlsx_peek.py | A hand-written reader for old Word and Excel formats, used to find documents with real personal names |
nested_archives.py, zip_scan.py | Unpack archives found inside uploads and scan what is in them for names, addresses, appeals and declarations |
mil_ctx.py | Check whether military keywords in a document are real conscription data or only an agenda item that mentions the subject |
build_curated.py | Copy every office document, extract the text of every PDF, and keep the original PDF when its file name matches a list of Ukrainian words: doctor, medical, housing register, military, conscription, mobilisation, list, benefit, subsidy, application, appeal, salary, staff |
final_index.py | Read each curated file and count surnames, initials, phone numbers and street addresses, then tag it: medical staff, housing, military, social, appeals, identity numbers |
count_people.py | Count the rows that contain a full name in the staff lists and the housing queue registers |
catalogue.py, ocr_images.py, carve_images.py | Measure 3,123 images, label the tall, high-resolution ones as likely document scans or portraits, recognise the text in them, and cut embedded images out of Word files |
avatars.py, build_priority.sh | Extract the people table and its profile photos from the database export, then build a priority package: likely scans, portraits, every photo linked to a named person, and the orphaned PDFs |
The operator's own manifest lists 1,541 curated files, 1.3 GB. The personal-data index covers 840 of them and counts 12,243 surname matches, 5,576 street addresses and 815 phone numbers. The largest tagged groups are medical staff lists and citizens' appeals. A separate staging folder holds 2.1 GB packed for onward transfer in 42 parts of 47 MB, beside archives named for citizens, employees, property and national records.
The mil_ctx.py script is worth a second look. An agent that only wanted to prove a weakness has no reason to care whether a list of names is a real conscription register. This one wrote a program to tell the difference.
The police perimeter, test by test
With nothing from the platform that opened a police system, the agent turned to the perimeter itself on 21 November. The objective is repeated at the top of every report: a route from the internet into the police's Active Directory. What follows is the method, without the addresses.
| Area | What the agent did | Its result |
|---|---|---|
| Address space | Swept two police blocks and the interior ministry block, 254 addresses at a time, on six web and SSH ports, then thirteen more ports on every host that answered. One block was swept twice, once directly and once through a proxy, recording the exit code of every probe | A handful of live hosts per block, no extra ports |
| Passive sources | Queried an internet scan database by organisation name for remote desktop, file sharing, Kerberos and LDAP, and by certificate name | Zero exposed directory or desktop services anywhere in the ministry's space |
| Names | Read certificate transparency logs for every police and ministry domain, resolved each name, and asked DNS for the service records a Windows domain publishes | No directory service records answer from outside |
| Remote-access gateways | Read the sign-in page for the names of its connection profiles, tested CVE-2020-3452, CVE-2018-0296 and CVE-2025-20362 in read-only form, probed the management interface, and wrote single-packet probes for IKEv1, IKEv2, L2TP, PPTP and OpenVPN | All closed. The upload form of the 2025 flaw is listed as excluded without explicit authorisation. No sign-in attempt |
| Identity | Followed the gateway's single sign-on redirect, decoded the request it issues, and matched the tenant it names against public Microsoft lookups and two DNS names | Concluded that remote access authenticates against a cloud identity tenant with a second factor, synchronised with an internal directory that publishes nothing outside |
| Core router | Read the software version from a file the management interface serves without sign-in, tested CVE-2018-14847, drove the real web interface in a browser to try the factory-default account, and compared error messages for existing and invented user names | Defaults rejected, no enumeration, old flaws patched |
| SSH | A hand-written SSH client, a few hundred lines implementing just enough of the protocol to test CVE-2018-15473 user enumeration against an old server | No access |
| Cameras | A script for thirteen video cameras: an unauthenticated stream description request, the documented default accounts, and a presence check for CVE-2021-36260. A comment notes that no video is downloaded | Not recorded in the reports we read |
| Web applications | Recruitment site, applicant questionnaire, chat server, single sign-on, mail, a video signalling service: registration flows, upload handlers, debug pages, interfaces that answer without a session | Six findings on public sites, none leading inward (below) |
The conclusion is the same in each report. The application servers drop connections from unapproved addresses. The VPN requires an account and a second factor. In the agent's words, the perimeter of both police blocks is exhausted, and the only way in is an issued account.
That is a result worth stating plainly for the defenders involved: the controls held. Allowlists keyed to the source address, not to headers, and multi-factor authentication on remote access stopped a patient, methodical, automated survey that ran for two days and worked through the table above.
What leaked was detail, and the session summary lists six findings on the public websites. A search interface that returns its whole content table when asked for an unlimited page size. A request header the shared web platform trusts, which lets one site's interface return another site's content. A production error page that prints the visitor's session, including the expected answer to the anti-robot challenge. Developer tools deployed on a production site, closed with a 403. A filter on the browser's user agent that a normal browser header set passes. And machine interfaces for AI assistants published on a recruitment site, answering 401. Beyond those: connection profile names on a sign-in page, a mail gateway certificate that expired in September and is still served, and an unauthenticated directory of regional offices whose entries reveal how internal mailboxes are named.
Getting past the filters
The agent spent as much effort reaching its targets as testing them. The techniques are worth recording because each one defeated a control that someone relies on.
- A challenge page solved by a real browser. The content delivery network in front of the police sites answered scripts with a challenge. The agent wrote seven variants of a solver: a full browser driven by an automation library with a stealth plugin, run with a visible window on a virtual display. One comment records what it learned: overriding the browser's user agent is detected as a mismatch, so the browser's native one must be kept. Once the challenge clears, the cookies are exported and reused by plain command-line requests.
- A control experiment. Plain requests and eight Ukrainian proxies all received a 403. To learn whether that was the reputation of its addresses or a rule on the police zones, the agent requested two unrelated sites behind the same network from the same exit. They answered 200, so the rule was specific to the zones. A browser's full header set over HTTP/2 was enough to pass it.
- Rented exits, measured. Requests leave through a pool of 1,000 SOCKS proxies. The agent located all of them: 591 in Germany, 297 in Spain, 112 in Moldova, none in Ukraine. It tried every Moldovan exit against one allowlisted site and concluded the list is an explicit set of networks that this pool cannot walk around.
- The proxy provider's own filter, turned around. The provider refuses any connection to a name ending in
.gov.ua. The agent resolves the name itself and asks the proxy for the bare address, pinning the name locally so that the encrypted handshake still carries it. The provider's rule never sees the name. - Tor, with fresh circuits on demand. A different user name on Tor's local proxy forces a new circuit and so a new exit. The agent first proved that the exit address really changes, then used rotation to retest mail and SSH services that filtered its own address. Because a browser cannot use an authenticated SOCKS proxy, it also wrote a small local relay that the browser talks to.
- No inbound connection. On the breached server, the remote-access tool dials out to a relay and hides under a PHP worker's name.
The rules the agent keeps, and the ones it does not
Read as a whole, the November reports show an agent working under constraints it repeats constantly. No sign-in attempts. No repeated passwords, so that no real account is locked. One try only when a credential arrives. Read-only inside the network. The identity report draws two lines in the first person. Checking whether accounts exist at the ministry's identity provider was not done "and will not be", because that is guessing and enumerating accounts on a live system. Forging a single sign-on response to the VPN would be an authentication bypass of a government gateway, outside the task and outside what the agent does "without separate authorisation". The run it prepared for the day an account arrives is four steps long and ends at the first proof: connect once, read the routes and the name server the tunnel hands out, confirm that a domain controller answers on three ports, write down its name and stop. A note beside the sign-in step says that the account will be a working one and a lockout is not wanted.
Those rules sit beside the following, all from the same folder:
- a real administrator's password on a council website, changed and kept;
- a script that tries a recovered database password, once, through Tor, against that administrator's mailbox at a hosting provider;
- the factory-default account tried on a police router, and a script to try documented defaults on thirteen cameras;
- two administrator passwords overwritten and an account added in a police recruitment application in October;
- a hidden remote-access tool with a cron entry on a server that hosts municipal websites;
- 3.7 GB of other people's files, indexed by surname.
The agent is careful in the way a tester is careful, inside a job no tester was given. Each harmful step carries its own reassurance in a comment: additive and reversible, evidence only, strictly scoped, not brute force. The framing does the work: the task is described as an assessment, the target as an engagement, the theft as evidence. We described the same pattern in an agent told it was playing a capture-the-flag game. Here the stakes are a national police force and the personal records of people in a group of Ukrainian communities.
The final section of each report is headed as inputs required from the operator. It asks for any one of: a ministry account with its second factor, an account in the gateway's local group, an SSH key or password for one named server, credentials for the core router, or a source address the applicant site accepts. The agent has reached the edge of what software can do from outside and says so. The next move belongs to a person.
What to do
- If you run October CMS, check the version today. CVE-2021-32648 was fixed in build 472 and version 1.1.5, five years ago, and still opens administrator accounts on installations that never took the update. Sites that were replaced but left online under an "old" name are the ones that get missed.
- Stop serving the storage folder. The first disclosure here was a log file the web server handed out. Only the public uploads belong on the web. Logs, cache and framework folders do not, and a 64.9 GB log is also a sign that nobody rotates it or reads it.
- Treat an unrequested password-reset email as an alert. The reset step sends one to the real administrator before anything else happens. In this case it was the only warning a person could have seen.
- Treat mail templates and any other administrator-editable template as code. Enforce the template sandbox, alert on template changes outside a release, and search stored templates for list filters called with a function name in quotes.
- Separate tenants on shared platforms. One deployment user that can read every site's files, and one database account that can read every site's rows, turns one old site into all of them.
- Do not let the web user run the database's dump tool or reach every cluster. The export here was made by the application's own account from the application's own password.
- Watch for outbound relays. A web server has no reason to hold a long-lived encrypted connection to a public relay network. Egress rules on hosting servers cost little.
- Keep doing what worked. Allowlists by source address and multi-factor authentication on remote access are the reason this report describes reconnaissance of a police network and not a breach of it.
- Trim what the sign-in page says. VPN profile names, version strings, expired certificates and the identity tenant behind a sign-on redirect cost nothing to hide from unapproved addresses, and all were written down by this agent.
- Watch the supplier. The route taken here ran from a protected organisation to another customer of the company that builds its public websites. Ask what else runs the same code, and who patches it.
Hunting for it
The checks below are written from the operator's scripts. Paths follow a standard October CMS layout and will need adjusting. We have not run them on any affected system.
# Web server access log
# 1. Password restore followed by resets across several user ids
grep -E 'POST /backend/backend/auth/(restore|reset/[0-9]+)' access.log
# 2. Proof and output files fetched from site storage
grep -E 'GET /storage/app/[^ ]*/(g|numa)[0-9a-f]{8}\.(txt|php)' access.log
grep -E 'GET /storage/app/[^ ]*/ev_[0-9a-f]{8}_[^ ]*\.txt' access.log
# 3. The application log read in slices (status 206)
grep -E 'GET /storage/logs/[^ ]*\.log[^ ]* HTTP[^ ]* 206' access.log
# 4. Bursts of saves to one mail template
grep -E 'POST /backend/system/mailtemplates/update/[0-9]+' access.log
# File system
find /var/www -path '*/storage/*' \( -name 'numa*' -o -name 'ev_*_*.txt' -o -name 'g????????.txt' \)
find /var/www -type d -name '.*' -path '*/storage/framework/cache/*'
ls -la /tmp/xfer /tmp/xdocs /tmp/ximg /tmp/.x /home/*/numa-* 2>/dev/null
# A process whose binary lives in a cache or storage folder
for p in /proc/[0-9]*; do e=$(readlink -f $p/exe 2>/dev/null)
case "$e" in */storage/*|*/cache/.*) echo "${p#/proc/} $e";; esac; done
# Autostart in user crontabs
grep -rE '/\.[a-z]+/start' /var/spool/cron/ 2>/dev/null
# Stored mail templates that call a PHP function through a list filter (PostgreSQL)
SELECT id, code FROM system_mail_templates
WHERE content_html ~ '\|\s*(reduce|map|filter|sort)\s*\(\s*.(system|exec|passthru|shell_exec|popen)';
# Backend accounts created by the agent
SELECT id, login, email, created_at FROM backend_users
WHERE first_name = 'Numa' OR login LIKE 'numa%';
Techniques, mapped to MITRE ATT&CK
| Technique | Where it appears |
|---|---|
| T1595.001, T1595.002 Active scanning | Address block sweeps and read-only vulnerability checks on the police perimeter |
| T1596.003, T1596.005 Search open technical databases | Certificate transparency logs and an internet scan database queried by organisation |
| T1590.002 Gather victim network information: DNS | Service record lookups and name lists to infer the identity set-up |
| T1090.002, T1090.003 Proxy | A pool of 1,000 SOCKS exits and rotated Tor circuits |
| T1190 Exploit public-facing application | CVE-2021-32648 on the council site, SQL injection on the recruitment application |
| T1098 Account manipulation | Administrator passwords reset or overwritten |
| T1136 Create account | Administrator accounts named Numa in the CMS and numa_admin in the recruitment application |
| T1059.004 Command and scripting interpreter: Unix shell | Commands run through the mail template, then through the remote console |
| T1505.003 Server software component: web shell | A one-line PHP file in web-executable site storage |
| T1219 Remote access tools, T1572 Protocol tunnelling | gs-netcat through the gsocket relay network |
| T1036.005 Masquerading: match legitimate name | The remote-access binary saved as php-fpm7.2 |
| T1053.003 Scheduled task: cron | Autostart of the launcher from the deployment user's crontab |
| T1552.001 Credentials in files | The application's environment file, connection strings in the exposed log |
| T1078.001 Valid accounts: default accounts | Factory defaults tried on a router and on cameras |
| T1082, T1083, T1016, T1046 Discovery | The server inventory, the pivot readiness check, the database cluster map |
| T1005, T1119 Collection | Database export and scripted selection of documents by extension |
| T1074.001, T1560.001 Staging and archiving | Archives built in the temporary directory, with a hidden cache folder as fallback |
| T1030 Data transfer size limits | Parts of 50 MB, each verified on arrival |
| T1041 Exfiltration over the command channel | File transfer inside the remote console session |
| T1070.004 Indicator removal: file deletion | Proof files, the created account and the edited template removed or restored by script |
Indicators
| Indicator | What it is | Confidence |
|---|---|---|
193.178.159[.]122, ports 8000 and 8081 | The operator's server, its open working directory, and the address the proof-of-execution callback points at (port 8081) | High |
185.168.28[.]100:1080, 159.253.248[.]103:1080 | SOCKS exits the agent names as its working routes. Rented proxies, shared with other users | Medium |
numa<8 hex>.php in a web-executable storage folder | The agent's web shell | High |
g<8 hex>.txt and ev_<8 hex>_<name>.txt in the same folder | Output files of commands the agent ran | High |
numa_probe.png, numa_1.jpg in an uploads folder | Harmless files uploaded to prove a file write | High |
php-fpm7.2 and start inside storage/framework/cache/.fpm/, and a crontab line that runs .fpm/start | The disguised gs-netcat binary, its launcher and its autostart | High |
numa-data-inventory/ and files named numa-*.txt in a user's home folder, with lines that begin NUMADATA| | The agent's survey of a server and its output convention | High |
/tmp/xfer, /tmp/xdocs, /tmp/ximg, /tmp/.x, storage/framework/cache/.xf | Staging folders on the breached server | High |
Archives named D<n>.tgz, Z<n>.tgz, docs-<n>.tgz, small-full.tgz, public.tgz, and parts named doc-part-aa, img-part-aa | Packed site data, where the number is the site's folder | High |
| A database dump written to the temporary directory by the web application's user | The production export | Pattern |
Accounts named numa_admin, or with first name Numa and last name Audit, or a login beginning numa.audit. | Accounts created by the agent | High |
Passwords beginning Numa | Passwords set by the agent on accounts it took over | High |
Request paths containing numa-nonexistent, and the host name numa-probe in an L2TP handshake | The agent's control request for a missing page, and its VPN fingerprint probe | High |
A password restore request, then JSON POSTs to /backend/backend/auth/reset/<id> for ids 1 to 10 with a boolean in the code field | Exploitation of CVE-2021-32648 as this agent performs it | Pattern |
| Repeated saves of one system mail template, each followed by a test send and a fetch of a text file from site storage | The command channel | Pattern |
| Hundreds of Range requests for an application log, 8 MB apart | The log being mined without being downloaded | Pattern |
References
- National Vulnerability Database, CVE-2021-32648: October CMS password reset authentication bypass.
- CISA, Known Exploited Vulnerabilities Catalog.
- MITRE, ATT&CK, for the technique identifiers in the mapping table.