1 00:00:00,000 --> 00:00:05,040 Alright, so the next speaker that we have is Gunner Andrews. 2 00:00:05,040 --> 00:00:10,480 And Gunner is working in the application security space for almost five years now. 3 00:00:10,520 --> 00:00:14,700 He is a hacker who is passionate about software and sharing knowledge. 4 00:00:14,700 --> 00:00:20,980 And is currently working as a senior application and a cloud security engineer at Interwell Health. 5 00:00:21,340 --> 00:00:24,380 And also, he's also a SynecRed team member. 6 00:00:24,380 --> 00:00:26,220 So please welcome Gunner Andrews. 7 00:00:26,220 --> 00:00:27,100 Alright 8 00:00:33,940 --> 00:00:35,100 , hello? 9 00:00:35,840 --> 00:00:37,740 Thanks for coming, first of all. 10 00:00:37,740 --> 00:00:42,480 So this is my talk, called How I Built Recon to Scale with Serverless Architecture. 11 00:00:42,680 --> 00:00:51,460 So we're going to go over a couple different kinds of serverless, some logistics, and then there's a bunch of screenshots, workflows, code, all that kind of stuff. 12 00:00:51,640 --> 00:00:57,900 The slides get shared and everything else, so if I'm going too fast, it's all available after. 13 00:00:57,900 --> 00:01:00,840 I just wanted to leave it at that, just so people are interested. 14 00:01:01,980 --> 00:01:08,000 Okay , so again, this is kind of what we're going to go over in order. 15 00:01:08,380 --> 00:01:13,380 So obviously I have to start with the Who Am I slide, kind of like what you just heard. 16 00:01:13,720 --> 00:01:16,000 I do AppSec and CloudSec full-time. 17 00:01:16,200 --> 00:01:24,240 In my off-time, I like to develop stuff, I like to build stuff, like to play video games, like to bug bounty hunt, and I'm into fitness as well. 18 00:01:26,980 --> 00:01:29,640 So we're going to talk about two different kinds of serverless. 19 00:01:29,780 --> 00:01:32,180 So there's a lot of the word serverless flying around. 20 00:01:32,260 --> 00:01:35,020 One is kind of an idea, one is a framework. 21 00:01:35,360 --> 00:01:38,060 So the first one we're going to talk about is the idea of serverless. 22 00:01:38,300 --> 00:01:44,980 So there's a couple quotes up here from both Red Hat and CloudFlare, a little bit about what serverless actually is. 23 00:01:45,020 --> 00:01:58,440 So basically, if you read a little bit of those snippets, I'm sorry about the small text, it basically allows you to build applications, manage applications, deploy, etc., without actually having to manage the infrastructure under it. 24 00:01:59,040 --> 00:02:04,900 There are tools, especially in the bug bounty space, that are developed to help with this. 25 00:02:04,900 --> 00:02:14,580 One is called Axiom, that allows you to basically take a workload and spread it over a bunch of servers, and then it will basically ingest the data, bring it back, and give it all to you as one thing. 26 00:02:14,580 --> 00:02:23,080 There's also a tool called ShadowClone that actually does get into the serverless space, that basically allows you to do the same thing, but break up a workload over a bunch of Lambda functions. 27 00:02:23,080 --> 00:02:26,200 Or, I think it uses Azure and GCP, too. 28 00:02:26,540 --> 00:02:31,340 But basically, what serverless computing is, is if you take the... 29 00:02:31,340 --> 00:02:36,620 there's a line that what you're responsible for, and then what, let's say, a cloud provider is responsible for. 30 00:02:36,620 --> 00:02:47,500 If you spin up an EC2 instance in AWS, you are responsible for updating that server, you're responsible for managing what ports are open on that server, and there's a whole laundry list of things that you're responsible for. 31 00:02:47,500 --> 00:02:49,940 AWS is responsible for the data center. 32 00:02:49,940 --> 00:02:52,940 If someone breaks into the data center, you are not responsible. 33 00:02:53,000 --> 00:02:55,940 If someone breaks into the server, you are very responsible. 34 00:02:57,160 --> 00:03:00,760 Serverless takes that line and moves it basically one more step up. 35 00:03:00,820 --> 00:03:04,960 You are now only responsible for what you are deploying on the servers. 36 00:03:04,960 --> 00:03:12,060 That's actually the code you're writing, the software you may be deploying, whatever it may be, that's now the only thing you are responsible for. 37 00:03:12,320 --> 00:03:18,840 AWS is actually managing the runtime environments for you, the servers in the backend for you, scaling, everything. 38 00:03:19,600 --> 00:03:25,000 Caveat that we'll talk about later, obviously you have to pay for that, but we will talk about that a little bit more in a bit. 39 00:03:27,950 --> 00:03:32,930 So there is a lot of these out there, there's a lot of different flavors, and they do a lot of different functions. 40 00:03:33,430 --> 00:03:38,230 A lot of what we're going to be seeing today is AWS, and that's some of the stuff you see there on the top. 41 00:03:38,270 --> 00:03:45,130 So we're going to talk about AWS Lambda, AWS DynamoDB, Step Functions, but GCP has this kind of thing too. 42 00:03:45,130 --> 00:03:51,910 One example is Cloud Run, and Azure also has Azure functions, I'm pretty sure DigitalOcean also has DigitalOcean functions. 43 00:03:51,990 --> 00:04:02,110 There's a lot of it out there, serverless is kind of spreading to everybody, but the ones that we're going to focus on today in some of the demos and the screenshots is all AWS, but it is not cloud agnostic. 44 00:04:03,010 --> 00:04:15,890 But this basically allows a user to either package up code in a zip file, or use Docker files and Docker containers, and basically take it to your image, or your zip file of code, and just deploy it. 45 00:04:15,890 --> 00:04:20,130 You're basically telling the cloud this is Python, Go, whatever it may be, and it handles the rest. 46 00:04:20,130 --> 00:04:24,750 All you're worried about is updating and managing the actual code base, or the software you're deploying, and nothing else. 47 00:04:26,830 --> 00:04:29,410 So this is the other serverless. 48 00:04:29,490 --> 00:04:31,410 This is the serverless framework. 49 00:04:32,350 --> 00:04:34,690 This is basically a CLI tool. 50 00:04:34,790 --> 00:04:42,290 If anyone here has heard of Terraform, it's pretty much a spinoff of Terraform for only serverless products. 51 00:04:42,570 --> 00:04:48,470 It works with all the different clouds, all the main cloud providers, and it works with their serverless offerings. 52 00:04:48,470 --> 00:04:51,070 It comes with a whole bunch of plugins to do a whole bunch of things. 53 00:04:51,070 --> 00:05:01,310 One of the plugins we'll see is it allows you to deploy a Python Lambda function with a requirements.txt file, which has been annoying in the past, if anyone has done Lambda development. 54 00:05:01,310 --> 00:05:07,130 And it handles these laundry lists of languages that I have up there, plus a lot more. 55 00:05:07,530 --> 00:05:13,290 And the reason why we're going to talk about it is because there's a lot of different ways to remotely deploy serverless. 56 00:05:13,490 --> 00:05:17,290 AWS has something called SAM that you can use to deploy serverless. 57 00:05:18,190 --> 00:05:21,630 It's not user-friendly 100% of the time. 58 00:05:22,310 --> 00:05:24,830 This, in my argument, is. 59 00:05:24,830 --> 00:05:30,450 And we're going to show a little video walkthrough of it, but basically it breaks down to these four things. 60 00:05:30,450 --> 00:05:32,450 It's an npm package that you install. 61 00:05:33,030 --> 00:05:43,190 When you type just serverless, it pulls up a whole list of templates that you can choose, and it will basically do what a lot of other tools do, and it will make you a new directory and populate that directory with what you need. 62 00:05:43,630 --> 00:05:49,570 For example, with Lambda, a Lambda handler, the YAML file, you'll need to deploy it and configure it and everything else. 63 00:05:49,870 --> 00:05:56,450 Whenever you're ready to deploy, you just type serverless deploy, and obviously there's a bunch of flags if you want to configure it, but serverless deploy will deploy it. 64 00:05:56,450 --> 00:06:00,390 And then you can invoke it right from the command line, and we'll show that. 65 00:06:00,530 --> 00:06:04,150 There's also ways that I'll show you when you invoke the function. 66 00:06:04,150 --> 00:06:08,590 If you want to test your Lambda locally, you do not have to pay for AWS Cloud9. 67 00:06:08,610 --> 00:06:10,530 You do not have to mess around with SAM. 68 00:06:10,530 --> 00:06:16,330 All you do is, instead of serverless invoke, and you're calling your function, you just add in local, and we'll show that. 69 00:06:16,330 --> 00:06:22,510 But then you're testing your Lambda function locally, and you're not actually paying to run a bunch of tests. 70 00:06:22,730 --> 00:06:29,210 And you can hand it data, fake data, dummy data, and everything else, and you can test all your serverless stuff locally before you actually deploy it. 71 00:06:29,550 --> 00:06:36,350 And if you turn out you want to remove something, serverless remove removes all the backend, as well as the actual Lambda. 72 00:06:36,350 --> 00:06:42,230 So this runs on the CloudFormation stack, and then uses, obviously, S3 as a backend for CloudFormation. 73 00:06:42,270 --> 00:06:44,150 And that's actually how it will be deployed. 74 00:06:44,150 --> 00:06:52,670 Very similar to SAM, but it puts it all in a nice little YAML format for you that we're going to go over, and basically puts a CLI wrapper on it. 75 00:06:52,670 --> 00:06:58,370 So I have a video here, and I'm going to probably speed it up, and skip through some stuff. 76 00:06:59,090 --> 00:07:04,110 But basically, like I said, when you type serverless in the beginning, it will let you pick from a bunch of templates. 77 00:07:04,110 --> 00:07:06,190 And there's a whole bunch there if you click Other. 78 00:07:06,410 --> 00:07:12,210 But all I did here was pick an Amazon starter one, which is obviously, of course, your cliche Hello World. 79 00:07:12,730 --> 00:07:19,970 You're naming it, and it will then build you that new directory, and deploy it out there, right? 80 00:07:21,170 --> 00:07:22,670 You can use the dashboard. 81 00:07:22,670 --> 00:07:23,810 The dashboard is a paid thing. 82 00:07:23,810 --> 00:07:26,050 You definitely don't have to use, right? 83 00:07:26,390 --> 00:07:28,570 And we don't want to deploy it. 84 00:07:28,570 --> 00:07:32,770 After we CD into the directory, I'll show you when you LS in here. 85 00:07:32,770 --> 00:07:38,210 This right here is in your directory. 86 00:07:38,210 --> 00:07:40,070 There's two things in the beginning one. 87 00:07:40,070 --> 00:07:45,890 The handler is the basic handler that you would use, whether using SAM or something else, to deploy something. 88 00:07:45,910 --> 00:07:50,410 And then the serverless.yaml is the actual YAML file you're using to configure the Lambda function. 89 00:07:50,410 --> 00:07:54,950 So this is how much memory you want to have, the timeout you want to have, and stuff like that. 90 00:07:54,990 --> 00:07:57,430 But as you'll see here in a second... 91 00:07:57,430 --> 00:07:58,650 Oh, geez. 92 00:08:00,070 --> 00:08:02,530 I even tried to avoid live demos, too. 93 00:08:08,040 --> 00:08:09,080 So let's go. 94 00:08:09,820 --> 00:08:12,040 Okay, so back where we were. 95 00:08:13,420 --> 00:08:15,360 The handler looks a little bit like this. 96 00:08:15,360 --> 00:08:17,740 This is like a super basic handler, right? 97 00:08:18,720 --> 00:08:22,040 You're defining a function called Hello, since the Hello World. 98 00:08:22,040 --> 00:08:24,060 You'll see that show up in the YAML file. 99 00:08:24,160 --> 00:08:28,300 That function is how you'll tell the YAML file, like, this function is my handler function. 100 00:08:28,300 --> 00:08:31,440 So it's in a file called handler.py, and the function's called Hello. 101 00:08:31,440 --> 00:08:35,740 So that's key here, because the next thing that's going to come up is the YAML file. 102 00:08:35,900 --> 00:08:40,240 The YAML file is very small, because it's just the basic version. 103 00:08:40,500 --> 00:08:43,460 And I'll show you some of mine later, as we go into the thing. 104 00:08:46,180 --> 00:08:47,400 There we go. 105 00:08:47,500 --> 00:08:49,140 So this is the YAML file. 106 00:08:49,140 --> 00:08:52,060 So you see in the bottom, you're calling functions, you're naming a function. 107 00:08:52,380 --> 00:08:53,780 The name is called Hello. 108 00:08:53,780 --> 00:08:55,340 And then you're pointing it to the handler. 109 00:08:55,340 --> 00:08:59,240 So you're pointing it to the file that it should go to, and then dot whatever function. 110 00:08:59,400 --> 00:09:03,800 You can have a bunch of functions in one directory. 111 00:09:03,800 --> 00:09:05,740 You can make one directory per. 112 00:09:05,800 --> 00:09:06,540 All that kind of stuff. 113 00:09:06,540 --> 00:09:08,900 You don't have to put any secrets in here. 114 00:09:08,900 --> 00:09:18,380 This makes it so you can actually package up Lambda functions in directories, and use Git or any other type of version control to actually co-develop serverless architecture. 115 00:09:18,380 --> 00:09:19,020 Right? 116 00:09:22,160 --> 00:09:22,620 So... 117 00:09:22,620 --> 00:09:23,260 In 118 00:09:27,900 --> 00:09:29,620 the hallway, and they stopped everybody. 119 00:09:30,140 --> 00:09:30,840 Oh. 120 00:09:32,500 --> 00:09:33,660 Don't fight. 121 00:09:37,300 --> 00:09:44,300 So, this is the part I'm probably going to skip through, because this is basically just like, it runs for about 75 seconds. 122 00:09:44,740 --> 00:09:51,400 But when you type serverless deploy, like I said, it's using CloudFormation and S3, just like SAM does, in the back. 123 00:09:51,400 --> 00:09:55,700 And that will basically, this is now just deploying it to my AWS account. 124 00:09:55,700 --> 00:10:02,000 So the only requirement to get this to work is you download the npm package, and you have your AWS credentials configured. 125 00:10:02,000 --> 00:10:04,760 Just like, you know, if you're using the AWS CLI. 126 00:10:04,760 --> 00:10:05,640 It's the same thing. 127 00:10:06,440 --> 00:10:14,760 So really, at the end of the day, what it is, is it's a CLI wrapper and YAML wrapper around the AWS CLI, and basically doing what SAM does. 128 00:10:14,760 --> 00:10:20,660 It just makes it a lot easier to locally develop, deploy, and update what you're doing. 129 00:10:20,660 --> 00:10:26,180 So, once it finishes here, right here, we're going to invoke it. 130 00:10:26,180 --> 00:10:29,500 You invoke it by the function, which we called hello. 131 00:10:29,540 --> 00:10:33,280 And when you invoke it, this is actually running on my AWS account. 132 00:10:33,280 --> 00:10:34,540 After it was deployed. 133 00:10:34,880 --> 00:10:39,660 Like I said before, though, you can do the same exact thing, and just tell it to invoke locally. 134 00:10:41,620 --> 00:10:45,580 And this is now using whatever I have on my machine. 135 00:10:45,600 --> 00:10:46,100 Right? 136 00:10:46,820 --> 00:10:58,960 So if you want to test before you deploy, you can invoke locally, and then whenever you're ready to remove it, the last step, since I don't necessarily need to keep a hello thing on my account, you serverless remove, and it removes everything. 137 00:11:00,380 --> 00:11:08,160 It's very simple, it's very easy to use, especially compared to some of the other stuff, like SAM, or just using the AWS console. 138 00:11:08,800 --> 00:11:11,220 So now, of course, we have to talk logistics. 139 00:11:11,780 --> 00:11:14,600 What I mean by that is we're going to talk about cost and scalability. 140 00:11:16,360 --> 00:11:30,240 So, I'm going to pre-wreck this by saying if you want to use serverless to build your own automation framework for either red teaming, bug bounty hunting, or blue teaming, or whatever it may be, and you want to scan 100 million domains every five minutes, 141 00:11:30,240 --> 00:11:33,720 forever, it's going to cost you money. 142 00:11:34,120 --> 00:11:37,660 There's no way around it not costing you money. 143 00:11:37,740 --> 00:11:47,080 There is a free tier for a lot of this stuff, and I will talk about some of the ways to save money if you want to maybe make it a little bit less user-friendly, but a little more cost-saving. 144 00:11:47,080 --> 00:11:51,660 We're going to go over that during the example, but a little caveat is it does save you money. 145 00:11:51,960 --> 00:11:56,140 But, a decent example, and I'm sorry, again, I'm sorry for the small text. 146 00:11:56,140 --> 00:11:57,780 I tried to make it as big as I could. 147 00:11:57,900 --> 00:12:05,000 At the top is doing 10 million DNS resolutions in Lambda, in estimate. 148 00:12:05,200 --> 00:12:10,520 So if you Google it, or chat GPT, the average DNS resolution is about 33 milliseconds. 149 00:12:10,980 --> 00:12:21,680 So if you run a little Lambda function that resolves one domain, which will happen in hopefully 33 milliseconds, and you run it 10 million times, you pay $1.80. 150 00:12:23,080 --> 00:12:28,080 So if you resolve 10 million domains per month, you paid $1, almost $2. 151 00:12:28,280 --> 00:12:28,940 Right? 152 00:12:28,940 --> 00:12:35,920 If you buy the smallest EC2 box you can buy, at least on my account, you pay $3.65 a month. 153 00:12:36,660 --> 00:12:44,940 So, if you're resolving 10 million domains, you're still cheaper doing it with Lambda than doing it in EC2. 154 00:12:45,260 --> 00:12:50,740 Now, as data storage comes into play, or continuous scanning, right? 155 00:12:50,740 --> 00:12:56,680 If you're going to try and resolve domains every minute of every month, that gets a little bit different. 156 00:12:56,760 --> 00:13:02,880 So some of the advantages of serverless are as follows. 157 00:13:02,880 --> 00:13:04,640 I tried to fit it all in. 158 00:13:04,720 --> 00:13:08,940 The one thing to look at is whatever you're trying to build will have a traffic pattern. 159 00:13:08,940 --> 00:13:15,840 If you're doing continuous scanning and it's always running and it's always on all the time, don't use serverless. 160 00:13:15,960 --> 00:13:17,940 This is probably not for you. 161 00:13:18,360 --> 00:13:24,340 Because you will spend more money using serverless than you would using server-based. 162 00:13:24,340 --> 00:13:28,700 The only advantage is you would be paying more money to not have to worry about your infrastructure. 163 00:13:28,700 --> 00:13:32,620 That may be worth it to you, it may not, but this won't save you money. 164 00:13:32,680 --> 00:13:40,540 If you have spiky workloads, let's say you want to resolve 10 million domains once a month, serverless is for you. 165 00:13:40,680 --> 00:13:45,700 Because you don't have to worry about spinning up and spinning down servers and forgetting it's there and then paying for the whole month. 166 00:13:45,700 --> 00:13:51,500 You don't have to worry about where your servers are and how big or how small they are and if they can handle the load or if you're going to overload the server. 167 00:13:52,000 --> 00:13:56,220 All of serverless has scalability basically to unlimited. 168 00:13:56,520 --> 00:14:02,560 Obviously there's benchmarks, but just quote-unquote unlimited for whatever workload you want to give it. 169 00:14:02,760 --> 00:14:07,200 It will scale for you and you only pay for what you use in serverless. 170 00:14:07,320 --> 00:14:11,840 So Lambda for instance, you pay for the computing resources times the amount of time you're using them. 171 00:14:11,840 --> 00:14:12,600 That's it. 172 00:14:12,600 --> 00:14:24,620 It doesn't matter if you do it one Lambda at a time, it doesn't matter if you do it 100,000 Lambdas at a time, you're using the same amount of computing resources, the math works out the same whether you run it one at a time or 100,000 at once. 173 00:14:25,720 --> 00:14:33,920 So for very spiky workloads, serverless normally will perform better than servers and it's way easier to manage and it's way easier to scale. 174 00:14:34,420 --> 00:14:37,520 The other thing like I talked about is the development maintenance. 175 00:14:37,720 --> 00:14:40,160 I do this for fun and I'm one person. 176 00:14:40,220 --> 00:14:44,120 I do not have a dev team, I do not have an infrastructure team, I don't have anybody. 177 00:14:45,740 --> 00:14:52,320 This makes it very easy because all I do is write code and do what you just saw, I just deploy it. 178 00:14:52,460 --> 00:14:53,760 And then I don't worry about it. 179 00:14:54,380 --> 00:14:57,820 And we're going to talk about how to schedule it and it'll even run on its own and all that kind of stuff. 180 00:14:57,820 --> 00:15:02,020 You basically code, it's basically like you're pushing to get you code, push and you forget. 181 00:15:02,160 --> 00:15:03,600 Unless it breaks. 182 00:15:03,780 --> 00:15:05,060 But we'll talk about that too. 183 00:15:08,520 --> 00:15:10,700 So now... okay good, I'm doing good on time. 184 00:15:10,820 --> 00:15:13,080 So I'm going to go through my stuff. 185 00:15:14,680 --> 00:15:19,240 A little birdie told me opening AWS console, a hacker conference, was probably not a good idea. 186 00:15:19,620 --> 00:15:21,380 So it's all screenshots. 187 00:15:22,260 --> 00:15:23,760 I am not hiding anything. 188 00:15:23,760 --> 00:15:27,720 If you have a question about something or you want to see something, get in touch with me. 189 00:15:27,720 --> 00:15:28,400 Ask me. 190 00:15:28,400 --> 00:15:30,160 I am more than willing to share it with you. 191 00:15:30,160 --> 00:15:31,620 These slides will be available. 192 00:15:31,820 --> 00:15:34,760 All the code is in the slides. 193 00:15:34,760 --> 00:15:43,420 It's just kind of the best way of both worlds where I'm not showing my AWS console at a hacker conference and I can show you guys how I do things. 194 00:15:44,020 --> 00:15:47,740 So this is one of the workflows. 195 00:15:47,800 --> 00:15:49,060 This is the one we're going to focus on. 196 00:15:49,060 --> 00:15:53,180 This is a passive enumeration that I use for bug bounty. 197 00:15:53,200 --> 00:15:55,020 There's passive and active enumeration. 198 00:15:55,020 --> 00:15:56,940 This is the passive side of things. 199 00:15:57,220 --> 00:16:03,360 So any bug bounty people in here, any all the recon folks in here have heard of subfinder and amass. 200 00:16:03,940 --> 00:16:09,440 This is basically bundling those tools up and running them for me against whatever I want it to run on. 201 00:16:10,240 --> 00:16:12,080 This is called step functions. 202 00:16:12,080 --> 00:16:17,260 In AWS, this basically allows you to orchestrate both serverless and non-serverless. 203 00:16:18,040 --> 00:16:20,040 And this basically is a workflow. 204 00:16:20,300 --> 00:16:24,440 So it comes in on the top to a lambda function that's called passive enumeration. 205 00:16:24,680 --> 00:16:33,220 And then in parallel it will both delete what I just processed from the queue, assuming it's successful, and it will loop through all my results. 206 00:16:33,220 --> 00:16:35,720 And if the domain is a new domain, it stores it in my database. 207 00:16:35,720 --> 00:16:38,420 Which is going to be DynamoDB, which we'll show in a second. 208 00:16:38,600 --> 00:16:45,020 After that, there's temporary recon data, because step functions can only handle so much data being passed from step to step. 209 00:16:45,020 --> 00:16:51,560 And you use S3 just like basically every other AWS tool to handle the large temporary data you're handling in between. 210 00:16:51,560 --> 00:16:53,420 And then it all just gets deleted at the end. 211 00:16:53,420 --> 00:16:55,400 Because it ends up in the database. 212 00:16:57,620 --> 00:16:59,640 So this is just a really quick... 213 00:16:59,640 --> 00:17:04,440 Again, this is my configuration I use, but this is just the configuration for a very basic SQS queue. 214 00:17:04,440 --> 00:17:06,860 This is basically how everything talks. 215 00:17:06,860 --> 00:17:09,940 So I use a PubSub type model for my stuff. 216 00:17:09,940 --> 00:17:13,260 And I use SQS queue as that basically broker in the middle. 217 00:17:13,300 --> 00:17:22,060 So anything that either will go from workflow to workflow, or that goes from a workflow getting kicked off into a workflow, all happens through SQS queues. 218 00:17:22,060 --> 00:17:25,100 SQS queues have a massive free tier. 219 00:17:25,100 --> 00:17:27,000 I have never paid for it yet. 220 00:17:27,300 --> 00:17:30,080 This is not one of the services where you will pay. 221 00:17:30,260 --> 00:17:33,840 If you break the free tier, congratulations. 222 00:17:34,740 --> 00:17:38,680 I think it's like 50 million messages or something. 223 00:17:38,940 --> 00:17:40,260 So this is how everything starts. 224 00:17:40,260 --> 00:17:42,400 Again, I use this for bug bounties, mostly. 225 00:17:43,280 --> 00:17:44,900 As well as a little bit of work. 226 00:17:45,060 --> 00:17:47,240 So PlayStation is pretty cool. 227 00:17:47,240 --> 00:17:49,460 They're giving one away, I think, in the CTF. 228 00:17:49,460 --> 00:17:51,260 But PlayStation has a bug bounty program. 229 00:17:51,400 --> 00:17:59,700 So I have a separate table in DynamoDB, which is a NoSQL serverless database that scales with you, just like everything else in serverless, on AWS. 230 00:18:00,040 --> 00:18:03,020 And this is what every target I have looks like. 231 00:18:03,020 --> 00:18:11,080 So I put in the URL of where I would turn in bugs, hopefully, the name of the program, and then a list of domains, whatever their root domains may be. 232 00:18:11,080 --> 00:18:17,860 I put any wildcard domains in here that I'm going to do wide scope recon on, and these will automatically get ingested, as we'll see in a moment. 233 00:18:18,760 --> 00:18:25,320 Then this program, and this kind of thing, will be cross-searchable across the other tables, which I'll show in a second. 234 00:18:27,280 --> 00:18:30,100 This is an example of what it would look like after. 235 00:18:30,300 --> 00:18:34,760 So, again, there are other steps to this that I only have 45 minutes to go over. 236 00:18:34,760 --> 00:18:37,440 Again, if you're interested, we can chat. 237 00:18:38,640 --> 00:18:48,020 But it starts out as it finds domains, it'll put them in there with the subdomain, the program, and then an empty list for CNAMEs and IPs that it finds, and then there's more, obviously. 238 00:18:48,020 --> 00:18:51,740 This is kind of truncated, but then whether or not it resolves, there's timestamps, everything else. 239 00:18:51,740 --> 00:18:53,260 You can add whatever you want here. 240 00:18:53,980 --> 00:18:58,540 And this can be updated, and this is one of the tables as a source of truth for results. 241 00:18:58,960 --> 00:19:02,760 Now, with this, you can do something in DynamoDB called scanning. 242 00:19:02,840 --> 00:19:09,620 It's sort of an intensive process, but it works very well cross-table, and you can do a lot of very cool queries with it. 243 00:19:09,620 --> 00:19:12,380 So, in my opinion, I think it's worth it to look into. 244 00:19:12,900 --> 00:19:27,860 So, for example, here, if I wanted to go into my domains table of all my recon of any amount of domains, and I just want to find the PlayStation one, it's very easy to just scan my table called domains, and the attribute name is program, and I want it to be equal to PlayStation. 245 00:19:27,860 --> 00:19:32,500 And I'll get every domain from all three of those seed domains that PlayStation is a part of. 246 00:19:32,500 --> 00:19:38,440 If I just wanted one of those domains, I can set the attribute name to seed name equal to whatever the one domain that I wanted to find was. 247 00:19:38,540 --> 00:19:39,740 And you can scan... 248 00:19:39,740 --> 00:19:43,120 those filters are, like I said, very intense. 249 00:19:43,180 --> 00:19:45,460 You can basically filter against anything you want. 250 00:19:48,400 --> 00:19:49,800 So, this is the other thing. 251 00:19:49,800 --> 00:19:55,260 So, a lot of bug bounty hunters, especially when you're running automated recon, you want to know when new stuff shows up, right? 252 00:19:55,260 --> 00:19:57,840 You want to be the first one to it, all that kind of stuff. 253 00:19:58,500 --> 00:20:03,760 DynamoDB makes that very easy, because there's something called a DynamoDB stream that streams... 254 00:20:03,760 --> 00:20:07,620 it's basically an event, API, of everything that's happening to your DynamoDB. 255 00:20:07,720 --> 00:20:14,120 It's very easy to make a trigger and hook on, just like you see in the thing, to hook on a Lambda function to that trigger. 256 00:20:14,120 --> 00:20:22,000 So, anytime a new thing happens to your DynamoDB, there's a Lambda function to ingest it, and you can tell it, only ingest inserts, only ingest updates, whatever it is. 257 00:20:22,000 --> 00:20:25,200 So, obviously, for a new domain, it's pretty straightforward. 258 00:20:25,240 --> 00:20:31,240 Anytime a new insert goes into my domains table, that means there's a new domain. 259 00:20:31,760 --> 00:20:41,780 There's a Lambda function called NewDomainNotification that we're going to show on the screen that will basically ingest that stream's API, grab the new domain that just got added to the database, and shoot it to Slack. 260 00:20:42,540 --> 00:20:43,980 So, I don't use... 261 00:20:43,980 --> 00:20:45,420 there's not necessarily a tool for that. 262 00:20:45,420 --> 00:20:49,300 It's just a POST request to a Slack webhook that we're going to go over. 263 00:20:50,580 --> 00:20:53,160 So, this is actually some of the code. 264 00:20:53,240 --> 00:20:58,200 Again, I tried to make it as big as I possibly could, so it's split up into chunks. 265 00:20:58,860 --> 00:21:08,100 So, this is a Lambda function that actually kicks off running my recon against every domain I have in that domains table I showed you. 266 00:21:08,100 --> 00:21:12,300 So, all it is, is I go through the table name that I call targets. 267 00:21:12,340 --> 00:21:14,920 I just have one item in the database. 268 00:21:14,920 --> 00:21:16,340 It's just one big item. 269 00:21:17,460 --> 00:21:20,460 And for that item, there's a bunch of programs. 270 00:21:20,500 --> 00:21:25,160 So, I loop through the programs, and for every program, as we saw, we'll have that list of domains. 271 00:21:25,680 --> 00:21:31,440 And all I'm doing is queuing those domains up in my SQS queue to the beginning of the workflow. 272 00:21:32,900 --> 00:21:34,340 We'll look at this later. 273 00:21:34,340 --> 00:21:36,040 This one gets scheduled. 274 00:21:36,040 --> 00:21:37,500 So, I don't kick it off. 275 00:21:37,500 --> 00:21:40,760 I have it scheduled for, I think, every 10 days, I think, in the picture. 276 00:21:40,840 --> 00:21:43,340 So, every 10 days, this gets kicked off. 277 00:21:43,340 --> 00:21:55,480 It takes everything out of the programs that I'm hacking on, takes those domains, puts them into the SQS queue, and there's another event that we're going to go over that whenever something gets added to the SQS queue, it automatically kicks off workflow. 278 00:21:55,480 --> 00:21:56,880 So, I'm not touching it. 279 00:21:56,880 --> 00:21:59,160 I'm not starting and stopping it. 280 00:21:59,160 --> 00:22:00,280 You can if you want. 281 00:22:00,800 --> 00:22:02,160 But it is... 282 00:22:02,160 --> 00:22:04,160 it can go, basically, fully automated. 283 00:22:04,160 --> 00:22:07,500 This is the big lambda function that sat at the top of the workflow. 284 00:22:07,760 --> 00:22:10,040 This is the passive enumeration runner. 285 00:22:10,180 --> 00:22:13,500 So, as you can see, there's a little bit more than when we did the serverless demo. 286 00:22:13,540 --> 00:22:14,480 There's the handler. 287 00:22:14,480 --> 00:22:15,300 It's the same thing. 288 00:22:15,300 --> 00:22:16,900 And there's the serverless YAML. 289 00:22:17,360 --> 00:22:18,280 Requirements.txt. 290 00:22:18,280 --> 00:22:19,320 Any Python people in here? 291 00:22:19,320 --> 00:22:21,500 That's your requirements, right? 292 00:22:21,840 --> 00:22:24,320 Now, subfinder and amass are actually just binaries. 293 00:22:24,580 --> 00:22:27,420 Those still get packaged up in the zip file and go with it. 294 00:22:27,580 --> 00:22:34,780 So, all this is, it's nothing special, as much as I'd like to pretend it is, is it's just Python wrapping around tools that I want to use. 295 00:22:34,900 --> 00:22:37,660 That I don't want to run myself over and over. 296 00:22:38,680 --> 00:22:40,480 And this is the passive part. 297 00:22:40,680 --> 00:22:42,740 The active part looks very similar to this. 298 00:22:42,740 --> 00:22:47,720 Again, I don't have enough slides and enough time to go over everything, but the active part would be very similar to this. 299 00:22:47,720 --> 00:22:49,840 And you can break up the workload however you want. 300 00:22:53,360 --> 00:22:55,940 So this, again, I split it up into chunks. 301 00:22:56,000 --> 00:23:02,180 So this is all, this is the whole YAML file to deploy the passive enumeration runner. 302 00:23:02,180 --> 00:23:03,220 It's only this long. 303 00:23:03,220 --> 00:23:08,480 It's not, if you do this in Terraform, anybody who's done Terraform, it's a lot of lines. 304 00:23:08,480 --> 00:23:10,340 It's a lot of lines. 305 00:23:10,580 --> 00:23:13,480 And it's very readable in my opinion. 306 00:23:13,660 --> 00:23:19,600 So we're telling how much memory size we want, what we want the timeout to be for the lambda function, and then the same thing as before. 307 00:23:19,600 --> 00:23:25,620 I'm declaring a function, it's called passive enum runner, I'm pointing it to the handler, and then I guess in this one I add a name and a description. 308 00:23:25,940 --> 00:23:28,680 When you want to use a plugin, it's right there at the bottom. 309 00:23:29,220 --> 00:23:30,900 So serverless Python requirements. 310 00:23:30,900 --> 00:23:34,840 That's the plugin to bring Python requirements with me into the lambda. 311 00:23:38,190 --> 00:23:40,590 So this code is broken into chunks. 312 00:23:40,590 --> 00:23:42,890 So this is basically my function. 313 00:23:42,890 --> 00:23:47,110 From the serverless YAML that we just saw, this is the handler that it's calling. 314 00:23:47,510 --> 00:23:50,110 The data that it's going to ingest is from event. 315 00:23:50,110 --> 00:23:53,230 That stuff you see at the top is configuring the lambda. 316 00:23:53,230 --> 00:23:58,050 I'm adding some config, as people know who run the tools, there's some config files, API keys, you know all the secrets off. 317 00:23:58,890 --> 00:24:02,970 And basically I'm using Python threading to run both SubFinder and Amass at the same time. 318 00:24:02,970 --> 00:24:07,570 Because being that they're passive, they're pretty low memory, pretty easy to use. 319 00:24:07,990 --> 00:24:11,730 So it's just running Amass and SubFinder against whatever domain I give it. 320 00:24:11,750 --> 00:24:15,230 It's pulling the results together, and it's saving them to S3. 321 00:24:15,230 --> 00:24:33,030 Again, it's saving them to S3 because if I run it on Yahoo, and I pull tens of thousands or hundreds of thousands or whatever of domains, that step function that's orchestrating my workflow, as data passes in between it, you can't pass over I think it's like 5 megabytes worth of data in between steps. 322 00:24:33,490 --> 00:24:38,730 S3 is what you use because all of the steps will ingest directly from S3. 323 00:24:38,730 --> 00:24:43,970 So you can output directly to S3 and at the next step just say, yeah, grab this S3 file from the step before. 324 00:24:44,150 --> 00:24:48,550 And that's how you handle... and again, that definitely won't put you over the free tier. 325 00:24:48,550 --> 00:24:51,510 I mean, unless you are doing something very crazy, in which case, talk to me. 326 00:24:53,970 --> 00:24:54,690 This is... 327 00:24:54,690 --> 00:25:01,530 I put this on here just in case anyone's curious how I actually wrap up SubFinder in a mass in Python. 328 00:25:01,530 --> 00:25:02,770 It just looks like that. 329 00:25:02,810 --> 00:25:06,290 This is the new version of a mass too, so it changed a little bit. 330 00:25:07,450 --> 00:25:08,830 But it's basically like that. 331 00:25:08,830 --> 00:25:10,250 I'm using my config files. 332 00:25:10,250 --> 00:25:11,290 I'm putting in the domains. 333 00:25:11,290 --> 00:25:12,810 It's all very simple. 334 00:25:12,810 --> 00:25:14,170 It's just a wrapper. 335 00:25:14,350 --> 00:25:15,830 Again, there's more than this. 336 00:25:15,830 --> 00:25:17,130 I just don't have time. 337 00:25:17,130 --> 00:25:20,210 If this interests you, we can talk. 338 00:25:21,430 --> 00:25:23,390 So this is the notification lambda. 339 00:25:23,390 --> 00:25:28,030 This is the handler for the notification... sorry, the serverless.yaml for the notification lambda. 340 00:25:28,030 --> 00:25:29,910 Notice how it looks very similar. 341 00:25:29,990 --> 00:25:33,250 Once you do this like twice, it gets pretty quick. 342 00:25:35,270 --> 00:25:37,490 And this is the code, right? 343 00:25:37,490 --> 00:25:42,230 So all it is, down at the bottom is my handler function. 344 00:25:42,430 --> 00:25:47,230 I'm starting a message with new domains found from my records in the event. 345 00:25:47,230 --> 00:25:51,030 The event is basically the API data that came from the API. 346 00:25:51,450 --> 00:25:52,090 I'm grabbing... 347 00:25:52,650 --> 00:25:54,050 it's called keys. 348 00:25:54,770 --> 00:26:00,410 And basically all that long string there is doing that appends to the message is just appending all the new domains that were inserted. 349 00:26:00,570 --> 00:26:07,070 Once those are done, as long as it counts greater than zero, which means assuming there was an insert, I'm sending a message to Slack. 350 00:26:07,070 --> 00:26:07,850 It's a POST request. 351 00:26:07,850 --> 00:26:09,550 It's just a POST request to a webhook. 352 00:26:09,830 --> 00:26:15,800 So this is what it looks like when it works. 353 00:26:16,960 --> 00:26:31,260 The reason why I use step functions is because as you build it, and as you use it, it will track every run for you and it will tell you what worked, what didn't work, the input, the output, how long things ran, all that kind of stuff. 354 00:26:31,260 --> 00:26:32,880 So this is an example of one that worked. 355 00:26:32,880 --> 00:26:34,760 This was ran against Costco. 356 00:26:34,780 --> 00:26:43,220 So you can see the body there was the program, and then I do like three lines just to separate and then the domain that I was trying to call. 357 00:26:44,420 --> 00:26:45,860 As you can see, everything is green. 358 00:26:45,860 --> 00:26:46,820 That means it works. 359 00:26:46,820 --> 00:26:47,380 That's great. 360 00:26:47,380 --> 00:26:49,120 It doesn't always work. 361 00:26:49,120 --> 00:26:50,280 Right? 362 00:26:51,140 --> 00:26:52,700 This is what it looks like. 363 00:26:52,740 --> 00:26:55,540 So this was from a while ago when I was first making it. 364 00:26:55,540 --> 00:26:59,160 As you saw, my serverless.yaml set the timeout to 900 seconds. 365 00:26:59,220 --> 00:27:02,660 That's because I had it at 600 and it wasn't enough, if you can read. 366 00:27:02,860 --> 00:27:05,960 Right at the bottom there, it says the task timed out after 600 seconds. 367 00:27:05,960 --> 00:27:06,960 It tells me the error. 368 00:27:06,960 --> 00:27:10,240 Sometimes the error that it gives you right there isn't the best. 369 00:27:10,300 --> 00:27:16,840 That's okay because right under the passive enumeration title, that little text that I apologize for again, says log. 370 00:27:17,440 --> 00:27:23,740 That link takes you directly to the CloudWatch logs, directly for that invocation of the Lambda. 371 00:27:23,740 --> 00:27:26,580 Tells you exactly what happened, exactly each step. 372 00:27:26,580 --> 00:27:34,820 If that error doesn't give you exactly what you're looking for, there's a link directly to the CloudWatch log of directly that invocation. 373 00:27:34,820 --> 00:27:38,580 Which is why step functions really come in handy as you grow. 374 00:27:38,920 --> 00:27:42,380 Again, before I move on, this is where you will spend the money. 375 00:27:42,560 --> 00:27:44,220 Probably even more than Lambda. 376 00:27:44,260 --> 00:27:47,500 Step functions are either standard or express. 377 00:27:47,680 --> 00:27:51,460 Standard, you are charged by state transition. 378 00:27:51,500 --> 00:27:55,200 So when you saw that flow chart, every time you go to a new square, you're charged. 379 00:27:55,200 --> 00:28:01,440 There is a free tier, it's kind of small, and then it's like .000025 cents per state transition. 380 00:28:01,440 --> 00:28:09,820 But, if let's say you have a state to store a domain, for instance, and you're storing 100,000 domains, that could be 100,000 states. 381 00:28:10,360 --> 00:28:17,540 But, the other form of a state function is called express. 382 00:28:17,540 --> 00:28:20,920 That, you are not charged by state transition. 383 00:28:20,920 --> 00:28:26,580 You're charged similar to Lambda based on how much compute resources you use and for how long. 384 00:28:26,580 --> 00:28:29,860 You're not charged by state transition. 385 00:28:30,320 --> 00:28:37,920 The kicker to that is express will only run up to five minutes for the whole, whatever you have in an express state function. 386 00:28:38,420 --> 00:28:40,260 Standard will run for a year. 387 00:28:40,260 --> 00:28:45,180 So, if you have a very large workflow, you kind of have to go standard if it's long running. 388 00:28:45,180 --> 00:28:51,080 But, if I'm using a workflow to store domains 100,000 times, it should be express. 389 00:28:51,080 --> 00:28:55,700 I haven't broken the express free tier yet, I have broken the standard one. 390 00:28:56,320 --> 00:28:57,140 Right? 391 00:28:57,380 --> 00:29:10,900 The good thing about that is, is when you looked at my workflow, you can take the map element, which is a loop element, and inside of a looping element, people assume you're going to loop a lot. 392 00:29:11,000 --> 00:29:17,860 So, you're allowed to take a map element in a standard step function and make just that map element express. 393 00:29:17,900 --> 00:29:23,240 So, you're charged by an express state function for that loop. 394 00:29:23,240 --> 00:29:30,440 So, when I loop through all those domains, even though the whole workflow is a standard state function, that loop where I'm storing all my domains is charged as express. 395 00:29:30,440 --> 00:29:32,320 And that saves a lot of money. 396 00:29:32,360 --> 00:29:35,320 You can plug and play state functions into each other. 397 00:29:35,320 --> 00:29:42,100 One state function can call another state function, so you can embed them, and you can basically plug and play with that as you will. 398 00:29:42,100 --> 00:29:51,760 I like using it for this reason, but if you're trying to save money, you can ditch the state function and just have one lambda trigger another lambda, trigger another, and do its own thing. 399 00:29:51,760 --> 00:29:53,940 You don't have to use state functions. 400 00:29:53,940 --> 00:29:57,240 You just get much less visibility as you scale. 401 00:29:57,300 --> 00:29:59,240 But, you don't have to use it. 402 00:30:01,700 --> 00:30:04,960 This is now getting into how I trigger it. 403 00:30:04,960 --> 00:30:07,680 All of this happens in event bridge. 404 00:30:07,680 --> 00:30:13,040 There's an event bridge pipe that I use in this demo, and there's an event bridge schedule. 405 00:30:13,040 --> 00:30:18,920 Schedule is cron, pipe is basically event happens, what you see at the bottom. 406 00:30:18,920 --> 00:30:20,360 There's a source and a target. 407 00:30:20,360 --> 00:30:23,620 The source in this pipe is my SQS queue. 408 00:30:23,680 --> 00:30:29,280 Anytime a message gets added to the SQS queue, it triggers the pipe and the target is the step function. 409 00:30:30,000 --> 00:30:31,500 It's very easy. 410 00:30:31,500 --> 00:30:41,840 Anytime a message gets sent to the SQS queue, it will either sit in the queue if I have the max amount of concurrent step functions I have set running, and then it will trigger it when it's ready. 411 00:30:41,840 --> 00:30:49,460 Or, if there's none running, it will automatically kick off a step function, which will ingest the message from the SQS queue and kick off. 412 00:30:50,000 --> 00:30:55,820 The other one that I have in event bridge, again, is called a schedule, which is basically cron in AWS. 413 00:30:56,280 --> 00:31:01,240 So, I have a schedule at a rate of 10 days, and you target it at a lambda function. 414 00:31:01,240 --> 00:31:05,500 Like I said, that target one right next to the schedule is where you'll pick your lambda. 415 00:31:06,000 --> 00:31:18,600 And I pick... so every 10 days, I have a target of that full run lambda that we talked about that just goes through my targets table and posts them all to the queue, which will then trigger the pipe on the last slide and ingest it all into step functions. 416 00:31:18,600 --> 00:31:21,740 And that happens every 10 days automatically without touching it. 417 00:31:21,740 --> 00:31:23,980 You can change that, you can delete it, you can do whatever you want. 418 00:31:23,980 --> 00:31:29,220 You can obviously manually kick off and invoke lambdas if you want to and you don't feel comfortable doing it automatic. 419 00:31:29,220 --> 00:31:32,200 That is basically what it is. 420 00:31:32,620 --> 00:31:35,220 I will say since I'm pretty sure... 421 00:31:35,220 --> 00:31:45,700 So I will say before the thank you and the questions, I will say I have personally monitored a couple hundred thousand domains, because I don't do mass recon. 422 00:31:45,700 --> 00:31:48,760 I like to do recon on the targets that I'm hacking on at that time. 423 00:31:49,120 --> 00:31:58,740 I have monitored fairly continuously a couple hundred thousand domains and kept my price pretty firmly under $50 a month. 424 00:31:58,740 --> 00:32:10,540 So it's not crazy expensive, it does cost money, and again, it's not... if you scale it, it will scale with you and it will work very good, but you still pay for it. 425 00:32:11,360 --> 00:32:13,240 So yeah, that's all I have. 426 00:32:13,240 --> 00:32:22,680 It looks like I do have 10 or 15 minutes here for questions, because I do have to jet after, but if there's any questions, I would love to answer them. 427 00:32:22,720 --> 00:32:23,360 Yeah. 428 00:32:24,860 --> 00:32:26,420 Thank you. 429 00:32:44,540 --> 00:32:45,580 Yes and no. 430 00:32:45,580 --> 00:32:49,600 No, because the Lambda has ephemeral memory that will grow with you. 431 00:32:49,600 --> 00:32:55,700 Yes, because there is a limit to that, and you pay for that also, and there is a limit. 432 00:32:55,700 --> 00:32:58,280 It's rather large , but there is a limit. 433 00:32:58,280 --> 00:32:58,860 Yeah. 434 00:32:59,680 --> 00:33:00,720 Sure . 435 00:33:07,990 --> 00:33:19,810 Yes , so serverless will set up the IAM roles that go with the Lambdas automatically, and you can configure those either in the YAML or in AWS, but they do get spun up automatically. 436 00:33:19,810 --> 00:33:32,870 So if your handler imports the Bottles3 library and uses DynamoDB, it will spin up an IAM role for you that gives you access to DynamoDB to that Lambda. 437 00:33:36,470 --> 00:33:37,490 Yes. 438 00:33:38,090 --> 00:33:38,950 Yep. 439 00:33:39,650 --> 00:33:40,670 Yeah. 440 00:33:53,780 --> 00:33:55,480 So when I... 441 00:33:55,480 --> 00:33:59,140 And again, the reason why I didn't touch the active one is because it gets a little more interesting. 442 00:33:59,860 --> 00:34:05,680 But the active stuff, the way I approach it, is I split it into super teeny chunks that run lightning fast. 443 00:34:05,720 --> 00:34:11,240 So that's why I talked about domain resolution because I resolve domains one at a time and they resolve in, like, milliseconds. 444 00:34:11,480 --> 00:34:13,440 Because at the end of the day, it doesn't matter. 445 00:34:13,440 --> 00:34:15,120 It's all runtime versus memory. 446 00:34:15,120 --> 00:34:18,960 So it doesn't matter if I resolve a chunk of 10,000 domains at the same time or one at a time. 447 00:34:18,960 --> 00:34:20,400 It's all the same runtime. 448 00:34:21,100 --> 00:34:26,760 So the only thing that would really matter, that really matters, is hitting your database a bunch. 449 00:34:26,760 --> 00:34:34,740 So you can resolve a bunch and have them all catch at a step in the step function, and then as batches happen, then you can batch update databases. 450 00:34:34,800 --> 00:34:40,420 But for the active stuff, I break it into super teeny chunks, so I never really have to worry about a time limit. 451 00:34:42,340 --> 00:34:42,920 Yeah. 452 00:34:54,470 --> 00:34:55,790 You can do either one. 453 00:34:56,850 --> 00:34:57,430 Yep. 454 00:34:57,430 --> 00:34:57,690 Yep. 455 00:34:57,690 --> 00:34:59,170 You can configure it to do either one. 456 00:35:00,170 --> 00:35:00,850 Yeah. 457 00:35:05,250 --> 00:35:05,430 ... 458 00:35:06,290 --> 00:35:06,730 ... 459 00:35:13,570 --> 00:35:14,010 ... 460 00:35:15,490 --> 00:35:15,930 ... 461 00:35:15,930 --> 00:35:16,050 ... 462 00:35:16,670 --> 00:35:17,550 Absolutely. 463 00:35:18,150 --> 00:35:21,770 So serverless, the framework, supports Azure as well. 464 00:35:21,770 --> 00:35:23,310 And I think it's called Azure Functions. 465 00:35:23,310 --> 00:35:25,430 Again, I'm kind of hiding AWS. 466 00:35:25,690 --> 00:35:30,530 But Azure has Azure Functions, and it is, I'm sure it is very similar. 467 00:35:30,550 --> 00:35:33,150 It will handle it all for you and deploy it. 468 00:35:33,150 --> 00:35:33,530 ... 469 00:35:33,530 --> 00:35:35,230 Mm-hmm. 470 00:35:39,560 --> 00:35:43,220 So I personally talked to AWS before I gave the talk. 471 00:35:43,220 --> 00:35:46,040 They said as long as I'm not doing anything naughty, it's allowed. 472 00:35:46,040 --> 00:35:46,860 Right? 473 00:35:47,080 --> 00:35:49,520 Because it's just public domain. 474 00:35:49,520 --> 00:35:53,760 But I did have someone else from AWS tell me to watch out. 475 00:35:53,760 --> 00:35:54,480 So it is. 476 00:35:54,480 --> 00:35:56,440 And I have heard of people getting banned off the platform. 477 00:35:56,440 --> 00:35:59,940 So I've got I was going to say, I've gotten pretty mixed reviews from it. 478 00:35:59,940 --> 00:36:01,560 I haven't gotten personally in trouble yet. 479 00:36:01,840 --> 00:36:05,260 As well as when Lambda spin up, they run on different IPs. 480 00:36:05,260 --> 00:36:07,580 So I guess there's that benefit. 481 00:36:07,580 --> 00:36:08,940 I don't really use it for that benefit. 482 00:36:08,940 --> 00:36:16,280 And again, I don't use this type of recon to continually berate sites. 483 00:36:16,280 --> 00:36:16,540 Right? 484 00:36:16,540 --> 00:36:20,540 I do pretty relaxed scanning, if at all. 485 00:36:21,060 --> 00:36:24,560 And I don't try and update data every minute on the minute. 486 00:36:24,560 --> 00:36:25,300 That kind of stuff. 487 00:36:25,300 --> 00:36:27,660 So I feel pretty safe about that. 488 00:36:27,660 --> 00:36:29,260 But I mean, if you were using it like that... 489 00:36:31,140 --> 00:36:31,760 Yeah. 490 00:36:31,760 --> 00:36:33,220 You might get in trouble. 491 00:36:33,220 --> 00:36:34,060 Yeah. 492 00:36:35,720 --> 00:36:36,140 Yeah . 493 00:36:37,160 --> 00:36:38,040 Absolutely. 494 00:36:40,260 --> 00:36:41,140 Yeah. 495 00:36:45,220 --> 00:36:46,100 Yep. 496 00:36:49,160 --> 00:36:49,960 You can. 497 00:36:49,960 --> 00:36:51,260 It's all the same thing. 498 00:36:51,280 --> 00:36:57,760 I use Lambda because again, when I do active scanning, I just break it up into super tiny chunks. 499 00:36:58,400 --> 00:37:00,840 Fargate, literally, you can use the same thing. 500 00:37:00,840 --> 00:37:03,220 You would just do the same thing with step functions, but for the longer... 501 00:37:03,220 --> 00:37:08,340 If you want longer running jobs, you'd have to use a standard step function, so it can run for up to a year. 502 00:37:08,360 --> 00:37:10,500 And then you would just plug Fargate in, and it would be the same thing. 503 00:37:11,320 --> 00:37:12,020 Personal preference. 504 00:37:12,020 --> 00:37:17,440 If you want to do the exact same thing, but with Fargate, it will work almost identically. 505 00:37:19,440 --> 00:37:19,980 Yeah. 506 00:37:23,920 --> 00:37:24,880 Good question. 507 00:37:36,480 --> 00:37:37,440 There you go. 508 00:37:38,660 --> 00:37:39,460 Yeah. 509 00:37:48,080 --> 00:37:49,800 Yes and no. 510 00:37:50,760 --> 00:37:59,840 I am, like I said, I'm willing to share, and I may, if there's a lot of ask for it, I may just make it easier to put some stuff in a GitHub repo and share it. 511 00:37:59,840 --> 00:38:01,100 I'm not against that. 512 00:38:02,780 --> 00:38:07,200 Part of it, I won't, just because it's a lot. 513 00:38:08,020 --> 00:38:12,080 But again, if you have a question, get in touch with me over Twitter or something like that, and I can. 514 00:38:12,080 --> 00:38:14,000 And if there's a lot of interest, I probably will. 515 00:38:14,320 --> 00:38:19,460 I guess I didn't have plans for it, but it's not necessarily because I'm secretive or anything. 516 00:38:19,460 --> 00:38:24,220 I guess if there was interest, I wouldn't be against it, but I didn't originally have plans to, yeah. 517 00:38:26,000 --> 00:38:26,460 Cool. 518 00:38:26,460 --> 00:38:27,160 Thanks, guys.