1 00:00:00,030 --> 00:00:06,120 There will be seeing how to enable the disable privileges forever user. 2 00:00:06,810 --> 00:00:11,280 In the previous video we have seen how to retrieve are the privileges for the user. 3 00:00:11,400 --> 00:00:15,120 So for this and you can see all of the privileges. 4 00:00:18,080 --> 00:00:22,120 If you do not watch the previous video, I highly recommend for you to watch it. 5 00:00:23,360 --> 00:00:25,730 So it will be a distinct that I can produce. 6 00:00:25,730 --> 00:00:28,820 And also remember this function does not add a new privilege. 7 00:00:29,240 --> 00:00:32,360 It only and it was what is disappeared. 8 00:00:33,440 --> 00:00:35,750 And here we can see we have five privileges. 9 00:00:35,930 --> 00:00:39,410 And only one is an error, remaining error that we saw in this video. 10 00:00:39,410 --> 00:00:43,280 We are going to enable this or disable privileges for that. 11 00:00:43,280 --> 00:00:46,070 We will be using this at this token with this function. 12 00:00:49,460 --> 00:00:50,300 So let's see. 13 00:00:50,810 --> 00:00:55,640 Uh, first one is the law, and we find this. 14 00:01:02,770 --> 00:01:04,780 So I guess I already 15 00:01:07,240 --> 00:01:14,170 defined this and run this before the recording of this video so I can just delete these parameters. 16 00:01:17,010 --> 00:01:19,470 So the first one is the talking hand do. 17 00:01:23,960 --> 00:01:26,000 And disable our privileges. 18 00:01:26,360 --> 00:01:31,940 So the second parameter is whether we want to disable our privileges or not. 19 00:01:32,360 --> 00:01:33,560 Of course we don't want to. 20 00:01:33,880 --> 00:01:34,850 What are the purges? 21 00:01:35,120 --> 00:01:38,610 That's why we are giving this parameter value false. 22 00:01:44,050 --> 00:01:47,770 And the third one is a pointer to the token with structure. 23 00:01:47,920 --> 00:01:56,020 So that is the news that we are refining our token, a new set of priorities whether we want to enable 24 00:01:56,020 --> 00:01:56,620 or disable. 25 00:02:08,060 --> 00:02:09,720 And this one is the buffer. 26 00:02:09,770 --> 00:02:17,150 And so we have already seen the buffer size in bytes of the buffer pointer by the previous parameter. 27 00:02:17,720 --> 00:02:23,720 So we don't want any of these previous state, uh, information. 28 00:02:23,720 --> 00:02:24,590 We want to just. 29 00:02:25,840 --> 00:02:28,570 Uh, said these values. 30 00:02:43,990 --> 00:02:48,690 And now we get the rent of this structure. 31 00:02:50,110 --> 00:02:51,860 So that's broken through the structure. 32 00:02:51,900 --> 00:02:54,520 See, we have already seen the previous video. 33 00:02:54,910 --> 00:02:58,060 First one is a privileged account in this. 34 00:02:58,780 --> 00:03:03,040 What we're going to do is we are going to loop through all the privileges. 35 00:03:04,300 --> 00:03:08,840 So for that case, we need to set this one. 36 00:03:08,980 --> 00:03:17,080 So for every time we are looping over through these privileges, we are enabling each and every only 37 00:03:17,080 --> 00:03:17,970 one at a time. 38 00:03:17,980 --> 00:03:22,570 So that's why we need to set this privilege count as one. 39 00:03:24,640 --> 00:03:31,960 And we are going to create a new structure that is almost similar to this structure. 40 00:03:35,980 --> 00:03:41,140 And I have created this one that is broken, but we're just single. 41 00:03:41,500 --> 00:03:50,390 So why I have created is we have, uh, another broken structure with the size constant is zero. 42 00:03:50,440 --> 00:03:52,660 So that's why we are getting I'm getting some arrows. 43 00:03:52,870 --> 00:03:59,080 So I have created a new structure that have this privilege account and only one edit. 44 00:03:59,230 --> 00:04:02,980 So that means it can't be one. 45 00:04:03,430 --> 00:04:05,350 And that's why we have only one error. 46 00:04:05,560 --> 00:04:09,770 So we convert, we pass this to the end. 47 00:04:09,790 --> 00:04:10,870 This is this. 48 00:04:12,490 --> 00:04:13,810 So let's go and do this. 49 00:04:16,680 --> 00:04:19,050 So let's first create a token. 50 00:04:24,030 --> 00:04:27,330 Previous single structure DPS. 51 00:04:41,250 --> 00:04:44,910 So I'm going to set this deep, dark political discourse to one. 52 00:04:46,620 --> 00:04:54,960 And after that we want to create the right so privileges is equal to. 53 00:04:56,510 --> 00:04:59,090 New broken privileges single. 54 00:05:01,080 --> 00:05:05,130 So not this one that is ruined afterwards. 55 00:05:07,230 --> 00:05:10,950 So if you go to these cruises and you can see these these either way that routes. 56 00:05:11,640 --> 00:05:14,190 So a new route that routes. 57 00:05:24,270 --> 00:05:25,260 So it be a start. 58 00:05:25,260 --> 00:05:28,350 We need to set this rule that routes value. 59 00:05:34,640 --> 00:05:39,650 So we have already got this huge structure from this are looping over these bridges. 60 00:05:39,650 --> 00:05:42,230 So which is the root structure? 61 00:05:42,230 --> 00:05:45,800 That is a layer to. 62 00:05:49,460 --> 00:05:58,910 So here you can see the road we need to specify so that say TV is not privileges of zero. 63 00:05:59,150 --> 00:06:04,040 Not really easy for us to do that. 64 00:06:04,040 --> 00:06:04,430 Really. 65 00:06:05,620 --> 00:06:11,890 So we are specifying the current fluid value which is in the current blue. 66 00:06:14,140 --> 00:06:21,550 And DBS got privileges of zero not attributes because to do so the to use the value of enabling. 67 00:06:21,880 --> 00:06:23,440 So I argue over this one. 68 00:06:24,550 --> 00:06:32,620 So if you Google this and see I have got this Stack Overflow and here you can see the values of these. 69 00:06:33,790 --> 00:06:36,610 I see pretty Nepalese values, too. 70 00:06:38,500 --> 00:06:42,400 So now we have the look at this 2.0. 71 00:06:42,400 --> 00:06:45,770 We can say first when you target get the. 72 00:06:54,590 --> 00:06:58,070 And against some action that size of. 73 00:07:01,390 --> 00:07:02,110 PBS. 74 00:07:03,980 --> 00:07:13,100 And we need to convert this structure to one the martial arts structure to point to and the object piece. 75 00:07:15,420 --> 00:07:16,060 PBS. 76 00:07:18,360 --> 00:07:19,620 And the pointer is deep. 77 00:07:23,860 --> 00:07:27,910 So I think we are good to go at this point pointing to this picture. 78 00:07:30,480 --> 00:07:32,370 So let's call this function. 79 00:07:32,550 --> 00:07:32,970 Yes. 80 00:07:33,780 --> 00:07:34,170 Yes. 81 00:07:36,570 --> 00:07:37,710 And the talking handle. 82 00:07:40,760 --> 00:07:45,650 And it's like going to our these forest because we don't want to be where our sort of our privileges. 83 00:07:46,070 --> 00:07:51,290 And the third one is pointer pointer and the reference zero. 84 00:07:56,520 --> 00:08:00,680 And the previous bear that 20 the eurozone that's. 85 00:08:02,320 --> 00:08:02,990 You put them. 86 00:08:04,590 --> 00:08:05,790 On this post zero. 87 00:08:06,880 --> 00:08:07,810 And past there. 88 00:08:10,740 --> 00:08:11,390 Good friends. 89 00:08:12,550 --> 00:08:13,690 So we are good to go. 90 00:08:15,130 --> 00:08:16,300 So it's pretty fun. 91 00:08:38,970 --> 00:08:43,290 So still we did not enable our produce. 92 00:08:43,650 --> 00:08:48,900 So this seizure call is not working when you run as a normal band. 93 00:08:49,170 --> 00:08:56,670 So that's what I have done is I have imported all of this, which are called into PowerShell, so you 94 00:08:56,670 --> 00:08:59,010 can load the Darknet assemblies. 95 00:08:59,460 --> 00:09:08,130 So I have to copy this, this PowerShell script from the Internet. 96 00:09:08,880 --> 00:09:11,100 So all you need to do is you need to. 97 00:09:15,460 --> 00:09:21,370 Define every word that holds the sharp chord and you need to use the ad type. 98 00:09:22,630 --> 00:09:26,710 The value to this variable. 99 00:09:26,710 --> 00:09:30,220 So it will create like a assembly. 100 00:09:30,400 --> 00:09:33,580 And from there you will be calling this testing function. 101 00:09:33,940 --> 00:09:35,560 So I have already added this. 102 00:09:36,280 --> 00:09:40,330 So only changes are these variable names. 103 00:09:45,830 --> 00:09:50,000 And let's go and say PowerShell bypass. 104 00:09:52,300 --> 00:09:54,070 And where are my privileges. 105 00:09:54,550 --> 00:09:55,190 And that's good. 106 00:09:55,290 --> 00:09:56,950 And especially as one. 107 00:09:58,450 --> 00:10:00,970 And now we can see we got our privileges and. 108 00:10:04,570 --> 00:10:10,600 So this also works for the administrator as well. 109 00:10:22,900 --> 00:10:25,720 So you can see most of the properties are visible. 110 00:10:27,100 --> 00:10:30,370 Now we can see we enable these privileges.