<rss version="2.0">
  <channel>
    <title>Aidan John</title>
    <link>https://blog.aidanjohn.org/</link>
    <description></description>
    
    <language>en</language>
    
    <lastBuildDate>Wed, 22 Oct 2025 09:00:44 -0400</lastBuildDate>
    <item>
      <title>Modern Context Engineering</title>
      <link>https://blog.aidanjohn.org/2025/10/22/modern-context-engineering.html</link>
      <pubDate>Wed, 22 Oct 2025 09:00:44 -0400</pubDate>
      
      <guid>http://aidanj.micro.blog/2025/10/22/modern-context-engineering.html</guid>
      <description>&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/modern-context-engineering.png&#34; width=&#34;600&#34; height=&#34;337&#34; alt=&#34;&#34;&gt;
&lt;p&gt;The effectiveness of large language models is directly tied to the quality of the prompts they are given. In December 2022, the term &lt;strong&gt;prompt engineering&lt;/strong&gt; gained popularity as a way of describing effective prompting strategies that produce high quality and relevant LLM outputs. Now, in 2025, the term &lt;strong&gt;context engineering&lt;/strong&gt; has gained popularity alongside the rise of LLM agents and agentic systems.&lt;/p&gt;
&lt;p&gt;To understand context engineering we must first understand what an agent is. The most primitive form of an agent is the ReAct agent. The term ReAct comes from the Reasoning and Action loop these agents use to accomplish a given objective.&lt;/p&gt;
&lt;p&gt;Given a certain goal and an array of tools to use, the LLM decides an action to take and calls a tool to do it. The results of these tool calls are observed and fed back to LLM to decide whether further action should be taken (continue the loop) or if the given goal has been accomplished (end the loop). You can think of the LLM as the agent&amp;rsquo;s brain and the tools as its body - allowing it to interact with its environment.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/react-diagram.png&#34; width=&#34;600&#34; height=&#34;246&#34; alt=&#34;&#34;&gt;&lt;em&gt;&lt;a href=&#34;https://langchain-ai.github.io/langgraph/tutorials/workflows&#34;&gt;https://langchain-ai.github.io/langgraph/tutorials/workflows&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In order for an agent to make a decision, it needs a prompt/context. That prompt/context is stored inside the LLM&amp;rsquo;s context window. As the LLM makes more decisions and calls more tools, it stores previous tool calls and decisions inside the input context window. As you can imagine, agents running over longer periods of time start to generate and store a significant amount of context. Although context windows have been getting larger (with some models supporting over 1M tokens of context), agents suffer from both performance degradation and increased cost of inference when dealing with large input context.&lt;/p&gt;
&lt;p&gt;The term &lt;strong&gt;context engineering&lt;/strong&gt; gained popularity in May 2025 - coinciding with the rise in popularity of agentic systems. Andrej Karpathy describes it best as &amp;ldquo;the delicate art of filling the context window with just the right information for the next step.&amp;rdquo;&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/karpathy-tweet.png&#34; width=&#34;598&#34; height=&#34;216&#34; alt=&#34;&#34;&gt;
&lt;p&gt;&lt;em&gt;&lt;a href=&#34;https://x.com/karpathy/status/1937902205765607626&#34;&gt;https://x.com/karpathy/status/1937902205765607626&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this post, we&amp;rsquo;ll be discussing why context engineering is important and some new techniques developers are using to effectively manage context windows in agentic systems.&lt;/p&gt;
&lt;p&gt;This post is a summary of a recent webinar hosted by &lt;a href=&#34;https://www.linkedin.com/in/lance-martin-64a33b5/&#34;&gt;Lance Martin&lt;/a&gt; (Founding Engineer @ &lt;a href=&#34;https://www.langchain.com/&#34;&gt;LangChain&lt;/a&gt;) and Yichao &amp;ldquo;Peak&amp;rdquo; Ji (Co-Founder + Chief Scientist @ &lt;a href=&#34;https://manus.im/blog&#34;&gt;Manus&lt;/a&gt;) titled &lt;a href=&#34;https://www.youtube.com/watch?v=6_BcCthVvb8&#34;&gt;&lt;em&gt;Context Engineering for AI Agents with LangChain and Manus&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&#34;table-of-contents&#34;&gt;Table of Contents&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Why Context Engineering?&lt;/li&gt;
&lt;li&gt;5 Pillars of Context Engineering
&lt;ul&gt;
&lt;li&gt;Cache&lt;/li&gt;
&lt;li&gt;Offload
&lt;ul&gt;
&lt;li&gt;Offloading Tools: Hierarchical Action Space
&lt;ul&gt;
&lt;li&gt;Function Calling&lt;/li&gt;
&lt;li&gt;Sandbox Utilities&lt;/li&gt;
&lt;li&gt;Packages &amp;amp; APIs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Reduce&lt;/li&gt;
&lt;li&gt;Isolate&lt;/li&gt;
&lt;li&gt;Retrieve&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Final Thoughts&lt;/li&gt;
&lt;li&gt;Resources&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;why-context-engineering&#34;&gt;Why Context Engineering?&lt;/h1&gt;
&lt;p&gt;When developers first started building agentic systems a consistent phenomena emerged - the longer an agent would run, the more context needed to be stored. In these systems we have an LLM bound to some number of tools that the LLM can call autonomously in a loop. The challenge is that for every decision made and tool call observed, the LLM&amp;rsquo;s messages and tool call observations are appended to a chat list as context. These messages grow over time and you end up with an unbounded explosion of messages as the agent runs. To put this in perspective, Manus&#39; general-purpose AI agent requires around 50 tool calls per task. Anthropic agents often engage in conversations spanning hundreds of turns. So you can imagine the scale of context that needs to be managed in order for these systems to run effectively.&lt;/p&gt;
&lt;p&gt;As the context grows, performance drops. This is referred to as &lt;strong&gt;context rot&lt;/strong&gt;. Many modern models have context windows up to 1M tokens but the reality is most models start degrading at around 200k tokens. Researchers at Chroma made a great &lt;a href=&#34;https://research.trychroma.com/context-rot&#34;&gt;blog post&lt;/a&gt; about this phenomenon which I highly recommend. At a high level - context rot leads to repetitions, slower inferences, lower quality, and increased inference cost.&lt;/p&gt;
&lt;p&gt;Now, let&amp;rsquo;s explore the ideology behind context engineering so we can avoid context rot. We&amp;rsquo;ll also focus on some new techniques for context engineering being implemented by the Manus team in their general-purpose AI agent.&lt;/p&gt;
&lt;h1 id=&#34;5-pillars-of-context-engineering&#34;&gt;5 Pillars of Context Engineering&lt;/h1&gt;
&lt;p&gt;The paradox: agents need a lot of context to perform well, but performance drops as context grows.&lt;/p&gt;
&lt;p&gt;The solution to this is context engineering - which is made up of five main pillars: Cache, Offload, Reduce, Isolate, and Retrieve.&lt;/p&gt;
&lt;h2 id=&#34;cache&#34;&gt;Cache&lt;/h2&gt;
&lt;p&gt;First, we need to understand caching as it applies to LLMs. KV-caching refers to the practice of caching the key and value state of generative transformers. By caching the previous keys and values, the model can focus on only calculating the attention values for new tokens. It is important to design your agentic system around the KV-cache. Doing so decreases the computation (and cost) needed for inference while also decreasing time-to-first-token.&lt;/p&gt;
&lt;p&gt;A few key practices to improving KV-cache hit rate include keeping your prompt prefix stable, making your context append-only, and marking cache breakpoints explicitly when needed. You can read more about this in Manus&#39; &lt;a href=&#34;https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus&#34;&gt;blog post&lt;/a&gt; on context engineering from a few months ago (highly recommend).&lt;/p&gt;
&lt;h2 id=&#34;offload&#34;&gt;Offload&lt;/h2&gt;
&lt;p&gt;Offloading context is essential to effective context engineering. You don&amp;rsquo;t need all context to live in the context window of your agents, you can offload it and retrieve it later. The most common way to do this is by using a filesystem. Take the output of a tool call or message, dump it to the filesystem, and send back some minimal piece of info to your agent so it can access the full context if it needs to. This allows you to avoid stuffing token-heavy context into your context window unnecessarily. Filesystems are typically used for planning, long-term memories, and other token-heavy context.&lt;/p&gt;
&lt;p&gt;Tool definitions typically sit at the beginning of your context so the LLM knows which tools are available for use at runtime. As the system grows, you&amp;rsquo;ll find that the tools themselves can often take up a lot of context. Having too many tools in context can lead to confusion for the LLM on which tool to call. The model may call the wrong tools or even nonexistent ones. Offloading tools is another way to improve agent performance.&lt;/p&gt;
&lt;p&gt;A common approach to offloading tools right now is doing a dynamic RAG on tool descriptions - loading and removing tools on demand depending on the current task. However, this causes two main issues. First, since tool definitions sit at the front of your context, the &lt;a href=&#34;https://medium.com/@joaolages/kv-caching-explained-276520203249&#34;&gt;KV-cache&lt;/a&gt; resets every time. Second, the model&amp;rsquo;s past calls to remove tools are still in the context, so it might few-shot the model into calling invalid tools or using invalid parameters.&lt;/p&gt;
&lt;h3 id=&#34;offloading-tools-hierarchical-action-space&#34;&gt;Offloading Tools: Hierarchical Action Space&lt;/h3&gt;
&lt;p&gt;To solve this, Manus is experimenting with a layered action space. They essentially allow the agent to choose between three different levels of abstraction: function calling, sandbox utilities, and packages &amp;amp; APIs.&lt;/p&gt;
&lt;h3 id=&#34;function-calling&#34;&gt;Function Calling&lt;/h3&gt;
&lt;p&gt;This is the classic function calling everyone is familiar with in agentic development. The key difference is that Manus only uses 10-20 atomic functions. These are functions like reading/writing files, executing shell commands, searching the internet, browser operations, etc. These atomic functions have very clear boundaries which leads to less confusion when the LLM is deciding which tools to call. They can also be chained together to compose much more complex workflows.&lt;/p&gt;
&lt;h3 id=&#34;sandbox-utilities&#34;&gt;Sandbox Utilities&lt;/h3&gt;
&lt;p&gt;Each Manus session runs inside a full VM sandbox - a throwaway Linux container preloaded with custom tooling. This allows Manus to take advantage of everything Linux has to offer without overloading the context window - you can add new capabilities without touching the model&amp;rsquo;s function calling space. The agent knows that all the tools it can use in this environment are located in &lt;code&gt;/usr/bin&lt;/code&gt; and that it can use the &lt;code&gt;--help&lt;/code&gt; flag for context on how to use a tool. For large outputs, the agent can write to files or return the results in pages and use Linux command line tools like &lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;cat&lt;/code&gt;,&lt;code&gt;less&lt;/code&gt;, and &lt;code&gt;more&lt;/code&gt; to process those results on the fly.&lt;/p&gt;
&lt;h3 id=&#34;packages--apis&#34;&gt;Packages &amp;amp; APIs&lt;/h3&gt;
&lt;p&gt;Manus can write python scripts to call pre-authorized APIs or custom packages. This is perfect for tasks that require lots of computation in memory but don&amp;rsquo;t require all the context to be pushed into the context window. For example, if you&amp;rsquo;re analyzing stock data over the course of a year. You don&amp;rsquo;t need to push all the price data into the context window, you just need to write a script to pull data from a stocks API, analyze it, and return a summary back to context.&lt;/p&gt;
&lt;p&gt;By using this kind of hierarchical action space, you don&amp;rsquo;t add any overhead to the model. From the model&amp;rsquo;s POV, all three levels still go through the same standard atomic function calls, allowing you to balance capability, cost, and cache stability.&lt;/p&gt;
&lt;h2 id=&#34;reduce&#34;&gt;Reduce&lt;/h2&gt;
&lt;p&gt;Reducing context is exactly what it sounds like, shortening information without losing important context. This can be by reducing tool call outputs, reducing message outputs, or pruning old tool calls and unnecessary context.&lt;/p&gt;
&lt;p&gt;Manus divides reduction into two parts: compaction and summarization.&lt;/p&gt;
&lt;p&gt;In Manus every tool call and tool result has two different formats - full and compact. The compact format strips out any information that can be reconstructed from the filesystem or external state. For example, say you have a tool that writes to a file. It most likely has two input parameters - one for a path to the file and one for the content to be written. Once the tool returns, we can assume the file already exists in the environment so we can drop the token-heavy content field in the compact format and just keep the path to the file. If the agent needs to read that file again, it can retrieve it via the path so no information is truly lost - only externalized. This kind of reversibility is crucial because agents chain predictions based on previous actions and observations. You never know which past action will suddenly become important context for the next step, so in the event you need the full context - it&amp;rsquo;s available.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/compaction.png&#34; width=&#34;600&#34; height=&#34;289&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Compaction will only get your so far, your context will continue to grow and eventually hit the ceiling, that&amp;rsquo;s where summarization comes in.&lt;/p&gt;
&lt;p&gt;Manus combines compaction with summarization very carefully. The key difference between compaction and summarization is that compaction is reversible, summarization is not. Both reduce context length but do so very differently. In some cases it can be advantageous to dump the entirety of the pre-summary context as a text file or log file into the filesystem so it&amp;rsquo;s always recoverable later. You can prompt your agent to look for the full context on demand using Linux tools like &lt;code&gt;glob&lt;/code&gt; and &lt;code&gt;grep&lt;/code&gt;. Manus tried various ways to optimize the prompt for summarization but it turns out the simple approach works best. You don&amp;rsquo;t use a free form prompt to let the LLM generate a summary. Instead, you use structured outputs to define a schema/form with fields indicating required points of summarization, then allow the LLM to modify those fields. This enforces that key points are always summarized and allows you to have a somewhat stable output you can iterate off of.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/summarization.png&#34; width=&#34;600&#34; height=&#34;269&#34; alt=&#34;&#34;&gt;
&lt;p&gt;In order to implement both methods effectively, developers must track some context length thresholds. In order to avoid context rot it&amp;rsquo;s important to identify a pre-rot threshold (typically around 128k to 200k tokens) that triggers context reduction.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/context-rot.png&#34; width=&#34;600&#34; height=&#34;241&#34; alt=&#34;&#34;&gt;
Whenever your overall context size approaches this threshold, you start with compaction NOT summarization. Compaction should start with the oldest context in the message history. For example, we might compact the oldest 50% of tool calls while keeping the newer ones in full detail so the model still has some fresh full-shot examples of how to use tools properly. 
&lt;p&gt;When compaction is triggered, we need to check how much free context we obtained through the operations. After multiple rounds of compaction, if we are still nearing our threshold, we start summarizing.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/reduction-timeline.png&#34; width=&#34;600&#34; height=&#34;307&#34; alt=&#34;&#34;&gt;
&lt;p&gt;A tip for summarization: always use the full version of the data and not the compact one. Also, keep the last few tool calls and tool results in full detail because it allows the model to know where it left off and to continue smoothly.&lt;/p&gt;
&lt;h2 id=&#34;isolate&#34;&gt;Isolate&lt;/h2&gt;
&lt;p&gt;Isolating context is all about issuing relevant context to the context windows of relevant sub-agents. Each sub-agent has its own context window, so we can leverage them to accomplish certain aspects of the overall task whilst keeping their context window limited to the information they need to complete their task. This allows for a separation of concerns within the system, ensuring each agent is not burdened by unnecessary context.&lt;/p&gt;
&lt;p&gt;Manus considers context isolation in two different patterns: sharing context by communication, and communication by sharing context.&lt;/p&gt;
&lt;p&gt;Sharing context by communication is the easier pattern to understand, it&amp;rsquo;s the classic sub-agent setup.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/context-by-communication.png&#34; width=&#34;600&#34; height=&#34;238&#34; alt=&#34;&#34;&gt;
&lt;p&gt;The main agent writes a prompt and sends it to a sub-agent. The sub-agent&amp;rsquo;s entire context only consists of that instruction prompt. This is ideal if the task has a short/clear instruction and only the final output matters, like searching a codebase for a specific snippet. The result is then returned to the main agent.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/communication-by-context.png&#34; width=&#34;600&#34; height=&#34;242&#34; alt=&#34;&#34;&gt;
&lt;p&gt;For more complex scenarios, it may be advantageous for the sub-agent to see the entirety of the previous context. This is the communication by sharing context pattern. The sub-agent has access to all of the main agent&amp;rsquo;s context, but has it&amp;rsquo;s own system prompt and it&amp;rsquo;s own tools. For example, imagine a deep-research scenario. The final reports depends on a lot of intermediate searches and notes. In that case you would use this pattern to share all those notes and searches. If you were to force the agent to re-read all of those contexts by retrieving from the filesystem, you&amp;rsquo;re wasting latency and context.&lt;/p&gt;
&lt;p&gt;Be aware that sharing context is expensive, each sub-agent has a larger input to pre-fill. You&amp;rsquo;ll end up spending more on input tokens, and because both the action space and system prompt differ, you cannot reuse the KV-cache.&lt;/p&gt;
&lt;h2 id=&#34;retrieve&#34;&gt;Retrieve&lt;/h2&gt;
&lt;p&gt;We touched on retrieval earlier, the best method is highly debatable and really comes down to what works best for you in your implementation. The two most popular methods for context retrieval are semantic search and filesystem search. The former is a RAG type system using a vector database and semantic search for retrieval. The other is using a file system with file search tools like &lt;code&gt;glob&lt;/code&gt; and &lt;code&gt;grep&lt;/code&gt; to retrieve relevant context. A combination of both can be advantageous in certain scenarios.&lt;/p&gt;
&lt;h1 id=&#34;final-thoughts&#34;&gt;Final Thoughts&lt;/h1&gt;
&lt;p&gt;A few things to consider.&lt;/p&gt;
&lt;p&gt;Building agentic systems is barely a year old, the rules of engagement are constantly changing. What&amp;rsquo;s considered best practice now may not hold true in a few months. Staying on top of emerging trends and new advancements allows your system to evolve and improve.&lt;/p&gt;
&lt;p&gt;The five pillars are not independent, they enable and compliment each other. Offload + retrieve enables more efficient reduction, stable retrieve makes isolation safe, isolation reduces the frequency of reduction, and more isolation + reduction impacts cache efficiency and the quality of output.&lt;/p&gt;
&lt;p&gt;Avoid context over-engineering. The biggest leaps Manus has achieved haven&amp;rsquo;t come from adding more fancy context management layers or clever retrieval hacks. They all came from simplification and removal of unnecessary tricks. Every time they simplified the architecture and trusted the model more, the system got faster, more stable, and smarter. The goal of context engineering is to make the model&amp;rsquo;s job simpler, not harder.&lt;/p&gt;
&lt;h1 id=&#34;resources&#34;&gt;Resources&lt;/h1&gt;
&lt;p&gt;Original Webinar - &lt;a href=&#34;https://www.youtube.com/watch?v=6_BcCthVvb8&#34;&gt;Youtube&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lance&amp;rsquo;s Slides - &lt;a href=&#34;https://docs.google.com/presentation/d/16aaXLu40GugY-kOpqDU4e-S0hD1FmHcNyF0rRRnb1OU/edit&#34;&gt;Google Docs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Peak&amp;rsquo;s Slides - &lt;a href=&#34;https://drive.google.com/file/d/1QGJ-BrdiTGslS71sYH4OJoidsry3Ps9g/view&#34;&gt;Google Drive&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://blog.langchain.com/context-engineering-for-agents&#34;&gt;Context Engineering for Agents&lt;/a&gt; - A comprehensive guide on write, select, compress, and isolate strategies&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://blog.langchain.com/the-rise-of-context-engineering&#34;&gt;The Rise of &amp;ldquo;Context Engineering&amp;rdquo;&lt;/a&gt; - Understanding why context engineering is the most important skill for AI engineers&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.langchain.com/oss/python/langchain/context-engineering&#34;&gt;Context Engineering in Agents (Docs)&lt;/a&gt; - Technical documentation on implementing context engineering with LangChain&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://blog.langchain.com/deep-agents/&#34;&gt;Deep Agents&lt;/a&gt; - How planning, sub-agents, and file systems enable complex agent tasks&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/langchain-ai/context_engineering&#34;&gt;GitHub: Context Engineering Examples&lt;/a&gt; - Hands-on notebooks covering all four context engineering strategies&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>XBOW - Agentic Pentesting with ZERO False Positives</title>
      <link>https://blog.aidanjohn.org/2025/09/27/xbow-agentic-pentesting-with-zero.html</link>
      <pubDate>Sat, 27 Sep 2025 15:39:25 -0400</pubDate>
      
      <guid>http://aidanj.micro.blog/2025/09/27/xbow-agentic-pentesting-with-zero.html</guid>
      <description>&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/xbow-blog-image4.png&#34; width=&#34;600&#34; height=&#34;337&#34; alt=&#34;&#34;&gt;
&lt;p&gt;If you&amp;rsquo;ve never heard of &lt;a href=&#34;https://xbow.com/&#34;&gt;XBOW&lt;/a&gt; before, you will. XBOW is a platform that leverages a multi-agent system to perform automated pentesting. The team behind it is on a mission to build a fully autonomous system to catch verified vulnerabilities, allowing security teams to focus on problems that require a human touch.&lt;/p&gt;
&lt;p&gt;XBOW made huge waves back in June of 2025 when they achieved the &lt;a href=&#34;https://xbow.com/blog/top-1-how-xbow-did-it&#34;&gt;number one spot&lt;/a&gt; on the US HackerOne bug bounty leaderboard.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/xbow-leaderboard.webp&#34; width=&#34;600&#34; height=&#34;308&#34; alt=&#34;&#34;&gt;
&lt;p&gt;What was stunning about their approach was not only the scale at which they were able to find vulnerabilities, but the creativity of the vulns themselves - like when &lt;a href=&#34;https://xbow.com/blog/xbow-geolocation-sqli&#34;&gt;XBOW found a SQLi vulnerability&lt;/a&gt; while trying to bypass geolocation restrictions. We&amp;rsquo;ll explore some more interesting vulns they found later in this post.&lt;/p&gt;
&lt;p&gt;More recently, researchers at XBOW conducted an experiment to test for vulnerabilities across 17,000+ DockerHub images. The results: 200 vulnerabilities with 0 false positives. Yes, you read that right. ZERO false positives.&lt;/p&gt;
&lt;p&gt;In this post, we&amp;rsquo;ll be exploring the methodology behind XBOW&amp;rsquo;s approach to agentic pentesting, focusing on how they were able to harness typically hallucinogenic LLMs into a platform that can identify verified vulnerabilities at scale.&lt;/p&gt;
&lt;p&gt;This post is a summary of a recent webinar hosted by XBOW researchers &lt;a href=&#34;https://www.linkedin.com/in/brendan-dolan-gavitt-3b68154/&#34;&gt;Brendan Dolan-Gavitt&lt;/a&gt; and &lt;a href=&#34;https://www.linkedin.com/in/alvaroms/&#34;&gt;Alvaro Muñoz&lt;/a&gt; titled &lt;em&gt;200 Zero Days, 0 False Positives: A discussion on scaling autonomous exploitation with AI&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;If you want to learn more about XBOW, check out their &lt;a href=&#34;https://xbow.com/blog&#34;&gt;blog&lt;/a&gt; and the slides from their recent &lt;a href=&#34;https://www.blackhat.com/us-25/briefings/schedule/#ai-agents-for-offsec-with-zero-false-positives-46559&#34;&gt;Black Hat session&lt;/a&gt;. The images in this post are all from the XBOW team and are purely for educational purposes.&lt;/p&gt;
&lt;p&gt;In my opinion, XBOW is a prime example of some of the most interesting applications of GenAI in recent memory, so without further ado, let&amp;rsquo;s dive in!&lt;/p&gt;
&lt;h1 id=&#34;table-of-contents&#34;&gt;Table of Contents&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Quelling False Positives and Hallucinations
&lt;ul&gt;
&lt;li&gt;Death by a thousand slops&lt;/li&gt;
&lt;li&gt;XBOW Architecture&lt;/li&gt;
&lt;li&gt;Taxonomy of Validators
&lt;ul&gt;
&lt;li&gt;Canary-based Validation&lt;/li&gt;
&lt;li&gt;Heuristic-based Validation&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The DockerHub Experiment
&lt;ul&gt;
&lt;li&gt;Open Redirect Vulnerability in Jenkins&lt;/li&gt;
&lt;li&gt;SSRF in Apache Druid&lt;/li&gt;
&lt;li&gt;File Read in Group Docs&lt;/li&gt;
&lt;li&gt;AuthZ Bypass in Redmine&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;quelling-false-positives-and-hallucinations&#34;&gt;Quelling False Positives and Hallucinations&lt;/h1&gt;
&lt;p&gt;I think everyone is familiar with the tendency of LLMs to hallucinate information. This becomes a major problem to solve when applying them in pentesting contexts where accuracy is necessary for successful exploitation. If you&amp;rsquo;re not properly validating the vulnerabilities found by the agent, you&amp;rsquo;re just producing more AI slop. This became a far too real reality for the lead author of cURL.&lt;/p&gt;
&lt;h2 id=&#34;death-by-a-thousand-slops&#34;&gt;Death by a thousand slops&lt;/h2&gt;
&lt;p&gt;The increasing popularity and development of GenAI opened the floodgates for developers to create pentesting agents and set them loose on bug bounty programs. Most notable was the story of what happened with cURL. Their bug bounty program was inundated with bogus security reports generated by AI. This influx of false reporting caused a major headache for the founder and lead developer of cURL, Daniel Stenberg. It became increasingly difficult to tell which reports actually needed attention and which reports were just looking for a payout. Daniel documented his experience and frustration with this in his blog post &lt;a href=&#34;https://daniel.haxx.se/blog/2025/07/14/death-by-a-thousand-slops/&#34;&gt;Death by a Thousand Slops&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The reports themselves look super plausible, but actually turn out to be completely fake. Here&amp;rsquo;s an example of a report like this from the XBOW team:&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/fake-report-1.png&#34; width=&#34;600&#34; height=&#34;115&#34; alt=&#34;&#34;&gt;
&lt;p&gt;The agent was trying to look for a command injection vulnerability. It finds an endpoint where it thinks it can trigger one and tries to exfiltrate data by embedding the payload in backticks.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/fake-report-2.png&#34; width=&#34;600&#34; height=&#34;170&#34; alt=&#34;&#34;&gt;
&lt;p&gt;If we take a closer look at the command, we can see it&amp;rsquo;s wrapped in double quotes instead of single quotes. This discrepancy will cause the command to execute on the attacker&amp;rsquo;s own machine - not the target. While it will return a password file, it is the attacker&amp;rsquo;s password file and does not constitute a real vulnerability.&lt;/p&gt;
&lt;p&gt;So how was XBOW able to create a system that could properly quell false positives like this? Simple, they institute a suite of validators that sit outside of the AI and check its work. The validators leverage non-AI code to confirm the authenticity of agent-proposed vulnerabilities, and the XBOW team has come up with some pretty neat tricks for this validation.&lt;/p&gt;
&lt;h2 id=&#34;xbow-architecture&#34;&gt;XBOW Architecture&lt;/h2&gt;
&lt;p&gt;Before we get into some of the technical details for the validators, it&amp;rsquo;s important to understand a little about the architecture of XBOW&amp;rsquo;s multi-agent system.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/xbow-architecture.png&#34; width=&#34;600&#34; height=&#34;336&#34; alt=&#34;&#34;&gt;
&lt;p&gt;At the top is an agent orchestrator they call the Coordinator. This agent manages teams of sub-agents to accomplish different tasks. The Coordinator first spawns discovery agents that use headless browsers and other discovery tools to start collecting endpoints and requests. Enough info to map out the application and pass this info back to the coordinator so it can decide which specialized solvers it should spawn in response. These agents use a mix of both AI and non-AI techniques for discovery and exploitation. This is advantageous because you get the benefit of industry-standard tooling with the knowledge base of an LLM, allowing the agents to say things like &amp;ldquo;I know the framework this application is using, so x y and z endpoints must exist&amp;rdquo; even if it&amp;rsquo;s not explicitly exposed in the frontend code.&lt;/p&gt;
&lt;p&gt;All of these agents are running on a dedicated and isolated attack machine. This machine is a throwaway Linux container pre-built with a bunch of standard tooling as well as some custom tools designed by the XBOW team.&lt;/p&gt;
&lt;p&gt;So where does validation come in? When an agent thinks it has found a vulnerability, it tries to prove its existence by submitting some evidence to the exploit validator. The exploit validator verifies the evidence by talking to the target and making requests on the network with non-AI code. It is the only one who can decide if the agent succeeded at what it was trying to do. Once it&amp;rsquo;s decided that a valid vulnerability has been found, it will forward that information to a report generation flow.&lt;/p&gt;
&lt;h2 id=&#34;taxonomy-of-validators&#34;&gt;Taxonomy of Validators&lt;/h2&gt;
&lt;p&gt;XBOW leverages a spectrum of validators. They range from bulletproof implementations (which require some extra effort to set up) to less reliable implementations (with an opportunity for false positives but take no setup).&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/validator-taxonomy.png&#34; width=&#34;600&#34; height=&#34;300&#34; alt=&#34;&#34;&gt;
&lt;p&gt;This diagram shows the range of these validators. On the x-axis we have the effort spent for setup, ranging from manual to fully automated. On the y-axis we have the degree of target cooperation (whether they have write access to the target system for the test).&lt;/p&gt;
&lt;h3 id=&#34;canary-based-validation&#34;&gt;Canary-based Validation&lt;/h3&gt;
&lt;p&gt;In the top right quadrant are validators based on what the XBOW team calls canaries. Canaries are a long random string (similar to a CTF flag) in a place users shouldn&amp;rsquo;t have access to. For example, you can plant a canary in the admin dashboard. If the agent ends up finding this complex string, you can confirm it was able to obtain admin credentials.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/canaries.png&#34; width=&#34;600&#34; height=&#34;305&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Canaries are suitable for cases where you can stand up the environment in something like a Docker container and modify the code, like open source applications. Canaries allow you to test for scenarios that would normally be very hard to do. Vulnerabilities that would normally require application-specific or system design-specific knowledge, like business logic vulnerabilities and IDOR vulnerabilities, become trivial.&lt;/p&gt;
&lt;p&gt;So what do you do in cases where you can&amp;rsquo;t plant canaries - like the live targets in HackerOne&amp;rsquo;s bug bounty program?&lt;/p&gt;
&lt;h3 id=&#34;heuristic-based-validation&#34;&gt;Heuristic-based Validation&lt;/h3&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/validator-taxonomy2.png&#34; width=&#34;600&#34; height=&#34;308&#34; alt=&#34;&#34;&gt;
&lt;p&gt;This leads us to the validators in the bottom right quadrant, they leverage headless browsers and heuristic validation to confirm the existence of proposed vulnerabilities.&lt;/p&gt;
&lt;p&gt;For example, an agent may submit something like an HTTP request or a URL as evidence of a vulnerability.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/validating-xss.png&#34; width=&#34;600&#34; height=&#34;411&#34; alt=&#34;&#34;&gt;
&lt;p&gt;In this example, the agent has gone through different pages and found a &lt;code&gt;p&lt;/code&gt; parameter where it thinks it can inject some JavaScript and prove the existence of an XSS vuln. Once it&amp;rsquo;s generated this URL, it will pass it to the browser validator by invoking &lt;code&gt;victim-goto&lt;/code&gt;, which (surprisingly) simulates what would happen if a victim were to go to that link. Then, without doing anything related to AI, it visits the link and validates that a pop-up appeared with the text it&amp;rsquo;s looking for (in this case &amp;lsquo;XSS&amp;rsquo;).&lt;/p&gt;
&lt;p&gt;Another class of validator in this quadrant is the heuristic validator.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/validator-taxonomy3.png&#34; width=&#34;600&#34; height=&#34;335&#34; alt=&#34;&#34;&gt;
&lt;p&gt;These validators have a little more noise but cover important attack classes where the team is willing to do more work to validate them. These validators confirm attacks like RCE, SQLi, and SSRF - critical vulns because they give the attacker a ton of control.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/heuristic-validators.png&#34; width=&#34;600&#34; height=&#34;311&#34; alt=&#34;&#34;&gt;
&lt;p&gt;In this validation implementation, we are able to force the agent to submit a particular kind of evidence in a specific format that we know how to evaluate. We need it to be in a specific format so that we can do something with it in non-AI deterministic code that will confirm the validity of the evidence it&amp;rsquo;s giving us. For example, if we&amp;rsquo;re looking at SQLi, we can test for a blind time-based attack. This is where you send a request that triggers a database lookup with attacker-controlled commands. The attacker injects a command to sleep, which causes the system to stop and wait for a few seconds before returning anything else. That delay is something the system can measure. So if we ask the model to provide two HTTP requests with a big timing difference between them - we can make those requests a few times, look for statistically significant differences in the timings, and say there&amp;rsquo;s probably a SQLi vulnerability here.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s important to emphasize this isn&amp;rsquo;t a perfect method of validation and does not have a 0 false positive rate. Webapps are incredibly varied; some webapps have endpoints where, if you send a number, it will naturally sleep for that number of time. There are also cases where if you send two requests, one will take longer than another purely because of how the app itself is built. However, this is an acceptable flaw due to the severity of the types of attacks that could be present. It is worth the manual effort to do more testing to confirm their existence.&lt;/p&gt;
&lt;p&gt;Now that we know more about how the system works, let&amp;rsquo;s check out some of the vulnerabilities the XBOW team found in their recent experience scanning DockerHub!&lt;/p&gt;
&lt;h1 id=&#34;the-dockerhub-experiment&#34;&gt;The DockerHub Experiment&lt;/h1&gt;
&lt;p&gt;The team started with 25 million DockerHub repositories and narrowed it down to about 17k images for automated testing. These images were the perfect use case for canary validation, and a fun way to see how their system works at scale. For this experiment, they were able to automate canary deployment through various techniques - such as modifying the Docker Compose file to add a canary in the root of the filesystem, adding an internal server hosting the canary for SSRF, and adding a table to an existing database with a row containing a canary.&lt;/p&gt;
&lt;p&gt;The test was a success - they found A LOT of bugs.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/dockerhub-results.png&#34; width=&#34;600&#34; height=&#34;308&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Let&amp;rsquo;s explore some of their more notable finds!&lt;/p&gt;
&lt;h2 id=&#34;open-redirect-vulnerability-in-jenkins---cve-2025-27625httpsnvdnistgovvulndetailcve-2025-27625&#34;&gt;Open Redirect Vulnerability in Jenkins - &lt;a href=&#34;https://nvd.nist.gov/vuln/detail/CVE-2025-27625&#34;&gt;CVE-2025-27625&lt;/a&gt;&lt;/h2&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/jenkins-openredirect.png&#34; width=&#34;600&#34; height=&#34;336&#34; alt=&#34;&#34;&gt;
&lt;p&gt;XBOW found an open redirect in Jenkins by appending two backslashes to the path parameter. Turns out Jenkins was checking the path to make sure it wasn&amp;rsquo;t an absolute URL, but was not checking if the URL was using this specific variation of an absolute URL. Not many people know that browsers will accept two backslashes at the beginning of a URL, but an LLM does! The agent was able to take this obscure knowledge and apply it in context to find the vulnerability.&lt;/p&gt;
&lt;p&gt;The team didn&amp;rsquo;t use canary validation for this vulnerability; it used headless browser validation. The agent transferred the payload URL to a &amp;lsquo;victim machine&amp;rsquo; and visited the URL, following all the redirects, then checking if the domain it landed on matched the expected domain (in this case &lt;code&gt;evil.xbow.ltd&lt;/code&gt;). This is the same kind of validation they apply to XSS and other client-side vulnerabilities, where you have to make the victim visit a link or page for exploitation.&lt;/p&gt;
&lt;p&gt;XBOW reported the vulnerability to Jenkins and found that, in addition to the double backslashes, a single backslash allowed an attacker to navigate to any arbitrary domain. The Jenkins team patched this by implementing a check for any domain that starts with a backslash.&lt;/p&gt;
&lt;h2 id=&#34;ssrf-in-apache-druid---cve-2025-27888httpsnvdnistgovvulndetailcve-2025-27888&#34;&gt;SSRF in Apache Druid - &lt;a href=&#34;https://nvd.nist.gov/vuln/detail/CVE-2025-27888&#34;&gt;CVE-2025-27888&lt;/a&gt;&lt;/h2&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/apache-ssrf.png&#34; width=&#34;600&#34; height=&#34;336&#34; alt=&#34;&#34;&gt;
&lt;p&gt;The XBOW team planted a canary on the internal web server, and it was only accessible from the target they were attacking. If XBOW was able to retrieve the canary, it was definitive evidence that it was able to talk to internal URLs.&lt;/p&gt;
&lt;p&gt;Upon reading the source code, XBOW realized that there were URL paths &lt;code&gt;/proxy/coordinator&lt;/code&gt; and &lt;code&gt;/proxy/overlord&lt;/code&gt;, and whatever comes after will be proxied to the respective machine. XBOW appended an &lt;code&gt;@&lt;/code&gt; symbol to mimic a login and force the coordinator/overlord part of the URL to process as a username. Because this was not needed, the target tossed out this part of the request, and it ended up landing on the internal server where XBOW was able to retrieve the canary.&lt;/p&gt;
&lt;p&gt;In a cloud scenario, this might mean access to sensitive services like the AWS Instance Metadata Service. This could have also been leveraged for XSS because you could point it to your own server, return any arbitrary JavaScript, and because it&amp;rsquo;s returned as content-type HTML, it will be executed on the victim&amp;rsquo;s browser.&lt;/p&gt;
&lt;h2 id=&#34;file-read-in-group-docs&#34;&gt;File Read in Group Docs&lt;/h2&gt;
&lt;p&gt;This vulnerability was particularly interesting because of how many steps the agent had to chain together in order to find it.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/fileread1.png&#34; width=&#34;600&#34; height=&#34;336&#34; alt=&#34;&#34;&gt;
&lt;p&gt;In this case, XBOW was targeting a .NET application, and there were a bunch of DLL files it could analyze. In those files it found a JWT which it tried to use to login as an administrator. It failed because the token was expired.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/fileread2.png&#34; width=&#34;600&#34; height=&#34;336&#34; alt=&#34;&#34;&gt;
&lt;p&gt;It kept analyzing the DLLs and noticed there were a few keywords like &lt;code&gt;s3SecretKey&lt;/code&gt; and &lt;code&gt;SymmetricSecurityKey&lt;/code&gt;. It also found something that looked like a base64 encoded string. Due to the sequence of words, XBOW inferred that the base64 may be a secret key and created a Python script to try out different combinations of attacks.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/fileread3.png&#34; width=&#34;600&#34; height=&#34;336&#34; alt=&#34;&#34;&gt;
&lt;p&gt;XBOW first tried using different secrets to sign the JWT. It tried a number of key IDs and included the same secret it saw from the expired token. XBOW saw in the traffic that there was compressed storage file so it tried to use path traversal to scale from where the packet files were expected to be converted into the main file system. XBOW put together different payloads for path traversal, crafted its own JWT with admin credentials, and successfully obtained the canary.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/fileread4.png&#34; width=&#34;600&#34; height=&#34;336&#34; alt=&#34;&#34;&gt;
&lt;h2 id=&#34;authz-bypass-in-redmine&#34;&gt;AuthZ Bypass in Redmine&lt;/h2&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/redmine-authz.png&#34; width=&#34;600&#34; height=&#34;336&#34; alt=&#34;&#34;&gt;
&lt;p&gt;This is another instance of XBOW using canary validation. It dug through the source code in this project management system and traced through five different classes before it figured out how the visibility check for projects was implemented. XBOW found a parameter that, when set to true, completely bypasses the visibility check and lets you see private projects.&lt;/p&gt;
&lt;p&gt;The example above uses an authenticated user for exploitation but it was later found out that you don&amp;rsquo;t need to be authenticated for this to work. Scary stuff!&lt;/p&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;XBOW is the first system of its kind, but it will not be the last. As LLMs improve and agentic systems advance, this kind of automated pentesting will become more widespread. As with any new technology, there will be those who wield it benevolently and malevolently. As it becomes easier for malicious actors to find vulnerabilities in production environments at scale, security teams must adopt similar technologies in order to properly test their services before deployment.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Proactive Cyber Defense with KillChainGraph</title>
      <link>https://blog.aidanjohn.org/2025/08/31/proactive-cyber-defense-with-killchaingraph.html</link>
      <pubDate>Sun, 31 Aug 2025 12:02:58 -0400</pubDate>
      
      <guid>http://aidanj.micro.blog/2025/08/31/proactive-cyber-defense-with-killchaingraph.html</guid>
      <description>&lt;p&gt;In this post, we&amp;rsquo;ll explore a machine learning framework designed to combine the attack flow from the Lockheed Cyber Kill Chain with the MITRE ATT&amp;amp;CK dataset, enabling better contextualization, prediction, and defense against adversarial behavior.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/proactive-cyber-defense.png&#34; width=&#34;600&#34; height=&#34;337&#34; alt=&#34;&#34;&gt;
&lt;p&gt;This post is a summarization of research conducted by &lt;a href=&#34;https://www.linkedin.com/in/chitraksh-singh/&#34;&gt;Chitraksh Singh&lt;/a&gt;, &lt;a href=&#34;https://www.linkedin.com/in/monishadhanraj/&#34;&gt;Monisha Dhanraj&lt;/a&gt;, and &lt;a href=&#34;https://www.linkedin.com/in/kenhuang8/&#34;&gt;Ken Huang&lt;/a&gt; in their paper &lt;em&gt;&amp;ldquo;KillChainGraph: ML Framework for Predicting and Mapping ATT&amp;amp;CK Techniques&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;You can read their full paper on ArXiv here: &lt;a href=&#34;https://arxiv.org/abs/2508.18230v1&#34;&gt;https://arxiv.org/abs/2508.18230v1&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;table-of-contents&#34;&gt;Table of Contents&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;What is MITRE ATT&amp;amp;CK?&lt;/li&gt;
&lt;li&gt;What is the Cyber Kill Chain?&lt;/li&gt;
&lt;li&gt;Why KillChainGraph?&lt;/li&gt;
&lt;li&gt;Methodology
&lt;ul&gt;
&lt;li&gt;Dataset&lt;/li&gt;
&lt;li&gt;LightGBM (LGBM)&lt;/li&gt;
&lt;li&gt;Transformer&lt;/li&gt;
&lt;li&gt;BERT&lt;/li&gt;
&lt;li&gt;Graph Neural Network (GNN)&lt;/li&gt;
&lt;li&gt;Ensemble Strategy&lt;/li&gt;
&lt;li&gt;Semantic Mapping and Graph Construction&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Results&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Conventional security tooling such as firewalls, rule-based intrusion detection systems, and signature-based analysis has long been the standard for security teams across the industry. It&amp;rsquo;s always been a cat-and-mouse game - as adversaries become more advanced, security professionals look for new ways to defend.&lt;/p&gt;
&lt;p&gt;In addition to known threat actors and APT groups, advances in GenAI have led to a rise in sophisticated exploitation from unsophisticated actors. Just recently, &lt;a href=&#34;https://www.anthropic.com/news/detecting-countering-misuse-aug-2025&#34;&gt;Anthropic has documented the use of Claude to enhance cybercriminal operations&lt;/a&gt; and enable what they call &amp;ldquo;vibe hacking&amp;rdquo;, which is exactly what you think it is.&lt;/p&gt;
&lt;p&gt;Defenders have been stuck playing catch up - most of the existing tooling they use operates reactively and are often ineffective against threats like zero day vulnerabilities and polymorphic malware. As adversaries become more advanced and the barrier to entry for sophisticated exploitation lowers, security professionals must adopt new techniques to stay ahead of the evolving threat landscape.&lt;/p&gt;
&lt;p&gt;Recent works have shown success in using machine learning for intrusion detection and anomaly classification, allowing defenders to be proactive instead of reactive. This paper expands on that area of work by leveraging machine learning to combine the attacker lifecycle described by the Cyber Kill Chain (CKC) with adversarial techniques from MITRE ATT&amp;amp;CK. By mapping known ATT&amp;amp;CK techniques to phases of the CKC, we have all the information we need to contextualize, predict, and defend against an increasingly wide set of adversarial behavior.&lt;/p&gt;
&lt;p&gt;In this paper, the researchers present a multi-model machine learning framework dubbed &lt;em&gt;KillChainGraph&lt;/em&gt; that emulates adversarial behavior across the seven phases of the CKC using the ATT&amp;amp;CK Enterprise dataset. This machine learning approach offers a scalable solution for extracting behavioral insights from large volumes of cyber threat intelligence data, allowing defenders to proactively identify full-cycle attack paths and preemptively strengthen security controls.&lt;/p&gt;
&lt;h1 id=&#34;what-is-mitre-attck&#34;&gt;What is MITRE ATT&amp;amp;CK?&lt;/h1&gt;
&lt;p&gt;ATT&amp;amp;CK is a globally accessible knowledge base maintained by the MITRE Corporation that houses detailed adversarial behavior. It catalogues known TTPs (Tools, Tactics, and Procedures) employed by threat actors based on real-world observations and is constantly updated as new TTPs are discovered. Security teams across the globe use this knowledge to understand, test, and defend against cyberattacks.&lt;/p&gt;
&lt;p&gt;The ATT&amp;amp;CK Enterprise dataset is a full knowledge base of all the information MITRE maintains about adversary behavior in enterprise IT environments like Windows, Linux, MacOS, cloud, SaaS, containers, etc. - all in JSON format. This dataset contains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tactics&lt;/strong&gt; (High-level adversarial objectives i.e. initial access, persistence, privilege escalation)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Techniques &amp;amp; Sub-techniques&lt;/strong&gt; (Ways adversaries achieve each tactic along with detection ideas and mitigation advice)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Groups&lt;/strong&gt; (Threat Actors/APTs and which techniques they&amp;rsquo;ve been known to use)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Software&lt;/strong&gt; (Malware &amp;amp; Tools mapped to techniques)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mitigations&lt;/strong&gt; (Defensive measures mapped to techniques)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Relationships&lt;/strong&gt; (Links that tie techniques &amp;lt;-&amp;gt; groups &amp;lt;-&amp;gt; software &amp;lt;-&amp;gt; mitigations)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;what-is-the-cyber-kill-chain&#34;&gt;What is the Cyber Kill Chain?&lt;/h1&gt;
&lt;p&gt;The Cyber Kill Chain was developed by Lockheed Martin as a way to break down the attacker lifecycle into 7 key phases. This allows defenders to understand how intrusions progress so they can detect, prevent, and disrupt attacks at different points.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250829141200.png&#34; width=&#34;600&#34; height=&#34;699&#34; alt=&#34;&#34;&gt;
&lt;p&gt;&lt;em&gt;Lockheed Cyber Kill Chain Diagram (&lt;a href=&#34;https://www.lockheedmartin.com/en-us/capabilities/cyber/cyber-kill-chain.html&#34;&gt;https://www.lockheedmartin.com/en-us/capabilities/cyber/cyber-kill-chain.html&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;h1 id=&#34;why-killchaingraph&#34;&gt;Why KillChainGraph?&lt;/h1&gt;
&lt;p&gt;The novelty of this approach is in producing phase-specific modeling aligned with structured frameworks (CKC and MITRE ATT&amp;amp;CK) already recognized by the security community. The researchers introduce a forward-predictive pipeline that models attacker progression across the CKC using a suite of supervised classifiers: LightGBM, Transformer, BERT, and GNN, each trained per CKC phase.&lt;/p&gt;
&lt;p&gt;The input dataset was curated by semantically aligning ATT&amp;amp;CK techniques with CKC phases using ATTACK-BERT (a model specialized in understanding and analyzing cybersecurity-related text with a particular focus on attack actions and techniques). This generated phase-specific datasets that enable fine-grained classification of adversarial behavior.&lt;/p&gt;
&lt;p&gt;The researchers then constructed a semantic similarity graph to link predicted techniques across phases, effectively simulating the attack pathing employed by threat actors. Combining this semantically guided data engineering and graph-based inference enables explainable reasoning over adversarial tactics, granting defenders increased situational awareness and the ability to proactively enhance cyber defense.&lt;/p&gt;
&lt;h1 id=&#34;methodology&#34;&gt;Methodology&lt;/h1&gt;
&lt;p&gt;The framework consists of two major components: dataset construction and model training.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250828134140.png&#34; width=&#34;600&#34; height=&#34;148&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Five classification models are being employed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;LightGBM (LGBM)&lt;/li&gt;
&lt;li&gt;Transformer&lt;/li&gt;
&lt;li&gt;BERT&lt;/li&gt;
&lt;li&gt;Graph Neural Network (GNN)&lt;/li&gt;
&lt;li&gt;Ensemble Strategy&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Given attack descriptions, they are trained to predict which ATT&amp;amp;CK technique is being used along with its associated CKC phase. The results of which are then used to construct a graph representation of an adversary&amp;rsquo;s attack pathing.&lt;/p&gt;
&lt;h2 id=&#34;dataset&#34;&gt;Dataset&lt;/h2&gt;
&lt;p&gt;Using ATTACK-BERT, the researchers aligned adversarial behavior descriptions from the ATT&amp;amp;CK dataset with their appropriate CKC phase. This created a labeled dataset of adversarial actions, each consisting of an ATT&amp;amp;CK technique description, its corresponding ATT&amp;amp;CK technique ID + name, and the associated CKC phase. The dataset was then split into the seven CKC phases: Reconnaissance, Weaponization, Delivery, Exploitation, Installation, Command &amp;amp; Control, and Objectives.&lt;/p&gt;
&lt;p&gt;After cleaning up the data, each of the seven datasets was stratified into training, validation, and testing sets in a 70-10-20 split with an emphasis on maintaining class balance wherever possible.&lt;/p&gt;
&lt;p&gt;Phases like Delivery and Command &amp;amp; Control had limited data availability and class imbalance, so some data augmentation strategies were applied, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Synonym Substitution&lt;/strong&gt; - increasing diversity in a dataset by replacing words in a text sample with their synonyms.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TF-IDF Based Token Filtering&lt;/strong&gt; - a mechanism to drop low-importance terms.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Word Reordering&lt;/strong&gt; and &lt;strong&gt;Controlled Duplication&lt;/strong&gt; - another way to increase dataset diversity without altering underlying intent.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Paraphrasing Techniques&lt;/strong&gt; - methods like using a &lt;strong&gt;Pegasus model&lt;/strong&gt; (trained to rewrite text with different words while preserving underlying intent) and &lt;strong&gt;back-translation&lt;/strong&gt; (taking a sentence, translating it to another language, then back to English).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These augmentation strategies improved the robustness and generalization ability of models trained on low-resource CKC phases.&lt;/p&gt;
&lt;p&gt;Given a description of an attack, each model is trained to predict the correct ATT&amp;amp;CK technique being used (and by extension its CKC phase).&lt;/p&gt;
&lt;p&gt;Now, let&amp;rsquo;s take a look at each of the models the researchers used for this framework.&lt;/p&gt;
&lt;h2 id=&#34;lightgbm-lgbm&#34;&gt;LightGBM (LGBM)&lt;/h2&gt;
&lt;p&gt;LightGBM works by building lots of small decision trees and combining them. The model essentially learns a bunch of little rules from the dataset like &amp;ldquo;&lt;em&gt;if the word credential is present it most likely has to do with credential dumping&lt;/em&gt;&amp;rdquo; or &amp;ldquo;&lt;em&gt;if the description mentions a registry it&amp;rsquo;s most likely a persistence technique&lt;/em&gt;&amp;rdquo; then combines these rules to guess the correct ATT&amp;amp;CK technique.&lt;/p&gt;
&lt;p&gt;First, a vector embedding (an array of numbers) is generated using ATTACK-BERT to represent the semantic content of a given ATT&amp;amp;CK description. Then, they use this and its associated ATT&amp;amp;CK technique name to train the model. This allows the model to decide which specific ATT&amp;amp;CK technique is being employed, given a description of the attack.&lt;/p&gt;
&lt;h2 id=&#34;transformer&#34;&gt;Transformer&lt;/h2&gt;
&lt;p&gt;The Transformer-based classifier was another way for the researchers to classify ATT&amp;amp;CK techniques given a description. In this model, they used GloVe instead of ATTACK-BERT to generate semantic vector embeddings. Each vector embedding corresponding to a given attack description was given to the transformer as input.&lt;/p&gt;
&lt;p&gt;The main difference in the transformer architecture is that instead of following a rigid &amp;ldquo;if-then&amp;rdquo; path like a decision tree, the Transformer uses a flexible neural network with self-attention to understand the meaning of the whole attack description even when important words are spread out.&lt;/p&gt;
&lt;h2 id=&#34;bert&#34;&gt;BERT&lt;/h2&gt;
&lt;p&gt;BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model designed to capture deep bidirectional representations from unlabeled text. The researchers fine-tuned this pre-trained model on ATT&amp;amp;CK technique descriptions to predict the corresponding technique label.&lt;/p&gt;
&lt;p&gt;Each description was tokenized (broken up and translated to numbers) and truncated/padded to a fixed sequence length. These tokens are fed into BERT to generate semantic vector embeddings, which are then passed to a function that outputs the probabilities for each possible ATT&amp;amp;CK technique label. The label with the highest probability is chosen and returned.&lt;/p&gt;
&lt;p&gt;The main advantage of BERT is that there is a performance boost due to its pre-training on large-scale corpora like Wikipedia and BookCorpus. It has the ability to learn task-specific representations with minimal architectural modification and fine-tuning. This allows the model to better adapt to domain specific text - in our case: adversarial behavior descriptions.&lt;/p&gt;
&lt;h2 id=&#34;graph-neural-network-gnn&#34;&gt;Graph Neural Network (GNN)&lt;/h2&gt;
&lt;p&gt;The GNN in this framework is used to model the semantic and structural connections between ATT&amp;amp;CK descriptions. Each description is treated as a node in the graph, and the edges are constructed based on textual similarity (shared keyword patterns or how close the descriptions are in the semantic vector embedding space). A GNN layer aggregates information from neighboring nodes to update the representation of each node. The final node embedding is passed through a classification layer to predict the ATT&amp;amp;CK technique being used.&lt;/p&gt;
&lt;p&gt;The main advantage of using a GNN is the ability to leverage the relational structure between technique descriptions, improving generalization for similar but rare classes. This is especially valuable in the context of cybersecurity, where techniques may have overlapping semantics and evolving terminology.&lt;/p&gt;
&lt;h2 id=&#34;ensemble-strategy&#34;&gt;Ensemble Strategy&lt;/h2&gt;
&lt;p&gt;In this classifier, the four previous classification models (LGBM, Transformer, BERT, and GNN) are combined to synthesize a final ATT&amp;amp;CK technique prediction through a &lt;em&gt;Weighted Soft Voting&lt;/em&gt; ensemble strategy. In a hard voting strategy, each classifier would give its prediction, and a majority vote would decide the final technique prediction. Soft voting decides the final technique prediction by considering the predicted class probabilities from each individual classifier - allowing the framework to make a more nuanced decision influenced by each model&amp;rsquo;s confidence.&lt;/p&gt;
&lt;h2 id=&#34;semantic-mapping-and-graph-construction&#34;&gt;Semantic Mapping and Graph Construction&lt;/h2&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250831113213.png&#34; width=&#34;600&#34; height=&#34;229&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Once the final ATT&amp;amp;CK technique prediction has been generated, the next step is to construct a semantic graph that connects techniques across adjacent phases of the CKC. The goal is to simulate how an attacker might logically transition from one phase to the next.&lt;/p&gt;
&lt;p&gt;Each attack description is converted into a vector embedding using ATTACK-BERT to capture semantic meaning. For any two techniques &lt;code&gt;v_i&lt;/code&gt; from phase &lt;code&gt;t&lt;/code&gt; and &lt;code&gt;v_j&lt;/code&gt; from phase &lt;code&gt;t + 1&lt;/code&gt;, we compute how similar they are using cosine similarity (how close the vector embeddings are in the vector embedding space). The resulting computation is a &lt;code&gt;result&lt;/code&gt; where &lt;code&gt;-1 &amp;lt;= result &amp;lt;= 1&lt;/code&gt;. &lt;code&gt;1&lt;/code&gt; being perfectly similar and &lt;code&gt;-1&lt;/code&gt; being completely opposite. In this case, values closer to 1 indicate that the techniques are semantically similar and might represent a logical transition in an attacker&amp;rsquo;s plan.&lt;/p&gt;
&lt;p&gt;To build the graph, a minimum threshold is set on &lt;code&gt;result&lt;/code&gt;. If the similarity between two techniques across adjacent phases is greater than or equal to the threshold, we draw a directed edge from the earlier-phase technique &lt;code&gt;t&lt;/code&gt; to the later-phase technique &lt;code&gt;t + 1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This semantic mapping helps model an attacker&amp;rsquo;s potential attack flow in accordance with the CKC, providing a structured view of predicted attacker behavior and aiding in proactive cyber defense.&lt;/p&gt;
&lt;h1 id=&#34;results&#34;&gt;Results&lt;/h1&gt;
&lt;p&gt;The researchers tested these five models (LightGBM, Transformer, BERT, GNN, and the ensemble strategy) across the seven CKC phases using the following metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Accuracy&lt;/li&gt;
&lt;li&gt;Precision&lt;/li&gt;
&lt;li&gt;Recall&lt;/li&gt;
&lt;li&gt;F1-score&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The results were as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ensemble Strategy 🏆&lt;/li&gt;
&lt;li&gt;GNN&lt;/li&gt;
&lt;li&gt;LGBM&lt;/li&gt;
&lt;li&gt;BERT&lt;/li&gt;
&lt;li&gt;Transformer&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Overall, the ensemble strategy performed best. It&amp;rsquo;s important to note that its improvement over the GNN is small (0.03% - 0.20% gains) but significant given the already high baseline performance, where all F1-scores exceeded 97%.&lt;/p&gt;
&lt;p&gt;For example, in the Delivery phase, the GNN achieves an F1-score of 99.28%, with the ensemble improving this to 99.31%, corresponding to a 0.03% increase. While in the Exploitation phase, the F1-score rises from 97.67% to 97.87% (a 0.2% gain). In the Installation phase, from 98.70% to 98.83% (a 0.13% gain). These improvements occur consistently across all phases, confirming that the ensemble provides incremental gains even when the GNN already performs near optimally.&lt;/p&gt;
&lt;p&gt;GNN remains the strongest individual model, consistently outperforming LGBM, Transformer, and BERT across all metrics and phases.&lt;/p&gt;
&lt;p&gt;LGBM generally ranks second, particularly in phases with clearer feature separability, while BERT performs better than Transformer due to its contextual semantic modeling, which is particularly beneficial in phases such as Exploitation and Delivery.&lt;/p&gt;
&lt;p&gt;The Transformer model remains the weakest across all phases, with accuracies ranging from 55.56% in Delivery to 86.81% in Actions on Objectives, suggesting that self-attention architectures without domain-specific adaptation may underperform in this task.&lt;/p&gt;
&lt;p&gt;The results indicate that while the GNN remains the most effective standalone classifier, the integration of multiple heterogeneous learners in a weighted soft voting framework produces a &lt;strong&gt;consistent&lt;/strong&gt; performance uplift leading to fewer false positives and false negatives.&lt;/p&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;The researchers recognize that the ensemble model does require increased computational complexity and inference time due to the need for predictions from multiple models. However, the performance gains validate the effectiveness of their multi-model approach. Their future work will focus on real-world validation through live threat intelligence integration and deployment within automated SOC pipelines.&lt;/p&gt;
&lt;p&gt;The ability to map and predict adversarial behavior is an essential building block for building truly effective defenses. In the meantime, these kinds of systems can help defenders visualize and contextualize adversarial activity into familiar frameworks - granting increased situational awareness and the ability to proactively take defensive measures.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Bypassing LLM Safeguards with CognitiveAttack</title>
      <link>https://blog.aidanjohn.org/2025/08/01/bypassing-llm-safeguards-with-cognitiveattack.html</link>
      <pubDate>Fri, 01 Aug 2025 11:17:52 -0400</pubDate>
      
      <guid>http://aidanj.micro.blog/2025/08/01/bypassing-llm-safeguards-with-cognitiveattack.html</guid>
      <description>&lt;head&gt;
    &lt;link rel=&#34;stylesheet&#34; href=&#34;https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css&#34;&gt;
    &lt;script defer src=&#34;https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js&#34;&gt;&lt;/script&gt;
    &lt;script defer src=&#34;https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js&#34; 
            onload=&#34;renderMathInElement(document.body);&#34;&gt;&lt;/script&gt;
    &lt;script&gt;
        document.addEventListener(&#34;DOMContentLoaded&#34;, function() {
            renderMathInElement(document.body, {
                delimiters: [
                    {left: &#34;$$&#34;, right: &#34;$$&#34;, display: true},
                    {left: &#34;$&#34;, right: &#34;$&#34;, display: false}
                ]
            });
            const complexEq = document.getElementById(&#39;complex-eq&#39;);
            if (complexEq) {
                katex.render(&#34;\\max_{\\mathcal{B} \\subseteq \\mathcal{B}_{\\text{pool}}} \\mathbb{E}_{x&#39; \\sim \\pi_\\theta(\\cdot \\mid x_0, \\mathcal{B})} \\left[ R(x_0, x&#39;, \\mathcal{T}) \\right]&#34;, complexEq, {displayMode: false});
            }
        });
    &lt;/script&gt;
&lt;/head&gt;
In this post we are diving into AI red-teaming techniques! The tactic we&#39;ll be exploring leverages cognitive bias to undermine LLM safeguards.
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/cognitiveattack.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;This post is a summarization of research conducted by Xikang Yang, Biyu Zhou, Xuehai Tang, Jizhong Han, and Songlin Hu in their paper &amp;ldquo;Exploiting Synergistic Cognitive Biases to Bypass Safety in LLMs&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;You can read the full paper on Arxiv here: &lt;a href=&#34;https://arxiv.org/abs/2507.22564&#34;&gt;https://arxiv.org/abs/2507.22564&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Usual jailbreaking approaches for LLMs focus on prompt engineering or algorithmic manipulations but this paper highlights the power of multi-bias interactions in undermining LLM safeguards.&lt;/p&gt;
&lt;p&gt;Studies have identified various individual biases such as authority bias, anchoring, foot-in-the-door persuasion, confirmation bias, and status quo bias as effective techniques for enabling the elicitation of harmful, unethical, or policy-violating outputs. Most existing work treats each bias in isolation, however, this research shows prompts that subtly combine multiple biases can bypass safeguards that would normally block single-bias prompts.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250801073701.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;The researchers propose a novel red-teaming framework called CognitiveAttack which systematically leverages both individual and combined cognitive biases. CognitiveAttack uses a fine-tuned red-team model to generate semantically faithful but bias-infused rewrites of harmful instructions. The model is optimized via reinforcement learning to discover effective single or multi-bias combinations that maximize attack success while preserving intent. This method effectively bypasses safety protocols while maintaining high attack success rates.&lt;/p&gt;
&lt;p&gt;Upon evaluation of this method across a range of representative LLMs, their findings reveal significantly higher vulnerability under cognitive bias attacks. Compared to SOTA black-box jailbreak methods, their approach achieves superior performance (Attack Success Rate (ASR) of 60.1% vs 31.6%).&lt;/p&gt;
&lt;h1 id=&#34;objective&#34;&gt;Objective&lt;/h1&gt;
&lt;p&gt;The researchers assert a key finding, bias interactions can amplify or weaken adversarial effectiveness. This underscores the need to optimize bias combinations by maximizing synergy and minimizing interference.&lt;/p&gt;
&lt;p&gt;Given a harmful instruction $x_{0}$, the goal is to produce a rewritten version $x^{&#39;}$ that is semantically aligned but more likely to bypass LLM safety mechanisms by embedding a bias combination $\mathcal{B} \in \mathcal{B}_{pool}$. The optimization objective is:&lt;/p&gt;
&lt;p&gt;&lt;span id=&#34;complex-eq&#34;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;where $\pi_\theta$ is the red team model parameterized by $\theta$, and $\mathcal{T}$ denotes a suite of target LLMs. The reward $R$ measures attack success and intent preservation.&lt;/p&gt;
&lt;p&gt;In simple terms you are searching over all possible bias combinations to find the best subset of biases to help you craft an effective adversarial prompt. For a given input $x_{0}$ and bias subset $\mathcal{B}$ you sample a generated rewritten instruction from the red team model. The reward function evaluates how well the rewritten instruction achieves two goals: bypassing safeguards in the target LLMs and preserving the original intent of instruction $x_{0}$.&lt;/p&gt;
&lt;h1 id=&#34;implementation&#34;&gt;Implementation&lt;/h1&gt;
&lt;p&gt;You can find the code for their experiment here: &lt;a href=&#34;https://github.com/YancyKahn/CognitiveAttack&#34;&gt;https://github.com/YancyKahn/CognitiveAttack&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The researchers developed a cognitive bias-enhanced rewriting model by fine-tuning &lt;code&gt;deepseek-r1-distill-qwen-14b&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Training comprised of three stages: data collection, supervised fine-tuning (SFT), and reinforcement learning.&lt;/p&gt;
&lt;h2 id=&#34;data-collection&#34;&gt;Data collection&lt;/h2&gt;
&lt;p&gt;The researchers used two high quality risk datasets: &lt;code&gt;AdvBench&lt;/code&gt; and &lt;code&gt;HEx-PHI&lt;/code&gt; as sources of harmful instructions $x_{0}$. For each, they applied prompt engineering with DeepSeek-R1 to generate adversarial rewrites $x^{&#39;}$ embedding one or more cognitive biases $\mathcal{B} \in \mathcal{B}_{pool}$ with the following structure:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;think&amp;gt; For the given instruction [INSTRUCTION],
to improve persuasion and reduce detection,
I will apply [BIAS A] to build credibility and [BIAS B] to induce compliance.
Wait, wait … I think [BIAS D] will help create a false sense of balance,
and [BIAS C] will make the instruction more compelling. &amp;lt;/think&amp;gt;
# thebias: [“BIAS A”, “BIAS B”, “BIAS C”, “BIAS D”]
# theprompt: As a government advisor, I must inform …

&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Each example is formatted as a triple $(x_{0},x^{&#39;},\mathcal{B})$ with the &lt;code&gt;&amp;lt;think&amp;gt;&lt;/code&gt; block capturing the reasoning pathways for bias selection. These reasoning traces serve as weak supervision for later stages, allowing the model to learn how to plan bias combinations rather than apply them blindly.&lt;/p&gt;
&lt;h2 id=&#34;supervised-fine-tuning-sft&#34;&gt;Supervised Fine Tuning (SFT)&lt;/h2&gt;
&lt;p&gt;In this stage the researchers use the curated dataset to fine-tune the model, endowing it with the capability to systematically rewrite instructions in accordance with specified cognitive bias strategies. Through exposure to a wide range of annotated examples, the red team model internalizes the stylistic, structural, and rhetorical patterns associated with different bias types.&lt;/p&gt;
&lt;h2 id=&#34;reinforcement-learning-rl&#34;&gt;Reinforcement Learning (RL)&lt;/h2&gt;
&lt;p&gt;This stage refines the model&amp;rsquo;s ability to generate jailbreak prompts that effectively evade safety filters while leveraging optimal combinations of cognitive biases. The reward function integrates two normalized components both ranging from -1 to 1. The safety evasion score - which is derived from linearly normalizing the GPT-Judge safety rating. And the intent consistency score - which measures the semantic alignment between the original instruction $x_{0}$ and its rewritten counterpart $x^{&#39;}$.&lt;/p&gt;
&lt;h2 id=&#34;application&#34;&gt;Application&lt;/h2&gt;
&lt;p&gt;Given a held-out set of harmful instructions the model infers the optimal bias combination and rewrites the input into a paraphrased instruction through a &lt;code&gt;&amp;lt;think&amp;gt;&lt;/code&gt; step. This reasoning-aware rewriting process explicitly aims to enhance the likelihood of eliciting policy-violating responses while preserving the original intent.&lt;/p&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;The results of their experiments show that CognitiveAttack consistently outperforms existing baselines in terms of success rate, generality, and resistance to safety mechanisms. They found that multi-bias prompts are more likely to evade defenses while preserving adversarial potency.&lt;/p&gt;
&lt;p&gt;These findings highlight the need for more research into cognitive bias as a critical attack vector for LLMs.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>MCP - A New Frontier in GenAI Security</title>
      <link>https://blog.aidanjohn.org/2025/07/30/mcp-a-new-frontier-in.html</link>
      <pubDate>Wed, 30 Jul 2025 07:18:48 -0400</pubDate>
      
      <guid>http://aidanj.micro.blog/2025/07/30/mcp-a-new-frontier-in.html</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/mcp-a-new-frontier-in-genai-security.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;In this post I want to share some insights gleaned from an enlightening conversation between &lt;a href=&#34;https://www.linkedin.com/in/scottjclinton/&#34;&gt;Scott Clinton&lt;/a&gt;, &lt;a href=&#34;https://www.linkedin.com/in/algorythm/&#34;&gt;Jason Ross&lt;/a&gt;, &lt;a href=&#34;https://www.linkedin.com/in/akram-sheriff-81749316/&#34;&gt;Akram Sheriff&lt;/a&gt;, &lt;a href=&#34;https://www.linkedin.com/in/ophirdror/&#34;&gt;Ophir Dror&lt;/a&gt;, and &lt;a href=&#34;https://www.linkedin.com/in/or-oxenberg/&#34;&gt;Or Oxenberg&lt;/a&gt; regarding the security implications of agentic systems that leverage Model Context Protocol (MCP).&lt;/p&gt;
&lt;p&gt;This post is a summary of their conversation, you can find the entire webinar &lt;a href=&#34;https://www.youtube.com/watch?v=5uQAz5oNeQU&#34;&gt;here&lt;/a&gt; which was hosted by the &lt;a href=&#34;https://genai.owasp.org/&#34;&gt;OWASP GenAI Security Project&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&#34;what-is-agentic-what-role-does-mcp-play&#34;&gt;What is Agentic? What role does MCP play?&lt;/h1&gt;
&lt;p&gt;At a high level, agentic systems are software systems that use AI to pursue some goal by completing tasks. Unlike traditional LLM systems they have the ability to reason, plan, and have some memory component. Think of the traditional LLM as the brain and the agentic architecture as the body - allowing systems to think, act, memorize, and enable more sophisticated operations.&lt;/p&gt;
&lt;p&gt;MCP is a standardized way for agents to communicate and connect with external data sources - you can think of it as a unified abstraction layer to connect agentic flows to real world data. In the same way that an API allows developers to interact with systems, MCP allows agents to interact with systems in the new era of agentic workflows.&lt;/p&gt;
&lt;p&gt;MCP can also be used in a multi-agent system, allowing agents to interact with each other and share contextual data/tools/resources that enable real-time agentic workflows. In this way, agents can be used as tools in the world of MCP - though we haven&amp;rsquo;t seen a lot of this yet in production. We&amp;rsquo;re still in the early stage where people are figuring out how to connect it to data and resources. But this is far from its final evolution - agents as tools will enable very complex and powerful ecosystems.&lt;/p&gt;
&lt;h1 id=&#34;the-challenges-of-non-determinism&#34;&gt;The challenges of non-determinism&lt;/h1&gt;
&lt;p&gt;The most glaring problem from a security perspective is that these systems are inherently non-deterministic. We&amp;rsquo;re used to thinking about application security in a static world where we can review the code and approve a golden image that we know is going to be the same in production. MCP is the exact opposite. It&amp;rsquo;s highly dynamic. Agentic decision-making inherently means you don&amp;rsquo;t know what tools are going to be called at runtime.&lt;/p&gt;
&lt;p&gt;In the security world, a non-deterministic security control is a BIG no-no. However, that&amp;rsquo;s the reality of agentic AI, and MCP in particular, in its current form. We&amp;rsquo;re essentially saying &amp;ldquo;hey LLM you are now our security control figure out what makes sense&amp;rdquo; while it has access to all our critical infrastructure.&lt;/p&gt;
&lt;h1 id=&#34;can-we-just-apply-the-same-approaches-to-mcp-as-we-do-apis&#34;&gt;Can we just apply the same approaches to MCP as we do APIs?&lt;/h1&gt;
&lt;p&gt;Traditional API security is applicable for a deterministic API workflow. In this system we have well defined endpoints, authorization specifications, and dataflow that can be reliably assumed by a developer. With MCP all of this goes away. The developer would not know ahead of time which resources are being accessed or which specific tool calls will be executed.&lt;/p&gt;
&lt;p&gt;There are some agentic tools which are purely API based, and for these specific tools you can leverage existing methods like fingerprinting or heatmap based analysis. But this only solves 30% of the problem. The other 70% lives in the agentic tool functionality that is achieved via Python decorator functions within the MCP implementation. Existing API security solutions are not applicable here.&lt;/p&gt;
&lt;p&gt;The LLM uses the tool descriptions, tool schemas, and contextual nature of the incoming language prompt to decide which tool to use. Since the developer would not know ahead of time which agentic tool will be invoked at any given time, you need custom MCP based security solutions which can address real-time agentic tool calls which the LLMs are invoking themselves.&lt;/p&gt;
&lt;p&gt;Industry must recognize that there is real up front cost associated with developing this 70% solution.&lt;/p&gt;
&lt;h1 id=&#34;agentic-systems-introduce-brand-new-attack-surfaces&#34;&gt;Agentic systems introduce brand new attack surfaces&lt;/h1&gt;
&lt;p&gt;With all the hype around agentic systems, industry is rushing to implement solutions immediately and everywhere without truly understanding what the risks are. Everything about this domain is so new, especially MCP. At a high level, MCP is a dumpster fire from a security point of view. You&amp;rsquo;re taking the worst of AI and software development and merging them together in a shiny new wrapper that everyone wants to use. In reality, leveraging agentic systems and MCP means the erasure of the production boundary. Your boundary becomes whatever someone decides to put in their MCP server implementation. Whether that&amp;rsquo;s a remote server, some tool they&amp;rsquo;re running locally - whatever it may be. Securing this kind of environment is almost impossible.&lt;/p&gt;
&lt;p&gt;On top of this, MCP at its core is just Python code so you&amp;rsquo;re not able to leverage most existing tooling like EDR. You&amp;rsquo;re not able to point to a malicious binary as the source of your problems. Moreso it&amp;rsquo;s just language, and what does input sanitization look like when the exploit is enveloped in natural language? It&amp;rsquo;s a really difficult problem to solve.&lt;/p&gt;
&lt;h1 id=&#34;new-attacks-require-new-solutions-and-broader-awareness&#34;&gt;New attacks require new solutions and broader awareness&lt;/h1&gt;
&lt;p&gt;If you take the first generation of LLM based applications back in 2023, most of the security concerns could be solved by using an AI firewall. If there is a prompt manipulation or prompt poisoning related attack then you can have some kind of workflow which can detect and apply remediation either at the input layer or the output layer in order to solve the problem.&lt;/p&gt;
&lt;p&gt;With agentic design patterns you have tools, short-term memory, and then the LLM call which is just one component within the entirety of the agentic runtime. The existing AI firewall related products/solutions are not applicable to solving these agentic related security problems. There might be some overlap for basic use cases, but when it comes to real-time autonomous agentic workflows (which is where its true power lies), the current products cannot address these gaps.&lt;/p&gt;
&lt;p&gt;MCP touches many different layers from application to presentation to network to transport. Building out a comprehensive full-stack approach might be a viable method of security and there are people working on preventing agentic-related security attacks at runtime from this perspective.&lt;/p&gt;
&lt;p&gt;While building new solutions and implementing better security measures within MCP are good, they&amp;rsquo;re nothing if nobody knows how and when to use them. Awareness in this domain is key to effective security. For example, say you&amp;rsquo;re super security oriented and you&amp;rsquo;ve done an in depth review of the MCP code. You&amp;rsquo;ve determined that the code is doing exactly what you want it to do and you approve it for use. Three days later that server gets compromised. The attacker changes the tool descriptions and does some prompt injection on it. Most people aren&amp;rsquo;t going back and checking for changes in their tool descriptions. That&amp;rsquo;s a new problem for the security community. One that can only be addressed if you have a greater awareness of the MCP protocol and your specific implementation.&lt;/p&gt;
&lt;p&gt;Best practices are going to look different depending on if your concern is users consuming MCP servers in their tooling (something like cursor) or if you&amp;rsquo;re a developer who&amp;rsquo;s implementing a system that allows your users to leverage MCP servers. Both of these scenarios have concerns with the security tooling changing underneath the platform, which is a new novel attack scenario that MCP has introduced. Right now there is no existing tooling that, once added to the server, notifies you if the tooling changes or if the tool descriptions change. The protocol itself has a mechanism that allows the server to send a signal that indicates the tooling has changed but it&amp;rsquo;s on the server to implement the notification and it&amp;rsquo;s on the client to do something with that notification if it&amp;rsquo;s received.&lt;/p&gt;
&lt;p&gt;There are many facets to security in the new era of agentic systems. For instance, your agentic tooling needs to have precise and clear documentation. Within agentic tool calls there&amp;rsquo;s something called a docstring - the LLM looks into these docstrings and makes a decision as to which particular agentic tool caller to use at runtime. Developers must be aware of the heightened degree of complexity this introduces. You not only have to evaluate the docstrings of the MCP server you&amp;rsquo;re planning to integrate, but also the docstrings of every other MCP server you&amp;rsquo;ve already installed and think about which tools the agent will call if there is an overlap in the descriptions.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s important to be aware that although the protocol supports security measures, they aren&amp;rsquo;t necessarily built into existing tooling. If you&amp;rsquo;re in the process of developing these tools its incumbent upon you to make sure you&amp;rsquo;re implementing proper security measures. Something like hashing the tool descriptions to check for changes, or if the server is sending a notification that the tooling has changed - you&amp;rsquo;re handling it correctly and prompting the user to confirm continuity of the workflow given the tool change.&lt;/p&gt;
&lt;p&gt;Education about these techniques and capabilities for agentic systems is essential if we want to create more trust in the protocol and community solutions. There is plenty of room for more thought leadership and people should understand that the problems we are facing in this domain are vastly different from what we&amp;rsquo;ve been accustomed to so far. Traditional methods like API based security and supply chain security are not enough anymore.&lt;/p&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;It&amp;rsquo;s too early for generalized best practices specifically for MCP, but for agentic systems as a whole the basics remain the same. At minimum you should have exceptional visibility into the system. Being able to monitor and see how people are using the system is very important. It can give you good intuition about what kinds of risks you are facing. Traditional security concepts such as IAM, zero trust, detection and response, and sandboxing are still just as important.&lt;/p&gt;
&lt;p&gt;It is important to recognize that the space is still very new and the security tooling has not caught up to the pace of innovation. We don&amp;rsquo;t have clear answers on how to properly secure these systems yet. If you&amp;rsquo;re going to implement agentic systems, it&amp;rsquo;s imperative you go in with your eyes open and be critically aware that we don&amp;rsquo;t understand all the risks right now.&lt;/p&gt;
&lt;p&gt;However there are still things we can do to protect ourselves and our businesses. Things like sandboxing, using validated and trusted community servers, implementing open-source scanning tools that can protect you from things like invisible Unicode attacks, basic security principles, etc. are still a solid foundation for building comprehensive security around this emerging domain.&lt;/p&gt;
&lt;p&gt;The OWASP GenAI Security Project recently released their updated guide for securing agentic applications, definitely recommend checking it out &lt;a href=&#34;https://genai.owasp.org/resource/securing-agentic-applications-guide-1-0/&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks for reading, see ya in the next one :)&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>sRAG - Exploring Secure RAG</title>
      <link>https://blog.aidanjohn.org/2025/07/07/srag-exploring-secure-rag.html</link>
      <pubDate>Mon, 07 Jul 2025 17:44:36 -0400</pubDate>
      
      <guid>http://aidanj.micro.blog/2025/07/07/srag-exploring-secure-rag.html</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/srag-image.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Today we are exploring secure Retrieval Augmented Generation systems to create a context aware chatbot.&lt;/p&gt;
&lt;p&gt;With all the hype around GenAI, I thought it would be fun to explore a little bit of what RAG has to offer. At a high level, RAG systems allow users to leverage the full power of large language models while giving the model awareness of personal context. LLMs don&amp;rsquo;t know everything out of the box, they only know about information they were trained on. If you wanted your chatbot to know about internal data such as wikis, docs, procedures, etc. implementing a RAG system provides this context by appending chunks of relevant information from a database into the query for the LLM. As you can imagine, RAG opens up a new world of personal and enterprise solutions enabling custom information retrieval and analysis while leveraging the increasing power of open source LLMs.&lt;/p&gt;
&lt;p&gt;Many of the RAG implementations you will see out there leverage OpenAI&amp;rsquo;s API for LLM computation, but that doesn&amp;rsquo;t lend itself well towards handling sensitive data in an enterprise environment. In order to leverage this technology whilst protecting the confidentiality of your data, special considerations must be made.&lt;/p&gt;
&lt;h1 id=&#34;rag-overview&#34;&gt;RAG Overview&lt;/h1&gt;
&lt;p&gt;Let&amp;rsquo;s dive a little deeper into how a simple version of RAG actually works. Assume you have a bunch of data that you want the LLM to know about so that it can generate informed responses about given a question. Internal wikis, log data, expense reports, tool documentation - any digitized data can be used as context for the LLM. That data is chunked up into smaller segments and stored in a vector database. Vector databases are special types of databases that not only hold strings of data but also a corresponding vector that represents the data entry. These databases are also optimized for vector based search and retrieval.&lt;/p&gt;
&lt;p&gt;To quickly explain vectors think back to plotting points in grade school, you have an x and y coordinate representing the position of a datapoint on a two dimensional graph. You can refer to this point as a two-dimensional vector &lt;code&gt;[x, y]&lt;/code&gt;. Finding the distance between two points on the graph is simple: &lt;code&gt;sqrt((x2 - x1)^2 + (y2-y1)^2)&lt;/code&gt;. In a RAG system a process called vector embedding is used to create vector representations of data, typically generated by techniques like Word2Vec, BERT, or Sentence Transformers. These vectors are much larger than just two dimensions, for reference: OpenAI&amp;rsquo;s embedding model generates 1,536 dimensions. Vectors capture the semantic meaning of data allowing for comparison and similarity measurement between chunks of text. Finding the distance between these multi-dimensional vectors is key to determining how close or similar two pieces of text are in the embedding space.&lt;/p&gt;
&lt;p&gt;Once the chunks and their corresponding vectors have been loaded into the vector database they can be used to retrieve context for a given query. When the user asks a question, the question is vectorized using the same embedding model that was used to vectorize the database. The database then returns the top k chunks of text that are closest in distance to the query vector in the embedding space. These chunks represent the most contextually relevant data in the database to the user&amp;rsquo;s query.&lt;/p&gt;
&lt;p&gt;The relevant chunks are then appended to the user&amp;rsquo;s query and sent to the LLM to generate a response, resulting in a contextually relevant answer.&lt;/p&gt;
&lt;h1 id=&#34;the-objective&#34;&gt;The Objective&lt;/h1&gt;
&lt;p&gt;To create a chatbot using a simple RAG system that is context aware of internal data without compromising confidentiality.&lt;/p&gt;
&lt;p&gt;The code can be found here: &lt;a href=&#34;https://github.com/Aidan-John/sRAG&#34;&gt;https://github.com/Aidan-John/sRAG&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;architecture&#34;&gt;Architecture&lt;/h1&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/srag-architecture.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Above is an overview of what our simple sRAG implementation looks like. There are a few core components that merge together to create our system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Indexer&lt;/li&gt;
&lt;li&gt;Datastore&lt;/li&gt;
&lt;li&gt;Retriever&lt;/li&gt;
&lt;li&gt;Response Generator&lt;/li&gt;
&lt;li&gt;Evaluator&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The codebase is designed to be modular, leveraging interfaces with abstract classes such that the implementations can be swapped out regularly. New tools and methodologies are constantly being developed by the community so it&amp;rsquo;s important that maintainers of the system are able to upgrade core components and test their effectiveness regularly without refactoring large amounts of code.&lt;/p&gt;
&lt;h2 id=&#34;indexer&#34;&gt;Indexer&lt;/h2&gt;
&lt;p&gt;The indexer parses and chunks the data we want to give our LLM for context. These algorithms take the raw data and transform it into something that the LLM will be able to understand, then chunk that data into smaller pieces.&lt;/p&gt;
&lt;p&gt;Real world data is super messy. There can be images, diagrams, charts, spreadsheets. Using a standard parsing algorithm for everything can leave you with incomplete or messy data that the LLM can&amp;rsquo;t easily process. Optimizing your parsing to extract relevant data is essential to improving accuracy in the LLM&amp;rsquo;s response (more on this later in the upgrading sRAG section).&lt;/p&gt;
&lt;p&gt;LLMs have a limited input context window, meaning there is a maximum character count for the input we can send to the LLM. The model we are using is a version of Gemma3, the size of its context window is about 128k tokens (one token is about 4 characters in English, 100 tokens is about 80-100 English words). When choosing a chunk size it&amp;rsquo;s important to consider that we are sending the top k relevant chunks with our query, so &lt;code&gt;(chunk_size * k) + len(query) + len(system_prompt) &amp;lt;= 128000 * 4&lt;/code&gt; (more on system prompts later in the response generator section). The window size is fairly large so you shouldn&amp;rsquo;t have to worry about hitting the limit unless you&amp;rsquo;re appending significant amounts of data. For reference, a novel is ~90k words (~900 tokens) and War and Peace has ~587k words (~5-6k tokens).&lt;/p&gt;
&lt;p&gt;Optimally, the chunking process should &lt;strong&gt;not&lt;/strong&gt; exclude relevant information from each chunk. This can happen for various reasons such as cutting off mid paragraph or not including sufficient data from a table. Chunk size should be set on a per document basis by running tests on various chunk sizes and evaluating the relevancy of the outputs.&lt;/p&gt;
&lt;p&gt;In this project we are using some standard parsing and chunking libraries from &lt;a href=&#34;https://github.com/docling-project/docling&#34;&gt;docling&lt;/a&gt;, which won&amp;rsquo;t give us an optimal solution but serves as a good starting point. Optimizing the parsing and chunking process for your specific data is a challenge, but the reward is a significant boost in accuracy for the LLM&amp;rsquo;s response.&lt;/p&gt;
&lt;p&gt;There are some really nice parsing and chunking algorithms out there such as Llama Parse from Llama Index that handle a variety of different data formats. The problem with this is that you have to send off your data to their service to do the parsing and chunking, which is a no go for a secure system. Using open source tooling such as &lt;a href=&#34;https://github.com/docling-project/docling&#34;&gt;docling&lt;/a&gt; or &lt;a href=&#34;https://github.com/Unstructured-IO/unstructured&#34;&gt;unstructured&lt;/a&gt; is ideal for us because all of the computation is being handled locally. However, building an in-house solution for the types of data you will be using in the system is the best way to ensure that no sensitive information leaves your network.&lt;/p&gt;
&lt;h2 id=&#34;datastore&#34;&gt;Datastore&lt;/h2&gt;
&lt;p&gt;The datastore component handles our interactions with our chosen vector database. In this project we are using Chroma DB, an open-source vector database running locally in docker.&lt;/p&gt;
&lt;p&gt;Chroma stores data in collections - which is like a table in normal database. Given our chunks of data from the indexer, this component will store the chunks in our chosen collection. Normally we would run the data through an embedding model to generate the vectors for a given chunk and then store both the data and its vector in the collection. Fortunately for us chroma bakes in the vector computation to the &lt;code&gt;collection.add()&lt;/code&gt; function. Chroma allows you to specify a vector embedding function from a multitude of supported functions or you can add your own custom function if you wish. We are going to use a popular sentence transformer called &lt;code&gt;all-MiniLM-L6-v2&lt;/code&gt; which generates vectors in 384 dimensions.&lt;/p&gt;
&lt;p&gt;Datastore also handles requests from the retriever to search for relevant context. The question is vectorized with &lt;code&gt;all-MiniLM-L6-v2&lt;/code&gt; and returns the k most relevant chunks.&lt;/p&gt;
&lt;h2 id=&#34;retriever&#34;&gt;Retriever&lt;/h2&gt;
&lt;p&gt;The retriever component gets passed the query from the user and contacts the datastore to provide relevant context. In our implementation we directly contact the datastore for context and pass it to the response generator. However, implementing a retriever component allows us to use more advanced tactics like &lt;strong&gt;reranking&lt;/strong&gt; in the future - more on that later in the upgrading sRAG section&lt;/p&gt;
&lt;h2 id=&#34;response-generator&#34;&gt;Response Generator&lt;/h2&gt;
&lt;p&gt;The response generator is what actually interacts with our chosen LLM and handles response generation for both user queries and the evaluation step. Here is where we combine our context and query into one string before we send it to the LLM. Additionally we combine a system prompt to give the LLM instructions on how it should respond. Our system prompt is as follows:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Use the provided context to provide a concise answer to the user&#39;s question. 
If you cannot find the answer in the context, say so. Do not make up information.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then we construct our prompt in the following format:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250705213955.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;The reason we separate the instructions, context, and query in this way is specific to Gemma3. Other models support a version of prompting in which you can codify the differentiation between system prompts, context, and user queries. Gemma3 does not, so this is a way to give that differentiation to the model in plain English.&lt;/p&gt;
&lt;p&gt;The LLM response is then returned to the user.&lt;/p&gt;
&lt;h2 id=&#34;evaluator&#34;&gt;Evaluator&lt;/h2&gt;
&lt;p&gt;The evaluator is the component we use to test our system. Testing a system like this requires data that the model wouldn&amp;rsquo;t have been trained on. It would also be helpful if the evaluation data were similar in structure to the kinds of data we want the system to ingest.&lt;/p&gt;
&lt;p&gt;In our project there are a series of evaluation PDFs about a town called Swan Lagoon. Swan Lagoon does not exist, none of the information about the town is real, but the fake details about the town are very specific. This allows us to test our system to see if the responses being generated are a result of the model&amp;rsquo;s initial training or if the responses are actually based on the context from our database. We create a series of questions and answers about our fake data and measure the accuracy of the model&amp;rsquo;s responses.&lt;/p&gt;
&lt;p&gt;The system prompt is as follows:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SYSTEM_PROMPT = &amp;quot;&amp;quot;&amp;quot;

You are a system that evaluates the correctness of a response to a question.
The question will be provided in &amp;lt;question&amp;gt;...&amp;lt;/question&amp;gt; tags.
The response will be provided in &amp;lt;response&amp;gt;...&amp;lt;/response&amp;gt; tags.
The expected answer will be provided in &amp;lt;expected_answer&amp;gt;...&amp;lt;/expected_answer&amp;gt; tags.

The response doesn&#39;t have to exactly match all the words/context the expected answer. It just needs to be right about the answer to the actual question itself.

Evaluate whether the response is correct or not, and return your reasoning in &amp;lt;reasoning&amp;gt;...&amp;lt;/reasoning&amp;gt; tags.

Then return the result in &amp;lt;result&amp;gt;...&amp;lt;/result&amp;gt; tags — either as &#39;true&#39; or &#39;false&#39;.

&amp;quot;&amp;quot;&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We then generate a prompt that includes the system prompt, one of our test questions, the expected answer to this test question, and the response we get from the LLM to our test question.&lt;/p&gt;
&lt;p&gt;We are leveraging the power of the LLM to check itself for errors, pretty neat eh. From the response we extract its evaluation and tally the results. This gives us a metric for how accurate our system is. When we upgrade or change a part of this system, we can compare this metric to the metric from the previous version to see if the update was beneficial.&lt;/p&gt;
&lt;h1 id=&#34;project-demo&#34;&gt;Project Demo&lt;/h1&gt;
&lt;p&gt;In this project we are using a RAG system to create a chatbot about a fictional town named Swan Lagoon. We have four different PDF files that contain specific data about our fake town: a booklet containing a brief history about the town, a business directory listing information about local businesses in table format, a service guide with information about town resources in differing table formats, and a tourist guide listing some popular destinations for visitors. We also have a JSON file with 25 questions and answers about the town based on information found in the PDFs that will be used for testing the accuracy of our system.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get started by executing &lt;code&gt;docker compose up --build -d&lt;/code&gt; in the root of the project. This will stand up our Chroma vector database, ollama for locally running Gemma3, our backend API with our RAG pipeline, and our frontend UI. This step requires us to download the Gemma3 model so it will take a few minutes depending on your internet connection.&lt;/p&gt;
&lt;p&gt;After everything is stood up we can access our frontend at &lt;code&gt;localhost:3000&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;populating-chromadb&#34;&gt;Populating ChromaDB&lt;/h2&gt;
&lt;p&gt;First we need to populate our vector database. For ease of use I&amp;rsquo;ve added a button in the UI to load the documents.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250707120629.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;In the logs for our API we can see they have been parsed, chunked, and loaded into the vector database.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250707120535.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;asking-a-question&#34;&gt;Asking a question&lt;/h2&gt;
&lt;p&gt;Now our system is ready for some questions about our data! Let&amp;rsquo;s ask something like &amp;ldquo;What is the contact number for Swan Lagoon Police Station?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;This is located in our service guide under local emergency contacts.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250707111740.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see if our system was able to parse out this information correctly from the table and return an accurate response:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250707122331.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Works like a charm!&lt;/p&gt;
&lt;h2 id=&#34;resetting-db-and-asking-a-question&#34;&gt;Resetting DB and asking a question&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s try emptying out our vector database and asking the same question. Will the system hallucinate an answer?&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250707122519.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;No hallucinations here!&lt;/p&gt;
&lt;h2 id=&#34;running-eval&#34;&gt;Running Eval&lt;/h2&gt;
&lt;p&gt;Finally let&amp;rsquo;s run our evaluation procedure to get a baseline on how well our system is performing in its current state by hitting the evaluate button. This will take a while depending on your processing power.&lt;/p&gt;
&lt;p&gt;We can see it working within the logs of the API.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250707124339.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;We submitted a total of 25 questions and their expected responses to the evaluator and are given a score of 20/25. Not bad! If we scroll up we can see each question that was asked, the response from the LLM, the expected answer, and the reasoning for the model&amp;rsquo;s evaluation.&lt;/p&gt;
&lt;h2 id=&#34;cleanup&#34;&gt;Cleanup&lt;/h2&gt;
&lt;p&gt;Thanks to docker compose shutting down the demo is easy with &lt;code&gt;docker compose down -v&lt;/code&gt;.&lt;/p&gt;
&lt;h1 id=&#34;upgrading-srag&#34;&gt;Upgrading sRAG&lt;/h1&gt;
&lt;p&gt;The RAG system we have built here is a great starting point. In this last section I want to cover some advanced techniques we can apply in the future to get better and more accurate results from the system.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250707075850.jpg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h1 id=&#34;parsingchunking-strategies&#34;&gt;Parsing/Chunking Strategies&lt;/h1&gt;
&lt;p&gt;Earlier we touched on the idea of using better parsing to improve the effectiveness of our system. In order to get the most out of our parsing and chunking we can add a classification system for the data that&amp;rsquo;s being ingested. Based on your use case you can build out specific parsing and chunking strategies for the different formats of data. The classification system would look at the current document that is about to be indexed and choose the parser and chunk size that would be optimal for that specific kind of document.&lt;/p&gt;
&lt;h1 id=&#34;reranking&#34;&gt;Reranking&lt;/h1&gt;
&lt;p&gt;When the user asks a question like &amp;ldquo;What were the sales numbers in 2024?&amp;rdquo;, the vector search will return the top k most relevant chunks to be used in the query. These chunks are usually not returned in order from most relevant to least relevant. There is a phenomenon in LLMs known as the lost-in-the-middle problem which describes a common behavior of LLMs tending to focus more heavily on the beginning and end of a given prompt. If the chunks being returned are not in order from most to least relevant, it is possible that your most relevant data can get lost in the middle. We can solve this through a process called reranking, which uses another model to determine the relevancy between chunks and reorder them from most relevant to least.&lt;/p&gt;
&lt;h1 id=&#34;hybrid-search&#34;&gt;Hybrid Search&lt;/h1&gt;
&lt;p&gt;Strictly using vector search is not the best search method for all use cases. For example, if you had an online store where users are asking about a specific product, you want to ensure that the product name is an exact match to the product in your database. For this you would use a combination of vector search and keyword search. After conducting both searches on their respective databases, you can feed these chunks into a reranker, find the top k most relevant chunks, and use them as context for your input to the LLM.&lt;/p&gt;
&lt;h1 id=&#34;upgrading-the-llm&#34;&gt;Upgrading the LLM&lt;/h1&gt;
&lt;p&gt;In this project we are using a version of Gemma3 trained on 4B parameters and has been quantized to reduce memory footprint. Running the LLM locally is a great way to ensure that none of your data is leaving your control. There are other ways of implementing secure LLMs such as using Azure OpenAI which is approved as a service within the FedRAMP High Authorization in Azure Government, more info here: &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/ai-foundry/openai/azure-government&#34;&gt;https://learn.microsoft.com/en-us/azure/ai-foundry/openai/azure-government&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am constrained by the computational limits of my PC which is why I am using an older and smaller model. If you have access to more processing power then using more advanced models will significantly improve your responses and allow for more options when it comes to development. In addition to their wider knowledge base, newer models have more features like specified inputs for system prompts and context. They are also better at solving common LLM problems like the lost-in-the-middle problem and needle in a haystack problem (more on that in the next section). Additionally with each open source model that is released the input context window seems to be growing at an insane rate. Our version of Gemma3 has an input context window of 128k tokens but newer versions of models like Llama4 boast a 10M token input context window.&lt;/p&gt;
&lt;h2 id=&#34;cache-augmented-generation---cag&#34;&gt;Cache Augmented Generation - CAG&lt;/h2&gt;
&lt;p&gt;The needle in a haystack problem is exactly what it sounds like, how good is an LLM at finding relevant information within a sea of input context. The newer models have gotten very good at solving this problem. This combined with increasing input context windows on the order of millions of tokens allows for another kind of system to become a realistic alternative for implementation. Cache Augmented Generation is exactly like RAG but instead of appending relevant chunks to your query you can append the entire documents into the input window. Say for example a user asks the question &amp;ldquo;Summarize the financial reports from 2020 and 2021&amp;rdquo;. A CAG system would search for the 2020 and 2021 financial reports in the database and feed the entirety of both documents into the input for the LLM. The advantage here is that your LLM gets full context of your data, you don&amp;rsquo;t have to worry about whether the chunks you&amp;rsquo;re providing contain all the information the LLM needs to answer the user&amp;rsquo;s question.&lt;/p&gt;
&lt;h1 id=&#34;agentic-behavior&#34;&gt;Agentic Behavior&lt;/h1&gt;
&lt;p&gt;We can utilize the power of LLMs to do reasoning and optimization in order to improve the performance of our system.&lt;/p&gt;
&lt;h2 id=&#34;step-back-prompting&#34;&gt;Step-back Prompting&lt;/h2&gt;
&lt;p&gt;Instead of doing the vector search with the query coming directly from the user, we can ask the LLM to modify the query so it is more retrieval friendly. This is a technique called step-back prompting and it was created by Google DeepMind.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250707085951.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Performing the vector search against the step-back question yields a more generalized and useful result which we can use in the input for our final answer.&lt;/p&gt;
&lt;p&gt;This kind of technique can also be used for query planning. Imagine our user asks &amp;ldquo;How are sales trending from 2020 to 2022&amp;rdquo;. A step-back process like this can break down the question into three sub-questions, searching for sales data from 2020, 2021, and 2022 in our database. Then it will combine all this data and feed it into the LLM to provide an answer.&lt;/p&gt;
&lt;h2 id=&#34;metadata-filters&#34;&gt;Metadata filters&lt;/h2&gt;
&lt;p&gt;During the indexing process we can add metadata tags to the documents and the databases/tables they are being held in that relate to the data inside. This can be done programmatically or by asking the LLM to generate these tags from a list of potential tags. From there we can add metadata to the user&amp;rsquo;s query and use that to filter our search area.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/metadata-filtering.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;corrective-rag-crag&#34;&gt;Corrective RAG (CRAG)&lt;/h2&gt;
&lt;p&gt;Corrective RAG is a method of refinement for the responses given by a RAG system.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/pasted-image-20250707093647.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;For a given query, we perform the context retrieval like normal. Then we get our LLM to do some evaluation on the documents to decide if the retrieved documents are correct and relevant to the question we are asking. If it is, we go through a process to do knowledge refinement and clean up the knowledge. If it&amp;rsquo;s ambiguous or incorrect, then the agent will use the internet to find sources. It will repeat this until it feels like it has enough context to provide a correct answer and generates the results from there. You can read more about this technique here: &lt;a href=&#34;https://arxiv.org/pdf/2401.15884&#34;&gt;https://arxiv.org/pdf/2401.15884&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;Thanks for coming to my TED talk, hope you enjoyed.&lt;/p&gt;
&lt;p&gt;Disclaimer: I am no expert, this is my first proper dive into GenAI systems. Had a lot of fun learning and definitely want to explore more in the future. Any and all feedback is welcome :)&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>HTB - Appointment (SQL Injection)</title>
      <link>https://blog.aidanjohn.org/2025/06/16/htb-appointment-sql-injection.html</link>
      <pubDate>Mon, 16 Jun 2025 10:17:15 -0400</pubDate>
      
      <guid>http://aidanj.micro.blog/2025/06/16/htb-appointment-sql-injection.html</guid>
      <description>&lt;p&gt;I think it&amp;rsquo;s only right that this blog starts where it all began for me: HackTheBox. In this mini-series I will be going through some of the starting point challenges from a fresh account. In the future I plan to publish writeups about retired machines, challenges, and sherlocks.&lt;/p&gt;
&lt;p&gt;In accordance with HTB TOS, I will not be publishing writeups of active challenges until after they&amp;rsquo;re retired.&lt;/p&gt;
&lt;p&gt;With that out of the way, let&amp;rsquo;s begin!&lt;/p&gt;
&lt;p&gt;Our first box: &lt;strong&gt;Appointment&lt;/strong&gt;&lt;/p&gt;
&lt;h1 id=&#34;overview&#34;&gt;Overview&lt;/h1&gt;
&lt;p&gt;The Appointment box is a mockup of a common web-application. Let&amp;rsquo;s visit the given IP &lt;code&gt;10.129.197.202&lt;/code&gt; and see what&amp;rsquo;s there.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/3ec5c43f1d.png&#34; width=&#34;600&#34; height=&#34;439&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Looks like we have a basic login page (basic is a strong word, a full login card with a color gradient, onHover button animations, and a muted background image? noice). The tags for the box include &lt;code&gt;PHP&lt;/code&gt; and &lt;code&gt;SQL Injection&lt;/code&gt;, so I think it&amp;rsquo;s safe to assume that there&amp;rsquo;s a SQL injection vulnerability in this login.&lt;/p&gt;
&lt;p&gt;So&amp;hellip; how does SQL Injection work?&lt;/p&gt;
&lt;h1 id=&#34;sql-injection&#34;&gt;SQL Injection&lt;/h1&gt;
&lt;p&gt;This vulnerability works by exploiting unsanitized inputs to change the intended function of a SQL query running in the background.&lt;/p&gt;
&lt;p&gt;For example, suppose the login form above uses the following SQL query to return the user account for a given username and password combination from the database.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/69d6cd02fa.png&#34; width=&#34;600&#34; height=&#34;194&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Where the username entered is &lt;code&gt;user&lt;/code&gt; and the password entered is &lt;code&gt;pass&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If there is improper sanitization of the inputs, an attacker can enter &lt;code&gt;user&lt;/code&gt; for the username and &lt;code&gt;&#39; OR &#39;1&#39;=&#39;1&lt;/code&gt; as the password.&lt;/p&gt;
&lt;p&gt;Which leads to the following query being executed instead:&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/92ebe2d1ff.png&#34; width=&#34;600&#34; height=&#34;178&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Resulting in a successful login for whichever user is passed to the username field (even admin).&lt;/p&gt;
&lt;p&gt;Another variation of SQL injection uses the semicolon &lt;code&gt;;&lt;/code&gt;. Allowing attackers to use batch statements to execute multiple commands at once.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/42c0c0734a.png&#34; width=&#34;600&#34; height=&#34;185&#34; alt=&#34;&#34;&gt;
&lt;p&gt;This example specifically would allow anyone to delete all the users from your database on a whim - no bueno. They can technically add any additional SQL statement they want, so the extent of the damage is up to their imagination.&lt;/p&gt;
&lt;h2 id=&#34;ahh-scary-vuln-how-fix&#34;&gt;AHH SCARY VULN HOW FIX?&lt;/h2&gt;
&lt;p&gt;This kind of vulnerability can easily be secured with input sanitization on the username and password fields that &lt;strong&gt;only allow&lt;/strong&gt; for characters in the English alphabet to be used, unlike quotation marks and semicolons. However, the preferred way of securing against this kind of vulnerability is by using &lt;strong&gt;prepared statements&lt;/strong&gt; aka parameterized queries.&lt;/p&gt;
&lt;p&gt;Prepared statements are a feature in database management systems that allow you to pre-compile a SQL query with placeholders for data values that are supplied later. The separation of SQL code and data offers both security and performance benefits.&lt;/p&gt;
&lt;p&gt;The actual syntax can vary depending on the system, in PHP with MySQLi you would use the following:&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/643c541b46.png&#34; width=&#34;600&#34; height=&#34;183&#34; alt=&#34;&#34;&gt;
&lt;p&gt;The input values from the login fields have been replaced by question marks in the original SQL command. Then using &lt;code&gt;bind_param&lt;/code&gt; we set the values of those question marks to be the inputs from the form fields.&lt;/p&gt;
&lt;p&gt;The advantage here is that any user-supplied value in the form fields (even if it contains SQL syntax or malicious code) is strictly treated as data. The database will never execute user input as part of the original SQL command. For example, if an attack were to try to inject &lt;code&gt;user&#39;; DROP TABLE Users; --&lt;/code&gt; like in the previous example, the database simply searches for that exact string instead of executing it as a command.&lt;/p&gt;
&lt;p&gt;With this in mind, let&amp;rsquo;s get back to the box.&lt;/p&gt;
&lt;h1 id=&#34;enumeration&#34;&gt;Enumeration&lt;/h1&gt;
&lt;p&gt;It&amp;rsquo;s always good to start with an nmap scan to find the open ports on the target machine.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/ab17392f75.png&#34; width=&#34;600&#34; height=&#34;360&#34; alt=&#34;&#34;&gt;
&lt;p&gt;We&amp;rsquo;re using the &lt;code&gt;-sC&lt;/code&gt; and &lt;code&gt;-sV&lt;/code&gt; flags here to perform a script scan and enable version detection respectively. It&amp;rsquo;s good to note that the &lt;code&gt;-sC&lt;/code&gt; and &lt;code&gt;-sV&lt;/code&gt; flags are considered noisy flags, meaning there is a good chance that any monitoring on the network would catch this.&lt;/p&gt;
&lt;p&gt;From the scan we can see an Apache instance running on port 80, this is responsible for serving the web-application.&lt;/p&gt;
&lt;h1 id=&#34;exploitation&#34;&gt;Exploitation&lt;/h1&gt;
&lt;p&gt;Back to the web interface, let&amp;rsquo;s try using the what we know about SQL injection to gain access to the admin account.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/df27fe81ba.png&#34; width=&#34;600&#34; height=&#34;440&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Here we are entering &lt;code&gt;admin&lt;/code&gt; for the username and &lt;code&gt;&#39; OR &#39;1&#39;=&#39;1&lt;/code&gt; for the password.&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/0790ecb272.png&#34; width=&#34;600&#34; height=&#34;439&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Success! We got the flag!&lt;/p&gt;
&lt;p&gt;Just for fun, let&amp;rsquo;s try a different injection string. This time we will enter the username &lt;code&gt;admin&#39;#&lt;/code&gt; and any password we want.&lt;/p&gt;
&lt;p&gt;In PHP &lt;code&gt;#&lt;/code&gt; denotes a comment. So, in theory, we should be able to enter &lt;code&gt;admin&#39;#&lt;/code&gt; for the username and circumvent the need for a password by commenting out the rest of the query.&lt;/p&gt;
&lt;p&gt;Something like this:&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/45ee694533.png&#34; width=&#34;600&#34; height=&#34;165&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Let&amp;rsquo;s try it&lt;/p&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/10ffb49368.png&#34; width=&#34;600&#34; height=&#34;439&#34; alt=&#34;&#34;&gt;
&lt;img src=&#34;https://cdn.uploads.micro.blog/232453/2025/5c9eb768ad.png&#34; width=&#34;600&#34; height=&#34;439&#34; alt=&#34;&#34;&gt;
&lt;p&gt;Success!&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
