Hello, everybody. Welcome to the episode number 15 of the RCP course and my scripted enjoying
My name is Alejandro Gonna and I'll be your instructor for today's session.
The learning objectives of decision is to understand what is the eggman, scripting, enjoin and also use some. And my scripts are to help us gather information and exploit vulnerabilities. So let's get started.
Okay, so just a little about a little bit of background for you. Ah, the M I m. A prescriptive enjoin is one of the M ops most powerful, inflexible features. It allows users to write unsure simple scripts will not that simple to me
because I'm not familiar with this script and language, but, you know,
simple scripts to automate ah, lot of networking task.
You know, users can rely on the rowing and you know,
various strips that are already provider, but by n mop.
But they can also write their own scripts to meet their customs needs. For example, you want to
around in a specific script because your business or your company is actually using um,
Arrow. Slattery's O R. Room two or any specific operative system is not not actually using Windows of Maybe you want to create your own script for that purpose. So that's one of the many cases where you can, you know, actually,
to help you get the specific information from your service from your servers, for example. Deacon, you know, uh,
perform tasks like Net network discovery. More sophisticated, babe version detection with the inability detection back there. Detections. Ah, bowling ability. Explosive A shin. You know, you can perform anything with this script.
Uh, this is groups are written in, um, scripting language called Lola
Do a programming language. You know, it supports the basic stuff we already know in other languages, like object oriented programming. Functional problem in, You know, that's a driven program and all the stuff that we know that we can do, For example, the python and pearl
we actually did here in the loo. A programming language.
It's a little bit limited, in my opinion, but, you know,
s o my someone might beg to differ, and I will be totally fine. Um, you know the script. It's activated by calling the dash dash script options. But first, let me show you were our description. How many there by default. I mean, it doesn't mean that you have to, um,
used only these ones. Are
that the ones that come with a map by the fall in Lenox and colonics?
But you can actually just google us new scripts
forcibly angle. Uh, am I stripped the name giant to perform any specific task. And it's probably, ah, script for that, even if it's not, you know, such a custom task eyes. Probably someone already created the script for that.
So you can google that and just save it here in this folder and or you can also just just that, even if you, you know,
for example, just just for reference. Remember that we're actually using our with those x p on just so do you remember? Um, I'm sorry
is, actually has quite a few ports open so we can test with them and, as you can see, has won 39 445 open for the S and P protocol. So we can just, for example, in previous you man, just great that
and see what which one contain isn't B. And it's quite a few, actually.
So you can use all of them to actually test Whatever you want to test. For example, maybe you don't You want to enumerates some ice and beat stuff? Remember that we in previous in the previous video with so how to enumerate the desperate Prague. Oh, you know, you can also use
the Emam scripting enjoying to do that.
So, yeah, quite a powerful option from them up tool, in my opinion. So let's use, um, the basic SEC
it's not finding anything. Okay, I just got that
as in B dash. Yes. Sec. Okay.
And as you can see, as I told you at the beginning, is not that simple. Scripting programming language. He actually has quite a few common lines that you can, you know, play with You can even change this as they are open sores. And maybe you want to execute this script.
But you will. I also like to execute additional stuff,
uh, automatically in this script so you can actually change that. But, you know,
uh, you know, it's a lot of information. Descript, this script implemented the remote process. Execution signals to the cyst. Internal spee es exact, too by the way. I'm not
a fine of the cyst. Internal stool. Yeah, I know. They make you know there's the seaside mean lives easier. But there, You know, I have used that a lot for my penetration testing exercises because they provide quite a quite a functionality,
so you can actually hacked system. So I know
this was probably made thinking on functionality, and you know how to make life easier for the seaside mints. But, you know, it also made life easier for us penetration testers and for the bad guys. Unfortunately, yeah. This this script executes the same the same functionality,
you know, allowing the user to run programs or commands in the remote machine and seeing the output.
So this is quite quite quite
the script to use, So lets executed. Well, what do you need? You basically need ah, administrator on any straighter account. We already got that, um,
the TCP ports open. We also get that. You know, if you have administrator, you probably have the ability to create service's or execute commands in the remote machine. So
we're going that so the command will be and Matt, we need to specify the board of course,
We also need to invoke the script,
uh, Dash B s. Except that an essay
bash, Dash scripts, script
and S and B user equals means try ever
and as in be pass equals. Don't judge me, guys. I was actually playing with this machine a little bit, so
I didn't have any password in mind at the time, and I just used his one. Um Well, yeah, we just
executed and Okay, what will happen now? Targets. Oh, my God. Look at me.
Okay. Did you go? And as you can see, nothing obvious happen. Because at the end,
I'm not specifying the last and most important, Bart for this script. Which is what command or what task do I need to actually execute? Okay, it execute, You know, the common poor scanning task. But I didn't
I didn't get any information, but that's that makes sense. Was at the end.
We're not actually given this script. Any task to perform on the other side will not tell him. You know what? I want to perform this command or these up for the service. Whatever. I'm telling it. So, uh, it of course they don't return anything.
And by the way, if you don't, if you don't actually, uh, no. Um,
what you sir, you need to be using. Or maybe you don't know the password. You can combine these with Asim Bey brute,
uh, script. Something like this you you created already created That said, you just need to s and B,
Groot and comma. And you separate this with like that and just passes the options to these do. This is scripts,
in case you don't know this and the user or the s and B positive.
Um, but that's that. So as you can see it, it's again, nothing happened. And you need to modify the s and B B s a sec script or, you know, the
the options you pas or the arguments you passed to to this A script. But this options are located in a different location.
Let me just go to the location here. Yes, sir. Sure.
Okay. Here some options. You have some commands. For example, a bagger. Let's just cat does.
Let's just use the cat command to see what's happening inside and okay, Net user pas worked at and you will know a password. Doesn't seem like a backdoor to me. You know, I'm not
Let's use that as an example in any way. You can also create your own script. Just have to follow this exact same, um,
stuff. For example. Let me just copy this
so we can justice alone. Just around a little bit. Copy to the exact same location.
I know. I know I should
I should write this on my arm, but will be lazy. Ah, Sai. Bury that, Lou.
Liz, this should be separated. The Lewis and we're here. And there you go.
Okay. So what happens if we actually change it?
Oh, several of the s h O. That the singly since. Oh, it's because
don't get me again. Oh, my God. What's happening with me today?
And we can actually override this.
For example, What can we tell you? What happens if,
um what? What do you want, Dude? You guys, maybe at ah local group or administration to a local group. I don't know. We can do stuffs here, adding account. I didn't use your account username net. Use her name by the word. Ah,
We can actually let me see *** actually modified these.
Our test is used her name and password, this one to treat that
that should have done.
Let me see if we can just running late at
so once we have the script of the stuff you wanted to execute in this case, Really simple. If that doesn't work, you can, you know, just Google stuff and specific commands to you, maybe. Or if you already have a net cat executed vil on the other side. In this case and Windows,
you can actually great a real backdoor
and actually get a reversal back to you are actually greater buying shell so you can connect to that so that there's that mean. And you can also use, you know, other, uh, Lou, uh,
script. I'm sort of configuration and you can actually download Ah, bunch of conf. You're ations from the Internet. I mean, you can just go. Ah, don't be s exact, uh, networks were thinking giant configuration files and I can assure you you will find a bunch that will be helpful to you. I mean,
whatever is worse for you or again, you can create as you. As you can see, it's not that hard
to actually create a modified this, um structure And this options to for major needs. So we can now
execute the command again. The miss effect confined is just going up. Oh, yeah. There you go. And you can after that after deposit deposit work. You know, you can just add a coma here.
I will probably. Oh,
because if this works and just type convict and put it like this cyber eri
and just see that the i p. And
okay, I didn't use her account Easter name. Where were required arguments? You soon password were given,
Okay. Let me see if I can modify that
because I don't wanna be asking me for a password.
looking more modules. All right. It doesn't seem that it seems that it's asking for Bob's workers. It's bearable. Here,
let me just eliminate this
Eliminated tighter line and creating user name
And that's going to treat that.
That should do the job, right?
Let me see if I can execute it again.
And it's not Seems it seems that it is not executing anything. Let me see if I can. Windows were ready. We had actually created that.
Well, the point is that you can all let me just give you another example. What? What happens if I actually,
Okay. Script in arcs, but already passed that. I mean, user name. Let me just
blasted right here. So it stops complaining.
as in bee user rain,
Bhai's word is equals test.
And if you look it supposed to be working, it's not saying it's not displaying any output back to me. So
I'm gonna Yes. Study, work.
What happens if I connect to two
thio the remote? This Stop, Stop.
See if this actually worked.
I love you. Make sure you use the name. The main are correct. The tiger possible again.
Okay. I now have no work.
Educate the point. You guys, uh, this how you can actually, uh,
perform or execute the arguments or the task here. Uh,
you can actually do a lot more stuff, like, get an I p can peek or something like that and you know,
that's that. And if it doesn't work, if anything doesn't work, and you're actually
I want to find kind of a Hail Mary approach here, you can actually use the command. I show you a couple of babies ago, which is just passing that through a loop, for example, Were first we're listing all the scripts.
That's it. Then we're printing on Lee the last part of the script, because at the end, it will print entire, um,
been tired up path of a script. But we want only the names. Then we pass that to a filter. And we went to say, Well, on Lee Won hasn't bee. And we, you know, live out the brute food print because we don't wanna actually
with force anything. When when? What? When I flew anything went on a print and information.
And then for h of these results, remember, this is inside of a loop,
afford. Here we do an em up for the port. This and the script. This and the i p. I know we're not passing any arguments, and this will probably not the word for most of the scripts, for some of them will bring back some good information. Uh,
in these are off course Will take a while
because we're actually excuse several scripts, but you get the idea. This is kind of a Hail Mary approach, you guys. I mean, this is when you're run out of options and you're just wanted to call it a day and find something so you can present in your report.
And that happens. You guys don't get frustrated in Vietnam finds,
you know, findings. By the way, um, in your in your penetration test in process,
oppose assessment questions. Is this information gathering technique consider passive or active? Well, it's considered active itself. I mean, yeah, you're actually playing and with with the victim systems in a kind of faith face to face up minor.
What am I options that you used to call the scripts? Ah,
do you just type dash, dash script and you can call scripts.
What's crippling, which is used? Thio Create a mob scripts. Well, it's called Lou a programming language and its inscription language. Not that easy to me. But you know, people say that it is actually,
uh, this video. We saw some Emma's scripts to perform various destiny up Intestine task, and we executed is up some em up scripts to understand How can they help us interpret inspiration, testing process?
Superman's materials are what? There's no better options than the M Bob guide. Just go to de link and you will find all the options. All that you know. How can you use it? Ah, the computer ation files. You will find everything. So yeah, that that's the go to for this video.
Looking forward in the next video, we'll cover sump item and Pearl scripts. Well, that's it for today. Faults, I hope in your video and talk to you soon.