WEBVTT

00:00.000 --> 00:03.980
Welcome to Nation... oh, I do have to stay real close to this thing.

00:04.320 --> 00:07.360
Nation State Supply Chain Attacks for Dummies.

00:07.360 --> 00:08.260
And you.

00:08.700 --> 00:10.320
Or Chipping Cisco Firewall.

00:10.320 --> 00:11.340
So, let's go.

00:11.340 --> 00:14.520
We got a lot of stuff to cover and not very long to do it in.

00:15.000 --> 00:16.180
Hi, I'm Monte.

00:16.520 --> 00:18.360
And I do Coke and Strippers.

00:18.500 --> 00:21.860
I mean, for educational purposes only.

00:21.980 --> 00:25.280
I mean, I do the YouTube channel, Coke and Strippers.

00:25.280 --> 00:26.720
That's an educational channel.

00:26.720 --> 00:27.560
It's electronics.

00:27.560 --> 00:29.760
Anyway, you should go watch it.

00:30.420 --> 00:31.220
Okay.

00:32.000 --> 00:34.440
Oh, and you should note this.

00:34.440 --> 00:35.060
How many people...

00:35.060 --> 00:35.860
Yeah, we got people here.

00:35.860 --> 00:37.200
Take a good picture.

00:37.360 --> 00:39.780
Post something about this talk on Twitter and show it to me afterwards.

00:39.780 --> 00:41.320
And I'll give you something until they run out.

00:41.320 --> 00:42.360
I've got a little prize.

00:42.640 --> 00:43.440
A few of them.

00:43.440 --> 00:44.100
Alright.

00:45.380 --> 00:48.540
So, Supermicrochipping news.

00:48.540 --> 00:51.840
Anybody remember this story from Bloomberg last year?

00:51.840 --> 00:53.260
We got a few, right?

00:53.480 --> 01:03.460
Big article that maybe motherboards from Supermicro had small implants on the motherboard that would allow remote ownership.

01:03.700 --> 01:08.720
And that's kind of scary because that kind of stuff is pretty much impossible to detect.

01:08.800 --> 01:11.820
It could be in your equipment.

01:11.820 --> 01:15.840
It may survive a reboot or re-imaging.

01:16.200 --> 01:18.680
And it was introduced somewhere in the supply chain.

01:18.680 --> 01:21.660
You don't necessarily get a chance to see it and look at it.

01:22.420 --> 01:26.440
There was a lot of concern about it.

01:26.440 --> 01:28.620
They said it might be in some of the big data centers.

01:28.620 --> 01:31.360
Maybe Apple or Google or whatever.

01:31.360 --> 01:32.780
There were a few mentioned.

01:33.040 --> 01:35.680
But nobody ever found any real evidence.

01:35.940 --> 01:38.300
So, as far as I know, it was not real.

01:38.300 --> 01:39.680
Still a little down.

01:39.680 --> 01:40.520
Can you all hear me?

01:40.520 --> 01:41.920
Art, can you hear me?

01:41.940 --> 01:42.980
Sort of?

01:42.980 --> 01:43.400
Yes.

01:43.400 --> 01:43.740
Okay.

01:43.860 --> 01:45.700
If you ever can't, do this.

01:45.860 --> 01:46.660
You're going.

01:47.680 --> 01:50.620
Oh, you're listening to the thumb music in the back.

01:50.620 --> 01:51.160
Okay.

01:51.880 --> 01:54.740
But we never found any real evidence of it.

01:54.740 --> 01:59.560
So, still looking for proof.

01:59.900 --> 02:02.900
Instead of which, I decided that doesn't matter.

02:02.900 --> 02:04.420
Let's make it real.

02:04.540 --> 02:06.300
So, why not?

02:06.300 --> 02:08.720
And hopefully better than this.

02:09.480 --> 02:11.600
We started that.

02:11.640 --> 02:12.780
Could be better.

02:13.100 --> 02:14.700
So, time to pick a device.

02:14.700 --> 02:16.520
I'm from the ICS space.

02:16.520 --> 02:19.780
And my original thought was to pick maybe some of these.

02:20.320 --> 02:24.560
But I eventually decided on the Cisco firewall, which is also used there.

02:24.560 --> 02:27.560
The same attack basically will apply to all of those.

02:27.560 --> 02:30.240
But the firewall has a little broader appeal.

02:30.240 --> 02:32.600
So , we'll do it there.

02:33.820 --> 02:37.620
Try to consider what ways to do this.

02:37.620 --> 02:44.240
After a little thought, I decided probably the serial port was the cheapest and the easiest and the fastest to try to attack.

02:44.240 --> 02:48.080
Most of these devices are configured by serial port one way or the other.

02:49.300 --> 02:56.220
So, quick look at serial ports to refresh your memory if you haven't played with one in a few days.

02:56.940 --> 02:59.160
Simplest form, you need only three wires.

02:59.160 --> 03:01.260
You need a TX wire to talk to the device.

03:01.260 --> 03:04.300
You need an RX wire to receive information from the device.

03:04.300 --> 03:05.340
And you need a ground.

03:06.120 --> 03:10.920
They look like those connectors.

03:10.920 --> 03:14.100
Or, on the Cisco device, they're RJ45s.

03:20.900 --> 03:22.200
There we go.

03:22.200 --> 03:23.980
Now I can make little circles.

03:25.240 --> 03:27.700
So, here's a USB serial.

03:27.700 --> 03:28.800
They connect in those.

03:28.800 --> 03:31.160
In that port, that's the RJ45 serial connection.

03:31.160 --> 03:35.980
And the way you would originally configure a Cisco firewall when you first get in here...

03:35.980 --> 03:38.340
Who here has configured a Cisco firewall before?

03:38.340 --> 03:40.640
Oh, we got like half the audience at least.

03:40.640 --> 03:41.360
Maybe more.

03:41.360 --> 03:42.260
Excellent.

03:44.620 --> 03:47.620
Serial signaling goes something like this.

03:48.020 --> 03:49.400
You're going to pick a baud rate.

03:49.400 --> 03:51.100
There are various ones.

03:51.540 --> 03:53.340
9600 may be the most common.

03:53.340 --> 03:55.000
You're going to pick a number of data bits.

03:55.000 --> 03:58.320
Typically 7 or 8, but like 5 is legal.

03:59.180 --> 04:01.200
You're going to have a parity.

04:01.200 --> 04:07.700
It can be none, odd, even, mark, space, and a number of stop bits.

04:07.700 --> 04:10.500
And that defines your serial packet.

04:10.560 --> 04:14.140
How it's actually going to be transmitted on the physical wire.

04:14.140 --> 04:17.800
Very common is this 9600 8N1.

04:17.800 --> 04:23.120
That's our baud rate, number of data bits, parity, none, and one stop bit.

04:25.500 --> 04:36.440
To start dealing with the serial protocols, one of the things that I found very useful was this 8-channel analyzer that you can get from all the usual places in China.

04:38.000 --> 04:39.460
They're kind of ironic.

04:39.460 --> 04:42.260
You use cheap Chinese stuff to try to hack cheap China.

04:42.260 --> 04:43.280
Never mind.

04:45.060 --> 04:49.580
Anyway, that and free software.

04:50.200 --> 04:52.500
PulseView, freely available on the net.

04:53.500 --> 04:57.200
Its companion is Sigrock as well.

04:57.200 --> 04:59.760
So I can see signals going in both directions.

04:59.860 --> 05:04.220
Normally, if you connect up to a serial port, you're just getting the receive channel.

05:04.220 --> 05:09.420
You won't necessarily see what's on the send channel unless the device on the other end reflects it to you.

05:09.420 --> 05:13.200
So I want to connect to both the send and receive, receive both channels simultaneously.

05:13.440 --> 05:15.800
I can set up PulseView to do that.

05:15.800 --> 05:18.340
I'm setting up 8-in-1.

05:19.480 --> 05:21.360
Least significant bit first.

05:21.360 --> 05:23.120
That's what little Indian...

05:23.120 --> 05:25.320
I want to see it as ASCII.

05:25.320 --> 05:27.340
I need to invert the signal.

05:28.360 --> 05:30.420
So PulseView, there's the link if you need it.

05:30.420 --> 05:31.300
It's great software.

05:31.300 --> 05:33.980
I don't have anything to do with the project other than I like it.

05:34.360 --> 05:40.220
In this case, what we see is these are the literal bits I am pulling off the wire.

05:41.760 --> 05:47.060
This is... I use this UART decoder for them.

05:47.100 --> 05:48.740
I see a start bit.

05:48.740 --> 05:51.840
I see a bunch of data bits and a stop bit.

05:51.880 --> 05:57.220
If I interpret this as ASCII, which is what I've asked it to do, I end up here with the letter C.

05:57.220 --> 05:59.580
C-O-N-F-I-G and so forth.

05:59.700 --> 06:03.540
So that's a sample of this run.

06:04.280 --> 06:06.080
Typically, you'll run this...

06:06.080 --> 06:17.120
When you're doing serial, you'll use a UART and a driver to help you communicate with the hardware and keep all of your voltages at the right level.

06:18.560 --> 06:21.280
These are the commonly seen voltage levels.

06:21.280 --> 06:24.380
We've got 5 and 10 and 12 and 15.

06:24.600 --> 06:25.820
And that's a problem.

06:25.820 --> 06:35.980
On this device, it's swinging plus and minus 15, which will totally destroy any type of microcontroller I want to try to connect to it.

06:36.100 --> 06:40.820
So, we've got a little bit of a problem, but there's a trick.

06:40.820 --> 06:47.360
So, in doing some other work with attacking power supplies, I found this application note.

06:47.620 --> 07:00.260
And basically what it says is that these microcontrollers, at least the family I'm used to working with, the Atmel and various other ones, have protection diodes built in on every input.

07:00.260 --> 07:06.900
So that if the voltage swings above your positive voltage, above VCC, it gets tied there.

07:06.900 --> 07:13.400
And if the amount of current is low enough, that keeps that pin from going above your VCC voltage.

07:13.400 --> 07:16.420
Or, it also keeps it from going below ground.

07:16.780 --> 07:22.300
But the key point to this is that you have to limit the current, right?

07:22.300 --> 07:25.680
Otherwise, you will just smoke those diodes and still blow the chip up.

07:25.680 --> 07:29.480
So, what you need is just an appropriate sized resistor coming in.

07:29.480 --> 07:34.080
In this case, they're using one mega-ohm and they can connect it to the AC outlet.

07:34.100 --> 07:40.600
Well, I only need to work for 15 volts, so that should be something like a 15 kilo-ohm resistor.

07:41.040 --> 07:45.360
It turns out maybe 5.1k is close enough.

07:46.340 --> 07:51.080
That's when I started using the testing and it was working and I just never changed back, right?

07:51.080 --> 07:55.140
What's the number one rule in ICS, you know, reliability?

07:55.140 --> 07:56.460
If it ain't broke, don't touch it!

07:56.460 --> 07:57.200
Yes!

07:57.200 --> 07:59.440
It's working, don't touch it!

07:59.620 --> 08:02.240
You should get a reward for that.

08:02.240 --> 08:04.520
We'll see you afterwards.

08:04.660 --> 08:06.100
Oh no, hang on.

08:06.100 --> 08:07.720
Yeah, I don't have them.

08:07.720 --> 08:08.880
They're in my back.

08:11.160 --> 08:13.200
So, I want to be able to test this.

08:13.200 --> 08:19.600
Can I actually use this configuration to talk to this Cisco device?

08:19.600 --> 08:20.920
You know, this is a little big.

08:20.920 --> 08:22.920
I'm using this Arduino Mega.

08:22.920 --> 08:23.620
You know, what are they?

08:23.620 --> 08:27.980
10, 15 bucks, maybe less if you get them from the Chinas.

08:30.020 --> 08:35.480
And setting up a couple of resistors and this serial cable in.

08:35.500 --> 08:39.440
And sure enough, I found out, yes, I can talk to this device.

08:39.440 --> 08:42.800
I can receive these 15 volt signals without blowing it up.

08:42.800 --> 08:49.280
And also, surprisingly, just by sending it 5 volts and ground, I can transmit to it.

08:49.280 --> 08:51.060
Which is out of spec, right?

08:51.160 --> 08:56.800
The minimal spec is like negative 3 volts for RS-232.

08:56.800 --> 08:58.880
Well, now TIA, but you know.

09:00.160 --> 09:01.880
But, it works.

09:02.040 --> 09:03.340
So far, I'm in.

09:03.340 --> 09:04.960
I'm going down this path.

09:04.960 --> 09:06.300
How am I going to attack it?

09:06.300 --> 09:08.020
What hardware and software to use?

09:08.020 --> 09:08.960
Is this possible?

09:08.960 --> 09:10.500
It looks like I'm good.

09:10.500 --> 09:13.880
It looks like I'm prepared to do this.

09:13.880 --> 09:15.980
It was a fairly quick and easy test, right?

09:15.980 --> 09:17.180
Get a piece of hardware.

09:17.180 --> 09:18.160
You plug it up.

09:18.280 --> 09:19.200
Not too hard.

09:19.200 --> 09:20.040
It works.

09:20.880 --> 09:26.400
The next thing is to decide what actual kind of chip that I want to use in this.

09:26.760 --> 09:32.260
Part of the fun of the attack, I think, is using very small devices, right?

09:32.260 --> 09:35.300
If you remember the picture from the Bloomberg, it was a pretty small device.

09:35.820 --> 09:40.540
I started out with this ATtiny10, which, as I say here, is not just tiny.

09:40.540 --> 09:41.480
It's minuscule.

09:41.480 --> 09:44.220
That's the one here in the tweezers.

09:44.220 --> 09:54.450
And technically, the attack that we'll see here in a little while, you could technically run it with that microcontroller.

09:55.320 --> 09:58.100
There's also the ATtiny85.

09:58.100 --> 10:03.560
I chose that one because of some additional capabilities, in particular EEPROM.

10:03.560 --> 10:07.520
So that allows me to store information in the chip.

10:07.520 --> 10:13.160
So, like, I could count number of reboots or maybe store some data if I could collect it.

10:13.160 --> 10:22.040
So, I chose the ATtiny85 for maybe some advanced features that, actually, at this point, I haven't implemented.

10:22.180 --> 10:24.080
But, it doesn't matter.

10:24.080 --> 10:28.900
There was also another advantage, and we'll see, of choosing this ATtiny85.

10:28.900 --> 10:31.760
But, technically, you could use the ATtiny10.

10:31.920 --> 10:33.720
Ah, there are a couple more advantages.

10:35.080 --> 10:41.560
One of them being this carrier board, this DigiSpark.

10:41.560 --> 10:44.800
You can pick these up, again, from where?

10:45.260 --> 10:45.960
China!

10:45.960 --> 10:47.400
Yeah, China!

10:47.620 --> 10:51.360
Taobao, Alibaba, Amazon, even.

10:51.360 --> 10:53.180
Five of them for $10.

10:54.140 --> 10:56.180
The actual microcontroller is over here.

10:56.180 --> 10:58.640
This is a power supply chip.

10:59.060 --> 11:01.820
Buying it in this format just makes it quicker and easier.

11:01.820 --> 11:04.840
I can program it by shoving this straight in a USB port.

11:04.840 --> 11:10.740
So, I got them cheap, and I've got a few of these.

11:10.740 --> 11:16.200
So , take a picture, tweet me, and catch me afterwards, and show it to me, and I'll give a few of them away.

11:17.360 --> 11:19.180
That's your DigiSpark board.

11:19.180 --> 11:22.640
So, I don't have to worry too much about programming it.

11:22.640 --> 11:25.200
And, also, I can use existing tools.

11:25.200 --> 11:26.540
That saves me a little bit of time.

11:26.540 --> 11:30.040
I can use the Arduino IDE interface.

11:31.000 --> 11:34.100
So, now, this is my second round of test hardware.

11:35.600 --> 11:41.500
I'm not using the Mega anymore.

11:41.500 --> 11:43.360
I'm actually using this DigiSpark.

11:43.360 --> 11:46.300
Can I do this same thing with this other piece of hardware?

11:46.300 --> 11:48.460
There shouldn't be any reason why I couldn't.

11:50.060 --> 11:52.320
But, you know, you want to test it.

11:52.320 --> 11:54.280
It is a little more complicated to program.

11:54.280 --> 11:59.740
There's some limited amount of space, and some kind of libraries to play with.

11:59.740 --> 12:02.200
But, connect it up.

12:02.200 --> 12:03.920
Start running the tests.

12:04.180 --> 12:08.400
And, at that point, find out that we are all good.

12:08.400 --> 12:14.620
I can use this little device to communicate across the serial port.

12:14.620 --> 12:16.020
So, now, I'm getting closer, right?

12:16.020 --> 12:17.020
I've got a device.

12:17.020 --> 12:18.300
I've run the tests.

12:18.300 --> 12:23.100
I just need to be able to hide this on the motherboard somewhere.

12:23.360 --> 12:27.880
Oh, and I also mentioned that you can use the Arduino IDE to control this.

12:28.340 --> 12:29.680
You really can't see it here.

12:29.680 --> 12:32.240
I assume this will be available somewhere online.

12:32.640 --> 12:36.460
Links to all these parts and pieces are there.

12:36.460 --> 12:37.300
You're shaking your head.

12:37.300 --> 12:38.620
So, it's going to be online.

12:39.580 --> 12:43.160
And, if you want to follow along...

12:43.160 --> 12:49.960
By the way, though, for programming this board, usually in the Arduino world, you just hit Program, and it programs.

12:49.960 --> 12:53.260
For this board, you have to disconnect it and reconnect it.

12:53.260 --> 12:57.660
The bootloader will only allow it to program the first few seconds during powerup.

12:57.780 --> 13:00.920
So, I struggled with that for a few minutes the first time.

13:00.920 --> 13:02.820
Well, maybe more than a few minutes.

13:02.940 --> 13:05.740
The first time that I started fiddling with these.

13:05.740 --> 13:09.720
So , hit the Program, unplug them, plug them back up.

13:09.720 --> 13:10.840
They program great.

13:12.580 --> 13:14.200
So, now, what do I do?

13:14.200 --> 13:15.840
So, I've picked the chip.

13:15.840 --> 13:16.720
It looks like it works.

13:16.720 --> 13:17.440
I've tested it.

13:17.440 --> 13:19.480
I can program it on this board.

13:19.720 --> 13:21.080
I don't want to install that whole board.

13:21.080 --> 13:21.680
That's ugly.

13:21.680 --> 13:22.240
That's big.

13:22.240 --> 13:23.460
It's obnoxious.

13:23.760 --> 13:28.580
So, after I program it, I pull that chip off this board.

13:28.720 --> 13:32.160
I use a little hot air rework.

13:32.160 --> 13:36.420
Now, that's just because I have it in my basement.

13:36.420 --> 13:43.540
That's my below-ground lair in the basement.

13:44.200 --> 13:47.240
But you can use a soldering iron or whatever.

13:47.240 --> 13:55.520
But, again, for all these things, I don't get any money from Banggood, which is actually a cool place to buy electronics online.

13:55.520 --> 13:56.460
Don't ask.

13:57.900 --> 13:59.300
There's the links if you want them.

13:59.300 --> 14:01.120
But I pull the chip off of that board.

14:01.120 --> 14:02.260
Now I have my chip.

14:02.260 --> 14:03.060
It's all programmed.

14:03.060 --> 14:04.440
It's all ready to go.

14:04.440 --> 14:07.060
And so far, it's been relatively easy.

14:07.060 --> 14:12.820
I didn't have to get any kind of special programmers or anything else.

14:12.820 --> 14:17.640
Any small PC boards because it came already connected for me.

14:17.640 --> 14:22.780
So, one of the advantages of starting with these DigiSparks, and it's cheap.

14:24.560 --> 14:28.200
So, we talked about, well, what ended up being four wires.

14:28.200 --> 14:31.160
That's RX and TX, transmit and receive.

14:31.160 --> 14:33.520
You also need power and ground.

14:34.700 --> 14:39.240
But for this attack right now is I'm just running it blind.

14:39.240 --> 14:41.800
I'm just pushing commands out.

14:41.800 --> 14:44.100
I'm not listening to anything coming back.

14:44.100 --> 14:46.080
So, I can cut off one of those wires.

14:46.080 --> 14:48.500
I only need transmit and power and ground.

14:48.580 --> 14:52.520
So, I end up with this little chip with three wires coming off of it.

14:52.520 --> 15:02.500
And at this point, I should be able to take that chip and solder it anywhere on this motherboard and send the commands that we'll run through here briefly.

15:05.440 --> 15:11.300
But these wires on a motherboard, sometimes called bodge wires, they look ugly, right?

15:11.300 --> 15:13.300
And they sort of indicate something weird is going on.

15:13.300 --> 15:16.740
I mean, occasionally you will see them for real, like the picture there on the left.

15:17.080 --> 15:19.280
But they're fairly rare.

15:19.500 --> 15:24.260
And what I really don't want is it to look like this picture on the right where somebody's just soldering all kinds of stuff.

15:24.320 --> 15:30.820
That's going to look really suspicious on your new equipment if it has all kinds of warts and stuff growing off of it.

15:30.820 --> 15:34.520
So, I want it to look better than that if possible.

15:34.520 --> 15:38.200
So, what can I do about this three-wire installation?

15:39.640 --> 15:43.180
Well, I came up with a three-wire solution.

15:43.180 --> 15:53.480
It turns out that next to the port on this device that is the RJ45 serial connection, there are also two USB ports.

15:53.580 --> 16:00.980
And this is the bottom of the motherboard already, the way it's already set up.

16:00.980 --> 16:04.080
This is factory original shmoo here.

16:05.000 --> 16:07.880
We'll talk about later looking for this thing.

16:07.900 --> 16:11.000
You might look for sort of strangeness on the motherboard.

16:11.000 --> 16:12.460
And this was already here from the factory.

16:12.460 --> 16:14.120
That wasn't even my doing.

16:14.200 --> 16:23.980
But what I found was at this location, here are the pins for the RJ45 serial connection and my TX line.

16:23.980 --> 16:25.380
And there's a ground.

16:25.640 --> 16:28.140
And then I pull power off of this.

16:28.140 --> 16:29.260
These are the USB ports.

16:29.260 --> 16:33.460
There are two USB ports, power, ground, and I don't need the data connections.

16:33.460 --> 16:39.640
So, I solder this small chip directly to the motherboard like this.

16:39.640 --> 16:43.020
Now, I've got power and transmit, and it's awesome, right?

16:43.020 --> 16:44.640
I am in.

16:47.460 --> 16:50.500
Probably way too far late in this process.

16:50.500 --> 16:51.000
Wait a minute.

16:51.000 --> 16:51.740
Yep.

16:52.420 --> 16:53.460
All right.

16:53.460 --> 16:59.660
So, by the way, who here are like electrical engineers or electrical hobbyists?

16:59.660 --> 17:05.620
We need more electrical minded folks in this... in any case.

17:05.620 --> 17:09.540
So, what is its value?

17:09.540 --> 17:11.560
What is the value of this thing?

17:11.720 --> 17:14.640
You don't have to be an electrical engineer to figure it out.

17:14.640 --> 17:15.400
Anybody?

17:15.520 --> 17:16.800
Five dollars.

17:17.800 --> 17:19.320
Five RMP.

17:20.400 --> 17:21.720
Half a penny.

17:21.720 --> 17:22.600
Half a cent.

17:23.060 --> 17:24.100
No!

17:24.160 --> 17:25.140
Yes.

17:25.660 --> 17:28.620
No, I'm playing a little bit of a word game here.

17:28.620 --> 17:33.680
The value of it as a resistor is its resistance in ohms is?

17:34.160 --> 17:34.800
Zero.

17:34.800 --> 17:35.360
Zero !

17:35.620 --> 17:38.060
And it only costs like half a cent.

17:38.060 --> 17:39.300
But, word games.

17:39.300 --> 17:40.500
Thank you for playing.

17:41.500 --> 17:45.420
Its value as a resistor value is zero.

17:45.420 --> 17:47.820
Why do we use a zero value resistor?

17:48.440 --> 17:50.300
What do we use that for?

17:50.440 --> 17:51.940
Protect the circuit.

17:52.180 --> 17:55.440
No, it's got zero protection value.

17:55.440 --> 17:58.140
Yeah, but it's like you've got some kind of voltage that looks low.

17:58.140 --> 17:59.160
Yeah, maybe.

17:59.180 --> 18:00.000
Maybe, because it's small.

18:00.000 --> 18:01.280
Yeah, you might use it like a fuse.

18:01.280 --> 18:03.960
In this case, I'm just using it so I don't have to use a wire.

18:05.020 --> 18:08.680
Because I needed this one resistor, right?

18:08.680 --> 18:10.840
That's the one protecting me from the 15 volts.

18:11.120 --> 18:14.200
I used this one to ground just so I don't have to put a wire in there.

18:14.200 --> 18:16.700
So, it turns out to be valuable.

18:16.700 --> 18:20.480
It makes this a lot more invisible on this motherboard.

18:20.840 --> 18:23.600
And at this point, success, right?

18:23.600 --> 18:25.260
I've got this thing on the motherboard.

18:25.340 --> 18:26.300
I've got it programmed.

18:26.300 --> 18:27.380
I've got it hidden.

18:27.960 --> 18:28.720
Golden.

18:29.100 --> 18:34.440
Except, when I got to this point, which was really not too long ago.

18:34.440 --> 18:35.560
Because I've done all the tests.

18:35.560 --> 18:36.340
I knew it was fine.

18:36.340 --> 18:37.700
All I had to do was do this.

18:37.700 --> 18:39.780
And I'm ready for this presentation.

18:40.960 --> 18:43.980
When I booted it up, it didn't work.

18:44.660 --> 18:47.060
My attack came too late in the boot process.

18:47.060 --> 18:49.080
And we'll see why that is in a minute.

18:49.460 --> 18:59.780
It turns out that this motherboard does not turn the power on to the USB port until after the thing is booted.

18:59.960 --> 19:01.540
Who knew, right?

19:02.020 --> 19:05.420
Well, when I'm poking around on the board, I'm looking for 5 volts and I plug it up.

19:05.420 --> 19:07.400
You know, 5 minutes later, I find it.

19:07.440 --> 19:09.440
Who knew I had to wait for the boot cycle?

19:09.440 --> 19:10.920
So, now it's like it's the middle of the night.

19:10.920 --> 19:11.780
What am I going to do?

19:11.780 --> 19:14.980
I've got, you know, I've got the perfect place for it.

19:15.920 --> 19:23.000
I guess the worst case is I can pick another bodge wire and, you know, run it halfway across the motherboard and find 5 volts somewhere.

19:23.220 --> 19:25.920
But I found something else instead.

19:26.420 --> 19:28.140
I found this chip.

19:28.960 --> 19:33.720
This is the chip that controls the power to those USB ports.

19:33.720 --> 19:41.160
The computer sends it a signal and it takes 5 volts from this end line and it sends it out to the two ports.

19:41.460 --> 19:44.720
Out A and out B, those are those two USB ports.

19:44.720 --> 19:51.040
So, if I can manipulate this device, then I can have power there all the time.

19:51.600 --> 19:58.800
And, actually, the easiest way to manipulate this device was actually this.

19:59.340 --> 20:02.140
Anybody know what a solder bridge is?

20:03.260 --> 20:05.380
Generally, are they a good thing?

20:05.740 --> 20:06.700
No, right?

20:06.700 --> 20:07.640
Generally, they're a mistake.

20:07.640 --> 20:11.140
You accidentally connected two pins together with a big glob of solder.

20:11.260 --> 20:13.280
It might be overlooked, maybe.

20:13.280 --> 20:21.780
But, in this case, what it did was that it took the end 5 volts and directly connected it to that serial port all the time.

20:23.080 --> 20:27.100
This chip also will do overcurrent protection, so you lose that.

20:27.100 --> 20:31.600
But, you know, who really cares?

20:31.600 --> 20:32.800
Not me.

20:33.040 --> 20:35.860
So, I get to use a solder bridge as part of an attack.

20:35.860 --> 20:37.300
I just think that's cool.

20:37.580 --> 20:40.380
And no bodge wire to find 5 volts.

20:41.020 --> 20:42.220
So, it's installed.

20:42.220 --> 20:42.940
You've seen it.

20:42.940 --> 20:44.340
You know what it looks like?

20:44.340 --> 20:46.820
Where is the chip on this motherboard?

20:52.060 --> 20:54.240
Yeah, okay, the picture is kind of ugly.

20:54.680 --> 20:56.340
It is there!

20:57.600 --> 20:59.320
Alright, there it is!

20:59.320 --> 20:59.900
Yay!

21:00.800 --> 21:01.520
Okay.

21:02.960 --> 21:04.780
You can find it.

21:04.780 --> 21:10.660
Look, I can take a high schooler and I can teach him to look for bad solder joints, alright, because this is hand-soldered.

21:10.660 --> 21:12.580
It's not going to look as good as a machine soldering.

21:12.580 --> 21:15.920
But, it can take a little while.

21:16.440 --> 21:18.300
So, I put it on the motherboard, right?

21:18.560 --> 21:19.920
I'm going to put it somewhere.

21:20.560 --> 21:25.120
In this case, it's on the bottom of the motherboard, because that's where it fit better.

21:25.500 --> 21:33.620
Which means you have to take out 14 screws, pull out the front plate, pull out these little light pipes, take the motherboard out and turn it over to even be able to see it.

21:33.840 --> 21:42.180
So, when you get a brand new piece of equipment designed to protect your network, who, at first, takes it all apart and lays it across their desk before they begin?

21:43.260 --> 21:43.720
What?

21:47.100 --> 21:53.380
Alright, so, your boss will probably give you funny looks if you take all of your equipment apart very first.

21:54.920 --> 22:00.860
There's also another place to hide it, and this is my trade secret, so I'm just sharing it with you all.

22:02.060 --> 22:08.180
This is the RJ45 and the two USB ports in this metal can.

22:08.880 --> 22:19.800
If you flip this board over and unsolder these four points that holds this can on, in the back of this can, there's a hole about the same volume as in the front.

22:19.800 --> 22:22.660
I can stack up like 15 of those chips in there.

22:22.820 --> 22:26.320
So, you can put it in there, solder this tin back on it.

22:26.320 --> 22:33.340
Now, for somebody to find it, they have to take all the 14 screws out, they have to take the motherboard out, turn it upside down, they have to start desoldering all these cans.

22:33.340 --> 22:41.700
There are actually several of them around the motherboard, if you look, and see if Monty's hidden something stupid in one of them.

22:41.700 --> 22:43.500
So, not very likely.

22:44.040 --> 22:49.280
I didn't do that for this because I thought it wasn't fair, right, if you couldn't somehow see it.

22:49.280 --> 22:57.680
This is my... this is my, you know, emergency safety trick to solve all the problems.

22:57.680 --> 23:01.060
I found these really nice Warranty Voided for Mood stickers.

23:01.060 --> 23:05.660
They have holograms, they are individually serial numbered, they have a barcode.

23:05.660 --> 23:11.780
They even say, if you look carefully, it says genuine authentic in the hologram.

23:13.080 --> 23:13.800
Right?

23:14.260 --> 23:19.260
So, you slap that on the outside of the box, you've already eliminated 80% of the population right there.

23:19.260 --> 23:22.840
If you take some new pieces of equipment, the first thing you do is cut the warranty void.

23:24.340 --> 23:26.800
Alright, that's my backup plan.

23:27.800 --> 23:31.240
Alright, so, we are going to look at the video of the demo.

23:31.240 --> 23:32.820
Normally,

23:36.580 --> 23:39.900
I plug these up, but we're on a kind of short time frame.

23:39.900 --> 23:41.820
It's actually built in the bottom of this motherboard.

23:42.300 --> 23:49.660
Here is my test rig, by the way, in TSA-friendly Tupperware, so that I can travel with it.

23:49.660 --> 23:57.140
But, instead, let's go through a video.

24:06.870 --> 24:10.150
Alright, so, I will describe this as we go along.

24:10.150 --> 24:17.030
This top window is just capturing the data as it would look to the Cisco device.

24:17.030 --> 24:18.590
I'm not typing or anything.

24:19.370 --> 24:25.150
Anything that happens up here is the result of the Cisco device and this embedded chip that we've put in so far.

24:25.150 --> 24:34.810
You notice that there's a little timer that says, and that's just me highlighting it, a timer that says you can press escape to go into ROM-MOM mode.

24:34.990 --> 24:40.870
Alright, so, it presses escape and then it does this config register 0x41.

24:40.950 --> 24:44.970
This is what allows you to modify an existing piece of hardware.

24:44.970 --> 24:47.790
I got this off eBay with a full config installed.

24:47.790 --> 24:49.250
We'll talk about that offline.

24:50.910 --> 24:53.650
It allows me to boot it without knowing the password.

24:53.650 --> 25:04.890
So, now the implanted device, after it does that, and it boots, I might not know what the... it's booting blank, but I got in without a password.

25:04.970 --> 25:10.030
I don't know what their existing network is like, really, or what the existing network configuration is.

25:10.030 --> 25:19.050
So, the first thing that it does is it loads up the existing config that's stored on this device.

25:19.230 --> 25:22.970
And, we'll see that come up in a second.

25:22.970 --> 25:37.250
And then we're going to take that existing config and modify it, adding a SSH port, opening up a connection to the outside interface, which is probably connected to the internet, along with credentials that are only known to us.

25:37.410 --> 25:37.850
Right?

25:37.850 --> 25:38.570
That's nice.

25:38.570 --> 25:41.850
And this down here in the bottom is just a testing script I have running.

25:41.850 --> 25:43.950
I'm trying to ping this firewall.

25:43.950 --> 25:46.830
We see it's not responding yet because it's not booted.

25:48.130 --> 25:49.470
It's going to the config.

25:49.470 --> 25:50.830
It's generating the... right?

25:50.830 --> 25:54.390
If we're going to control this device remotely, we're going to do it securely, right?

25:54.390 --> 25:57.390
SSH all the way for the win.

25:58.850 --> 25:59.890
And so forth.

25:59.890 --> 26:02.730
So, you can follow along there for a second.

26:02.730 --> 26:12.210
One other little piece of magic tip is that you cannot see this happen if you plug into the console port.

26:12.210 --> 26:18.030
If you plug into the console port, the voltage overrides that small resistor and it doesn't happen.

26:18.190 --> 26:20.090
So, imagine you get this box.

26:20.090 --> 26:21.390
You plug it up.

26:21.510 --> 26:22.650
You configure it.

26:22.650 --> 26:23.510
It's all great.

26:23.510 --> 26:25.010
You will never see this happen.

26:25.090 --> 26:26.230
You unplug it.

26:26.230 --> 26:27.290
You put it in the rack.

26:27.290 --> 26:29.970
And then when you power it up, you're owned.

26:30.810 --> 26:34.990
Now, assuming you go back around and scan the machine and see there's something wrong with it, what do you do?

26:34.990 --> 26:36.590
Well, you try it two or three times.

26:36.590 --> 26:38.550
It keeps getting owned every time you reboot it.

26:38.550 --> 26:39.150
You pull it out.

26:39.150 --> 26:39.950
You put it on your desk.

26:39.950 --> 26:41.430
You connect the serial cable up to it.

26:41.430 --> 26:43.650
You're like, oh, you reconfigure it.

26:43.650 --> 26:44.450
It's great.

26:44.450 --> 26:45.590
You put it back in the rack.

26:45.590 --> 26:46.630
You reboot it.

26:46.770 --> 26:53.230
So, if you test your configs every month, I get an average of 15 days to screw with it.

26:53.230 --> 26:55.250
And you're going to pull it out at least once and put it back.

26:55.250 --> 26:57.690
So, I'll get two times 15 days.

26:57.970 --> 26:58.270
All right.

26:58.270 --> 27:04.190
In the bottom, we got the ping back and we...

27:04.850 --> 27:06.710
Let me get back up just a little bit.

27:06.710 --> 27:10.170
We saw that the SSH port was open.

27:10.170 --> 27:14.310
We connected with our credentials only known to us.

27:14.310 --> 27:21.650
And now we have enabled, which is admin-level access, and just printed out part of the config of this device.

27:21.650 --> 27:24.850
So , that's the plate demonstration.

27:24.850 --> 27:27.950
At some point, maybe we can do it live for real.

27:30.270 --> 27:31.790
That's pretty much it.

27:31.790 --> 27:32.710
I've got...

27:39.920 --> 27:43.300
So, Cisco defines this attack as password recovery.

27:43.300 --> 27:48.660
There's a document there that basically describes how you do this, sort of adding the accounts.

27:48.980 --> 27:55.540
We could make this more sophisticated, but not really.

27:55.560 --> 27:58.640
I used to call these attacks the Miyagi-style attacks.

27:58.660 --> 28:00.000
You remember the movie?

28:00.000 --> 28:03.840
He says, right, the creator's like, if do right, no can defend.

28:03.840 --> 28:06.760
So, you can't see it in the firmware.

28:06.760 --> 28:07.740
You can't detect it.

28:07.740 --> 28:09.100
It happens on its own.

28:09.100 --> 28:09.940
You can reflash it.

28:09.940 --> 28:10.820
It doesn't work.

28:10.820 --> 28:12.600
That's not quite true.

28:12.900 --> 28:27.580
If you pull your brand new equipment apart and look very carefully, look for rework, look for bad solder joints, and regularly baseline your equipment, look to see if it's changed, in-map it, check the configs and so forth, that's your opportunity.

28:28.400 --> 28:30.600
Alright, that's it.

28:30.600 --> 28:32.240
What I've learned is this really isn't very hard.

28:32.240 --> 28:33.720
I did this in my basement.

28:34.000 --> 28:37.000
You know, I'm okay, but I'm not that good at it.

28:37.000 --> 28:40.220
You could get this and follow along if you've done any hobbyist work.

28:40.540 --> 28:45.060
I think, really though, it's a pain in the butt to do, and nobody's going to do that.

28:45.060 --> 28:47.300
This is currently only for targeted attacks.

28:47.300 --> 28:49.220
Why only targeted attacks?

28:49.600 --> 28:52.380
Because your security sucks, right?

28:52.400 --> 28:57.880
Cisco's had lots of vulnerabilities in their firmware, and you don't even have to modify it to get there.

28:57.880 --> 28:59.880
So, I'm Monte Elkins.

28:59.880 --> 29:01.660
Catch up with me on Twitter.

29:01.660 --> 29:03.880
Don't forget to do Coke and Strippers.

29:03.880 --> 29:05.580
I mean, the YouTube channel.

29:05.900 --> 29:07.500
And we'll see you next time, DEF CON.

29:07.500 --> 29:08.400
Thank you very much.

