start	end	text
0	4760	Our next speaker will be talking about Scrubber, an open source compilation to protect journalistic
4760	8120	sources. Please give a warm welcome to Ethan Gregory Dodge.
12250	19570	Thank you. Thank you. I am super excited to be here at the Privacy Village, Privacy Crypto
19570	24290	Village. It's one of my very favorite villages and this is my first time speaking at it.
24510	28330	Yesterday, or the other day, I told a coworker that I was speaking at the Crypto Village
28330	31210	and he's all like, do you know anything about crypto?
32170	39530	So, not talking about crypto today, however, I'm talking about privacy. And let's jump
39530	45970	into it because I only got 20 minutes here. So, I'm Ethan Gregory Dodge. I was born and
45970	50850	raised Mormon. That has nothing to do with this topic because it's from another slide
50850	56050	deck. But I'm a digital forensics professional and I am a journalist. I'm the co-founder
56050	59730	of the Truth and Transparency Foundation. And the Truth and Transparency Foundation
59730	63470	was originally called Mormon Leaks, which is where my Mormonism comes into play.
65050	70690	And we are essentially a nonprofit investigative newsroom dedicated to empowering the disenfranchised
70690	78330	by promoting transparency within religious institutions. So, essentially, we get documents
78330	85750	from anonymous sources all the time. And I'll tell her story in a second. Well, actually,
85750	90930	let's just jump into it. Anyone know who this is? This is a picture of? Who is it?
91510	120250	Reality Winner. And what happened to Reality Winner? Right. Right. Yeah. Yeah. So, essentially,
120250	125590	what happened was she leaked a document to the Intercept and she printed it out. And
125590	133330	the printer had left a fingerprint or a watermark that was nearly invisible. And
133330	137730	she scanned it in and sent it to the Intercept. And the Intercept didn't know about it. And that
137730	143950	fingerprint revealed the printer and the time that she had printed it out. And then the NSA
143950	149430	was able to go camera and see who was there at that time. And she got caught. And she's now
149430	157910	serving time in federal prison. So, this is an incredibly important topic. And so, as a journalist
157910	163170	and as the technical director of the Truth and Transparency Foundation, anything technical and
163170	168290	security or anything like that falls into my bracket. And I was spending a lot of time
168290	174050	cleaning and compressing and optimizing PDF documents. And I would script it out little
174050	181690	by little. And we launched in 2016. So, we're coming up on three years of doing this. And
182690	190790	it was extremely tedious. Even the more when I scripted it out, it seemed like I found a
190790	197290	brand new attack vector that I then had to account for and everything. And anyway,
197930	204890	if you look back at our history, we actually released a ton of documents related to the
204890	211550	Jehovah's Witnesses. And the source literally just gave me a hard drive of documents. And this is all
211550	220550	public info because he has admitted to doing it to the press. And it was tens of thousands of PDFs,
220550	226790	so I was like, fuck, I need to automate this. I'm not going to do this. And so, that's where
226790	236590	Scrubber came into play. It leverages several tools, PDF tools, OCR and QPDF to clean OCR and
236590	249050	linearize PDFs. The actual code that's cleaning the PDF of the excuse me. The actual code that's
249570	256590	metadata from the PDF and watermarks and stuff like that is in PDF tools. OCR, my PDF, I'm just
256590	262670	using it to put the text layer back. And I'll go through exactly why I need to put the text layer
262670	269710	back. And then QPDF linearizes it. And linearizing PDFs is important if you're going to serve them
269710	274670	over the web because what it allows you to do is it allows the browser to load one page at a time
274670	280850	as you're scrolling through it rather than loading the entire PDF all at once before you
280850	287490	can view it. And sometimes, like, we released PDFs that are hundreds of pages, right? And after
287490	294190	this process, the PDF does get a little larger than your typical file. So, linearizing it is
294190	301990	important for us. And essentially, Scrubber is just a bash script that's tying all of these
301990	306830	tools together and automating the process that I've been doing manually for quite a while.
307690	315810	So, it turns every single page into a PNG using PDF tools. PDF tools was developed by Micah Lee
315810	323930	from the intercept. And since the reality winner case, they could have gotten past that by
323930	331970	converting the PDF into a black and white image because the watermark was so light that it
331970	336250	would have been registered as white when you turned the PDF into grayscale. So, PDF Redactools
336250	343290	has that option to be able to get around that. You can also, so, it turns every single page into
343290	349330	an image. And then if you want to, you can pass it a flag and it will stop in the middle after
349330	354910	it's turned the pages into images. And then you can open them in GIMP and redact them wherever
354910	360290	you need to. And then you can run it again and tell it to merge all the pages. Combines them
360290	366930	into a PDF and stripping any embedded image data. If you were to go to Google Docs or
366930	376430	Microsoft Word and put a JPEG or PNG into that document, you, and then you just download it as
376530	382790	a PDF, you could then extract that PDF and potentially get the, extract that image from
382790	390270	the PDF and get the metadata that can potentially be identifying and incriminating. So, what this
390270	396910	does is it flattens the entire thing into one image and gets rid of that attack vector. And
396910	403790	then it, because, because it, we turn it into images and then we put it, made it a PDF again,
403790	409690	we have to add the OCR layer. And what the OCR layer is, it's what allows you to copy and paste
409690	416170	from a PDF. It's the text layer, right? And so, OCR, my PDF leverages Tesseract. It's an amazing
416170	422150	tool and it's funny because Scrubber is actually like a wrapper around several other wrappers
422150	426050	around several other tools, right? So, we're getting pretty, we've got wrappers on wrappers
426050	432890	on wrappers here. But, and then OCR, my PDF will also handle compression, which is super nice and
432890	438270	make it, make sure that you're getting the smallest PDF size that you can while still
438970	443990	getting a pretty decent quality. Sometimes you are going to have to sacrifice quality
443990	451430	for, for size and whatnot, but, but that's just the name of the game. I mean, they're,
451430	456450	they're always still readable, right? And that's the important thing. And then QPDF linearizes it
456450	460330	for optimum web browsing. Like I said, it allows your browser to just load one page at a time
460330	465290	rather than the entire PDF. And then this step is not necessary, but because I'm OCD,
465290	473870	um, I still remove all, all the meta, the PDF metadata using Exif tool. Um, like I said,
473870	477030	you don't really have to do that because the meta, the metadata that is in the Exif data
477030	486370	that's in there is, um, generic to, and, and unique to this tool. Um, so this is, um, this
486370	490850	is the best part about it, in my opinion, is I've dockerized it and you, and because of that,
490850	495590	you could then run it on any operating system. So, um, essentially I'll go through, I'm going
495590	502250	to do a demo here in a minute. Um, but you, you can clone the repo, run the scripts and it will
502250	506630	pull the docker image down from docker hub. Or if you want to build the docker image locally and
506630	511170	you don't want to, um, you don't want to risk your operational security by pulling down from
511170	515570	docker hub, you can build it locally and then it'll, and then it'll run it to building locally
515570	520410	does take forever because it's a huge ass image. It's like one and a half gigs. I'm
520410	525510	going to work on decreasing that, but that's, that's where it is now. It takes about like
525510	530050	anywhere from 10 to 30 minutes, depending on how fast your network connection is.
530650	537330	Um, and the, and the, and your CPU processing power. So essentially you run a script,
537330	542450	scrubber.sh, it then, uh, it either pulls down the image, the docker image from docker hub,
542450	548010	or you build it locally, uh, starts a docker container. It runs PDF, redact tools,
548010	552550	OCR my PDF, QPF and XF tool, and then it spits it out into an output file.
553270	559590	Um, so the benefits of scrubber is you can run on any, uh, uh, on any operating system. Thanks
559590	567130	to docker, even windows, um, caveat, I've never used docker on windows, so I, uh, that I don't
567130	571030	know how hard it is to get installed or anything, but from what I understand, it's, it's pretty
571030	579750	simple. Um, and, uh, it can handle large PDFs. Um, I have, so PDF redact tools actually leverages
579750	586050	image magic to turn, uh, to turn every single page into, uh, into an image. And if you're
586050	590530	doing large PDFs that can get, that can take up your memory quite a bit. I have it programmed
590530	594910	to take up to four gigs of memory. You can, you could change that up if you need to,
594910	600470	you would just have to rebuild the docker image locally. Um, I have 32 gigs of RAM on my laptop,
600470	605630	and so it's not a huge deal, right? So, um, but, and, and it, and the reason why I have it going
605630	611550	up is, is because, uh, thank you, is because I have, um, like I said, we've released PDFs that
611550	615810	are hundreds of pages and turning images, hundreds, hundreds of PDF pages into images
615810	623010	takes a shit ton of memory. Um, and then, uh, it provides just a one-stop tool for cleaning
623010	628050	and optimization, right? That was the biggest problem is that like, all right, I can use this
628050	633170	tool to clean it. And then I got to use this tool to optimize it. And I, and, and I got to use this
633170	637950	tool to, for a long time, I didn't even know what OCR was like, to be completely honest with you
637950	642750	guys. Um, and I was like, why isn't the text layer in there? And I just, I had a naive understanding
642750	650910	of PDFs and, uh, and anyway, so I, I really like where this is at because it, yeah, it, it takes
650910	656970	the PDF from its state that it got, that we got it from the source and then cleans it and then
656970	661510	optimizes it for publishing on the web. Um, it also supports batches of PDFs. If you just give
661510	668750	it a directory, um, of PDFs, it'll go, it'll go through, um, and, and chain and clean and optimize
668750	675330	every single one. Um, that's the, that's the URL where it's at github.com, truth and transparency
675330	684370	slash scrubber. Um, and let's do a demo really quick here. I recorded the demo, so don't worry.
687110	693910	You're going to see my cat in this demo. All right. So essentially there is a PDF, like I was
693910	701390	saying before, that PDF was just, uh, it's got an embedded JPEG of my cat, Lisa. Um, and, uh,
701390	706290	right, right here, what I'm going to do, um, oh, I'm sorry. You can't really see what I'm doing
706290	710970	there, but when I put it on YouTube, you'll be able to see it a whole lot easier. Um, I'm
710970	716690	extracting that, that image of my cat, um, and, and then seeing that the exit data that was in it.
717070	722850	Um, and then what I'm, um, and then I'm showing you that it extracted the single, the single
722850	728570	image, and it also extracted the truth and transparency logo as well. Um, and now I'm
728570	736010	going to actually run scrubber on that. Um, one thing to notice here, um, you can't really see
736010	743290	it, but I'm actually passing it, um, the, the full file path. And that's a mistake on my part.
743370	748110	Um, it doesn't support relative file paths right now. That is the first thing I'm going to fix
748110	752710	in my rush to get this out. I totally forgot to take that into account. Um, don't worry. I
752710	757350	already have an issue open on GitHub to take care of it. So anyway, so now it's going through,
757350	761950	you can see this says running PDF for DAC tools, adding the text layer with OCR, my PDF,
761950	766370	optimizing it for publication and removing the excess data. And then, uh, it says your final
766370	770650	output is here. And then right here, I'm running, I'm going to try and extract the images again.
773770	780450	If I could actually type it. So runs the command and it did extract an image, but you'll see
780990	786610	that the image that it extracted is actually the entire PDF itself. And the it's, it's, it wasn't
786610	791250	able to extract it. And then that's the actual clean version. And you'll see that that's me
791250	795170	highlighting the OCR layer and you will see, um, let me back up a little bit. You can kind of see
795170	800010	in, in my cat's ears here that the quality was kind of compromised a little bit, but, um, it did
800010	806670	its job in, in the case of like, uh, being a journalistic source or anything. Um, you just
806670	814730	really kind of need the text and whatnot and get in convey the, uh, the point. So, um, uh, that's
814730	819890	all I really had. Um, I'm seven minutes early, but I will take as many questions as y'all got.
819890	827990	If not, that's fine too. Yeah. All right. Thank you. Thank you. She's got a mic coming for you.
830090	841040	Do you mind coming over here? Sorry, I was just asking if you could put the contact slide back
841040	851620	up real quick. Yeah. My contact slide? Yeah, for sure. Uh, where did it go? Um, just to, as
852090	856800	you'll see down here, I actually have the roadmap listed and these are things that I want to fix.
856800	863160	And the number one issue is account for relative file paths. So let me pull the, um, the, uh,
863160	869820	contact screen back up here. There it is. Yes. Hello. Uh, so can you talk a little bit about
869820	874220	what you do for other file types? Like if you get a PPT, do you try to convert everything to PDF
874220	879690	and then run this? Yeah. I typically as a, as a rule of thumb, like even if I get like a JPEG or,
879690	883370	some sort of image file, or like you said, a PowerPoint presentation or something like that,
884050	889650	I'll convert it to PDF as best I can without affecting the contents of the file. Sometimes
889650	894330	that can get a little difficult and we have actually released like the raw PPT. But the
894330	900230	reason why we avoid that is because there's, it's way harder to scrub, uh, an office document
900230	910110	because Microsoft is terrible, but, um, so, and well, and to, to be fair, PDF is an awful file
910110	915710	format as well. Right. There's so many, I mean, and the huge disclaimer, I have this in the read
915710	922250	me. This is not a silver bullet by any means, right? I like, do not expect this to completely
922250	927330	protect your sources. 100%. There's always a potent, there's always a possibility that they're
927330	933010	going to, uh, to be identified, but this is definitely a really, really great place to start.
933450	941270	Yeah. Do you have any plans on, uh, uh, getting it included in like the Debian upstream repos so
941270	946210	that it could be used in something like tails? That would be awesome. I have not thought about
946210	952130	that, but I know who to talk to, to, to see if that can happen. So that's a good idea. Thank you.
953630	960450	So this great presentation and thanks for making this tool. So I could imagine that one response
960450	966850	to proliferation of tools like this will just be slightly more insidious, I guess, watermarking
966850	972310	kind of patterns and images and things like that. So is there, do you plan to support an option
972310	978210	that's maybe like, I guess you'd call it paranoid mode that basically just extracts, you know,
978210	981810	black and whites, everything to prevent encoding and images, removes images,
981810	985810	and just tries to keep the text and like... That's a good idea. I get that would be really
985810	991010	easy to do. Um, that's a great idea actually. Um, I can definitely do that. And if you want
991010	995490	to help me, I would definitely, that's, I would definitely welcome help on this. That's the why
995490	999930	I open sourced it. Feel free to submit poll requests. Um, but yeah, great idea. I'm definitely
999930	1007670	going to think about it. Thank you. Hey, so it's a really cool tool, but I wonder in
1008150	1013290	scrubbing the file, don't you incidentally also remove authenticity of the file to verify that
1013290	1019230	it's real? Uh, yeah. I mean, that's the part of it. That's the job of a journalist, right? Is to
1019230	1023690	verify its authenticity. Um, I mean, and it, and it, I guess it comes down to, do you trust that
1023690	1029070	journalist? Right. I mean, there are definitely people who claim to be journalists that I wouldn't
1029070	1035950	trust right away, but like, um, I, and this is, this is something that we get, that we get asked
1035950	1041090	about all the time is how we, uh, verify that the documents are authentic. Um, and that's not
1041090	1045250	something that we talk about, but it is, that's, that's the job of the journalist and just whether
1045250	1054210	or not you trust them. So great question though. Hey, can you put that GitHub link up back up
1054210	1059310	again? Yep. There it is. Oh, thank you. Yeah. And, and back to a really quick to your, to your
1059310	1067290	other question too, is it's also the journalist's responsibility, um, to, to disclose, to, to, let's
1067290	1073230	see, what's the word I'm looking for? Um, inform their reader that they are positive that it's
1073230	1078710	authentic or, and if, and if they can, without risking sources to, to disclose some, like there
1078710	1084430	have been instances in which we, um, have disclosed how we verified it, um, because it wasn't a risk
1084430	1087850	to our sources and stuff like that. And, and journalists should do that where they can, in my
1087850	1092630	opinion. Uh, again, I will caveat it with this is I'm not a professional journalist. I do this on my
1092630	1098830	side. I try really, really hard to, to do stuff up to a professional caliber, but, um, but yeah,
1098830	1106410	thank you. All right. Any more questions? All right. Thank you. Thank you.
