Hello, everybody. Welcome to the episode number 40 Off the privilege escalation Siri's win those management instrumentation Common line.
My name is Alejandro Gonna and I'll be instructor for today's session.
The learning our objectives is to understand the concept behind this technique and apply and execute commands to gather information so we can actually escalate privileges. So let's get down to business, shall we? First let me just grab my always cool will not be used in the college
terminal will be using
just the previous video or Windows machine right here
again. This is just to show you a different screen because they weaken. Just connect to S H to the big time machine. But, you know, just to show you a different scrape this time
let me first try to give you some background of the windows management instrumentation. Come on, Line two or you know, don't you make just for short You know, this is perhaps one of the windows most powerful common line tool. This tool can be very practical for information gathering on post explosion ation.
You know, fully explaining the nature, the commands and the functionality of the Dublin make tool will take a full, you know, Saberi course on its own. I will try to give you the basics so you can, actually, you know, get the idea of what you can achieve with this tool. And maybe you can just after that Google
the commands to, you know, to get more
detailed information for your for your app. Privilege escalation process.
unfortunately, some default configuration of Windows did not allow the access to the W Mick unless the uterus administrator, uh,
it seems that the any version of the windows expedient not allow to access access the W Mick command from allowed privilege account or for ah, yeah, low shell account.
Uh, but, you know, this is not the same from Windows seven onwards. Um, you know, Windows eight. When those 10 the one we're using right now allowed users are Lao privilege users to use the W make
ah, quit. He operated system without modifying any sense. I guess this is because the remember that there was a change in how the access control model
worked before Windows X, p and windows be stopped. Remember that old application were fatally because some of them were not able to run properly because they needed administrative privileges, which you cannot, you know, you were unable to give our application. That is he.
When the change was made before with those x p
and then Windows Vista
because it changed actually changed from discretionary access control model to mandatory access control model there to, you know, access control models. But, you know, this is not part of the off the other cpq or so maybe if you have any doubt from that, you can cool those models and you will see what I'm talking about. But yeah,
this is true for again will be used in the w
make command on window stand. Obviously, I'm a privilege you, sir, but, you know, um, you can execute the same command with allow privilege, user
to give you an idea of how extensive this tool is or you know all the options. You have to run this command. Let me just type here. W
make forward slash question Mark.
And this will give you a good idea. President. You to continue escaped to stop. You know, more, more more options, more options, more options and more options. Do you get the idea? So the next step in our you know,
delicious collation process is to look for some quick security fails. Um, we can easily, you know, used to to upgrade or permissions or escalate privilege. The first and most obvious things we need to look at the, you know, patch level. There's no need to worry. You know,
if we can affect the operating system will be just squaring this options. Um, so, you know, let me just
for example, check with doubly make up If we're the install patches that we have on this operating system, for example. So the command will be doubly make Ah
so we're interested in the caption field description.
Nope. Sorry. Heart fix i d. It may be installed
something like that. Hopes Sorry about that is Q f e. Sorry. Sorry. Sorry, sorry, sorry. Let me go back
and apologies once again.
And you know they will give us some good idea what is installed Once not remember the commander we saw in the previous video? Well, this is more detail, or this is just to get that specific detail. Want you to see for example, sis
hopes or a system in four,
and these will dump kind of the same thing. But, you know, maybe not as tale as we like to culturally, to the w make a man which would leave us more information about it. It will give us the link, and you can, as you can imagine looking at more fields here or more flags to see more information as your wish
assault whisk with Windows. That output isn't exactly ready to use the best ways to look for religious collection exploits. And, look, you know, maybe they have a specific K B number. Like, for example, we already know that this thing stall So maybe
we can see if there's an exploit that was used before this installation or even leverage this installation
to escalate privileges You confined. You find out if the machine, for example, with this command, if if the machine is actually vulnerable to the famous eternal blow the one though we we were using the windows expect machine. Um,
afternoon, Mary. You know, after getting all this information from the operating system, you can, you know, maybe find out
grip, see what patches are actually start a specific patches for like, for example, if you know that, for example. But you already know that matched those that took place and you saw a specific batch that was, you know, maybe telling you that what you were able to escalate privileges, you can just
fine. And you don't get the same command just a place in command and
used the fine string, which is the reversion of the window's fine string.
filter. It is our hope sort filter decided by I don't know,
uh, que vi number something like that and write a number like, for example, let me just copy paste this one right here
and just based it in
You'll quit animal. Tell me Okay isn't stuff. And, for example, if I just make you a number, we're number up. I know
once a tree, for example. Oops.
and things not installed, it will not return any information. So let's assume that view from the patches. They realize that this was a really big fixed for you or for the operator system before the Windows operating system.
Maybe you can actually use this query to see if the package in stall is if it's not installed the jackpot.
You get your exploit to actually escalate religious. Now we can search for configuration files used to automatically or manually installed updates. This configuration files contain a lot of sensitive information. Says that such as the operating system, product key and administrator pass work.
But we're not. You know, what we're most interested in is in the admin password.
We can use that to, you know, obviously escalated privileges. So typically, these are, you know, they're some directors that contain conf. You oration files. Um,
you know, however, it's always a good idea. As I told you at all, the previous medias your enumerated, this the operating system, you're gathering as much information as possible from the operating system. So just check this. Maybe this, um,
locations is not a good idea. Uh, so let me just
give you, for example, some locations here so you can actually get take a look.
I would just go to my
Colin machines so you can actually see what I'm talking about. Let me just up on the body here so you can go to these locations these locations are not necessarily in place. For example, in my Windows 10 machine are not in place, but I can assure you is worth looking if they're presented,
presented in your operating system or the or the operating system or your victim. So
just you can, you know, be aware of that. So then I again you should check in the entire operating system so you can see if there's no more information in that
area. The next thing we'll look for it is, you know, on a strange registry, said and call. Always install elevated.
Ah, if the settings is unable or if you actually exist, sometimes it is not enable or doesn't exist out. Like, for example, I don't have a setting here
in the operating system, but it allows users thio off any privilege to install packages, files. *** administrator. It seems like a big security flaw to me because that you know that you will create a lot of privilege user in the first place
on restrict their years of the operating system.
But give him the ability to stop problems. US administrators. That doesn't seem right. Imagine me installing. I don't know. Net cat or something like that as administrator and their retrain trying me back a reversal if you actually find out on your query on your registry.
Ah, jackpot. You actually found the
You know that. What? The thing that you were looking for, like for example, wreck Query, which basically is just quitting the registry and
always install elevated.
As you can see, the system was unable to find specified registry key or value. So I don't have it, you know, install or or used. Let me
let me go here. Yeah, I want to check it out like,
Ohh ki sub word policies Windows
and you can see that I don't have in anywhere in displays like we're really, um, Windows Microsoft with those installer. And there's not even any Stahler in here
is you can see there's no installer for her or registry entry for that. So I don't have any solid. But, you know, it's always a good thing that you have. Todo is always something you have to check to see if you know you can actually start something. Ah, suddenly elevated user in. If you do, you can do that. I mean, jackpot again.
You can easily elevate your privileges
to finish off this session.
Well, do something. You know, some quicks searching on the operating system and, you know, maybe hope to just too far something useful or something. Something sensitive that we can use to escalate privileges. Like, you know, for example,
the commander I'm about to type Right now we search for the file system
for file names containing cer tain keywords. Like, for example, you can
you think the key word passwords or credit or credentials are that convict or something like that I like
For with less s and like
pass And I will also like to use
or something like that
and we'll tell me a lot of information. Okay. Okay. Pas password. Pass a PS pas work
which is located in since internals directly, I will see will cover this is internal suite in the next episode, which is a really cool application that we can use.
For example, search files. Oh, asserting files that can save key work and, you know, generate a lot I'll put or something like that. Like, for example, find string
forward slash I bus work.
And, you know, maybe the XML files or something like that.
I don't have any file with that description. That's okay. Maybe that any file, for example?
Okay, now that t x t and you get the idea, you can actually Okay, here's won't file with passwords. What? The word with the word passports. A list?
Uh, you can, you know, use again. The same, uh, wreck query command, You know, to actually look for key words on the under registry. Like, let me give you an example. Here. Right. Query.
forward last f by his work
Like, for example. Maybe it rake
and he will down me a lot of information. The one that contained the cure password. So maybe you want to search for the one that contain the word. I don't know whatever word you're looking for, you can actually use that command. Tiu c. What I put is there.
Ah, so to simplify things, there's there's, uh we actually have ah,
kind of remember that the script that we selling a previous video to to automate Aro for, ah, linens, privilege escalation, which was written in person. We actually have, um,
another another ah, useful link that you can use or useful off. No link. But this will. Ah, that any, uh, but file or, you know, yeah, Windows, the script file where you can use it for your information gathering
or bullish escalation.
process is from they always trusted Fastest security, Kathy. Security
And this guy contained, you know, it has a lot off youthful information that you can actually use. Ah, tutorial scripting. Uh, and you know, you can actually download the tools from from this guy to actually, uh,
performed all this tusk automatically and not, you know, bother with all the, you know, typing the commands and everything. But, you know,
that's always maybe, ah, you know, automatic tools, my work for some situations. But in other situations, you will have to type all this manually. And that's the point. I just want to show you guys What's the best way to do that? Another special mention, You know, I will not, you know, use the commanding here because that will
imply a lot of work in a lot of another. Basically another
cyber acres dedicated to Only that is the power power exploit, which is an excellent power shell framework written by math Grab vert. I believe you spell his last name, You know. Ah, as long as you search for power exploit, you will see what what the outer is,
which is basically Taylor to reverse engineer. Forensics and pendency been testing task, so yeah, you can also use power she'll commands to try to escalate privileges. But most of the time, when you're allowed privilege a low privilege in windows,
maybe using power shall commands. He's not a good idea, because at the end,
that would be locked. And maybe your activity will be this copper. So you have to be a selfie. It's possible maybe checking manually is that you know, go to process. But you can use fast security thio scripting to actually, you know, automate all your ah
Let me just close this out.
What is the tea by the command? W make forward slash question, Mark. Well, this is basically just to show you all the options that you have under Windows management instrumentation command line, which is a lot of options are way saw a couple of them, like for check in the heart fixing style. But, you know,
this command will show you all the options you have
in the dollar. You make command.
What is it? Cheaper. The command find strain on and, you know, password. And then the files. Well, basically is just thio try to find, you know, certain type files for a key word. In this case, the key word spaz word. And the files are
XML that any that t x t and see any file in the operating system
has the word buzzword inside.
In this video, we'll learn the concepts behind this technique and were implemented on executed some commands to help us escalated privileges supplement materials. As always, the book Master and Colin is for lance penetration intestine and in this case, faster security windows. Foolish escalation post good reads
in the next video will cover the windows applications and service is
well, that's it for today, folks. I hope you get the video and talk to you soon.