1 00:00:01,700 --> 00:00:03,650 So one of the things I like to do. 2 00:00:04,590 --> 00:00:10,110 As I like to bash scripts to automate some tasks when I use Linux or configure something. 3 00:00:11,040 --> 00:00:14,370 And thankfully, my wife and I have something in common. 4 00:00:15,210 --> 00:00:18,870 You can do the same thing with resource scripts. 5 00:00:20,790 --> 00:00:25,500 So I using them, it's easy to automate your repetitive work and MSF. 6 00:00:27,080 --> 00:00:34,370 They greatly enable you to do almost anything you can do in the MSF automatically and sequentially. 7 00:00:36,140 --> 00:00:46,970 For instance, think of a scenario that you may want to import and map scan result into MSF and then 8 00:00:47,180 --> 00:00:51,020 you're going to want to run a series of modules against some service. 9 00:00:52,640 --> 00:00:59,960 Or you may routinely run a specific exploit and payload combination against a target so you can build 10 00:00:59,960 --> 00:01:07,490 a resource script which first import and map result and then run specific modules that you've already 11 00:01:07,490 --> 00:01:07,970 defined. 12 00:01:09,550 --> 00:01:10,550 It's pretty crazy, isn't it? 13 00:01:11,950 --> 00:01:19,450 So it gives you the ability to greatly automate all of your repetitive tasks and it reduces your testing 14 00:01:19,450 --> 00:01:20,320 and development times. 15 00:01:21,620 --> 00:01:30,770 So besides running only MSF console commands, you can also directly embed Ruby to do some things like 16 00:01:30,770 --> 00:01:36,770 call API, interact with objects in the database and iterate actions. 17 00:01:37,860 --> 00:01:45,510 You can use them both ways from MSF console and the web interface for Meadow's Boyd Crow and community. 18 00:01:46,750 --> 00:01:49,630 And many thanks to the massive contributors. 19 00:01:50,630 --> 00:01:58,880 Because you can find some of the prepared resource script under Métis Boite Framework, Script, Resource, 20 00:01:59,930 --> 00:02:07,700 these are available prepared script and you can use them with abandon gladly and proudly. 21 00:02:08,820 --> 00:02:15,290 Now, each resource script is designed to perform specific tasks as well as achieve specific goals, 22 00:02:16,080 --> 00:02:21,440 however, you might need to modify the script to run them successfully in your environment. 23 00:02:22,290 --> 00:02:27,540 Now, more over these scripts have descriptions and tell you exactly what parameters they need. 24 00:02:28,610 --> 00:02:34,640 You can always open them and edit them with your preferred text editor in order to make some suitable 25 00:02:34,640 --> 00:02:39,790 changes to facilitate your hacking process. 26 00:02:41,080 --> 00:02:45,640 So I'm going to show you how to use some of the prepared ones as well as create your own. 27 00:02:47,740 --> 00:02:52,270 So open up your terminal and start MSF console. 28 00:02:53,220 --> 00:03:00,150 And I'll assume that you're going to use SMB MS one seven zero one zero as your auxiliary module. 29 00:03:01,710 --> 00:03:10,070 And you will first use auxillary scanner, SMB, SMB, Ms. 30 00:03:10,260 --> 00:03:12,300 One seven zero one zero. 31 00:03:14,300 --> 00:03:19,310 Then set our host to ten point ten, Dr. Judy ten. 32 00:03:21,280 --> 00:03:27,400 And set our report for four or five and then run the module. 33 00:03:29,140 --> 00:03:36,490 Model execution is completed, so now you can save what you've done to a file so that you can use it 34 00:03:36,490 --> 00:03:44,470 later, that a split allows you to say that any point with the make RC command. 35 00:03:45,470 --> 00:03:49,160 So let's type make Arcy and specify a path. 36 00:03:57,660 --> 00:04:01,110 Going to open up a new tab to show you the record commands. 37 00:04:08,180 --> 00:04:09,560 To Reback. 38 00:04:10,690 --> 00:04:15,310 So I've already created a resource file to use eternal blup. 39 00:04:17,010 --> 00:04:19,350 So let's use this file from Métis boy. 40 00:04:20,650 --> 00:04:24,910 To use a resource file for Métis Point, you can use the resource command. 41 00:04:25,980 --> 00:04:29,190 So resource and then the name of the file. 42 00:04:34,130 --> 00:04:38,590 As you can see here, the module execution is successfully completed. 43 00:04:42,130 --> 00:04:48,560 And there's also another option with resource files, as I think I mentioned earlier, and now I'm going 44 00:04:48,560 --> 00:04:54,350 to close the session and exit the MSF console with the command exit WI. 45 00:04:57,430 --> 00:05:01,120 So on your terminal type MSF console help? 46 00:05:04,200 --> 00:05:07,380 And in the help screen, there is a R parameter. 47 00:05:09,040 --> 00:05:15,370 This parameter helps you specify a resource file while you are starting the MSF console. 48 00:05:16,400 --> 00:05:25,490 So go ahead and type mSv, console Dash R and the name of the resource file for the eternal blup export. 49 00:05:29,910 --> 00:05:34,890 So first, the MSF council will start and then it will use the commands in the resource file. 50 00:05:36,400 --> 00:05:37,150 And sure enough. 51 00:05:39,820 --> 00:05:41,740 They command executed, execute it successfully again. 52 00:05:42,860 --> 00:05:44,140 The victim, Andrew. 53 00:05:45,130 --> 00:05:51,490 Now, I don't know if you remember what I said before, but you can also use Métis Boit prepared resource 54 00:05:51,490 --> 00:05:51,940 files. 55 00:05:53,030 --> 00:05:54,380 And where are these files? 56 00:05:55,300 --> 00:06:05,950 They will be residing in the user share Métis Boite framework script resource directory, and I think 57 00:06:05,950 --> 00:06:07,130 you might find them useful. 58 00:06:07,780 --> 00:06:09,450 So let me just show you one real quickly. 59 00:06:10,120 --> 00:06:11,620 So let's go to the scripts directory. 60 00:06:14,800 --> 00:06:17,800 Open auto pass, the hash file. 61 00:06:19,060 --> 00:06:21,730 And as you see, Ruby is used in the file. 62 00:06:22,870 --> 00:06:26,200 And it defines payload variables and so on. 63 00:06:26,980 --> 00:06:32,170 OK, so you've got some more information on how to use a resource files. 64 00:06:32,920 --> 00:06:39,610 These are really handy for any expert in penetration testing, which will be you after this course.