1 00:00:00,240 --> 00:00:07,710 Hi, within this lecture, we're going to go into the level 24 and so much more if we have time. 2 00:00:08,130 --> 00:00:14,210 So far we are in the level 23 and again, I believe this is about crohn jobs. 3 00:00:14,370 --> 00:00:15,350 One more time. 4 00:00:15,780 --> 00:00:19,020 As you can see, it asks us to go into the crown. 5 00:00:19,020 --> 00:00:21,210 As you can see, there is nothing over here. 6 00:00:21,510 --> 00:00:26,610 So I'm going to go into that secondees and see what this is about. 7 00:00:26,620 --> 00:00:29,720 So I'm going to run the Lesli and here we go. 8 00:00:29,880 --> 00:00:38,570 Now, we have covered the Bendit 22 23, and now we want to take a look at the current job and the 24. 9 00:00:39,060 --> 00:00:41,070 So I'm going to cut this out. 10 00:00:41,250 --> 00:00:44,720 I'm going to say Cat Crohn job and the twenty four. 11 00:00:45,090 --> 00:00:46,380 And here you go. 12 00:00:46,650 --> 00:00:49,200 We have again Abeche script over there. 13 00:00:49,470 --> 00:00:52,740 So we want to see what's inside of this one. 14 00:00:53,100 --> 00:00:54,930 So I'm going to copy this. 15 00:00:54,960 --> 00:01:04,260 OK, user bin Cronje, the training for that S.H. and I'm going to get this out to see what it contains. 16 00:01:04,620 --> 00:01:06,090 And here we go again. 17 00:01:06,090 --> 00:01:07,380 This is a bad script. 18 00:01:07,920 --> 00:01:14,070 We see the Shabangu, we see some kind of variables and all other commands. 19 00:01:14,550 --> 00:01:20,760 Now, this level requires us to create our own first shell script. 20 00:01:21,090 --> 00:01:27,120 And this is a very big step and we should be proud, apparently, of ourselves when we beat this level. 21 00:01:27,510 --> 00:01:34,320 So keep in mind that your script is a real once executed, so you may want to keep a copy around. 22 00:01:35,340 --> 00:01:37,130 So this is good. 23 00:01:37,140 --> 00:01:41,100 So we're going to write apparently our first script. 24 00:01:41,880 --> 00:01:44,970 So you don't have to know anything about your script. 25 00:01:44,970 --> 00:01:53,370 Think I believe in order to complete this because scripting is kind of running commands in the terminal 26 00:01:53,370 --> 00:02:00,630 in a way, but it's much more complex if we actually want to do more complex things. 27 00:02:00,750 --> 00:02:02,760 But we're going to keep it simple anyway. 28 00:02:03,000 --> 00:02:10,320 So let's try to get take a look at this and try to understand what it's doing over there. 29 00:02:10,620 --> 00:02:16,290 So, again, we have a my name, which is the Who Am I, which has been the training for at this point. 30 00:02:16,290 --> 00:02:16,620 Right. 31 00:02:16,620 --> 00:02:17,730 If we run, who am I? 32 00:02:17,850 --> 00:02:18,970 It will give us the bend. 33 00:02:19,040 --> 00:02:21,720 Twenty three, but it will be run by the bandit. 34 00:02:21,720 --> 00:02:22,380 Twenty four. 35 00:02:22,380 --> 00:02:26,340 So my name will be Bandit twenty four in this case. 36 00:02:26,580 --> 00:02:31,200 Then we're going to go into VR Spool and Bandit twenty four. 37 00:02:31,230 --> 00:02:38,220 OK, and we can try to squeeze into that and try to run all of those things. 38 00:02:38,550 --> 00:02:42,940 So let me go into Raspal and bend it. 39 00:02:43,350 --> 00:02:47,160 Twenty four not c.v but KD. 40 00:02:47,340 --> 00:02:53,580 Let me come over here and let me try to run SLA. 41 00:02:53,760 --> 00:02:54,240 Here you go. 42 00:02:54,240 --> 00:03:03,050 We cannot see what's inside of this because it's, I believe it can be read by the Bendit 24 VR, the 43 00:03:03,060 --> 00:03:04,620 twenty three at this point. 44 00:03:05,160 --> 00:03:06,810 So far so good. 45 00:03:07,590 --> 00:03:12,240 It's actually it's not good because we cannot see what's inside of that folder. 46 00:03:12,600 --> 00:03:15,750 So we're going to have to think about it a little bit. 47 00:03:16,080 --> 00:03:22,440 Now we're going to say echo executing and deleting old scripts, inverse spool, my name. 48 00:03:23,010 --> 00:03:28,710 So I believe we're going to execute some of these scripts and then we are going to delete it and we're 49 00:03:28,710 --> 00:03:30,720 going to see if that's really the case. 50 00:03:31,290 --> 00:03:33,570 So we have a for loop over here. 51 00:03:33,570 --> 00:03:37,740 So if you know Python, then you know what a for loop is. 52 00:03:37,980 --> 00:03:39,720 It's kind of a loop. 53 00:03:39,720 --> 00:03:46,140 It's actually literally a loop that goes on and on until a condition is met. 54 00:03:46,420 --> 00:03:56,780 OK, so in this case, for I instar means just for the old scripts or old files in that folder, ok, 55 00:03:57,300 --> 00:04:05,340 for I in Stardust's are so I will stand for every individual file on that folder. 56 00:04:05,760 --> 00:04:10,970 OK, so for every individual file on that folder, where are you going to do some things. 57 00:04:11,430 --> 00:04:13,850 So this is the thing that we're going to do. 58 00:04:14,430 --> 00:04:19,450 So again, I sense for the individual files in that folder. 59 00:04:20,040 --> 00:04:22,520 So over here it checks something. 60 00:04:22,530 --> 00:04:24,420 OK, so this is the if block. 61 00:04:24,690 --> 00:04:30,330 If the condition is met, then it's going to execute the following comments. 62 00:04:30,780 --> 00:04:36,300 And in this case, I believe it's checking to see if it's a file. 63 00:04:36,660 --> 00:04:47,340 And then it says that the owner of that file, if the owner of that file has been to twenty three, 64 00:04:47,790 --> 00:04:58,170 then it's going to do something, OK, so it's going to give us a timeout, I believe, for sixty seconds, 65 00:04:58,410 --> 00:04:59,880 and then it's going to exit. 66 00:04:59,980 --> 00:05:11,890 You that file, as you can see, this is for executing again, Dash, that I means that that means running 67 00:05:12,130 --> 00:05:17,370 and the dollar sign, I sense for the individual file in that folder. 68 00:05:17,680 --> 00:05:22,410 So what it's basically doing over here is that deleting that file. 69 00:05:23,350 --> 00:05:27,250 So it's going to find every file in that folder. 70 00:05:27,340 --> 00:05:31,520 OK, basically it's going to execute it and it's going to delete it. 71 00:05:32,170 --> 00:05:40,780 So what we know over here is that if we can know what's going to happen in that folder, what's going 72 00:05:40,780 --> 00:05:47,720 to be placed in that folder, it's going to be executed and then it's going to be deleted. 73 00:05:48,430 --> 00:05:57,250 So I believe it's asking us to write a comment or write the best script to put in that folder. 74 00:05:57,250 --> 00:06:03,670 If we can write that folder, obviously, if we can put something in that folder, it's going to be 75 00:06:03,670 --> 00:06:06,690 executed and then it's going to be deleted. 76 00:06:07,120 --> 00:06:13,480 I don't care if it's going to be deleted or not, but if I can execute something on that folder, it 77 00:06:13,480 --> 00:06:21,750 will be executed as if it's appended 24, OK, because it's the current job of Bendit 24. 78 00:06:22,180 --> 00:06:30,100 And I believe we can write something over there because it's checking to see if the owner is been 23, 79 00:06:30,310 --> 00:06:32,770 even though it's a bandit 24. 80 00:06:32,980 --> 00:06:34,680 So I'm going to copy this Shabangu. 81 00:06:34,720 --> 00:06:40,600 OK, I'm just going to start writing my own best script and show you what I mean, because it's going 82 00:06:40,600 --> 00:06:42,080 to take some time, I believe. 83 00:06:43,340 --> 00:06:44,770 OK, yeah. 84 00:06:44,770 --> 00:06:46,990 I cannot type anything right now. 85 00:06:47,140 --> 00:06:49,390 I believe I lost my connection. 86 00:06:50,110 --> 00:06:56,620 OK, I'm just going to close this down and just S.H. into that thing one more time. 87 00:06:57,040 --> 00:06:59,470 We already have the password over here. 88 00:06:59,470 --> 00:07:05,080 I just have to just take the password and connect it one more time. 89 00:07:05,770 --> 00:07:10,600 So if you come across in a situation like this, you're allowed to have the passwords. 90 00:07:10,720 --> 00:07:12,490 You can connect it one more time. 91 00:07:12,490 --> 00:07:14,200 So let me try one more time. 92 00:07:14,710 --> 00:07:16,270 Pastie password. 93 00:07:16,900 --> 00:07:19,300 I believe we couldn't get it in a proper way. 94 00:07:19,300 --> 00:07:20,890 Let me try one more time. 95 00:07:21,280 --> 00:07:23,140 I'm going to say copy selection. 96 00:07:23,380 --> 00:07:26,080 I'm going to come over here and say page selection. 97 00:07:26,320 --> 00:07:27,250 And here you go. 98 00:07:27,250 --> 00:07:28,390 We are inside of Bendit. 99 00:07:28,390 --> 00:07:29,080 Twenty three. 100 00:07:29,500 --> 00:07:32,740 So I'm going to code into that second the one more time. 101 00:07:33,130 --> 00:07:36,940 OK, so we have the kronur Bendit twenty four. 102 00:07:37,570 --> 00:07:43,630 So if we get this banded twenty four we will see the S.H. file. 103 00:07:43,900 --> 00:07:48,550 I'm going to catch this one more time in order to see what's going on over there. 104 00:07:49,330 --> 00:07:50,650 So far so good. 105 00:07:51,130 --> 00:07:58,900 So I'm going to actually try to write my own my script right now. 106 00:07:59,890 --> 00:08:07,690 So after writing my own bad script, I'm, I'm just going to try and put it into the target folder. 107 00:08:08,050 --> 00:08:13,330 OK, so I believe we can not see the Bendat Pass at this point. 108 00:08:13,600 --> 00:08:18,580 So if we try to go into Bendit twenty three, it will be displayed to us. 109 00:08:18,580 --> 00:08:22,420 But if we go to bed at twenty four, it won't be displayed to us. 110 00:08:22,750 --> 00:08:29,680 But if we can actually run this comment with our best script, it will be executed and we can get the 111 00:08:29,680 --> 00:08:33,700 password back because it will be executed as Bendit 24. 112 00:08:33,940 --> 00:08:34,420 Right. 113 00:08:34,630 --> 00:08:40,920 All we have to do is just make sure we put it in the wire spool, then the 24 folder. 114 00:08:41,590 --> 00:08:47,230 So what we're going to do, we're going to create a bad script. 115 00:08:48,070 --> 00:08:55,990 So let me try to create a best script in the TMP folder because we have write permissions over there. 116 00:08:56,830 --> 00:09:01,090 If I run, unless there is nothing over here, I'm just going to make a folder called Dutil. 117 00:09:01,510 --> 00:09:06,550 OK, you can create a folder you want under temp directory. 118 00:09:06,970 --> 00:09:14,020 And over here I'm just going to try and write some file, write something like kronur or best script 119 00:09:14,020 --> 00:09:14,440 file. 120 00:09:14,920 --> 00:09:18,550 I'm going to use Nano if we have an over here. 121 00:09:18,550 --> 00:09:20,680 So let's try and use Nano. 122 00:09:21,280 --> 00:09:31,000 I'm just going to say test that as H OK, Nano test out S.H. so you can just name it anything you want 123 00:09:31,900 --> 00:09:40,260 and it gives us this error, permission denied and it takes us to something like this. 124 00:09:40,260 --> 00:09:41,740 So what is that. 125 00:09:42,040 --> 00:09:45,490 I'm going to exit out of that by Hidden Control X. 126 00:09:45,820 --> 00:09:48,730 Let me try some other name over here. 127 00:09:48,730 --> 00:09:53,230 My script out as H so here you go. 128 00:09:53,230 --> 00:09:57,070 I believe Testator Assange was taken for some reason. 129 00:09:57,280 --> 00:09:59,770 OK, let me try to save. 130 00:10:00,030 --> 00:10:09,180 Control or enter and control, lax control or enter and control X, but we cannot override that, we 131 00:10:09,180 --> 00:10:14,720 cannot save it for some reason I'm going to name it my daughter's age. 132 00:10:15,240 --> 00:10:19,400 I'm going to say yes, but yeah, here you go. 133 00:10:19,740 --> 00:10:23,120 We cannot do anything with Nano for some reason. 134 00:10:23,730 --> 00:10:28,770 So let me try to create another file. 135 00:10:30,420 --> 00:10:32,310 Maybe there is something wrong with Nano. 136 00:10:32,320 --> 00:10:33,000 I don't know. 137 00:10:33,180 --> 00:10:36,150 Maybe we can use something like Vem. 138 00:10:36,570 --> 00:10:41,670 But if you haven't worked with women before, it might be hard for you to keep up. 139 00:10:42,450 --> 00:10:45,930 Maybe we can do something else like just echoing. 140 00:10:46,260 --> 00:10:49,130 Just echo something into some file. 141 00:10:49,440 --> 00:10:49,940 Right. 142 00:10:50,160 --> 00:10:52,290 Let me go into Tempy folder. 143 00:10:52,740 --> 00:11:01,190 Let me go into let me create another folder like I tell one, two, three or something like that, OK? 144 00:11:01,770 --> 00:11:06,360 And maybe there is something wrong with that specific folder. 145 00:11:06,360 --> 00:11:06,990 I don't know. 146 00:11:07,110 --> 00:11:08,120 I'm just trying. 147 00:11:08,400 --> 00:11:12,990 Let me go into two, one, two, three and let me try to run a less. 148 00:11:12,990 --> 00:11:14,940 Yet there's nothing wrong over here. 149 00:11:15,090 --> 00:11:19,710 I'm just going to go for NENO one more time and try if this works or not. 150 00:11:19,890 --> 00:11:22,320 Nonno, my script that S.H.. 151 00:11:22,710 --> 00:11:24,570 OK, no. 152 00:11:24,570 --> 00:11:32,250 Again it says that only unable to create directory if I hit enter it will open, but it won't save anything. 153 00:11:32,790 --> 00:11:36,990 So I believe there is something wrong with Nano itself. 154 00:11:37,890 --> 00:11:40,200 So what should we do. 155 00:11:40,200 --> 00:11:44,430 We should go for something else then nano again. 156 00:11:44,430 --> 00:11:48,840 We can go for them or we can go for anything else. 157 00:11:48,840 --> 00:11:52,320 Like just echo the comments into a file. 158 00:11:53,130 --> 00:11:58,860 First of all, we need to know what we are going to be executing in that best script. 159 00:11:58,870 --> 00:11:59,220 Right? 160 00:11:59,490 --> 00:12:05,610 So we're going to execute catting out the result of Bendit past Bendit twenty four. 161 00:12:06,090 --> 00:12:10,260 So let me try to echo test in the my script at S.H. H. 162 00:12:10,710 --> 00:12:12,200 Yeah, I believe this works. 163 00:12:12,210 --> 00:12:18,420 Let me see, let me run Katmai script that S.H. and here you go. 164 00:12:18,420 --> 00:12:21,120 It works so we can echo something. 165 00:12:21,150 --> 00:12:22,590 At least we know that. 166 00:12:23,100 --> 00:12:27,030 Let's try to echo something into an actual script. 167 00:12:27,420 --> 00:12:37,410 OK, into the my script as I h anyhow so I'm going to write test to, into my script that as h and see 168 00:12:37,410 --> 00:12:39,690 if that has been overridden. 169 00:12:40,140 --> 00:12:41,230 So yep. 170 00:12:41,250 --> 00:12:41,730 Here you go. 171 00:12:41,730 --> 00:12:42,390 It works. 172 00:12:42,600 --> 00:12:51,070 Now if I echo some comment into that file and then if I can copy that comment into the wire spool bend 173 00:12:51,100 --> 00:12:55,650 24, it will be executed automatically by the chrome jump. 174 00:12:55,920 --> 00:12:56,430 Right. 175 00:12:56,580 --> 00:12:57,780 That is the logic. 176 00:12:57,780 --> 00:12:59,190 That is what we are doing. 177 00:12:59,520 --> 00:13:01,260 That is why we are doing this. 178 00:13:01,710 --> 00:13:09,360 So I'm going to run code and maybe do the shebang over here, like being Bash. 179 00:13:09,660 --> 00:13:11,660 And we don't actually need that. 180 00:13:11,670 --> 00:13:14,460 Ewbank we don't actually need that line. 181 00:13:14,820 --> 00:13:19,860 Right, because it's just for like syntax purposes. 182 00:13:20,340 --> 00:13:24,480 Let me try to just do it like this and see if this works. 183 00:13:24,720 --> 00:13:34,440 My script that S.H. So that backwords such an OK is for giving a new line. 184 00:13:34,980 --> 00:13:38,670 And if I kept my script, no, it doesn't work. 185 00:13:39,420 --> 00:13:45,960 So what I'm going to do, I'm just going to skip the Bemba's thingy and I'm just going to echo what 186 00:13:45,960 --> 00:13:47,370 I want to echo over there. 187 00:13:47,610 --> 00:13:56,490 So what I want is to have the Shabangu like that, OK, without the end over here. 188 00:13:56,490 --> 00:13:57,870 So let me try this. 189 00:13:58,680 --> 00:14:01,320 No, it doesn't even echo the bank. 190 00:14:01,710 --> 00:14:04,680 So there is something wrong with the Shabangu itself. 191 00:14:05,100 --> 00:14:16,440 So we can just skip that line and just try like this cat at Banded Pass, OK, and pass Bendit 24 and 192 00:14:16,710 --> 00:14:22,710 later I'm going to save this output into somewhere that I can actually read. 193 00:14:23,010 --> 00:14:31,320 So I'm going to save it in two to one to three and test or something like Password-Protected or something 194 00:14:31,320 --> 00:14:31,890 like that. 195 00:14:32,070 --> 00:14:40,230 OK, so if we can actually see this, let me try to get my script out. 196 00:14:40,230 --> 00:14:48,360 S.H. Nope, it didn't actually run, but we haven't saved it into the my script that I say. 197 00:14:48,360 --> 00:14:57,050 So we have to just make sure that we save it into my script that h OK now if we try to get my script 198 00:14:57,050 --> 00:14:57,630 that age. 199 00:14:57,780 --> 00:14:58,350 Here you go. 200 00:14:58,440 --> 00:14:59,340 Finally we have. 201 00:14:59,360 --> 00:15:04,790 I have something in my script that S.H., which admittedly Shabangu, but I believe it won't cause any 202 00:15:04,790 --> 00:15:05,440 problems. 203 00:15:05,720 --> 00:15:12,920 So if we can make this run by Bendit 24, it will just read the password of the Bendit 24 and it will 204 00:15:12,920 --> 00:15:19,820 just save the output in the TMP folder under until one, two, three folder in the password that texte. 205 00:15:20,180 --> 00:15:26,960 So I'm going to change the permissions for that file to see Mode 777 in order to make this executable 206 00:15:26,960 --> 00:15:30,770 because we want it to be executed OK by anyone. 207 00:15:31,190 --> 00:15:32,870 We don't care at this point. 208 00:15:32,990 --> 00:15:35,600 It will be deleted anyway eventually. 209 00:15:36,350 --> 00:15:41,770 So the result will be saved in this folder actually in the password that the next day. 210 00:15:41,780 --> 00:15:45,430 But we don't have anything such as password that texte. 211 00:15:45,680 --> 00:15:48,200 So I'm going to create that, create that file. 212 00:15:48,200 --> 00:15:52,970 I'm going to say Tajh password that you see, it will be over here right now. 213 00:15:53,150 --> 00:15:56,570 If you catch this, you won't see anything because it's nothing there. 214 00:15:56,870 --> 00:16:00,020 But after it got executed, it will be there. 215 00:16:00,740 --> 00:16:07,700 But in order for this to work, I believe we have to make sure that password that can be overwritten 216 00:16:07,700 --> 00:16:08,480 by anyone. 217 00:16:08,480 --> 00:16:12,710 So I'm going to change the permission to seven seven seven to password data. 218 00:16:12,710 --> 00:16:14,630 Sixty to just to make sure. 219 00:16:14,810 --> 00:16:22,610 OK, so I'm going to copy my script that S.H. to the target folder, which is if you remember it, it's 220 00:16:22,610 --> 00:16:26,120 VAR Spool Bendit 24 like that. 221 00:16:26,960 --> 00:16:28,670 So far so good. 222 00:16:28,700 --> 00:16:30,190 So here you go. 223 00:16:30,710 --> 00:16:35,110 Now what we should do, we should wait for a minute. 224 00:16:35,570 --> 00:16:37,430 Remember that cron job. 225 00:16:37,430 --> 00:16:42,230 I believe it was getting executed that every six seconds. 226 00:16:42,560 --> 00:16:44,540 I'm not very certain about that. 227 00:16:44,540 --> 00:16:47,810 Maybe we can take a look at chrome tabs or something like that. 228 00:16:48,140 --> 00:16:55,580 But again, we can just wait for a minute and see if we get the result in the TMP folder. 229 00:16:55,970 --> 00:17:01,190 Anyway, after it's executed, it's going to write this into the password data. 230 00:17:01,850 --> 00:17:07,270 So I'm just going to get a password that the ANC forget the result right now. 231 00:17:07,940 --> 00:17:08,600 Here you go. 232 00:17:08,600 --> 00:17:09,790 We already have it. 233 00:17:09,800 --> 00:17:11,540 So it got executed. 234 00:17:11,960 --> 00:17:13,660 So far, so good. 235 00:17:13,880 --> 00:17:18,830 So I believe this is the password for the level twenty four. 236 00:17:18,830 --> 00:17:22,610 So I'm going to come over here and know the password. 237 00:17:23,090 --> 00:17:28,310 I'm going to just paces over there and this will be level twenty four. 238 00:17:28,820 --> 00:17:30,500 So great. 239 00:17:30,800 --> 00:17:33,020 I hope you get this. 240 00:17:33,020 --> 00:17:37,580 So it was very interesting and it was actually very fun for me. 241 00:17:37,970 --> 00:17:43,970 So I'm going to come over here and say Bendit twenty four and try that password and see if that was 242 00:17:43,970 --> 00:17:45,080 the right one. 243 00:17:45,950 --> 00:17:47,150 So here you go. 244 00:17:47,150 --> 00:17:54,860 Paste selection and hit enter and we are inside of Bendit when for grades. 245 00:17:54,860 --> 00:18:00,740 So it has been a long journey for us, going from twenty three to twenty four. 246 00:18:00,890 --> 00:18:04,520 So we're going to stop here and continue within the next one.