WEBVTT

00:00.000 --> 00:07.220
Alright, let's move on with the next talk, which is brought up by Mohammad Nabeel.

00:07.720 --> 00:13.240
Mohammad Nabeel is a PhD and is also a cyber security veteran.

00:13.340 --> 00:18.840
He has leading efforts on proactive detection and graph-based intelligence research.

00:19.560 --> 00:25.740
He is an open source enthusiast and a member of Apache Software Foundation.

00:25.740 --> 00:28.540
So it's really someone who's special that has joined us today.

00:28.540 --> 00:32.560
He also works with Palo Alto Networks, so you all know who Palo Alto is, right?

00:33.380 --> 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.

00:49.400 --> 00:52.240
So please give it up for Mohammad Nabeel.

00:55.290 --> 00:57.120
Hello everyone, good afternoon.

00:57.120 --> 00:58.180
Can you all hear me?

00:58.540 --> 01:02.360
So thank you for the kind introduction.

01:07.890 --> 01:11.330
So today I'm going to talk about CTI Agent.

01:11.330 --> 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.

01:24.250 --> 01:31.150
So as you all know, the public threat intelligence reports are very useful, but there is a problem.

01:31.150 --> 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.

01:47.790 --> 01:55.130
And also sometimes these threat reports have conflicting information or sometimes they have incomplete information.

01:55.130 --> 01:58.870
And that makes it difficult for us to consume and enforce.

01:58.870 --> 02:03.030
And the third bullet point, it's even more harder.

02:03.030 --> 02:08.430
Most of the time these TTPs, Techniques, Tactics, and Procedures, are implicit.

02:08.430 --> 02:12.230
They are not listed in the threat report.

02:12.230 --> 02:15.870
You have to infer based on the domain knowledge you have.

02:16.210 --> 02:22.250
And because of these reasons, this is not only time-consuming, it's error-prone.

02:22.250 --> 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.

02:38.510 --> 02:42.430
So at a high level, this is what we are going to do.

02:42.530 --> 02:45.270
I've broken it down into four steps.

02:45.290 --> 02:49.810
In the first step, we'll try to collect as many threat reports as possible.

02:49.810 --> 02:54.490
And once we have those, we'll try to group them by the threat actors.

02:54.490 --> 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.

03:02.330 --> 03:10.410
And once we have these better cards, we want to identify the new IOCs associated with these better cards.

03:10.410 --> 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.

03:19.410 --> 03:25.110
Because there is a time frame between writing a blog and getting approved and published.

03:25.110 --> 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.

03:37.350 --> 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.

03:55.290 --> 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.

04:04.910 --> 04:08.170
The same machine learning principle applies here.

04:08.170 --> 04:10.870
If it is garbage in, it's going to be garbage out.

04:13.550 --> 04:20.830
And from each of these reports, what we are trying to do is to identify these structural entities from these reports.

04:20.830 --> 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.

04:32.790 --> 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.

04:47.110 --> 04:56.970
And our goal is to come up with these kinds of reports, which will be consumed with much less ambiguity.

04:57.490 --> 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.

05:11.450 --> 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.

05:24.880 --> 05:27.220
So now we have the reports.

05:27.220 --> 05:32.060
Once we have the reports, we want to have a mechanism which allows us to group them.

05:32.200 --> 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.

05:44.140 --> 05:46.740
We identified two strategies here.

05:46.740 --> 05:52.560
The first one is to take the documents, and take the embedding, and then do the clustering.

05:53.180 --> 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.

06:01.640 --> 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,

06:17.760 --> 06:19.140
and then do the clustering.

06:20.640 --> 06:24.340
And which one do you think outperforms?

06:24.340 --> 06:27.080
Do you think the first one would be better, or the second one?

06:28.120 --> 06:29.360
First one?

06:29.820 --> 06:31.020
Any guess?

06:31.020 --> 06:32.180
Second one?

06:32.820 --> 06:33.760
Alright.

06:33.800 --> 06:36.360
So the answer is actually the second one.

06:38.400 --> 06:47.300
So, when you try this technique, the first one is document embedding, the other one is summary embedding.

06:47.300 --> 06:49.460
And it consistently outperformed.

06:49.460 --> 06:53.720
The silhouette score says how different these clusters are.

06:53.820 --> 06:58.380
If the silhouette score is close to zero, it means the clusters are overlapping.

06:58.380 --> 07:03.060
If it is close to one, you get ideal clusters which has much less overlapping.

07:05.400 --> 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...

07:25.140 --> 07:32.230
So this diagram shows a down-sampled version of some of the reports we analyzed and clustered.

07:32.580 --> 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.

07:40.980 --> 07:46.260
Yeah, give me a second.

07:56.370 --> 08:00.130
So we want to understand why it worked well.

08:00.130 --> 08:06.730
So one reason we hypothesize here is that these are the summaries that LLM generated.

08:06.810 --> 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.

08:17.050 --> 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.

08:32.510 --> 08:37.090
That's why we got much better results with the summaries.

08:37.470 --> 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.

08:47.030 --> 08:50.390
So now we have the group reports.

08:50.450 --> 08:55.450
Each group represents threat intelligence reports for each threat actor.

08:55.450 --> 09:00.270
It could be Gamma Ray Dawn, it could be Kim Sooky or APT23, whatnot.

09:04.720 --> 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.

09:15.320 --> 09:20.480
These are going to be structured reports out of the natural language and the other modalities.

09:20.480 --> 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.

09:30.780 --> 09:37.920
So at a high level, you can propose, use this kind of solution in three ways.

09:37.920 --> 09:39.980
The easiest way is to prompt LLMs.

09:39.980 --> 09:43.240
You just create your prompt and ask to solve the problem.

09:43.240 --> 09:46.720
You give a report and ask to generate the battle card.

09:46.900 --> 09:54.920
And the second one is you are going to ground your data work with some kind of contextual information called RAC.

09:54.920 --> 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.

10:06.480 --> 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.

10:22.060 --> 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.

10:40.620 --> 10:42.900
So why agentic systems?

10:43.280 --> 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.

10:56.040 --> 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.

11:14.850 --> 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.

11:44.030 --> 11:48.710
So this slide shows the two most popular patterns people use.

11:48.710 --> 11:53.770
One is called React and the other one is called Self-Refine.

11:53.770 --> 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.

12:10.070 --> 12:14.210
And it goes in a loop until it comes up with the final answer.

12:14.310 --> 12:16.610
And similar thing for the Self-Refine.

12:17.110 --> 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.

12:25.230 --> 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.

12:36.590 --> 12:41.090
So as you can see, we start with the group threat intelligence reports.

12:41.090 --> 12:42.170
These are the grouped ones.

12:42.170 --> 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.

12:54.170 --> 12:57.830
So usually agent is nothing if you don't have good tools.

12:57.830 --> 13:03.210
The main part of building this agentic system is to build your own tools that can solve the problem.

13:03.210 --> 13:05.950
So the tools are the heart of the system.

13:05.950 --> 13:08.110
In this case, we built three tools.

13:08.190 --> 13:15.230
The report collection tool, the search tool and the extractor tool.

13:17.210 --> 13:17.310
Extractor is

13:20.670 --> 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.

13:32.030 --> 13:37.590
And the search tool helps to identify things missing in the threat intelligence report.

13:37.590 --> 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.

13:51.230 --> 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.

14:01.650 --> 14:07.270
So I want to zoom into the Battlecard extraction tool.

14:16.920 --> 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.

14:31.680 --> 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.

14:41.160 --> 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.

15:10.260 --> 15:15.580
So because of that reason we tried a different approach because it was failing.

15:15.920 --> 15:18.840
We used the, we borrowed the concept from MapReduce.

15:18.840 --> 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.

15:30.080 --> 15:41.140
Once we have Battlecard for each report we have another LLM which synthesizes these Battlecards into one single Battlecard.

15:45.480 --> 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.

15:57.720 --> 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.

16:05.840 --> 16:14.800
So it wrote a detailed program which takes all the Battlecards and deterministically come up with the synthesized report.

16:14.820 --> 16:16.900
I found that one to be cool.

16:17.420 --> 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.

16:31.880 --> 16:41.180
And this is one example trace from one of the execution and this is for the scattered spider.

16:41.200 --> 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.

16:47.680 --> 16:51.680
And this is how a React kind of loop works.

16:51.680 --> 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.

17:06.000 --> 17:14.120
This is another example a similar kind of loop but it's for a different threat actor.

17:14.120 --> 17:16.760
It will call different tools and then stop

17:22.300 --> 17:28.620
and at the end of those agentic process and the synthesis it comes up with a report like this.

17:28.620 --> 17:34.840
This is an example Battlecard that's for the model Libra which is also called scattered spider.

17:34.840 --> 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.

17:47.000 --> 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.

18:13.340 --> 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.

18:28.570 --> 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.

18:46.810 --> 19:00.230
So in order for us to identify additional IOCs associated with these Battlecards we used a technique called Graph Expansion.

19:00.230 --> 19:02.170
I'm going to briefly touch on that one.

19:02.170 --> 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.

19:13.350 --> 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.

19:30.070 --> 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.

20:12.260 --> 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 ,

20:30.660 --> 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.

21:17.320 --> 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,

21:39.840 --> 21:46.800
URLs and ASN and then we do a graph embedding it's kind of another embedding which takes into consideration

21:50.080 --> 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.

22:17.500 --> 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.

22:50.880 --> 22:58.020
And we were able to identify new domains and IPs they created after these reports were published.

22:58.020 --> 23:00.400
Because these are continuous attacks.

23:00.400 --> 23:09.140
And as you can see from the right side, not many vendors have picked up this signal yet.

23:09.140 --> 23:14.460
BT-102 means still not many people in the community know about these IOCs.

23:15.380 --> 23:18.660
So that shows the proactiveness of the detection.

23:21.940 --> 23:24.760
All right, so we read the last slide.

23:24.760 --> 23:30.920
So in summary, we showed how to use threat intelligence reports and come up with battle cards.

23:30.920 --> 23:37.220
Specifically, we took the CTI reports and then we clustered by the threat actors.

23:37.220 --> 23:45.940
And then we used those clustered threat actor reports to identify battle cards using an agentic solution.

23:46.020 --> 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.

23:56.320 --> 24:03.460
And as part of the next step, right now the system I showed you was using only textual information.

24:03.460 --> 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.

24:14.420 --> 24:19.980
And also, another thing is, if you notice carefully, we had a human in the loop still.

24:19.980 --> 24:25.620
Because there are cases where the agent could make up certain things.

24:25.620 --> 24:30.020
So in order to make sure that we only release valid ones, we still have a human in the loop.

24:30.020 --> 24:38.000
But one way to get rid of, one way to reduce the involvement of human is to enrich the validation data.

24:38.000 --> 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.

24:50.840 --> 24:54.000
So that's another interesting research avenue.

24:56.680 --> 24:58.540
So with that, I'm going to conclude.

24:58.540 --> 25:00.660
If you have any questions, I'm happy to answer.

