back to article Someone is slipping a hidden backdoor into Juniper routers across the globe, activated by a magic packet

Someone has been quietly backdooring selected Juniper routers around the world in key sectors including semiconductor, energy, and manufacturing, since at least mid-2023. The devices were infected with what appears to be a variant of cd00r, a publicly available "invisible backdoor" designed to operate stealthily on a victim's …

  1. I Am Spartacus
    WTF?

    Junos OS

    Anyone remember when routers were just routers. You booted your Cisco routers and they loaded from the master configuration. Not some botched implementation of FreeBSD. Oh those were that days. Sure they didn't do much more than, well, route packets. But they were secure (apart from the ones that the NSA installed their custom chips in, alledgedly). Mind you, I also remember some PFY deciding to "upgrade" the config files and losing all of them.

    1. Anonymous Coward
      Anonymous Coward

      Re: Junos OS

      For the last two years, "Junos OS Evolved" now runs on a linux kernel.

    2. Anonymous Coward
      Anonymous Coward

      Re: Junos OS

      And Cisco type 7 passwords. Naturally, the standard for admin passwords, readable 'hashes' default by anonymous guest login.

      Stock firmware, no custom 'chip' required. Installed everywhere, including places Uncle Sam would have definitely preferred to be locked down. Fun times!

      Mine's the one with the rosy tint.

    3. hoola Silver badge

      Re: Junos OS

      Ahh but everything has to be "software defined" now so that all sorts of funky stuff can be done with code.

      A few years ago people were wetting themselves with excitement over "infrastructure as code". Huge sums of money were blown to upgrade kit to do this.

      The only outcome appears to be an ever-increasing attack surface and the usual bug ridden mess of code. The real challenge is there are enough people around now at both the technical and manglement levels that "software defined" is the only thing they know. If you are not using software defined then if is considered legacy and should be replaced.

  2. pitrh

    Single Packet Authentication FTW, eh?

    Oh, nice to see somebody actually implemented Singoe Packet Authentication on an industrial scale.

    I'm sure portknockers-turned-SPAfanbois will be proud.

    For background, this reminds me strongly of of the fortunately long gone days of the noughties through the early twenty-teens when those who thought port knocking was an excellent idea, only to be more or less replaced by the Much More Secure And Actually Excellent idea of Single Packet Authentication.

    I wrote a rant about port knocking way back when, "Why Not Use Port Knocking?" (https://nxdomain.no/~peter/why_not_use_port_knocking.html, really part of the "Hail Mary Cloud" sequence -- summary up at https://nxdomain.no/~peter/hailmary_lessons_learned.html).

    I suppose you can say at least in some security contexts, size actually matters (at least the size of the data your adversary needs to get right in order to gain access).

    1. Missing Semicolon Silver badge

      Re: Single Packet Authentication FTW, eh?

      Mighty 404's there for those links!

  3. Fido

    It's not cyber war yet...

    When does the prepositioning end and the first cyber war begin?

    1. Anonymous Coward
      Anonymous Coward

      Re: Juniper Networks is an American corporation

      But how can that be ?

      Only evil Chinese Huawei routers do evil things

      1. Anonymous Coward
        Anonymous Coward

        Re: Juniper Networks is an American corporation

        hahaha, so true, all that false propaganda from the USA...

        1. Casca Silver badge

          Re: Juniper Networks is an American corporation

          Oh look. Two AC agreeing. How cute...

          1. Anonymous Coward
            Anonymous Coward

            Re: Juniper Networks is an American corporation

            If you live in a country under threat of American invasion - best not to have any criticism of them online.

            1. Nick Ryan Silver badge

              Re: Juniper Networks is an American corporation

              If you live in a country under threat of American invasion - best not to have any criticism of them online.
              With President Trump having given his sidekick Vice President Trump free reign to threaten anybody and everybody, the number of countries being threatened with invasion seems to be growing at one per day.

              1. Anonymous Coward
                Anonymous Coward

                Re: Juniper Networks is an American corporation

                On behalf of New Zealand can I say - we are glad to get missed off most maps

  4. AndrueC Silver badge
  5. Anonymous Coward
    Anonymous Coward

    Where Is That "Someone"? Guess!

    Quote: "....Someone is slipping a hidden backdoor....."

    Ha.....that "someone" might be located at Fort Meade??

    I think we should be told.

    1. Anonymous Coward
      Anonymous Coward

      Re: Where Is That "Someone"? Guess!

      "...US, UK, Norway, the Netherlands, Russia, Armenia, Brazil, and Colombia."

      Implies more like Israel, China, or North Korea.

      1. Anonymous Coward
        Anonymous Coward

        Re: Where Is That "Someone"? Guess!

        Or the Belgians. It's always the damn Belgians

        1. Paul Herber Silver badge

          Re: Where Is That "Someone"? Guess!

          Send for Tintin and Snowy. But not Captain Haddock, I never did like Captain Haddock.

          1. Androgynous Cupboard Silver badge

            Re: Where Is That "Someone"? Guess!

            Billions of BSD based BPF botherers!

          2. Anonymous Coward
            Anonymous Coward

            Re: Where Is That "Someone"? Guess!

            BLISTERING BARNACLES!

          3. hoola Silver badge

            Re: Where Is That "Someone"? Guess!

            No, you need Thomson and Thompson.........

            Or Professor Calculus with is pendulum.

          4. Anonymous Coward
            Anonymous Coward

            Re: Where Is That "Someone"? Guess!

            I bet you sniffed his fingers though!

          5. Joe Gurman

            Re: Where Is That "Someone"? Guess!

            Milou.

          6. John Brown (no body) Silver badge

            Re: Where Is That "Someone"? Guess!

            Poirot might be a better bet, if less fun :-)

        2. Anonymous Coward
          Anonymous Coward

          Re: Where Is That "Someone"? Guess!

          Nah, their tech is way behind...they still make wafers out of caramel and chocolate.

          1. John Brown (no body) Silver badge

            Re: Where Is That "Someone"? Guess!

            Isn't that Tunnocks? I thought they were Scottish, not Belgian :-D

        3. Kane
          Joke

          Re: Where Is That "Someone"? Guess!

          "Or the Belgians. It's always the damn Belgians"

          You must be mistaken. Belgium doesn't exist. I have it on good authority from people who live there.

          1. A. Coatsworth Silver badge
            Happy

            Re: Where Is That "Someone"? Guess!

            Please! Please, stop repeating the dreaded B-word. It is tripping my profanity filters in a billion languages!

      2. trindflo Silver badge

        Re: Where Is That "Someone"? Guess!

        Or Iran

        1. Anonymous Coward
          Anonymous Coward

          Re: Where Is That "Someone"? Guess!

          Nah, Iran can't be that bad...if they were Flock of Seagulls wouldn't have written a song about them.

          1. The Bobster

            Re: Where Is That "Someone"? Guess!

            But it's so far away!

            1. Anonymous Coward
              Anonymous Coward

              Re: Where Is That "Someone"? Guess!

              Good thing too...because you can't get away.

      3. Anonymous Coward
        Anonymous Coward

        Re: Where Is That "Someone"? Guess!

        Don't forget Iran.

        They have come a long way, and this doesn't seem to be a particularly technical job.

    2. Anonymous Coward
      Anonymous Coward

      Re: Where Is That "Someone"? Guess!

      Is there an equivalent "magic packet" for Cisco routers?

      (If the NSA or CIA had their way then the answer is probably YES.)

      It would not surprise me if all the things that Huawei were accused of doing with backdoors was just copied from the list of what the NSA and others had already done to Cisco routers.

      Anonymous for obvious reasons.

      1. Sandtitz Silver badge
        Stop

        Re: Where Is That "Someone"? Guess!

        "Anonymous for obvious reasons."

        Of course - so much easier to write gibberish as an AC than with your real handle here.

        1. Anonymous Coward
          Anonymous Coward

          Re: Where Is That "Someone"? Guess!

          Wibble.

    3. veti Silver badge

      Re: Where Is That "Someone"? Guess!

      Yep, we're totally going to be told that. Right after we're told which Reg commentards are based in St Petersburg, and the YouTube link for that pee tape...

  6. DS999 Silver badge

    If it is in memory

    Does rebooting permanently remove it? Because if not either something has been installed on it that makes it come back, or the hackers have an unpatched exploit they're using to put it back - and if that's the case then packet capture could reveal that attack allowing it to be patched.

    1. JamesTGrant Bronze badge

      Re: If it is in memory

      I don’t know - but if you turn it off and leave it off then you’re pretty safe. That’ll show ‘em!!

      1. Anonymous Coward
        Anonymous Coward

        Re: If it is in memory

        No man, it's a magic packet. That implies it works when the router is off as well.

    2. John Smith 19 Gold badge
      Unhappy

      "Does rebooting permanently remove it?"

      Exactly.

      I'm guessing but their position as VPN gateways and/or configured as remote managed suggests they are a) "Critical infrastructure" WRT their companies network b)Inaccessible. so difficult to "Cycle the power" as NASA likes to put it.

      But your logic sounds spot on.

      I'm not sure how many people realise eBPF is a Turing complete language running inside kernels.

      When I saw it it put me in mind of a neat way to do a debugger developed in "Undocumented dos" which I thought way cool.

      What could possibly go wrong with a full programming language available to all with kernel level access?

      1. Doctor Syntax Silver badge

        Re: "Does rebooting permanently remove it?"

        they are a) "Critical infrastructure" WRT their companies network b)Inaccessible. so difficult to "Cycle the power" as NASA likes to put it.

        In that case they become a SPoF, a situation which should have been avoided in the first place.

        1. Roland6 Silver badge

          Re: "Does rebooting permanently remove it?"

          This where Tandem Computers come into their own…

        2. John Smith 19 Gold badge
          Unhappy

          "In that case they become a SPoF,"

          Agreed

          But

          There are 2 issues.

          1) These sorts of situations have a tendency to grow slowly until one day it turns out that a failure here means a lot of people are deeply f**ked*

          2) The C-suites don't want to pay for redundancy.

          IMHO you have to talk to them in terms that mean something to them, like "X hours downtime --> Y currency units lost" and of course if you have 2 in parallel you can double throughput but stay running even if you have to shut one down.

          *Email being the poster boy for this stuff.

        3. hoola Silver badge

          Re: "Does rebooting permanently remove it?"

          Maybe, maybe not. It depends how everything works if you have some sort of failover or load balanced configuration. With the first the running configuration will be on the active and any passive nodes so may just flow over (or actually be there already).

          It may require a complete shutdown to clear. At that point all the redundancy available does not help.

      2. DS999 Silver badge

        I don't know about Juniper specifically

        But all enterprise routers I've worked with support redundancy, so you could reboot one while the other/backup/secondary takes over then when it is back up reboot the other. If Juniper doesn't support that then you chose the wrong router.

        Even if you don't have redundancy (i.e. it is available but the beancounters wouldn't spring for it) there are precious few organizations that can't handle VPN access going down for a few minutes on some late weekend night. Maybe someone has to reboot it in person, or at least you need some "smart hands" available in the datacenter if you're directing the reboot remotely in case things go wrong, but these are problems you run into with any maintenance type activity where you can't be 100% that something you rebooted while come back up.

        1. Anonymous Coward
          Anonymous Coward

          Re: I don't know about Juniper specifically

          Redundancy is great in principle but in reality there is always a central point of failure somewhere...the real trick to redundancy is in working out which point of failure is acceptable.

          1. Anonymous Coward
            Anonymous Coward

            Re: I don't know about Juniper specifically

            ...points are.... not point is.

    3. Anonymous Coward
      Anonymous Coward

      Re: If it is in memory

      Probably not, the malicious payload probably exists in either the bootloader or the UEFI partition. The way these sort of things work is when the OS is booted, a driver is injected before the OS is loaded...that way, when the OS itself is screened for possible backdoors and malware, you find nothing...these things can be introduced further up the supply chain (like at the board manufacturer) and on devices that are only ever meant to run a single OS, it's much easier to hide the malware because it can be smaller due to not having to be interoperable with more than one OS.

      This is how a lot of those cheap Chinese router boards are infected...simply erasing the pre-installed OS and installing your own is not enough. They know you're probably buying them for OPNSense or pfSense or something and can hide a payload specific to those operating systems that gets redeployed, even if you do a clean install.

      You also need to re-flash the firmware / BIOS with versions known to be clean, or versions that came straight from the developer (if you trust them) that can't have been tampered with in the supply chain.

      Trouble is, even though it's fairly simple to find these dodgy payloads, the methods used to get there are still seen as something of a black art...but once you know, you know and it becomes trivial to check for these things...

      1. You dump the BIOS (either via a command line tool or a chip reader, the latter is more reliable but the former is a lot easier).

      2. You extract it and analyse it with binwalk...essentially, extract the drivers and custom binaries then binwalk those as well. These binaries typically tend to be fairly generic across different products so some rough file size comparisons etc can be made...anything that is dramatically bigger (or even smaller), probably has a sus payload in it.

      3. Find a published copy of the firmware / BIOS on the internet (where possible) and do the same thing, compare what has been dumped from the device to what you see in the "legit" release.

      It's difficult to be specific on what you're looking for, because sometimes you uncover things that haven't been seen before and therefore it's not really possible to say "look for exactly this" because that would lead you to write off the possibility of a backdoor if you find nothing that meets a specific criteria...which is just as dangerous (if not more dangerous) than not checking at all.

      You could also do a checksum check, but that is very limited in what it tells you...all that tells you is that you're getting the binary that the developer intended to give you, it doesn't really tell you whether a binary is compromised or not...the developer themselves might not be immediately aware of supply chain tampering etc. like the SSH issue recently.

      1. Roland6 Silver badge

        Re: If it is in memory

        >” Find a published copy of the firmware / BIOS on the internet”

        I seem to remember when there was some PC UEFI malware, you had to install a special firmware image that wrote to ALL of the UEFI partition, to ensure the malware really had been purged.

        1. Anonymous Coward
          Anonymous Coward

          Re: If it is in memory

          Yes, absolutely. This is how you ensure that the malware is gone completely.

          It's a bit extreme following an infection to think that you have to throw everything out because "you can't be sure it's gone"...you absolutely can be sure*

          *as long as there are no blacked out chips on the board that you can't interface with and/or you can't zero the flash where the firmware sits.

          Clearing out a ROM is probably a bit of a dark art as it requires some specialist tools and specialist knowledge...but with the knowledge and tools it's not actually that difficult to do in the grand scheme of things...on a scale of 1 to uninstalling McAfee / Norton / Symantec Antivirus, I'd put it at about a 5 or a 6.

          I do a lot of stuff involving low level analysis of things...and even I struggle to remove McAfee and Norton / Symantec occasionally...removing those first time, every time, is the real dark art. It's the part where you have to gather in the woods at a specific time during an equinox with your fellow sysadmins in hooded cloaks and you have to roll 8 perfect D12 rolls in a row that makes it hard for me...I'm a low level engineer...I don't have any fellow sysadmins / friends...I am the guy that weirdos call weird...if you go down to the basement, walk past the techies, through the store room, past all the leaky carcinogenic chemicals and into the gents...I'm the guy with goggles and a lab coat on wearing flip flops next to the sink full of acid with an office in a toilet cubicle...you know, the guy that has loads of gadgets with batteries taped on the outside of a gadget that has two case sides that don't fit together anymore.

          1. Anonymous Coward
            Anonymous Coward

            Re: If it is in memory

            You are an Igor and I claim my £5

          2. Trygve Henriksen

            Re: If it is in memory

            How many Sysadmins do you gather in the woods?

            It should be 7. A lot of people think that it's 5 and to use Pentagrams.

            Poor deluded fools...

            7 because that's all '1's. In theory, 15 could also be used, but that always ends up in a fight between the BSD and the RedHat admins.

            Also, the hooded cloaks are so last century. An old, green Norwegian Army Sweater(wool, with velcro closing in the neck), and a cap of some sort works just fine in my experience.

            The main requirement is 'No Nylon, and Corduroy was never ever allowed, so there!'

            Reading firmware is fun. Used to do a bit of that back in the day, but never anything more complicated than 8bit stuff.

            (Need to get back into that. Got a few things I want to hack and modify)

      2. Anonymous Coward
        Anonymous Coward

        Re: If it is in memory

        I'm not going to disagree, because I don't know for sure, but it sounded to me like these routers have had an application installed on them, which apparently you can now do via docker containers..... whoever decided this was a good idea probably needs to leave the industry.

        1. Anonymous Coward
          Anonymous Coward

          Re: If it is in memory

          Yeah docker on a router is nucking futs.

    4. AbeSapian

      Re: If it is in memory

      I've been saying for a while that, with China making all the chips, they could bake the malware right into the hardware.

  7. fg_swe Silver badge

    And The Exploit Is ?

    The real question is how the baddy managed to insert his malware in running routers.

    Let me guess: a memory safety bug-exploit due to Hamburger Computing("C").

    Here is the fix: https://sappeur.di-fg.de

    Actually he does not need this crypto B.S. if he does not also patch the original exploit.

    1. Nick Ryan Silver badge

      Re: And The Exploit Is ?

      Magic nonsense does not fix sloppy coding, it just obscures the coding issues and produces even shoddier, less efficient and less transparent systems. This is a win for nobody.

  8. deevee

    Don't worry, its just the usual NSA/FBI/CIA backdoor required on ALL equipment Made In America.

    What could possibly go wrong?

    Meanwhile all the nice secure Huawei gear, without the backdoors, is banned from the USA.

    1. Anonymous Coward
      Anonymous Coward

      Keep believing that, sucker!

      1. Anonymous Coward
        Anonymous Coward

        The only misguided thing he said was Huawei gear being nice...because it usually isn't.

        US has a long history of form when it comes to putting backdoors in it's own kit. The US also has form when it comes to hiding information relating to key components of things that relate to cryptography for example the PRNG in Windows.

        https://www.microsoft.com/en-us/security/blog/2019/11/25/going-in-depth-on-the-windows-10-random-number-generation-infrastructure/

        See here for a "deep dive".

        Their deep dive is an absolute joke. It explains absolutely nothing. I haven't yet found any documentation that explains the maths, the entropy...anything useful...about the Windows PRNG...it is therefore impossible to know whether any encryption on Windows that relies upon it is actually reliable and as strong as it claims to be.

        The PRNG is used for generating pseudo-random data to be used in cryptography...it's a pretty fucking important thing...and yet, the general public at least, knows very little about it. Basically nothing.

        See the thing is, if you can compromise a PRNG and make it predictable, which is possible if you know the source of entropy and can tamper with it, you can make encryption incredibly easy to crack. It's maths like any other maths, if you know enough of the variables involved, you can derive the rest that you don't know....that's how the RSA backdoor worked in a nutshell...there was one fixed variable which allowed for the rest of the variables to be derived...it's basic algebra solving at that point.

        The PRNG in use on Linux is extremely well documented and it does have it's flaws (because flaws are unavoidable in PRNG, entropy is always a problem to a certain degree)...but because we can understand how it works, we can account for those flaws and mitigate them...you can't do the same on Windows.

    2. GNU Enjoyer
      Angel

      Huawei gear is backdoored too

      Just with Chinese backdoors instead of USA ones.

      Huawei tend to be quite sloppy with their security, which means that attackers can seize control of many devices without even accessing the backdoor, but USA equipment is exactly the same really.

      The NSA tends to have a monopoly on the USA backdoors really - although the CIA and FBI can ask them nicely for access or pay another group to exploit them.

      Use a GNUbooted GNU/Linux-libre computer as a router if you want to avoid backdoors.

      1. Roland6 Silver badge

        Re: Huawei gear is backdoored too

        Given how compromised the US networks are, the NSA back doors are also the Chinese back doors…

        1. John Smith 19 Gold badge
          Unhappy

          " the NSA back doors are also the Chinese back doors…"

          And there, in a nutshell, is exactly the argument against any state sponsored "back door" that "Only the good guys can use."

        2. Anonymous Coward
          Anonymous Coward

          Re: Huawei gear is backdoored too

          Does anyone actually think what would happen in all out war (assuming not nuclear) or massive natural disaster? Are there any workable manual systems for essential services? I've never heard of recovery testing to manual.

      2. John Smith 19 Gold badge
        Unhappy

        "Use a GNUbooted GNU/Linux-libre computer as a router"

        Better start with a processor which doesn't have a management processor embedded in it running a blob of code you can't audit.

        Those f**king things are like cockroaches.

        1. GNU Enjoyer
          Angel

          Re: "Use a GNUbooted GNU/Linux-libre computer as a router"

          >start with a processor which doesn't have a management processor embedded in

          That's all hardware GNUboot supports.

          Sure the supported Thinkpads come with a IME processor in the NIC, but if you just don't load a proprietary program onto that, it doesn't do anything.

  9. John Smith 19 Gold badge
    Unhappy

    That's how you do hard coded maintenance accounts.

    F**k me the malware has better authentication than the OS it's running on.

    1. GNU Enjoyer
      Angel

      Re: That's how you do hard coded maintenance accounts.

      What if I told you the OS is proprietary malware too?

      1. Nick Ryan Silver badge

        Re: That's how you do hard coded maintenance accounts.

        Then I'd first think you were talking about Cisco routers... (other vendors for ire are available too, of course)

  10. steviebuk Silver badge

    oh dear

    Its either Winnie the Pooh or I'm So Lonely. Because it looks like the places targeted will be for IP theft. As Winnie the Pooh loves to copy. Has he never seen "Don't copy that floppy".

    1. steviebuk Silver badge

      Re: oh dear

      The 50cent didn't like that but also knew who I was talking about :)

  11. Blister

    security issue with Juniper in maybe the 80's.

    If memory serves there was a security issue with Juniper in maybe the 80's. Anybody else remember that?

  12. JimmyPage
    Stop

    Could this just be

    Someones attempt to automate their Wordle gone horribly astray ?

  13. BartyFartsLast Silver badge

    Eyes down, look in

    Wonder which TLA is gonna be caught with their pants down on this one

  14. Gordon 10 Silver badge

    Wynne Jones on Strictly.

    ...given his antics of the weekend I reckon this is Wynne Jones. Backdoors, Magic Packets, Spitroasts - they all follow the same theme.

  15. find users who cut cat tail

    Five characters?

    Five characters? Hardcoded pubkey? Makes building a rainbow table pretty easy.

    In other words, basically anyone can pass the challenge and gain control.

  16. John Smith 19 Gold badge
    Unhappy

    Hmm. A lot of 5's here.

    5 packet types

    5 character strings.

    IDK what it means. Just odd.

    On the upside broadcasting those 5 packets flushes out the the ones with it on.

    Except of course those that are already in touch with their C&C server and been told to update their filter.

    They are probably already ratting out their owners details.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like