1 00:00:00,000 --> 00:00:07,220 Alright, let's move on with the next talk, which is brought up by Mohammad Nabeel. 2 00:00:07,720 --> 00:00:13,240 Mohammad Nabeel is a PhD and is also a cyber security veteran. 3 00:00:13,340 --> 00:00:18,840 He has leading efforts on proactive detection and graph-based intelligence research. 4 00:00:19,560 --> 00:00:25,740 He is an open source enthusiast and a member of Apache Software Foundation. 5 00:00:25,740 --> 00:00:28,540 So it's really someone who's special that has joined us today. 6 00:00:28,540 --> 00:00:32,560 He also works with Palo Alto Networks, so you all know who Palo Alto is, right? 7 00:00:33,380 --> 00:00:49,400 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. 8 00:00:49,400 --> 00:00:52,240 So please give it up for Mohammad Nabeel. 9 00:00:55,290 --> 00:00:57,120 Hello everyone, good afternoon. 10 00:00:57,120 --> 00:00:58,180 Can you all hear me? 11 00:00:58,540 --> 00:01:02,360 So thank you for the kind introduction. 12 00:01:07,890 --> 00:01:11,330 So today I'm going to talk about CTI Agent. 13 00:01:11,330 --> 00:01:21,080 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. 14 00:01:24,250 --> 00:01:31,150 So as you all know, the public threat intelligence reports are very useful, but there is a problem. 15 00:01:31,150 --> 00:01:47,710 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. 16 00:01:47,790 --> 00:01:55,130 And also sometimes these threat reports have conflicting information or sometimes they have incomplete information. 17 00:01:55,130 --> 00:01:58,870 And that makes it difficult for us to consume and enforce. 18 00:01:58,870 --> 00:02:03,030 And the third bullet point, it's even more harder. 19 00:02:03,030 --> 00:02:08,430 Most of the time these TTPs, Techniques, Tactics, and Procedures, are implicit. 20 00:02:08,430 --> 00:02:12,230 They are not listed in the threat report. 21 00:02:12,230 --> 00:02:15,870 You have to infer based on the domain knowledge you have. 22 00:02:16,210 --> 00:02:22,250 And because of these reasons, this is not only time-consuming, it's error-prone. 23 00:02:22,250 --> 00:02:37,030 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. 24 00:02:38,510 --> 00:02:42,430 So at a high level, this is what we are going to do. 25 00:02:42,530 --> 00:02:45,270 I've broken it down into four steps. 26 00:02:45,290 --> 00:02:49,810 In the first step, we'll try to collect as many threat reports as possible. 27 00:02:49,810 --> 00:02:54,490 And once we have those, we'll try to group them by the threat actors. 28 00:02:54,490 --> 00:03:01,970 And once we have those groups, we will be using the agent, the number three bullet points, to identify better cards from that. 29 00:03:02,330 --> 00:03:10,410 And once we have these better cards, we want to identify the new IOCs associated with these better cards. 30 00:03:10,410 --> 00:03:19,410 Because the reality is, by the time these blogs get published, or threat reports get published, the IOCs in them are already outdated. 31 00:03:19,410 --> 00:03:25,110 Because there is a time frame between writing a blog and getting approved and published. 32 00:03:25,110 --> 00:03:34,450 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. 33 00:03:37,350 --> 00:03:55,270 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. 34 00:03:55,290 --> 00:04:04,890 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. 35 00:04:04,910 --> 00:04:08,170 The same machine learning principle applies here. 36 00:04:08,170 --> 00:04:10,870 If it is garbage in, it's going to be garbage out. 37 00:04:13,550 --> 00:04:20,830 And from each of these reports, what we are trying to do is to identify these structural entities from these reports. 38 00:04:20,830 --> 00:04:30,930 The summary of this report, and the campaign it is representing, and the threat actor it is about, and the indicators and the TTPs. 39 00:04:32,790 --> 00:04:44,810 The TTPs are grounded based on the MITRE, the famous MITRE ATT&CK metric, which has 14 tactics and 300 plus techniques. 40 00:04:47,110 --> 00:04:56,970 And our goal is to come up with these kinds of reports, which will be consumed with much less ambiguity. 41 00:04:57,490 --> 00:05:10,990 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. 42 00:05:11,450 --> 00:05:21,330 And for each campaign, we will be identifying the IOCs, the TTPs, any tools they use, and any binaries they use for the attack. 43 00:05:24,880 --> 00:05:27,220 So now we have the reports. 44 00:05:27,220 --> 00:05:32,060 Once we have the reports, we want to have a mechanism which allows us to group them. 45 00:05:32,200 --> 00:05:41,920 So this is where you use unsupervised learning to identify from a list of random items, to find some kind of a grouping. 46 00:05:44,140 --> 00:05:46,740 We identified two strategies here. 47 00:05:46,740 --> 00:05:52,560 The first one is to take the documents, and take the embedding, and then do the clustering. 48 00:05:53,180 --> 00:06:01,460 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. 49 00:06:01,640 --> 00:06:17,760 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, 50 00:06:17,760 --> 00:06:19,140 and then do the clustering. 51 00:06:20,640 --> 00:06:24,340 And which one do you think outperforms? 52 00:06:24,340 --> 00:06:27,080 Do you think the first one would be better, or the second one? 53 00:06:28,120 --> 00:06:29,360 First one? 54 00:06:29,820 --> 00:06:31,020 Any guess? 55 00:06:31,020 --> 00:06:32,180 Second one? 56 00:06:32,820 --> 00:06:33,760 Alright. 57 00:06:33,800 --> 00:06:36,360 So the answer is actually the second one. 58 00:06:38,400 --> 00:06:47,300 So, when you try this technique, the first one is document embedding, the other one is summary embedding. 59 00:06:47,300 --> 00:06:49,460 And it consistently outperformed. 60 00:06:49,460 --> 00:06:53,720 The silhouette score says how different these clusters are. 61 00:06:53,820 --> 00:06:58,380 If the silhouette score is close to zero, it means the clusters are overlapping. 62 00:06:58,380 --> 00:07:03,060 If it is close to one, you get ideal clusters which has much less overlapping. 63 00:07:05,400 --> 00:07:20,420 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... 64 00:07:25,140 --> 00:07:32,230 So this diagram shows a down-sampled version of some of the reports we analyzed and clustered. 65 00:07:32,580 --> 00:07:40,980 There are about seven contactors we are tracking here, and it shows how well these documents get clustered based on the summary. 66 00:07:40,980 --> 00:07:46,260 Yeah, give me a second. 67 00:07:56,370 --> 00:08:00,130 So we want to understand why it worked well. 68 00:08:00,130 --> 00:08:06,730 So one reason we hypothesize here is that these are the summaries that LLM generated. 69 00:08:06,810 --> 00:08:17,050 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. 70 00:08:17,050 --> 00:08:32,510 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. 71 00:08:32,510 --> 00:08:37,090 That's why we got much better results with the summaries. 72 00:08:37,470 --> 00:08:44,910 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. 73 00:08:47,030 --> 00:08:50,390 So now we have the group reports. 74 00:08:50,450 --> 00:08:55,450 Each group represents threat intelligence reports for each threat actor. 75 00:08:55,450 --> 00:09:00,270 It could be Gamma Ray Dawn, it could be Kim Sooky or APT23, whatnot. 76 00:09:04,720 --> 00:09:15,320 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. 77 00:09:15,320 --> 00:09:20,480 These are going to be structured reports out of the natural language and the other modalities. 78 00:09:20,480 --> 00:09:30,660 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. 79 00:09:30,780 --> 00:09:37,920 So at a high level, you can propose, use this kind of solution in three ways. 80 00:09:37,920 --> 00:09:39,980 The easiest way is to prompt LLMs. 81 00:09:39,980 --> 00:09:43,240 You just create your prompt and ask to solve the problem. 82 00:09:43,240 --> 00:09:46,720 You give a report and ask to generate the battle card. 83 00:09:46,900 --> 00:09:54,920 And the second one is you are going to ground your data work with some kind of contextual information called RAC. 84 00:09:54,920 --> 00:10:06,200 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. 85 00:10:06,480 --> 00:10:17,880 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. 86 00:10:22,060 --> 00:10:38,060 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. 87 00:10:40,620 --> 00:10:42,900 So why agentic systems? 88 00:10:43,280 --> 00:10:56,040 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. 89 00:10:56,040 --> 00:11:10,980 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. 90 00:11:14,850 --> 00:11:42,750 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. 91 00:11:44,030 --> 00:11:48,710 So this slide shows the two most popular patterns people use. 92 00:11:48,710 --> 00:11:53,770 One is called React and the other one is called Self-Refine. 93 00:11:53,770 --> 00:12:10,070 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. 94 00:12:10,070 --> 00:12:14,210 And it goes in a loop until it comes up with the final answer. 95 00:12:14,310 --> 00:12:16,610 And similar thing for the Self-Refine. 96 00:12:17,110 --> 00:12:23,130 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. 97 00:12:25,230 --> 00:12:36,290 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. 98 00:12:36,590 --> 00:12:41,090 So as you can see, we start with the group threat intelligence reports. 99 00:12:41,090 --> 00:12:42,170 These are the grouped ones. 100 00:12:42,170 --> 00:12:54,170 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. 101 00:12:54,170 --> 00:12:57,830 So usually agent is nothing if you don't have good tools. 102 00:12:57,830 --> 00:13:03,210 The main part of building this agentic system is to build your own tools that can solve the problem. 103 00:13:03,210 --> 00:13:05,950 So the tools are the heart of the system. 104 00:13:05,950 --> 00:13:08,110 In this case, we built three tools. 105 00:13:08,190 --> 00:13:15,230 The report collection tool, the search tool and the extractor tool. 106 00:13:17,210 --> 00:13:17,310 Extractor is 107 00:13:20,670 --> 00:13:31,910 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. 108 00:13:32,030 --> 00:13:37,590 And the search tool helps to identify things missing in the threat intelligence report. 109 00:13:37,590 --> 00:13:51,230 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. 110 00:13:51,230 --> 00:13:59,870 It will go through each of the CTI reports and then try to analyze them and identify the artifact that we mentioned about Battlecard. 111 00:14:01,650 --> 00:14:07,270 So I want to zoom into the Battlecard extraction tool. 112 00:14:16,920 --> 00:14:31,680 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. 113 00:14:31,680 --> 00:14:41,160 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. 114 00:14:41,160 --> 00:15:10,260 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. 115 00:15:10,260 --> 00:15:15,580 So because of that reason we tried a different approach because it was failing. 116 00:15:15,920 --> 00:15:18,840 We used the, we borrowed the concept from MapReduce. 117 00:15:18,840 --> 00:15:30,020 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. 118 00:15:30,080 --> 00:15:41,140 Once we have Battlecard for each report we have another LLM which synthesizes these Battlecards into one single Battlecard. 119 00:15:45,480 --> 00:15:57,720 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. 120 00:15:57,720 --> 00:16:05,840 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. 121 00:16:05,840 --> 00:16:14,800 So it wrote a detailed program which takes all the Battlecards and deterministically come up with the synthesized report. 122 00:16:14,820 --> 00:16:16,900 I found that one to be cool. 123 00:16:17,420 --> 00:16:29,960 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. 124 00:16:31,880 --> 00:16:41,180 And this is one example trace from one of the execution and this is for the scattered spider. 125 00:16:41,200 --> 00:16:47,680 So we took all the reports and sent it to the LLM that agent and these are the traces that they go through. 126 00:16:47,680 --> 00:16:51,680 And this is how a React kind of loop works. 127 00:16:51,680 --> 00:17:04,120 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. 128 00:17:06,000 --> 00:17:14,120 This is another example a similar kind of loop but it's for a different threat actor. 129 00:17:14,120 --> 00:17:16,760 It will call different tools and then stop 130 00:17:22,300 --> 00:17:28,620 and at the end of those agentic process and the synthesis it comes up with a report like this. 131 00:17:28,620 --> 00:17:34,840 This is an example Battlecard that's for the model Libra which is also called scattered spider. 132 00:17:34,840 --> 00:17:47,000 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. 133 00:17:47,000 --> 00:18:13,340 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. 134 00:18:13,340 --> 00:18:24,780 And finally we also list the sources from which the agent has used two reports from our report to generate this report. 135 00:18:28,570 --> 00:18:46,730 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. 136 00:18:46,810 --> 00:19:00,230 So in order for us to identify additional IOCs associated with these Battlecards we used a technique called Graph Expansion. 137 00:19:00,230 --> 00:19:02,170 I'm going to briefly touch on that one. 138 00:19:02,170 --> 00:19:13,350 The high level idea here is we take the IOCs identified from the Battlecard and then try to identify additional IOCs associated with them. 139 00:19:13,350 --> 00:19:30,070 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. 140 00:19:30,070 --> 00:20:09,170 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. 141 00:20:12,260 --> 00:20:30,660 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 , 142 00:20:30,660 --> 00:21:15,380 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. 143 00:21:17,320 --> 00:21:39,840 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, 144 00:21:39,840 --> 00:21:46,800 URLs and ASN and then we do a graph embedding it's kind of another embedding which takes into consideration 145 00:21:50,080 --> 00:22:14,840 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. 146 00:22:17,500 --> 00:22:50,880 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. 147 00:22:50,880 --> 00:22:58,020 And we were able to identify new domains and IPs they created after these reports were published. 148 00:22:58,020 --> 00:23:00,400 Because these are continuous attacks. 149 00:23:00,400 --> 00:23:09,140 And as you can see from the right side, not many vendors have picked up this signal yet. 150 00:23:09,140 --> 00:23:14,460 BT-102 means still not many people in the community know about these IOCs. 151 00:23:15,380 --> 00:23:18,660 So that shows the proactiveness of the detection. 152 00:23:21,940 --> 00:23:24,760 All right, so we read the last slide. 153 00:23:24,760 --> 00:23:30,920 So in summary, we showed how to use threat intelligence reports and come up with battle cards. 154 00:23:30,920 --> 00:23:37,220 Specifically, we took the CTI reports and then we clustered by the threat actors. 155 00:23:37,220 --> 00:23:45,940 And then we used those clustered threat actor reports to identify battle cards using an agentic solution. 156 00:23:46,020 --> 00:23:55,420 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. 157 00:23:56,320 --> 00:24:03,460 And as part of the next step, right now the system I showed you was using only textual information. 158 00:24:03,460 --> 00:24:14,380 But some of these threat actor reports have images and charts and attack chains, which we can leverage to improve the battle cards. 159 00:24:14,420 --> 00:24:19,980 And also, another thing is, if you notice carefully, we had a human in the loop still. 160 00:24:19,980 --> 00:24:25,620 Because there are cases where the agent could make up certain things. 161 00:24:25,620 --> 00:24:30,020 So in order to make sure that we only release valid ones, we still have a human in the loop. 162 00:24:30,020 --> 00:24:38,000 But one way to get rid of, one way to reduce the involvement of human is to enrich the validation data. 163 00:24:38,000 --> 00:24:50,840 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. 164 00:24:50,840 --> 00:24:54,000 So that's another interesting research avenue. 165 00:24:56,680 --> 00:24:58,540 So with that, I'm going to conclude. 166 00:24:58,540 --> 00:25:00,660 If you have any questions, I'm happy to answer.