start	end	text
0	3940	All right, hi. Thank you all for coming to Reversing Corruption, Seagate Hard Drive Translators,
3940	7760	also known as the Naked Trill Data Recovery Project. Because we've had some technical
7760	12640	difficulties, I may speak really fast. I'm from New York. I'm sorry. But thank you for
12640	16440	all making it through the maze and through the confusion to be here. I really appreciate it.
18200	24100	My name is Allison. I'm one of several Allison Noctiborns. I'm a software developer by trade.
24100	28940	I build high-level blue software. So this has nothing to do with what I do as a day job.
28940	32360	I haven't really touched hardware since college where I did a bunch of robotics research
32360	38280	and learned that cutting-edge research is the easy part of getting published in IEEE publication.
38280	43420	It left a little bit of a mark. About a dozen years worth of a mark. So that's really it for
43420	49280	my hardware experience. I'm not an expert in this. That's her. That's her job. So feel free
49280	58920	to tell me I'm wrong. That's a slow transition. Look, dude, I'm Mr. Dead. I named the project.
58920	66240	It's a play on our last names. Born naked is her last name in Dutch. I've given talks at
66240	72000	HushCon, Teardown, and then Arch Reactor Hackerspace. I founded Revenant Data, which is a
72000	77280	data recovery company in Oregon with Wire Glitch, who's somewhere around here. I've co-founded a
77280	85040	couple of hackerspaces. The most recent one is Pascal and PDX Hack Labs. I try to do workshops
85040	90740	on reverse engineering and focusing on assembly and binary challenges. I don't have a formal
90740	95700	education. I did not go to Carnegie Mellon University like Allison. Everything that I know
95700	102760	is self-taught. I did do Scott Moulton's data recovery training, the remote one. I've never
102760	108620	actually met him, which is kind of funny. And I do roller derby and I stress bake. I get stressed
108620	118340	out and I bake stuff. That's my non-info sec hacking stuff. Alright, the original quest. We
118340	126960	dubbed it the seemingly undamaged HDD in a really bad day. Uh, so what ends up happening is, this
126960	132100	is out of order. Well, that's fine. I get a lot of these cases in translator corruption, which
132100	137920	basically means I have zero access to user data or sometimes I'll have partial access. Uh, what
137920	145280	that, how that manifests is, it'll boot, spin, it'll get stuck or never, and by, you know, stuck
145280	150020	and busy, it just means not recognized by the host. Uh, and then it never initializes. Another
150020	156420	thing that can happen is it will boot, spin, click, not all clicks are clicks of death. Uh, and
156420	163840	then it'll spin down. So, when that happens, um, especially if there's clicking involved, and
163840	169180	this is always, the type of corruption that we're talking about occurs in pharaoh seagates and
169180	173300	moose seagates, which I know many of you may not actually be familiar with family names in
173300	178360	hard drives, but you can ask me about that later. Um, so when the clicking happens, it usually
178360	186540	is indicating the short points problem. Uh, which means that I have to short the read pins, or
186540	190920	short the read points in order to gain terminal access and then force a regeneration of the
190920	196200	translator. Success. That's a little off, and that's messed up. Success, but it's actually
196200	203100	never really that easy. Um, it can become an, like an extremely awful time sink for me. Uh,
203100	208420	like in order to, I have to short these read pins at a very precise time, and then I have to
208420	213880	send a control Z to gain terminal access at a very precise time, and it can suck up anywhere
213880	219660	between an hour of my time to six hours. I'm not kidding. My, uh, partner and I would often
219660	223660	have to, like, switch off, because we'd get tired of, like, sitting there and listening for the
223660	230140	heads to leave the platter and then, like, start mashing control Z. So, um, what makes this
230140	235500	extremely frustrating is once I get terminal access, forcing the translator regeneration is
235500	242300	actually very simple, but it's this timing issue that drives me nuts. Long story short, um, I
242300	247500	went to the, the hacker space and started complaining about this a lot. I really don't like
247500	253720	this. Yeah, but anyway, um, Allison overheard me and I, I said, oh, I want to automate this. I
253720	260660	would love to be able to bypass this, like, four to six hour timing issue of shorting these
260660	264900	points and sending a terminal command so that I can just, boom, get to the translator
264900	269540	regener- regeneration. And she chimed in. She's like, oh, I can script that. Um.
269540	273280	I think you said, hey, I need some code. It'll be really easy. I'm pretty sure that's what you
273280	277080	said. I may have tried to sucker her into it, knowing damn well, cause I'm not a coder. I
277080	282420	don't like, I, I have very little programming skills. Um, so along the way, while we were
282420	285980	doing research to try to solve this particular issue, we started realizing there's a bunch of
285980	290460	other little, like much simpler tools that we could fit or that we could build. And we started
290460	296000	doing that. Um, cause the ultimate goal where we are currently focusing on translators and
296000	301800	also just Seagates, even more specifically these two families, however, several of our tools do
301800	311180	work on pretty much any Seagate. Uh, 7200.12 and beyond. Um, anywho, yeah, we started, uh,
311180	316660	working on other types of tools that we can fix. We want to turn it into a full on data
316660	325140	recovery suite that's open source. Reasons to care. I know a lot of people think that hard drives
325140	332360	are obsolete or near-obsoletion, obsolescence, but, um, there are some pretty important reasons
332360	338200	to care. Number one, right to know, uh, there are standards for hard drives. A lot of you are
338200	343580	probably familiar with ATA standards, the INCITS T13 committee, they issue those. Um, the
343580	349620	problem is, is majority of these are vendor specific. The tool that we built, we use the, um,
349620	355000	terminal debug interface that has zero standards. Everything's vendor specific. So, if you
355000	358160	don't know what you're doing, you either have to send it to a data recovery company, it's
358160	362780	going to cost you an arm and a leg most likely, or you have to sink, honestly, probably
362780	367780	months if not years of research into figuring out what commands can I use? What does this
367780	373300	command mean? Um, these lack of standards make it really difficult to, like, implement
373300	378980	quality assurance, and again, you're forced to rely on very costly data recovery tools or
378980	386560	services. Um, right to repair, I wholeheartedly believe ownership is not a timeshare. Uh, it
386560	391560	really bugs me that manufacturers want you to use their data recovery services only. Um,
391560	399160	again, I think that ultimately drives down QA. Um, they're not compostable and there are a
399160	402100	hell of a lot of them, especially when you factor in data centers and the fact that they're
402100	406440	still using predominantly spinning disks. Um, they're manufactured with cobalt on the
406440	413080	platters. Um, that can, it can cause neurodegenerative diseases. It's been linked to ALS
413080	416820	recently, and I do have citations for all this. And then of course, silica, also
417560	428600	neurodegenerative diseases. That's you. Yep. This podium is freaking me out. All right, so,
431600	443500	uh, why you know Linux? I'm not an adept Linux user. Yeah, yeah. And apparently I can't use
443500	448680	Windows, so I suppose I don't have any stones to throw. All right. So, of the disks that
448680	455080	cross Mr. Dead's desk for repair, about 50% of them are Seagate's. Of that, just over 8%
455080	461100	display translator corruption. This doesn't sound like a ton, but um, scale's a funny
461100	467720	thing. So, Seagate started shipping drives in 80, 1980, and about 20 years later, they
467720	471800	announced that they shipped 250 million hard drives. And they've kept shipping at about
471800	479080	that rate. So, let's do some bar math. Um, translators really first appeared with the F3
479080	484580	architecture, which was shipped in about 2008. And if we say there are 100 million drives
484580	489500	active, then we are looking at north of 8 million cases of translator corruption. So the
489500	493880	odds are good if you have a couple drives or you run a data center, it's gonna happen to you.
493880	498100	And when it does, you'll find out that this can be really expensive. We did some social
498100	502860	engineering and we found that the cost of a translator repair can run you somewhere between
502860	509860	700 and 3,000 dollars. And in general, repair on a hard drive can run you north of 8,000. So
509860	513540	getting your bits back can be extremely expensive. And I don't know about you, but I
513540	520120	don't necessarily have a spare 8K laying around. So, that's the reason you should care
520120	524580	beside the high-minded stuff. I'm gonna try to get through this because I know it's kind of
524580	532060	boring hard drive anatomy. Um, number one, filter, not very important. Number two,
532060	536120	however, those are the platters, aka the media, aka spinning disks. And that's where your data
536120	542940	is technically actually stored. Um, what else to pay attention to? Six, the heads, right? The
542940	547860	read and write elements of the drive. They're gonna fly over the platters reading and writing
547860	553720	data. They're parked on the head ramp there. Uh, but honestly, the second or, you know, third
553720	559120	most important element is seven. That's the head stack connector. So, that's connected via
559120	563140	that number eight, the ribbon, to the actuator arm. And then on the other side, that's
563140	567940	touching the PCB. And just remember, I was talking about shorting read points. Well, I have
567940	571980	to know where those are because that's what I'm doing. I'm preventing, um, via this
571980	577600	solution, the, the read, like the, the heads seeking the service area. It'll stop. I'm
577600	586840	tricking it into giving me a debug mode. So, anatomy. Hard disk geometry. Uh, I wanted to
586840	590480	bring, I wanted you all to kind of have a little bit of background on this because, you
590480	597960	know, CHS, this is introducing you to CHS and LBA. Um, service area is that grayish blue ring
597960	603160	around the outside if they're outer parked heads on a ramp. The, it could also be on the
603160	606920	inner ring, um, which that would be inner parked heads. So, heads are parked on the
606920	611520	platter. I can't issue this solution with those types of drives all the time. It's harder
611520	616280	because I'm literally listening and also kind of feeling for when the heads are leaving the,
616280	626680	the ramp. Um, two, the sectors, which is the S in CHS, um, that is physical location of data.
626680	632900	It is the smallest unit of data on the hard drive. 512 bytes of user data, 520 if you factor
632900	638040	in ECC error correction code. Um, and is then divided up into cylinders, which are
638040	642920	concentrically expanding rings from the center of the drive. Um, if you have multiple
642920	648280	platters, that's going all through every platter. Uh, I highlighted it there. Number four,
648280	651460	that is a cylinder. Those are all cylinders. Some people will dispute and call them tracks.
651460	658860	It's a whole big debate. Uh, and then, um, that cylinder again, that would be the C in CHS. The
658860	666140	H is the heads. Uh, so cylinder head sector. And a zone is, that includes like several
666140	673620	cylinders and it is just a way to like aid in translator, but we're not going to get into that.
675280	680420	There you go, that's you. Hardware is icky. Let's talk about software instead. And guys in
680420	685160	the back, feel free to come in and sit down. We got plenty of seats. So, what's inside the
685160	689420	firmware that we really care about? Well, one of the most important data structures is the
689420	693940	translator. And the translator maps from logical block addresses to cylinder head sectors.
694360	699660	Anytime you've seen the word logical in a name, it's a cue that we made this up. Uh, logical
699660	704440	block addresses are an abstraction. CHS represent a location and physical space on the
704440	709460	disk. Your translator will map between one and the other and vice versa. Well, how does it do
709460	715640	this? Well, like all good data structures or famous hackers, it has a posse. Uh, it's posse is
715640	722200	made up of defect lists. Um, your translator is a great place to hide things if you don't want
722200	727600	the host OS to know they're there. Not that I would encourage you to do this, but in theory, it
727600	734940	wouldn't be half bad. So, the lists that use as a helper to construct the, the translator as a
734940	741260	data structure are two types of lists. We have primary defect lists and grown defects lists.
741300	745800	Primary defects are defined as defects that are found at factory or creation. You're either
745800	750120	borked or you're not. Sectors are just kind of bad sometimes. We make them, no one makes a
750120	755840	perfect disk. Grown defects are the ones that accumulate over time. Flakes of rust, cosmic
755840	761580	rays, aliens staring at your hard drive, stuff just goes bad over time and we know it. So, we
761580	766800	tend to stick them in two lists. The grown defect list usually has a lot more space than the
766800	772080	primary lists because it's, the size of that tends to determine how long your drive will really
772080	779140	stay viable. In Seagates, we find a second form of primary list called the non-resident grown
779140	791260	defect list. This showed up in? It showed up after 7200.12. It doesn't exist in 7200.11. Ask
796620	802420	me about that later. Go, go, go. These two lists are created by something in Seagate lingo
802420	806780	called a self-scan test, as far as I can tell it's a QA test they run. When working with these
806780	811920	lists, they appear to largely function as glorified arrays, but I haven't been able to fully
811920	820510	prove that's what they really are. They just seem to act a lot like it. So, all right, let's
820510	824430	talk about some lists. No, no, no, not lists. This is physical to logical. I was getting
824430	831910	there. Oh. Oh, it's your turn. Wait, I thought this was me. No, it's got my name on it. What?
831910	838330	No, we switched. Management. All right, well then you do it. Okay. So, how does CHS map to
838330	843290	LBA? This is, and how do skip lists and remap lists work? That's what this is showing. Up
843290	849390	above, the darker blocks is cylinder head sector. Those are the physical blocks, geometric
849390	854930	location. Keep in mind, CHS is always oblivious to these defects. It has no idea that it, that
854930	859570	they exist. That's where the translator will come in. The primary lists found at factory, so
859570	865850	P list, NRG list, maybe a few others, we're not entirely sure yet, um, functions like this. So,
865850	870210	zero, one, and two, those are good, those are good blocks, good sectors. And they map
870690	878770	identical, address wise, to the CHS. Physical block three is bad, so we skip it and four becomes
878770	883490	three, and that's how a skip list works. It's fast, it's significantly faster than remaps,
883490	890270	which we will get to now. And an important thing to note, from a perspective, is they have a
890270	894050	limitation. They're static. So, we tend to pair them with primary lists, because they're
894050	901990	expected to be static and unchanging. Physical, physical to logical via remapping, which is
901990	907950	what the grown defects list are, so anything in G list is functioning like a remap. Uh, again,
907950	913950	zero and one, physically, you know, having the similar, having the same address. We get to two
913950	921390	and three, those are both bad. Um, the heads will, you know, hit that and, uh, check the ECC, it
921390	926650	doesn't match. It knows, translator tells it, okay, go to the reserved area, which, the heads
926650	932010	have to fly to a totally different area. This, it can really, really start to increase, um, the
932010	936450	time that you have to spend, you know, waiting for your data to show up. So, a lot of times
936450	941110	when your drive is starting to slow down, it can often indicate via smart data kind of sort of,
941110	945030	don't ever really rely on that, but it can indicate a grown defects list, potentially.
946630	954930	So. If you're in CS, this will cause it to resemble a linked list in a lot of ways. Yeah. And, uh,
954930	957630	yeah, actually that's all I got, but if you have more questions, you can talk to me about that
957630	965650	later, I know it's kind of, it's esoteric. Ah, signs translator may be corrupted. Um, again, as
965650	971330	I mentioned earlier, uh, drive will boot, it'll spin, um, or it'll do the partial boot.
971330	977870	Ultimately it's never recognized by the host. Uh, if you're able to get, you know, terminal debug
977870	983350	mode, you will see these errors. Pretty much anything that begins with LED is indicative of a
983350	988850	translator issue. Uh, that top one there ending in AO51, it's just kind of like a classic stuck
988850	996170	and busy. Uh, could, could be, you know, lists need to be merged or the G list needs to be
996170	1002890	purged. Uh, the second one there ending in A7E5, pretty much always means in a Faro or Moose
1002890	1006730	drive that I'm going to have to do the shorting of the read points in order to gain terminal
1006730	1012870	access. Um, the SIM errors down here, any SIM error that you see, that's like 1000 through
1012870	1018210	1008, probably a corrupted defects list. Don't really know which one you'd have to research
1018210	1024750	that or memorize it over time. SIM error 1009 pretty much always means, uh, corrupted G list,
1024750	1030510	which is something that one of our tools can fix. Um, but those are things to look for in terminal
1030510	1039030	debug mode. If you ever decide to do this for fun or, you know, you. I came up with a plan
1039030	1044070	worthy of a bond villain. It is foolproof. It cannot possibly fail. So we're going to corrupt a
1044070	1049210	translator in a controlled manner because I like properly testing my software, run it through a
1049210	1054530	manual fix, take some notes, take some numbers, model with a program, tested on some
1054530	1061950	unsuspecting members of our hacker space and profit. Who's written software before? Show a
1061950	1067790	hands or played with proprietary hardware. Yeah. Yeah. You all know where this is going.
1067790	1074050	Unsurprisingly, we ran into a few problems. So initially we were expecting to find three
1074070	1080250	lists. The P list, the NRG list, which is that second form of P list and a G list, right? When we
1080250	1085110	start spunking in the hardware, we find two out of three. So far so good. We are on track. I'm
1085110	1092010	feeling good about it. It's warm and fuzzy. Warm and fuzzy never lasts. I'm the reason I can't
1092010	1096990	have nice names. So instead of finding one G list, we found three, which became our first
1096990	1101290	problem. Which of these grown defects lists are we going to try to overfill and are they all
1101290	1106330	really actually G lists? Because we just sort of found a bunch of lists and had to figure out what
1106330	1112330	they were, what they did and whether they were actually useful. So if you were confused by the
1112330	1117990	remap, the physical to logical remap, ask me later what is copied and why that happens and
1117990	1125930	how. Alrighty. Anyway. So we ended up trying to fill some of these lists and seeing what the drive
1125930	1130270	did and seeing if we got the sort of signs of corruption we were expecting. We ultimately
1130270	1136150	settled on the eponymous G list, the first one at the top. And that's the one we used for the
1136150	1143210	rest of our experiments and testing. So that's the list we settled on for future use. We also
1143210	1148210	found these two. Um, they're called slip lists. That means we found a total of seven lists here
1148210	1152190	when we were expecting three. It's a little crowded in there. They aren't relevant to this
1152190	1157110	talk and we're not entirely sure what they do, but we found them and we wanted to share that in
1157110	1166250	case they're useful to other people. So we, we expected that we'd sort of fill the list by hand
1166250	1175190	once it fall over at 2000 entries, we'd move on. Uh, that's not how that went. So initially Mr.
1175190	1183030	Dead here added 3000 some odd entries by hand. Not that she was counting. Uh, I added about 34
1183030	1187870	before wanting to throw out the wall and deciding Pi cereal was the lesser of two evils.
1188690	1193930	Promptly scripted that. So even then I'm like, all right, we'll run it overnight. It'll be done.
1194430	1199290	Well, we ended up north of 6,000 entries and the translator wouldn't corrupt. And we're like,
1199290	1203090	we don't think it has that much space. It shouldn't have that much space. We've run some
1203090	1207710	numbers. We think it should only have like two gigs. And it finally dawned on me that the
1207710	1211470	translator was actually a little bit smarter than I'd given it credit for. And it was adding entries
1211470	1216070	sequentially and just skipping the entire block. We were basically telling it as contiguous memory
1216070	1220190	was bad. And it was like, okay, contiguous memory is bad. We'll just skip that. So I ended up having
1220190	1224270	to add a randomizer to the script. So it would add random jumps so that it couldn't block it.
1224510	1229030	Even then we found that the list had way more space. We were expecting it to fall over at 2000
1229030	1235890	entries and it usually takes between 4,000 and 5,000 for it to fall over. Um, the drive didn't
1235890	1240910	like being up for a lot of that. If you look at the far screen over there, you'll see the drive
1240910	1245850	powering down in the middle of me doing things. So we found we also had to batch it and give the
1245850	1251450	drive pauses between stuff. And you'll see on the left, that's the screen attached in diagnostic
1251450	1256250	mode. And it's got way fewer entries in it's G list than I was expecting it to have, which was
1256250	1259850	sort of my tip off that it was doing something smarter. I'm a little embarrassed to say it took
1259850	1264430	me a while to see that. I just sort of thought I was doing it wrong or wiring it backward, which
1264430	1272490	happened a lot. All right. So firmware is really weird, was the third problem I personally ran
1272490	1285730	into. What does level six E2 do? Any takers? This creates a user batch file zero. Uh, how about
1285730	1292350	level T, I4, parameters one, you already know the answer. You can clean the erasers after class.
1292350	1298370	This clears the G list. I have no idea how this corresponds to clearing the G list, but it does.
1298930	1307210	And so if anyone ever says this to you. Oh, too quick. Every time you say code is self
1307210	1312370	documenting, God kills a kitten. Yeah. Why are you ruining my punch line? I've been waiting 10
1312370	1319550	years to use this picture for my coworkers desk. So Seagate firmware is extremely non-self
1319550	1324170	documenting and that can be very difficult to work with when you have to rely on partially
1324170	1330130	transcribed Chinese manuals found on sketching FTP servers. The other problem we ran into that
1330130	1334490	isn't really on a slide because I didn't think it needed a slide was that we also ran into
1334490	1339630	differences between firmware, like different behavior, different output. Some commands that
1339630	1344650	we expected output from didn't output in the Apple firmware version. And it took us a lot of
1344650	1350150	headbanging to figure that out. So when you were messing with this, you can't even count output
1350150	1354970	to be consistent across commands, tell you whether something succeeded or not. In some cases, the
1354970	1359110	Apple version just doesn't do anything. If it succeeds or if it fails, you just have to try
1359110	1366310	later and see if it actually did something. So again, that timing issue and why I wanted to
1366310	1373130	automate this because it takes forever. Um, this is just a little graph that Allison made. It's
1373130	1379450	the results of several timing tests recorded. Um, during our attempts at the manual fix to
1379450	1386410	short the points problem. Um, this is from powering on the drive to me hearing, listening for the
1386410	1392610	heads to seek the service area. What's not shown is the timing between shorting the points and
1392610	1398430	sending control Z. Uh, we didn't include that because we never actually got that far. Um, as
1398430	1404670	you can see, there's a huge variance. Um, I think it was roughly between like 4.28 or
1404670	1410750	something like that, uh, up to like almost 6.4 or something. Um, this is only from a single drive
1410750	1416510	and we spent about two hours with zero success. Uh, so this was, you know, we had successfully
1416510	1420430	corrupted the drive by overfilling the G list and here we are trying to figure out, well, how are
1420430	1425050	we going to script this timing issue? And we're still not there. So.
1425050	1433410	All right. So to recap, we had some surprises. There were more lists than we anticipated. We
1433410	1436990	ended up stumbling around trying to figure out which one. The translator was smarter than I
1436990	1445350	expected by actually a fair amount. Firmware is extremely weird. It has differences and the G
1445350	1449110	list was a lot larger than we anticipated, which did significantly slow us down in places
1449650	1453870	because I expected to be able to fill that sucker in four hours and it takes closer to 48.
1457090	1462030	Yeah. Data recovery technicians and professionals are patient when we're working and then in the
1462030	1468750	rest of life, we're kind of assholes, I think. But, uh, some other problems we ran into, um, you
1468750	1473510	know, we're only human. We're mere mortals. Uh, lots of human errors. Software engineer can't
1473510	1477370	hardware, hardware engineer can't software. She crossed wires, I don't know how many times,
1477370	1483210	probably wasted about four hours on just confusing TX, RX and maybe not even having ground in,
1483210	1488870	which I think she did actually kill one of our drives by not having ground in. Uh, and then I
1489290	1494510	failed. I was trying to, you know, use the, her script that she wrote to intentionally corrupt. I
1494510	1499290	didn't read the documentation. So I'm just like, go, go, go. Nothing's happening, Allison. And I
1499290	1503990	went back to manually inputting. That was, that was pretty awful. Uh, I also poked through the
1503990	1509230	PCB when trying to short the points. Um, but it's okay. I have so many of these to play with. Uh,
1509230	1514050	the significant timing variance, um, the command output that we're waiting for in order to verify
1514050	1518190	anything could take between one second. She put six minutes. Realistically, it's like 10
1518190	1522670	minutes. It could be 10 minutes even with really, really expensive, awesome data recovery tools
1522670	1528810	like the PC 3000. Had to wait upwards of 10 minutes with the PC 3000. Um, Pi serial was less
1528810	1535610	reliable. Don't use it on Windows. Um, I'm not the best Linux user at all, but this forced me to
1535610	1545130	learn a lot more and sort of get away from Windows. So don't judge me, please. All right. So
1545130	1549650	where we're at now, now that we've Yammered at you for some background and our experimental
1549650	1554150	progress and emotional journey, we can consistently reverse corruption if diagnostic
1554150	1560990	mode is available. So if you see sim error 111009, we know we can always reverse that. That
1560990	1566570	one works very well. We can consistently corrupt our target drive. So I do have good test
1566570	1572690	environments now. We, so if you want to play with reversing corruption, we can get you a drive
1572690	1578650	that is in shape for that. The unfortunate thing is though, is we haven't been able to
1578650	1585130	reproduce the original target solution on our corrupted drives. Because of the variance in
1585130	1590130	timing and the fact that I don't have a way to programmatically detect where the heads are, I'm
1590130	1595230	not actually convinced that we'll ever really get to a fully automated fix for the original
1595230	1607340	problem. But that doesn't stop us from trying. Ta. All right. So before we show you code, the
1607340	1612060	development philosophy for this project is a little bit different. I generally believe that not
1612060	1616520	all hackers are coders. It's a little bit of a controversial opinion these days in some
1616520	1620560	circles, but I do believe that. And I have met some very technical people in the data recovery
1620560	1626980	community who can't read or write code for, for anything. Like that one. For, not, not that I
1626980	1633600	would be so crass as to name names at a podium while we're being recorded. Anyway. So, this
1633600	1637380	makes my spirit, my hacker spirit sad. And the whole point of this project is that the data
1637380	1647740	privacy community has to, there was not a can of caffeine in that latte, I'm saying. They have to
1647740	1651420	operate with this giant veil of secrecy. Manufacturers are withholding information, a lot
1651420	1656640	of it's proprietary. People who make tools are extremely secretive. The large companies that do
1656640	1662300	data recovery do not share. So, our goal is to make this open. And if you can't read the code,
1662300	1665780	then you don't really know what it's doing and you haven't learned. Code represents
1665780	1671200	intelligence. So, this code has been written with those people in mind. If you are a
1671200	1676920	developer and you are a purist, avert thine eyes because there are fragrant violations of dry, it
1676920	1682100	is over commented from a developer perspective and it is very procedural and it will basically
1682100	1685440	piss off anyone who writes code professionally. I'm okay with that because they're not my
1685440	1690420	target audience. I want people who do data recovery to be able to read it. It's in Python for
1690420	1695240	two reasons. One, because it's the lingua franca of security and it's our poison of choice. But
1695240	1700320	also because in my experience teaching people, it is the easiest type of code for non-coders
1700320	1707080	to understand. It is also GPLV3 because we are interested in making sure this information
1707080	1711020	stays open. There's already a bunch of proprietary and closed stored stuff. I'm not
1711020	1715280	interested in spending my precious free time adding to that. So, if you want to yell at me
1715280	1720980	about the license choice, feel free. Go for it. Uh, please file your bugs with this, this
1720980	1728220	philosophy in mind. It is a little bit different. So, to the meat of it, what you're going to
1728220	1735140	need to implement this at home with one of your pharaoh or moose seagate drives. Um, side
1735140	1740020	note, I wasn't entirely comfortable with this and definitely very used to my expensive fun
1740020	1746160	tools. Uh, but I very much want this to become open source. So, to do this entire thing, if
1746160	1750580	you already have the drive, shouldn't cost you more than 15 bucks. You just need a USB to TTL
1750580	1756860	adapter with the FTDI chip, FT232, access to the ground pin. So, you're going to have to shell
1756860	1763040	your drive. Um, if you have, if you're not using one of the adapters that has, you know,
1763040	1766500	shared power with the host, you're going to need a power adapter. You'll need the code, which
1766500	1771840	you can find on her github. Uh, you'll need pi serial module. We strongly encourage and
1771840	1775040	encourage, well, we encourage you install screen to issue a sanity check to make sure that
1775040	1778980	you are in fact connected to the hard drive and that you can send these commands, that you can
1778980	1783580	cause corruption and reverse corruption. Uh, we also strongly encourage that you'd never use
1783580	1790340	this on a hard drive with data that you give a damn about. Uh, don't. Um, you do have to match
1790340	1796660	it in a very particular way. Um, all hard drives are broken up into these really bizarre, like,
1796660	1801580	uh, families and lots of other things. Um, generally with the, the Seagate Moose and
1801580	1806760	Ferro, match the model number. You can ID it if it's a good drive via the debug mode and I can
1806760	1810460	like, you know, we'll document that somewhere. There's a special command you can send for
1810460	1815080	that. Um, if not, you can kind of go off the model number. Ferro and Moose drives almost
1815080	1819520	always end in something, something AS with the model number. Uh, match the firmware
1819520	1824120	versions because again, this, the exact specific type of corruption we were trying to fix with
1824120	1829940	the shorting of the read points, um, in order to gain terminal access doesn't incur in a
1829940	1835300	couple of like Apple, well, it can occur there, but it's difficult to fix. Um, because when
1835300	1838840	it's seeking the service area and at what points it's reading the service area are different
1838840	1843440	than in other firmware. The Dell specific firmware JC4A, we were never able to get
1843440	1848400	corruption. I don't know why. I don't know if it's somehow impervious to G list overfill. I'd
1848400	1855260	have to do a lot more research to figure that out. This is our set up. Um, that's my little,
1855260	1861160	uh, pin or a read point shorting tool that I, it's just tweezers. And I tried to space them, uh,
1861160	1865760	as perfectly apart to quickly hit the read points, which are in the middle there. And the,
1865760	1870280	uh, it's just solder wrapped around the, wrapped around there trying to bridge it. It's a
1870280	1875220	really shoddy set up and I'm embarrassed by it, I guess. Um, and yeah, those are the read
1875220	1878940	points we're aiming for when we're, you know, right after power on listening for it to
1878940	1882740	leave, uh, listening for the heads to leave. And then, uh, once we actually did reach
1882740	1886440	corruption, because we have done that, uh, I just wanted to verify it in one of my fancy
1886440	1890080	tools. So it took up to the PC 2000 over there. They have these fancy terminal connectors
1890080	1896700	that are way better than, way better than that. Um, much less likely to cause connectivity
1896700	1901560	issues. Um, so yeah, when you're doing this, just make sure that, you know, you're
1901560	1908960	crisscrossing your RX and TX from host to device. Um, it's like honestly kind of a, uh, kind of a
1908960	1917260	trick to even figure out what pins are TX, RX on the drives. Um, so TX is always closest to, uh,
1917260	1922200	the SATA. Then RX right next to it. And then ground is the very last. So we didn't show the
1922200	1929460	power connector. It's there. Please be very careful. Um, there's a lot that you can do to
1929460	1933720	destroy your drive and never get access to your data again. So again, if you're going to be
1933720	1938760	doing this, choose it, choose to start with a drive you don't care about at all. And before
1938760	1942800	you start, very first thing, back up the service area, which yes you can do via terminal debug
1942800	1948540	mode commands. You can save that way. Um, ask me about that later. But definitely,
1948540	1955160	definitely, definitely back up the service area. Alright, so you've got your equipment, you're
1955160	1959260	ready to go. Please get your software installed in order. Remember to give it executable
1959260	1964760	permissions. Hook up the connectors. Double check your connectors. If you're in software,
1964760	1968500	have someone in hardware check your connectors. Determine what port your OS has been
1968500	1974900	assigned. Re-run the scripts. Read the, I'd say read the documentation before you start, but I'm
1975020	1980340	a realist and know that nobody does that apparently. So, before you hit run, please read
1980340	1986840	the documentation because the order of the LBA addresses you enter matters. So, yeah,
1986840	1991540	running this once you get all your stuff and set up and are good to go is actually pretty
1991540	1999520	quick. However, there is one gotcha I do want to mention. So, as we mentioned earlier, some of
1999520	2002720	those re- especially when you get a full G list, your remap operations get really, really
2002720	2008980	slow. And we did see some of the commands to add entries take north of ten minutes to fully
2008980	2015260	execute. So, the script will time out. You'll see received byte zero and the set up you can see
2015260	2022020	on the left that we are actually getting the sectors reassigned, i.e. added to the G list,
2022020	2026960	even though the script says we got nothing back. This is because I went and made T and came
2026960	2032160	back and there was the output. So, be aware that if you see received zero, it's not an
2032160	2037240	indication that the operation failed, it just means it was taking longer than the script was
2037240	2045240	willing to wait. So, don't freak if you see those. Alright, so what's next? This is a
2045740	2050160	shameless plug for help. We would like to try solving the original problem without
2050160	2055840	shorting. We'd like to write it- write some code to configure the translator to rebuild based
2055840	2059960	on the list you specify. You may remember that we have seven of them to pick from. I'm
2059960	2063080	guessing you'll get some different behavior and some different performance if you rebuild the
2063080	2066880	translator with different lists. We'd like to expand this to include other Seagate
2066880	2071300	families or even better, other manufacturers. Could potentially do this with the ATEA
2071300	2079800	commands because they are not specific to Seagate. So, again, long term goal, we would like
2079800	2085260	an open source data recovery suite so that people don't have to spend an arm and a leg or
2085260	2092980	you know, hundreds to up to ten grand sometimes on data recovery. Feature requests, again,
2092980	2098060	our current focus is on translators and defects list issues. We do want to expand to include
2098060	2103080	other solutions and, of course, other manufacturers. Code contributions, just make
2103080	2108400	sure you please keep Allison's philosophy in mind. You know, make this for people that don't
2108400	2114120	know how to code. We would love help testing. That doesn't always include just writing
2114120	2118220	scripts. There's other things that I would definitely like help with and you can ask me about
2118220	2123100	that later if you're interested. Open knowledge about the firmware. All this, again, data
2123100	2126580	recovery is super, super, super secretive. The manufacturers are secretive. Other data
2126580	2132340	recovery companies are very secretive. You know, it's hard. There's a lot of digging. There's
2132340	2137820	some great forums out there. HDD Oracle is one of my favorite. I highly recommend you visit
2137820	2145920	that if you haven't. So, acknowledgments. Speaking of HDD Oracle, I really want to thank
2145920	2149980	Spilled It. I've never met him, but he founded HDD Oracle and he's just a fantastic
2149980	2159140	researcher. He loves what he does and he's not in it to make money. I think that's it.
2160480	2165680	I'd like to thank LeapBunny and the two goons who sprinted over across hotels to get us a
2165680	2171660	projector at T minus five minutes because I don't think I could have done that. LeapBunny is
2171660	2175660	awesome. He's always wearing a green hat pretty much. Definitely buy him food or booze or
2175660	2182820	something. And then bibliography you can find on my GitHub that I never use or that little URL
2182820	2188740	which is totally safe, I promise. And if something happens, find Dean Pierce. He's awesome.
2188880	2194040	Okay. So, we were supposed to take five minutes of questions, but because we got such a late
2194040	2198580	start, we're going to take all of our questions over under the hardware hacking village sign to
2198580	2203820	try to keep this room as on schedule as it is feasible to be at DEF CON. So, thank you all for
2203820	2208460	coming. Thanks for fording the maze. We look forward to seeing you over there to have a longer
2208460	2209420	conversation.
