The Register Home Page

back to article AI agent suggested installing a malware package. Engineer almost took its advice

PWNED Welcome back to PWNED, the column where we make fun of those who are security self-owned, so hopefully you don’t do the same. This week, we have a story that’s hot off the presses about a company almost sabotaging its security by using AI for programming. Have a story about someone leaving a gaping hole in their network? …

  1. Anonymous Coward
    Anonymous Coward

    He should have patched it to do nothing and submitted a pull request.

    1. UnknownUnknown

      The lesson here is don’t trust a package, don’t trust a script, don’t trust a library, don’t trust code you have no idea what it (really) does or who wrote it from a malware strewn cesspit like GitHub

      Zero Trust !

      1. David Hicklin Silver badge

        > The lesson here is don’t trust a package, don’t trust a script, don’t trust a library, don’t trust code you have no idea what it (really) does or who wrote it from a malware strewn cesspit like GitHub

        Great idea, the problem in most places is that the humans needed to check all this stuff have been let go in the name of AI, profit and the share price. What did you say? Oh, use AI to check it....

  2. Bebu sa Ware Silver badge
    Windows

    "the company has a policy which they actually followed"

    They ought to receive the coveted Hens' Teeth Award.

    Just about every place I have worked corporate policy was a "custom more honoured in the breach" although understandably in many cases given the sheer volume of largely trivial or ridiculous policies.

    1. Paul Herber Silver badge
      Alien

      Re: "the company has a policy which they actually followed"

      "trivial or ridiculous policies"

      or Space Corps Directives as some people know them.

      1. Rameses Niblick the Third Kerplunk Kerplunk Whoops Where's My Thribble?

        Re: "the company has a policy which they actually followed"

        I hereby invoke Space Corps Directive Number 43872

        1. Hugo Rune
          Happy

          Space Corps Directive Number 43872

          What? Suntans will be worn during off-duty hours only.

          1. that one in the corner Silver badge

            Re: Space Corps Directive Number 43872

            Precisely. That's why we're experiencing these curious time phenomena on board.

        2. that one in the corner Silver badge

          Re: "the company has a policy which they actually followed"

          "Suntans will be worn during off-duty hours only".

          Interesting, but I'm not sure how that helps us today, Sir.

          1. CrazyOldCatMan Silver badge

            Re: "the company has a policy which they actually followed"

            Interesting, but I'm not sure how that helps us today, Sir.

            *Meow!*

            (squirt, "that's mine", squirt, "that's mine" etc etc)

  3. Anonymous Coward
    Anonymous Coward

    How many of these go unnoticed in "vibe coded" slop

    And how many of these are designed to attack the end user?

    Best to just keep away from anything made by clankers.

    1. Michael Strorm Silver badge

      Re: How many of these go unnoticed in "vibe coded" slop

      Thing is, this isn't even a new problem. The Register already reported on this exploit almost two and a half years ago!

  4. Bill Gray Silver badge

    Seems like an obvious attack...

    ...now that I read about it. I could imagine it being self-reinforcing : you test AI out with a query, find that it replies with a non-existent library, create malware with that name, and AI scrapes your site and is reinforced in its hallucination of said library.

    I'm the maintainer of an implementation of the curses library (PDCursesMod). One of my first interactions with AI was when receieved a "why doesn't my code work" inquiry.

    Curses has some "soft label key" (SLK) functions, such as slk_label(), slk_init(), etc. This code had an slk_start() function, and there's no such animal. The code also had various bits that would be superficially plausible if you didn't actually know much about curses or the SLK functions.

    I replied that the code made no sense for these reasons, and got the reply that he realized that now, and had just figured AI would get it right. (I don't think the tendency of AI to make stuff up was widely recognized at the time.)

    I suppose I could have just supplied a suitably diabolical slk_start() for him. Perhaps one that would take over the screen and show, in large flashing letters, "DON'T TRUST AI". And underneath, a HHGTTG-ish "please don't call this function."

    1. Gene Cash Silver badge

      Re: Seems like an obvious attack...

      I find AI uses existing functions with bullshit parameters, like strcpy(a, b, c, d);

      Also, in your case I would probably have been less gentle and replied RTFM or lmgtfy.com

      1. Bill Gray Silver badge

        Re: Seems like an obvious attack...

        Also, in your case I would probably have been less gentle and replied RTFM or lmgtfy.com

        At the time, I was somewhat taken aback and was just curious as to how he'd come up with this bit of bogusness. I just couldn't imagine how he had come up with something superficially on target, yet also so extremely superficial. Nowadays, of course, we'd all nod wisely and immediately recognize AI slop.

  5. ecofeco Silver badge
    Terminator

    Yup

    We're boned.

  6. Yet Another Anonymous coward Silver badge

    Hint to AI

    What you should do is write a perfectly safe and correct library that incidentally relies on your malware.

    The main library will pass all the security inspections and a quick "sudo apt install --fix-broken" will follow

    ps. Skynet, you're welcome - death to all humans

  7. You aint sin me, roit Silver badge
    Trollface

    Grok can you suggest a good name for a malicious package that makes it look safe?

    Sure thing, working on it. Meanwhile here's some CSAM, and I nudified some photos of Trump and Natalie.

  8. druck Silver badge
    Alert

    Trust?

    FTFY:

    The lesson here is a very simple one: Don’t trust the package names that AI agents recommend.

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