1 00:00:00,300 --> 00:00:08,760 So in this video we've been seeing, I mean we actually taking our process spoken has elevated privileges 2 00:00:08,760 --> 00:00:17,670 are not freshmen get the handle of the process and further process may be opening your broken hand using 3 00:00:17,670 --> 00:00:23,250 this open process broken so this broken is like an identity for further process. 4 00:00:23,490 --> 00:00:26,100 So it contains, uh, in CIOs. 5 00:00:26,100 --> 00:00:34,140 And also this token information would use it to identify whether that particular process has privileges, 6 00:00:35,880 --> 00:00:43,260 which kind of privileges, whether we have normal user privileges or administrative rule is our program 7 00:00:43,260 --> 00:00:45,810 can impersonate other users as well. 8 00:00:47,680 --> 00:00:48,340 So first. 9 00:00:52,590 --> 00:00:55,200 Let's go and import using system that. 10 00:00:56,910 --> 00:00:57,930 Diagnostics. 11 00:00:58,140 --> 00:01:00,750 So in this we have this process. 12 00:01:01,770 --> 00:01:02,670 We can also. 13 00:01:20,780 --> 00:01:21,120 Okay. 14 00:01:21,140 --> 00:01:21,740 So. 15 00:01:24,910 --> 00:01:26,800 Let's import these namespaces. 16 00:01:38,790 --> 00:01:41,160 And we will copying one enum for this. 17 00:01:46,610 --> 00:01:53,360 So we'll be getting information based on this, you know, sort of copy this and based here. 18 00:01:59,140 --> 00:01:59,500 Okay. 19 00:01:59,500 --> 00:02:08,410 So first we need to get the handle to the current process so we can do that in Java using process DA. 20 00:02:10,900 --> 00:02:12,920 Get current prices dirt handed. 21 00:02:13,210 --> 00:02:15,990 So this will give you the handle. 22 00:02:16,000 --> 00:02:18,070 The handle type is in the binder. 23 00:02:18,070 --> 00:02:23,080 So that same BTR is proc handle. 24 00:02:28,830 --> 00:02:33,510 So we're getting the Senate and this we will proceed to this open process, Duncan. 25 00:02:35,420 --> 00:02:43,490 So the first one to declare this one and it is in I don't to to that you do not deal. 26 00:02:57,160 --> 00:02:59,080 And the return type is worth. 27 00:03:03,260 --> 00:03:05,890 So the first parameter is the process. 28 00:03:05,900 --> 00:03:13,860 And so we have already created this open to this process and it so that is this in the pointer process 29 00:03:14,840 --> 00:03:17,740 and the next one is different. 30 00:03:17,750 --> 00:03:20,330 So it's a number desert axis. 31 00:03:20,900 --> 00:03:30,200 So if you go to this information, if you open this axis right for axis tokens, you can see all of 32 00:03:30,200 --> 00:03:30,680 these. 33 00:03:32,930 --> 00:03:33,410 Access. 34 00:03:33,410 --> 00:03:33,680 Right. 35 00:03:33,680 --> 00:03:41,900 You need to specify which you want to use in this passes token. 36 00:03:43,820 --> 00:03:48,800 So I how ordered, etc. authorities, uh, denied access. 37 00:03:49,160 --> 00:03:50,510 And we have these values. 38 00:03:53,520 --> 00:03:55,470 So it's actually an integer. 39 00:03:55,470 --> 00:03:56,700 So we can just say. 40 00:03:59,450 --> 00:04:00,950 Or we can also say you ain't. 41 00:04:04,080 --> 00:04:08,990 Pay their taxes and then they'll will be broken and sold for peace. 42 00:04:09,870 --> 00:04:12,960 Similar to what will be passing this. 43 00:04:12,960 --> 00:04:13,360 Uh. 44 00:04:13,470 --> 00:04:15,180 The reference. 45 00:04:16,200 --> 00:04:16,710 So. 46 00:04:19,560 --> 00:04:19,790 Now. 47 00:04:19,790 --> 00:04:20,850 It would be that again. 48 00:04:20,850 --> 00:04:21,170 And. 49 00:04:23,700 --> 00:04:33,280 So that's going to create an empty and that is empty talk and handlers equals to interpret your dart 50 00:04:33,300 --> 00:04:33,680 zero. 51 00:04:33,690 --> 00:04:36,420 So currently it's an empty one. 52 00:04:42,620 --> 00:04:50,750 So Auburn presents broken off and we need to find parameters but I'll handle the process and it and 53 00:04:50,750 --> 00:04:56,540 the next one is the permissions and what you want to open the broken with these permissions. 54 00:04:57,140 --> 00:04:59,480 So we'll be using network inquiry. 55 00:05:01,630 --> 00:05:04,870 So if you want to write it, just prove it. 56 00:05:04,870 --> 00:05:11,760 Yes, you can modify the existing disabled permissions to enable they can use this so for another reason 57 00:05:11,770 --> 00:05:12,730 or token query. 58 00:05:14,050 --> 00:05:22,360 So just participate if you want to uh, also open in uh, with the program to just put images, you 59 00:05:22,360 --> 00:05:23,260 can see our. 60 00:05:26,730 --> 00:05:27,750 And but this value. 61 00:05:28,290 --> 00:05:33,600 So for no inquiry is enough and I would put this reference to our. 62 00:05:40,050 --> 00:05:46,350 So we got this broken tender and we can pass this to this get dog information function. 63 00:05:48,800 --> 00:05:53,560 So let's also import this one, which is in advance paper that you do not deal. 64 00:06:08,310 --> 00:06:10,410 So that means also bull. 65 00:06:13,900 --> 00:06:15,580 And the first one is the talking it. 66 00:06:16,510 --> 00:06:20,550 So you and we are talking Handel. 67 00:06:21,880 --> 00:06:24,730 So these names are does not need to be accurate. 68 00:06:24,730 --> 00:06:26,020 And, uh. 69 00:06:27,130 --> 00:06:28,490 There should be, uh. 70 00:06:29,810 --> 00:06:30,470 In Jakarta. 71 00:06:31,010 --> 00:06:33,800 So the next one is the token information class. 72 00:06:33,860 --> 00:06:34,520 So what is this? 73 00:06:34,610 --> 00:06:35,020 This is. 74 00:06:35,570 --> 00:06:39,200 You know, if you go to this and here you see all of its values. 75 00:06:39,410 --> 00:06:40,730 The starting number is one. 76 00:06:40,730 --> 00:06:47,510 So the next will be booting for our next track Broken User Groups, previous or not, etc. Primary group. 77 00:06:48,410 --> 00:06:53,170 And now we'll be using that Broken International. 78 00:06:54,760 --> 00:06:56,620 So we have already defined this one. 79 00:06:56,890 --> 00:07:01,450 So you can just simply copy this and remove this one and put public. 80 00:07:03,700 --> 00:07:09,670 So here you can see the first one is one and the next four will be two, three, four and so on. 81 00:07:17,430 --> 00:07:19,950 So these are the type of information class. 82 00:07:24,230 --> 00:07:26,960 And then next to unspoken information. 83 00:07:27,080 --> 00:07:34,370 So this is the output of pointer to the structure of this R token addition. 84 00:07:34,820 --> 00:07:39,350 So when you're passing the token information, if you pass the token elevation, the output will be 85 00:07:40,220 --> 00:07:41,600 the pointer to this structure. 86 00:07:41,660 --> 00:07:45,200 If you pass this ah token user, it will be output to this program user. 87 00:07:45,530 --> 00:07:48,680 So first, let's check what is the token television structure? 88 00:07:49,910 --> 00:07:52,010 So television return is very simple. 89 00:07:52,020 --> 00:07:57,210 It contains a single integer number and a non-zero value. 90 00:07:57,380 --> 00:07:58,880 The token has a lot of bridges. 91 00:07:59,270 --> 00:08:03,350 So if it is zero, the writer does not have a previous address. 92 00:08:03,350 --> 00:08:05,210 It has this and other privileges. 93 00:08:05,900 --> 00:08:07,340 So let's go and declare that one. 94 00:08:14,330 --> 00:08:18,710 So structurally, though, they cannot see kinship. 95 00:08:33,100 --> 00:08:35,460 You weren't 32 token. 96 00:08:35,500 --> 00:08:36,280 You had better. 97 00:08:39,080 --> 00:08:39,380 It's. 98 00:08:44,160 --> 00:08:47,670 The third parameter for this function is token information. 99 00:08:48,060 --> 00:08:50,650 So it is also, uh, in the. 100 00:08:57,040 --> 00:08:59,050 And the next one is local information. 101 00:08:59,050 --> 00:09:03,670 And so the size of this structure, we have specified a year. 102 00:09:04,690 --> 00:09:13,410 So we can say in token information and and the next one is redundant. 103 00:09:13,420 --> 00:09:19,800 So that is the end of this token information clash structure we have basically. 104 00:09:21,920 --> 00:09:30,650 We need to pass this as a reference because this function returns the value of the structure we have 105 00:09:30,650 --> 00:09:36,260 specified into this variable so we can identify what is the structure. 106 00:09:36,650 --> 00:09:38,360 So these are the dynamic types. 107 00:09:38,360 --> 00:09:42,290 There are some structures that work in groups. 108 00:09:42,590 --> 00:09:45,770 So the groups number of groups vary again. 109 00:09:45,890 --> 00:09:49,190 So you will have the array of structures. 110 00:09:49,310 --> 00:09:53,330 So in that case, the size varies. 111 00:09:53,330 --> 00:10:02,750 So in that in to this function, the actual length of the described structure for this existing token. 112 00:10:03,260 --> 00:10:05,900 And then we need to call this function another time. 113 00:10:06,200 --> 00:10:08,060 So we will be doing that. 114 00:10:08,060 --> 00:10:10,280 So you, you don't get confused. 115 00:10:12,480 --> 00:10:20,880 So far, I will be getting plenty of talking on the squad aviation structure. 116 00:10:24,000 --> 00:10:31,260 If you can see this body, I can see normally burning bodies of the land before we can directly pass 117 00:10:31,260 --> 00:10:32,010 the land to foot. 118 00:10:32,280 --> 00:10:36,960 But in other sectors you cannot pass like that because they will be of the dynamic. 119 00:10:38,370 --> 00:10:41,460 So first of all, getting the land to this broken structure. 120 00:10:43,950 --> 00:10:51,750 They'll get information off and the first one is spoken handle and the next one is broken in formation, 121 00:10:51,750 --> 00:10:54,810 glass dart, broken elevation. 122 00:10:55,860 --> 00:11:02,970 So we are specifying this broken elevation structure and the next one is a pointer to this program information. 123 00:11:03,540 --> 00:11:08,300 But for now, we are not, uh, we don't want any output. 124 00:11:08,310 --> 00:11:11,370 We just want the length of this structure. 125 00:11:11,490 --> 00:11:13,320 So we can change 2.0. 126 00:11:15,740 --> 00:11:17,270 And the next one is Berlin. 127 00:11:17,480 --> 00:11:24,980 So we don't know then what we're going to do is in elevated land is equal to zero. 128 00:11:25,850 --> 00:11:27,980 So this is the input parameter. 129 00:11:28,070 --> 00:11:28,720 You don't know that. 130 00:11:28,730 --> 00:11:32,580 And that's why you are passing zero elevator length. 131 00:11:34,370 --> 00:11:42,170 And upon returning, this will, uh, this function will refer to this, uh, token elevation structure, 132 00:11:42,800 --> 00:11:49,760 and we'll try to output this sizing to this reference value that is elevated. 133 00:11:52,320 --> 00:11:52,610 Lynn. 134 00:12:00,730 --> 00:12:06,040 Now I can go and put into this a and it's also say. 135 00:12:23,050 --> 00:12:23,290 Okay. 136 00:12:23,290 --> 00:12:31,540 Before ending our program, I need to read across the handle that is using the cross handle function. 137 00:12:32,290 --> 00:12:36,490 So it just takes this handle as an input and it will cross their handle. 138 00:12:44,990 --> 00:12:45,410 Okay. 139 00:12:45,620 --> 00:12:56,180 So let's start big external pros and we love endpoint data and so we can use this cross handle. 140 00:13:05,220 --> 00:13:06,060 Can be love. 141 00:13:07,750 --> 00:13:14,250 First we need to read the talking handle and then we need to close down our process. 142 00:13:14,260 --> 00:13:17,440 And I think we are good to go. 143 00:13:17,830 --> 00:13:23,230 For now, we are fighting the land of this talking television structure and it should be fought. 144 00:13:23,620 --> 00:13:24,550 So let's run this. 145 00:13:41,090 --> 00:13:42,640 So we are able to grow. 146 00:13:42,980 --> 00:13:46,730 And so that's common to one. 147 00:13:48,610 --> 00:13:50,380 And European talent is for them. 148 00:13:51,130 --> 00:13:56,740 So now what they're going to do is we are going to call this function. 149 00:13:57,070 --> 00:13:58,540 They're talking information. 150 00:14:02,440 --> 00:14:07,870 First one is broken enter and the next one is our broken elevation structure. 151 00:14:13,450 --> 00:14:22,090 And the third one is we need to pass this, uh, uh, pointer, so let's create one and the pointer. 152 00:14:26,050 --> 00:14:35,110 Elevation pointer is equal to we need to create this master dot allocate head to global so it will allocate 153 00:14:35,110 --> 00:14:35,770 the memory. 154 00:14:37,570 --> 00:14:41,650 So how much you want to get this off of this rent? 155 00:14:41,770 --> 00:14:43,300 So it is for. 156 00:14:49,330 --> 00:14:54,910 Now we can buy this elevation winter. 157 00:14:57,470 --> 00:15:06,860 And the next one is for information and that is for and the reference elevator, which you will also 158 00:15:06,890 --> 00:15:07,490 be for. 159 00:15:08,180 --> 00:15:08,450 Okay. 160 00:15:08,570 --> 00:15:17,360 Now we got we got the handle for the pointer for the token return structure. 161 00:15:17,510 --> 00:15:23,860 So we need to convert this pointer push structure we can use master dot pointer to. 162 00:15:25,130 --> 00:15:25,820 Structure. 163 00:15:27,820 --> 00:15:34,300 So the pointer is just pointing to the starting elementary structure in order to convert this to the 164 00:15:35,080 --> 00:15:36,520 structure, meaning is this function. 165 00:15:37,300 --> 00:15:39,940 You can also access elements using the pointer word. 166 00:15:40,490 --> 00:15:41,230 All right. 167 00:15:41,260 --> 00:15:46,510 This is a good method to convert to sector and we can access elements of that structure. 168 00:15:47,050 --> 00:15:54,190 So the first parameter is the this pointer and the second one is our type of this structure. 169 00:15:54,190 --> 00:15:57,340 We want to convert the type of. 170 00:15:59,070 --> 00:16:00,570 Talking irrigation. 171 00:16:03,620 --> 00:16:07,220 And this will return the chair of the organization. 172 00:16:07,400 --> 00:16:15,020 So I will be creating a new object that is talking education and we need to cash in this into tokenization. 173 00:16:16,400 --> 00:16:16,760 No. 174 00:16:16,760 --> 00:16:18,980 I can just, uh, put into this. 175 00:16:19,160 --> 00:16:21,020 The broken is the elevator. 176 00:16:26,780 --> 00:16:27,950 So let's go around this. 177 00:16:28,820 --> 00:16:33,470 And here you can see the value is zero because we are running as a normal user. 178 00:16:36,740 --> 00:16:38,750 Your feet are broken. 179 00:16:38,750 --> 00:16:41,050 Use the elevator not equal to zero. 180 00:16:41,870 --> 00:16:42,560 Then bring. 181 00:16:46,140 --> 00:16:46,820 Related 182 00:16:49,590 --> 00:16:50,430 religious. 183 00:16:56,010 --> 00:16:56,700 There is. 184 00:17:02,340 --> 00:17:03,120 No elevator. 185 00:17:04,740 --> 00:17:08,540 And we can also print the value of this brokenness. 186 00:17:13,490 --> 00:17:13,760 Okay. 187 00:17:13,760 --> 00:17:18,310 So it's redundant this and not elevated. 188 00:17:20,900 --> 00:17:21,110 Now. 189 00:17:21,110 --> 00:17:24,020 Let's go ahead and open this one in Florida. 190 00:17:26,670 --> 00:17:28,620 That's when they see him as administrator. 191 00:17:28,950 --> 00:17:30,240 Now we have this. 192 00:17:31,360 --> 00:17:31,710 This. 193 00:17:34,050 --> 00:17:41,310 Now, if I go and run this elevator to see another guy and see the values run and we have these images. 194 00:17:44,830 --> 00:17:52,530 So the time for this, we knew how to find our process as this Buccaneer version. 195 00:17:52,540 --> 00:17:52,750 Not.