<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Security on Designing Secure Software</title>
    <link>https://designingsecuresoftware.com/tags/security/</link>
    <description>Recent content in Security on Designing Secure Software</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language><atom:link href="https://designingsecuresoftware.com/tags/security/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Questions about Collective action on cybersecurity</title>
      <link>https://designingsecuresoftware.com/writings/ai-cyber-open-letter/</link>
      <pubDate>Sat, 29 Aug 2026 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/ai-cyber-open-letter/</guid>
      <description>&lt;p&gt;We are at an important inflection point with at least two fronts on the ongoing
challenges of software security that AI is impacting at unprecedented speed.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;the rush to offload more and more software engineering work onto LLMs,
at best without any reliable solution to keep up responsible reviews
without hampering the speed-up and cost savings which are the point
(and at worst without protections against seriously compromising what
security and reliability we have already);&lt;/li&gt;
&lt;li&gt;the threat of bad actors leveraging frontier models to exploit systems;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Right now the latter is getting all the attention
so I am focusing on that here.
Specifically a new open letter signed by many of the big players:
&lt;a href=&#34;https://openai.com/collective-cyberdefense/&#34;&gt;A call for collective action on cyber defense:
An open letter for a global surge in cyber defense&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Before getting to the topic, I want to put a pin in #1 above for another day:
it&amp;rsquo;s very important, and the solution push here for #2 is
(obviously) more of #1.&lt;/p&gt;
&lt;p&gt;This is written blog-style as I started looking into this and trying to
interpret what this open letter means to say, and what might be behind it
left unsaid.&lt;/p&gt;
&lt;p&gt;To get warmed up, my first question is about the absence in the signatories
of a few of the biggest of the big software companies: Apple, Meta, Salesforce.
Why aren&amp;rsquo;t they supporting a call for such an urgent collective action?
Without them on board our collective action is hampered from the get-go:
did they disagree with some premises or the strategy? Without naming names,
some acknowledgment of the behind-the-scenes debate (I can&amp;rsquo;t imagine they
did not participate or consider signing) we cannot help but wonder what
the problem could possibly be.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Quotes below like this are all from the letter.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Caveat&lt;/strong&gt;: I&amp;rsquo;m not saying that I know better, but I do have questions.
This is a quick take for now, if anyone is interested I&amp;rsquo;m glad to elaborate.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We have a limited window to strengthen cyber defenses.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is both a vague (years, months, weeks?) and ominous warning
that I would say deserves at least one verified, non-classified incident
before calling for &amp;ldquo;industry and government to bring the full weight
of their technology, resources, and expertise to this effort&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Is there any evidence that August 2026 frontier models are that much
superior for this purpose than they were, say, two months ago?
Supposedly little technical expertise is required with the big models
so if the feared attacks are possible it should have started I would think.
In my view, the signatories could have provided more evidence
to back the extraordinary claims so others could understand the
motivation for this broad and unprecedented initiative impactin
countless systems and software components.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In the coming months, AI-enabled cyber attacks will become far more widespread and sophisticated as models around the world become increasingly capable.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There have been musings that AI will take off in capabilities suddenly for years,
but this time we&amp;rsquo;re sure? Perhaps they will plateau, or perhaps we
aren&amp;rsquo;t leveraging them well yet and they are better than we know.
Can anyone say for sure?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Today’s AI advances are already giving defenders new ways to fix weaknesses &amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&#34;https://www.anthropic.com/research/mythos-preview&#34;&gt;Mythos preview&lt;/a&gt; (April 2026)
only offered that we should &amp;ldquo;Think beyond vulnerability finding&amp;rdquo;, not start fixing.
They suggest that &amp;ldquo;models can also accelerate defensive work in many other ways&amp;rdquo;,
including, issue reporting and triage, write repros and reports, aid review, etc.
That is, help humans who are doing the real work.
Translation: this will all go at human speed for the time being.&lt;/p&gt;
&lt;p&gt;With LLM driven attacks at inference speed, human defenders even greatly aided
are not going to be a match if this threat is for real, considering that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;very few software engineers have experience doing this work (and they all have day jobs);&lt;/li&gt;
&lt;li&gt;the number of vulnerabilities is vast (and nobody even knows its scale).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unless the &amp;ldquo;new ways&amp;rdquo; are beyond what the April report lists,
then if the premise of all the coming attacks is true I&amp;rsquo;d be very worried.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Recognize that status quo security won’t be enough.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This has been the case in general for two or three decades in my view.&lt;/p&gt;
&lt;p&gt;Even if the &amp;ldquo;historically under-resourced&amp;rdquo; systems are given AI tools,
without expertise (given that fixing is gated by human participation)
this will be a flat-footed effort.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not saying this should all be worked out &amp;ndash; clearly it can&amp;rsquo;t be &amp;ndash;
but my point is we need a more detailed view of the current facts on
the ground and realistic assessment of the problem
to better envision how this might all work.
Without transparency, collective action is far more difficult.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a hard problem, but I think it&amp;rsquo;s safe to say that
it&amp;rsquo;s way more than a technology problem and that
the highly competitive software is not exactly known for collective
action without market or legal pressure.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Should &amp;ldquo;Every organization&amp;rdquo; independently do all that security work,
and given that they haven&amp;rsquo;t for a long time we need to understand why not.&lt;/li&gt;
&lt;li&gt;Haven&amp;rsquo;t the cybersecurity companies and partners supposed to have
doing all this stuff for many years against conventional attacks?&lt;/li&gt;
&lt;li&gt;Haven&amp;rsquo;t governments been trying to coordinate defense and collect
incident reports for many years with little impact?&lt;/li&gt;
&lt;li&gt;AI companies granting access is great but defenders need experienced
people too (and there can&amp;rsquo;t possibly be enough of them).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additionally, I would suggest AI companies also consider backing research
toward LLMs fixing vulnerabilities (not just finding and helping fix),
making pull requests easier for humans to assess for both blocking
exploitability as well as lowering the risk of introducing a new bug.&lt;/p&gt;
&lt;p&gt;In my view, &lt;a href=&#34;https://designingsecuresoftware.com/writings/llm-find-n-fix/&#34;&gt;fixing vulnerabilities may not be that hard&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;On top of this, it&amp;rsquo;s very well known that patching complex systems is
risky and there&amp;rsquo;s no mention of balancing that against a call for urgent
action at break neck speed.&lt;/p&gt;
&lt;p&gt;Personal opinion: I think is very important to ask for each system,
how much security improvement is sufficient?
(This is a notoriously hard, yet important question.)
It&amp;rsquo;s great when new tools are applied where the need is great, but we have
no idea how much change will be required to bring secure defenses
up to snuff &amp;ndash; or how we would even know when it&amp;rsquo;s good enough.
Pointing advanced tools at older systems (which I think is a fair assumption
for the general case, more so for the under-resourced) could produce an
effectively unbounded spew of potentially serious issues. Then what?&lt;/p&gt;
&lt;p&gt;One last question for now: why are many of our infrastructure systems
&amp;ldquo;historically under-resourced&amp;rdquo; in the first place?
Software technology aside, securing our utilities, healthcare, and other
critical systems is a glaringly obvious priority that it does not take
cybersecurity expertise to recognize.&lt;/p&gt;
&lt;p&gt;This open letter presents a strategy aimed at the technical challenge,
but in the context where infrastructure security has not been
a high priority, without first understanding those root causes first
that approach is unlikely to be sufficient in my view.&lt;/p&gt;
&lt;p&gt;Returning to the letter&amp;rsquo;s opening line, what exactly does &amp;ldquo;limited window&amp;rdquo; mean?
To me this is a veiled warning that if you act too late the game is lost.
Do they mean an adversary can take down parts of infrastructure at will,
or possibly irrevocerable infrastructure destruction or take over?
It&amp;rsquo;s horrendous to consider, but are there no physical overrides with
manual operation in the worst case, or do we throw up our hands in the
event of a remote software attack?&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://designingsecuresoftware.com/text/ch2-threats&#34;&gt;Threat modeling&lt;/a&gt;
is how I make vauge threats more concrete, and how I
regularly advise anyone every chance I get.
In this context that means beginning with each infrastructure system
making a basic threat model that would answer questions such as above.&lt;/p&gt;
&lt;p&gt;Finally I wonder if there might not be a lot we can do &lt;em&gt;without&lt;/em&gt;
a massive AI call to action.
Maybe we don&amp;rsquo;t need a huge infusion of new (bleeding edge?) technology
that requires experts to oversee and carefully hone patches for safe merges.
Just to toss out a few obvious things that in general make systems vulnerable:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Perhaps simply installing backlogged patches makes it much more secure
(note that if this is difficult then all the best AI patches in the world
are not easily deployed either).&lt;/li&gt;
&lt;li&gt;Perhaps an audit finds that a subsystem thought to be air gapped isn&amp;rsquo;t
and it can safely be disconnected or a compatible replacement found
that doesn&amp;rsquo;t require an internet connection&lt;/li&gt;
&lt;li&gt;&amp;hellip; depending on the system there are many other common vulnerabilities
like this that self-review can identify that are safely mitigated&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unless the resourcing and expertise gap is somehow quickly filled,
I would urge these system owners to consider these sort of steps
(which are all very doable right now and not nearly as much work)
now until proven AI assistance becomes available to address
remaining weaknesses.&lt;/p&gt;
&lt;p&gt;I have no inside access to any of this, using public information,
so all this is just one opinion.
Nonetheless, I do have all these questions which I believe are quite
relevant if not actually important if nothing but to make the underpinnings
of the open letter more apparent and easy to see the logic of.&lt;/p&gt;
&lt;p&gt;Despite all this, I really do because Gemini critiqued this,
and it actually came up with a great summary in closing
(to which I would only add transparency):
&lt;em&gt;technological acceleration without root-cause analysis and
operational readiness is a recipe for churn, not security&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In closing I&amp;rsquo;m going to bury the lede because I was puzzled by
one phrase about agentic identities, but I think I figured it out.
Here&amp;rsquo;s what the letter calls on AI companies to do as the major
technical response to the coming threat that they foresee:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Build observability and security tools, ensure agentic identities are traceable and accountable, and share best practices in continuous monitoring.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;All the way through I was assuming that the direly needed defensive AI response
was LLMs working alongside the development team to carry as much of the load
as possible, e.g. triage, coding, reviews, testing, and more mentioned above.
However, for that work you don&amp;rsquo;t need to worry about &amp;ldquo;agentic identities&amp;rdquo; since
software engineers are invoking agents to work along side them, and they can
always just ignore sloppy pull requests or other bad input from the LLMs.
Then the light went on, it was at once so obvious and deeply unsettling:
if you have AI agents in &lt;strong&gt;production&lt;/strong&gt; then &amp;ldquo;traceable and accountable&amp;rdquo;
are extremely important when something goes wrong.&lt;/p&gt;
&lt;p&gt;So I&amp;rsquo;ll close with still more (to me) unfathomable questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Could it be that the risk they are talking about here be unsafe deployment
of AI agents in live systems?
I dearly hope not: but what else could it mean for defense against AI?
Certainly the attackers are not going to cooperate and hand us
the identities of their agents!&lt;/li&gt;
&lt;li&gt;Can anyone please connect the dots for a different interpretation of
how that call for action relates to the goal of the letter in another way?&lt;/li&gt;
&lt;li&gt;Is this the imminent &amp;ldquo;limited window to strengthen cyber defenses&amp;rdquo;,
that the signatories refer to, in part at least, defending against
our self-deployed AI agents running amok?&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
</description>
    </item>
    
    <item>
      <title>Role confusion: one more reason we can’t trust LLMs</title>
      <link>https://designingsecuresoftware.com/writings/role-confusion/</link>
      <pubDate>Thu, 30 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/role-confusion/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://role-confusion.github.io/&#34;&gt;Prompt Injection as Role Confusion&lt;/a&gt; is my new favorite paper about a very obvious threat in hindsight that’s hard for us humans to see because we anthropomorphize LLMs so naturally. When Obi-Won Kenobi tells the stormtroopers that “These are not the droids you are looking for” to pass the checkpoint that’s role confusion: the guards foolishly think his words are their own thoughts. The very readable blog-style writeup explains the details, but I want to focus on the threat model perspective which is my bread and butter.&lt;/p&gt;
&lt;p&gt;I look at software from a security perspective, and as amazing as the technology is, it seems that the list of reasons that modern LLMs are inherently untrustworthy just gets longer. Without limitation, a long list of challenges (that seem to be quite fundamental and not amendable to add-on remediation) includes: poisoned and errant training data, side effects of RLHF, ineffective guardrails[*], hallucination, speculative completion, lacking metacognition, alignment drift, context variation sensitivity, and now (new to me at least) role confusion.&lt;/p&gt;
&lt;p&gt;Modern LLMs interfaces partition chat sessions with markers delimiting sequences of tokens as system prompt, user input, thinking, tool use, and its own responses as assistant; these various sections are associated with roles. As the paper’s conclusion explains, &lt;em&gt;Role tags were a formatting trick that became the security architecture and the cognitive scaffolding of modern LLMs.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The phrase “&lt;em&gt;became the security architecture&lt;/em&gt;” raises a big red flag because that sounds like nobody thought much about it. What follows is my simplistic take, but the abstract principles involved are so fundamental that details are not important to the basic argument.&lt;/p&gt;
&lt;p&gt;Making sense of these sessions (for humans or LLMs) requires keeping track of the roles. Humans know how to understand conversations and easily follow the role markers (like HTML, &lt;code&gt;&amp;lt;user&amp;gt;2+2&amp;lt;/user&amp;gt;&amp;lt;assistant&amp;gt;4&amp;lt;/assistant&amp;gt;&lt;/code&gt;), it’s a completely reasonable scheme for us.&lt;/p&gt;
&lt;p&gt;But assuming that LLMs interpret roles that way would be naive anthropomorphization; and just such an assumption appears to be how such a weak security architecture came to be. As the paper explains (section 1): … &lt;em&gt;for an LLM, everything arrives through the same channel as one long token soup. Its own thoughts sit next to your instructions, which sit next to the contents of a random webpage it just fetched.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Designing a security architecture where user commands and data sit intermingled with root access only state and commands is already madness, but it gets worse. Classic software might be able to carefully parse such a token sequence accurately into respective roles, though it’s still a risky design, but LLMs do inference on that “token soup” where no hard boundaries of any kind exist or can be enforced. Once there is role confusion all bets are off, and prompt injection is just one of many sources of abuse or confabulation.&lt;/p&gt;
&lt;p&gt;It’s hard to think of a murkier trust boundary design.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;[*]&lt;/strong&gt; The inherent fragility of guardrails is worth expanding on because it’s not just an unsolved problem: infallible guardrails are mathematically impossible. NIST has &lt;a href=&#34;https://www.nist.gov/news-events/news/2026/06/nist-mathematical-proof-supports-transition-continuous-monitor-and-update&#34;&gt;published a proof&lt;/a&gt; (behind a firewall; seems wrong for a government entity) that guardrails will inevitably have holes. Based on the summary openly available, “a fixed set of guardrails placed on AI is not universally robust against adaptive adversarial prompts”. The work is especially cool because it builds on the technique Kurt Gödel used to prove his incompleteness theorems. According to the NIST authors, “The findings show that developers and organizations deploying AI systems need to dedicate resources to finding prompts that would break the security of AI systems, and to address them before adversaries can exploit them.”&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>AI agent parody?</title>
      <link>https://designingsecuresoftware.com/writings/ai-agent-parody/</link>
      <pubDate>Wed, 29 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/ai-agent-parody/</guid>
      <description>&lt;p&gt;This &lt;a href=&#34;https://huggingface.co/blog/security-incident-july-2026&#34;&gt;HuggingFace security incident disclosure&lt;/a&gt; has people talking about AI agent security. Today I saw such absolute positive spin that I found myself thinking “this must be a parody”: looking at the context I’m pretty sure that it isn’t … though some parodies stay in character all the way through.&lt;/p&gt;
&lt;p&gt;Just one opinion here, and others are quite free to hold different opinions and I won’t identify the source because nobody knows exactly where technology will go next. The post I saw is an excellent foil to serve as a prompt to explain my take at this point in the “AI” ride. I won’t attempt a long article on the perils of AI agents for now, but each point below could be expanded.  I’m not intentionally taking anything out of context for this quick take.  I’ll be brief and suggest a few edits as bracketed commentary to exact quotes following.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;very real [extremely dangerous] implications for the diffusion of AI in the enterprise&lt;/li&gt;
&lt;li&gt;need to harden systems and environments [far more than a company with world class expertise can today] to prepare for agents [before using them in production for any purpose not rock solid safely contained; agents are probably better than humans at escalating privileges so a large margin for area is necessary for safety]&lt;/li&gt;
&lt;li&gt;There are tons of measures [we know that &lt;a href=&#34;https://www.nist.gov/news-events/news/2026/06/nist-mathematical-proof-supports-transition-continuous-monitor-and-update&#34;&gt;“guardrails” are never enough&lt;/a&gt;] that enterprises must [not may or should] take [what “tons” exactly? what fraction of them are fully mature and demonstrated to be reliable today?]&lt;/li&gt;
&lt;li&gt;happy path case [how close are we to achieving that are reliable across a wide range of applications today?] with a good actor, if you give an agent a task [which you always would]&lt;/li&gt;
&lt;li&gt;In theory, you had [present tense “have”; humans have not yet been totally replaced] to worry about this for people as well, but with AI [anthropomorphization, ignoring that agents pose new categories of risk incomparable to humans] the risks are inherently amplified [why choose amplified risks?].&lt;/li&gt;
&lt;li&gt;[AI agents] don’t have the inherent judgment (yet) [on what basis would anyone think this likely enough to be talking about in 2026?] that a person does [big time anthropomorphization here and the comparison is an enormous stretch]&lt;/li&gt;
&lt;li&gt;you need an all new way [agreed: agents already penetrate existing security measures so our current arsenal won’t do it (and I don’t think we can count on AI to figure this out)] of managing data and protecting environments [how many enterprises have the time and resources for this when many struggle just to patch and do updates?]&lt;/li&gt;
&lt;li&gt;This obviously creates a huge opportunity for the startup and security ecosystems [yes, software customers need to pay for that — why would they spend even more, for what?]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, I agree with the last sentences in spirit but would make a few adjustments:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It should update everyone’s timelines [which without any clear plan is indeterminate if it’s even possible] on diffusion, though, as it also means that enterprises will have another step of work [that’s a very very long step that I fear not even an astronaut could make] they have to go through for agents to handle more [more? today it’s unsafe] autonomous work.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By the end I think I figured out &lt;strong&gt;the one unspoken assumption that flips this around to make perfect sense: &lt;em&gt;AI agents are inevitable&lt;/em&gt;&lt;/strong&gt;. If true, that would explain why we must take on new risks of unknown magnitude and cost to overhaul our systems and security regimes. Again: parody?&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>More on OpenAI/HuggingFace</title>
      <link>https://designingsecuresoftware.com/writings/more-observations-on-the-openai-huggingface/</link>
      <pubDate>Mon, 27 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/more-observations-on-the-openai-huggingface/</guid>
      <description>&lt;p&gt;The recent &lt;a href=&#34;https://huggingface.co/blog/security-incident-july-2026&#34;&gt;AI agent security debacle&lt;/a&gt;
must be reverberating quite a lot within the walls of the major
proponents of AI agentic technology because they &lt;a href=&#34;https://blogs.nvidia.com/blog/open-secure-ai-alliance/&#34;&gt;announced&lt;/a&gt;
a brand new &amp;ldquo;movement&amp;rdquo; apparently with zero details available yet.
If that isn&amp;rsquo;t a sign of flat-footedness then I don&amp;rsquo;t know what is.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://seldo.com/posts/did-openai-hack-hugging-face-or-didnt-they/&#34;&gt;Did OpenAI hack Hugging Face or didn&amp;rsquo;t they?&lt;/a&gt; and &lt;a href=&#34;https://alpaca.gold/@seldo/116989175324866273&#34;&gt;post&lt;/a&gt; raises the question of law breaking here which they suggest may be a case of “responsibility laundering” by blurring intention to do harm where the LLM in between OpenAI and the harmful actions done is to blame — and being an intangible, impossible to take to court, as well as opaque piece of software running model of a scale that defies analysis, the buck uselessly stops there. In my personal opinion (IANAL) that such damage occurred shows clearly this was due to insufficient caution wielding a powerful tool granted (intentionally or not) powerful privileges. Had an unintentional bug in complex classic software caused the same harm would/should the reaction be any different?&lt;/p&gt;
&lt;p&gt;As &lt;a href=&#34;https://shostack.org/blog/lessons-from-openai-huggingface-ai-security/&#34;&gt;Adam Shostack writes&lt;/a&gt;, “The team at OpenAI either can’t or won’t slow down to look at the output of these systems. Now, maybe, that’s the right call?” It looks like if you can avoid responsibility for collateral damage then it’s the right call (same as all the “move fast and break things” crowd does) …&lt;/p&gt;
&lt;p&gt;My two cents:
Sandboxing, perhaps doubled up, would be a good practice going forward -
compared to all the model inference the software overhead must be miniscule.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Normalizing cybersecurity facepalms</title>
      <link>https://designingsecuresoftware.com/writings/commonplace/</link>
      <pubDate>Wed, 22 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/commonplace/</guid>
      <description>&lt;p&gt;OpenAI writes: “Last week, Hugging Face disclosed a new kind of security incident⁠(opens in a new window) after they detected and contained an AI agent that compromised their infrastructure, something we expect to become more commonplace with the proliferation of increasingly cyber-capable models. After investigating, we now know that this particular incident was driven by a combination of OpenAI models — including GPT‑5.6 Sol and an even more capable pre-release model, all with reduced cyber refusals for evaluation purposes — while being internally tested on a benchmark⁠(opens in a new window) of cyber capabilities.”&lt;/p&gt;
&lt;p&gt;I’m appalled, there’s so much to be said just about this, there are so many hidden details to know what happened, so will be brief since the points should be crystal clear:
It’s now OK for their customers’ AI agents to attack your own systems in that we aren’t rethinking if we can really trust them is premature?&lt;/p&gt;
&lt;p&gt;If their own cybersecurity practice is flawed how can they train models adept in it, including effective cyber refusal guardrails?&lt;/p&gt;
&lt;p&gt;Specifically, the walk back how “safeguards were intentionally not enabled during this evaluation” … why was this necessary in the first place, how can we trust that this time it will be enough?
If this happened then it wasn’t running in a “highly isolated” environment. By definition.
So many security practices apparently not followed and not mentioned in actions taken: security review, threat modeling, auditing, more sandbox testing, to name a few.&lt;/p&gt;
&lt;p&gt;Naming the model and forthcoming greater model seems like grabbing marketing hype as Mythos did; with an insecure sandbox this is not a demonstration of cyberprowess.&lt;/p&gt;
&lt;p&gt;This appears to be over-provisioning of privileges: it was in a sandbox, but the sandbox process shouldn’t have such potentially destructive privileges in the first place for a test.&lt;/p&gt;
&lt;p&gt;There’s no alternative to full steam ahead so these incidents will become more commonplace?
Also last week, OpenAI disclosed that another model mistakenly deletes files which they called an honest mistake. More normalization, more of what we can expect in the AI agentic world.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>PHANTOM-B: threat modeling systems using LLMs</title>
      <link>https://designingsecuresoftware.com/writings/phantom-b/</link>
      <pubDate>Wed, 15 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/phantom-b/</guid>
      <description>&lt;p&gt;&lt;em&gt;Opinion&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Back in 1999 had STRIDE anticipated LLMs at all, much less their particular threats, it would be remembered as an unbelievable feat of prognostication rather than just categories of threats. However, even if it had predicted present day machine learning capabilities I think it plays a different role than the subject of the latest Shostack + Associates White Paper #6 titled &lt;a href=&#34;https://shostack.org/files/papers/PHANTOM-B_Whitepaper_Shostack.pdf&#34;&gt;PHANTOM-B: A STRIDE Analog for LLMs (PHANTOM-B is a tool to structure how you answer the question “What can go wrong with the LLM parts of the system?)”&lt;/a&gt; clearly notes: &lt;em&gt;“PHANTOM-B is intended to be used as prompts, rather than categories.”&lt;/em&gt; By “prompts” I believe that means suggestions for (non-digital) people — not inputs to LLMs.&lt;/p&gt;
&lt;p&gt;This is a great topic for discussion and a wide open greenfield, so for the sake of discussion what follows is first reactions to the paper. Beyond right and wrong, I hope it’s instructive even if totally wrong.&lt;/p&gt;
&lt;p&gt;If I follow, the new acronym that serves as the centerpiece of the paper enumerates not &lt;em&gt;what&lt;/em&gt; rather than &lt;em&gt;how&lt;/em&gt; things go wrong using LLMs. Here are the LLM pitfalls covered:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prompt injection&lt;/li&gt;
&lt;li&gt;Hallucination&lt;/li&gt;
&lt;li&gt;Anthropomorphization&lt;/li&gt;
&lt;li&gt;Non-explainability&lt;/li&gt;
&lt;li&gt;Training issues (including data quality or “poison”)&lt;/li&gt;
&lt;li&gt;Over-reliance on the LLM&lt;/li&gt;
&lt;li&gt;Missing security engineering&lt;/li&gt;
&lt;li&gt;Biases&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some comments that again I stress are personal opinions where I’d like to understand better:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Given the probabilistic nature of LLM algorithms I think of prompt injection as a continuum rather than a binary (this is prompt injection, that is not). All prompt tokens including choice of words that humans consider equivalent must tweak the output to some degree — and depending on the topic and sensitivity minor influence might bleed into more significant effects on outcomes.&lt;/li&gt;
&lt;li&gt;For large models it seems inconceivable that so-called &lt;a href=&#34;https://designingsecuresoftware.com/writings/2026may/#guardrails&#34;&gt;guardrails&lt;/a&gt; can possibly be 100% — and there is credible claim of a &lt;a href=&#34;https://www.nist.gov/news-events/news/2026/06/nist-mathematical-proof-supports-transition-continuous-monitor-and-update&#34;&gt;proof&lt;/a&gt; of that. If prompt injection is unavoidable (undetectably and to an unknown extent) how can you possibly model the residual threat? (see Mitigation, below)&lt;/li&gt;
&lt;li&gt;Hallucination seems to be a catch-all for any incorrect response (that’s not my usage but no point bickering over definitions). However, I will opine that the stated definition is infeasible for LLMs (“LLM hallucinations are outputs that are at odds with facts, math, or common sense.”) My point is that an LLM’s Umwelt is determined by the training data it ingests: it’s clearly impossible for it to independently fact check what it learns by testing inputs in the real world; that is, a “perfect” LLM must still 100% believe its training.&lt;/li&gt;
&lt;li&gt;I must admit that I could not follow the Anthropomorphization discussion for two reasons. First, our tendency to infer human-like inner state is deeply embedded from ancient times (primitive gods as humans with super powers) or even projecting human thinking and intention onto almost any living organism (“stubborn weeds”) or inanimate objects (“my car didn’t want to start for me this morning”). Also, very related, is the fact that our language doesn’t have pronouns that fit LLMs so repurposing the existing ones is not only reasonable but without inventing words from whole cloth what is the alternative?&lt;/li&gt;
&lt;li&gt;Non-explainable or inexplicable answers seem an old problem with classic (not LLM) software. The infamous &lt;a href=&#34;https://en.wikipedia.org/wiki/COMPAS_(software)&#34;&gt;COMPAS&lt;/a&gt; system used for correctional rehabilitation and judicial sentencing is one case in point. A numerical algorithm cannot be an explanation for such a subjective decision because it allows no exceptions, not to mention data bias (another PHANTOM-B factor). However, every experienced programmer has run into issues where one must shake their head and admit, “I have no idea why that is happening”, so I don’t follow the LLM-specific point here.&lt;/li&gt;
&lt;li&gt;I would add a third training data threat: insufficient data. Due to common sycophancy (are there any exceptions?) LLMs will conjure up plausible responses outside any available data.&lt;/li&gt;
&lt;li&gt;Over-reliance on a model sounds like “no human in the loop” but that’s infeasible for almost any application so I don’t know what to make of this threat (see below for ideas).&lt;/li&gt;
&lt;li&gt;Missing security engineering is hardly particular to LLMs. I’d like to see an example of how “an LLM magnifies”.&lt;/li&gt;
&lt;li&gt;Biases in data also seem endemic in classic software that processes any kind of data produced by humans who are vulnerable to countless biases and thinking errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;more-threats&#34;&gt;More threats&lt;a class=&#34;anchor&#34; href=&#34;#more-threats&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h4&gt;
&lt;p&gt;An additional threat unmentioned concerns the disposition of data sent to the LLM which could be a component running on the same box as the app in question, or a remote service: what could possibly happen with that data? Not only could there be an external leak, but also could there be influence between independent prompt invocations? Is prompt data recorded or not? Will LLM usage be used for future training purposes? And if the LLM is provided by a third party there are supply chain risks to consider like any other software.&lt;/p&gt;
&lt;h4 id=&#34;llms-are-just-code&#34;&gt;LLMs are just code&lt;a class=&#34;anchor&#34; href=&#34;#llms-are-just-code&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h4&gt;
&lt;p&gt;Perhaps this is obvious: LLMs are code like any other software so prone to all the same issues. Specifically, inference engines are table-driven algorithms with the unusual tweak of being stochastic: they introduce entropy into their input which is not something you often would see back in the day.&lt;/p&gt;
&lt;p&gt;I mention these because whenever special treatment is afforded to LLMs it’s easy to focus on these issues and forget all the rest that we always need to consider.&lt;/p&gt;
&lt;h4 id=&#34;two-llm-threat-scenarios&#34;&gt;Two LLM threat scenarios&lt;a class=&#34;anchor&#34; href=&#34;#two-llm-threat-scenarios&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h4&gt;
&lt;p&gt;Wisely, to maintain sharp focus, &lt;a href=&#34;https://shostack.org/files/papers/PHANTOM-B_Whitepaper_Shostack.pdf&#34;&gt;the paper&lt;/a&gt; does not “include any defenses, controls or mitigations” which would make it much longer. However I see two fundamentally different kinds of LLM applications worth separating out for this discussion (of course it isn’t for me to decide the scope of this work, so consider this my own extension). At times the paper mentions this distinction which I consider applicable across the board.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;LLM as data transformer that morphs inputs to output (unable to influence any action)&lt;/li&gt;
&lt;li&gt;LLM as agent with privileges that does or can possibly do things&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The difference between these amounts to a distinction in data flow and tainting: is the data simply passed through or can LLM output control or influence running code — thereby opening the door to usurping control and possibly escalating (such as with prompt injection). All other cases potentially let the LLM influence code execution so the risk is substantially higher.&lt;/p&gt;
&lt;p&gt;Avoiding specific mitigations, I think that one mitigation universally applies to all LLM uses because fundamentally they cannot be fully trusted. Model parameters are far beyond conceivable means of analysis, plus with stochastic variation added in testing because effectively an infinite number of cases. While it is true that no complex software can be “fully trusted” with LLM inference it’s unclear that any real metric for degree of trust is possible. With classic software we have methods such as test coverage that provide a reasonable proxy for the extent of testing.&lt;/p&gt;
&lt;h4 id=&#34;inherently-risky&#34;&gt;Inherently Risky?&lt;a class=&#34;anchor&#34; href=&#34;#inherently-risky&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h4&gt;
&lt;p&gt;The paper concludes: “In contrast to more traditional software, LLM issues seem to be inherent, and the best available defenses are probabilistic, rather than reliable. The dangers that result from LLM being token-prediction machines seem inseparable from the LLMs”. If this is true and the extent of risk cannot reliably be restricted to some ceiling on blast radius how can these be safely used for serious purposes?&lt;/p&gt;
&lt;p&gt;At least in theory I would say there is a decent answer, not one many LLM advocates will like. As with any software component that cannot be fully trusted, LLMs should be sandboxed if security is a serious concern. Depending on the application this can be relatively straightforward, since LLMs are regular code tried and true secure coding techniques work great providing that the security requirements are well defined.&lt;/p&gt;
&lt;p&gt;Every application is different, but here’s a sketch for a generic application that invokes an LLM. Suppose, for example, a JSON with a prescribed schema prefixed by a standard prompt is passed to the LLM, and the response should be a JSON (different schema). Sandboxing by checking both JSONs in and out with standard input validation techniques goes a long way to preventing trouble and if it happens detecting and rejecting it before bad things happen.&lt;/p&gt;
&lt;p&gt;With sandboxing the data transformer use cases are relatively tame. If it’s a poem composition app then worst case it writes lousy poems, no STRIDE worries at all. Once LLM output can influence code execution then the attendant risk derives from a combination of how much influence — from minimal up to arbitrary code execution — and the scale of the blast radius of its potential privileges.&lt;/p&gt;
&lt;p&gt;Viewed as sandboxed code, LLM security takes on the look and feel of any other code.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Least credentials and Age verification</title>
      <link>https://designingsecuresoftware.com/writings/leastcred/</link>
      <pubDate>Wed, 24 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/leastcred/</guid>
      <description>&lt;p&gt;In yet another breach of sensitive data (passports), &lt;a href=&#34;https://www.schneier.com/blog/archives/2026/06/one-million-passports-leaked-online.html&#34;&gt;Bruce Schneier makes a good point&lt;/a&gt; that using such powerful credentials as proof required for an unimportant purpose is the design flaw behind this operational snafu. This is the equivalent to the superintendent of a large apartment building giving the master key to someone who only needs access to a storage closet for a day.&lt;/p&gt;
&lt;p&gt;Much of the uproar about proposed age verification requirements concerns this very issue. This principle expresses what creates the honeypot effort (all those high value credentials), ruins anonymous use (strong identity disclosure), normalization of spam requesting the same, expanding attack surface, enabling scope creep.&lt;/p&gt;
&lt;p&gt;The principle of Least privilege is well known, warning against granting more privileges such as access rights than is strictly necessary; I’ve added Least information as another &lt;a href=&#34;https://designingsecuresoftware.com/text/ch4-minim-patterns/&#34;&gt;Exposure Minimization pattern&lt;/a&gt;. Now we add Least Credential to the list, differentiating the scope of the authenticating token (and its utility getting authorization) from the over-provisioning privileges.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Flaunt your Threat Models!</title>
      <link>https://designingsecuresoftware.com/writings/flaunt/</link>
      <pubDate>Thu, 14 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/flaunt/</guid>
      <description>&lt;p&gt;Threat modeling is the most powerful, underutilized, easy-to-do security methodology we have: why isn&amp;rsquo;t everybody doing it already, or why do those who are keep their work secret? If you already threat model your digital systems and products, and are doing the work already then you are doing security right so you should share it with pride. Publishing threat models may be the best evidence of excellent security work that customers and users can appreciate the value of, short of a rigorous detailed design and code review. You&amp;rsquo;ve already done the work — or if not you really should — and making it public not only is great promotion but it also helps all stakeholders understand their respective roles and responsibilities in securing larger systems.
&lt;em&gt;(about 4600 words)&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;value-proposition&#34;&gt;Value proposition&lt;a class=&#34;anchor&#34; href=&#34;#value-proposition&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Threat models have long been recognized as an essential foundation for building secure software, identifying and proactively mitigating risks. However, in addition, they also offer value to other stakeholders in ways yet to be fully appreciated. The software marketplace is flooded with &amp;ldquo;most secure cloud storage&amp;rdquo; or &amp;ldquo;best overall security&amp;rdquo; offerings, but invariably these are completely vague and also unsubstantiated. While we don&amp;rsquo;t have objective metrics for security levels, publishing a threat model provides details of the maker&amp;rsquo;s view of security characteristics in terms of threats and mitigations and provides concrete evidence of security work done.&lt;/p&gt;
&lt;p&gt;Beyond aspirational slogans, customers can assess threat models to choose among competitive products as well as inquire about possible omissions or other details in an informed way to better understand the offering. The difference between a very basic threat model (or none at all) compared to a thorough one that lists specifics, describes attack surfaces, mitigations, and assessment of defenses, is night and day. In addition, end users better understand security policy and controls in the context of threats, resulting in better compliance and alignment.&lt;/p&gt;
&lt;p&gt;Security questionnaires are a common practice today for vendor assessment (full disclosure: I have never filled out nor requested one myself) but I believe that a threat model provides a much more useful description of security posture, with risks and countermeasures presented in context of the overall system posture rather than itemized statements about various parts of the system. Unless fully standardized, various different questionnaires may be required, but a threat model is fit to the product so it stands as a universal documentation of its security.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s important to state that when using threat models for a variety of purposes with different stakeholders, some flexibility in presentation is necessary to make it accessible to a wider audience of readers. The most detailed form of the threat model may only be used internal due to references to the organization or other confidential information and internal details, but from this (perhaps by tagging sections for audiences) derivative versions can be compiled: high level executive summary for the C-suite or sales presentation; business risk management; technical integrators; software developers; end users.&lt;/p&gt;
&lt;h3 id=&#34;historical-perspective&#34;&gt;Historical perspective&lt;a class=&#34;anchor&#34; href=&#34;#historical-perspective&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Since it&amp;rsquo;s important that threat models include perspectives from all stakeholders, this informative section is included for the benefit of readers new to the concept of threat modeling.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Imagine the surprise in Troy the day after they accepted (let through the gates) that &amp;ldquo;gift horse&amp;rdquo; and the invaders hidden inside wreaked havoc: they had no idea that such an attack was possible. Had even one Trojan guard thought about the &amp;ldquo;gift horse&amp;rdquo; possibly being a trap (it did come from their bitter enemies, after all) it wouldn&amp;rsquo;t have taken a genius to consider that something could be hidden inside, and even a cursory inspection would have been sufficient to save the city.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Trojans were defeated because they failed to threat model&lt;/strong&gt; — over &lt;em&gt;three thousand years later&lt;/em&gt;, the internet spans the globe, computers are faster and cheaper than ever, we have advanced generative AI, and &lt;strong&gt;most software companies apparently are making the same mistake&lt;/strong&gt;. (I say &amp;ldquo;apparently&amp;rdquo; because if they are threat modeling they are doing so in secret for some reason, choosing &amp;ldquo;security by obscurity&amp;rdquo;.)&lt;/p&gt;
&lt;p&gt;Any digital product or service is potentially exposed to attack (unless it&amp;rsquo;s in an air-gapped system, and even then sometimes there are ways) so guarding all &amp;ldquo;gates&amp;rdquo; (attack surface is the term of art) is essential, and solid defense begins with a threat model to know what to expect as incoming.&lt;/p&gt;
&lt;h3 id=&#34;case-study&#34;&gt;Case study&lt;a class=&#34;anchor&#34; href=&#34;#case-study&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;If you think modern software makers can&amp;rsquo;t possibly be missing the threat modeling boat, consider the recent &lt;a href=&#34;https://www.crowdstrike.com/blog/falcon-content-update-preliminary-post-incident-report/&#34;&gt;Crowdstrike incident&lt;/a&gt; that crashed millions of machines, disrupting numerous large corporation operations including thousands of flight cancellations. The company has not disclosed any threat models so we don&amp;rsquo;t know what happened, but the possibilities must be:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;They had a great up-to-date threat model&lt;/li&gt;
&lt;li&gt;They had a threat model but it was outdated or low quality&lt;/li&gt;
&lt;li&gt;They did not have a threat model&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Option 1 makes no sense: why in the world wouldn&amp;rsquo;t they share their threat model as solid evidence of the great job they were doing? But more importantly, with hindsight we know that a great threat model &lt;em&gt;must&lt;/em&gt; have included the threat of &amp;ldquo;pushing a bad update that crashes millions of customer systems&amp;rdquo; … in which they need to explain how that threat was allowed to occur.&lt;/p&gt;
&lt;p&gt;Option 2 fits the facts, a partial threat model omitting the aforementioned crashing threat. This would be extremely embarrassing (and therefore management could decide to never mention the threat model at all), but a quick check of the threat model against what happened would immediately identify the problem internally: failure to identify, and hence mitigate, crashes.&lt;/p&gt;
&lt;p&gt;Option 3 (no threat model) does seem most likely, but in the absence of disclosure we can only guess from the outside. Presumably the developers knew well that software updates can have bugs and lead to crashes (not to mention the extreme risk for code running in the kernel), so how was this allowed to happen? My best speculation is that many people considered the risk but assumed it was somebody else&amp;rsquo;s job — with a threat model it&amp;rsquo;s documented (or not) for all to see.&lt;/p&gt;
&lt;p&gt;Note that threat modeling is usually considered a &amp;ldquo;software security&amp;rdquo; technique to mitigate vulnerabilities, implicitly to proactively defend against malicious &amp;ldquo;attacks&amp;rdquo;; however, in the &lt;strong&gt;Crowdstrike incident there is no evidence of any bad actor&lt;/strong&gt;. All the trouble was all self-inflicted and the problem quickly expanded to massive scale because the Blue Screen crash prevented customer machines from updating. Even though the flaw was promptly fixed, since the crash apparently occurred before the &amp;ldquo;check for updates&amp;rdquo; stage of the code was reached, resulting in an endless reboot loop. While we cannot forget our hindsight perspective, when you drop the &amp;ldquo;attacker&amp;rdquo; mindset and simply focus on the crashing threat to availability (Denial of service in &lt;a href=&#34;https://shostack.org/resources/threat-modeling&#34;&gt;STRIDE&lt;/a&gt; terms), crashing in the kernel before &amp;ldquo;check for updates&amp;rdquo; is clearly a risky exposure.&lt;/p&gt;
&lt;p&gt;With no official word on threat modeling we don&amp;rsquo;t know the facts, but &lt;strong&gt;we can enumerate a complete set of options&lt;/strong&gt; (what follows is a coarse grain breakdown that could be refined) with respect to this important threat that emerged suddenly causing so much disruption:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The threat was never explicitly identified (poor, outdated, or non-existent threat model)&lt;/li&gt;
&lt;li&gt;The threat was identified by poorly mitigated (a bug or process failure allowed it to happen)&lt;/li&gt;
&lt;li&gt;The threat mitigation was outsourced (insurance, third party responsibility) and they failed&lt;/li&gt;
&lt;li&gt;The threat was accepted (unlikely to occur, not worth the effort, etc.) and left unmitigated&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;threat-analysis&#34;&gt;Threat analysis&lt;a class=&#34;anchor&#34; href=&#34;#threat-analysis&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Surely the details get more complicated, but in terms of first principles the explanations above should cover the map of possibilities. Notably missing is the threat was identified and robustly mitigated, because then (by definition) it would not have happened.&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;acceptable&amp;rdquo; category is worth explaining a little more because there are a few reasonable possibilities lurking there. One example might be insider attack risk (sabotage): by all accounts this is extremely rare in software tech (so far as we know), and crucial positions (administrator privileges in production operations) always goes to high performing staff with years of experience; additionally, it&amp;rsquo;s very hard to eliminate risk at this level of authority, and having every crucial action require multiple reviews and signoffs would be highly infeasible in practice (so it&amp;rsquo;s quite reasonable to accept this risk, and in this case also highly unlikely anything like this was a factor). The other kind of &amp;ldquo;acceptable&amp;rdquo; risk is extremely unlikely or some external catastrophe beyond anyone&amp;rsquo;s control — simultaneous power outages in five different locations, terrorism or war, etc.&lt;/p&gt;
&lt;p&gt;My purpose in dissecting &lt;strong&gt;the Crowdstrike incident as a lens on the importance of threat modeling&lt;/strong&gt; is to demonstrate how central understanding threats and mitigations is to security. With a threat model in hand (or non-existent, as the case may be) when something like this happens, we can immediately zoom in on the proximate cause.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Was the threat identified?&lt;/li&gt;
&lt;li&gt;If so, was the threat mitigated, outsourced, or accepted?&lt;/li&gt;
&lt;li&gt;If mitigated, were the countermeasures sufficient and robust?&lt;/li&gt;
&lt;li&gt;If outsourced, how did they perform and what assurance was obtained?&lt;/li&gt;
&lt;li&gt;If accepted, was that a reasonable decision (given that this just happened)?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Responding to the incident is now a matter of drilling down into the relevant details, e.g. review the mitigation plan, compare to process and implementation, and so on. Threat modeling provides a map for analysis and remediation, and without it understanding is fragmented and responses to incidents are scattershot.&lt;/p&gt;
&lt;h3 id=&#34;secretly-threat-modeling&#34;&gt;Secretly threat modeling&lt;a class=&#34;anchor&#34; href=&#34;#secretly-threat-modeling&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;We may never know the full story of the Crowdstrike incident now that litigation has begun, and I want to be clear this is not meant to throw shade, but rather I&amp;rsquo;m writing in the spirit of learning from what already happened because it&amp;rsquo;s a prominent example of my point. Writing in 2024, &lt;strong&gt;virtually all software companies threat model in secrecy&lt;/strong&gt; — legally shored up by serious NDAs ensuring it stays private — and Crowdstrike was just one more case of this industry practice.&lt;/p&gt;
&lt;p&gt;Now let&amp;rsquo;s consider &lt;strong&gt;the cost of threat modeling behind a curtain of secrecy&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First of all, we have no idea &lt;em&gt;if&lt;/em&gt; threat modeling is even being done anywhere!&lt;/li&gt;
&lt;li&gt;If it is being done, who is doing it well (or not), how thoroughly, and is it up to date?&lt;/li&gt;
&lt;li&gt;When incidents happen, the maker is now in a bind: that&amp;rsquo;s a bad time to release a model.&lt;/li&gt;
&lt;li&gt;Most importantly, customers who depend on a product have no idea what threats the maker is aware of and mitigating, so they don&amp;rsquo;t know what&amp;rsquo;s on them to defend against.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It goes without saying that plenty of folks are unhappy with the status quo of software security, but nobody knows what to do. CISA rightly urges software makers to take more security responsibility and urges that &amp;ldquo;&lt;a href=&#34;https://www.cisa.gov/secure-our-world/secure-your-business&#34;&gt;customers demand better security from their technology providers&lt;/a&gt;&amp;rdquo; — but it&amp;rsquo;s very unclear how that is going to happen, even though it&amp;rsquo;s a great aspiration.&lt;/p&gt;
&lt;p&gt;Without seeing their threat model we potential customers can only blindly trust that the software is secure with no idea how thoroughly the maker has actually done the work. Software marketing tends to imply &amp;ldquo;great security&amp;rdquo; so customers naturally expect that all relevant threats are carefully identified and mitigated, but never get any evidence of this — until they learn otherwise the hard way as we saw. In no small part, this lack of visibility leads to mismatched expectations.&lt;/p&gt;
&lt;h3 id=&#34;openly-threat-modeling&#34;&gt;Openly threat modeling&lt;a class=&#34;anchor&#34; href=&#34;#openly-threat-modeling&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;A world where &lt;strong&gt;software makers routinely publish threat models would be a huge step forward.&lt;/strong&gt; Doing so would provide useful details about what providers are doing to secure their products in an actionable way, giving customers something to assess instead of marketing hype and empty promises. By broad consensus they should be threat modeling already, so sharing this work openly (which they should be proud of assuming it&amp;rsquo;s done well) is not at all hard to do!&lt;/p&gt;
&lt;p&gt;Threats are a reality of any software product, so enumerating them and discussing mitigation isn&amp;rsquo;t divulging any proprietary information or making the product easy to clone as full source code disclosure might (and most customers don&amp;rsquo;t have the time or skills to evaluate all that anyway). Threat models boil it all down to the essential security matters.&lt;/p&gt;
&lt;p&gt;If software makers published their threat models it would &lt;strong&gt;let customers make informed security decisions&lt;/strong&gt; when choosing software offerings. Once a few bold software makers take the first step, threat models could quickly become the norm for quality software.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No threat model? Let&amp;rsquo;s look elsewhere… they aren&amp;rsquo;t even trying to be secure.&lt;/li&gt;
&lt;li&gt;Weak threat model? No thanks, they don&amp;rsquo;t have expertise and/or security isn&amp;rsquo;t a priority.&lt;/li&gt;
&lt;li&gt;Decent threat model, but they missed X. Now you can have a discussion about X: maybe they can improve and handle it, or maybe the buyer can cover that easily, etc.&lt;/li&gt;
&lt;li&gt;Great threat model, very thorough. Let&amp;rsquo;s get this one, definitely!&lt;/li&gt;
&lt;li&gt;They say they have a great threat model but cannot share it: why not?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Threats are mainly inherent for a software component by virtue of its functionality, so listing threats should not endanger valuable trade secrets. Some threats may be implementation dependent, but you don&amp;rsquo;t have to detail the mitigation technology just assert recognizing and addressing relevant threats. Alternatively, if your database component is only meant for theoretical research purposes, disclose that information leak is &lt;em&gt;not mitigated&lt;/em&gt; so people know.&lt;/p&gt;
&lt;p&gt;Therefore, &lt;strong&gt;open threat modeling should never be divulging any crown jewels, it&amp;rsquo;s more like a &amp;ldquo;spec sheet&amp;rdquo; for security considerations&lt;/strong&gt;. Also it&amp;rsquo;s worth mentioning that for large products having separate internal and external versions of a threat model makes sense. Details of internal techniques, review process, testing, release procedures, and approvals can be kept private.&lt;/p&gt;
&lt;h3 id=&#34;dropping-the-ball&#34;&gt;Dropping the ball&lt;a class=&#34;anchor&#34; href=&#34;#dropping-the-ball&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Interfaces are always challenging in software, especially with different developers on either side, across teams or between organizations, so many details need to align just right for things to work smoothly. Complete documentation of all interfaces is often unavailable or outdated, there are changes with newer versions, and so on, so it&amp;rsquo;s no surprise that the ball often gets dropped.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Threat models help at a high level clarifying who is responsible for specific threats&lt;/strong&gt;. Customers still have to trust providers to do a quality job, but having clear commitments to which threats they do or do not take responsibility for makes interfacing much more straightforward. There&amp;rsquo;s no more &amp;ldquo;but we assumed you handled that&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;For example, one of the big challenges of securing software is doing input validation. Injection attacks are a common symptom of not doing this well, e.g. SQL injection, cross-site scripting, and more. One very common pattern is across an interface both sides assume the other will be input validation (it&amp;rsquo;s always easier to hope someone else takes care of things) — or another miscommunication is where the two sides use slightly different notions of what input is valid. Good threat models will defend attack surfaces (such as unauthenticated web traffic) and can specify what input validation they do (ideally clearly defined) so there is no room for misunderstanding. There is no right and wrong for which side should handle untrusted input, clarity on responsibility is the key point.&lt;/p&gt;
&lt;h3 id=&#34;do-they-know-do-they-care&#34;&gt;Do they know? Do they care?&lt;a class=&#34;anchor&#34; href=&#34;#do-they-know-do-they-care&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;We see major software security debacles on a regular basis these days, but it doesn&amp;rsquo;t seem that we are learning important lessons from them so these are likely — undoubtedly? — sure to continue. Exactly how these mistakes happen seems invariably veiled from view for very understandable reasons (including legal risk and embarrassment) yet &lt;strong&gt;every time we duck getting to the bottom of what happened we miss an enormous learning opportunity&lt;/strong&gt;. Even with vulnerabilities in open source, disclosures rarely if ever mention process: was there a code review, does the team think about security responsibility, do tests include security cases where access should be blocked, is there a threat model and is it up to date?&lt;/p&gt;
&lt;p&gt;This isn&amp;rsquo;t about shaming, so I won&amp;rsquo;t mention any particulars, but over and over I end up wondering, &amp;ldquo;Do they know?&amp;rdquo; (about SQL injection attacks, or integer overflow, or whatever the flaw happens to me) because if not this indicates we have an education and awareness problem. Alternatively, if they do indeed know, then I wonder, &amp;ldquo;Do they care?&amp;rdquo; because that suggests there was a failure or process or in execution. Perhaps someone was rushing and skipped code review, or there was a code review that flagged the issue but the change was never made, or nobody considered that security was even an issue.&lt;/p&gt;
&lt;p&gt;Answering these most basic of questions is important because it allows us to see what actually caused the failure. Looking at a code diff — vulnerable code changed to secure code — tells us nothing about where the ball was dropped, and if it was due to inattention or ignorance. When we can pinpoint how problems occur it serves as a valuable lesson to us all. It&amp;rsquo;s one thing to say that the root cause of a vulnerability is a buffer overflow, but underlying that is the more important story of how that code was released. For example, if the senior developer on a project got into the habit of skipping code reviews and that led to a vulnerability, then others doing that might get the message how risky it is.&lt;/p&gt;
&lt;p&gt;If security problems are due to people not knowing then we can work on that through education; if the problem is not caring then it&amp;rsquo;s a matter of incentives and customers demanding security assurance, including open threat models as concrete evidence of trustworthiness. But when vulnerabilities &amp;ldquo;just happen&amp;rdquo; without any clear root cause — not the vulnerable code but the reason that code was released — we learn nothing and are bound to fall into the same traps again and again. And the best I know to get to the root of these lapses is via the lens of threat modeling.&lt;/p&gt;
&lt;h3 id=&#34;knowing-and-caring-enough&#34;&gt;Knowing and caring enough&lt;a class=&#34;anchor&#34; href=&#34;#knowing-and-caring-enough&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Of course the reality of modern software security is more complicated than a binary choice between not knowing or not caring. It&amp;rsquo;s a simplification to characterize any organization of people in such a way, and attitudes vary over time and circumstances, but it&amp;rsquo;s the responsibility of management to lead and institute culture and policy that fosters right thinking and action. Additionally, even when we know and we care, humans are fallible and mistakes can always happen. For major software products, IMHO, process and oversight should make this vanishingly unlikely to the point that if it does it&amp;rsquo;s a major failure resulting in well deserved reputation loss. When this happens it&amp;rsquo;s a signal that mitigations were insufficient and the best way to repair trust is to explain how despite all efforts this happened (maybe asteroids hit two data centers the same day!) and what changes will prevent recurrence.&lt;/p&gt;
&lt;p&gt;As a bonus, such open disclosures, which should be rare, serve as valuable lessons for others to prevent similar pitfalls where applicable. Just as airlines refrain from competing on safety (after an airline disaster the others don&amp;rsquo;t pile on claiming to be safer), a mature software industry should share security experience and countermeasures generously for the good of the industry as a whole. Doing so begins with maximal transparency, as unnatural as that may seem now, and meaningful security understanding always is best couched in terms of threat models.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://shostack.org/about/adam&#34;&gt;Adam Shostack&lt;/a&gt; (in a private communication) points out yet another cautionary factor within knowing and caring to recognize. Software makers should endeavor to include all stakeholder points of view in their threat models, but of course the world is large and complicated, software gets used in ways its makers never imagined, so this is at best imperfect best effort. Software customers can be inventive, and use software in creative ways resulting in surprises both positive and at times unanticipated use cases result in problems. When this happens all we can do is learn from experience, share the details to help others repeat similar failures, and update the threat models accordingly. Typically this means responding to the new threat(s) with mitigations, or transferring the risk to be the customer&amp;rsquo;s responsibility or advising against such use explicitly. And the best way to do that, yet again, is updating the threat model to incorporate the new perspectives gained when unexpected problems arise.&lt;/p&gt;
&lt;h3 id=&#34;is-publishing-threat-models-safe&#34;&gt;Is publishing Threat models safe?&lt;a class=&#34;anchor&#34; href=&#34;#is-publishing-threat-models-safe&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Some have asked: &amp;ldquo;if you publish your threat model, isn&amp;rsquo;t that risky as a map for an attacker?&amp;rdquo; It&amp;rsquo;s a good question and it highlights that this is a matter of trade offs, you accept a little risk in order to share knowledge about the software more effectively with others.&lt;/p&gt;
&lt;p&gt;In theory it&amp;rsquo;s true that any additional information available to would-be attackers is potentially going to help them to some degree, but this reasoning suggests that all support and documentation should be kept proprietary and be restricted only to paying customers. Researching the Crowdstrike debacle I was unable to find technical details, only a customer support portal requiring login, and to this day the full story remains to be well understood.&lt;/p&gt;
&lt;p&gt;Open source code is the same kind of trade off: by showing the code you potentially help attackers, but you also potentially enable an army of white hat security researchers to find and fix vulnerabilities. It&amp;rsquo;s impossible to help one side without also helping the other, and the same goes for open product support, documentation, API details, you name it — and that should never mean keeping it all secret.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://curl.se/docs/audit/threatmodel-2022.pdf&#34;&gt;Here&lt;/a&gt;&amp;rsquo;s a fine example of a threat model from a security audit of an important open source project. It&amp;rsquo;s impressive and quite thorough, and in my opinion if anything a threat actor is going to have one look at that and decide to attack something else. This is ideal and I don&amp;rsquo;t support that every software product is going to have resources for such an effort, but to the question of helping threat actors this is informative because it is disclosing so much information. How does this help attackers? Compare that to how much it helps people developing and using the software which is quite substantial.&lt;/p&gt;
&lt;p&gt;I have to say that if a casual read of your threat model shouts out unprotected attack scenarios then it&amp;rsquo;s a terrible job. Calling out threats enables mitigations to be designed, no competent model calls out and then ignores major threats. If you are worried that your threat model is too flimsy to publish then you probably haven&amp;rsquo;t invested enough effort in it yet or need outside help: this alone is a valuable signal worth knowing. Software makers who model with all diverse stakeholder perspectives should be confident, and if done well bad guys won&amp;rsquo;t be able to quickly see holes in it.&lt;/p&gt;
&lt;p&gt;Remember that you can always publish limited versions of the full model omitting anything you might have concerns about. In the end, hiding your threat model amounts to security by obscurity, which is fragile because if secret weaknesses become known you are caught flat-footed — exactly what a decent threat model helps you avoid.&lt;/p&gt;
&lt;h3 id=&#34;what-if-&#34;&gt;What if …?&lt;a class=&#34;anchor&#34; href=&#34;#what-if-&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Imagine traveling back in time to mid-2024, you are hired to do SecOps duty for a large IT system that uses Crowdstrike EDR technology. You are still learning the ropes, so first you have a look at their threat model which is published to their website in our alternative timeline. Now consider those three options we identified but have no information about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They have a great up-to-date threat model: excellent; now if the same incident occurs and everything crashes suddenly, it&amp;rsquo;s clearly on them, DevOps did not screw it up.&lt;/li&gt;
&lt;li&gt;They have a threat model but it omits the crashing threat: you escalate that, consider short-term mitigations on your side and demand they handle it or you will go elsewhere.&lt;/li&gt;
&lt;li&gt;They have an outdated threat model: you contact them and insist on a prompt update.&lt;/li&gt;
&lt;li&gt;They did not have a threat model: with competition who do, ideally you are using them.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whatever the case, &lt;strong&gt;the relationship between provider and customer is far better informed and productive — responsibilities are clarified, or choices to accept risk are made explicit&lt;/strong&gt;. This might even be the beginning of a better software market where customers are empowered to demand better security, or at least have a far clearer picture of what risks are on them to handle.&lt;/p&gt;
&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion&lt;a class=&#34;anchor&#34; href=&#34;#conclusion&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;Professional software developers should all be using threat modeling to ensure your awareness of applicable threats and that sufficient mitigations are implemented and tested. Especially in recent years there is growing acknowledgment of the importance of threat models, yet what work is actually being done seems to be all done behind closed doors so we have no idea if it&amp;rsquo;s being utilized for 1% or 99% of our software.&lt;/p&gt;
&lt;p&gt;An analogy may help convey the mindset about threat modeling that I&amp;rsquo;m suggesting would help foster understanding of actual security characteristics of our software. Consider choosing between two restaurants: one has an open kitchen with staff working away, versus the other with a closed kitchen secreted behind black curtains, and, to get extreme to emphasize the point, an employees-only policy for entry with a big &amp;ldquo;Keep Out&amp;rdquo; sign at the entrance.&lt;/p&gt;
&lt;p&gt;This article makes the case for open threat modeling published as an important &amp;ldquo;spec sheet&amp;rdquo; for any software (or its absence signifying the security characteristics are unknown). Just as opening threat modeling to all stakeholder perspectives is important, sharing the full model with everyone is equally important to foster better understanding and clear communication of responsibilities for security. Since the point of threat modeling is understanding how the software will interact with humans in a larger environment, it&amp;rsquo;s most effective when &amp;ldquo;open&amp;rdquo; both in the sense of  being published widely and also broad in scope. Risks potentially impact everyone and are a shared community responsibility: that&amp;rsquo;s why threat modeling is not just for experts, not just about malicious attacks (but including accidents and hardware failures), not only used internally, and actually not strictly limited only to software.&lt;/p&gt;
&lt;p&gt;As I &lt;a href=&#34;https://designingsecuresoftware.com/writings/better/&#34;&gt;wrote&lt;/a&gt; earlier this year, &lt;strong&gt;&amp;ldquo;We understand software security best through specific threats and mitigations, articulated by threat models shared openly.&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&#34;postscript&#34;&gt;Postscript&lt;a class=&#34;anchor&#34; href=&#34;#postscript&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;The following is pure speculation, but it&amp;rsquo;s an interesting perspective.&lt;/strong&gt; The Crowdstrike incident suggests many interesting tradeoffs we in play (without details, these are guesswork):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;EDR needs to load into the kernel for power and visibility throughout system&lt;/li&gt;
&lt;li&gt;it needs to load early to watch everything as early as possible&lt;/li&gt;
&lt;li&gt;checking for updates later (after parsing, so after it crashed, blocking recovery) means faster bootup time&lt;/li&gt;
&lt;li&gt;more kernel code runs faster (vs customers saying it runs too slowly)&lt;/li&gt;
&lt;li&gt;pushing content files ASAP with new threat intel is valuable for protection (vs careful review and methodical release process)&lt;/li&gt;
&lt;li&gt;pushing content updates to all customers ASAP (vs staggered release over time so customer-side crashing would be caught early and remedied)&lt;/li&gt;
&lt;li&gt;moving all validation to Crowdstrike mothership (vs on each client as extra layer of protection) is more efficient&lt;/li&gt;
&lt;li&gt;proprietary obfuscated content files mean customers cannot validate independently (vs open format allowing competition to steal their rules)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I can see how company mindset could dial up all the &amp;ldquo;speed&amp;rdquo; at the expense of &amp;ldquo;reliability&amp;rdquo; and with a stable complex system (given that nothing like this had yet happened) it would be easy for staff to assume sufficient checks and balances were in place — unless there was a threat model, of course.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Demand more</title>
      <link>https://designingsecuresoftware.com/writings/demand_more/</link>
      <pubDate>Fri, 20 Sep 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/demand_more/</guid>
      <description>&lt;h3 id=&#34;demand-more&#34;&gt;Demand more&lt;a class=&#34;anchor&#34; href=&#34;#demand-more&#34; aria-hidden=&#34;true&#34;&gt;🔗&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;I applaud CISA leadership speaking out aggressively at the
&lt;a href=&#34;https://mwise.mandiant.com/conf24/keynotes&#34;&gt;mWISE Conference 2024&lt;/a&gt;
about the dismal state of software security
(based on &lt;a href=&#34;https://www.theregister.com/2024/09/20/cisa_sloppy_vendors_cybercrime_villains/&#34;&gt;reporting in The Register&lt;/a&gt;,
but it would be nice for
&lt;a href=&#34;http://www.cisa.gov&#34;&gt;www.cisa.gov&lt;/a&gt; to publish transcripts
in order to ensure we are interpreting remarks with full context,
given that the videos are paywalled).&lt;/p&gt;
&lt;p&gt;While agreeing with the aspirations and good intentions,
behind the words I worry about how CISA views the problem.
It&amp;rsquo;s very bold, yet I would say it stops short of being actionable.&lt;/p&gt;
&lt;p&gt;What follows are a few quotes from the article on the speech with
my observations:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;Why does software require so many urgent patches?&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;We require many patches because software is fragile
and corporations prioritize new feature development
over meticulous testing and bug fixing. This is a well-known,
industry-wide, pervasive strategy driven by profit-making motives.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Also it should be noted that software engineers (almost without
exception) favor new development over debugging and maintenance.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;The truth is: We need to demand more of technology vendors.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How in the world do we demand more when everyone is already locked
into a platform?&lt;/li&gt;
&lt;li&gt;Is there any viable commercial operating system that CISA deems acceptable?
If so, they should identify it and explain why; if not,
then it seems nobody knows how to do better.&lt;/li&gt;
&lt;li&gt;What exactly is the demand? Zero defects seems unachievable,
so what is the ask?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;Despite a multi-billion-dollar cyber security industry,
we still have a multi-trillion-dollar software quality
issue leading to a multi-trillion-dollar global cyber crime issue.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Naturally, because most of that &amp;ldquo;multi-billion-dollar cyber
security industry&amp;rdquo; is spent on after-market products attempting
to shore up fundamentally insecure systems.&lt;/li&gt;
&lt;li&gt;Security-first operating systems (e.g. OpenBSD, Qubes OS) are
rarely used because enterprises favor standard platforms,
convenience, rich 3rd party markets, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;ldquo;&lt;em&gt;We don&amp;rsquo;t need more security products – we need more secure products.&lt;/em&gt;&amp;rdquo;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;True if security were top priority but (judging by actions)
few enterprises seem to agree.&lt;/li&gt;
&lt;li&gt;The dominant operating systems are millions of lines of
code developed over decades with strict legacy compatibility requirements,
with accumulated technical debt on a scale with the US national debt.
Retroactively raising the security bar significantly would be a massive
multi-year undertaking with little or no promised economic return.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In conclusion, I completely agree that it would be awesome if the
changes CISA seeks ever came to pass, but I don&amp;rsquo;t see how we get
from here to there. To put the situation in blunt economic terms,
today the costs of security risk are an externality for
software makers that customers are forced to accept.
Externalities (meaning, in industrial terms,
dumping waste into the river instead of designing a zero-emissions factory)
are always grossly inefficient in overall cost, but do serve to
save costs at the source, hence the aforementioned
&amp;ldquo;multi-trillion-dollar global cyber crime issue&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Operating system companies own the platforms so they call the shots,
and doing what CISA wants would mean incurring massive red ink with
only a vision of a better world in return (CISA isn&amp;rsquo;t suggesting
software should cost more if we ever got better security).
The rest of the industry is downstream of the platforms and
it&amp;rsquo;s very questionable that they can make much of a dent in
the problem unless the operating systems change first
(because you can&amp;rsquo;t build secure apps on top of an operating system
that isn&amp;rsquo;t designed with that as a priority,
just as a stock car is never going to win a Formula 1 race).&lt;/p&gt;
&lt;p&gt;The only alternative would be an equally massive effort to
design and build a competitive operating system from scratch
with security as top priority, and the prospects of a lucrative
market for such a hypothetical product are at best speculative
(especially compared to the very profitable and stable status quo).&lt;/p&gt;
&lt;p&gt;So how do we make progress on security? I see three broad approaches:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ask nicely? (not likely to work)&lt;/li&gt;
&lt;li&gt;Make &lt;em&gt;specific achievable security demands&lt;/em&gt; of the software industry,
starting with the platforms, coupled with broad support from
customers to pay for such improvement.&lt;/li&gt;
&lt;li&gt;Build &lt;em&gt;new secure-by-design platforms&lt;/em&gt; incorporating
all we&amp;rsquo;ve learned and transition there. This would be
a &amp;ldquo;moonshot&amp;rdquo; scale endeavor, but if realized would be
a powerful new technology base to build a secure digital future.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which road ahead should we take, any other ideas,
or just stick with the status quo?&lt;/p&gt;
&lt;p&gt;∴ ∴ ∴ ∴&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Threat Modeling threat modeling</title>
      <link>https://designingsecuresoftware.com/writings/threat_modeling_itself/</link>
      <pubDate>Sun, 11 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/threat_modeling_itself/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;(2300 words) Threat modeling isn&amp;rsquo;t just for software security;
you can even threat model threat modeling.
When a major software incident occurs, the first thing we should be asking
is &amp;ldquo;show us the threat model&amp;rdquo;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In any endeavor, unless you can anticipate threats you risk scrambling to patch things up reactively when you first learn of the threat the hard way. What could be more obvious and fundamental than this? Threat modeling is a systematic approach to software security that &lt;a href=&#34;https://en.wikipedia.org/wiki/Threat_model#Evolution_of_technology-centric_threat_modeling&#34;&gt;arose decades ago&lt;/a&gt; and was popularized in 1999 at Microsoft (the author concocted the STRIDE acronym as part of the responsible task force). In recent years I have come to see how threat modeling is not only critical for software engineering, it&amp;rsquo;s useful for a broad range of applications — as will be shown, we can even threat model threat modeling!&lt;/p&gt;
&lt;p&gt;Readers unfamiliar with threat modeling can learn the basic concept from Adam Shostack&amp;rsquo;s elegant Four Questions rendition: &lt;em&gt;What are we working on? What can go wrong? What are we going to do about it? Did we do a good job?&lt;/em&gt; For our purposes here, the second question is the heart of the matter— &lt;em&gt;What can go wrong?&lt;/em&gt; — because it leads us to enumerate potential threats. This much about &lt;em&gt;what&lt;/em&gt; to do is straightforward, but &lt;em&gt;how&lt;/em&gt; to identify threats without missing any big ones is not so simple. Additionally, the first question gives context, and the third and fourth entail considering mitigations and then evaluating the effectiveness of the defenses implemented.&lt;/p&gt;
&lt;p&gt;The recent &lt;a href=&#34;https://www.crowdstrike.com/blog/falcon-content-update-preliminary-post-incident-report/&#34;&gt;Crowdstrike incident&lt;/a&gt; is a stunning example in software demonstrating how threat modeling could have helped. We don&amp;rsquo;t know if they did or didn&amp;rsquo;t threat model, tried to but missed an important threat, or identified the threat but then failed to prevent its occurrence, but given the reality that the event happened, one of those three things must be true. (As of this writing in August 2024, we have no information about Crowdstrike threat modeling.) Using threat modeling concepts we can build a &lt;a href=&#34;https://designingsecuresoftware.com/writings/threats_q+a/&#34;&gt;Q&amp;amp;A decision tree&lt;/a&gt;, but we need answers to actually learn what happened.&lt;/p&gt;
&lt;p&gt;More importantly, the lens of threat modeling helps us understand what went wrong, which if disclosed helps everyone else learn of the disaster. If we are kept in the dark then we learn nothing and only risk repetitions of similar events going forward. Threat modeling as we know it began for software, but what important human endeavor exists that it wouldn&amp;rsquo;t be a good idea to methodically consider upfront: &lt;em&gt;What can go wrong?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;People proactively anticipate threats all the time (in its simplest form it&amp;rsquo;s called &amp;ldquo;worrying&amp;rdquo;) concerning all manner of things, but what makes threat modeling unique is that it&amp;rsquo;s methodical. Done right, threat modeling enumerates all the threats (to an appropriate level of rigor), then proposes one or more ways of addressing each. Mitigations are the point of the exercise, and for a given threat these may be in part or in full: avoiding, reducing, or raising visibility of the risk, transferring the risk of a trusty party, purchasing insurance against it happening, or accepting the risk as unavoidable or not worth averting because it&amp;rsquo;s survivable.&lt;/p&gt;
&lt;p&gt;Anytime an endeavor experiences a setback that takes the team by surprise, threat modeling could probably have averted the problem or at least provided an opportunity to plan ahead and take action proactively. Since trouble has a way of surprising us, it&amp;rsquo;s incredible what a wide range of things this applies to: buying goods or services, crafting legislation, military planning, starting a business, investing, choosing a college and degree program, getting married, you name it. If you don&amp;rsquo;t consider what could possibly go wrong up front, you can easily make a bad decision or act unprepared.&lt;/p&gt;
&lt;p&gt;In the aftermath of the Crowdstrike incident we also have a great example of how difficult it is for responsible companies with software products to openly disclose details transparently — even though this clearly is essential both to give customers a complete picture so they can recover and also to regain trust by demonstrating how they will change in order to mitigate the possibility of any future repetitions. Legal liability is clearly a big factor we must leave to the lawyers, but just in terms of human psychology it&amp;rsquo;s always hard to just share details about your very worst episode.&lt;/p&gt;
&lt;p&gt;Crowdstrike is slowly disclosing &lt;a href=&#34;https://www.crowdstrike.com/blog/channel-file-291-rca-available/&#34;&gt;more&lt;/a&gt; and &lt;a href=&#34;https://www.crowdstrike.com/blog/tech-analysis-kernel-access-security-architecture/&#34;&gt;more&lt;/a&gt; details now, but undoubtedly they are doing so walking on very thin legal ice. They blog to &amp;ldquo;dispel some common misinterpretations&amp;rdquo; but such misinformation is hardly surprising given that it&amp;rsquo;s filling an information vacuum. Having a full threat model published in advance nicely shuts down such speculation (and commentary that ignores it can easily be tagged as amateurish and unprofessional by comparison).&lt;/p&gt;
&lt;p&gt;Fortunately there&amp;rsquo;s an easy solution. We should be sharing &lt;em&gt;proactively&lt;/em&gt; — threat models, policy, process, designs, test regimens, monitoring — based first on pride of work, and also as the best sales tool ever. Then when things go sideways we have established context, making it easy to disclose what specifically went wrong - despite all the great work demonstrated. I think people would generally respond positively to more technical transparency, and of course doing such planning with transparency would make these incidents all that much less likely.&lt;/p&gt;
&lt;p&gt;Someone might have suggested that making details of the system public was risky, that educating customers risks tipping off competitors to their &amp;ldquo;secret sauce&amp;rdquo; but I see that as a coward&amp;rsquo;s response. Threat modeling is way too important for anyone to hold monopoly power, and the description of your highly robust system design isn&amp;rsquo;t the hard part — reliably innovating and executing  professionally is. (The plan to win the 100m race is to run it in world record time, but that hardly makes it easy for anyone to win: actually achieving that result is the trick.) In the end, wouldn&amp;rsquo;t this put companies in stronger legal positions, and surely avert many possible disasters from occurring in the first place?&lt;/p&gt;
&lt;p&gt;Done well, threat modeling can be an invigorating activity, shining light on potential problems at the best time to deal with them — at the design phase when it&amp;rsquo;s easiest to do something about it. Developing threat models might seem like a lot of work, but shouldn&amp;rsquo;t a professional company have done all this groundwork in the first place? What parts of anticipating threats to the business and anticipating the needs of its customers is optional? Releasing it might be frightening to some unused to practicing transparency, but why shouldn&amp;rsquo;t you share the impeccable work behind your products with pride? If security is important, hire a consultant to review everything to suggest improvements and ensure there are no embarrassing errors or omissions. If you are afraid of public exposure, start by sharing the work with potential customers under NDA if you must.&lt;/p&gt;
&lt;p&gt;Skipping threat modeling entirely or &amp;ldquo;doing it in your head&amp;rdquo; isn&amp;rsquo;t a viable approach for professional software that others depend on: it simply cannot be good practice not making a concerted attempt not to identify risks so you can anticipate them. That said, threat modeling need not be a major project to be effective (learn how easy it can be starting with the &lt;a href=&#34;https://www.threatmodelingmanifesto.org/&#34;&gt;Threat Modeling Manifesto&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;When system designers privately threat model without sharing it, even if they manage to adapt design to accommodate them, by not explicitly calling them out they are rolling the dice that later changes by others might break mitigations, or developers might not understand and fail to properly implement the system. Without a common threat model, others might assume certain threats are already taken care of and miss an opportunity to take action. Inevitably, when bad things happen it&amp;rsquo;s sure to be a complete surprise. Nothing good about any of that.&lt;/p&gt;
&lt;p&gt;Competitors might freeload on your public threat models, but if they are smart that&amp;rsquo;s one of the riskiest places for them to cut corners. Solidly executing on the mitigations is where the hard work is, and there&amp;rsquo;s no easy way to fake that. Brandishing your excellent threat model is a huge opportunity to grab customers by showing the professional quality of your work. Imagine a world where customers get to choose among competing products complete with threat models they can evaluate in the context of their own applications, compared to today&amp;rsquo;s &amp;ldquo;just trust us&amp;rdquo;. Lacking any of this information, it&amp;rsquo;s just a duel between sales and marketing teams based on vague promises and fancy presentations with very little actual evidence of true quality in sight.&lt;/p&gt;
&lt;p&gt;Imagine if Crowdstrike had already published complete threat models, design docs, operations processes, and more to explain how their system works. If these are complete and competent then the threat of such an incident would have been anticipated and quite possibly wouldn&amp;rsquo;t have happened at all. If it did happen it would be easy to pinpoint where execution broke down, or maybe it was just incredibly bad luck, we&amp;rsquo;ll never know until they share what threat modeling, if any, they did in advance.&lt;/p&gt;
&lt;p&gt;The pressure of disclosing how they secure their product and protect customers serves as a forcing function to get it right in the first place. Had the threat modeling been incomplete that would be evident — they&amp;rsquo;d have egg on their face, but quite possibly a customer or researcher would see the missing threat, provide feedback, and there would be a chance to fix it without having a disaster to deal with. The same goes for an insufficient mitigation, it would be right there for anyone to see, and the odds of catching the omission are far better with many eyes on it.&lt;/p&gt;
&lt;p&gt;Possibly the threat model was solid, mitigations were strong, and the problem happened due to poor execution: an unimaginable threat occurred (e.g. a meteor struck a key datacenter), or an inside attack by a covert spy. People will make their own assessments, but the company can make a strong case that what happened was exceptional and not due to incompetence. Perhaps policy was robust but due to a lax culture it was routinely ignored: the threat model brings the failing into good focus, and serves to guide countermeasures such as more monitoring of process adherence or extra layers of redundant testing and signoffs might be added.&lt;/p&gt;
&lt;p&gt;Public threat models protect competent efforts done in good faith while shining light on remedies when problems arise. By contrast, secrecy and minimal disclosures protect the good and bad actors alike, so why not distinguish yourself as a pro if that&amp;rsquo;s the kind of work you really are doing?&lt;/p&gt;
&lt;p&gt;Considering the matter of whether to publish a threat model in the first place, let&amp;rsquo;s analyze the argument made by those who prefer to keep such details proprietary. We can threat model that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Keep threat model secret:
&lt;ul&gt;
&lt;li&gt;avoids possible embarrassment (mistakes; why aren&amp;rsquo;t they proud of the work?)&lt;/li&gt;
&lt;li&gt;helps the competition (are they so incompetent this is a huge help?)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Publish a complete threat model:&lt;/li&gt;
&lt;li&gt;demonstrate solid engineering, product quality&lt;/li&gt;
&lt;li&gt;educate and give assurance to customers&lt;/li&gt;
&lt;li&gt;opportunity to receive helpful feedback for any shortcomings&lt;/li&gt;
&lt;li&gt;establish company-wide commitment to security and trustworthiness&lt;/li&gt;
&lt;li&gt;stronger positioning in the event of a failure&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It&amp;rsquo;s worth pointing out that the above isn&amp;rsquo;t what you would normally call a threat model, but I think it&amp;rsquo;s more readily understandable and basically equivalent. Consider the first sub-bullet about avoiding embarrassment: this could be rewritten as embarrassment being a threat in the case of publishing an inadequate threat model. Or the next one (helping the competition) could also be phrased as a threat resulting from disclosure, and to be effective the precise threat of how they might benefit exactly should be added (in general I&amp;rsquo;m unsure how it would help significantly so I&amp;rsquo;ve left it unstated). To that last threat, one mitigation might be to redact some details in a public-facing more abstract threat model along with a more detailed one for internal use. Similarly, under publishing the threat model, demonstrating quality could be stated as a threat to choosing to keep it secret, and so on. However you prefer to express it — as threats and mitigations, as pros and cons — the concepts are the same and the method is just as powerful.&lt;/p&gt;
&lt;p&gt;To conclude, let&amp;rsquo;s get meta and threat model the question of whether to threat model (suppose we are building a software product, but this could apply to many other things as explained above).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What are we working on?&lt;/em&gt; Threat modeling our software project.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What can go wrong?&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It&amp;rsquo;s a waste of time because everyone already understands all the threats. &lt;em&gt;Unlikely.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;The threat model is incomplete. &lt;em&gt;Likely it&amp;rsquo;s better than ad hoc threat mitigation.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Nobody will use the threat model. &lt;em&gt;The project team certainly can and should.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;We will find too many big threats and give up. &lt;em&gt;Better to know sooner than later.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;What are we going to do about it?&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Constrain time allotted to threat modeling appropriate to the project size.&lt;/li&gt;
&lt;li&gt;Include all stakeholders and conduct reviews. Incomplete model is better than none.&lt;/li&gt;
&lt;li&gt;Educate and promote using the threat model for all stakeholders.&lt;/li&gt;
&lt;li&gt;Significant threats require solid mitigation or management review to assess the product&amp;rsquo;s viability and realistic potential. The sooner weaknesses are known the better.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Did we do a good job?&lt;/em&gt; This is for project staff, and ultimately, customers, to assess.&lt;/p&gt;
&lt;p&gt;Alternatively, not threat modeling amounts to threat blindness and is fraught with danger.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Serious design flaws are overlooked, caught late (expensive to fix) or to blow up in the field.&lt;/li&gt;
&lt;li&gt;Misunderstandings about security are more likely if the threats aren&amp;rsquo;t clearly documented.&lt;/li&gt;
&lt;li&gt;Even if some people understand some threats, everyone on the team won&amp;rsquo;t know them all.&lt;/li&gt;
&lt;li&gt;Opportunity to make strategic design decisions for mitigations or eliminate the threat.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The choice is straightforward: what is everyone waiting for, and who is brave enough to go first?&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Crowdstrike further revelations</title>
      <link>https://designingsecuresoftware.com/writings/crowdstrike_corrects/</link>
      <pubDate>Fri, 09 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/crowdstrike_corrects/</guid>
      <description>&lt;p&gt;In a debunking blog post, Crowdstrike finally starts to describe that content files are digitally signed for deployment. The initial report oddly referenced file timestamps instead of hashes to designate the bad and good versions of the infamous Channel File 291, but now we know these were signed.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.crowdstrike.com/blog/tech-analysis-addressing-claims-about-falcon-sensor-vulnerability/&#34;&gt;https://www.crowdstrike.com/blog/tech-analysis-addressing-claims-about-falcon-sensor-vulnerability/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We learn that content files are signed by a pinned certificate as a check of data authenticity. However, now that they have signed a bad Channel File 291 instance to fully close the door on a regression (which could be leveraged as an attack) they need to block the bad file being deployed again in a replay attack. Once they fix the bug in the kernel extension this may not be strictly necessary.&lt;/p&gt;
&lt;p&gt;All of this is intended to correct the record about various speculative claims they dispute. While baseless claims piling on to all the trouble are not responsible, Crowdstrike has left a considerable information vacuum that inquisitive people will naturally fill as they can, &amp;ldquo;reading between the lines&amp;rdquo;. Increased transparency from the start and more complete disclosure about the entire process surrounding the failure would have easily spared a lot of this.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Crowdstrike External Technical Root Cause Analysis</title>
      <link>https://designingsecuresoftware.com/writings/crowdstrike_rca/</link>
      <pubDate>Tue, 06 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/crowdstrike_rca/</guid>
      <description>&lt;p&gt;The &lt;a href=&#34;https://www.crowdstrike.com/wp-content/uploads/2024/08/Channel-File-291-Incident-Root-Cause-Analysis-08.06.2024.pdf&#34;&gt;Crowdstrike July incident root cause analysis report&lt;/a&gt;
provides new detail and requires reading between the lines to interpret
(I welcome corrections with references if I got it wrong).&lt;/p&gt;
&lt;p&gt;They list six problems in the Findings and Mitigations section: the bug, a lack of bounds checking in the kernel code (2); four errors in validation and testing (1, 3, 4, 5); and staging deployment so they don&amp;rsquo;t break all customers within minutes, but instead start small and it is hoped realize is such problems occur so they can remediate it soon.&lt;/p&gt;
&lt;p&gt;Canary testing is only mentioned in context of a new mitigation, so astoundingly they were not doing that and only just began. It seems clear that any test of that kernel code with Channel File 291 is going to crash, so a canary test would have found the problem. This should be cheap and easy to do routinely, and I cannot imagine why it wasn&amp;rsquo;t — they don&amp;rsquo;t mention the lack of canary testing explicitly. To rely on validators and test suites (which in this case omitted testing one category of values for one field of a record) alone is surprising, and it&amp;rsquo;s remarkable that this was the first time such a problem occurred.&lt;/p&gt;
&lt;p&gt;It sounds like only since the incident have they been fuzz testing: &amp;ldquo;We have completed fuzz testing of the Channel 291 Template Type and are expanding it to additional Rapid Response Content handlers in the sensor.&amp;rdquo; Microsoft Windows Hardware Quality Labs (WHQL) program involves fuzz testing it is stated, but clearly it did not fuzz Channel File 291 effectively.&lt;/p&gt;
&lt;p&gt;Going beyond the actual chain of events, I wish they detailed how deployment works as well. How does Channel File 291 (and all the rest) get onto customer machines, are the files timestamped and digitally signed to protect integrity and foil replay attacks? We&amp;rsquo;ve seen that millions of machines are at risk so it&amp;rsquo;s also important to lock down the entire deployment infrastructure.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Why tamper LLMs with guardrails?</title>
      <link>https://designingsecuresoftware.com/writings/ai_guardrails/</link>
      <pubDate>Mon, 05 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/ai_guardrails/</guid>
      <description>&lt;p&gt;Say what you will about LLM technology, it&amp;rsquo;s remarkable that we can do computations on the scale of billions of parameters training on large chunks of humanity&amp;rsquo;s collective text and media at all — and then it&amp;rsquo;s remarkable how you can talk to &amp;ldquo;it&amp;rdquo; in everyday language and get any kind of recognizable response out of it all, often (but not always) a pretty good one, and this is all based on the simple but powerful &amp;ldquo;select the best next token&amp;rdquo; algorithm run in a loop. The concept would have made a terrific sci-fi series, and here we are with it working in our cloud at scale.&lt;/p&gt;
&lt;p&gt;From the get-go ChatGPT had guardrails and I suspect that its quality suffered as a result — we didn&amp;rsquo;t get a chance to compare. I understand that guardrails would be nice in theory, but they come with a cost. Specifically, in terms of the threat model, I believe the point is to protect well-mannered users from getting viciously harmful responses unawares; I&amp;rsquo;m much less worried about guardrails that prevent someone dead set on getting the LLM to say naughty things being able to do that. By way of analogy if LLM were a power tool, protect users from accidental injury, but not necessarily if they willingly abuse the tool to do something patently dangerous. For reasons I cannot understand, the industry seems unified in attempting the latter stance, and I don&amp;rsquo;t think it&amp;rsquo;s one they are likely to succeed at.&lt;/p&gt;
&lt;p&gt;Our big models apparently siphon up large chunks of the web and then get hammered in the end by RLHF(*) to play nice. This looks like yet another instance of trying to make a system safe and secure after the fact rather than carefully building it that way in the first place. (For decades we&amp;rsquo;ve known: Garbage In Garbage Out. The curation of training data is well known to be quite opaque.)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(*) Reinforcement Learning from Human Feedback (RLHF) is a technique used in training large language models (LLMs) to align their behavior with human preferences. It involves using human feedback to guide the model&amp;rsquo;s learning process.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I cannot understand why the generative AI safety discussion has, from the start with no indication of reassessment or exploration of alternatives, been focused on this single approach that has continued to be troublesome. Just off the cuff, many other alternatives can be imagined:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Limit training data to trustworthy content with curation.&lt;/li&gt;
&lt;li&gt;Use reliable reputational metadata and sentiment analysis to filter out bad inputs.&lt;/li&gt;
&lt;li&gt;Require references to be checked by reputation as legitimate sources.&lt;/li&gt;
&lt;li&gt;Fact check training data and also LLM outputs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A representative post mentions red-teaming as an important mitigation to generative AI harm, but this raises a fundamental question: why try to prevent users from getting generative AI to do harmful things? Clearly we want to protect well-behaved users who comply with usage policy, but why must we stop anyone intent on producing harmful results? Word processors do not attempt to block anyone from writing incendiary diatribes, compilers do not prevent anyone writing malware, and so on — generative AI alone takes on this extraordinarily difficult task, and reasons that I cannot imagine.&lt;/p&gt;
&lt;p&gt;To be clear, I am not suggesting that AI should have zero safety precautions — what I question is why all the big platforms have chosen the same questionable means for doing this, without seeming to recognize its considerable downsides and exploring the many alternatives available.
I say questionable because of the
well known &lt;a href=&#34;https://en.wikipedia.org/wiki/Waluigi_effect&#34;&gt;Waluigi effect&lt;/a&gt;,
where trying to suppress bad behavior has the unwelcome effect of promoting it.&lt;/p&gt;
&lt;p&gt;One big downside of the current approach is the system is very sensitive to certain subjects and excessively self-censors which is a significant disservice. For example, I tried to have a discussion about the methodology of US political opinion polls, but failed to get any responses because it triggered a block on politics. The whole idea of a political poll is to conduct it fairly without bias (for it to mean anything) so failing to engage on that topic makes seeing through all the disinformation and misinformation that much harder.&lt;/p&gt;
&lt;p&gt;I had an interesting
&lt;a href=&#34;https://designingsecuresoftware.com/page/gemini_on_guardrails/&#34;&gt;chat with Gemini about this&lt;/a&gt;.
If interested you can skip to the &amp;ldquo;Recap&amp;rdquo; section to see where it ends up.&lt;/p&gt;
&lt;p&gt;The LLM nicely argues the &lt;em&gt;de facto&lt;/em&gt; standard argument for guardrails,
and it was fun discussing because since it isn&amp;rsquo;t a person I took the
liberty of  being very direct and not pulling any punches
(while remaining civil, but just barely).
Some good questions came up, such as:
&lt;em&gt;LLMs can write poetry, but isn&amp;rsquo;t that only if they have been trained on human poems?&lt;/em&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Incoming message mess</title>
      <link>https://designingsecuresoftware.com/writings/incoming_mess/</link>
      <pubDate>Tue, 30 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/incoming_mess/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;July 30, 2024 — When will we address the unacceptable status quo of scam phone calls, SMS text, and email?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Today I got a cold call from someone purporting to represent my health insurer
(I don&amp;rsquo;t actually doubt they do, but it would be gullible to take the word of
a stranger) and they started the conversation demanding personal information
&amp;ldquo;for security purposes&amp;rdquo;. I didn&amp;rsquo;t watch Black Mirror but at times I feel like
I&amp;rsquo;m living in an episode. This is a large corporation failing to see what&amp;rsquo;s
wrong with that — for starters,
&lt;a href=&#34;https://www.fcc.gov/consumers/guides/deep-fake-audio-and-video-links-make-robocalls-and-scam-texts-harder-spot&#34;&gt;the FCC tells consumers&lt;/a&gt;,
&amp;ldquo;Don&amp;rsquo;t answer calls from unknown numbers.
Never give out personal information in response to unexpected calls…&amp;rdquo;
The caller ID number can be
&lt;a href=&#34;https://www.fcc.gov/spoofing&#34;&gt;spoofed by scammers, the FCC also tells us&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Sadder still, that I&amp;rsquo;m likely an outlier in making a fuss and most people comply so countless of these calls work day in and day out so nothing changes. I get how from their perspective they are the good guys doing this, but it isn&amp;rsquo;t that hard to step into the customer&amp;rsquo;s shoes and consider how these calls are received.&lt;/p&gt;
&lt;p&gt;Corporations who do this, or outsource it, and doing society a huge disservice in normalizing poor security practice. They demand personal information for &lt;em&gt;their&lt;/em&gt; &amp;ldquo;security purposes&amp;rdquo; but don&amp;rsquo;t care one whit about the customer&amp;rsquo;s security. Our communication systems have been so thoroughly manipulated and abused for dishonest monetization that incoming messages of any form — phone calls, email, SMS texts, you name it — are all essentially unsafe to respond to. &amp;ldquo;Don&amp;rsquo;t call us, we&amp;rsquo;ll call you&amp;rdquo; is our last resort. The FCC spoofing advisory even says that pressing a number on the keypad can indicate you are a potential &amp;ldquo;mark&amp;rdquo; for future calls, and that recording your voice saying &amp;ldquo;Yes&amp;rdquo; and &amp;ldquo;No&amp;rdquo; can be used to fraudulently create evidence you agreed to something over the phone.&lt;/p&gt;
&lt;p&gt;Instead of attempting to train all citizens to be suspicious of all incoming calls, I suggest we fix the system that enables countless opportunities for scams. The communications industry has shirked their responsibility to steward a secure system, and no doubt due to intense lobbying our lawmakers have failed to regulate it properly so we can trust it. Securing our systems does incur a cost, just as reaching out to customers securely would for corporations (compared to cold calling), but investing in better infrastructure yields all kinds of long-term benefits lifting all boats.&lt;/p&gt;
&lt;p&gt;Dumping the burden on the poor consumer to fend off all scammers is so much easier. Insecure systems always give advantages to the rich (who can afford to protect themselves with assistants) and the unscrupulous willing to bend the rules for their own profit, with the honest trusting (even gullible) citizen at a disadvantage every time.&lt;/p&gt;
&lt;p&gt;Reading that FCC guidance (first link above) is downright depressing. Maybe this is the best advice they can offer given the hostile reality of our phone and internet infrastructure and the levels of sophisticated scamming out there, but every point they suggest screams for better answers — and I don&amp;rsquo;t think any of this is technically difficult to solve if we only committed to it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Don&amp;rsquo;t answer calls from unknown numbers. &lt;em&gt;— If we are serious about this, our phones should block calls from numbers not in our contacts already, but I don&amp;rsquo;t think people want to add new contacts before they can talk to anyone new.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Never give out personal information… &lt;em&gt;— The use of personal information for authentication is so commonly abused we need to stop the practice. How many copies of our name/address etc. are out there that can all be reused by scammers if any leak? They say don&amp;rsquo;t reuse passwords, but if these are used for authentication that&amp;rsquo;s total reuse: why is this OK?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Always proceed with caution when a caller is pressuring you for information or money immediately. &lt;em&gt;— I don&amp;rsquo;t even know what this means, when is pressuring like this ever OK?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;If the caller claims to be a family member or friend in distress. Reach out to that person directly to confirm they need help before sending any money. &lt;em&gt;— This is one sentence oddly broken into two (typo?). If the caller claims to be traveling and lost their phone, how exactly do you &amp;ldquo;reach out&amp;rdquo; directly?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;If the caller claims to be celebrity or political figure …  do research online … &lt;em&gt;— Suggesting &amp;ldquo;research online&amp;rdquo; is laughable because the web is renowned for untrustworthy information. More typos (it should be &amp;ldquo;a celebrity&amp;rdquo;, twice).&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;If you get an inquiry from someone who says they represent a company or a government agency, hang up and call the phone number on your account statement, in the phone book, or on the company&amp;rsquo;s or government agency&amp;rsquo;s website to verify the authenticity … &lt;em&gt;— This not only places the burden on the victim, it&amp;rsquo;s not very secure: web search could easily bring up a false phone number, fake statements are not hard to make with any color printer, and even phone books are printed by unlicensed publishers with no particular liability or security protocols. Furthermore, most corporations have numerous phone numbers and finding the right department and the extension of the person who called is like a needle in a haystack.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Do not respond to any questions, especially those that can be answered with &amp;ldquo;Yes.&amp;rdquo; &lt;em&gt;— This is crazy, the notion that saying a certain word and being recorded can be used against us. With generative AI even a short recording of our voice will be enough to fake how we sound saying &amp;ldquo;Yes&amp;rsquo; by now. Instead, we need to legislate that phone voice recordings are not acceptable as proof of agreement (instead send a document to be reviewed, signed, and returned).&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;You may not be able to tell right away if an incoming call is spoofed. &lt;em&gt;— True, and many folks will be completely fooled. Since up top they said don&amp;rsquo;t answer calls from unknown numbers, I assume this means we must be wary of spoofed calls faking the person caller ID tells us it is.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Talk to your phone company about call blocking tools they may have and check into apps that you can download to your mobile device to block unwanted calls. &lt;em&gt;— Why aren&amp;rsquo;t blocking tools the default, and is added protection sold at a cost further disadvantaging the less affluent? Mobile app stores constantly struggle with scam apps so how do we know this isn&amp;rsquo;t inviting further damage? A secure should be the baseline for everyone, not something requiring the consumer do extra research and effort.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Check out the FCC consumer guide on Call Blocking Tools and Resources, … &lt;em&gt;— The FCC won&amp;rsquo;t even stand behind &lt;a href=&#34;https://www.fcc.gov/call-blocking&#34;&gt;their own recommendations&lt;/a&gt;; their list of add-ons is footnoted, &amp;ldquo;*The resources listed are provided for informational purposes. The FCC does not endorse any products or services listed, and is not responsible for the content, accuracy, completeness, or timeliness of non-FCC websites.&amp;rdquo;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;To block telemarketing calls, register your number on the Do Not Call List. Legitimate telemarketers consult the list to avoid calling both landline and wireless phone numbers on the list. &lt;em&gt;— Why don&amp;rsquo;t we get to be on the list by default and then opt in to get telemarketing? Obviously because nobody wants it, and it&amp;rsquo;s well known that most people are too lazy, or ignorant of how to protect themselves. And this only protects us from the legitimate ones, big help! Plus many kinds of unwanted calls (political campaigns, charities, debt collections, surveys) are still permitted by FCC rules. (There are &lt;a href=&#34;https://thehill.com/homenews/nexstar_media_wire/4507529-why-being-on-the-do-not-call-list-doesnt-actually-stop-spam-calls-texts/&#34;&gt;reports&lt;/a&gt; that unethical scammers use the Do Not Call list as rich targets.)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We could have a &amp;ldquo;blue check mark&amp;rdquo; (the classic meaning from the heyday of Twitter, not X that just charges for it) caller ID that was reliable. We could have a national register of trustworthy companies and enterprises, with stated specific purposes they do place phone calls, all integrated into our phones as standard. It&amp;rsquo;s nice that our phones allow us to report spam phone calls but we don&amp;rsquo;t get to see what happens from there: status of our complaint, how many others reported that number, if any action was taken, statistics for our state and the country. And this would just be a start, surely many innovative mitigations are possible.&lt;/p&gt;
&lt;p&gt;I have no doubt most Americans are already annoyed and fed up, so it looks like a political failure. I don&amp;rsquo;t know how to fix that; all I can think of is a strike, let&amp;rsquo;s all just stop answering the phone unless we know who&amp;rsquo;s calling and expect their call (I always welcome and expect calls from family and friends). Some legit calls will get missed, but they can send us a letter. It&amp;rsquo;s a small sacrifice, but any protest always is, and I cannot remember ever getting an urgent unexpected call from a stranger that was very helpful. I hope this informal analysis makes clear that it isn&amp;rsquo;t a technical challenge and we don&amp;rsquo;t have to live with this mess any longer than we choose to by inaction.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Crowdstrike and the threat of friendly fire</title>
      <link>https://designingsecuresoftware.com/writings/friendly/</link>
      <pubDate>Tue, 23 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/friendly/</guid>
      <description>&lt;p&gt;Threat modeling methodology centers on asking, &amp;ldquo;What could go wrong?&amp;rdquo; and then considering mitigations to address such an eventuality. The unending calamities of history vividly demonstrate how human intuition repeatedly fails to foresee many such events until after they happen, and even then we sometimes fail to learn and act. For example, consider the 2008 financial crisis: after all the bailout money was handed out around Wall Street, Congress never confronted the glaringly obvious problem of &amp;ldquo;too big to fail&amp;rdquo; institutions. As a result, large firms continued to consolidate, concentrating power and risk in still fewer institutions, creating conditions for a repetition that appears to be a matter of &amp;ldquo;when&amp;rdquo; rather than &amp;ldquo;if&amp;rdquo;. Traditionally threat modeling has been deployed exclusively within the context of secure software engineering, but I posit that it is just as effective and important a tool for anticipating potential harms of all kinds — not just malicious exploitations.&lt;/p&gt;
&lt;p&gt;The recent Crowdstrike incident was not caused by a malicious actor, but the harm it caused is no less devastating because it was caused by the duly authorized company pushing a bad update to all those customers. It&amp;rsquo;s critical that we learn all that we can from these debacles, and that begins with maximal disclosure of details by the responsible party or parties, but in this case the problem is already evident (at least in part) in the rear view mirror. This is an excellent example of my claim for the value of threat modeling beyond cybersecurity in the usual context of attacks.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s assume that in architecting their Falcon product some degree of threat modeling was done. In order to detect and report potential attacks, Falcon must run at root privilege to fully surveil the system, so pushing updates clearly requires some serious engineering. Only authentic updates from the company should be used, tampering with the code deployed to customers must be prevented, and the update should be installed promptly in order to narrow the window of attack when known vulnerabilities become public. All of this is standard threat modeling practice and I have no doubt all of this was designed for, carefully implemented, and tested.&lt;/p&gt;
&lt;p&gt;But it appears (in this surely over-simplified treatment) this was the extent of the threat model. Apparently no consideration of non-malicious potential threats happened. The obvious additional threat in hindsight: what if they somehow pushed an authentic update that bricked the system once installed? (From past experience, I can easily imagine that had someone raised this issue they would have roundly been told that such a thing could never happen. Remember that the RMS Titanic was touted as &amp;ldquo;unsinkable&amp;rdquo; so lifeboat capacity was reduced since it would never be needed.) No attacker is involved in this scenario but it&amp;rsquo;s a serious threat to system availability as we recently saw when this happened. Just because it was self-inflicted, why isn&amp;rsquo;t it just as important to anticipate and mitigate this very real threat as well?&lt;/p&gt;
&lt;p&gt;There are many ways this threat could have been handled proactively to reduce
the harm we just witnessed — but first the potential threat needed to be
identified, and the naysayers (&amp;ldquo;don&amp;rsquo;t waste time on something that cannot
happen!&amp;rdquo;) muffled so they can listen and learn. Exactly what mitigations
are called for is a matter of debate and depends on details held proprietary,
but we can sketch several easily.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enforce a more rigorous vetting process to ensure thorough testing of updates always happens.&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t authorize single individuals to push releases, instead require two approvers.&lt;/li&gt;
&lt;li&gt;Perform slow roll outs to ensure there is time to catch mistakes made and nip the problem in the bud.&lt;/li&gt;
&lt;li&gt;Require one or more digital signatures on releases ensuring one or more authority signs off on updates.&lt;/li&gt;
&lt;li&gt;After pushing any update, require each updated system to report back its status to confirm success, or stop and investigate if there is no response within a reasonable number of minutes.&lt;/li&gt;
&lt;li&gt;Design a customizable shim inserted very early in the boot up process that checks for a digitally signed &amp;ldquo;roll back&amp;rdquo; script to repair damage to systems caught in a cycle of rebooting and crashing (BSOD).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which of these, or many other possible mitigations, is best for Crowdstrike
their engineers would know best, but the point is that mitigation to prevent
this was very possible, and it only begins with acknowledging the potential
threat, non-malicious as it may be.
There&amp;rsquo;s no reason to restrict threat modeling to scenarios involving
malicious actors, let&amp;rsquo;s open the scope to all foreseeable major adverse
impacts, regardless of human intention.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Secret Questions for password reset</title>
      <link>https://designingsecuresoftware.com/writings/against_secret_questions/</link>
      <pubDate>Thu, 11 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/against_secret_questions/</guid>
      <description>&lt;p&gt;Secret questions as credentials for online account authentication are
simply a bad idea in my view: I have never seen them done well, often
seem them done atrociously, and my most generous assessment would be
that they are extremely hard to do well. But keeping an open mind,
here&#39;s a brief reasoning why these are problematic, and I invite anyone
interested to do a brilliant design and prove me wrong.&lt;/p&gt;
&lt;p&gt;There is no standard practice for secret questions to analyze (which is
problematic) but to start here&#39;s what I see:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Users register their answers to a few questions that they must match
later to prove it&#39;s them.&lt;/li&gt;
&lt;li&gt;Questions should be designed to have answers unique to the user they
won&#39;t forget, not known to attackers.&lt;/li&gt;
&lt;li&gt;Password reset requires answering the questions with the same
answers in order to regain access.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Different implementations widely differ in all details so let me stick
to fundamentals at the expense of abstraction.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Questions about personal details potentially incur privacy harms on
people. &lt;/li&gt;
&lt;li&gt;If you let the person write their own question, naive people will
write poor questions with weak security. &lt;/li&gt;
&lt;li&gt;Answers change over time (I have to remember my favorite movie as of
whenever I answered that long ago).&lt;/li&gt;
&lt;li&gt;Multiple choice answers are easily faked by trial and error.&lt;/li&gt;
&lt;li&gt;Questions with seemingly one obvious answer don&#39;t for some
(adoptees may have more than two parents and not even know the
identity of their birth parents, city of birth for someone born at
sea, etc.).&lt;/li&gt;
&lt;li&gt;Questions shouldn&#39;t have very common answers (millions of people
were born in any large city).&lt;/li&gt;
&lt;li&gt;Free form answers are hard to compare (&amp;quot;New York, NY&amp;quot; and &amp;quot;NYC&amp;quot;
are the same, or even &amp;quot;Bronx&amp;quot;).&lt;/li&gt;
&lt;li&gt;If humans interpret answer matching it means storing plain text
(leak risk) and introducing unreliable and adds subjectivity that
makes results variable depending on many factors (some people may
freak out thinking they could lose their account, and that makes
them nervous, forgetful, even suspicious sounding).&lt;/li&gt;
&lt;li&gt;It should go without saying that generative AI isn&#39;t ready for this
where false negatives are disastrous.&lt;/li&gt;
&lt;li&gt;Seeming private personal details may leak out in social media posts,
photos, replies, and so forth.&lt;/li&gt;
&lt;li&gt;Social engineering can easily extract personal details (take this
survey to win a prize).&lt;/li&gt;
&lt;li&gt;Important details like employer, previous addresses, birthday,
mother&#39;s maiden name are shared elsewhere.&lt;/li&gt;
&lt;li&gt;Consider that people in abusive relationships may be attacked by
others who know them intimately.&lt;/li&gt;
&lt;li&gt;Unless all websites ask different secret questions, there is risk of
leaks across sites (the shared password risk).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;People have all kinds of life experiences, memory is fickle, some Q&amp;amp;A
that seem harmless might be difficult to answer for folks with unusual
life circumstances, be taken as a privacy invasion, and more. What
questions must every single person online be fully expected to
unambiguously know the answer to, that is easy to remember accurately
(ruling out identification numbers), that doesn&#39;t vary over time, that
is unknown by others except people they can fully trust, and is not
already recorded in many databases and already used for authentication?
(And, in order to avoid cross-site leaks, how is every website going to
have a unique set of such qualified questions?)&lt;/p&gt;
&lt;p&gt;How exactly are Secret Questions used in the password reset process? Do
people get multiple chances to give the right answer or not, do you tell
them if the answer is right or not, and are timeouts enforced to prevent
brute force attacks? How are answers provided compared to those
registered? Is (e.g. 2 out of 3 right) a pass? How do you prevent people
being phished (including MitM) for answers if they aren&#39;t
authenticated? Are Secret Questions a single gate to password reset, or
one factor in a more comprehensive evidence evaluation?&lt;/p&gt;
&lt;p&gt;My best way of dealing with secret questions is to type
gibberish rather than disclose my mother&#39;s maiden name. If I&#39;m being
conscientious I will record these to provide later &amp;mdash; it just becomes
more password entropy, and unless I use a password manager or encrypted
storage it&#39;s exposed. Alternatively, if challenged by phone support
staff (I think I actually got away with it once) I say that it must be a
software bug since that cannot possibly be the answer.&lt;/p&gt;
&lt;p&gt;It would be nice if this technique worked without any of the downsides
mentioned above (and more if this analysis is incomplete).
Fundamentally there&amp;rsquo;s something very unfriendly about requiring people
to answer questions you insist they must, and as mentioned already
it isn&amp;rsquo;t always secure to let them choose for themselves either.
I don&amp;rsquo;t see how but would be very interested to see the best of the best
design and be proven wrong.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Learning from Solar Winds</title>
      <link>https://designingsecuresoftware.com/writings/learning_from_solar_winds/</link>
      <pubDate>Wed, 10 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/learning_from_solar_winds/</guid>
      <description>&lt;p&gt;ProPublica is a national journalistic treasure, and recent reporting on
the software industry is a terrific impetus to drive much needed change.
I sat in on many bug triage discussions over twenty years ago working at
Microsoft, and despite great technology advances, the way these
decisions are made appears to be little evolved. My purpose here is not
to judge what transpired and who is at fault, but to glean from the
reporting better software practices so we can at least learn from these
events.&lt;/p&gt;
&lt;p&gt;In the wake of the Solar Winds security vulnerability, for perhaps the
first time, we have detailed reporting of behind-the-scenes efforts over
years to get Microsoft to fix known flaws which, through intentional
inaction, directly enabled one of the most notorious and damaging
security incidents in this decade. Reading this summary article (which
links to the full reporting) a couple of sentences caught my attention
as key insights.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.propublica.org/article/microsoft-solarwinds-what-you-need-to-know-cybersecurity&#34;&gt;https://www.propublica.org/article/microsoft-solarwinds-what-you-need-to-know-cybersecurity&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;The MSRC argued that, because hackers would already need access to an
organization&amp;rsquo;s on-premises servers before they could take advantage of
the flaw, it didn&amp;rsquo;t cross a so-called &amp;ldquo;security boundary.&amp;rdquo; Former MSRC
members told ProPublica that the center routinely rejected reports of
weaknesses using this term, even though it had no formal definition at
the time.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Precisely what the reasoning involving a &amp;quot;security boundary&amp;quot; was:
without sufficient details it&#39;s impossible to accurately analyze the
decision factors. Presumably the whistleblower filed a bug so it would
be informative to see the bug log (redacted for sensitive details), and
there may be email and/or meeting notes. If everything was transacted
informally without any documentation, well then I&#39;d say that&#39;s a big
red flag since that&#39;s no way for a big corporation to make decisions
that potentially impact countless customers. So if there are records,
and they are doing a professional job as they continue to assert, why in
the world wouldn&#39;t they share that in some form? &lt;/p&gt;
&lt;p&gt;I know what a &amp;quot;trust boundary&amp;quot; is, and I think that&#39;s what they mean
by the expression &amp;quot;security boundary&amp;quot;. According to NIST (the closest
thing we have to an authority), &lt;a href=&#34;https://csrc.nist.gov/glossary/term/security_boundary&#34;&gt;&lt;em&gt;Security
boundary&lt;/em&gt;&lt;/a&gt; has
another meaning that doesn&#39;t make sense here. The final sentence of
that quote about defining our terms raises an important issue: our field
is full of sloppy and inconsistent terminology. We need some leeway in
word meanings or it gets like a math proof, but we also need some rigor
and core principles especially when debating slippery things like bugs.
If something thinks a &amp;quot;security boundary&amp;quot; is good for triaging
vulnerabilities then they should define it as best they can, and suggest
ways to test to determine what it does or does not apply to.&lt;/p&gt;
&lt;p&gt;In any case, reasoning about whether to fix a bug involves a lot more
than citing one technical term or simplistically claiming that the
necessary conditions &amp;quot;will never happen&amp;quot;. If MSRC has a policy of not
fixing vulnerabilities that they believe are safely behind a &amp;quot;security
boundary&amp;quot;, I would say they likely are piling up a growing collection
of &amp;quot;ticking time bombs&amp;quot;. Even if they infallibly determine the
harmlessness of these flaws, how is it humanly possible to know how
future releases, used by future customers, building all kinds of systems
in the future, for new applications? Or just what if it &lt;em&gt;should&lt;/em&gt; never
happen but somebody makes a mistake? &lt;/p&gt;
&lt;p&gt;Without having researched this particular incident in depth, and only
very limited information about what happened has been made public, I can
only speculate. According to another ProPublica report, &lt;a href=&#34;https://www.propublica.org/article/cyber-safety-board-never-investigated-solarwinds-breach-microsoft&#34;&gt;&lt;em&gt;Cyber Safety
Board Never Probed Causes of SolarWinds
Breach&lt;/em&gt;&lt;/a&gt;
and Microsoft has not been exactly forthcoming. The &amp;quot;security
boundary&amp;quot; rationale seems to state that the bug wasn&#39;t fixed because
they were convinced it couldn&#39;t be reached by an attacker &amp;mdash; that the
&amp;quot;ticking bomb&amp;quot; couldn&#39;t possibly explode. In my book I write about
vulnerability chains and how just this sort of triage mistake happens.
It&#39;s remarkable to think that concurrent to writing that these events
were playing out behind the scenes that would result in a massive
breach.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Trusting AI</title>
      <link>https://designingsecuresoftware.com/blog/2024-06-trusting_ai/</link>
      <pubDate>Mon, 03 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/2024-06-trusting_ai/</guid>
      <description>&lt;p&gt;Whenever considering applications that rely on generative AI,
I believe we always need to ask if we can trust it.
And given the technology&amp;rsquo;s track record it&amp;rsquo;s hard to imagine
how we are going to honestly be able to say &amp;ldquo;100%&amp;rdquo; any time soon.
That&amp;rsquo;s why, for the time being, I think the following guideline
will be very important.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Only use generative AI when there exists only minor downsides if it&amp;rsquo;s wrong.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Read the full article:
&lt;a href=&#34;https://designingsecuresoftware.com/writings/trusting_ai&#34;&gt;Trusting AI&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;#&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Trusting AI</title>
      <link>https://designingsecuresoftware.com/writings/trusting_ai/</link>
      <pubDate>Mon, 03 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/trusting_ai/</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;em&gt;(220 words)&lt;/em&gt; June 2024 &amp;ndash; Loren Kohnfelder&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whether or not
&lt;a href=&#34;https://boingboing.net/2024/06/03/google-ai-just-might-kill-you-it-misidentified-a-destroying-angel-mushroom-as-an-ediblebutton-mushroom.html&#34;&gt;this unscientific test&lt;/a&gt;
is reliable, asking generative AI if a mushroom is safe to eat —
it misclassified a highly toxic variety that looks like a common edible one —
is a terrible idea if you are prepared to eat according to what it says.
This illustrates my rule of thumb:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Only use generative AI when there exists only minor downsides if it&amp;rsquo;s wrong.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here&amp;rsquo;s a good example of the application of this rule. Many online training
courses confirm that the student has learned the material by quizzing them.
Generative AI can select questions and then use their answers to select the
next question, skipping once mastery is demonstrated or asking more questions
where the student needs most help.
&lt;strong&gt;NOTE&lt;/strong&gt;: This assumes human written
multiple-choice questions, checked by expert humans for correctness,
so there is no chance the AI misinterprets answers or asks screwy questions.
The worst cast is that AI asks too many or too few questions,
but the answers asked will be solid.&lt;/p&gt;
&lt;p&gt;Some say it helps to ask different AIs, but how much more confidence
does that really give? Also how diverse are different LLM?
Same basic algorithm and they rarely disclose training data particulars
for comparison. Not to mention the danger of
&lt;a href=&#34;https://en.wikipedia.org/wiki/Model_collapse&#34;&gt;Model collapse&lt;/a&gt; as LLMs
unwittingly get trained on each other&amp;rsquo;s output. Unless someone figures out
how to avoid model collapse, the latest models might be getting progressively
worse over time.&lt;/p&gt;
&lt;p&gt;#&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Further security discussions</title>
      <link>https://designingsecuresoftware.com/writings/further/</link>
      <pubDate>Thu, 30 May 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/further/</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;em&gt;(500 words)&lt;/em&gt; May 2024 &amp;ndash; Loren Kohnfelder&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;This article is a continuation of &lt;a href=&#34;../better&#34;&gt;Better Security Discussions&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;This analysis can be extended by considering potential mitigations for additional threats.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Possibly some of these threats are already mitigated to an extent, if so we can de-emphasize further consideration accordingly. Some may have good mitigations that are easy to do: this suggests lobbying the software maker to implement these. Threats that appear hard to do anything about, or in cases inherent such that protection would reduce the value of the feature in the first place are most important and deserve the greatest attention. With thorough analysis if the threat is significant and mitigation looks hopeless, these seriously call into question the wisdom of the feature.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s consider the first threat listed above, making exploitation most effective should malware gain access. The Recall database of observations is reported to be accessible at user privilege level (system level access is not required), so any malware in a user-installed app or arbitrary-code-execution flaw in the browser can use it. What about mitigation? Locking down the database with system level access could be one idea, but it would add overhead and more importantly mean that using the Recall feature would require elevated privileges which makes it awkward for the intended user. Asymmetric cryptography might help (write data public key encrypted) but then you need to protect the private key somehow and it adds complexity and overhead. There seems to be a powerful wish for this feature to be easy for &amp;ldquo;good guys&amp;rdquo; to use but somehow off limits to &amp;ldquo;bad guys&amp;rdquo; but of course we don&amp;rsquo;t have such protections.&lt;/p&gt;
&lt;p&gt;Or consider the requirement for configuring all sensitive apps and websites. Users need to be more diligent and work harder is the obvious mitigation, but of course people don&amp;rsquo;t like being blamed and spending more time keeping the software in line. If Recall is on by default surely some people won&amp;rsquo;t notice or won&amp;rsquo;t understand the implications and completely ignore it, incurring great potential harm. Even assuming the most assiduous user, before installing any new app must they make the effort to mentally consider its privacy impact and whether it needs exclusion from Recall — or the same before visiting any website for the first time? Seriously? Such security mechanisms are called block lists and it&amp;rsquo;s well known that thoroughly excluding everything deserving is nearly impossible when the set of candidates is infinite. The secure way to do this is with an allow list, where safe items are enumerated: that way, an omission isn&amp;rsquo;t harmful. It would be more secure for Recall to opt-in apps and websites suitable for recording, but this is probably a non-starter since it would be a lot of work just to get started. This isn&amp;rsquo;t a suggestion but rather suggests that to make the feature work places an obligation to configure on the user while also incurring risk to the extent they don&amp;rsquo;t do their job precisely.&lt;/p&gt;
&lt;p&gt;Whether you agree with these takes, the details give us something to discuss productively. Interested readers can try their hand at mitigating these additional threats or find new ones.&lt;/p&gt;
&lt;hr&gt;
</description>
    </item>
    
    <item>
      <title>Better security discussions</title>
      <link>https://designingsecuresoftware.com/blog/2024-05-discussions/</link>
      <pubDate>Sun, 26 May 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/2024-05-discussions/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been a fan of threat modeling for many years, but only recently seeing
that it isn&amp;rsquo;t just behind-the-scenes work for software professionals to do.
Threats and mitigations need to be part of any discussion about security.
That is, news articles that urgently warn of the latest zero-day or when
privacy advocates decry the latest outrage from the big platforms, to frame
a good discussion requires outlining the threat model you are talking about.&lt;/p&gt;
&lt;p&gt;Of course some of this is mentioned some of the time, but I would say it needs
to be explicitly stated to be effective. Only when both sides (&amp;ldquo;nothing to see
here&amp;rdquo; versus &amp;ldquo;the sky is falling&amp;rdquo;) lay out threats and mitigations can we
decide which position is more reasonable. Is one side ignoring a real threat,
or the other imagining one that isn&amp;rsquo;t such a problem? Once we can see a list
of potential threats then we can assess the mitigations against them.&lt;/p&gt;
&lt;p&gt;Read the full article:
&lt;a href=&#34;https://designingsecuresoftware.com/writings/better&#34;&gt;Better Security Discussions&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;#&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Better security discussions</title>
      <link>https://designingsecuresoftware.com/writings/better/</link>
      <pubDate>Sun, 26 May 2024 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/writings/better/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;(900 words)&lt;/em&gt; May 2024 &amp;ndash; Loren Kohnfelder&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;We understand software security best through specific threats and
mitigations, articulated by threat models shared openly. Without this
context we avoid much needed meaningful security discussions.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Software security articles and opinions fill the tech news and
increasingly are covered in mainstream media yet consensus is rare, so
often it seems people are talking past each other. This month (May 2024)
Microsoft announced &lt;a href=&#34;https://blogs.microsoft.com/blog/2024/05/03/prioritizing-security-above-all-else/&#34;&gt;&amp;quot;company-wide&amp;quot; commitment &amp;quot;prioritizing
security above all
else&amp;quot;&lt;/a&gt;
and then a few weeks later introduced &lt;a href=&#34;https://blogs.microsoft.com/blog/2024/05/20/introducing-copilot-pcs/&#34;&gt;Copilot+
PCs&lt;/a&gt;
with built-in AI hardware, prominently featuring
&lt;a href=&#34;https://support.microsoft.com/en-us/windows/retrace-your-steps-with-recall-aa03f8a0-a78b-4b3e-b0a1-2eb8ac48701c&#34;&gt;Recall&lt;/a&gt;
to &amp;quot;search across time to find the content you need&amp;quot; with the power of
AI. Numerous observers immediately reacted that Recall was &lt;a href=&#34;https://www.bleepingcomputer.com/news/microsoft/microsofts-new-windows-11-recall-is-a-privacy-nightmare/&#34;&gt;a privacy
nightmare&lt;/a&gt;.
Rather than weigh in with yet another opinion I&#39;d like to look closely
at why the discussion is so contradictory and confusing, and consider
how we might begin to find some kind of common ground.&lt;/p&gt;
&lt;p&gt;Here&#39;s my thesis, as the following discussion should explain fully: &lt;em&gt;We
understand software security best through specific threats and
mitigations, articulated by threat models shared openly. Without this
context we avoid much needed meaningful security discussions.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Years ago I worked at Microsoft and know they had plenty of competent
people working diligently on their products and have no reason to
believe that has changed. I also want to be very clear that I do not own
a Copilot+ PC, so I have never used Recall myself and I certainly don&#39;t
know the technical details; instead I want to write about a hypothetical
product much like it in order to make a larger point and avoid worrying
about getting any of the details wrong.&lt;/p&gt;
&lt;p&gt;The gist of Recall (or our similar theoretical application for
discussion purposes) is that it takes screenshots in the background and
then indexes those based on AI powered summary of text on the screen as
well as image semantics (recognizing cats or whatever visuals might be
captured) so you can find anything later via AI-based query capability.&lt;/p&gt;
&lt;p&gt;Microsoft assures us the system is secure because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You can turn it off.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There are settings to disable it for specific apps and websites.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It won&#39;t capture private browsing data for certain browsers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can delete some or all of the captured data anytime.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All analysis and data is stored at the edge (in your PC).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data at rest is encrypted (BitLocker).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Only available on PCs with &lt;a href=&#34;https://learn.microsoft.com/windows/security/hardware-security/pluton/microsoft-pluton-security-processor&#34;&gt;Microsoft Pluton security processor&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is a &lt;em&gt;skeleton threat model&lt;/em&gt; that seems to be what Microsoft folks
are thinking based on the above talking points, expressed as &amp;quot;risk &amp;mdash;
mitigation&amp;quot; (which I think is a very handy way to quickly express a
basic threat model that&#39;s easy to understand with special technical
expertise).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Adds attack surface, upping risk &amp;mdash; Setting to disable the feature.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Malware can easily snoop on screenshots &amp;mdash; Use anti-virus etc. to keep your PC safe.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Certain activity should be excluded &amp;mdash; Settings to selectively disable (apps and websites).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inadvertent capture of sensitive data &amp;mdash; Users can delete things later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Microsoft can spy on me &amp;mdash; All processing and storage is at the edge.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Screenshots can leak if PC is stolen &amp;mdash; Encrypted data at rest, plus Pluton security.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;OK, that makes sense, so why are so many people so upset?&lt;/p&gt;
&lt;p&gt;And here&#39;s the crux of my focus using Recall just as a convenient
example of a very general principle stated above &amp;mdash;
&lt;em&gt;understanding software security as threats and mitigations.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I haven&#39;t seen a cogent technical analysis of Recall but there is
plenty of negative reaction out there, and my point here is more about
explaining the discrepancy between Microsoft&#39;s position and all those
critics. Here are some additional risks that I believe people are
sensing (whether they articulate them explicitly or not) that appear to
be unaddressed &amp;mdash; which explains the divergence.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When malware gets into PCs, this makes it easy for attackers to get juicy secrets&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Shared data from others will be inadvertently captured without their permission&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;People share PCs with others they trust, which may lead to accidental unintended disclosures if not abuse&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Many people won&#39;t configure all sensitive apps and websites that should be excluded&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Evil Housecleaner attacks are aided by AI, e.g. &amp;quot;find bank account details&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If disabled, the Evil Housecleaner enables it (rarely noticed) and returns later&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Microsoft bugs may inadvertently expose the screenshot data&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;People don&#39;t trust Microsoft: future versions my loosen the security mitigations&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;(The above list of potential risks isn&#39;t verified on Recall or meant to be an exhaustive list.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Whether or not these are valid concerns, the point here is that only by
enumerating risks and mitigations can we have a meaningful discussion
about any security topic. Absent specific risks and mitigations, with
both sides assuming things and worrying about different risks, we will
invariably be arguing at loggerheads. This is commonplace for software
security discussions today but it just doesn&#39;t make any sense as I hope
this example makes clear, it gets us nowhere.&lt;/p&gt;
&lt;p&gt;Perhaps Microsoft has already anticipated and mitigated all the
additional risks listed above &amp;mdash; if so, they need to show their work
for us to understand. Alternatively, if customers raise new risks then
we can have that discussion, perhaps to deny the concern (for example,
that using Windows implicitly requires trusting Microsoft). Only when we
see the risks laid out in black and white can this kind of meaningful
discussion go forward: by comparing your list of risks to mine we
immediately see where our perspectives differ.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;We understand software security best through specific threats and
mitigations, articulated by threat models shared openly. Without this
context we avoid much needed meaningful security discussions.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;More on how to further the security discussion &lt;a href=&#34;../further&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Running the “Reflections on Trusting Trust” Compiler</title>
      <link>https://designingsecuresoftware.com/blog/thompson-backdoor/</link>
      <pubDate>Wed, 25 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/thompson-backdoor/</guid>
      <description>&lt;p&gt;In the Afterword of my book I mention Ken Thompson&amp;rsquo;s classic
&amp;ldquo;Trusting Trust&amp;rdquo; paper showing how to embed a backdoor into
an OS by compiling the compiler such that the modification
is invisible in source code.&lt;/p&gt;
&lt;p&gt;Recently the author revealed that he had done the experiment and
still had the code, so someone shared it with annotations.
Now for the first time you can see exactly how it works.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://research.swtch.com/nih&#34;&gt;https://research.swtch.com/nih&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wonderful that we now can learn from that code written long ago.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>On the Signature Reblocking Problem in Public Key Cryptosystems</title>
      <link>https://designingsecuresoftware.com/blog/reblocking-problem/</link>
      <pubDate>Tue, 30 May 2023 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/reblocking-problem/</guid>
      <description>&lt;p&gt;In Chapter 5 of the book I write about my good fortunate meeting two of the
RSA algorithm inventors at MIT, and collaborating with them.
As soon as I had a chance to ready their (as yet unpublished)
&lt;a href=&#34;https://web.archive.org/web/20230117055133/https://people.csail.mit.edu/rivest/Rsapaper.pdf&#34;&gt;paper&lt;/a&gt;,
the &amp;ldquo;reblocking problem&amp;rdquo; bothered me as a rather awkward implementation detail.
This refers to a technical issue described in Section X
(Avoiding “Reblocking” When Encrypting A Signed Message) of the foundational
RSA paper that is described in a nutshell in the first sentence.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A signed message may have to be “reblocked” for encryption since
the signature &lt;em&gt;n&lt;/em&gt; may be larger than the encryption &lt;em&gt;n&lt;/em&gt;
(every user has his own &lt;em&gt;n&lt;/em&gt;).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The solution I immediately saw was simplicity itself, so simple that I recall
going over the details to triple-check it because it was too easy.
After summoning the courage to drop in on Dr Rivest in his office,
and when I showed it to him he called in Dr Adleman from next door,
as I recall they were kicking themselves for not seeing it.
All you do is reverse the order of computation to ensure the domains of the
decrypting and encrypting functions compose properly (smaller domain first).&lt;/p&gt;
&lt;p&gt;It was too late to update their paper which was about to be published, so
Dr Rivest suggested I write a letter to appear in the same volume of
the journal Communications of the ACM which he happened to help edit.&lt;/p&gt;
&lt;p&gt;My modest contribution to the RSA algorithm predates the ACM online digital
library, but I was recently able to obtain a scan
posted &lt;a href=&#34;../../doc/CACM1978Feb_TC_LMK.png&#34;&gt;here&lt;/a&gt; for the historical record.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;A Method for Obtaining Digital Signatures and Public-Key Cryptosystems&lt;/em&gt;,
by Ron L. Rivest, Adi Shamir, and Leonard Adleman&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;On the Signature Reblocking Problem in Public-Key Cryptosystems&lt;/em&gt;
by Loren Kohnfelder, Communications of the ACM 21 (Feb. 1978), page 179.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>Learning from Log4j</title>
      <link>https://designingsecuresoftware.com/blog/2021-12-14-log4j/</link>
      <pubDate>Tue, 14 Dec 2021 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/2021-12-14-log4j/</guid>
      <description>&lt;p&gt;With &lt;a href=&#34;https://en.wikipedia.org/wiki/Log4j&#34;&gt;Log4j&lt;/a&gt; very much in the news,
if I could update &lt;a href=&#34;https://designingsecuresoftware.com/&#34;&gt;my new book&lt;/a&gt; by magic
it would make a terrific real world example to write about because it ties
together a number of topics in the book. This
&lt;a href=&#34;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228&#34;&gt;vulnerability&lt;/a&gt;
stems from
failure to sanitize untrusted inputs, enabling an injection attack that
potentially can access arbitrary targets using authentication credentials
held by the target server. All the attacker has to do is craft an attack
string that manages to get logged somehow, and the widely used
&lt;a href=&#34;https://logging.apache.org/log4j/2.x/index.html&#34;&gt;Apache Log4j 2&lt;/a&gt;
component executes whatever the attacker commands.&lt;/p&gt;
&lt;p&gt;Typical attacks send requests containing strings something like this
&lt;code&gt;${jndi:ldap://...}&lt;/code&gt;
aiming to get this untrusted input logged. Log4j processing expands the
JNDI expression in the string, thereby performing privileged operations
at the behest of the attacker.
From a quick look it appears that this dangerous feature was implemented
with hopes that callers of the API would use sufficient care avoiding problems,
and/or that the library would and prevent detect malicious usage.
The fix seems to be disabling JNDI by default&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;, suggesting that it can be
turned back on by people who should know what they are doing, which really
pushes the problem out to the millions&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; of applications using it
to deal with.&lt;/p&gt;
&lt;p&gt;The book includes a sample software design document (Appendix A)
that just happens to be a logging subsystem.
While in that writeup I don’t explicitly warn against exactly this
kind of bug, I do specify an API based on JSON which (if used correctly)
should make such attack strings harmless. Also, the API structures
log structured data, rather than the usual one-size-fits-all plain text
string, and so handling typed data objects will naturally be coded
in a safer manner. Arguably software designs should stick to that
level of abstraction and not anticipate specific implementation flaws
like this Log4j bug, but trust that coders are competent to handle the
job. Clearly there is a fat gray line between design and implementation,
but a designer doesn’t know exactly how implementation will proceed and
so the potential range of vulnerabilities introduced later is virtually
unbounded. Exceeding the design layer with coding precautions would
also result in a litany of precautions that every design document would
reproduce like boilerplate: avoid buffer overflows, don’t let fixed
width integer calculations overflow, and so on.&lt;/p&gt;
&lt;p&gt;The bad news with Log4j
is that any system that uses it will offer a unique attack surface that
feeds the logging component. Depending on how individual apps implement
logging — specifically, how and where untrusted inputs flow into logs —
Updating Log4j to safely handle malicious inputs (the latest update should
do that in theory) should stem the damage, but it’s important to bear
in mind that other parts of any of these apps may have other issues that
such attack strings can manipulate.&lt;/p&gt;
&lt;p&gt;The good news is that my book talks
about all of these issues and offers many ways to mitigate the problem:
handling untrusted inputs; input validation; injection attacks;
secure use of components; security code reviews;
logging best practice; security testing and regression testing.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Disclaimer&lt;/em&gt;:
I have not researched this vulnerability independently but am relying
on analysis by others, primarily
&lt;a href=&#34;https://news.sophos.com/en-us/2021/12/12/log4shell-hell-anatomy-of-an-exploit-outbreak/&#34;&gt;Log4Shell Hell: anatomy of an exploit outbreak&lt;/a&gt;
from Sophos.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&#34;fn:1&#34;&gt;
&lt;p&gt;Based on the Mitigation section of the two CVE sections at the
&lt;a href=&#34;https://logging.apache.org/log4j/2.x/&#34;&gt;Apache Log4j 2 home page&lt;/a&gt;
(Last Published: 2021-12-13 | Version: 2.16.0)&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:2&#34;&gt;
&lt;p&gt;That it&amp;rsquo;s difficult to know what applications do depend on Log4j is
itself a major factor in why it&amp;rsquo;s so difficult to quickly shut down attacks.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>A Wicked Problem</title>
      <link>https://designingsecuresoftware.com/blog/2021-11-17-wicked-problem/</link>
      <pubDate>Wed, 17 Nov 2021 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/2021-11-17-wicked-problem/</guid>
      <description>&lt;p&gt;A wicked problem is one that is difficult to even clearly describe because
of its diffuse and interconnected nature, and this is a useful lens to
view software security. How are we doing overall at software security? How
do you even define the standard to measure against?&lt;/p&gt;
&lt;p&gt;Vulnerabilities are commonplace in most commercial software and the CVE
counts grow year over year, but that’s hardly an accurate metric for
the state of the industry as a whole. Ransomware is huge these days, but
is that a technology failing or just a powerful business model promoting
attack for profit? Security updates of proprietary platforms rarely provide
much detail at all, so how do we know what happened, much less how to
improve? Software security is a wicked problem for all these reasons,
and that makes getting a handle on it all the more difficult.&lt;/p&gt;
&lt;p&gt;As my new book on the subject begins shipping, I&amp;rsquo;m thinking back on
the writing process which helped me to glimpse the hard parts of the
challenge. While I like to imagine that I have an intuitive idea about
software and how it’s made from my years working in the industry, things
change quickly and there is precious little public information. Who are
the several million (in the US alone) writing code, what are they doing
exactly, and are they competent at good security practices? I don’t
think anyone really knows, so in the end I fell back on writing about
what I know from personal experience. Keeping it as concise as possible,
just that ran 300 pages.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Vulnerabilities are Mistakes</title>
      <link>https://designingsecuresoftware.com/blog/2021-11-09-vuln-are-mistakes/</link>
      <pubDate>Tue, 09 Nov 2021 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/2021-11-09-vuln-are-mistakes/</guid>
      <description>&lt;p&gt;&lt;em&gt;Spilled coffee beans, breaking the sound barrier, and software security&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The Right Stuff&lt;/em&gt; is Tom Wolfe’s popular history of the US astronaut
program, and it begins by recounting the early effort to break the sound
barrier which involved such frequent crashes that there were weekly funerals
for test pilots. What’s most striking about the account of this early
period in what would become the space program is how the pilots gathering
to bury their comrades would invariably talk themselves into believing
that they would never have crashed — it was always the other guy who
messed up and sadly paid the price.&lt;/p&gt;
&lt;p&gt;Software vulnerabilities continue to plague modern software, and it seems
to me that a similar mentality applies. Many of us think we understand how
to write and maintain secure code, yet somebody continues to drop the ball,
and achieving that goal as an industry remains elusive. What’s going on?&lt;/p&gt;
&lt;p&gt;I’ve been learning to roast coffee, and a story from the roastery may be
a good analogy to think about this problem from a new perspective. Small
batch coffee roasters are simple machines built around a rotating heated
drum not unlike a clothes dryer. The operator charges the roaster with
green beans, gravity-fed from a hopper above the drum, and after roasting
the crackling smokey coffee beans dump out into a cooling bin. Both the
input and output to the drum are operated by mechanical levers. One day
an experienced roaster inexplicably made a simple mistake: instead of
dumping the roasted beans, they grabbed the other lever and dumped the
green beans instead, creating an unusable mix of green and roasted coffee.&lt;/p&gt;
&lt;p&gt;The question I want to consider is what went wrong? Obviously, the roaster
understands the process and would never intentionally make this mistake,
yet in practice that did. Little would be gained by making the operator
take a refresher course in coffee roasting. The two levers are similar,
but located far apart and of different lengths, and by their position it
is crystal clear what each does at a glance.&lt;/p&gt;
&lt;p&gt;The point here is that humans make mistakes sometimes even when they
know better, and it’s unclear that this foible can effectively be
eliminated. Checklists or automation may mitigate such problems, but at
a cost and with attendant overhead and complexity. Punishment or ridicule
are usually counter-productive; attempts to educate easily backfire unless
genuinely new information or insights are presented.&lt;/p&gt;
&lt;p&gt;I suspect that to no small degree software engineering suffers from similar
failure modes. To the degree that this is so, what more can we do in order
to reduce vulnerabilities? First, we should make security an acknowledged
priority and ensure that everyone involved is fully aware of the threats
and counter-measures. Security needs to be baked into the requirements and
design phase, not slapped on later as an afterthought. Since slip ups are
inevitable, we should use automation to reduce exposure, and then have
a strong process in place to ensure that reviews provide needed second
opinions. Finally, when problems do still occur, it’s important to
respond quickly and thoroughly, and transparently publish a post mortem
detailing what happened, the extent of the response, and what measures
were taken to prevent future recurrences.&lt;/p&gt;
&lt;p&gt;My &lt;a href=&#34;https://designingsecuresoftware.com/&#34;&gt;book&lt;/a&gt;,
&lt;em&gt;Designing Secure Software: A Guide for Developers&lt;/em&gt;,
offers actionable ideas in all of these areas.
Check it out and it just might reduce your chances of spilling the beans,
leading to a crash.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This article was originally published &lt;a href=&#34;https://www.linkedin.com/pulse/vulnerabilities-mistakes-loren-kohnfelder&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
    </item>
    
    <item>
      <title>Scope of the book</title>
      <link>https://designingsecuresoftware.com/blog/2021-11-03-scope-of-book/</link>
      <pubDate>Wed, 03 Nov 2021 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/2021-11-03-scope-of-book/</guid>
      <description>&lt;p&gt;One big learning for me from writing a book on software security is
realizing the importance of context to security. There was a constant
challenge of discovering the right scope — what needs adding, and what
can be cut to keep it concise. Each chapter of the book could well have
been an entire book itself, but nobody is going to read what would consume
a foot of shelf space. Software security can go wrong in so many ways
that there is always more to say, different approaches to take, various
pros and cons of different mitigations, further interesting details to
consider. And of course new vulnerabilities keep popping up, offering more
examples to learn from, and suggesting various new mitigation techniques
that might have prevented the problem.&lt;/p&gt;
&lt;p&gt;After having chosen the right content, the writer must anticipate what
the target readership already knows. When you start writing the question
of what the readership already does or doesn’t know, and therefore what
you need to explain arises and reveals how imprecise one’s notion of
this is. Balancing between losing some readers by providing too little
background, against boring the more knowledgeable with too much is one
of those judgments with no clear best answer even with perfect future
information.&lt;/p&gt;
&lt;p&gt;There are other formidable challenges to determining the scope and content
of the book as well. When writing about material that one knows best,
it’s exceptionally difficult to recall how you learned it, and what
the beginner’s mind needs in order to learn.&lt;/p&gt;
&lt;p&gt;And then there is the question of what topics to cover, and in how much
depth. I decided early on that a complete compendium of every known
software vulnerability and mitigation would be so voluminous that, even
if I cataloged it, likely nobody would ever read it all anyway.&lt;/p&gt;
&lt;p&gt;In the end, I chose to fall back on my personal experience which spans
enough years to give a broad perspective. My target reader is an amalgam
of people I have interacted with professionally: fellow programmers,
but also managers and various specialists who don’t write code but are
deeply involved in the software process. It’s admittedly an arbitrary
criterion, but to the extent that it works, it solves these problems
nicely and provides clear guidance that led me through the writing.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Root causes</title>
      <link>https://designingsecuresoftware.com/blog/2021-11-01-root-causes/</link>
      <pubDate>Mon, 01 Nov 2021 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/2021-11-01-root-causes/</guid>
      <description>&lt;p&gt;Each time a high-profile software security bug is reported, I wonder how
this happened yet again. I don’t expect vulnerabilities to approach zero
any time soon, but still I’d like to know how this keeps happening over
and over, so we can do better. For example, was a developer unaware of
the implications of their code change that broke security, or did they
know but were just sloppy? How do these bugs get past a code reviewer,
or was that considered unnecessary and skipped? Why weren’t there
test cases to prevent such problems? And once we get a fix, how was it
tested, and did anyone check for similar vulnerabilities that might exist
elsewhere in the code? We can’t make much progress if we don’t know
why well-known countermeasures aren’t working.&lt;/p&gt;
&lt;p&gt;I don’t want to pick on Apache, but the recent series of vulnerabilities
and patches is worrisome and a perfect example of so many unanswered
questions — and this is an open source project. Considering potential
security flaws that a generic web server might have, a path traversal
is probably the first kind of vulnerability that comes to mind.
When a major web platform that should, after over twenty years,
have a mature technology base
introduces and then struggles to repair such an obvious vulnerability,
to my mind that is a big red flag that something is very wrong
(and this is just one recent example that&amp;rsquo;s hardly exceptional).&lt;/p&gt;
&lt;p&gt;That’s exactly what a recent code change released in Apache HTTP Server 2.4.49
introduced (CVE-2021-41773)[^1]. The attack is just an HTTP GET with
an odd-looking URL. The team dutifully released a fix, but the fix
proved insufficient and new exploits were quickly reported in 2.4.50
(CVE-2021-42013) that were finally repaired[^2] days later by the 2.4.51
release. From a quick look I was unable to find clues about any of the
usual questions I mentioned above. Some proof of concept attack examples
are available, but those don’t shed light on how this happened, nor
give much assurance that things are now solid. Understanding the cause
and response requires more context than just the code changes.&lt;/p&gt;
&lt;p&gt;I understand reticence disclosing a detailed post mortem, but without
this information how are we going to do better? Is there a lack of
understanding of security, insufficient testing, rushed code reviews,
or if these vulnerabilities happen despite competent developers knowing
what they are doing where is the process failing? The software community
virtually never learns the full story, so the pattern continues.&lt;/p&gt;
&lt;p&gt;I wrote a book to put down the basics of what we should be doing, because
that appears to be part of the problem. The book explains path traversals,
with examples of vulnerable code and then fixed code; it also discusses
several ways to test that code is secure, as well as doing security code
reviews. This is basic stuff but it’s critical that everybody working
on software understands, so I made the book as clear and comprehensible as
possible. Books don’t solve problems, but they can inform and motivate,
and convey ways of putting it into practice.&lt;/p&gt;
&lt;p&gt;[^1] Details at &lt;a href=&#34;https://httpd.apache.org/security/vulnerabilities_24.html&#34;&gt;https://httpd.apache.org/security/vulnerabilities_24.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[^2] Code changes: r1893775 (2.4.50); r1893977, r1893980, r1893982 (2.4.51)&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Statement of Intention</title>
      <link>https://designingsecuresoftware.com/blog/2021-10-27-statement-of-intention/</link>
      <pubDate>Wed, 27 Oct 2021 00:00:00 +0000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/2021-10-27-statement-of-intention/</guid>
      <description>&lt;p&gt;I believe that we can do so much better at delivering more secure software, and my book explains how we could do that. While there are a few new ideas in there, it’s mainly about covering well established methodology with focus on showing how to put it into practice. The book takes a different approach to the topic of software security to reach as broad an audience of software professionals as possible because I think there is often an over-reliance on &amp;ldquo;experts&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The book challenges some industry practices where I see clear opportunities for improving.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Bridges, roads, buildings, factories, ships, dams, harbors, and rockets are all designed and meticulously reviewed to ensure quality and safety, and only then built. In any other engineering field, it’s acknowledged that refining a design on paper is better than retrofitting security measures after the fact. Yet most software is built first and then secured later.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;While I wouldn&amp;rsquo;t say that every programmer needs to know this stuff, I would say that it&amp;rsquo;s the exceptional case where software security can be ignored (and it&amp;rsquo;s an interesting question to determine exactly under what conditions such an exception applies). So this book offers all software professionals a change to level up, or fill in some weak gaps in their understanding. And for security experts, I think it provides new ways of thinking and communicating to clients.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Complete Mediation in Sci-Fi</title>
      <link>https://designingsecuresoftware.com/blog/complete-mediation-sci-fi-scene/</link>
      <pubDate>Mon, 30 Aug 2021 17:59:03 -1000</pubDate>
      <guid>https://designingsecuresoftware.com/blog/complete-mediation-sci-fi-scene/</guid>
      <description>&lt;p&gt;In the book &lt;a href=&#34;https://www.andyweirauthor.com/books/project-hail-mary-hc/project-hail-mary-el&#34;&gt;&lt;em&gt;Project Hail Mary&lt;/em&gt; by Andy Weir&lt;/a&gt;,
there is a short scene (on page 339)
that features a very clear example of failure to implement Complete Mediation
(one of the secure design patterns described in Chapter 4 of my book).&lt;/p&gt;
&lt;p&gt;The scene opens with the protagonist recently injured and struggling
in great pain while working hard to save humanity.
When he asks the robotic medic for painkillers, it says that he must wait
a few more hours to comply with the required interval between doses.&lt;/p&gt;
&lt;p&gt;Unable to override the restriction, instead, he asks the current time,
and then directs the computer to set the current time ahead by a few hours.
Now simply by repeating his request the medicine is promptly provided.&lt;/p&gt;
&lt;p&gt;The book has the protagonist think how &amp;ldquo;stupid&amp;rdquo; the system is, that
astronauts &amp;ldquo;trusted to save the world&amp;rdquo; should be able to self-prescribe.
That may be, (and I am not an MD) but even for the most trustworthy of
astronauts, there is a valid argument for enforcing
limits on medicines that are potentially addictive.&lt;/p&gt;
&lt;p&gt;From a security perspective, this is a lapse of strong enforcement.
If the computer is going to enforce any time-based restrictions on the
crew it cannot allow them to change the current time setting &amp;ndash;
a clean example of the Complete Mediation pattern.&lt;/p&gt;
&lt;p&gt;As an aside, I note that on an interstellar spaceship implementing time
is particularly challenging. It&amp;rsquo;s unclear that knowing the time according
to an Earth time zone seems quaint and utterly useless, especially since it&amp;rsquo;s
far enough that even radio communication is impossible.
On top of that, this spaceship travels at relativistic speeds so it&amp;rsquo;s an
open question as to what reference frame such a time would even be.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
