Alright, let's move on with the next talk, which is brought up by Mohammad Nabeel. Mohammad Nabeel is a PhD and is also a cyber security veteran. He has leading efforts on proactive detection and graph-based intelligence research. He is an open source enthusiast and a member of Apache Software Foundation. So it's really someone who's special that has joined us today. He also works with Palo Alto Networks, so you all know who Palo Alto is, right? His talk for today is CTI Agent Automated Battle Cards from CTI Reports, where it comes across an agentic system to automate the collection and synthesis of cyber threat intelligence from threat reports using LLM agents. So please give it up for Mohammad Nabeel. Hello everyone, good afternoon. Can you all hear me? So thank you for the kind introduction. So today I'm going to talk about CTI Agent. It's an agentic system that takes CTI reports, these are threat intelligence reports, and tries to come up with structured threat actor battle cards. So as you all know, the public threat intelligence reports are very useful, but there is a problem. They are written in natural language and it's very hard to automate and identify actionable insights, mainly because they are in natural language and also use different modalities like videos, images, and whatnot. And also sometimes these threat reports have conflicting information or sometimes they have incomplete information. And that makes it difficult for us to consume and enforce. And the third bullet point, it's even more harder. Most of the time these TTPs, Techniques, Tactics, and Procedures, are implicit. They are not listed in the threat report. You have to infer based on the domain knowledge you have. And because of these reasons, this is not only time-consuming, it's error-prone. In this work, we are trying to address these points and try to come up with an agentic solution which will help us to take these ambiguous and somewhat vague threat reports and come up with structured better cards. So at a high level, this is what we are going to do. I've broken it down into four steps. In the first step, we'll try to collect as many threat reports as possible. And once we have those, we'll try to group them by the threat actors. And once we have those groups, we will be using the agent, the number three bullet points, to identify better cards from that. And once we have these better cards, we want to identify the new IOCs associated with these better cards. Because the reality is, by the time these blogs get published, or threat reports get published, the IOCs in them are already outdated. Because there is a time frame between writing a blog and getting approved and published. And so we want to have a system, once we have this better card, we want to automatically update with newer and up-to-date IOCs. So for this work, we'll be using reports from trusted sources, like security vendors and all the investigative journalists who are into cybersecurity, and also repeated GitHub reports and repeated Twitter handles. The main reason why you want to use good quality data is, if you start with bad quality data, what you will end up is going to be with a lot of noise. The same machine learning principle applies here. If it is garbage in, it's going to be garbage out. And from each of these reports, what we are trying to do is to identify these structural entities from these reports. The summary of this report, and the campaign it is representing, and the threat actor it is about, and the indicators and the TTPs. The TTPs are grounded based on the MITRE, the famous MITRE ATT&CK metric, which has 14 tactics and 300 plus techniques. And our goal is to come up with these kinds of reports, which will be consumed with much less ambiguity. For each threat actor, we will have one battle card, and it will include the threat actor summary, and any aliases, location, and it will have one or more campaigns that the threat actor launched. And for each campaign, we will be identifying the IOCs, the TTPs, any tools they use, and any binaries they use for the attack. So now we have the reports. Once we have the reports, we want to have a mechanism which allows us to group them. So this is where you use unsupervised learning to identify from a list of random items, to find some kind of a grouping. We identified two strategies here. The first one is to take the documents, and take the embedding, and then do the clustering. Assuming that you guys have some basic information, knowledge about machine learning, what this embedding is, so I'm not going to go into details of it. And the second strategy we took here is, instead of directly taking the embedding, we take the documents, these are the threat reports, we take the summary, we prompt the LLM to identify a summary about threat actor from those reports, and then take the embedding, and then do the clustering. And which one do you think outperforms? Do you think the first one would be better, or the second one? First one? Any guess? Second one? Alright. So the answer is actually the second one. So, when you try this technique, the first one is document embedding, the other one is summary embedding. And it consistently outperformed. The silhouette score says how different these clusters are. If the silhouette score is close to zero, it means the clusters are overlapping. If it is close to one, you get ideal clusters which has much less overlapping. And we also tried different embedding for the summary reports, and we consistently found that Gemini embedding, which is from the large-language model, outperformed BERT, and also the BERT-related ones like... So this diagram shows a down-sampled version of some of the reports we analyzed and clustered. There are about seven contactors we are tracking here, and it shows how well these documents get clustered based on the summary. Yeah, give me a second. So we want to understand why it worked well. So one reason we hypothesize here is that these are the summaries that LLM generated. As you can see, these summaries have some kind of consistency identifying the threat actor and the aliases and the kind of activities they were involved in. So when you get this homogeneous kind of a summary, once you convert that into an embedding, it's going to come up with embeddings which are closer in space for the threat reports with the same threat actor. That's why we got much better results with the summaries. And also the plus point here is when you take embeddings over summaries, it's much faster and it costs you much less as well. So now we have the group reports. Each group represents threat intelligence reports for each threat actor. It could be Gamma Ray Dawn, it could be Kim Sooky or APT23, whatnot. The next step, what we are going to do is we are going to take these threat reports and we want to use the power of LLMs to convert them into battle cards. These are going to be structured reports out of the natural language and the other modalities. And I would like to spend the next few slides to give you a quick background information about LLMs and agents and then go into my solution. So at a high level, you can propose, use this kind of solution in three ways. The easiest way is to prompt LLMs. You just create your prompt and ask to solve the problem. You give a report and ask to generate the battle card. And the second one is you are going to ground your data work with some kind of contextual information called RAC. This is Retrieval Augmented Generation where some relevant contextual information is injected into the prompt and then the LLMs are going to answer your question. And the final one is it's a kind of LLM in a loop which can use multiple tools and it might have a memory which can keep track of what it was saying before. One way to conceptualize LLM is to think about a LLM in a for loop which calls a tool and try to identify what that tool tells you and then update the environment based on that call another tool until it arrives at the final answer. So why agentic systems? So as you can see, these are some of the recent research work and they have shown again and again when you... out of those three options it's always the agentic systems outperforms the other. The main reason being they have access to more data, they have access to tools which allows the LLM to infer information about what they want to achieve and also it can optionally have memory where it can store whatever it learns. And another key aspect of using agent is to identify the type of planning that you want to use and there is a whole literature behind it and most of the time, most of the practical works either use the decomposition pattern where they try to break the problem into a smaller problem and then solve it or they will be using reflection kind of pattern where they force the LLM to think back and refine the answer and get back to you. So this slide shows the two most popular patterns people use. One is called React and the other one is called Self-Refine. The React is, the way it works is it calls a tool and then learn from that tool and then think about it and then make an assertion about what it learned from that and then decide which tool to call again. And it goes in a loop until it comes up with the final answer. And similar thing for the Self-Refine. Any of these agentic patterns, if you look at it, it's kind of a loop but the way the loop is done is different. So, with that basic information, I'm going to show you how we take those threat reports and then turn into battle cards using an agentic system. So as you can see, we start with the group threat intelligence reports. These are the grouped ones. Once we get those clusters, we group them and then we have a detailed prompt as to what it should be doing and then we use this react pattern along with these tools. So usually agent is nothing if you don't have good tools. The main part of building this agentic system is to build your own tools that can solve the problem. So the tools are the heart of the system. In this case, we built three tools. The report collection tool, the search tool and the extractor tool. Extractor is a simplistic tool which takes these threat reports and then fetches all the necessary information and keeps them in the local storage so that the other tools can use it. And the search tool helps to identify things missing in the threat intelligence report. When it analyzes these reports, it can invoke the search tool and get additional information about any of the ambiguous information and the bulk of the work is done by the extractor tool. It will go through each of the CTI reports and then try to analyze them and identify the artifact that we mentioned about Battlecard. So I want to zoom into the Battlecard extraction tool. So basically the idea here is to take all the threat reports which belong to that threat actor and then try to identify a single Battlecard that will represent all these threat reports. So the first approach we tried was like we took all the threat reports and asked another LLM to analyze them and come up with a Battlecard. More often than not it broke because it was not like it needs to consume a lot of reports at once and then sometimes even though you have unlimited input tokens like Gemini and all of the support over millions of tokens but the when it comes to output token it's limited to about 65k so it needs to process the data in a way that limits that window. So because of that reason we tried a different approach because it was failing. We used the, we borrowed the concept from MapReduce. We mapped each report to an agent and then asked it to generate a Battlecard for that report and then it will get processed in parallel. Once we have Battlecard for each report we have another LLM which synthesizes these Battlecards into one single Battlecard. Yeah, and one interesting thing to note is in the synthesis LLM when we look at the trace we found that it actually generates a code that does the synthesis. We don't explicitly mention to the LLM that you need to come up with a code that will combine all these Battlecards into one. So it wrote a detailed program which takes all the Battlecards and deterministically come up with the synthesized report. I found that one to be cool. I mean with the LLMs being now smarter with code there is no wonder that all the work will get converted into codes and run as deterministic tasks. And this is one example trace from one of the execution and this is for the scattered spider. So we took all the reports and sent it to the LLM that agent and these are the traces that they go through. And this is how a React kind of loop works. It calls one tool and gets the information update the environment and then it decides which next tool to call and continues in a loop until it comes with the final answer that's the Battlecard. This is another example a similar kind of loop but it's for a different threat actor. It will call different tools and then stop and at the end of those agentic process and the synthesis it comes up with a report like this. This is an example Battlecard that's for the model Libra which is also called scattered spider. So as you can see now it's not only informative it's structured in a way you can programmatically consume or you can share with any other SOC team to enforce it. So it has the threat actor information and then for each campaign you'll have campaign information when it roughly started when it roughly ended and any other aliases or industries targeted IOC and the PTPs involved and the tools used malware binaries used to attack and also any CVE vulnerabilities they exploited. And finally we also list the sources from which the agent has used two reports from our report to generate this report. So now we have the Battlecard for each of these threat actors so as I mentioned earlier by the time these blocks get published they are somewhat outdated because there is a long publishing process involved especially with reputed publishers. So in order for us to identify additional IOCs associated with these Battlecards we used a technique called Graph Expansion. I'm going to briefly touch on that one. The high level idea here is we take the IOCs identified from the Battlecard and then try to identify additional IOCs associated with them. So the key observation is most of the time attackers they don't act in isolation they often rotate their infrastructure they reuse their infrastructure this intrinsically creates some kind of association which we can leverage to identify new ones. So in this case for example this is the infrastructure timeline for the popular threat actor Kim Suki and they we saw this behavior the second part of last year and as you can see they started with few seed malicious domains with time progresses they created multiple malicious domains which they used in their attacks but they shared the infrastructure they rotated the domains so this helps us to use these rotations and reuse behavior for us to not only identify the malicious domains but also to associate with Kim Suki. And this is another example I just want to show you the intuition behind how we do it so we take the seed domains so in this case it's a US postal service campaign it was a very popular campaign too and what we do is we use different kind of associations IP , in this case certificate or it could be phishing kit and identify other domains linked to these domains so in this case we identify out of those two domains identified from the battle card we identify about 5-6 new domains and then we come up with a technique that the surrounding domains and IPs are malicious and also after we identify whether it's malicious we want to have some kind of technique to attribute that to that because there could be IOCs which are shared by multiple threat actors in the same infrastructure so just because you identify some malicious IOCs in one place it doesn't necessarily belong to the same threat actor. So for that pipeline I'm going to give you a very high level view of this one it's somewhat involved just to give you an idea about how it works we start with IOCs from the battle card and then we build that same network that I showed you for that USPS and then we enrich these different properties for IPs, URLs and ASN and then we do a graph embedding it's kind of another embedding which takes into consideration the number of properties associated with those domains and once we have those embeddings we do another clustering and once we get the clustering we check the cluster membership if there are many known threat actor domains associated in that cluster and we identify that the other domains in that cluster are malicious we attribute them to the threat actor and update the battle card. So I ran this pipeline yesterday again just to update some of the threat actors we tracked so in this slide I'm showing three examples one for Lazarus and the other one for Revolver Rabbit and this for Kimsuki and we already have a lot of published reports and that is the battle card most of the competitors are using And what we did here is we ran off that graph pipeline and identified the clusters and then associations. And we were able to identify new domains and IPs they created after these reports were published. Because these are continuous attacks. And as you can see from the right side, not many vendors have picked up this signal yet. BT-102 means still not many people in the community know about these IOCs. So that shows the proactiveness of the detection. All right, so we read the last slide. So in summary, we showed how to use threat intelligence reports and come up with battle cards. Specifically, we took the CTI reports and then we clustered by the threat actors. And then we used those clustered threat actor reports to identify battle cards using an agentic solution. Once we have those battle cards, we showed you a way how we can automatically update these battle cards to keep up-to-date information. And as part of the next step, right now the system I showed you was using only textual information. But some of these threat actor reports have images and charts and attack chains, which we can leverage to improve the battle cards. And also, another thing is, if you notice carefully, we had a human in the loop still. Because there are cases where the agent could make up certain things. So in order to make sure that we only release valid ones, we still have a human in the loop. But one way to get rid of, one way to reduce the involvement of human is to enrich the validation data. For example, we might be able to pull in the MITRE metrics, tactics and techniques, and all the detailed information into the agent to make sure that whatever techniques and techniques it comes up with are valid. So that's another interesting research avenue. So with that, I'm going to conclude. If you have any questions, I'm happy to answer.