WEBVTT

00:00:00.640 --> 00:00:05.060
So now that we've used Portscan to look for open ports,

00:00:05.340 --> 00:00:08.480
let's go ahead and look for any type of shares that currently

00:00:08.480 --> 00:00:12.750
exist in the domain. PowerSploit allows you to easily find

00:00:12.760 --> 00:00:14.920
shares that exist in the domain.

00:00:14.930 --> 00:00:19.140
The command that we're going to use here is Invoke‑ShareFinder, and I'm

00:00:19.140 --> 00:00:23.030
going to go and pipe this output so that I only see the name of the share

00:00:23.200 --> 00:00:26.650
and the Computername which the share resides on.

00:00:27.140 --> 00:00:29.210
So I'll go ahead and run this and give it a couple of

00:00:29.210 --> 00:00:31.330
minutes so that we get some results back.

00:00:31.460 --> 00:00:33.770
Remember that when you run this in a live environment,

00:00:33.780 --> 00:00:35.630
depending on the size of the environment,

00:00:35.640 --> 00:00:37.950
it could take some time for you to get the results

00:00:37.950 --> 00:00:39.960
back. As the results come back,

00:00:39.970 --> 00:00:44.140
I can see all of the shares that currently exist on this domain.

00:00:44.310 --> 00:00:47.060
Now looking at the Admin‑PC in my results,

00:00:47.440 --> 00:00:50.080
there are a couple of default shares, but there's also a

00:00:50.080 --> 00:00:52.660
normal share which is called Domain Tools.

00:00:53.440 --> 00:00:56.950
Now I can use PowerSploit to actually check if I've got access to

00:00:56.950 --> 00:01:00.100
that share by making use of another command.

00:01:00.350 --> 00:01:05.840
The command that I can use is Find‑DomainShare, followed by the computername,

00:01:05.840 --> 00:01:12.190
and then using the checkaccess switch. I could also use this command without any

00:01:12.190 --> 00:01:15.480
switches to go out and find all the domain shares.

00:01:15.490 --> 00:01:18.960
It'll give me a result similar to the Invoke‑ShareFinder.

00:01:19.740 --> 00:01:22.760
So I'm going to go ahead and hit Enter, and let's see if we've got

00:01:22.760 --> 00:01:26.410
access to any of the shares on the Admin‑PC.

00:01:26.430 --> 00:01:27.780
So looking at the results,

00:01:27.790 --> 00:01:31.280
I can see that this current user has access to the Domain

00:01:31.280 --> 00:01:34.460
Tools share that exists on the Admin‑PC.

00:01:34.840 --> 00:01:36.100
Using this information,

00:01:36.110 --> 00:01:41.120
I can use some additional tools to perform SMB enumeration or even

00:01:41.120 --> 00:01:44.560
making use of an SMB exploit on their target machine.

00:01:45.540 --> 00:01:48.060
So moving on, let's talk about weak permissions.

00:01:48.540 --> 00:01:52.760
PowerSploit offers another valuable way that you can use to

00:01:52.760 --> 00:01:55.650
find weak permissions within Active Directory.

00:01:56.040 --> 00:01:59.500
Now you may know that Active Directory's permissions can be very,

00:01:59.500 --> 00:02:03.450
very complex, and sometimes it can be really confusing.

00:02:04.140 --> 00:02:08.220
There are also tons of access control lists that exist within Active

00:02:08.220 --> 00:02:11.490
Directory, a lot of them having default permissions,

00:02:11.640 --> 00:02:15.460
which are actually bad because you need to go and secure them as a

00:02:15.470 --> 00:02:19.550
good security administrator. As a pen tester, you need to check

00:02:19.550 --> 00:02:22.820
these permissions and access controllers because sometimes

00:02:23.020 --> 00:02:27.670
administrators might miss the defaults and leave them open where you

00:02:27.670 --> 00:02:28.890
can actually make use of it.

00:02:29.250 --> 00:02:32.080
PowerSploit provides you with a great tool that you can

00:02:32.080 --> 00:02:36.120
use to discover these access control lists, and that is

00:02:36.130 --> 00:02:38.260
the Invoke‑ACLScanner command.

00:02:38.270 --> 00:02:42.380
This command works by looking for the easiest permissions that you can

00:02:42.380 --> 00:02:47.060
use to exploit by filtering out the permissions where the set of the

00:02:47.060 --> 00:02:50.960
user or group have resource IDs above 1000.

00:02:51.230 --> 00:02:54.320
It also looks for any rights granted that can provide

00:02:54.320 --> 00:02:57.260
modify access to the targeted object.

00:02:57.940 --> 00:03:00.980
So I'm going to go ahead and run this, and what it will do is it'll actually

00:03:00.980 --> 00:03:05.310
give me a list of all the different ACLs with weak permissions.

00:03:05.350 --> 00:03:09.030
Keep in mind that it might take a minute or so to actually run because it's

00:03:09.030 --> 00:03:11.760
actually enumerating all of this under domain controller.

00:03:12.240 --> 00:03:14.510
So looking at the results that have been returned,

00:03:14.620 --> 00:03:18.140
there are a number of access control lists that have the

00:03:18.140 --> 00:03:20.160
standard out‑of‑the‑box permissions.

00:03:20.940 --> 00:03:23.030
Looking at the rights that they have,

00:03:23.040 --> 00:03:26.030
we can see that these are pretty extensive and we

00:03:26.030 --> 00:03:27.860
can leverage it for exploitation.

00:03:28.840 --> 00:03:33.330
So now let's move on to privilege escalation, and let's see how we can

00:03:33.330 --> 00:03:36.760
make use of PowerSploit to escalate our privileges.
