<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Custom Signatures With ChatGPT and AI Security in General Articles</title>
    <link>https://live.paloaltonetworks.com/t5/general-articles/custom-signatures-with-chatgpt-and-ai-security/ta-p/1239551</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiwi_0-1766154564195.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70156i9082893CA4DFE9DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="kiwi_0-1766154564195.png" alt="kiwi_0-1766154564195.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;We all know &lt;SPAN class="math-inline" data-math="\text{ChatGPT}"&gt;ChatGPT&lt;/SPAN&gt;&amp;nbsp;can write code and articles, but can it automate the specialized task of threat mitigation? We set out to test the capabilities of &lt;SPAN class="math-inline" data-math="\text{AI}"&gt;AI&lt;/SPAN&gt;&amp;nbsp;by asking it to generate a Palo Alto Networks custom signature.&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;Before diving into the experiment, let's establish some foundational context on the technology that drives these platforms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;Content:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U&gt;AI Basics&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U&gt;DNS example, starting from scratch!&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U style="font-family: inherit;"&gt;HTTP example, comparison with already created signatures&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U style="font-family: inherit;"&gt;AI security&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U style="font-family: inherit;"&gt;Ending words&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;U&gt;&lt;STRONG&gt;1. AI Basics&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;A &lt;STRONG&gt;Large Language Model (LLM)&lt;/STRONG&gt; is a type of artificial intelligence (AI) that uses machine learning to understand and generate human-like text. For example, &lt;STRONG&gt;GPT&lt;/STRONG&gt; is the underlying LLM, and &lt;STRONG&gt;ChatGPT&lt;/STRONG&gt; is the conversational application built on top of it.&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;Not all language models are large: &lt;STRONG&gt;Small Language Models (SLMs)&lt;/STRONG&gt; are compact AI models trained for specific, narrower tasks, requiring fewer computing resources.&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;It is important to note that AI models can also be trained on, and generate, non-human language data. For instance, an AI could be specialized to analyze structured data, such as adding calculated columns to a table based on a &lt;SPAN class="math-inline" data-math="\text{CSV}"&gt;CSV&lt;/SPAN&gt;&amp;nbsp;file.&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="13"&gt;The LLM is just one component of a complete AI platform. Other crucial elements ensure functionality and accuracy:&lt;/P&gt;
&lt;P data-path-to-node="13"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL data-path-to-node="14"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="14,0,0"&gt;&lt;STRONG&gt;AI Orchestrator:&lt;/STRONG&gt; This system selects the most appropriate LLM or SLM to answer your specific request.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="14,1,0"&gt;&lt;STRONG&gt;RAG (Retrieval-Augmented Generation):&lt;/STRONG&gt; &lt;SPAN class="math-inline" data-math="\text{RAG}"&gt;RAG&lt;/SPAN&gt;&amp;nbsp;allows the AI to retrieve and use up-to-date or internal documents to formulate a response. It prevents the AI from relying solely on its original, potentially stale training data.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="14,2,0"&gt;&lt;STRONG&gt;System Prompt:&lt;/STRONG&gt; This set of instructions defines the rules, persona, and limitations of the AI. It limits what users can ask and often acts as the trigger for the &lt;SPAN class="math-inline" data-math="\text{RAG}"&gt;RAG&lt;/SPAN&gt;&amp;nbsp;system when internal context is required.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="14,3,0"&gt;&lt;STRONG&gt;MCP (Model Context Protocol) Servers:&lt;/STRONG&gt; These are used to connect the AI to external, real-time systems to answer questions requiring live data, such as querying the current weather or stock prices.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765196840250.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70050i25B922C0E78EDA53/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765196840250.png" alt="nikoolayy1_0-1765196840250.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can streamline the process of writing custom signatures by utilizing &lt;STRONG&gt;Prompt Engineering&lt;/STRONG&gt;. This involves adding a specific system prompt under our personalization settings that will be automatically appended to all our inputs. This custom prompt ensures the AI generates highly targeted and consistent output tailored to our specific needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_1-1765191775795.png" style="width: 715px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70046i4914CF9E4830B4F5/image-dimensions/715x324?v=v2" width="715" height="324" role="button" title="nikoolayy1_1-1765191775795.png" alt="nikoolayy1_1-1765191775795.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765191412727.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70045i576847A996BE3DEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765191412727.png" alt="nikoolayy1_0-1765191412727.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1759844429231.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69473i59D825B0BEF45CCE/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1759844429231.png" alt="nikoolayy1_0-1759844429231.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given the extensive, high-quality content available from industry leaders such as Amazon AWS and Microsoft, we will omit basic introductory links. We encourage readers new to the subject to consult these widely available foundational resources.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;U&gt;&lt;STRONG&gt;2. DNS example, starting from scratch!&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that we have refined our system prompt through Prompt Engineering, let's put the &lt;SPAN class="math-inline" data-math="\text{AI}"&gt;AI&lt;/SPAN&gt;&amp;nbsp;to the test. We will ask the model to generate the necessary Palo Alto Networks custom signature to block DNS requests destined for the publicly testable domain, example.com.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_2-1759844605898.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69475i1F2BBD44EF32CB6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_2-1759844605898.png" alt="nikoolayy1_2-1759844605898.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ok this looks good as it is even PCRE compliant! But how to configure this regex?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_3-1759844741121.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69476iD0747063D71F23D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_3-1759844741121.png" alt="nikoolayy1_3-1759844741121.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The custom regex is now ready for validation. The signature is designed to be applied using the appropriate context: dns-req-section (see: &lt;A href="https://docs.paloaltonetworks.com/pan-os/u-v/custom-app-id-and-threat-signatures/custom-application-and-threat-signatures/custom-signature-contexts/string-contexts/dns-req-section" target="_blank" rel="noopener"&gt;Custom Application IDs and Signatures: dns-req-section&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;I have configured the environment to demonstrate two distinct DNS capture options on the NGFW:&lt;/P&gt;
&lt;OL start="1" data-path-to-node="10"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="10,0,0"&gt;&lt;STRONG&gt;Direct Route:&lt;/STRONG&gt; Traffic is sent directly to the public DNS server (&lt;SPAN class="math-inline" data-math="\text{8.8.4.4}"&gt;8.8.4.4&lt;/SPAN&gt;) via a static route (&lt;SPAN class="math-inline" data-math="\text{route ADD}"&gt;route ADD&lt;/SPAN&gt;&amp;nbsp;command on the host), capturing the initial &lt;SPAN class="math-inline" data-math="\text{DNS}"&gt;DNS&lt;/SPAN&gt;&amp;nbsp;request.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="10,1,0"&gt;&lt;STRONG&gt;DNS Proxy:&lt;/STRONG&gt; Traffic is directed through the NGFW's configured DNS Proxy IP (&lt;SPAN class="math-inline" data-math="\text{192.168.1.91}"&gt;192.168.1.91&lt;/SPAN&gt;).&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 data-path-to-node="11"&gt;Note on DNS Proxy Configuration&lt;/H4&gt;
&lt;P data-path-to-node="12"&gt;During setup, I encountered an unexpected behavior where the &lt;SPAN class="math-inline" data-math="\text{DNS}"&gt;DNS&lt;/SPAN&gt;&amp;nbsp;Proxy required an interface to be set to &lt;SPAN class="math-inline" data-math="\text{DHCP}"&gt;DHCP&lt;/SPAN&gt;&amp;nbsp;to "inherit" the &lt;SPAN class="math-inline" data-math="\text{DNS}"&gt;DNS&lt;/SPAN&gt;&amp;nbsp;configuration. Since the inherited &lt;SPAN class="math-inline" data-math="\text{DNS}"&gt;DNS&lt;/SPAN&gt;&amp;nbsp;was invalid, I used Security rules to ensure all final domain resolution traffic was directed to the intended server (&lt;SPAN class="math-inline" data-math="\text{8.8.4.4}"&gt;8.8.4.4&lt;/SPAN&gt;).&lt;/P&gt;
&lt;P data-path-to-node="12"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more details on the DNS Proxy feature, please consult the knowledge base:&lt;/P&gt;
&lt;P&gt;[&lt;A href="https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClFcCAK" target="_blank" rel="noopener"&gt;How to Configure DNS Proxy on a Palo Alto Networks Firewall&lt;/A&gt;]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_4-1759844903092.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69477i2E9624FE2339EFDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_4-1759844903092.png" alt="nikoolayy1_4-1759844903092.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_1-1759844518180.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69474i0750EF87EEC6C87A/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_1-1759844518180.png" alt="nikoolayy1_1-1759844518180.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_5-1759845149855.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69478i2B797329E7D972FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_5-1759845149855.png" alt="nikoolayy1_5-1759845149855.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="8"&gt;The preceding steps confirmed that the custom signature generation was successful.&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;If we were to combine all our requirements into a single, comprehensive query, such as:&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE data-path-to-node="10"&gt;
&lt;P data-path-to-node="10,0"&gt;&lt;I&gt;"Generate a Palo Alto Networks NGFW vulnerability signature that blocks DNS FQDN queries for the &lt;CODE&gt;&lt;A href="http://www.example.com" target="_blank" rel="noopener"&gt;www.example.com&lt;/A&gt;&lt;/CODE&gt; domain and all its subdomains. Also, provide the configuration steps and the correct context for deployment."&lt;/I&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P data-path-to-node="11"&gt;We would receive the full solution in one exchange.&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="12"&gt;&lt;STRONG&gt;This leads to the most important best practice for using LLMs:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-path-to-node="12"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL data-path-to-node="13"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="13,0,0"&gt;&lt;STRONG&gt;Provide Maximum Context:&lt;/STRONG&gt; LLMs are &lt;STRONG&gt;stateless&lt;/STRONG&gt;. They do not "remember" previous interactions. For the model to answer your second question, the &lt;STRONG&gt;AI Orchestrator&lt;/STRONG&gt; must send the entire context (your original question, the model's previous answer, and your new question) in one block.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="13,1,0"&gt;&lt;STRONG&gt;Save Time and Cost (Tokens):&lt;/STRONG&gt; Since the entire conversation is resent with every new query, each exchange consumes &lt;STRONG&gt;tokens&lt;/STRONG&gt; (computational currency). By providing all necessary details in a single input, you reduce the number of exchanges, making the process faster and more cost-effective.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;U&gt;&lt;STRONG&gt;3. HTTP example, comparison with&lt;/STRONG&gt;&lt;STRONG&gt; already&lt;/STRONG&gt;&lt;STRONG&gt; created signatures&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="7,0"&gt;For this second example, we will provide &lt;SPAN class="math-inline" data-math="\text{ChatGPT}"&gt;ChatGPT&lt;/SPAN&gt;&amp;nbsp;with a foundation of existing knowledge. I will use the content from my previous article,&amp;nbsp;&lt;EM&gt;&lt;U&gt;&lt;A href="https://live.paloaltonetworks.com/t5/general-articles/how-to-write-palo-alto-networks-custom-vulnerability-and/ta-p/1228494" target="_blank" rel="noopener"&gt;How to Write Palo Alto Networks Custom Vulnerability and Application Signatures with Examples | Palo Alto Networks&lt;/A&gt;&lt;/U&gt;&lt;/EM&gt;, as the input context.&lt;/P&gt;
&lt;P data-path-to-node="7,0"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="7,1"&gt;&lt;STRONG&gt;Recommendation:&lt;/STRONG&gt; For the best understanding of the &lt;SPAN class="math-inline" data-math="\text{AI}"&gt;AI&lt;/SPAN&gt;'s output, I recommend reviewing that article first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My prompt is &lt;EM&gt;&lt;U&gt;I want a Palo Alto Vulnerability Signature that matches the that blocks parameters "user" if it exceeds 14 characters&lt;/U&gt;&lt;/EM&gt;. As you see below it was almost correct just the "{15,}" needs to be&amp;nbsp;&amp;nbsp;"{14,}"&amp;nbsp; . I even wrote the prompt in a incorrect way and ChatGPT stil undrestood what I meant&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765195709705.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70048i47A43CD248C4D003/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765195709705.png" alt="nikoolayy1_0-1765195709705.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, we look at the 'pass' parameter. During testing, I discovered a limitation that ChatGPT overlooked: when matching the user parameter, a simple regex like &lt;CODE&gt;pass=[^&amp;amp;]{14,}&lt;/CODE&gt; is insufficient on its own. Instead, a more effective approach is to use a combination signature consisting of two separate signatures tied to a single condition. Because ChatGPT now utilizes a conversation cache, I was able to inquire about this second parameter without repeating the full context, as it remained aware of our previous discussion regarding the user parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_1-1765196025680.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70049i055240531B7F3061/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_1-1765196025680.png" alt="nikoolayy1_1-1765196025680.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As this demonstrates, domain expertise and rigorous testing remain essential. You cannot simply 'copy and paste' ChatGPT-generated signatures into a production environment. When a signature fails in testing, you must have the technical depth to understand &lt;I&gt;why&lt;/I&gt; it failed and how to refine it manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;U&gt;&lt;STRONG&gt;4. AI&lt;/STRONG&gt;&lt;STRONG&gt; S&lt;/STRONG&gt;&lt;STRONG&gt;ecurity&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P data-path-to-node="4"&gt;Leveraging AI models like OpenAI’s GPT via the ChatGPT interface is a powerful starting point. You can even go a step further by building custom Python clients to interact with multiple Large Language Models (LLMs) beyond the OpenAI API—such as DeepSeek—to compare their outputs.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="5"&gt;However, using AI safely requires more than just standard access. Most AI providers implement a "system prompt" to secure the model by prepending instructions to your request before it hits the LLM. While this acts as a form of "normalization," it is often insufficient. Sophisticated users can bypass these guardrails using clever techniques known as &lt;STRONG&gt;prompt injections&lt;/STRONG&gt;. If you want to see this in action, I highly recommend testing your skills on &lt;A class="ng-star-inserted" href="https://gandalf.lakera.ai/" target="_blank" rel="noopener"&gt;Gandalf | Lakera – Test your AI hacking skills&lt;/A&gt;.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="6"&gt;Beyond injection, the threat landscape includes AI-specific DoS/DDoS attacks (designed to exhaust tokens or compute), prompt hijacking, and training data poisoning. A great resource for exploring these vulnerabilities is the &lt;A class="ng-star-inserted" href="https://genai.owasp.org/" target="_blank" rel="noopener"&gt;OWASP GenAI Security Project&lt;/A&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7"&gt;This is where the &lt;STRONG&gt;Palo Alto Networks AI Security Profile&lt;/STRONG&gt; becomes essential. It acts as an &lt;STRONG&gt;AI Gateway&amp;nbsp;&lt;/STRONG&gt;to monitor and filter traffic. It can block malicious requests or use Data Loss Prevention (DLP) to stop responses containing sensitive data if a prompt triggers an exfiltration attempt.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="8"&gt;Furthermore, Palo Alto offers advanced solutions like &lt;STRONG&gt;Prisma AIRS&lt;/STRONG&gt;, where security is deployed directly on &lt;STRONG&gt;Nvidia DPUs&lt;/STRONG&gt; (Data Processing Units). These are essentially "Smart NICs" designed to offload and accelerate data-centric tasks, protecting the AI infrastructure without taxing the primary CPU.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765194856379.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70047i683CA10813C0C68A/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765194856379.png" alt="nikoolayy1_0-1765194856379.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/network-security/security-policy/administration/security-profiles/ai-security-profile" target="_blank" rel="noopener"&gt;Security Profile: AI Security&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=Pagg3TK9rQw" target="_blank" rel="noopener"&gt;Prisma® AIRS | The World’s Most Comprehensive AI Security Platform&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;I wish you all happy holidays !&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765198778023.jpeg" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70051iE7AF1A45626984FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765198778023.jpeg" alt="nikoolayy1_0-1765198778023.jpeg" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 19 Dec 2025 14:32:53 GMT</pubDate>
    <dc:creator>nikoolayy1</dc:creator>
    <dc:date>2025-12-19T14:32:53Z</dc:date>
    <item>
      <title>Custom Signatures With ChatGPT and AI Security</title>
      <link>https://live.paloaltonetworks.com/t5/general-articles/custom-signatures-with-chatgpt-and-ai-security/ta-p/1239551</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiwi_0-1766154564195.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70156i9082893CA4DFE9DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="kiwi_0-1766154564195.png" alt="kiwi_0-1766154564195.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;We all know &lt;SPAN class="math-inline" data-math="\text{ChatGPT}"&gt;ChatGPT&lt;/SPAN&gt;&amp;nbsp;can write code and articles, but can it automate the specialized task of threat mitigation? We set out to test the capabilities of &lt;SPAN class="math-inline" data-math="\text{AI}"&gt;AI&lt;/SPAN&gt;&amp;nbsp;by asking it to generate a Palo Alto Networks custom signature.&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;Before diving into the experiment, let's establish some foundational context on the technology that drives these platforms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;Content:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U&gt;AI Basics&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U&gt;DNS example, starting from scratch!&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U style="font-family: inherit;"&gt;HTTP example, comparison with already created signatures&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U style="font-family: inherit;"&gt;AI security&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;U style="font-family: inherit;"&gt;Ending words&lt;/U&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;U&gt;&lt;STRONG&gt;1. AI Basics&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;A &lt;STRONG&gt;Large Language Model (LLM)&lt;/STRONG&gt; is a type of artificial intelligence (AI) that uses machine learning to understand and generate human-like text. For example, &lt;STRONG&gt;GPT&lt;/STRONG&gt; is the underlying LLM, and &lt;STRONG&gt;ChatGPT&lt;/STRONG&gt; is the conversational application built on top of it.&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;Not all language models are large: &lt;STRONG&gt;Small Language Models (SLMs)&lt;/STRONG&gt; are compact AI models trained for specific, narrower tasks, requiring fewer computing resources.&lt;/P&gt;
&lt;P data-path-to-node="10"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;It is important to note that AI models can also be trained on, and generate, non-human language data. For instance, an AI could be specialized to analyze structured data, such as adding calculated columns to a table based on a &lt;SPAN class="math-inline" data-math="\text{CSV}"&gt;CSV&lt;/SPAN&gt;&amp;nbsp;file.&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="13"&gt;The LLM is just one component of a complete AI platform. Other crucial elements ensure functionality and accuracy:&lt;/P&gt;
&lt;P data-path-to-node="13"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL data-path-to-node="14"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="14,0,0"&gt;&lt;STRONG&gt;AI Orchestrator:&lt;/STRONG&gt; This system selects the most appropriate LLM or SLM to answer your specific request.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="14,1,0"&gt;&lt;STRONG&gt;RAG (Retrieval-Augmented Generation):&lt;/STRONG&gt; &lt;SPAN class="math-inline" data-math="\text{RAG}"&gt;RAG&lt;/SPAN&gt;&amp;nbsp;allows the AI to retrieve and use up-to-date or internal documents to formulate a response. It prevents the AI from relying solely on its original, potentially stale training data.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="14,2,0"&gt;&lt;STRONG&gt;System Prompt:&lt;/STRONG&gt; This set of instructions defines the rules, persona, and limitations of the AI. It limits what users can ask and often acts as the trigger for the &lt;SPAN class="math-inline" data-math="\text{RAG}"&gt;RAG&lt;/SPAN&gt;&amp;nbsp;system when internal context is required.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="14,3,0"&gt;&lt;STRONG&gt;MCP (Model Context Protocol) Servers:&lt;/STRONG&gt; These are used to connect the AI to external, real-time systems to answer questions requiring live data, such as querying the current weather or stock prices.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765196840250.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70050i25B922C0E78EDA53/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765196840250.png" alt="nikoolayy1_0-1765196840250.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can streamline the process of writing custom signatures by utilizing &lt;STRONG&gt;Prompt Engineering&lt;/STRONG&gt;. This involves adding a specific system prompt under our personalization settings that will be automatically appended to all our inputs. This custom prompt ensures the AI generates highly targeted and consistent output tailored to our specific needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_1-1765191775795.png" style="width: 715px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70046i4914CF9E4830B4F5/image-dimensions/715x324?v=v2" width="715" height="324" role="button" title="nikoolayy1_1-1765191775795.png" alt="nikoolayy1_1-1765191775795.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765191412727.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70045i576847A996BE3DEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765191412727.png" alt="nikoolayy1_0-1765191412727.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1759844429231.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69473i59D825B0BEF45CCE/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1759844429231.png" alt="nikoolayy1_0-1759844429231.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given the extensive, high-quality content available from industry leaders such as Amazon AWS and Microsoft, we will omit basic introductory links. We encourage readers new to the subject to consult these widely available foundational resources.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;U&gt;&lt;STRONG&gt;2. DNS example, starting from scratch!&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that we have refined our system prompt through Prompt Engineering, let's put the &lt;SPAN class="math-inline" data-math="\text{AI}"&gt;AI&lt;/SPAN&gt;&amp;nbsp;to the test. We will ask the model to generate the necessary Palo Alto Networks custom signature to block DNS requests destined for the publicly testable domain, example.com.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_2-1759844605898.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69475i1F2BBD44EF32CB6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_2-1759844605898.png" alt="nikoolayy1_2-1759844605898.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ok this looks good as it is even PCRE compliant! But how to configure this regex?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_3-1759844741121.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69476iD0747063D71F23D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_3-1759844741121.png" alt="nikoolayy1_3-1759844741121.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The custom regex is now ready for validation. The signature is designed to be applied using the appropriate context: dns-req-section (see: &lt;A href="https://docs.paloaltonetworks.com/pan-os/u-v/custom-app-id-and-threat-signatures/custom-application-and-threat-signatures/custom-signature-contexts/string-contexts/dns-req-section" target="_blank" rel="noopener"&gt;Custom Application IDs and Signatures: dns-req-section&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;I have configured the environment to demonstrate two distinct DNS capture options on the NGFW:&lt;/P&gt;
&lt;OL start="1" data-path-to-node="10"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="10,0,0"&gt;&lt;STRONG&gt;Direct Route:&lt;/STRONG&gt; Traffic is sent directly to the public DNS server (&lt;SPAN class="math-inline" data-math="\text{8.8.4.4}"&gt;8.8.4.4&lt;/SPAN&gt;) via a static route (&lt;SPAN class="math-inline" data-math="\text{route ADD}"&gt;route ADD&lt;/SPAN&gt;&amp;nbsp;command on the host), capturing the initial &lt;SPAN class="math-inline" data-math="\text{DNS}"&gt;DNS&lt;/SPAN&gt;&amp;nbsp;request.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="10,1,0"&gt;&lt;STRONG&gt;DNS Proxy:&lt;/STRONG&gt; Traffic is directed through the NGFW's configured DNS Proxy IP (&lt;SPAN class="math-inline" data-math="\text{192.168.1.91}"&gt;192.168.1.91&lt;/SPAN&gt;).&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 data-path-to-node="11"&gt;Note on DNS Proxy Configuration&lt;/H4&gt;
&lt;P data-path-to-node="12"&gt;During setup, I encountered an unexpected behavior where the &lt;SPAN class="math-inline" data-math="\text{DNS}"&gt;DNS&lt;/SPAN&gt;&amp;nbsp;Proxy required an interface to be set to &lt;SPAN class="math-inline" data-math="\text{DHCP}"&gt;DHCP&lt;/SPAN&gt;&amp;nbsp;to "inherit" the &lt;SPAN class="math-inline" data-math="\text{DNS}"&gt;DNS&lt;/SPAN&gt;&amp;nbsp;configuration. Since the inherited &lt;SPAN class="math-inline" data-math="\text{DNS}"&gt;DNS&lt;/SPAN&gt;&amp;nbsp;was invalid, I used Security rules to ensure all final domain resolution traffic was directed to the intended server (&lt;SPAN class="math-inline" data-math="\text{8.8.4.4}"&gt;8.8.4.4&lt;/SPAN&gt;).&lt;/P&gt;
&lt;P data-path-to-node="12"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more details on the DNS Proxy feature, please consult the knowledge base:&lt;/P&gt;
&lt;P&gt;[&lt;A href="https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClFcCAK" target="_blank" rel="noopener"&gt;How to Configure DNS Proxy on a Palo Alto Networks Firewall&lt;/A&gt;]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_4-1759844903092.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69477i2E9624FE2339EFDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_4-1759844903092.png" alt="nikoolayy1_4-1759844903092.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_1-1759844518180.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69474i0750EF87EEC6C87A/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_1-1759844518180.png" alt="nikoolayy1_1-1759844518180.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_5-1759845149855.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/69478i2B797329E7D972FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_5-1759845149855.png" alt="nikoolayy1_5-1759845149855.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="8"&gt;The preceding steps confirmed that the custom signature generation was successful.&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;If we were to combine all our requirements into a single, comprehensive query, such as:&lt;/P&gt;
&lt;P data-path-to-node="9"&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE data-path-to-node="10"&gt;
&lt;P data-path-to-node="10,0"&gt;&lt;I&gt;"Generate a Palo Alto Networks NGFW vulnerability signature that blocks DNS FQDN queries for the &lt;CODE&gt;&lt;A href="http://www.example.com" target="_blank" rel="noopener"&gt;www.example.com&lt;/A&gt;&lt;/CODE&gt; domain and all its subdomains. Also, provide the configuration steps and the correct context for deployment."&lt;/I&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P data-path-to-node="11"&gt;We would receive the full solution in one exchange.&lt;/P&gt;
&lt;P data-path-to-node="11"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="12"&gt;&lt;STRONG&gt;This leads to the most important best practice for using LLMs:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-path-to-node="12"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL data-path-to-node="13"&gt;
&lt;LI&gt;
&lt;P data-path-to-node="13,0,0"&gt;&lt;STRONG&gt;Provide Maximum Context:&lt;/STRONG&gt; LLMs are &lt;STRONG&gt;stateless&lt;/STRONG&gt;. They do not "remember" previous interactions. For the model to answer your second question, the &lt;STRONG&gt;AI Orchestrator&lt;/STRONG&gt; must send the entire context (your original question, the model's previous answer, and your new question) in one block.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="13,1,0"&gt;&lt;STRONG&gt;Save Time and Cost (Tokens):&lt;/STRONG&gt; Since the entire conversation is resent with every new query, each exchange consumes &lt;STRONG&gt;tokens&lt;/STRONG&gt; (computational currency). By providing all necessary details in a single input, you reduce the number of exchanges, making the process faster and more cost-effective.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;U&gt;&lt;STRONG&gt;3. HTTP example, comparison with&lt;/STRONG&gt;&lt;STRONG&gt; already&lt;/STRONG&gt;&lt;STRONG&gt; created signatures&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="7,0"&gt;For this second example, we will provide &lt;SPAN class="math-inline" data-math="\text{ChatGPT}"&gt;ChatGPT&lt;/SPAN&gt;&amp;nbsp;with a foundation of existing knowledge. I will use the content from my previous article,&amp;nbsp;&lt;EM&gt;&lt;U&gt;&lt;A href="https://live.paloaltonetworks.com/t5/general-articles/how-to-write-palo-alto-networks-custom-vulnerability-and/ta-p/1228494" target="_blank" rel="noopener"&gt;How to Write Palo Alto Networks Custom Vulnerability and Application Signatures with Examples | Palo Alto Networks&lt;/A&gt;&lt;/U&gt;&lt;/EM&gt;, as the input context.&lt;/P&gt;
&lt;P data-path-to-node="7,0"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-path-to-node="7,1"&gt;&lt;STRONG&gt;Recommendation:&lt;/STRONG&gt; For the best understanding of the &lt;SPAN class="math-inline" data-math="\text{AI}"&gt;AI&lt;/SPAN&gt;'s output, I recommend reviewing that article first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My prompt is &lt;EM&gt;&lt;U&gt;I want a Palo Alto Vulnerability Signature that matches the that blocks parameters "user" if it exceeds 14 characters&lt;/U&gt;&lt;/EM&gt;. As you see below it was almost correct just the "{15,}" needs to be&amp;nbsp;&amp;nbsp;"{14,}"&amp;nbsp; . I even wrote the prompt in a incorrect way and ChatGPT stil undrestood what I meant&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765195709705.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70048i47A43CD248C4D003/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765195709705.png" alt="nikoolayy1_0-1765195709705.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, we look at the 'pass' parameter. During testing, I discovered a limitation that ChatGPT overlooked: when matching the user parameter, a simple regex like &lt;CODE&gt;pass=[^&amp;amp;]{14,}&lt;/CODE&gt; is insufficient on its own. Instead, a more effective approach is to use a combination signature consisting of two separate signatures tied to a single condition. Because ChatGPT now utilizes a conversation cache, I was able to inquire about this second parameter without repeating the full context, as it remained aware of our previous discussion regarding the user parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_1-1765196025680.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70049i055240531B7F3061/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_1-1765196025680.png" alt="nikoolayy1_1-1765196025680.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As this demonstrates, domain expertise and rigorous testing remain essential. You cannot simply 'copy and paste' ChatGPT-generated signatures into a production environment. When a signature fails in testing, you must have the technical depth to understand &lt;I&gt;why&lt;/I&gt; it failed and how to refine it manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;U&gt;&lt;STRONG&gt;4. AI&lt;/STRONG&gt;&lt;STRONG&gt; S&lt;/STRONG&gt;&lt;STRONG&gt;ecurity&lt;/STRONG&gt;&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P data-path-to-node="4"&gt;Leveraging AI models like OpenAI’s GPT via the ChatGPT interface is a powerful starting point. You can even go a step further by building custom Python clients to interact with multiple Large Language Models (LLMs) beyond the OpenAI API—such as DeepSeek—to compare their outputs.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="5"&gt;However, using AI safely requires more than just standard access. Most AI providers implement a "system prompt" to secure the model by prepending instructions to your request before it hits the LLM. While this acts as a form of "normalization," it is often insufficient. Sophisticated users can bypass these guardrails using clever techniques known as &lt;STRONG&gt;prompt injections&lt;/STRONG&gt;. If you want to see this in action, I highly recommend testing your skills on &lt;A class="ng-star-inserted" href="https://gandalf.lakera.ai/" target="_blank" rel="noopener"&gt;Gandalf | Lakera – Test your AI hacking skills&lt;/A&gt;.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="6"&gt;Beyond injection, the threat landscape includes AI-specific DoS/DDoS attacks (designed to exhaust tokens or compute), prompt hijacking, and training data poisoning. A great resource for exploring these vulnerabilities is the &lt;A class="ng-star-inserted" href="https://genai.owasp.org/" target="_blank" rel="noopener"&gt;OWASP GenAI Security Project&lt;/A&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="7"&gt;This is where the &lt;STRONG&gt;Palo Alto Networks AI Security Profile&lt;/STRONG&gt; becomes essential. It acts as an &lt;STRONG&gt;AI Gateway&amp;nbsp;&lt;/STRONG&gt;to monitor and filter traffic. It can block malicious requests or use Data Loss Prevention (DLP) to stop responses containing sensitive data if a prompt triggers an exfiltration attempt.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-path-to-node="8"&gt;Furthermore, Palo Alto offers advanced solutions like &lt;STRONG&gt;Prisma AIRS&lt;/STRONG&gt;, where security is deployed directly on &lt;STRONG&gt;Nvidia DPUs&lt;/STRONG&gt; (Data Processing Units). These are essentially "Smart NICs" designed to offload and accelerate data-centric tasks, protecting the AI infrastructure without taxing the primary CPU.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765194856379.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70047i683CA10813C0C68A/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765194856379.png" alt="nikoolayy1_0-1765194856379.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/network-security/security-policy/administration/security-profiles/ai-security-profile" target="_blank" rel="noopener"&gt;Security Profile: AI Security&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=Pagg3TK9rQw" target="_blank" rel="noopener"&gt;Prisma® AIRS | The World’s Most Comprehensive AI Security Platform&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;I wish you all happy holidays !&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nikoolayy1_0-1765198778023.jpeg" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/70051iE7AF1A45626984FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="nikoolayy1_0-1765198778023.jpeg" alt="nikoolayy1_0-1765198778023.jpeg" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 Dec 2025 14:32:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-articles/custom-signatures-with-chatgpt-and-ai-security/ta-p/1239551</guid>
      <dc:creator>nikoolayy1</dc:creator>
      <dc:date>2025-12-19T14:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Signatures With ChatGPT and AI Security</title>
      <link>https://live.paloaltonetworks.com/t5/general-articles/custom-signatures-with-chatgpt-and-ai-security/tac-p/1244260#M840</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/153031"&gt;@nikoolayy1&lt;/a&gt;&amp;nbsp;This is a great article! It covers foundational AI concepts, practical testing via DNS and HTTP examples, and the critical role of AI security.&lt;/P&gt;
&lt;P&gt;Thank you for taking time and expertise to pull this together for the greater good of community members.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2025 17:35:00 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-articles/custom-signatures-with-chatgpt-and-ai-security/tac-p/1244260#M840</guid>
      <dc:creator>crasmussen</dc:creator>
      <dc:date>2025-12-19T17:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Signatures With ChatGPT and AI Security</title>
      <link>https://live.paloaltonetworks.com/t5/general-articles/custom-signatures-with-chatgpt-and-ai-security/tac-p/1244872#M841</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/132571"&gt;@crasmussen&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2026 12:39:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-articles/custom-signatures-with-chatgpt-and-ai-security/tac-p/1244872#M841</guid>
      <dc:creator>nikoolayy1</dc:creator>
      <dc:date>2026-01-05T12:39:31Z</dc:date>
    </item>
  </channel>
</rss>

