1 00:00:07,010 --> 00:00:12,690 Here's a special bonus video that's going to show you how to hack the car hacking software. 2 00:00:13,040 --> 00:00:17,990 In fact, what I want to show you how to do this was a favorite lesson from our National Cyber Warrior 3 00:00:17,990 --> 00:00:20,030 Academy these past two years. 4 00:00:20,360 --> 00:00:23,990 And I want to say a special shout out to Franklin Way. 5 00:00:24,260 --> 00:00:29,450 Franklin Way was actually the student who came up with this idea back in NWA 2016. 6 00:00:29,750 --> 00:00:33,170 And you can see I have turned on my controller area network. 7 00:00:33,170 --> 00:00:38,450 I've got my icy simulator in my controls up, and I'm not limited by a top speed of 100 hundred miles 8 00:00:38,450 --> 00:00:38,960 per hour. 9 00:00:38,960 --> 00:00:44,300 I'm going to be able to pick this thing out up at 280 miles per hour. 10 00:00:44,690 --> 00:00:47,480 The dial has numbers up to two hundred and sixty. 11 00:00:47,480 --> 00:00:53,030 But we can even if you really want to do it, you can even make this wrap around several times so it 12 00:00:53,030 --> 00:00:57,920 can go to 300 and then wrap back around for six hundred nine hundred all the way around. 13 00:00:58,220 --> 00:00:59,420 So I just want to show you this. 14 00:00:59,420 --> 00:01:07,610 It's a really useful quick application of editing open source software and hacking the car hacking software. 15 00:01:07,970 --> 00:01:09,260 It's some pretty cool stuff. 16 00:01:09,530 --> 00:01:12,500 There are a couple of things that you're going to be able to do at the command line. 17 00:01:12,680 --> 00:01:16,100 We're going to use that make command finally that we mentioned early on. 18 00:01:16,370 --> 00:01:23,810 But we're going to be able to recompile this open source software with a few edits that we'll make and 19 00:01:23,900 --> 00:01:26,150 we'll see a couple of troubleshooting tips along the way. 20 00:01:26,150 --> 00:01:28,190 Plus, this is a really common thing. 21 00:01:28,190 --> 00:01:33,520 When you download some software, it'll be close, especially great open source software like the team 22 00:01:33,530 --> 00:01:35,090 at open garages are put together here. 23 00:01:35,360 --> 00:01:37,820 It does almost everything exactly like you'd want. 24 00:01:37,820 --> 00:01:43,490 But, you know, it'd be nice to be able to type out this little minivan that we're driving at 300 miles 25 00:01:43,490 --> 00:01:46,150 per hour instead of just hitting 90 miles per hour. 26 00:01:46,430 --> 00:01:50,630 So if you want to be able to modify things, let's say you wanted to make it accelerate faster because 27 00:01:50,630 --> 00:01:56,600 this accelerates and decelerate kind of slowly, maybe realistically, which is probably the goal. 28 00:01:56,930 --> 00:01:59,240 But we want to be able to hit that max speed faster. 29 00:01:59,240 --> 00:02:02,960 So we'll have a really fast minivan by the time we finish this. 30 00:02:03,230 --> 00:02:06,770 We just need to be able to edit those open source files that we saw earlier. 31 00:02:08,740 --> 00:02:14,860 Well, we can use our nano ed or we can just use leaf pad, which is right here on one of the applications, 32 00:02:14,860 --> 00:02:17,050 right on the desktop for Linux. 33 00:02:17,320 --> 00:02:22,690 We can go to file open and we got that icy simulator folder under our route. 34 00:02:22,690 --> 00:02:28,830 So Route ICSOM and we should be able to find controls that see notice. 35 00:02:28,840 --> 00:02:31,880 You've also got your icy Sandusky and a Lipsey file. 36 00:02:32,110 --> 00:02:35,800 In fact, I think this one may cause an error on this current distribution of Linux. 37 00:02:35,800 --> 00:02:38,830 So we're going to fix that from the command line. 38 00:02:38,840 --> 00:02:41,710 But let's go to controls that see and edit this file. 39 00:02:42,490 --> 00:02:49,240 So we are editing controls that C and we're going to scroll down and you can see a lot of constants 40 00:02:49,240 --> 00:02:49,570 in here. 41 00:02:49,570 --> 00:02:52,960 You may be able to read some of this code if you've programmed in C before. 42 00:02:53,170 --> 00:02:58,720 This is going to be easy for you if you've never programmed and C, especially on a Linux or Unix computer, 43 00:02:58,960 --> 00:03:01,600 this is going to be a really useful quick example. 44 00:03:01,600 --> 00:03:03,250 We're just going to change a couple of things. 45 00:03:03,580 --> 00:03:06,700 You see my max speed of ninety. 46 00:03:07,030 --> 00:03:14,800 I can use my keyboard to just type in, let's say, 300 here and my acceleration rate instead of eight 47 00:03:14,800 --> 00:03:15,190 seconds. 48 00:03:15,190 --> 00:03:17,950 I want to go zero to three hundred in six seconds. 49 00:03:18,460 --> 00:03:19,990 So you could make this faster. 50 00:03:19,990 --> 00:03:21,760 You could make it zip up and sit down. 51 00:03:21,760 --> 00:03:27,250 UBA you're hacking, so you're doing something safe on a virtual car. 52 00:03:27,430 --> 00:03:29,230 So it's all right to change this even more. 53 00:03:29,470 --> 00:03:34,960 But you can see all of the source code for this control where we're not going to change anything else 54 00:03:35,860 --> 00:03:42,760 except this one line max speed and then optionally if you want to change the acceleration rate as well. 55 00:03:43,240 --> 00:03:48,460 I've just changed max speed to 300, an acceleration rate to six. 56 00:03:48,820 --> 00:03:53,950 All I have to do now is save this and come to a control a new terminal window. 57 00:03:54,700 --> 00:03:57,970 I'll go ahead and close out of my other running programs. 58 00:03:58,240 --> 00:04:05,380 And so I will actually I'll start with a completely clean terminal window, new window increase the 59 00:04:05,380 --> 00:04:09,970 size of your control shift and plus so that you can see this more easily. 60 00:04:12,570 --> 00:04:20,340 And all I need to do is now that I've edited so if I go to CBS and I see Sam KDDI, I, Cappotelli Tab 61 00:04:20,940 --> 00:04:33,540 El's, if I had more controls that dot see and I just hit the space bar a couple of times, I can see 62 00:04:33,540 --> 00:04:35,310 my max speed is 300. 63 00:04:35,310 --> 00:04:39,720 I have correctly saved that so I can hit a control see. 64 00:04:41,170 --> 00:04:41,820 Clear. 65 00:04:42,670 --> 00:04:46,840 Now, normally, what I would need to do here is just hit the make command because this already has 66 00:04:46,840 --> 00:04:47,590 a makefile. 67 00:04:47,950 --> 00:04:55,180 And if everything were perfect on this distribution of Linux and on the GitHub files, I should just 68 00:04:55,180 --> 00:04:58,690 be able to run make from inside the I see SIM folder. 69 00:04:59,290 --> 00:05:03,520 If I list that one more time, in fact, let me do that or else. 70 00:05:05,350 --> 00:05:09,280 And I can see that I have a folder or a file called Makefile. 71 00:05:09,520 --> 00:05:16,150 That Makefile, if I saw it, I can see that this just has some compiling information. 72 00:05:16,960 --> 00:05:21,190 Is the new or the free C compiler and it has some flags. 73 00:05:21,190 --> 00:05:28,150 It's contre, it's compiling the I see some file, the controls file and the Libardo file, a library 74 00:05:28,150 --> 00:05:31,210 file that it uses and then it's cleaning up after itself. 75 00:05:31,750 --> 00:05:38,410 If I clear we should be able to issue a make command here, some make should run that make file. 76 00:05:39,220 --> 00:05:41,440 But we've got some sort of error here. 77 00:05:41,440 --> 00:05:46,840 You can see, Jinksy, everything looks OK there, but then we've got an error down here. 78 00:05:47,140 --> 00:05:48,640 This Leyb file. 79 00:05:48,880 --> 00:05:55,540 This is just because this Leyb file that we are using, this one of the library files, it was compiled 80 00:05:55,540 --> 00:06:01,390 in the original version of the Excel does need to be compiled and we need to recompile it with these 81 00:06:01,390 --> 00:06:02,110 flags. 82 00:06:02,470 --> 00:06:04,750 So let me show you the command to recompile this. 83 00:06:04,750 --> 00:06:10,240 Libo, if you got this error, if you got make to work without a problem, that means that they've updated 84 00:06:10,480 --> 00:06:15,670 the files at GitHub for Zombi Craig's Ssempa file. 85 00:06:16,150 --> 00:06:19,780 But there's a good chance on a good, clean Calli install like we just did. 86 00:06:19,990 --> 00:06:24,220 You're going to have to do a recompile of the Lib Dossi to get this Libardo file. 87 00:06:24,520 --> 00:06:27,940 So we'll show you a little bit of extra hacking Dash Fessey. 88 00:06:28,780 --> 00:06:35,170 So we're going to say just to show you really fast what we mean here, Lipsey is the original library 89 00:06:35,170 --> 00:06:41,110 file that was being compiled by this makefile or that was compiled originally Leyb O was what it was 90 00:06:41,110 --> 00:06:41,980 compiled to. 91 00:06:42,010 --> 00:06:45,760 We're going to recompile this output file or this object file, LEYB. 92 00:06:45,760 --> 00:06:48,250 Oh, so let me make this a little bit bigger. 93 00:06:51,330 --> 00:06:56,910 So to be able to see it better and we're going to say, gee, see, this is the new compiler, Jack 94 00:06:56,910 --> 00:06:57,750 Dash. 95 00:06:57,750 --> 00:07:05,880 Gee, Dash, oh, because we're going to do the output file and we'll do a dash C for Leyb. 96 00:07:06,240 --> 00:07:11,290 C, this will recompile that lived C to a new Libardo file. 97 00:07:11,970 --> 00:07:20,150 If I do less well, you'll see that my Libardo is now updated as of twelve thirty five. 98 00:07:20,160 --> 00:07:22,440 These other files I update a little earlier. 99 00:07:22,980 --> 00:07:28,440 So now if I run make with my edited controls that C. 100 00:07:29,470 --> 00:07:33,910 I had a couple of warnings in there, but it looks good, I can run it, make one more time, everything 101 00:07:33,910 --> 00:07:41,920 looks like it's up to up to date just in case you have rebooted your machine since the last lesson or 102 00:07:41,920 --> 00:07:48,820 if you ever want to come back and rerun the vikan simulator's, all we have to do is do a mod probe. 103 00:07:49,940 --> 00:07:58,660 We can and then we do a message to make sure that the beacon interface drivers in there, we're going 104 00:07:58,660 --> 00:08:00,490 to do an IP link. 105 00:08:01,450 --> 00:08:02,830 And Deb. 106 00:08:03,880 --> 00:08:14,080 We can zero or you can use a different number if you want to type the can and then the IP link set up 107 00:08:14,470 --> 00:08:21,040 the can zero, you need to run those four commands any time you restart Linux because that mod probe 108 00:08:21,070 --> 00:08:23,890 will load the kernel module for can. 109 00:08:24,280 --> 00:08:31,460 And then we set up our Vikan zero interface of the can and then we link it up. 110 00:08:32,770 --> 00:08:38,710 Now we should be able to run the doglike sim the on V can zero we need. 111 00:08:38,710 --> 00:08:42,070 Yeah, we're in the ICI sim folder so we can run slash. 112 00:08:42,340 --> 00:08:45,610 I see sim becan zero. 113 00:08:46,890 --> 00:08:52,030 That gives our dashboard simulator, let's run our controller with a new window. 114 00:08:52,630 --> 00:09:01,450 I always need to see and I see SEM to find my dog's controls and I need to run them on becan zero. 115 00:09:03,130 --> 00:09:08,530 So if we've done this correctly, we should accelerate a little more quickly and we should go well past 116 00:09:08,530 --> 00:09:13,740 100 all the way up to 300 miles per hour. 117 00:09:13,870 --> 00:09:14,740 Very nice. 118 00:09:14,740 --> 00:09:18,760 If you Meijers a thousand you'll see it loop around three times and come back up a little bit. 119 00:09:19,240 --> 00:09:23,890 If you did it for a little less or a little more, you can run it and you can change that acceleration. 120 00:09:24,150 --> 00:09:26,620 It was it took me around six seconds to accelerate. 121 00:09:26,620 --> 00:09:29,340 I could make that two seconds and make this really fast. 122 00:09:29,350 --> 00:09:32,950 All we have to do is remake PacTel Dimo, that really fast file. 123 00:09:34,610 --> 00:09:37,940 Open and we can reopen controls that see. 124 00:09:39,330 --> 00:09:44,010 I'm going to change that max speed, I'll make it 600. 125 00:09:45,690 --> 00:09:48,130 An acceleration rate of two seconds. 126 00:09:48,920 --> 00:09:57,600 Oop, I didn't have my number turned on there, so six and two, we can save control less or fail. 127 00:09:57,610 --> 00:09:58,570 Save good. 128 00:09:59,850 --> 00:10:07,500 And then all we need to do is start a new terminal window and we just do a CD and I see Sam do another 129 00:10:07,500 --> 00:10:08,010 make. 130 00:10:09,200 --> 00:10:10,510 It remade the file. 131 00:10:12,160 --> 00:10:18,100 And we can minimize this window, we just need to close the controller and run it again. 132 00:10:20,020 --> 00:10:29,700 And now our new controller, wow, accelerates past 300 to 600, it's having to do some modular arithmetic 133 00:10:29,700 --> 00:10:31,800 because there's some distance between these two. 134 00:10:32,430 --> 00:10:33,060 Look at that. 135 00:10:33,060 --> 00:10:39,390 We wrapped all the way around and we accelerated in just two seconds from zero to almost 600 miles per 136 00:10:39,390 --> 00:10:39,840 hour. 137 00:10:40,290 --> 00:10:42,630 Had to wrap all the way around to see that happen. 138 00:10:43,900 --> 00:10:49,690 Very nice, we can still turn on our blinkers, everything else that we will do, so we just hacked 139 00:10:49,930 --> 00:10:52,020 the car hacking software. 140 00:10:52,600 --> 00:10:58,900 You've learned some really valuable skills with JC so we can recompile open source, see files, you 141 00:10:58,900 --> 00:11:02,410 can edit, see files as easily as using a text editor. 142 00:11:03,640 --> 00:11:07,840 File open controls, see, and I can make this anything I want, I can change other things in here. 143 00:11:07,840 --> 00:11:12,730 Once you get good at hacking and changing just a few things, you can come down and actually start writing 144 00:11:12,730 --> 00:11:19,230 your own C-code, create your own new parts to this really cool like simulator and control panel. 145 00:11:19,690 --> 00:11:23,680 So if you want to do a simulator for turning on the air conditioning, you can figure out a way to do 146 00:11:23,680 --> 00:11:25,230 that if you want to spend some time in there. 147 00:11:25,630 --> 00:11:30,610 So some really great tools at your disposal and some really useful features to be able to do. 148 00:11:31,250 --> 00:11:33,730 We will see you in the next section.