2 hours 25 minutes
in the last few videos we talked about Ducky script and all the different commands you can use within it.
In the next few videos will be building and watching intact using ducky script and the USB rubber ducky.
Okay, now we're gonna build our script and deployed as a payload on our USP rubber ducky.
What the script is going to do is it's going to minimize all the victims of Windows. It's going to then take a, uh uh, a screen capture of their screen.
Then we'll hide their desktop icons, take that screen capture and said as the wallpaper.
Now, what this is gonna do is it's going to just be very annoying for the person they're going to believe that they're seeing their desktop icons when in fact they're only seeing the wallpaper that we made.
So it's very knowing, but nothing malicious. So, um,
what's less so let's go ahead and get into it.
So what you're gonna do is you're an open, you know, Pat plus plus,
Then we're gonna make sure we select the language. So we're gonna go to the language and select Ducky script. Make sure we have the scripting language in there
and now every script You really want to start off with a delay?
Ah, larger. A larger delayed because a lot of computers need to identify the device installed drivers, so it usually takes about 5 to 6 seconds for this to happen. So let's go ahead
and put a five second delay just to start off.
And remember, um, the commands should be highlighted. And, uh, like a blue or red color. I think rim is green.
And this, and by having language on it, helps you identify to make sure you have,
um, you have the correct command in there,
so we'll start off script with DeLay 5000. So I'll do a five second delay. Remember their milliseconds next on the script. What we want to do is minimize all the victims windows.
Now, to do this, you'll need to push the windows, Dickie.
So if you remember, uh, Windows key can interpret either be do I or windows on the script will just used to you I
x, we want to use a delay.
Now, remember, delays are very important lips, because if you don't use them and the commands run on top of each other. Things aren't gonna work. Work properly.
So I'm gonna actually type my now and not use a default delay because sometimes you'll need to just delays. And I just like this method better. But you can use whatever method you like.
Okay, next. Once we have all the windows minimized, we're going to take a screenshot of the victim's screen.
So to do that,
we will use this command print screen,
and this will take a screen capture of their screen
and then again hold to another delay
Okay, so now where you're going to want to use the context menu on the desktop?
Because there's something on the desktop we'll need to get to in that menu
s O. If you remember, you can either use the app or the menu. He will disused menu.
And then again, only another delay.
And let me just show you what we're going to be doing with this context menu. Just first, put that delay in. Let me in minimize this for a second.
So when I hit this menu key,
make sure I'm on the desktop.
Here we go.
Uh, once I haven't been He we want to hit V for view,
and then we're going to hit D. And what this is going to do is is going to hide all the icons.
And as you can see, they're all gone and get those back. Will this do the same thing? So the menu button
and then D on their back,
And so this is what we want to do in the script. So let's go back there.
So if it's as you could see was started the menu,
we gotta delay next. We want to do
get the menu up it be that'll open that view
and then we'll do another delay,
and then we'll do another
string and the string was D, and this will hide all the icons.
Okay, now, once we have
our screen capture and they're in icons, we want open Emma's paint on. The reason why you want to do this is we want to save. We wanna pace that screen capture and to paint and then save it as a JPEG so that we could save it as a wallpaper
***. Let's go ahead, do that, so we'll need to have the windows button
again you can use to you I
and our and hitting windows are will do this.
And if you type out M s paint,
it will open M s paint for you.
Okay, so let's go ahead and do that in our script.
So we got the windows. Are geoeye are? Then we'll need our another delay. Let's type that out.
It's another delay of 200.
Then we need to type in in this paint
within that run function.
We got that
That will have to hit, enter and ordered for it open. So enter.
Then we want to do another delay. Give it time to open. Maybe we should give it another maybe half a second or full second. We'll just do a full second just to be safe. So make sure you give enough time for Emma's paint open because sometimes it takes a little longer and some computers.
So once we're in M s paint, we wanted to do ah pace function on. The easiest way to do that is a control V. So we'll do control the and that will paste it into Emma's paint.
Uh, then we want to do another delay just another regular 200 delay.
And now what we want to do is save this and let me let me open paint again.
Now, if I see if I had all to F
it's gonna open this file,
this file menu.
I want to hit all f and I and I put, uh, s
it's going to save it.
So let's go ahead and do that here in the script. So
we got our, um,
our screen capture peace and end this pain. So let's
actually save it. Sold the old F to bring up that file than you.
Um then we'll do a, uh
we will type s and that will save it,
Do another delay.
And let's actually give it a bit longer. Sometimes it takes a bit for that to pop up, so let's just do this to half a second,
okay? And now we're going to save it on the user profile of the victim.
in order to do that,
we're going to do this. So we need the percent
user profile percent, and we'll name it. Frank
lips wall paper
R D J p G.
Okay, so what? This percent does, uh, user profile percent before the file name is, it's going to save it in the current user's profile.
So after we have that, we want to push enter,
and that's going to save that pile on the person's user profile.
Okay, so now we got that done. We don't want another delay,
another 200 away,
and then we're going to do all tw f while we're still in. Um, Ms Paint, what this does again is it's going to open that file menu.
Then we're going to lay again,
and then we're going to hit string. Be
now Let me show you what that does.
So if I hit all F
and I hit B,
it's going to save this as a desktop background. It's great out here because I don't have anything pasted in, but once you hit be, it immediately saves as the desktop background
Kali Linux Fundamentals
If you’re interested in penetration testing and ethical hacking, then this Kali Linux course is ...
1 CEU/CPE Hours Available
Certificate of Completion Offered
Attacks and Persistence for Incident Handlers
Hone your incident handling skills by joining Ken Underhill in this Attacks and Persistence for ...
1 CEU/CPE Hours Available
Certificate of Completion Offered