WEBVTT

00:00.000 --> 00:00.780
All right, hi.

00:00.780 --> 00:06.080
Thank you all for coming to Reversing Corruption, Seagate Hard Drive Translators, also known as the Naked Trill Data Recovery Project.

00:06.800 --> 00:09.940
Because we've had some technical difficulties, I may speak really fast.

00:09.940 --> 00:10.600
I'm from New York.

00:10.600 --> 00:11.320
I'm sorry.

00:11.900 --> 00:15.040
But thank you for all making it through the maze and through the confusion to be here.

00:15.040 --> 00:16.440
I really appreciate it.

00:18.200 --> 00:19.360
My name is Allison.

00:19.360 --> 00:21.460
I'm one of several Allison Noctiborns.

00:22.360 --> 00:24.100
I'm a software developer by trade.

00:24.100 --> 00:26.440
I build high-level blue software.

00:26.580 --> 00:28.940
So this has nothing to do with what I do as a day job.

00:28.940 --> 00:38.280
I haven't really touched hardware since college where I did a bunch of robotics research and learned that cutting-edge research is the easy part of getting published in IEEE publication.

00:38.280 --> 00:40.080
It left a little bit of a mark.

00:40.120 --> 00:41.840
About a dozen years worth of a mark.

00:41.840 --> 00:44.620
So that's really it for my hardware experience.

00:44.620 --> 00:46.120
I'm not an expert in this.

00:46.520 --> 00:47.420
That's her.

00:47.420 --> 00:48.560
That's her job.

00:48.600 --> 00:50.380
So feel free to tell me I'm wrong.

00:53.620 --> 00:55.260
That's a slow transition.

00:55.300 --> 00:56.440
Look, dude, I'm Mr.

00:56.440 --> 00:57.100
Dead.

00:57.620 --> 00:58.920
I named the project.

00:58.920 --> 01:00.680
It's a play on our last names.

01:01.580 --> 01:04.560
Born naked is her last name in Dutch.

01:04.680 --> 01:09.640
I've given talks at HushCon, Teardown, and then Arch Reactor Hackerspace.

01:09.920 --> 01:16.060
I founded Revenant Data, which is a data recovery company in Oregon with Wire Glitch, who's somewhere around here.

01:16.200 --> 01:18.580
I've co-founded a couple of hackerspaces.

01:18.600 --> 01:22.920
The most recent one is Pascal and PDX Hack Labs.

01:22.980 --> 01:29.420
I try to do workshops on reverse engineering and focusing on assembly and binary challenges.

01:29.780 --> 01:31.420
I don't have a formal education.

01:31.420 --> 01:34.560
I did not go to Carnegie Mellon University like Allison.

01:34.640 --> 01:36.680
Everything that I know is self-taught.

01:36.720 --> 01:41.580
I did do Scott Moulton's data recovery training, the remote one.

01:42.060 --> 01:45.500
I've never actually met him, which is kind of funny.

01:45.820 --> 01:48.120
And I do roller derby and I stress bake.

01:48.120 --> 01:50.320
I get stressed out and I bake stuff.

01:50.320 --> 01:52.980
That's my non-info sec hacking stuff.

01:54.380 --> 01:57.280
Alright, the original quest.

01:57.780 --> 02:01.880
We dubbed it the seemingly undamaged HDD in a really bad day.

02:02.080 --> 02:08.100
Uh, so what ends up happening is, this is out of order.

02:08.400 --> 02:08.860
Well, that's fine.

02:08.860 --> 02:17.040
I get a lot of these cases in translator corruption, which basically means I have zero access to user data or sometimes I'll have partial access.

02:17.060 --> 02:27.820
Uh, what that, how that manifests is, it'll boot, spin, it'll get stuck or never, and by, you know, stuck and busy, it just means not recognized by the host.

02:27.920 --> 02:29.700
Uh, and then it never initializes.

02:29.700 --> 02:35.140
Another thing that can happen is it will boot, spin, click, not all clicks are clicks of death.

02:35.660 --> 02:37.720
Uh, and then it'll spin down.

02:38.360 --> 02:53.820
So, when that happens, um, especially if there's clicking involved, and this is always, the type of corruption that we're talking about occurs in pharaoh seagates and moose seagates, which I know many of you may not actually be familiar with family names in hard drives,

02:53.820 --> 02:55.680
but you can ask me about that later.

02:56.220 --> 03:01.240
Um, so when the clicking happens, it usually is indicating the short points problem.

03:01.540 --> 03:11.860
Uh, which means that I have to short the read pins, or short the read points in order to gain terminal access and then force a regeneration of the translator.

03:11.920 --> 03:12.880
Success.

03:13.020 --> 03:15.020
That's a little off, and that's messed up.

03:15.020 --> 03:17.640
Success, but it's actually never really that easy.

03:17.640 --> 03:21.960
Um, it can become an, like an extremely awful time sink for me.

03:21.960 --> 03:36.880
Uh, like in order to, I have to short these read pins at a very precise time, and then I have to send a control Z to gain terminal access at a very precise time, and it can suck up anywhere between an hour of my time to six hours.

03:36.880 --> 03:37.740
I'm not kidding.

03:37.740 --> 03:46.600
My, uh, partner and I would often have to, like, switch off, because we'd get tired of, like, sitting there and listening for the heads to leave the platter and then, like, start mashing control Z.

03:46.880 --> 03:59.980
So, um, what makes this extremely frustrating is once I get terminal access, forcing the translator regeneration is actually very simple, but it's this timing issue that drives me nuts.

03:59.980 --> 04:06.920
Long story short, um, I went to the, the hacker space and started complaining about this a lot.

04:06.920 --> 04:08.120
I really don't like this.

04:08.660 --> 04:13.720
Yeah, but anyway, um, Allison overheard me and I, I said, oh, I want to automate this.

04:13.720 --> 04:26.200
I would love to be able to bypass this, like, four to six hour timing issue of shorting these points and sending a terminal command so that I can just, boom, get to the translator regener- regeneration.

04:26.440 --> 04:27.400
And she chimed in.

04:27.400 --> 04:28.700
She's like, oh, I can script that.

04:29.020 --> 04:29.540
Um.

04:29.540 --> 04:31.280
I think you said, hey, I need some code.

04:31.280 --> 04:32.400
It'll be really easy.

04:32.400 --> 04:33.420
I'm pretty sure that's what you said.

04:33.420 --> 04:37.040
I may have tried to sucker her into it, knowing damn well, cause I'm not a coder.

04:37.040 --> 04:40.300
I don't like, I, I have very little programming skills.

04:40.560 --> 04:49.620
Um, so along the way, while we were doing research to try to solve this particular issue, we started realizing there's a bunch of other little, like much simpler tools that we could fit or that we could build.

04:49.740 --> 04:51.080
And we started doing that.

04:51.260 --> 05:04.720
Um, cause the ultimate goal where we are currently focusing on translators and also just Seagates, even more specifically these two families, however, several of our tools do work on pretty much any Seagate.

05:04.720 --> 05:07.900
Uh, 7200.12 and beyond.

05:07.900 --> 05:13.960
Um, anywho, yeah, we started, uh, working on other types of tools that we can fix.

05:13.960 --> 05:18.700
We want to turn it into a full on data recovery suite that's open source.

05:20.240 --> 05:22.020
Reasons to care.

05:22.020 --> 05:32.900
I know a lot of people think that hard drives are obsolete or near-obsoletion, obsolescence, but, um, there are some pretty important reasons to care.

05:32.900 --> 05:37.840
Number one, right to know, uh, there are standards for hard drives.

05:37.840 --> 05:43.100
A lot of you are probably familiar with ATA standards, the INCITS T13 committee, they issue those.

05:43.100 --> 05:46.400
Um, the problem is, is majority of these are vendor specific.

05:46.400 --> 05:52.160
The tool that we built, we use the, um, terminal debug interface that has zero standards.

05:52.160 --> 05:53.540
Everything's vendor specific.

05:53.780 --> 06:07.320
So, if you don't know what you're doing, you either have to send it to a data recovery company, it's going to cost you an arm and a leg most likely, or you have to sink, honestly, probably months if not years of research into figuring out what commands can I use?

06:07.320 --> 06:08.680
What does this command mean?

06:08.820 --> 06:19.880
Um, these lack of standards make it really difficult to, like, implement quality assurance, and again, you're forced to rely on very costly data recovery tools or services.

06:21.420 --> 06:25.900
Um, right to repair, I wholeheartedly believe ownership is not a timeshare.

06:25.980 --> 06:31.020
Uh, it really bugs me that manufacturers want you to use their data recovery services only.

06:31.200 --> 06:35.120
Um, again, I think that ultimately drives down QA.

06:35.620 --> 06:44.160
Um, they're not compostable and there are a hell of a lot of them, especially when you factor in data centers and the fact that they're still using predominantly spinning disks.

06:44.160 --> 06:47.180
Um, they're manufactured with cobalt on the platters.

06:47.260 --> 06:52.040
Um, that can, it can cause neurodegenerative diseases.

06:52.040 --> 06:55.500
It's been linked to ALS recently, and I do have citations for all this.

06:55.500 --> 06:58.920
And then of course, silica, also neurodegenerative diseases.

07:01.040 --> 07:02.100
That's you.

07:02.100 --> 07:02.920
Yep.

07:04.780 --> 07:06.880
This podium is freaking me out.

07:06.880 --> 07:17.520
All right, so, uh, why you know Linux?

07:19.320 --> 07:21.280
I'm not an adept Linux user.

07:21.280 --> 07:21.740
Yeah, yeah.

07:21.860 --> 07:26.060
And apparently I can't use Windows, so I suppose I don't have any stones to throw.

07:26.200 --> 07:26.720
All right.

07:26.720 --> 07:29.420
So, of the disks that cross Mr.

07:29.420 --> 07:33.280
Dead's desk for repair, about 50% of them are Seagate's.

07:33.280 --> 07:37.260
Of that, just over 8% display translator corruption.

07:37.260 --> 07:41.780
This doesn't sound like a ton, but um, scale's a funny thing.

07:41.780 --> 07:50.160
So, Seagate started shipping drives in 80, 1980, and about 20 years later, they announced that they shipped 250 million hard drives.

07:50.160 --> 07:52.800
And they've kept shipping at about that rate.

07:52.800 --> 07:55.100
So, let's do some bar math.

07:55.960 --> 08:01.340
Um, translators really first appeared with the F3 architecture, which was shipped in about 2008.

08:01.980 --> 08:09.080
And if we say there are 100 million drives active, then we are looking at north of 8 million cases of translator corruption.

08:09.080 --> 08:13.880
So the odds are good if you have a couple drives or you run a data center, it's gonna happen to you.

08:13.880 --> 08:17.120
And when it does, you'll find out that this can be really expensive.

08:17.120 --> 08:24.920
We did some social engineering and we found that the cost of a translator repair can run you somewhere between 700 and 3,000 dollars.

08:24.920 --> 08:29.420
And in general, repair on a hard drive can run you north of 8,000.

08:29.460 --> 08:32.360
So getting your bits back can be extremely expensive.

08:32.400 --> 08:36.240
And I don't know about you, but I don't necessarily have a spare 8K laying around.

08:36.600 --> 08:41.840
So, that's the reason you should care beside the high-minded stuff.

08:42.800 --> 08:46.360
I'm gonna try to get through this because I know it's kind of boring hard drive anatomy.

08:46.760 --> 08:51.640
Um, number one, filter, not very important.

08:51.640 --> 08:55.440
Number two, however, those are the platters, aka the media, aka spinning disks.

08:55.440 --> 08:57.960
And that's where your data is technically actually stored.

08:58.140 --> 09:00.560
Um, what else to pay attention to?

09:00.560 --> 09:02.800
Six, the heads, right?

09:02.800 --> 09:05.040
The read and write elements of the drive.

09:05.160 --> 09:08.540
They're gonna fly over the platters reading and writing data.

09:08.640 --> 09:10.800
They're parked on the head ramp there.

09:11.100 --> 09:15.240
Uh, but honestly, the second or, you know, third most important element is seven.

09:15.240 --> 09:16.700
That's the head stack connector.

09:16.980 --> 09:21.940
So, that's connected via that number eight, the ribbon, to the actuator arm.

09:21.940 --> 09:24.200
And then on the other side, that's touching the PCB.

09:24.640 --> 09:27.300
And just remember, I was talking about shorting read points.

09:27.300 --> 09:29.760
Well, I have to know where those are because that's what I'm doing.

09:29.760 --> 09:36.960
I'm preventing, um, via this solution, the, the read, like the, the heads seeking the service area.

09:36.960 --> 09:37.520
It'll stop.

09:37.520 --> 09:39.500
I'm tricking it into giving me a debug mode.

09:39.980 --> 09:41.600
So, anatomy.

09:44.080 --> 09:45.580
Hard disk geometry.

09:45.700 --> 09:54.040
Uh, I wanted to bring, I wanted you all to kind of have a little bit of background on this because, you know, CHS, this is introducing you to CHS and LBA.

09:54.300 --> 10:01.380
Um, service area is that grayish blue ring around the outside if they're outer parked heads on a ramp.

10:01.760 --> 10:06.040
The, it could also be on the inner ring, um, which that would be inner parked heads.

10:06.040 --> 10:07.400
So, heads are parked on the platter.

10:07.400 --> 10:11.180
I can't issue this solution with those types of drives all the time.

10:11.180 --> 10:17.160
It's harder because I'm literally listening and also kind of feeling for when the heads are leaving the, the ramp.

10:17.460 --> 10:26.680
Um, two, the sectors, which is the S in CHS, um, that is physical location of data.

10:26.680 --> 10:29.340
It is the smallest unit of data on the hard drive.

10:29.680 --> 10:34.940
512 bytes of user data, 520 if you factor in ECC error correction code.

10:35.600 --> 10:41.700
Um, and is then divided up into cylinders, which are concentrically expanding rings from the center of the drive.

10:41.840 --> 10:45.260
Um, if you have multiple platters, that's going all through every platter.

10:45.500 --> 10:47.520
Uh, I highlighted it there.

10:47.520 --> 10:49.040
Number four, that is a cylinder.

10:49.040 --> 10:49.920
Those are all cylinders.

10:49.920 --> 10:51.460
Some people will dispute and call them tracks.

10:51.460 --> 10:52.680
It's a whole big debate.

10:53.060 --> 10:58.660
Uh, and then, um, that cylinder again, that would be the C in CHS.

10:58.660 --> 10:59.760
The H is the heads.

10:59.900 --> 11:01.500
Uh, so cylinder head sector.

11:01.760 --> 11:13.620
And a zone is, that includes like several cylinders and it is just a way to like aid in translator, but we're not going to get into that.

11:15.280 --> 11:16.480
There you go, that's you.

11:17.860 --> 11:18.680
Hardware is icky.

11:18.680 --> 11:20.020
Let's talk about software instead.

11:20.020 --> 11:21.940
And guys in the back, feel free to come in and sit down.

11:21.940 --> 11:23.220
We got plenty of seats.

11:23.420 --> 11:26.880
So, what's inside the firmware that we really care about?

11:26.880 --> 11:30.120
Well, one of the most important data structures is the translator.

11:30.120 --> 11:33.940
And the translator maps from logical block addresses to cylinder head sectors.

11:34.360 --> 11:39.020
Anytime you've seen the word logical in a name, it's a cue that we made this up.

11:39.020 --> 11:41.640
Uh, logical block addresses are an abstraction.

11:41.840 --> 11:45.060
CHS represent a location and physical space on the disk.

11:45.060 --> 11:48.500
Your translator will map between one and the other and vice versa.

11:48.600 --> 11:50.160
Well, how does it do this?

11:50.160 --> 11:54.520
Well, like all good data structures or famous hackers, it has a posse.

11:54.580 --> 11:57.180
Uh, it's posse is made up of defect lists.

11:58.100 --> 12:03.860
Um, your translator is a great place to hide things if you don't want the host OS to know they're there.

12:03.860 --> 12:09.020
Not that I would encourage you to do this, but in theory, it wouldn't be half bad.

12:10.700 --> 12:17.500
So, the lists that use as a helper to construct the, the translator as a data structure are two types of lists.

12:17.500 --> 12:21.260
We have primary defect lists and grown defects lists.

12:21.300 --> 12:25.460
Primary defects are defined as defects that are found at factory or creation.

12:25.500 --> 12:26.960
You're either borked or you're not.

12:26.960 --> 12:28.580
Sectors are just kind of bad sometimes.

12:28.580 --> 12:30.940
We make them, no one makes a perfect disk.

12:31.160 --> 12:33.700
Grown defects are the ones that accumulate over time.

12:33.700 --> 12:40.400
Flakes of rust, cosmic rays , aliens staring at your hard drive, stuff just goes bad over time and we know it.

12:40.500 --> 12:43.360
So, we tend to stick them in two lists.

12:44.080 --> 12:53.220
The grown defect list usually has a lot more space than the primary lists because it's, the size of that tends to determine how long your drive will really stay viable.

12:53.440 --> 13:00.320
In Seagates, we find a second form of primary list called the non-resident grown defect list.

13:00.320 --> 13:02.520
This showed up in?

13:02.680 --> 13:05.920
It showed up after 7200.12.

13:05.920 --> 13:08.780
It doesn't exist in 7200.11.

13:10.660 --> 13:11.260
Ask

13:16.620 --> 13:17.860
me about that later.

13:17.860 --> 13:18.580
Go, go, go.

13:19.860 --> 13:25.660
These two lists are created by something in Seagate lingo called a self-scan test, as far as I can tell it's a QA test they run.

13:26.080 --> 13:33.360
When working with these lists, they appear to largely function as glorified arrays, but I haven't been able to fully prove that's what they really are.

13:33.360 --> 13:35.140
They just seem to act a lot like it.

13:38.890 --> 13:41.710
So, all right, let's talk about some lists.

13:42.090 --> 13:42.970
No, no, no, not lists.

13:42.970 --> 13:44.030
This is physical to logical.

13:44.030 --> 13:44.910
I was getting there.

13:44.910 --> 13:45.590
Oh.

13:46.330 --> 13:47.230
Oh, it's your turn.

13:47.230 --> 13:48.370
Wait, I thought this was me.

13:48.370 --> 13:50.230
No, it's got my name on it.

13:51.210 --> 13:51.910
What?

13:51.910 --> 13:53.010
No, we switched.

13:53.010 --> 13:53.410
Management.

13:53.750 --> 13:54.990
All right, well then you do it.

13:54.990 --> 13:55.430
Okay.

13:56.010 --> 13:59.050
So, how does CHS map to LBA?

13:59.110 --> 14:01.750
This is, and how do skip lists and remap lists work?

14:01.750 --> 14:02.770
That's what this is showing.

14:02.890 --> 14:07.390
Up above, the darker blocks is cylinder head sector.

14:07.390 --> 14:10.250
Those are the physical blocks, geometric location.

14:10.930 --> 14:13.730
Keep in mind, CHS is always oblivious to these defects.

14:13.730 --> 14:15.850
It has no idea that it, that they exist.

14:15.850 --> 14:17.450
That's where the translator will come in.

14:17.450 --> 14:25.170
The primary lists found at factory, so P list, NRG list, maybe a few others, we're not entirely sure yet, um, functions like this.

14:25.170 --> 14:29.550
So, zero, one, and two, those are good, those are good blocks, good sectors.

14:29.550 --> 14:33.850
And they map identical, address wise, to the CHS.

14:34.630 --> 14:40.950
Physical block three is bad, so we skip it and four becomes three, and that's how a skip list works.

14:40.950 --> 14:47.050
It's fast, it's significantly faster than remaps, which we will get to now.

14:47.090 --> 14:50.510
And an important thing to note, from a perspective, is they have a limitation .

14:50.510 --> 14:51.410
They're static.

14:51.570 --> 14:55.490
So, we tend to pair them with primary lists, because they're expected to be static and unchanging.

14:58.630 --> 15:06.390
Physical, physical to logical via remapping, which is what the grown defects list are, so anything in G list is functioning like a remap.

15:06.430 --> 15:13.390
Uh, again, zero and one, physically, you know, having the similar, having the same address.

15:13.490 --> 15:15.550
We get to two and three, those are both bad.

15:15.970 --> 15:22.250
Um, the heads will, you know, hit that and, uh, check the ECC, it doesn't match.

15:22.250 --> 15:28.230
It knows, translator tells it, okay, go to the reserved area, which, the heads have to fly to a totally different area.

15:28.230 --> 15:35.550
This, it can really, really start to increase, um, the time that you have to spend, you know, waiting for your data to show up.

15:35.550 --> 15:45.030
So, a lot of times when your drive is starting to slow down, it can often indicate via smart data kind of sort of, don't ever really rely on that, but it can indicate a grown defects list, potentially.

15:46.630 --> 15:47.030
So.

15:47.210 --> 15:51.710
If you're in CS, this will cause it to resemble a linked list in a lot of ways.

15:52.070 --> 15:52.750
Yeah.

15:53.170 --> 16:00.830
And, uh, yeah, actually that's all I got, but if you have more questions, you can talk to me about that later, I know it's kind of, it's esoteric.

16:01.550 --> 16:04.150
Ah, signs translator may be corrupted.

16:04.350 --> 16:11.330
Um, again, as I mentioned earlier, uh, drive will boot, it'll spin, um, or it'll do the partial boot.

16:11.330 --> 16:13.470
Ultimately it's never recognized by the host.

16:13.610 --> 16:20.370
Uh, if you're able to get, you know, terminal debug mode, you will see these errors.

16:20.410 --> 16:24.030
Pretty much anything that begins with LED is indicative of a translator issue.

16:24.330 --> 16:29.710
Uh, that top one there ending in AO51, it's just kind of like a classic stuck and busy.

16:30.530 --> 16:37.030
Uh, could, could be, you know, lists need to be merged or the G list needs to be purged.

16:37.190 --> 16:47.650
Uh, the second one there ending in A7E5, pretty much always means in a Faro or Moose drive that I'm going to have to do the shorting of the read points in order to gain terminal access.

16:47.810 --> 16:56.530
Um, the SIM errors down here, any SIM error that you see, that's like 1000 through 1008, probably a corrupted defects list.

16:56.530 --> 17:00.390
Don't really know which one you'd have to research that or memorize it over time.

17:00.390 --> 17:07.290
SIM error 1009 pretty much always means, uh, corrupted G list, which is something that one of our tools can fix.

17:07.490 --> 17:11.170
Um, but those are things to look for in terminal debug mode.

17:11.170 --> 17:16.010
If you ever decide to do this for fun or, you know, you.

17:17.770 --> 17:20.410
I came up with a plan worthy of a bond villain.

17:20.410 --> 17:21.350
It is foolproof.

17:21.350 --> 17:22.790
It cannot possibly fail.

17:22.790 --> 17:37.290
So we're going to corrupt a translator in a controlled manner because I like properly testing my software, run it through a manual fix, take some notes, take some numbers, model with a program, tested on some unsuspecting members of our hacker space and profit.

17:37.950 --> 17:40.270
Who's written software before?

17:40.310 --> 17:43.370
Show a hands or played with proprietary hardware.

17:44.130 --> 17:44.350
Yeah.

17:44.350 --> 17:44.650
Yeah.

17:44.650 --> 17:46.590
You all know where this is going.

17:46.990 --> 17:49.930
Unsurprisingly, we ran into a few problems.

17:50.550 --> 17:54.530
So initially we were expecting to find three lists.

17:54.530 --> 17:59.710
The P list, the NRG list, which is that second form of P list and a G list, right?

17:59.750 --> 18:03.190
When we start spunking in the hardware, we find two out of three.

18:03.330 --> 18:04.110
So far so good.

18:04.110 --> 18:04.950
We are on track.

18:04.950 --> 18:05.970
I'm feeling good about it.

18:05.970 --> 18:07.170
It's warm and fuzzy.

18:09.270 --> 18:11.170
Warm and fuzzy never lasts.

18:11.250 --> 18:12.990
I'm the reason I can't have nice names.

18:12.990 --> 18:17.730
So instead of finding one G list, we found three, which became our first problem.

18:17.730 --> 18:23.310
Which of these grown defects lists are we going to try to overfill and are they all really actually G lists?

18:23.310 --> 18:28.910
Because we just sort of found a bunch of lists and had to figure out what they were, what they did and whether they were actually useful.

18:29.730 --> 18:38.610
So if you were confused by the remap, the physical to logical remap, ask me later what is copied and why that happens and how.

18:39.570 --> 18:40.450
Alrighty.

18:40.450 --> 18:41.150
Anyway.

18:42.270 --> 18:49.490
So we ended up trying to fill some of these lists and seeing what the drive did and seeing if we got the sort of signs of corruption we were expecting.

18:49.490 --> 18:53.970
We ultimately settled on the eponymous G list, the first one at the top.

18:53.970 --> 18:58.210
And that's the one we used for the rest of our experiments and testing.

18:58.330 --> 19:01.810
So that's the list we settled on for future use.

19:02.410 --> 19:04.570
We also found these two.

19:04.570 --> 19:06.310
Um, they're called slip lists.

19:06.310 --> 19:09.370
That means we found a total of seven lists here when we were expecting three.

19:09.370 --> 19:10.610
It's a little crowded in there.

19:10.810 --> 19:19.030
They aren't relevant to this talk and we're not entirely sure what they do, but we found them and we wanted to share that in case they're useful to other people.

19:20.430 --> 19:29.970
So we, we expected that we'd sort of fill the list by hand once it fall over at 2000 entries, we'd move on.

19:30.270 --> 19:32.450
Uh, that's not how that went.

19:32.890 --> 19:35.190
So initially Mr.

19:35.190 --> 19:38.470
Dead here added 3000 some odd entries by hand.

19:39.350 --> 19:41.350
Not that she was counting.

19:41.410 --> 19:47.870
Uh, I added about 34 before wanting to throw out the wall and deciding Pi cereal was the lesser of two evils.

19:48.690 --> 19:50.090
Promptly scripted that.

19:50.330 --> 19:53.110
So even then I'm like, all right, we'll run it overnight.

19:53.110 --> 19:53.930
It'll be done.

19:54.430 --> 19:58.870
Well, we ended up north of 6,000 entries and the translator wouldn't corrupt.

19:58.870 --> 20:01.150
And we're like, we don't think it has that much space.

20:01.150 --> 20:02.610
It shouldn't have that much space.

20:02.610 --> 20:03.670
We've run some numbers.

20:03.670 --> 20:05.710
We think it should only have like two gigs.

20:06.190 --> 20:10.570
And it finally dawned on me that the translator was actually a little bit smarter than I'd given it credit for.

20:10.570 --> 20:14.210
And it was adding entries sequentially and just skipping the entire block.

20:14.210 --> 20:16.510
We were basically telling it as contiguous memory was bad.

20:16.510 --> 20:18.450
And it was like, okay, contiguous memory is bad.

20:18.450 --> 20:19.430
We'll just skip that.

20:19.430 --> 20:21.550
So I ended up having to add a randomizer to the script.

20:21.550 --> 20:24.270
So it would add random jumps so that it couldn't block it.

20:24.510 --> 20:27.250
Even then we found that the list had way more space.

20:27.250 --> 20:33.890
We were expecting it to fall over at 2000 entries and it usually takes between 4,000 and 5,000 for it to fall over.

20:34.230 --> 20:37.630
Um, the drive didn't like being up for a lot of that.

20:37.630 --> 20:43.490
If you look at the far screen over there, you'll see the drive powering down in the middle of me doing things.

20:43.490 --> 20:48.290
So we found we also had to batch it and give the drive pauses between stuff.

20:48.290 --> 20:52.010
And you'll see on the left, that's the screen attached in diagnostic mode.

20:52.110 --> 20:58.510
And it's got way fewer entries in it's G list than I was expecting it to have, which was sort of my tip off that it was doing something smarter.

20:58.530 --> 21:01.150
I'm a little embarrassed to say it took me a while to see that.

21:01.250 --> 21:05.710
I just sort of thought I was doing it wrong or wiring it backward, which happened a lot.

21:07.830 --> 21:09.170
All right.

21:09.170 --> 21:13.410
So firmware is really weird, was the third problem I personally ran into.

21:13.670 --> 21:16.970
What does level six E2 do?

21:17.050 --> 21:18.290
Any takers?

21:19.450 --> 21:23.070
This creates a user batch file zero.

21:24.430 --> 21:30.390
Uh, how about level T, I4, parameters one, you already know the answer.

21:30.390 --> 21:32.350
You can clean the erasers after class.

21:32.350 --> 21:34.050
This clears the G list.

21:34.050 --> 21:38.370
I have no idea how this corresponds to clearing the G list, but it does.

21:38.930 --> 21:41.390
And so if anyone ever says this to you.

21:42.410 --> 21:44.690
Oh, too quick.

21:45.610 --> 21:48.830
Every time you say code is self documenting, God kills a kitten.

21:48.830 --> 21:49.630
Yeah.

21:49.690 --> 21:51.190
Why are you ruining my punch line?

21:51.210 --> 21:55.330
I've been waiting 10 years to use this picture for my coworkers desk.

21:56.910 --> 22:08.050
So Seagate firmware is extremely non-self documenting and that can be very difficult to work with when you have to rely on partially transcribed Chinese manuals found on sketching FTP servers.

22:08.310 --> 22:18.830
The other problem we ran into that isn't really on a slide because I didn't think it needed a slide was that we also ran into differences between firmware, like different behavior, different output.

22:18.870 --> 22:23.590
Some commands that we expected output from didn't output in the Apple firmware version.

22:23.590 --> 22:26.730
And it took us a lot of headbanging to figure that out.

22:27.130 --> 22:34.290
So when you were messing with this, you can't even count output to be consistent across commands, tell you whether something succeeded or not.

22:34.330 --> 22:36.370
In some cases, the Apple version just doesn't do anything.

22:36.370 --> 22:41.130
If it succeeds or if it fails, you just have to try later and see if it actually did something.

22:43.090 --> 22:48.990
So again, that timing issue and why I wanted to automate this because it takes forever.

22:49.550 --> 22:52.890
Um, this is just a little graph that Allison made.

22:52.890 --> 22:56.350
It's the results of several timing tests recorded.

22:56.570 --> 23:00.790
Um, during our attempts at the manual fix to short the points problem.

23:00.950 --> 23:08.410
Um, this is from powering on the drive to me hearing, listening for the heads to seek the service area.

23:09.210 --> 23:13.830
What's not shown is the timing between shorting the points and sending control Z.

23:13.830 --> 23:17.670
Uh, we didn't include that because we never actually got that far.

23:17.670 --> 23:20.330
Um, as you can see, there's a huge variance.

23:20.930 --> 23:28.770
Um, I think it was roughly between like 4.28 or something like that, uh, up to like almost 6.4 or something.

23:28.790 --> 23:34.110
Um, this is only from a single drive and we spent about two hours with zero success.

23:34.190 --> 23:41.870
Uh, so this was, you know, we had successfully corrupted the drive by overfilling the G list and here we are trying to figure out, well, how are we going to script this timing issue?

23:42.390 --> 23:44.290
And we're still not there.

23:44.530 --> 23:45.050
So.

23:45.050 --> 23:48.690
All right.

23:48.690 --> 23:51.310
So to recap, we had some surprises.

23:51.570 --> 23:53.270
There were more lists than we anticipated.

23:53.270 --> 23:55.490
We ended up stumbling around trying to figure out which one.

23:55.490 --> 23:59.290
The translator was smarter than I expected by actually a fair amount.

23:59.830 --> 24:01.630
Firmware is extremely weird.

24:02.410 --> 24:13.870
It has differences and the G list was a lot larger than we anticipated, which did significantly slow us down in places because I expected to be able to fill that sucker in four hours and it takes closer to 48.

24:17.090 --> 24:17.350
Yeah.

24:17.350 --> 24:24.650
Data recovery technicians and professionals are patient when we're working and then in the rest of life, we're kind of assholes, I think.

24:24.690 --> 24:29.850
But, uh, some other problems we ran into, um, you know, we're only human.

24:29.850 --> 24:30.930
We're mere mortals.

24:30.930 --> 24:32.770
Uh, lots of human errors.

24:32.890 --> 24:35.390
Software engineer can't hardware, hardware engineer can't software.

24:35.390 --> 24:46.470
She crossed wires, I don't know how many times, probably wasted about four hours on just confusing TX, RX and maybe not even having ground in, which I think she did actually kill one of our drives by not having ground in.

24:47.150 --> 24:49.770
Uh, and then I failed.

24:49.770 --> 24:54.270
I was trying to, you know, use the, her script that she wrote to intentionally corrupt.

24:54.270 --> 24:55.530
I didn't read the documentation.

24:55.530 --> 24:58.030
So I'm just like, go, go, go.

24:58.050 --> 24:59.110
Nothing's happening, Allison.

24:59.110 --> 25:00.610
And I went back to manually inputting.

25:00.630 --> 25:02.870
That was, that was pretty awful.

25:02.870 --> 25:05.830
Uh, I also poked through the PCB when trying to short the points.

25:06.070 --> 25:07.210
Um, but it's okay.

25:07.210 --> 25:08.810
I have so many of these to play with.

25:08.870 --> 25:16.270
Uh, the significant timing variance, um, the command output that we're waiting for in order to verify anything could take between one second.

25:16.430 --> 25:17.370
She put six minutes.

25:17.370 --> 25:18.630
Realistically, it's like 10 minutes.

25:18.630 --> 25:23.850
It could be 10 minutes even with really, really expensive, awesome data recovery tools like the PC 3000.

25:23.850 --> 25:27.190
Had to wait upwards of 10 minutes with the PC 3000.

25:27.570 --> 25:29.670
Um, Pi serial was less reliable.

25:29.850 --> 25:31.570
Don't use it on Windows.

25:31.990 --> 25:39.190
Um, I'm not the best Linux user at all, but this forced me to learn a lot more and sort of get away from Windows.

25:39.190 --> 25:41.650
So don't judge me, please.

25:43.950 --> 25:44.890
All right.

25:44.890 --> 25:55.430
So where we're at now, now that we've Yammered at you for some background and our experimental progress and emotional journey, we can consistently reverse corruption if diagnostic mode is available.

25:55.430 --> 26:00.790
So if you see sim error 111009, we know we can always reverse that.

26:00.790 --> 26:02.430
That one works very well.

26:02.930 --> 26:05.510
We can consistently corrupt our target drive.

26:05.510 --> 26:08.090
So I do have good test environments now.

26:08.090 --> 26:15.070
We, so if you want to play with reversing corruption, we can get you a drive that is in shape for that.

26:15.710 --> 26:22.390
The unfortunate thing is though, is we haven't been able to reproduce the original target solution on our corrupted drives.

26:23.530 --> 26:36.050
Because of the variance in timing and the fact that I don't have a way to programmatically detect where the heads are, I'm not actually convinced that we'll ever really get to a fully automated fix for the original problem.

26:36.770 --> 26:38.810
But that doesn't stop us from trying.

26:43.800 --> 26:44.520
Ta.

26:44.560 --> 26:45.380
All right.

26:45.380 --> 26:50.600
So before we show you code, the development philosophy for this project is a little bit different.

26:50.620 --> 26:53.880
I generally believe that not all hackers are coders.

26:54.220 --> 26:58.200
It's a little bit of a controversial opinion these days in some circles, but I do believe that.

26:58.200 --> 27:04.440
And I have met some very technical people in the data recovery community who can't read or write code for, for anything.

27:04.560 --> 27:05.680
Like that one.

27:05.680 --> 27:10.500
For, not, not that I would be so crass as to name names at a podium while we're being recorded.

27:11.480 --> 27:12.360
Anyway.

27:12.620 --> 27:15.520
So, this makes my spirit, my hacker spirit sad.

27:15.520 --> 27:26.300
And the whole point of this project is that the data privacy community has to, there was not a can of caffeine in that latte, I'm saying.

27:26.920 --> 27:29.580
They have to operate with this giant veil of secrecy.

27:29.740 --> 27:32.540
Manufacturers are withholding information, a lot of it's proprietary.

27:33.000 --> 27:35.560
People who make tools are extremely secretive.

27:35.560 --> 27:38.600
The large companies that do data recovery do not share.

27:38.740 --> 27:40.840
So, our goal is to make this open.

27:40.840 --> 27:45.180
And if you can't read the code, then you don't really know what it's doing and you haven't learned.

27:45.180 --> 27:46.760
Code represents intelligence.

27:47.000 --> 27:49.940
So, this code has been written with those people in mind.

27:49.940 --> 28:03.740
If you are a developer and you are a purist, avert thine eyes because there are fragrant violations of dry, it is over commented from a developer perspective and it is very procedural and it will basically piss off anyone who writes code professionally.

28:03.740 --> 28:06.440
I'm okay with that because they're not my target audience.

28:06.440 --> 28:09.160
I want people who do data recovery to be able to read it.

28:09.400 --> 28:11.040
It's in Python for two reasons.

28:11.040 --> 28:14.940
One, because it's the lingua franca of security and it's our poison of choice.

28:14.940 --> 28:21.640
But also because in my experience teaching people, it is the easiest type of code for non-coders to understand.

28:22.320 --> 28:27.840
It is also GPLV3 because we are interested in making sure this information stays open.

28:27.840 --> 28:30.600
There's already a bunch of proprietary and closed stored stuff.

28:30.600 --> 28:34.000
I'm not interested in spending my precious free time adding to that.

28:34.000 --> 28:37.400
So, if you want to yell at me about the license choice, feel free.

28:37.820 --> 28:38.700
Go for it.

28:38.720 --> 28:41.940
Uh, please file your bugs with this, this philosophy in mind.

28:41.940 --> 28:43.000
It is a little bit different.

28:46.120 --> 28:53.380
So, to the meat of it, what you're going to need to implement this at home with one of your pharaoh or moose seagate drives.

28:53.440 --> 29:00.900
Um, side note, I wasn't entirely comfortable with this and definitely very used to my expensive fun tools.

29:00.980 --> 29:03.700
Uh, but I very much want this to become open source.

29:03.700 --> 29:08.620
So, to do this entire thing, if you already have the drive, shouldn't cost you more than 15 bucks.

29:08.620 --> 29:15.940
You just need a USB to TTL adapter with the FTDI chip, FT232, access to the ground pin.

29:15.940 --> 29:17.720
So, you're going to have to shell your drive.

29:18.540 --> 29:25.560
Um, if you have, if you're not using one of the adapters that has, you know, shared power with the host, you're going to need a power adapter.

29:25.700 --> 29:27.960
You'll need the code, which you can find on her github.

29:28.020 --> 29:30.260
Uh, you'll need pi serial module.

29:30.500 --> 29:41.080
We strongly encourage and encourage, well, we encourage you install screen to issue a sanity check to make sure that you are in fact connected to the hard drive and that you can send these commands, that you can cause corruption and reverse corruption.

29:41.300 --> 29:46.900
Uh, we also strongly encourage that you'd never use this on a hard drive with data that you give a damn about.

29:47.020 --> 29:49.160
Uh, don't.

29:49.180 --> 29:52.060
Um, you do have to match it in a very particular way.

29:52.080 --> 29:59.340
Um, all hard drives are broken up into these really bizarre, like, uh, families and lots of other things.

29:59.340 --> 30:03.500
Um, generally with the, the Seagate Moose and Ferro, match the model number.

30:03.500 --> 30:09.200
You can ID it if it's a good drive via the debug mode and I can like, you know, we'll document that somewhere.

30:09.200 --> 30:11.180
There's a special command you can send for that.

30:11.280 --> 30:13.920
Um, if not, you can kind of go off the model number.

30:13.920 --> 30:18.400
Ferro and Moose drives almost always end in something, something AS with the model number.

30:18.420 --> 30:32.400
Uh, match the firmware versions because again, this, the exact specific type of corruption we were trying to fix with the shorting of the read points, um, in order to gain terminal access doesn't incur in a couple of like Apple, well, it can occur there,

30:32.400 --> 30:33.840
but it's difficult to fix.

30:34.160 --> 30:40.040
Um, because when it's seeking the service area and at what points it's reading the service area are different than in other firmware.

30:40.080 --> 30:44.100
The Dell specific firmware JC4A, we were never able to get corruption.

30:44.100 --> 30:44.920
I don't know why.

30:44.920 --> 30:48.260
I don't know if it's somehow impervious to G list overfill.

30:48.260 --> 30:50.260
I'd have to do a lot more research to figure that out.

30:52.280 --> 30:53.720
This is our set up.

30:53.800 --> 30:59.660
Um, that's my little, uh , pin or a read point shorting tool that I, it's just tweezers.

30:59.660 --> 31:05.260
And I tried to space them, uh, as perfectly apart to quickly hit the read points, which are in the middle there.

31:05.260 --> 31:09.220
And the, uh, it's just solder wrapped around the, wrapped around there trying to bridge it.

31:09.600 --> 31:12.740
It's a really shoddy set up and I'm embarrassed by it, I guess.

31:12.780 --> 31:20.520
Um, and yeah, those are the read points we're aiming for when we're, you know, right after power on listening for it to leave , uh, listening for the heads to leave.

31:20.520 --> 31:27.020
And then, uh, once we actually did reach corruption, because we have done that, uh, I just wanted to verify it in one of my fancy tools.

31:27.020 --> 31:28.720
So it took up to the PC 2000 over there.

31:28.720 --> 31:34.100
They have these fancy terminal connectors that are way better than, way better than that.

31:34.700 --> 31:37.540
Um, much less likely to cause connectivity issues.

31:37.700 --> 31:44.420
Um, so yeah, when you're doing this, just make sure that, you know, you're crisscrossing your RX and TX from host to device.

31:44.740 --> 31:53.100
Um, it's like honestly kind of a, uh, kind of a trick to even figure out what pins are TX, RX on the drives.

31:53.180 --> 31:57.940
Um, so TX is always closest to, uh, the SATA.

31:58.080 --> 31:59.500
Then RX right next to it.

31:59.500 --> 32:01.140
And then ground is the very last.

32:01.140 --> 32:03.280
So we didn't show the power connector.

32:03.360 --> 32:04.340
It's there.

32:06.440 --> 32:07.880
Please be very careful.

32:07.880 --> 32:12.440
Um, there's a lot that you can do to destroy your drive and never get access to your data again.

32:12.440 --> 32:17.700
So again, if you're going to be doing this, choose it, choose to start with a drive you don't care about at all.

32:17.980 --> 32:23.620
And before you start, very first thing, back up the service area, which yes you can do via terminal debug mode commands.

32:23.620 --> 32:25.380
You can save that way.

32:25.420 --> 32:27.660
Um, ask me about that later.

32:27.660 --> 32:30.440
But definitely, definitely, definitely back up the service area.

32:33.420 --> 32:36.060
Alright, so you've got your equipment, you're ready to go.

32:36.060 --> 32:38.100
Please get your software installed in order.

32:38.100 --> 32:40.240
Remember to give it executable permissions.

32:40.560 --> 32:41.920
Hook up the connectors.

32:42.500 --> 32:43.740
Double check your connectors.

32:43.740 --> 32:46.840
If you're in software, have someone in hardware check your connectors.

32:47.100 --> 32:49.380
Determine what port your OS has been assigned.

32:50.320 --> 32:51.800
Re-run the scripts.

32:51.900 --> 32:57.940
Read the, I'd say read the documentation before you start, but I'm a realist and know that nobody does that apparently.

32:58.180 --> 33:04.540
So, before you hit run, please read the documentation because the order of the LBA addresses you enter matters.

33:06.000 --> 33:12.220
So, yeah, running this once you get all your stuff and set up and are good to go is actually pretty quick.

33:14.780 --> 33:17.260
However, there is one gotcha I do want to mention.

33:17.520 --> 33:23.420
So, as we mentioned earlier, some of those re- especially when you get a full G list, your remap operations get really, really slow.

33:23.700 --> 33:29.640
And we did see some of the commands to add entries take north of ten minutes to fully execute.

33:30.000 --> 33:32.520
So, the script will time out.

33:32.520 --> 33:40.900
You'll see received byte zero and the set up you can see on the left that we are actually getting the sectors reassigned, i.e.

33:40.900 --> 33:44.340
added to the G list, even though the script says we got nothing back.

33:44.340 --> 33:48.760
This is because I went and made T and came back and there was the output.

33:48.780 --> 33:58.200
So, be aware that if you see received zero, it's not an indication that the operation failed, it just means it was taking longer than the script was willing to wait.

33:58.720 --> 34:00.800
So, don't freak if you see those.

34:03.160 --> 34:04.780
Alright, so what's next?

34:04.780 --> 34:07.540
This is a shameless plug for help.

34:07.820 --> 34:11.040
We would like to try solving the original problem without shorting.

34:11.460 --> 34:17.040
We'd like to write it- write some code to configure the translator to rebuild based on the list you specify.

34:17.040 --> 34:19.740
You may remember that we have seven of them to pick from.

34:19.740 --> 34:24.660
I'm guessing you'll get some different behavior and some different performance if you rebuild the translator with different lists.

34:24.760 --> 34:29.280
We'd like to expand this to include other Seagate families or even better, other manufacturers.

34:29.620 --> 34:34.460
Could potentially do this with the ATEA commands because they are not specific to Seagate.

34:36.900 --> 34:49.820
So, again, long term goal, we would like an open source data recovery suite so that people don't have to spend an arm and a leg or you know, hundreds to up to ten grand sometimes on data recovery.

34:51.060 --> 34:56.360
Feature requests, again, our current focus is on translators and defects list issues.

34:56.420 --> 35:00.480
We do want to expand to include other solutions and, of course, other manufacturers.

35:01.620 --> 35:06.160
Code contributions, just make sure you please keep Allison's philosophy in mind.

35:06.640 --> 35:09.620
You know, make this for people that don't know how to code.

35:10.320 --> 35:11.720
We would love help testing.

35:11.720 --> 35:14.680
That doesn't always include just writing scripts.

35:14.680 --> 35:19.740
There's other things that I would definitely like help with and you can ask me about that later if you're interested.

35:20.680 --> 35:22.220
Open knowledge about the firmware.

35:22.220 --> 35:25.020
All this, again, data recovery is super, super, super secretive.

35:25.020 --> 35:26.240
The manufacturers are secretive.

35:26.240 --> 35:28.600
Other data recovery companies are very secretive.

35:29.820 --> 35:30.860
You know, it's hard.

35:30.860 --> 35:32.020
There's a lot of digging.

35:32.120 --> 35:33.700
There's some great forums out there.

35:33.700 --> 35:35.780
HDD Oracle is one of my favorite.

35:36.560 --> 35:39.300
I highly recommend you visit that if you haven't.

35:40.500 --> 35:42.820
So, acknowledgments.

35:43.060 --> 35:46.460
Speaking of HDD Oracle, I really want to thank Spilled It.

35:46.460 --> 35:50.860
I've never met him, but he founded HDD Oracle and he's just a fantastic researcher.

35:52.140 --> 35:55.680
He loves what he does and he's not in it to make money.

35:57.980 --> 35:59.140
I think that's it.

36:00.480 --> 36:09.720
I'd like to thank LeapBunny and the two goons who sprinted over across hotels to get us a projector at T minus five minutes because I don't think I could have done that.

36:10.840 --> 36:11.800
LeapBunny is awesome .

36:11.800 --> 36:13.500
He's always wearing a green hat pretty much.

36:13.500 --> 36:16.400
Definitely buy him food or booze or something.

36:16.780 --> 36:24.820
And then bibliography you can find on my GitHub that I never use or that little URL which is totally safe, I promise.

36:24.820 --> 36:27.340
And if something happens, find Dean Pierce.

36:27.880 --> 36:28.740
He's awesome.

36:28.880 --> 36:29.740
Okay.

36:29.760 --> 36:42.800
So, we were supposed to take five minutes of questions, but because we got such a late start, we're going to take all of our questions over under the hardware hacking village sign to try to keep this room as on schedule as it is feasible to be at DEF CON.

36:42.940 --> 36:44.460
So, thank you all for coming.

36:44.460 --> 36:45.840
Thanks for fording the maze.

36:46.380 --> 36:49.420
We look forward to seeing you over there to have a longer conversation.

