WEBVTT

00:00.000 --> 00:01.500
Let's start.

00:03.460 --> 00:04.840
Happy to be here.

00:04.840 --> 00:08.960
This is my second time in DEF CON and second time talking on the creator stage.

00:10.420 --> 00:18.780
I'll be talking about a mix of my favorite topics, which is network fingerprinting, honeypots, and AI agents.

00:18.940 --> 00:24.380
So I kind of mixed them all together and created an open source tool just a few weeks ago.

00:24.380 --> 00:26.300
I released it last week.

00:26.300 --> 00:35.420
And yeah, I'm gonna go through why it can be useful and how you can probably use it for different use cases.

00:35.420 --> 00:43.160
Because usually I start with a fun, crazy idea which doesn't have any production use case.

00:43.160 --> 00:47.440
And then it turns out that, okay, this is useful.

00:47.440 --> 00:49.500
Maybe I should release it to the rest of the world.

00:50.120 --> 00:52.140
It was the case with this one as well.

00:52.460 --> 00:55.220
So before we get to the slides, just a quick intro.

00:55.220 --> 01:03.840
I'm Adil, working on security detection and response for over 10 years now.

01:04.580 --> 01:10.020
Part of it in Google and now at an AI startup, AI chatbot startup.

01:10.740 --> 01:20.500
And yeah, outside work, I just work on random honeypot projects and things that I can easily release without getting approval from the company.

01:20.500 --> 01:28.020
So yeah, I don't want to be known just by honeypots and network finger-painting, but that's the easiest thing to publish.

01:30.540 --> 01:32.500
I have a bunch of open source projects.

01:32.500 --> 01:38.180
You can take a look at my GitHub repo, 0x4d31.

01:39.720 --> 01:42.700
That's my Twitter handle and also GitHub.

01:44.180 --> 01:47.460
I have a QR code and all at the end of the slides.

01:47.460 --> 01:53.780
So if it didn't work, I can just show you on my MacBook.

01:59.190 --> 02:03.570
Okay, so the initial motivation and why I created this thing.

02:03.570 --> 02:06.670
So what is even this thing we're going to talk about?

02:06.670 --> 02:11.610
So it's basically a fingerprint-based or fingerprint-aware reverse proxy.

02:12.330 --> 02:15.250
This is just a term I made up.

02:15.250 --> 02:17.110
It's not a known term.

02:17.110 --> 02:19.810
So if you don't know what it is, that's fine.

02:20.230 --> 02:31.570
So the idea was to see if I can mess with the attackers based on their client fingerprints rather than just IP or user agent and things like that, which can easily be faked.

02:33.710 --> 02:41.670
So I have a quick primer on the fingerprints and how they work, so don't worry if you don't know anything about the fingerprints.

02:42.490 --> 02:52.770
But yeah, that was the idea, like just to have a more intelligent way to waste attackers' time or dynamically route them to different systems or different honeypots and things like that.

02:54.490 --> 02:57.990
But why at the reverse proxy level?

02:57.990 --> 03:05.970
Why not just a passive system like Suricata or Zeek to just capture all these network fingerprints?

03:06.250 --> 03:08.050
Basically, I started from there.

03:08.050 --> 03:21.110
Like a few years ago, I had a talk about HoneyTLS, which was just a very janky Nginx SSL reverse proxy, which I kind of used as a honeypot.

03:21.110 --> 03:27.070
And I collected these TLS fingerprints and other network metadata using Zeek.

03:27.070 --> 03:28.670
It was broad at the time.

03:29.270 --> 03:44.730
And yeah, just my goal was to see if we can find more interesting patterns looking at these fingerprints and extra metadata rather than just looking at the source IP, user agent, and the request.

03:44.730 --> 03:56.590
Because if you attended some honeypot talks before, you see that all you get is just like, I set up this honeypot, and I got these 100,000 requests in a day.

03:57.130 --> 04:01.850
The top request was from this country, these ports, and these requests, and that's it.

04:02.730 --> 04:06.950
So seven years ago or eight years ago, I was working on this HoneyTLS thing.

04:07.050 --> 04:12.270
I captured logs for about maybe three months.

04:12.730 --> 04:16.730
And then I had this talk at the HoneyNet conference.

04:16.970 --> 04:22.010
As always, I was creating the slides and looking at the new data just a night before.

04:22.110 --> 04:34.030
And then I found a really, really interesting pattern in the logs, which I will hopefully show you later in the slides, which kind of proved that how useful these extra metadata is.

04:34.310 --> 04:48.150
So even if you don't want to use this as a kind of signal or as a mechanism to route the traffic to other systems, you can just have this as an extra metadata or signal for your analysis.

04:48.150 --> 04:50.410
It would be very useful for the Threat Intel stuff.

04:51.850 --> 05:05.850
And another reason that we do this at the reverse proxy level is, so with my previous setup, I was capturing these connections with Zeek, as I said, and you get just the TLS handshake at that level.

05:05.850 --> 05:08.150
You don't get the HTTP logs.

05:08.150 --> 05:22.770
So I had to collect the HTTP logs from the Honeypot, which was the NGINX I mentioned, and I had to join it with the TLS logs to get something useful, to have both HTTP and the TLS stuff there.

05:22.950 --> 05:26.730
But if you do this at the reverse proxy level, you just get that automatically.

05:26.730 --> 05:32.130
So you just have both TLS stuff, the HTTP stuff, it would be way more useful.

05:32.250 --> 05:37.330
You can also have the HTTP fingerprints in addition to TLS fingerprints as well.

05:40.630 --> 05:55.910
Okay, so another reason I was thinking of using fingerprints, and maybe it's useful for you as well, is relying on IP addresses and user agents or things that can easily be changed or faked is...

05:57.690 --> 06:03.330
Just a second, maybe my slides are recorded, so I can move on the slides as well.

06:04.950 --> 06:10.290
Yeah, so the reason is IPs and user agents can easily be faked.

06:10.490 --> 06:15.690
And so they just rotate IP addresses like 100 times per minute.

06:15.690 --> 06:28.270
And if you set up like honeypots before, you see that you get a lot of requests from different IPs, different ranges, but they all seem to be from one actor.

06:28.330 --> 06:34.090
You can't really prove it unless you have these additional data, which is like the fingerprints and a few other things.

06:36.110 --> 06:52.090
So instead of relying on user agents for blocking bots or crawlers or things that you don't like, or just going after this whack-a-mole of blocking IP addresses, you can just rely on extra things deeper into the packets.

06:52.090 --> 06:55.860
So for TLS, it's TLS handshakes, client hellos.

06:56.350 --> 07:08.650
And for HTTP2, there are these extra frames like settings and update window and priority that you can use, which is very unique for different clients.

07:09.150 --> 07:13.590
And even for HTTP itself, just like the order of headers are really cool.

07:13.590 --> 07:26.730
Like it can easily be faked again, maybe a bit harder than user agents, because like, for example, if someone uses like Python request, it always comes with these three headers in the same order.

07:26.770 --> 07:31.690
So they can change it, but it takes a bit more effort compared to user agents.

07:33.510 --> 07:39.870
But yeah, once you have these metadata or fingerprints, you can block easier and smarter.

07:39.870 --> 07:43.530
You can deceive better if you're into Honeypot.

07:43.730 --> 07:48.590
And you can find patterns that otherwise would be impossible to find.

07:48.590 --> 07:53.310
I will show you some very interesting patterns, which I found using these fingerprints.

07:54.910 --> 08:20.670
So just a question before we go further, can your WAF currently, like whatever application firewalls you're using or like AWS, whatever edge service that you're using in front of your production services, allow you right now to block things like Zap or Burp Suite or like other tools like that?

08:21.410 --> 08:22.730
No.

08:22.890 --> 08:39.330
I know like a few providers, like probably AWS and Cloudflare provide something like that, but it doesn't let you customize things and say like, for example, I don't want to see traffic from this specific TLS fingerprint.

08:39.330 --> 08:45.950
They just apparently have this checkbox that you can say, OK, protect me from known bad bots or things like that, maybe.

08:47.730 --> 08:55.850
But yeah, so because of that, I thought, OK, it might be interesting to just set up, like create a new reverse proxy.

08:55.850 --> 09:06.570
My intention was not to build something like huge from scratch, like Nginx or Caddy or things like that, because those are way more complex, harder to customize and things like that.

09:06.570 --> 09:09.990
But I wanted something very simple for my use case.

09:09.990 --> 09:15.930
And so, yeah, that's why I started building this tool.

09:15.930 --> 09:34.090
You can even do very fun things that I'm sure none of other application firewalls and those cloud-based services can provide, such as redirecting the request based on their fingerprints to honeypots or deceiving them by some other methods or targeting them,

09:34.090 --> 09:35.810
like slowing them down.

09:37.370 --> 09:41.390
OK, so at this point, we know most WAFs don't do that.

09:41.390 --> 09:43.490
So that was basically the reason.

09:44.190 --> 10:04.670
So Finch, this tool I released last week, is a fingerprintable TLS reverse proxy that lets you deny routes, tarp it, and deceive based on those client's fingerprints, and also other basic metadata like the request and the user agents and the other HTTP methods.

10:04.670 --> 10:10.210
Even something I added, I just remembered, was Suricata alerts.

10:10.310 --> 10:18.630
So without relying on the Suricata service itself, I added this parser for Suricata HTTP rules.

10:18.630 --> 10:24.450
It doesn't support all the keyboards and all the complex things, but it works for my use case.

10:24.450 --> 10:36.410
So you can just download the Suricata rules, put it there, enable the Suricata module, and then all the requests coming will be matched against those Suricata HTTP rules as well.

10:36.490 --> 10:40.570
And then it will be exposed into the tool configuration as well.

10:40.570 --> 10:46.610
So you can decide to redirect traffic or block based on the Suricata message as well.

10:46.610 --> 10:53.150
So you can say like, okay, if it matches with exploit message in the Suricata, just block it or redirect it to Honeypot.

10:54.610 --> 11:08.410
Okay, so in the slides, I had this example for ZAP web application scanner that I will show that you can customize the user agents from the tool setting, but that's it.

11:08.410 --> 11:13.510
Like you can't change anything about the order of HTTP headers or TLS or things like that.

11:13.510 --> 11:26.330
So you could just use these fingerprints in this easy to use HCL configuration, which I have in my tool and block these.

11:26.430 --> 11:33.790
So for the configuration, you can't see it, similar to platform configs.

11:33.790 --> 11:35.150
So very simple.

11:35.150 --> 11:43.830
It's not that messy compared to the other reverse proxies, which like it's always like when you change something, it breaks everything.

11:43.910 --> 11:51.110
And it's either like these complex JSON or like YAML or things like that.

11:51.110 --> 11:59.050
But yeah, I decided to go with, I did like a few iteration and at the end, I came up with the custom HCL one.

12:01.330 --> 12:10.290
Okay, so at this point in the slides, I will show an example for the zap scanner, which can slow down the attacker.

12:10.290 --> 12:11.750
It does the targeting.

12:12.230 --> 12:19.010
So whenever someone uses zap to scan your application, it slows down.

12:19.010 --> 12:25.350
And for example, NS scan, which normally takes like 20 seconds, like I tried it with Nmap as well.

12:25.350 --> 12:27.630
It takes more than 10 minutes to finish.

12:27.630 --> 12:32.510
So you can just waste attackers time or resources that way.

12:32.510 --> 12:38.830
I mean, it kind of wastes your resources as well, but I put some guardrails and protections and limits.

12:38.830 --> 12:45.430
So there can't be, for example, more than 16 simultaneously open connections to your proxy.

12:45.430 --> 12:46.990
You can customize that.

12:49.650 --> 12:59.710
Okay, so before the fun part starts, we need some basics about the fingerprints and how it works for the people who don't know what it is and what we're actually talking about.

13:01.630 --> 13:11.250
So where these signals, like you can find, like where are these signals on entropy we're talking about?

13:11.250 --> 13:16.870
So as I mentioned before, briefly in TLS, you can look at the TLS handshakes.

13:16.870 --> 13:25.090
And although like TLS is encrypted, but like that initial handshake, especially client hello and server hello are clear text.

13:25.090 --> 13:28.490
So you can just look at that, extract those parameters.

13:28.490 --> 13:32.390
And those are very unique for different libraries and clients.

13:32.410 --> 13:33.630
It's not a silver bullet.

13:33.630 --> 13:37.970
Like some people I've seen that use it as a signature for writing detections.

13:37.970 --> 13:41.470
It doesn't work well in that use case.

13:41.470 --> 13:54.230
I mean, there are a lot of command and control, like C2 agents and implants that use very specific TLS configurations, which is very unique to them.

13:54.230 --> 13:57.430
So in those cases, you can use it for like detecting those.

13:57.430 --> 14:01.530
Any network monitoring tools like Zeek in your network.

14:01.530 --> 14:10.490
But in other cases, I don't suggest to use it as like the only detection method because it would be very noisy, false positive, false negative and things like that.

14:10.490 --> 14:14.250
So I suggest using it just as another data point.

14:14.250 --> 14:22.910
So just something besides user agent and other metadata you have from the networks, just add these as well, which help you find very interesting stuff.

14:24.070 --> 14:30.450
For HTTP, as I said, the headers and the order that those headers appear is where you should look for.

14:30.650 --> 14:37.730
And HTTP2, same, like there are some frames, like settings, updates and priorities, which you can use for these fingerprints.

14:39.190 --> 14:42.850
So in TLS case, we'll start with TLS.

14:44.050 --> 14:46.510
In the client flow, we have multiple parameters.

14:46.510 --> 14:51.050
One is version, the other one is cipher suites and then extensions.

14:51.550 --> 14:57.370
These extensions and cipher suites usually come in a very specific order.

14:58.270 --> 15:04.470
Again, these are things which depend on the underlying library that the client uses.

15:04.470 --> 15:15.230
So for example, if Google Chrome uses BoringSSL and another tool uses the same version of BoringSSL on the same OS, you probably get the same fingerprints for both two.

15:16.330 --> 15:18.370
But it's nice.

15:18.470 --> 15:26.530
In some cases, you see some very unique things, especially if you combine that with other things, like for example, in HTTP, as I mentioned.

15:26.530 --> 15:30.250
That's why I really like to do this at the reverse proxy level.

15:30.250 --> 15:37.450
Because you can then cross-check like the HTTP fingerprints and info that you have with the TLS ones.

15:37.450 --> 15:43.890
So maybe the attacker tries to fake the TLS and forget about the HTTP and vice versa.

15:43.890 --> 15:52.850
So then by checking these two, you can say like, oh, this pretends to be Google Chrome by looking at the user agents and fingerprints.

15:52.850 --> 15:59.410
But then you look at the TLS stuff, it's like a CAV, for example, or some other random tools.

16:00.650 --> 16:20.570
OK, so I just skipped these slides because you can see that it's just a bunch of screenshots for TLS packets and handshakes, which shows where these versions and crypto algorithm exist.

16:20.570 --> 16:26.250
I will just share after the talk my slides in my GitHub repo, you can just download and go through them.

16:27.530 --> 16:31.630
So one of the most common fingerprint techniques is Jottery.

16:31.630 --> 16:33.670
You may have heard about Jottery.

16:34.890 --> 16:41.470
There's been a lot of TLS fingerprint and similar work like in the past, like 10 or 20 years.

16:41.470 --> 16:55.270
So this is not just a very new concept or thing, but it was very hard to use those previous fingerprinting techniques because it was not easy to share them or use them in the different tools.

16:55.270 --> 16:59.470
There was no support in different, for example, security products.

16:59.930 --> 17:06.450
But Jottery, created by one of my former colleagues back in Salesforce, is a very easy one.

17:06.450 --> 17:18.810
It's just a hash that combines versions, ciphers, extensions, curves, and elliptic curve format in a specific format, combine them together and create an MD5 hash on it.

17:18.910 --> 17:38.910
There's been also some issues with it because, for example, some legitimate tools like Google Chrome browser, they have this extension called Grease, which just randomizes these extensions, which kind of mess with these like Jottery fingerprints because if you capture traffic from Google Chrome,

17:38.910 --> 17:44.370
you see that, oh, it generated 20 different Jottery and that's why.

17:45.910 --> 17:53.730
But generally, it works pretty well, especially if you also log the raw strings before applying the hash to.

17:53.790 --> 18:03.310
Because the raw string, when you just put all these parameters together, it kind of shows you some interesting patterns, which the MD5 one doesn't.

18:03.310 --> 18:09.950
Because looking at an MD5, you just see a random packet, random string, which doesn't mean anything.

18:10.050 --> 18:20.630
But looking at those raw strings before applying the hash, you can actually see like, oh, this was like TLS 1.2 or this was like a list of cryptos and stuff.

18:21.270 --> 18:26.610
And that's why he created the next version, which is Jot4.

18:26.710 --> 18:31.850
So in Jot4, it's more readable, rule-friendly.

18:31.850 --> 18:38.270
You can just, for example, write a rule to look for the first few characters and then asterisks, the rest.

18:38.530 --> 18:42.370
Because the format is defined in a way that's easy to do that.

18:42.370 --> 18:48.430
And just by looking at this string, you can say that, oh, this was like a quick traffic or was it like TLS 1.3.

18:48.550 --> 18:51.190
And then you can see the rest of things as well like that.

18:51.190 --> 19:11.230
So it's way more readable and it's resilient to that Google Chrome randomization thing, as I mentioned, because it doesn't store the ciphers and algorithms in the order that they appear, but they actually sort it and then generate the hash.

19:11.230 --> 19:13.670
So it solves that problem.

19:15.950 --> 19:23.510
One quick other thing about TLS and then we move on to HTTP and other fun stuff.

19:23.850 --> 19:29.850
So QUIC is this protocol, which is like TLS 1.3 over UDP.

19:31.650 --> 19:55.710
So just like searching about it, because majority of web traffic right now is on QUIC and it's not like the normal TLS over TCP traffic anymore, especially if you use Google or Cloudflare or websites like behind Cloudflare, you have this QUIC thing, which there's been a lot of different versions.

19:55.710 --> 20:05.330
Google started that and then IETF standards did some standardization to make it available like to other people and folks.

20:05.390 --> 20:11.650
So the thing is, most of network monitoring tools are currently blind to this traffic.

20:11.650 --> 20:14.050
Like there are no parsers for QUIC.

20:14.050 --> 20:19.530
Wireshark has some modules by default, you don't need to install anything.

20:19.610 --> 20:27.990
So just spin up like Wireshark, search for QUIC and you will see the traffic.

20:27.990 --> 20:37.230
So the interesting thing about QUIC is it's not like the normal TLS traffic, which you can just look at the traffic and extract the TLS handshake, like the client hello.

20:37.230 --> 20:47.190
The problem with QUIC is that TLS client hello is protected by some encryptions which can be recovered and decoded.

20:47.190 --> 20:48.470
So it's not created.

20:48.470 --> 20:50.110
So no one can look at that.

20:50.110 --> 20:58.250
It's a specific standard that if you know it, you can decrypt and extract that TLS client hello inside it.

20:58.650 --> 21:05.470
So the thing I did, I add some experimental supports of QUIC to my tool.

21:05.810 --> 21:09.000
So I tested with Carol, it worked.

21:09.000 --> 21:12.980
With Google Chrome, it didn't work for some reason.

21:12.980 --> 21:14.440
So I need to fix the problem.

21:14.900 --> 21:18.540
But anyway, this is just like an experimental thing which I added support for and it's cool.

21:18.540 --> 21:28.620
So even if you have like HTTP3 QUIC traffic, you can do the fingerprinting, applying the same JAW3 and JAW4 fingerprinting to those as well.

21:28.620 --> 21:34.620
So I also included a client tool which you can use.

21:34.620 --> 21:42.080
It's in the repo that it monitors the QUIC traffic or the PCAP and it extracts these fingerprints from the QUIC traffic.

21:45.620 --> 21:54.520
Okay, so for HTTP, as I said, I really like HTTP1 because it's very simple and it's very effective.

21:55.060 --> 21:59.100
It's a very hard, strong signal for a lot of clients.

21:59.280 --> 22:03.440
Just looking at the headers and the order of them, that's it.

22:03.440 --> 22:10.980
I was using this for many years in my other open source tool called FAT which is like fingerprint all the things.

22:11.080 --> 22:19.580
It just collects metadata and I had this very simple HTTP fingerprinting based on just the headers and the orders.

22:20.000 --> 22:31.140
But if you want to have something like more standard, JAW4 also have a HTTP version called JAW4-H and I added support to my tool as well.

22:31.140 --> 22:36.940
So just out of the box, you see JAW4 beside the JAW3 stuff as well.

22:37.100 --> 22:39.940
It's a bit more than just headers and the orders.

22:39.940 --> 22:52.820
It also captures some cookies and referrers and things like that which you can specifically identify one specific clients or application versus like just in general, Google Chrome version X.

22:55.060 --> 23:01.500
And the last one in the list of fingerprinting 101 is HTTP2, as I mentioned.

23:01.500 --> 23:03.260
I don't want to repeat it again.

23:03.260 --> 23:25.940
But there's this method which someone from Akamai worked on which combines settings, window update and priority and creates these fingerprints which I also really like because combination of these HTTP2, HTTP and TLS gives you a very strong signal about the clients.

23:25.960 --> 23:29.860
Like you can do way more reliable fingerprinting based on those.

23:31.900 --> 23:36.540
And before we end this section, there is this part about evasion techniques.

23:36.540 --> 23:42.040
So as I mentioned, of course, these fingerprinting techniques are not like bulletproof.

23:42.040 --> 23:54.300
There are many ways attackers can like fake these or mimic, for example, in a specific known client application by just changing the way they create these clients.

23:54.300 --> 23:56.420
Hello, for example, for TLS.

23:56.500 --> 24:03.060
It's interesting, like a similar talk I had like five years ago, no known tools.

24:03.720 --> 24:06.120
Yeah, there was just one called UTLS.

24:06.120 --> 24:12.280
There's this library that you can use to fake HTTP TLS fingerprints.

24:12.380 --> 24:24.280
But now like just before the talk, I was searching to see if there are any new tools and there are like tens of other new tools because a lot more people started adopting Jottery.

24:24.280 --> 24:30.660
Like now Jottery and Jot4 is supported in like AWS, Cloudflare, many tools like Suricata.

24:31.360 --> 24:34.460
Zeek and other open source and commercial tools.

24:34.460 --> 24:41.180
And because of that, now they know the value of these fingerprints for defenders to detect bots or specific tools.

24:41.180 --> 24:45.400
So now they started using this mechanism to fake them.

24:45.400 --> 24:54.140
But even that, as I said, one thing you can do is to just have multiple layers of fingerprints, HTTP, TLS and a few other things.

24:54.140 --> 24:57.360
And it would be way harder to fake those for the attackers.

24:57.360 --> 25:04.640
They would probably miss to do like all of those because they already know that a lot of companies don't even collect like Jot3s.

25:04.720 --> 25:06.740
So yeah, they don't care.

25:06.740 --> 25:17.960
Like they just like maybe just maybe less than, I don't know, like I don't have a number, but less than 10% even know about these Jot3s like on the offender sites.

25:17.960 --> 25:19.220
And yeah.

25:20.360 --> 25:29.220
There was even one I found which was very interesting because one of the demos I had was I was fingerprinting Berp suite repeater module.

25:29.220 --> 25:37.420
If anyone wants to use like Berp suite to scan your website, do some bug bounty hunting and finding bugs, you can just block them.

25:37.420 --> 25:46.100
I mean, don't do that unless you're a very broke startup or you don't have like resource to fix your security.

25:46.100 --> 25:49.940
Like I mean, blocking security scanners is not the solution.

25:50.020 --> 26:00.560
But there is this module in Berp suite called Berp Awesome TLS, which you can install and fake the TLS fingerprint of the Berp suite as well.

26:00.560 --> 26:01.160
It's nice.

26:02.780 --> 26:06.980
Okay, at this point, I definitely need to have some slides.

26:07.440 --> 26:10.560
Otherwise, I can just show you the slides like this.

26:12.500 --> 26:18.160
Or something I could do was just to share these so you could all just look it in your phone.

26:18.160 --> 26:22.420
But I guess I will do it after the talk.

26:22.500 --> 26:24.820
So I have this graph, which is really nice.

26:24.820 --> 26:38.220
It shows how by just adding these fingerprints to the mix, you can uncover some very interesting patterns which otherwise would be impossible to find.

26:38.240 --> 26:46.020
So what I did was when I set up my high TLS project, I collected TLS fingerprints, as I mentioned.

26:46.280 --> 26:52.160
So I started visualizing these, creating some directed graphs with D3.

26:52.160 --> 27:03.960
And the pattern was very interesting because I was expecting to see like the source nodes are source IPs and the destination nodes are these TLS fingerprints.

27:03.960 --> 27:13.500
So what you expect to see is usually seeing one Jot3 fingerprint with a lot of source IPs around it, right?

27:13.500 --> 27:22.140
Which means someone used Nmap and a lot of other people use the same tool as well because it's a known tool.

27:22.140 --> 27:25.780
The fingerprint is the same and a lot of IPs used it.

27:26.060 --> 27:32.100
But what I saw instead, I mean, 80, 90% of the traffic I saw was following this pattern.

27:32.100 --> 27:43.560
But there was this very interesting pattern from three or four actors, which was like one IP address generating hundreds of Jot3.

27:43.860 --> 27:49.460
And it was interesting that this pattern was even unique to those actors.

27:49.460 --> 28:00.440
So when you were looking at this, like actor X, for example, you were looking at the raw Jot3 fingerprints like before adding the hash, you were scrolling.

28:00.440 --> 28:01.920
I mean, that's how I found it.

28:01.920 --> 28:04.100
It was very accidental before I talk.

28:04.180 --> 28:09.720
I was scrolling through this sheet which contained the raw Jot3 strings.

28:09.760 --> 28:11.580
And I found something very interesting.

28:11.580 --> 28:14.320
My eyes was like, oh, there's a very interesting pattern here.

28:14.320 --> 28:21.040
When we were scrolling, there was like this line, which was like, I had sorted it based on time.

28:21.040 --> 28:36.880
You could see that one IP address changing, like for example, removing one algorithm from the mix, the next one remove another one, in the next request, it removes another one.

28:36.880 --> 28:47.900
So it was doing obviously some sort of randomization or like rotation to avoid TLS fingerprint based detections.

28:47.900 --> 28:51.820
And it was interesting that this actually made them more obvious.

28:51.820 --> 28:57.440
Because after I visualized this and looked at the pattern, I was like, oh, these four things stand out.

28:57.560 --> 29:04.060
But probably a lot of other people didn't notice because they were not collecting these fingerprints.

29:04.580 --> 29:12.300
And yeah, so another interesting thing was a lot of these IP addresses was completely in different ASNs.

29:12.300 --> 29:14.980
They had completely different identities and everything.

29:14.980 --> 29:20.980
And without these TLS, there was almost impossible to create some connections between these.

29:20.980 --> 29:30.320
But what I saw was like, especially for one of them, there was this cluster with IP address and 100 completely unique Jotteries.

29:30.320 --> 29:33.500
And the same for four other source IPs.

29:33.500 --> 29:45.100
And the only way I could connect these four clusters together was that they apparently by mistake or something, they all four used two or three common fingerprints.

29:45.100 --> 29:50.920
So that common fingerprint was in the middle and it was connecting these four clusters together.

29:50.920 --> 29:57.480
So it was a very interesting observation, which you could only do having these fingerprints.

29:57.480 --> 30:04.520
So let's just move on to the actual, like talk about the tool.

30:04.520 --> 30:09.140
So as I mentioned, I released this tool last week.

30:09.140 --> 30:16.000
You can just go through my GitHub 0x4031 slash Finch.

30:16.000 --> 30:19.200
And just start using it.

30:19.200 --> 30:20.420
It's based on Go.

30:20.420 --> 30:26.780
It collects these fingerprints and other things and expose them into the rules.

30:26.780 --> 30:31.140
So you can decide what to do with those traffics based on those things that you collected.

30:31.140 --> 30:33.580
So basically collect, decide, and act.

30:33.580 --> 30:36.160
You can just block, do whatever you want with it.

30:41.420 --> 30:43.260
So demo time.

30:49.650 --> 30:53.870
I will upload the videos as well, because there are like really interesting ones.

30:55.290 --> 31:00.610
But yeah, so one of them which is more interesting, which is the deceive action.

31:00.610 --> 31:03.370
So I have these five different actions in the tool.

31:03.610 --> 31:09.170
Allow, deny, route, tar pit, and deceive.

31:09.210 --> 31:16.230
So the deceive action actually just made up HTTP response on the fly using LLMs.

31:16.310 --> 31:17.630
Because like, why not?

31:18.130 --> 31:27.210
Let's say you have a request receiving in your reverse proxy to a path that you don't know what it is.

31:27.210 --> 31:33.470
Like you don't have any production servers behind it or it maybe matched some Suricata alerts or something.

31:33.530 --> 31:36.470
And then you want to just redirect these to...

31:37.290 --> 31:39.930
Like you just want to respond to that, but you don't know how.

31:39.930 --> 31:43.010
Because maybe it's just even like a zero-day exploit or something.

31:43.010 --> 31:48.030
So you don't know how to respond to backslash underscore shutdown, for example.

31:48.310 --> 31:52.190
So what I do is I use this tool which I released last year.

31:52.190 --> 31:57.410
Like the talk I had last year here was about that, which is a LLM-based web honeypot.

31:57.410 --> 32:07.450
So instead of having the honeypots generate like with static responses, I asked LLM to generate the HTTP response.

32:07.450 --> 32:08.850
And it works pretty well, actually.

32:08.850 --> 32:09.830
I didn't expect that.

32:09.830 --> 32:16.530
It works pretty well, even if you don't use smart models and it just generates the response in less than a second.

32:16.530 --> 32:23.550
So what I do is I expose this project called Glow as a service.

32:23.550 --> 32:26.510
So now I use this service in Finch.

32:26.530 --> 32:40.490
So whenever you use this deceive action in your rules, it just calls Glow, it passes the HTTP request, and it waits for the LLM to generate the HTTP response and then give it back to the attacker.

32:43.670 --> 32:50.210
And I mean, you may say like, okay, why do I need to spend money on responding to attackers?

32:50.310 --> 32:53.470
I mean, you can just use a very cheap LLM model.

32:53.470 --> 33:03.450
And another thing you can do is to enable caching because I added this caching thing, which like when you first generate a response to a specific path, you don't need to do it again using the LLM the next time.

33:03.450 --> 33:04.950
You just use the cache one.

33:04.950 --> 33:09.490
But I even did something else just like a couple of days ago.

33:09.490 --> 33:24.830
So I leaked this fake LLM API key in a fake code snippet with fake custom OpenAI endpoint in Pastebin.

33:24.830 --> 33:33.790
And just a few minutes later, a bot took that, reached out to my Finch proxy with that fake API key.

33:33.790 --> 33:40.790
And what I did was to respond to that using a Markov chain-based junk response generator.

33:40.830 --> 33:42.650
So I didn't pay anything for that.

33:42.650 --> 33:47.210
This is like the simplest way if you don't want to use LLM.

33:50.000 --> 33:54.900
Again, more demos, more examples.

33:54.900 --> 34:13.380
I have these example, like I just pushed these example fingerprints to the tool repo containing real Jot3, Jot4, Jot4H fingerprints for some known tools like Zap, Nmap and Burp Suite.

34:13.380 --> 34:16.620
So you can just try that on your own.

34:18.400 --> 34:22.160
The tool also comes with admin API.

34:22.240 --> 34:27.560
So that's actually where makes this reverse proxy smart.

34:27.560 --> 34:33.400
And like you may ask yourself like, where was the thinking part in this reverse proxy?

34:33.400 --> 34:35.300
That was like the title of the talk.

34:35.460 --> 34:38.580
That actually starts from here.

34:38.580 --> 34:43.180
So I exposed this admin API to the reverse proxy.

34:43.180 --> 34:47.800
So you can just programmatically update these rules you have in your reverse proxy.

34:47.800 --> 34:56.860
So I added an AI agent on top, which constantly monitoring the logs that you generate, like the reverse proxy generates.

34:56.860 --> 35:02.600
If it finds something interesting, like a pattern or something, it automatically updates the rules.

35:04.420 --> 35:06.820
So yeah, that was one thing I added.

35:06.820 --> 35:11.200
And there's also this SSE endpoint, which streams all these events.

35:11.200 --> 35:21.360
So if you don't want to use the JSON log that the tool generates, you can just use this SSE endpoint, which generates these logs like real time.

35:21.660 --> 35:25.340
And I have an example client for that in the repo as well, which is very nice.

35:25.340 --> 35:30.280
You can just look at that and search and filter the logs.

35:31.240 --> 35:32.840
There's an echo mode.

35:32.840 --> 35:42.200
So if you want to generate a data set of fingerprints, you can run the tool in echo mode, like finch, space, echo, that's it.

35:42.200 --> 35:51.460
And then if you hit the root, you will see a nice UI showing you all those fingerprints for your client.

35:51.460 --> 35:57.620
If you hit like a slash FP, you get the raw fingerprints in the JSON format.

35:57.620 --> 36:06.380
So where this would be interesting is if you, for example, want to automatically generate this database of fingerprints.

36:06.380 --> 36:11.920
So you just create a tool which runs some Docker containers.

36:11.920 --> 36:19.860
It installs like different versions of TLS libraries and tools and hit this endpoint to generate those fingerprints.

36:19.860 --> 36:21.820
So it does this automatically.

36:21.940 --> 36:26.240
And like in a few minutes, you can generate a huge data set.

36:29.460 --> 36:31.060
So what's the use cases?

36:31.060 --> 36:35.860
Like if at this point, you're still not sure what is the real use case of this.

36:35.860 --> 36:38.100
As I said, it was just a fun for me.

36:38.100 --> 36:46.520
I didn't want to implement the Jottery fingerprinting and other fingerprintings into all the honeypots that I'm using upstream.

36:46.940 --> 36:55.700
I was like, okay, what if I just create this reverse proxy and log all those at that point instead of implementing that different honeypots that I'm using?

36:55.860 --> 36:57.460
So that was the main use case for me.

36:57.460 --> 37:07.980
And then I wanted to just dynamically mute or silence the annoying bots because like last year, I set up this API LLM usage, like 20 bucks per month.

37:07.980 --> 37:12.720
And I use my like, obviously, LLM-based honeypot.

37:12.720 --> 37:25.340
So although I had this usage limit, but someone hit my honeypot with a hundred thousand times in like five minutes, which used all my budget for the month.

37:25.660 --> 37:36.680
And it actually proves that that honeypot was actually useful because the reason they hit my honeypot that hard was they thought it's an open proxy.

37:39.120 --> 37:43.080
They wanted to use it as some sort of like ad fraud.

37:43.080 --> 37:50.700
So they just generated traffic that way because the way my honeypot responded to their request made it look like it's an open proxy.

37:50.700 --> 37:54.860
With static honeypot, you couldn't do that unless you knew about like these patterns before.

37:56.140 --> 38:00.600
But yeah, for other use cases, you can just deny unwanted traffics.

38:00.600 --> 38:15.220
Like you don't like wasting your resources on random sketchy bots, which just crawls through your website or server, things like that.

38:15.960 --> 38:23.100
which matched with Suricata to honeypots to learn more about them instead of letting them hit your application.

38:24.060 --> 38:28.060
And yeah, just targeting scanners is another good one.

38:28.060 --> 38:30.220
So just slow them down.

38:33.400 --> 38:39.340
Okay, so one last bit before we finish the talk is about the agents.

38:39.340 --> 38:49.380
So I had this section about the agents, which I first say like, okay, agents are basically just LLM plus tools, plus instructions, that's it.

38:49.380 --> 38:51.460
And they run just in a loop.

38:51.660 --> 38:59.380
They just observe, act, do it again and again until they're satisfied with the result.

38:59.500 --> 39:05.300
So I created this experimental agent you can see in the repo later today.

39:05.300 --> 39:13.220
Right now, I just included the report it generated last night with the new OpenAI model like GPT-5, which is amazing.

39:13.220 --> 39:16.340
Like it just went through 10 megabytes of logs.

39:16.340 --> 39:26.500
I provided like the exact same log I analyzed like seven years ago, like the same patterns I was just talking about, about the jaw trees, like rotating jaw trees.

39:26.740 --> 39:29.820
As I said, I accidentally found that.

39:29.940 --> 39:35.660
So I just wanted to experiment to see if they can find it, like the agent can find it.

39:35.660 --> 39:44.120
And it actually found it like in one minute in like 10 or 20 megabytes of the logs without providing any additional context.

39:44.120 --> 39:50.040
So the only thing I provided as instruction was analyze the attached JSON log.

39:50.040 --> 39:50.940
And that's it.

39:52.500 --> 39:57.360
So yeah, it was exactly the first thing it found about that jaw tree rotation.

39:57.820 --> 40:04.080
One thing I wanted to share was don't just throw data to LLM and expect it to analyze.

40:04.080 --> 40:05.180
It just lies to you.

40:05.180 --> 40:08.340
Like even if it says like, yeah, I did it, it didn't do anything.

40:08.600 --> 40:12.220
That's exactly the point of like how to use LLMs.

40:12.380 --> 40:23.160
I wanted to just use this as an example to show you if you want to use LLMs on agents in general for log analysis, for investigation or things like that.

40:23.160 --> 40:24.240
This is like a hot topic.

40:24.240 --> 40:31.160
I guess probably we have like hundreds of talks right now and startups and products out there doing this.

40:31.240 --> 40:37.920
But how do you know that when the LLM tells you that it did something, it actually did that?

40:37.940 --> 40:40.780
I'm sure in a lot of cases it didn't do.

40:40.860 --> 40:50.080
So the key is to use Python tool use or let the tool, let the LLM use the interpreter.

40:50.080 --> 40:55.140
So it can actually just like a human, which like, how do you analyze a 10 megabyte log?

40:55.140 --> 40:56.620
Do you just scroll through it?

40:56.620 --> 41:05.140
No, you just like probably use Python or bash scripts or something to just analyze, find patterns, aggregate, do all things.

41:05.140 --> 41:10.380
So without providing that to the LLM, how you expect it to do all these things?

41:10.400 --> 41:19.720
So in my experimentation, the AI agent I created, the only tool I gave the LLM to use was just the interpreter.

41:19.720 --> 41:25.500
Like it's called interpreter in OpenAI API, but it's basically just the Python tool use.

41:25.500 --> 41:37.600
It just spins off like a container in the clouds and uploads the data and let the tool just do whatever it wants for analyzing it.

41:37.600 --> 41:41.460
I uploaded the full investigation into the repo.

41:41.460 --> 41:48.600
So you can see the summary of the investigation and also the entire chain of thought, which is very interesting.

41:48.740 --> 41:50.160
I was looking at that.

41:50.160 --> 41:57.340
I was like, if I want to do this, it takes me hours and I still don't do all these queries.

41:57.380 --> 42:10.600
So it's probably done like 40 or 50 different queries and aggregations with, I guess, pandas or something like that and data frames and analyze the logs and generated the result.

42:10.600 --> 42:22.020
And then the rest of demo, I was showing that based on this analysis, it automatically uses another sub-agent to create these block rules for Finch.

42:22.020 --> 42:29.100
And it just applies the block rule based on the like foundings and using the admin API.

42:29.100 --> 42:36.500
So the case happened to me last year on like the attacker used all my 20 bucks usage.

42:36.540 --> 42:42.820
Can't happen with this agent thing because like it just like subscribe to that stream.

42:42.900 --> 42:48.440
If it finds this stream, it just like this pattern, it just applies a block rule.

42:49.220 --> 42:57.040
So I guess I had a few other demos, so it's useless talking through it.

42:57.040 --> 43:01.160
So I would instead like open the stage to you if you have any questions.

43:01.160 --> 43:12.100
Otherwise, I'm here after the talk and we can like talk about all these things like AI agents, fingerprints, and reverse proxies.

43:12.100 --> 43:13.020
Thank you.

