WEBVTT

00:00.550 --> 00:07.420
Rubber Ducky is a keystroke injection tool disguised as a generic USP drive as described here on Hack

00:07.420 --> 00:09.070
sharp dot com Web site.

00:09.070 --> 00:12.410
It comes with forty five dollars in price.

00:12.460 --> 00:18.660
You have to add to that the shipping and the clearance course that this becomes really expensive.

00:18.670 --> 00:26.860
However rubber ducky has a simple scripting language that anyone can use to simply craft payloads that

00:26.860 --> 00:34.810
can perform myriad of actions such as changing system settings stalling bad doors stealing data opening

00:34.810 --> 00:42.160
remote channels and etc. You can attack any operating system that supports USP keyboard you just put

00:42.160 --> 00:48.820
your payload on the B and once it is plugged in any computer it would run automatically.

00:48.880 --> 00:57.280
We can't achieve the same result by building a similar USP drive in a much much more cheaper way using

00:57.400 --> 00:58.270
arduino.

00:58.300 --> 01:03.400
I'm not an under reno expert but I have tried this and it's really works like magic.

01:03.400 --> 01:10.040
They are doing a boards are available commercially and reassembled form or do it yourself kit.

01:10.060 --> 01:16.610
You can easily go to Ali express dot com and just type in Arduino micro here.

01:16.990 --> 01:18.820
Just see the results.

01:18.940 --> 01:29.820
You'll be getting some of the chips are really small and have a built in USP connector which makes it

01:29.940 --> 01:34.590
easier for us to achieve a results similar to rubber ducky.

01:34.590 --> 01:38.920
Some of you might think How can this Arduino be used to hack something.

01:39.060 --> 01:46.230
Well since it supports keyboard emulation we can build it school sketches on the Arduino idea which

01:46.230 --> 01:54.240
is a file actually that has that iron ore extension so we can build these sketches and which actually

01:54.240 --> 02:01.140
contains keyboard instructions to type commands and execute just like popular USP rubber ducky does.

02:01.140 --> 02:08.430
So we just upload our payload there and once the USP is inserted it will automatically run.

02:08.550 --> 02:13.470
So let's show you how to start building that to prepare.

02:13.470 --> 02:17.760
You need to install the Arduino i.e. the E.

02:17.880 --> 02:19.200
So if you're using Carly

02:22.150 --> 02:24.500
you can simply go here to the console.

02:24.520 --> 02:33.820
Android AAPT dash get install Arduino you will get the idea install and if you want to initiate or open

02:33.820 --> 02:34.890
the idea.

02:35.150 --> 02:38.550
Just tried Arduino here.

02:39.730 --> 02:49.030
And it will start loading the IP so that's the Arduino either e and this file here wherever you write.

02:49.030 --> 02:52.650
It's called a sketch for the purposes of simplicity.

02:52.660 --> 02:55.710
I'll just use that on my windows machine.

02:56.560 --> 03:03.260
So I've downloaded the Arduino idea from Arduino the CDC website.

03:03.280 --> 03:07.540
Just let me open it here so let me clear this out.

03:07.540 --> 03:10.980
So you need to install the IEEE.

03:10.990 --> 03:16.080
You also need to buy one of these from the Express.

03:16.090 --> 03:24.250
I just bought that the pro micro it's very cheap it comes at three dollars and it takes like one week

03:24.310 --> 03:25.390
to reach you.

03:25.390 --> 03:31.660
So just buy that it comes with a small USP interface.

03:31.680 --> 03:38.950
You'll also need the small U.S. meat to be cable with that so that's it.

03:38.980 --> 03:43.030
And just you have to buy any USP cable.

03:43.030 --> 03:46.980
No you need to go to this Web site here.

03:46.990 --> 03:50.360
It's on a page on GitHub by hack 5.

03:50.380 --> 03:57.070
That in it has lots of lots of lots of rubber ducky scripts.

03:57.070 --> 04:01.090
So let's begin with the first one which is the simplest one hell a word.

04:01.180 --> 04:07.810
If you click on that you'll be able to see the simple scripting language that troubled Ducky supports

04:07.990 --> 04:12.980
but Arduino does not support the scripting language of Ducky.

04:13.150 --> 04:23.350
So we have to convert this to Arduino language so just copy that and go to a website to convert the

04:23.470 --> 04:27.230
ducky script into r do we know language.

04:27.280 --> 04:32.770
It's and you are elder hub the I O forward slash the queen.

04:32.860 --> 04:40.300
So just have to paste you code here and press on compile and just press on copy after that open the

04:40.300 --> 04:48.370
Arduino idea and just press on paste just to give you a quick overview on how this code works.

04:48.380 --> 04:49.850
So this is a sketch file.

04:49.960 --> 04:57.040
It's just a regular file with I know extension it has two main procedures the setup procedure which

04:57.040 --> 04:57.700
is here.

04:59.070 --> 05:02.580
And the loop procedure.

05:02.580 --> 05:07.640
It also includes some of the important files such as keyboard.

05:07.660 --> 05:16.080
The H clarify the setup procedure will only be executed once when Arduino is powered on and initialized

05:16.110 --> 05:23.550
while the loop procedure will be executed repeatedly over and over again until Arduino is powered off.

05:23.560 --> 05:27.950
Now I will plug my arduino chip.

05:28.050 --> 05:37.500
I'll just connect it to my Mini USB cable here and plug it into my laptop so I have Arduino Leonardo

05:37.500 --> 05:39.330
on Port com 6.

05:39.330 --> 05:47.970
If you go ahead tools and select the board it's Arduino the Nardo and the port.

05:48.090 --> 05:53.670
It's on comm 6 so this is actually the helo word example that we have.

05:53.790 --> 06:01.730
So I'll just compile it or verify it by pressing this button here or you can press catch verify compile.

06:02.250 --> 06:03.360
So let's wait for that.

06:03.510 --> 06:08.670
It's getting compiling sketch here and you can see the progress bar on the bottom right.

06:10.510 --> 06:13.930
And now compiling is done successfully.

06:13.930 --> 06:21.490
Now we need to upload our script or our hello world example to the Arduino device.

06:21.520 --> 06:29.590
So just press the button here upload and now you will see that the file is uploaded successfully and

06:29.590 --> 06:32.590
once it's uploaded successfully it will automatically run.

06:32.650 --> 06:39.420
So as you can see here it just open notepads and wrote this had word here.

06:39.880 --> 06:45.430
So let me close this here and just let me read all this from the sketch file.

06:45.430 --> 06:47.260
I'll now open notepad

06:50.860 --> 06:55.880
and re plug the Arduino device so that you will see what's happening here.

06:56.050 --> 06:57.200
So I'll plug it again.

06:57.210 --> 07:06.690
It will take some time and it will just open notepad right notepad and write Hello world.

07:06.780 --> 07:14.670
So this is a simple example of how can you load this USP device to mimic a payload.

07:14.670 --> 07:23.480
Now let's get real by going again here to the Web site again get hub dot com and going to another r

07:23.490 --> 07:27.270
do we know that this script I'll just type I'll just put the links with the video.

07:27.270 --> 07:34.560
So this actually payload it adds user as an admin to the computer.

07:34.560 --> 07:36.950
Once you plug the USP into that.

07:37.050 --> 07:40.890
So let me copy the file here.

07:40.920 --> 07:42.630
This is Arduino script.

07:42.660 --> 07:48.510
You don't need to convert from Ducky script to Arduino because this is already converted.

07:48.510 --> 07:50.900
So we go again here to our sketch.

07:51.180 --> 08:00.540
And let me remove all that is the new code here and just make sure that the board is the Nardo and the

08:01.110 --> 08:04.230
board is selected on com 6.

08:04.230 --> 08:11.490
If you scan this code you'll see that in this setup so you will start keyboard and mouse then start

08:11.490 --> 08:19.080
the payload by pressing windows X. This is the left key which is the Windows key plus X then you will

08:19.080 --> 08:23.180
type a to open the power shall command.

08:23.250 --> 08:24.840
After that you were right.

08:24.970 --> 08:32.580
He left out then why and now this is for selecting yes clicking yes.

08:32.670 --> 08:37.370
Now in the power shall command you will issue this line here next.

08:37.410 --> 08:39.540
Use it at Arduino solar.

08:39.540 --> 08:43.160
Let me add my user here for example read python.

08:43.560 --> 08:45.880
And this is a complex password.

08:45.900 --> 08:51.690
After that after you've created this user you will add this user to the administrators group.

08:51.690 --> 09:00.480
Again let me update that here and that it you will just add use it to the admin group with just a second.

09:00.630 --> 09:02.070
So let me verify that here.

09:02.070 --> 09:05.300
Compile it again it just compile with no errors.

09:05.310 --> 09:11.160
And I will upload that here after you upload that after the upload is done successfully just you have

09:11.160 --> 09:15.900
to remove the USP as fast as possible in order to avoid that being run.

09:16.260 --> 09:19.930
So done uploading just came of that precedent here.

09:20.010 --> 09:25.740
I'll just remove that so my payload is now loaded onto my arduino device.

09:26.150 --> 09:26.500
OK.

09:26.790 --> 09:33.750
So suppose that I go out to the victims machine and I will plug in my USP.

09:33.840 --> 09:35.160
So see what happens now.

09:35.310 --> 09:44.010
So once you plug in you as b c the sequence taking place and it's just a matter of seconds for our user

09:44.070 --> 09:49.040
to be created and added to the admin in order to verify that.

09:49.050 --> 09:53.970
I'll go to the user console here.

09:54.420 --> 10:00.030
I'll open the users and see that thread by Python user is created.

10:00.300 --> 10:02.850
Just double check in the groups.

10:02.850 --> 10:03.910
And here you go.

10:03.990 --> 10:07.830
The red python is in the admin group.
