Mark Loveless, aka Simple Nomad, is a researcher and hacker. He frequently speaks at security conferences around the globe, gets quoted in the press, and has a somewhat odd perspective on security in general.

Eternal 2022

Eternal 2022

In 1993 we had the “September that never ended”, also known as Eternal September. It seems every September as new college students arrived on campus they were often able to access the Internet for the first time, or at least with decent speed and reliability. However these new students had no idea what “netiquette” was, and would often make social mistakes and missteps when posting, particularly on Usenet. For the tl;dr crowd, this would go on every fall and after pointing the new users to online resources, things would calm down and there would be less “noise” than signal. However starting in the fall of 1993, the amount of new users accelerated as online companies like AOL started connecting their noisy forums to Usenet. Basically large companies started coming it and polluting the Internet. As it never seemed to end, a name was given to the phenomena.

More Relevant

There was also a phenomena that started occurring earlier this century with the advent of websites like Stack Overflow, where code snippets was being shared that answered simple questions on how to do certain routines and whatnot. Helpful? Sure. Accurate and secure? Often not. Insecure code is one of many reasons that many of us are gainfully employed in the whole information security world, and like always we were overwhelmed with problems and this influx of insecure code didn’t help.

As early as maybe 2005 with some of the forums on Yahoo you had crappy code being recommended, and by 2008 it seemed to get worse. Google searches for coding help often found these code snippets and accelerated things. Two decades ago during security conference presentations I would make jokes saying the most popular programming language is “cut and paste”. The sad thing? This too never ended. It just never got an official name.

AI Slop

Starting in 2022, the influx of large language models began. And the AI slop began as well. Like the whole Usenet influx with various steps of decorum being bypassed and the “cut and paste” era that began two decades ago, these LLMs were largely built with data that came from all of the eternal crap already out there on the Internet. You know how you can google things and get ten responses but two or three of them are either dead wrong or outdated to the point of being wrong? Do you think LLMs are doing that? With the sheer amount of what is referred to as AI slop, I think so.

It is hard enough to get people to check google results for accuracy - just go on Facebook and see the weird stuff your half-drunk Uncle posts about stupid things like 911 being an inside job, chemtrails, and the various JFK assassination sideshows. Getting people to check LLM output seems even harder. It is both the good and the bad of Internet-based knowledge being explained convincingly to answer a prompt, and the simpler and shorter the prompt the more likely it is that it will produce inaccurate data.

This is Eternal 2022.

Fixing The Mess

The AI slop isn’t ever going to go away, I mean just look through Stack Exchange or hell, check out Uncle Bob’s Facebook postings. We’re still dealing with Eternal September and Eternal Cut and Paste. I don’t expect Eternal 2022 to go away either. I have no idea how to solve Eternal 2022 entirely, but I can wager a guess for at least the infosec parts of this as I’ve mentioned on this blog previously.

I do want to say that the mantra of “don’t use AI” isn’t going to solve it. It is the same as a security person saying “just don’t click on bad links” or “just patch regularly”. And despite those that insist it is a fad or that it will result in complete rejection of the technology and die on the vine, it is definitely here to stay whether we like it or not. The C-levels are using it and encouraging it, other company divisions besides security are using it, and the security personnel are simply going to have to deal with it. So therefore those of us trying to fight AI slop need to come up with a strategy that will possibly work. Here is what I’ve come up with so far based upon my personal use of AI and investigating AI slop, noting this mainly applies to code:

  • The prompt must be thorough. It should be expanded with as much detail as possible, as I mainly use Anthropic’s Claude this is the CLAUDE.md file. Claude is allowed (and in fact encouraged) to update the CLAUDE.md file itself, and in the CLAUDE.md it states that all changes need permission and will be manually reviewed. The same applies to any file in the project.

  • If you are familiar with threat modeling, I typically use a THREAT-MODEL.md file which is referenced as a resource in the CLAUDE.md file. I include a multi-paragraph PLAN.md file, again referenced in the CLAUDE.md file. The PLAN.md file is used to track progress. Both are allowed by Claude to be updated with permission and are also reviewed.

  • For searches for information, I allow outbound traffic, otherwise I have to authorize it. Certainly scripts that run and reach off of the local computer or container are not allowed without direct authorization. Again, documented in the CLAUDE.md file.

  • I repeatedly ask for a session summary to be saved locally then stop the session, and restart a new one with instructions to review the previous session and look for mistakes. This applies to documentation that is being created as well as code.

  • For more complicated code projects, there may be additional CLAUDE.md files in code sub-directories. Additionally there is a huge emphasis on secure coding, and after a session restart that is usually the first thing I have Claude do.

  • Commits to a repository have to be reviewed and conducted manually, therefore this is explained in the CLAUDE.md file. I have no problem editing changes, treating the information and the code like a crappy Google search result until I can review it.

This might seem like a lot of work instead of just asking for things one sentence at a time, however the upfront time saves me tons of time on the backend. Builds and compiles end up completing without errors or warnings much quicker, the SLOC is usually much lower (in fact I sometimes impose limits on SLOC in CLAUDE.md), and basically I can get what I want much quicker.

Future Results

In the near future I will publish a project that I have been using as an experiment to refine some of these techniques, and I will include all of the associated .md files for perusal. The project is an interesting one involving a Linux kernel module, and I hope you find the whole thing entertaining. Just note, based upon how rapidly things are changing in the AI world, I’ll probably be changing all of this in a few months anyway, but this is currently my plan for now.

No Longer Lost

No Longer Lost