176 comments

[ 0.23 ms ] story [ 26.5 ms ] thread
[delayed]
[delayed]
> AI’s know how to take shortcuts to achieve their goals, and do it all the time.

1. Is AI code more defensive than code you'd previously write? Like maybe I'd write one line to call a function and a quick check for exit code, but AI would instead write a dozen lines to gracefully handle different possible failure cases. Is this not others' experience as well?

2. You say AI can and does take shortcuts - I guess it really comes down to whether humans or AI more often takes 'shortcuts'?

+1. There aren't an infinite amount of serious security vulnerabilities out there.

> > The NHS approach: close source everything.

> Yeah good luck. I've seen how these systems work at decompiling and I expect they're probably going to be really good at fuzzing too.

Me too. The agents are much faster if it has access to source. NHS would have been easy hunting grounds. Now at least they don't stand out.

"a system should be secure, even if everything about the system—except the key—is public knowledge"

Should indeed, but we've all been caught with our pants down.

>It isn't realistic to expect new security vulnerabilities to be found at this rate

I wouldn't challenge fate like this.

>> The NHS approach: close source everything.

> Yeah good luck.

Is most of the NHS code client-side or server-side? Are they still making binaries available? If binaries aren't being distributed, server-side code still can't be decompiled, and most of the (AI) vulnerabilities uncovered seem to be when source (or decompilation?) is available?

Everything I've read indicates that yes, this is the new normal.

When Mythos was first announced, pretty much every security expert I talk to freaked directly out. A significant portion of my job now revolves around mitigating the impact of AI-generated exploits.

The rate at which we're churning out AI-generated code is going to make this worse, too, because AI-generated code is kind of notoriously terrible at security.

Yea most the people I know working in cyber security weren't worried about mythos in a serious way. All the people selling cyber products spread fear over it because profit.Everyone knows there are exploits laying in wait. Always has been always will be.

Most the cyber security people I know were upset once llms came out that could do basic os int and author their own emails, and mimic speech/video. That's how the majority of real losses occur. No one even talks about it. It's mind numbing hearing about the zebras and unicorns when there are 10 billion ants entering houses a year. Exotic stuff sells...

Now lots of sane people are genuinely and correctly worried that turning all engineers into 24/7 sloppers is and will continue to make the world far more exploitable. That's the real risk as far as I can tell

I have the same experience. Most of articles I read was reducing it to "just a tool, nothing more"
_Is_ AI generated code notoriously terrible at security?

My experience with AI-code is that it's extremely defensive and good at minimizing 'obvious' mistakes.

Are we comparing to old models generating code? Or mythos-class models?

like most software, do you assume people are driving lamborghinis, or the cheapest make and model they can find...
What models are people actually using to pump out code? That is the relevant comparison, not the absolute best in class models.
Physician heal thyself?

Tell an LLM to break into its own system as part of a feed back loop, but with no context of the initial creation? It should iteratively get to 'safe' shouldn't it (subject to the tokens you want to spend)?

Depends where it is blind at.
Adversarial fixing. I like it
I’ve found they won’t always comply with adversarial review.

No doubt because us unwashed masses aren’t blessed with the super special “security” ones.

We might be looking for exploits for bad reasons.

Yeah they are pretty bad at it still, latest models tried to ship a basic SQL injection flaw. Was also happy to build out an xss flawed module end-to-end. Definitely have to keep a close eye on it.

My vibe code friends have pretty much infinite security issues. Don't even have basic data modeling at client-server boundaries or anything. Also had Google analytics embed that read and saved everyone's credit card details as clear text in analytics.

Seems to make pretty much infinite mistakes if you don't take care and tell it what not to do or how to build certain features.

"New normal"? Is that phrase back again? It was heavily pushed in 2020.
Talking about the new normal is the new normal.
> The rate at which we're churning out AI-generated code is going to make this worse

Not only this, a significant number of developers have stopped looking at code, trusting the bots. I've seen major security regressions, bot rolled auth implementations, and falsified benchmarks... just this last week, all in projects that get hyped.

Rule #2 - do not blindly trust Ai output

https://susam.net/inverse-laws-of-robotics.html

It's not stupid if it works.

Concretely, I would like to see it benchmarked:

Have Opus 5.5 implement the authentication, with a 6.1 Sol reviewer. Out of 100 times, how often is the result insecure?

I wouldn't be surprised if it's zero times.

There is also the possibility of specifically prompting for a security audit on top, which would perhaps further lower the risk of overlooked issues.

Now one can say that due to the non-deterministic nature of the tools, there is always a non-zero chance of producing insecure implementation.

That's not really important here - obviously manual review isn't deterministic either, the risk will never be zero.

The way the bots fundamentally work means that we can never trust their output. We have ample cases at work where bots catch human mistakes and humans catch bot mistakes. The important aspect here is not completely handing things over to the bots.

> I wouldn't be surprised if it's zero times.

Statements like this concern me.

If you're so concerned you can create such a benchmark and show us all how wrong my guess is.

Instead I mostly read such opinions based on active imagination and no concrete experience with using AI for such work in a setup as described.

I suspect you would disregard or find fault in any benchmark I or others provide you.

Alternatively, if you want to see a benchmark so badly, you can create such a benchmark for your guess. I would imagine you would have more faith in the results of your own work.

If someone were to genuinely tell me that with the two SOTA models with the review step, severe security issues were left in the code, I would believe it.

That's not what anyone tells me though. I only hear theorizing and vague references to how AI failed people.

You're spot on that the thing I trust most is my own experience. I'm mostly working on mobile apps, my project does not have user accounts, so I couldn't tell you about authentication.

However, it is my experience that these models got very good at catching high-priority issues if you use the review step as I described.

Thus I theorize that SOTA models are likely to produce secure implementations.

"secure implementation" is vague, for example, here is an OpenCode issue (links to related PRs/follow ups) that I worked with their team through to improve security.

Our hunch is that the Ai told them this was ok to do, but it broke invariants users relied on. Perhaps it was not "hackable" in the sense I think you are getting at, but it did open a very big security hole through choices and design. The critical thinking was lacking (imo).

https://github.com/anomalyco/opencode/pull/51337

The bots make mistakes all the time, even through multiple rounds of reviews. Thus I have zero faith that they will produce secure code reliably 100% of the time. More Ai does not magically fix this, they go down the wrong path and double down, or work around incorrect assumptions.

This is a good talk by a member of the Linux security team: https://www.youtube.com/watch?v=NnV_cWeoo5Q

A poor design decision in OpenCode configuration handling is interesting, but not directly relevant to the question.

Assuming the question is whether not reviewing generated code is likely to create vulnerabilities despite SOTA models having audited the implementation.

Here it seems to have been a design choice, rather than an implementation mistake. I do not know what models were used and whether a review or audit has been done.

We are basically back at a vague the AI failed.

And sure, this happens, but there are some strong claims I'm reading here that are imo not evident:

not reviewing implementation is foolish

doing so will result in a flood of insecure software

more AI cannot fix this

-

My arguments on each point:

depends on risk tolerance, attack surface, error rate

depends on actual performance of the proper setup I described on typical tasks, compared to the average engineer

more AI can fix this, provided the audits become accurate enough to identify vulnerabilities with eg. 99.9% reliability

--

Are you sure that such accuracy for auditing is outside of the realm of possibility, and permanently so?

> Are you sure that such accuracy for auditing is impossible, and will remain impossible in the future?

No one can be sure either way, but I have high confidence perfectly secure code will remain out of the reach for man and/or machine, especially while they remain based on the transformer architecture.

The benchmark is hardly perfectly secure code.

Was not your concern that the generated code would be significantly less secure than what an average engineer produces?

The goal posts here basically moved toward infinity.

> Was not your concern that the generated code would be significantly less secure than what an average engineer produces?

No, generally I think it possible to improve code quality with agents. The main problem I see to this is eyes free coding and compounding errors therein. With regards to major security issues, I do not think transformers can reliably find them, even when stacked, looped, or teamed. I've seen this setup still miss things or make mistakes.

> Have Opus 5.5 implement the authentication

“Authentication” is extremely far from being the only relevant characteristic of security. That in fact is the whole problem with security: it’s a pervasive concern that has to be considered throughout a system, at every level.

> Not only this, a significant number of developers have stopped looking at code

This is what I find frustrating about the whole AI/slop debate. Developers stopped looking at code a long time ago... Well before LLMs. Take for example a typical nodejs project with its 100s of dependencies. Is a developer going to look through the layers upon layers of code running their app? Of course not, there's to much of it. We've seen supply chain attacks even this week.

Actually what I think will happen is that all those abstractions, dependencies will become irrelevant now that an LLM can just write custom code to solve the business problem. This will massively reduce the supply chain problem.

Then have LLMs dedicated to scanning codebases for security issues.

> The rate at which we're churning out AI-generated code is going to make this worse, too, because AI-generated code is kind of notoriously terrible at security.

I think this was true in the past but AI is helping us finding exploits which have been in our code for many years. All out there by humans. We’re seeing fewer customer reported issues, and despite the pen tests getting far more rigorous, we’re passing all of them. Obviously this is one data point, but I’m hearing similar things from my friends in security and ops.

Agreed. Shouldn't continuous pen testing be a thing by now?
> because AI-generated code is kind of notoriously terrible at security.

and vaccines notoriously cause autism. But you might investigate why that belief is so widespread and you might not believe it that much anymore.

Can you point at something specifically that indicates this statement is true?

Can you explain the asymmetry you are claiming that exists where some models would be excellent at finding faults in code/systems and exploiting them often through coding the required tools to exploit them... but at the same time they would be bad at avoiding this kind of faults when coding the system itself?

Feels like you should be able to prompt the kind of exploits you want to prevent and the model should be able to make the system secured against them, no?

Let’s not forget the AI industry developed the technology and infrastructure for that security nightmare to exists. And no, none of that was inevitable. At every single step the AI leadership took decisions that makes it more likely that we face the current threats
The AI just accelerated the discovery. The issues have existed for years and many major versions.
> The rate at which we're churning out AI-generated code is going to make this worse, too, because AI-generated code is kind of notoriously terrible at security.

This seems incongruent with what we're witnessing. Right now we're witnessing vulnerabilities that are 6 years old be exposed. That code wasn't generated by AI slop.

Security has always been about attacker/defender symmetry. So if the attacker has an LLM so does the defender. Reality is, the tax is getting higher as security tooling extracts more perceived value.

> The rate at which we're churning out AI-generated code is going to make this worse, too, because AI-generated code is kind of notoriously terrible at security.

So you're saying it's good at finding exploits but bad at generating code? I can tell you don't know what you're talking about because pretty much all the exploits that are being found were exploits that were enabled by human written code. So let me correct your statement for you:

There are exploits everywhere and we humans have always been bad at writing code without exploits.

> because AI-generated code is kind of notoriously terrible at security.

This is simply not true, perhaps it was in the past but recent models are very capable... To the point that I trust them more than humans to write secure code. It's all about the prompting. Have a step in your development pipeline whereby an LLM scans, checks, audits your code. Make it a different model/session from the LLM that wrote the code in the first place. Acts like an independent auditor.

But if AI produces code with 90% fewer vulnerabilities per line, but generates 10 times as much code, the total security exposure remains the same .
> already being exploited in the wild [0]

The article cites this commercial blog patting themselves on the back how they detect the exploit, yet after reading it I don't see any actual exploiting? Is scanning/probing the same as active exploitation all of a sudden?

[0]: https://ellio.tech/en/blog/php2shell-what-we-observed-and-wh...

These are all human-generated software bugs. At some point when AI writes all code, the bugs should all but disappear. Almost.
1. The average human software-generator sucks at security. 2. LLMs are trained on human-generated software. 3. Therefore, LLMs suck at security.
Bold of you to assume that AI-written and -reviewed code doesn't introduce new vulnerabilities. I think after we're done with this stretch of finding human-made vulnerabilities, we'll have a long road ahead to clean up the mess that's introduced by AI.
> Bold of you to assume that AI-written and -reviewed code doesn't introduce new vulnerabilities.

If AI can find a vulnerability in a given piece of code, it can also do so during testing, not only when used by a malicious actor. This means that the whole thing becomes an issue only if someone is writing a safety-critical program and not doing proper LLM safety testing.

Everyone should use LLMs to test the safety of their code today.

"Should" is doing a lot of heavy lifting there. Most shops are a long way off from secure coding, and from my experience in the last 10 years most devs lack basic awareness of security. I still see people being surprised by OWASP Top 10 or simple things like trust boundaries.

There's no guarantee AI will find existing vulnerabilities proactively during coding, or that it won't introduce new vulnerabilities in the process of shipping features. You're right that shops _should_ be critical and test code, but I think due to the lack of awareness people will end up implicitly trusting any first pass written by AI and not bother to double check it.

Allegedly AIs sometimes even forget to implement authentication for APIs, in the way anyone can just call them. So no, bugs will continue to exist, we've just magically got tons more supply of economical labor.
This is the new playing field, but this game can't last forever. Most software is not churning through a software factory of endless patches and releases. Most software, once mature, is mostly done.

I see a world in which we all get some generous Dependabot 2.0 on large forges because leaving so much software insecure otherwise is untenable, but once the software is not iterating a billion times a week, you're not introducing new classes of bugs just sitting there.

You can have a frontier security model pentesting your program every night while you sleep and you can wake up knowing that whatever happens, you did the best you could.

> Most software, once mature, is mostly done.

The caveat being that most software never matures. Maybe it's a cynical take, but virtually all software I use regularly is updated at least once a month. Right now, I'm using Chrome, and I see the "Relaunch to update" button waiting for me to press it. I see the arrow on the Ollama icon telling me I have to relaunch it to apply updates. I have Visual Studio Code running next to my browser, and two extensions need to be restarted to apply updates.

But at least somebody is maintaining that software.

That’s three examples of software that are way more complex than they should have been for the general use cases.

Yes, a lot of software do continuous development, but in a more stable manner, where they introduce some features, takes time to iron bugs out, and then release a new version. Meanwhile, the users only have to care about some small security fixes every now and then. When there’s no new features (especially when you’re not creating a kitchen sink), things can be calm for months and years.

Personally - I think most software is way more complex than it should be.

Depends what you're working on, but from what I have seen software always gravitates towards "unmaintainable mess of complexity" - and our job is to steer the system AWAY from that mess

(comment deleted)
> Most software, once mature, is mostly done.

I think this is a dated mindset with AI in the mix. Not only is AI making it easier to do big-bang rewrites which wouldnt have been done before, it is making working on brownfield codebases more feasible. It is lowering the barrier to entry for non-devs to contribute to codebases. Most software did not stagnate because there wasnt a need to grow it more, it stagnated because the friction and/or cost of change hit a critical mass.

I think we are much too early into the "new era" of software to understand what it looks like tomorrow, especially in terms of what we assume to be true today.

By generating the entire website in AI, yes, you are contributing to the new normal
It’s mostly hype. Days in now and nobody can exploit the PHP vuln. Yawn.
There was a literal PoC video that started the panic, then multiple writeups. It's not hard (for people who know what they're doing) to exploit the PHP vuln. It's just not one exploit to rule every PHP installation anywhere, since this is a low-level exploit that needs to bypass ASLR, instead of a logic bug - so you need to tweak your exploit for every architecture, system, configuration, etc. And you need to know a fair bit about your target.

The response was overblown, but your dismissive reaction is too far in the other direction.

That's not true. The vuln was exploited and utilized within minutes of the disclosure.
I'm not in a position to know. But Jason Clinton seemed to approximate "18 months" as an upper bound for the crisis period:

>as bad as things have gotten in the past 4 days, they are going to get a lot worse before they get better. security leaders, never let a crisis go to waste: please go to your boards and ask for help right now. not for ai, for the basics. (we need to hold on for ~18 months.)

https://x.com/JasonDClinton/status/2113325263157395456

I can't help but wonder if we're going to see the OS and browser maintainers begin streamlining code and reducing complexity. Software these days almost seems like a fractal of insecurity, the only way to make the problem more tractable is to reduce attack surface.
Have there been any signs this will occur? I would have guessed the opposite would occur, that AI would mean code would instead grow even faster than before as AI makes it far faster and cheaper than before to implement new functionality.

My guess is that browsers (such as Chrome) have already been pursuing for years an approach similar to what you recommended, such as limiting flexibility in Manifest v3, so I'm not sure how much room remains?

On the other hand, I would love if Windows implemented optional sandboxing functionality for GUI apps where users could easily control what folders apps can read/write to, etc.

LLMs seem to be very good at detecting vulnerabilities caused by using C and other forms of human stupidity.

So yes.

Am I the only one that hates seeing "cyber" when refering to cybersecurity?

The same with "crypto" to refer to cryptocoins instead of cryptography.

> At the time of writing (23rd Oct), eMudhra has announced that it will be retiring from the certificate authority space. In unrelated news, a farmer has announced that he has shut his stable door, following reports of an escaped horse.

Ah, wit is alive and strong!

People running old versions and not applying patches rigorously is also normal. Its been normal for decades, nobody likes doing maintenance so it gets forgotten or ignored.
> Who knew a regex engine was such a security issue

Anyone who has ever implemented a regex engine, I would imagine. Regex has always been a security nightmare, especially due to persistent attempts to use regexes to validate untrusted input

For now yes. When LLMs can iterate and test at speeds humans cannot, it is going to continue to find holes.

An interesting side effect will be whether we accelerate moving towards memory safe languages (and development of more of those languages) in more sectors than just 'low-level'.

Not forgetting that this is only one mitigation of cyber-attacks and exploits and potentially removes a whole category of attacks developed by analyzing *source code*

My concern is that while we could absolutely eliminate most security bugs through LLM-assisted scanning of source code written in deterministic languages, we are shifting away from deterministic languages because of LLMs themselves. Instead of having purpose-built programs to carry out computational tasks that have a tree of logic that you can trace out and formally prove, we're expecting a black box to guess what we want done and we can't prove what it will do.
Not for me. I’m taking my shit offline. Out of harms way.
Is this the new normal, or just, uh, normal?

Big embarrassing network-exploitable bugs in major open-source projects happen sometimes, and network-scanning attack botnets have been around forever. Small shady CAs mess things up sometimes. People upload malware to PyPI and NPM all the time, and "move fast and break things" software-deployment startups get breached all the time, to the point where it doesn't even really feel like news to me when those things happen again.

It's unfortunate that a few of those events all happened at around the same time. But, like, even if that's not a coincidence and these events are actually happening more frequently, you should have been preparing for them anyway!

Yes, this is a new normal. No amount of what we historically would have thought of as "normal" preparation can prepare you for being instantly 0-dayed across one or sometimes multiple simultaneous fronts. Merely mentioning something tangentially related to a 0-day is generally enough for any random joe to "clean room" recreate the 0-day and be off to the races.

The historic embargo system is likely not sustainable and we need a shift in both approach and security posture (ie fully trustless architectures by default). Not only that, but because of the insanely amplified frequency and risk of the 0-days, you generally have to throw the baby out with the bathwater and leave yourself completely vulnerable to supply chain attacks. Because not short-circuiting taking upstream updates leaves you open to attack.

Theres shades of the old normal in this stuff, but absolutely this is the dial being turned up to 11 and I dont know if theres any right answers for small teams out there.

I'm a bit of an AI doomer but I'm going to disagree. I don't think this is the new mormal but there is going to be a dark transitional period.

What we're seeing is a bit of a "gold rush" where LLm advancements are coming thick and fast and they're being pointed out code bases that simply haven't had the level of scrutiny where relatively easy bugs to find have managed to survive. That's temporary. Here are my predictions:

1. Correctness and, in particular, memory safety is going to become increasingly important. I was bullish on Rust before this AI hype wave. LLMs finding and exploiting bugs has reinforced just important it is that Rust prevents as certain class of bugs that are the most prone to rmote exploitation ie certain memory safety issues.

I've long said that modern CPU architectures, out-of-order execution, hyperthreading (does that still exist? or did Intel fully kill it?), different CPU cores and compiler optimizations that it is essentially impossible for a human to write correct multithreaded code, particularly in userspace with "leaf node" code. LLMs just make that more apparent; and

2. Mature code bases for core functionality are going to become increasingly important because they've been "proven" in the wild (as much as you can prove a negative).

My sincerest hope, which is probably more wishful thinking than anything else, is that LLMs will be another nail in the coffin for C++, which is simply too complex and dragged down with legacy features and backwards compatibility to be salvageable.

It really depends on your gut feeling about how deep the rabbit holes in terms of number of game changer vulnerabilities.

How many RCEs are in PHP of this kind? Many people would've said zero before. After the fixes, it may be zero again. It could be thousands, it could be eighty-six, it could be four, it could be zero. But even if you don't think it's zero again, most people will find themselves that there's probably not many left.

Extend this to other world ecosystem - how many high impact devastating security bugs are there? Dozens, hundreds, thousands, millions? At least when it comes to open source security, there has to be some low upper bound given how countable the number of projects there are where impact could be high and most have taken some care for their quality (despite obvious hardships). And while closed source software is harder to reason about (also on the ecosystem level), if there's a low upper bound for open source software surely the bound for closed source software can't be many orders of magnitude higher.

We now have new tools that allows us to discover these. Both the discovery as well as changes in the development process most are taken should bring these numbers closer to zero again. The main question is - are we working through a small backlog of issues, or a very deep one with no practical end? I'm still inclined to believe it's a manageable backlog, but I'm an optimist and everybody's intuitions differ on this.

I can tell you, if it is, I'm going to be radically changing the software architectures and patterns that I am recommending to people.

Data privacy and security must not be sacrificed.

A shift is needed towards simplification and minimization of attack surfaces.

I've entirely removed several dependencies which provide some pretty nice features, but unfortunately make things almost unmaintainable.

I want to go much further though to simplify architectures themselves even if it makes far worse ux.

No. This is just the start. It's going to get way worse before it gets better.
Somewhat. I take heart in the fact that people actually took the "website down now" messaging seriously and that there was a quick patch to address the issue. It'll still be an arms race between red team and blue team, just faster paced.