I'm from the University of Aachen and this will be not a deep technical talk perhaps you might consider that being sucking but but if you want to pass some kernel structures in your mind you can come to me afterwards and we can do that with a beer. This is about hidden data in document formats. Many people assume I'm talking about or thinking about stenography when I'm talking about that but I'm not interested in putting things in. I'm more interested in other people and other programs putting things in without knowing me. Basically the thing is I'm at the university and we have a lot of people working in theoretical security and they discuss convert channels and how hard they are and look a lot into that from the theoretical perspective and the maximum band with the convert channel has and I wanted to look in that from a practical perspective and see how much data is out there on the internet we don't know about when we publish it or when we publish the documents. Just a small demonstration. If I create a word document, a simple one, save it, and then publish that. And then then look at on to it with the strings command I see there's a lot of stuff in it already. For example the text I have written in the document, twice. My full name, the name of the format I used, the name of the word version I used. an email address or something which is looking like that. I have no idea what that means. Some text strings. Pardon? I can try. So, basically, now I can't, wait. Make it bigger, it didn't work. Basically, I did strings on a Word document and there's a lot of stuff in it. It was just a teaser, so not really important information in there. Okay, the problem are complex data formats we don't understand and we're not supposed to understand. The people creating the programs which write these data formats have basically just trust us by our products and use them and don't care attitude. And, even if the people publish the structure of their documents of the data format, we are usually not willing to understand them. If you try to figure out how Microsoft Office documents structured internally, you usually, or probably, will get mad about that. So, in all these documents, they convert channels. Which tools did I use to look at the problematic documents? Mainly, I looked at Word documents, but into some other documents, too. At first, I tried Word document converters, which are meant to convert MS Office documents over to text or something like that, anti-Word, CatDoc, and Word2x. Some of them are not very well maintained. Others are very good maintained, but basically, that didn't work out that well. My first idea was to convert the Word document to text, then use a strings command to find other strings in the Word document and see which weren't covered by the conversion process. That was cumbersome and no fun. I then tried to look more into the metadata. There's something out there called Laula, which is a collection of documentations and Perl programs dealing with binary file formats of Windows. It has several programs in there. For example, something to get the trash section out of Word documents. I didn't know there was one in there. Get metadata in the Word document out there, the structure, and even password resolving. The problem with this Laula is that it was last touched five years ago, and Microsoft Office documents have evolved since then. And it was written in Word. And in Perl, which I consider no fun hacking. So, this was a fun project. I went on looking for things. If somebody really tries to dig deep into the Office document formats, he probably should check Laula because it seems to have a very sophisticated understanding in the OL East teams inside the Word document. Then there's VeeFeeWare, which is used actually by AbbeyWord. And KWord, at least, was trying to put VeeFeeWare as a library into the program to read Microsoft Office documents. The development is somewhat hard to understand. I really wasn't able to figure out which is the latest version and who is developing what, and what is the latest name. Basically, I just used the Debian default. It's a package to test it. It has tools to convert Word documents to text, HTML, and some other formats. And it has tools to read out the meta information in Word documents, VV summary, and VV version. Just a small example of them. Is it big enough for you? So, it's completely unreadable. But, that sucks. The problem is because I didn't took the work to port it over to Mac OS. I did those tests on a Unix machine, and so I can't show it now to you. Basically, it can show you the version of a Word document. The summary, the subject, the author information, all that you put into the metadata of the Word document. If there are comments in there, the template used, the Microsoft Word version, the number of pages, the number of words, the number of characters, if it's encrypted, and which code page is used. Oh, that really sucks. The programs in there include converting to DVI, DVI, HTML, LaTeX, PDF, RTF. Getting this meta information text and so on. And, it actually works quite well. It's probably something like viewing web pages in links or links. They don't look great, but at least you learn what that's all about. Then there's a very interesting tool, Word dumper. Which was done by Richard Smith of Computer Bites Men. And, see. once had it on his homepage, published it there, but now he hasn't, and even in the Wayback Machine, there's nothing to find about it, and at Google, too, not. But if you write to Richard Smith at the Computer Rights Man.com domain, he is willing to give it out. At least he gave it to me. I think before continuing, I'll try to get the screen resolution somewhat better. Is that more readable for you? Not really? Sorry about that. So now we will browse to some examples of hidden data and documents, not only office formats. You are very well invited to shout out if you know of other examples of hidden data. I think that's mostly a thing we just stumble across by chance. It's very hard to systematically research this hidden data in the documents formats. One very obvious way are mail and news headers. I think the average nerd knows about them, but nobody else. And many programs put a lot of stuff in there. The program version, the news hosts used, the mail hosts used, and so on. IP addresses from the machine connecting to the news server. So in Usenet, it was, when I last used it, very usable to Flame people because they were using Outlook. And these people were completely astonished how the flamers could know they are using Outlook because there was an additional header in there. It might be embarrassing if you sell one kind of news, but it's not a whole lot of information to be seen but you can, like, mail software and there's a header from another software in your postings because you used another software a very interesting incident was the biggest germ ISP T-Online which put your customer number into the news headers for abuse tracking or something like that and the fun thing was in the mid 90s your customer number contained your telephone number so everybody got your telephone number who was able to show the headers of your news postings a year ago or something like that they stumbled on that again the germ government passed a law that every home page needs an imprint and T-Online hosting millions of home pages created an automatic imprint service for the home pages hosted there or not service practically you had an imprint put into your home page without you knowing or asking about that but the home pages also could be addressed by the customer number which weren't identical to the telephone numbers now but so you had the posting and the use net and the use net and the use net and you wanted to flame the guy or something like that you just went to the home page server of T-Online looked for the home page related to the customer number by just adding the customer number after homepages.tonline.de and then went for the imprint file which was always called if I remember correctly underscore imprint html and then you had the name and the address and the telephone number of the person doing that posting again people were now aware of that were very, very astonished when they wrote something and thought it was unanimous and then somebody else was posting a reply with an address or telephone number or name of the poster. files. We could consider config files not really documents, but at least it's something which bites us all the time too. The average software has so complex config files, at least Unix software, that you really can't just skim over it and have difficulties to understand what all the options are doing and which options are missing in the default config file. This can result in security issues with misconfiguration, but also in disclosure of information. The prime example is Apache, which is in the default configuration, willfully telling every attacker or whoever else in the HTTP headers which version it is and on which operating system it runs and which modules are in there. You can change that by just one configuration directive, but you have to know. More fun probably is BitchX, which in the default configuration has a message that if you leave the channel, BitchX, before you leave it, posts to the channel, this guy is too stupid to configure his BitchX, or something like that. HTML. Complex programs generate complex HTML. For example, if you look in a file generated by Microsoft Office, it's nearly unreadable for the average guy knowing just somehow HTML. But even less complex programs and less complex HTML contains often information not really needed in there. For example, the meter generator. Which has bitten, to my knowledge, for example, several times, web companies which were using other tools than they claimed they were using, web design companies. And it's surprisingly often that there are still paths to files in HTML pages. So usually, people have these local files in their personal folder in Windows. So the way you build HTML is to make sure that you have it in HTML. And the folder is named Joe Smith Files, so you can deduct the author of the file. Also, in HTML files, there are often comments left by the developers commenting out content which is considered inappropriate or something like that. I have found comments like, this really sucks, we have to redesign it. But most often, the comments are just structuring the file, which is very nice if you are trying to grab content from an HTML page of a news page or so. If there are comments in the, like, news item starts here, news item stops here, news item starts here, news item stops here, that's very nice. It's very, very easy then to grab the content of that page. One of the really fun things were defaced web pages. I think three years ago, people from a tuition org spoke here on their experiences with their defacement mirror. And I thought it was one case, but yesterday I asked them, and they said in one of 500 defacements, there was a defacement mirror. And I thought it was one of 500 defacements. The defaced page, this page was rooted by LeadHexo, contained links to files on the local hard disk of the defacer. And often, there was the name of the defacer in there. Yeah. And there's PDF. PDF looks somewhat open. The standard is documented and so on. But if you ever have tried to write a PDF parser, it looks much less open. And Adobe is all the time extending it and putting the latest and greatest stuff in their own applications. And after that, start documenting it. One of the main problems is the problem of censorship or redaction. If people use PDF files to blacken out things you shouldn't know, that usually doesn't work. Incidents with PDF. PDF files, there's a very famous sniper letter, which was in the Washington shootings. There were these letters left by the sniper. And the Washington Post published one of the letters and blackened all the information which wasn't for the public. For example, the number of the bank account where the money should be sent. It was very easy to just remove those black bars and read the money of the bank account and so on. Then there was a report on the labor conditions in the Justice Department. And again, they blackened very much on that. And it was very easy to remove. And very famous was under the Freedom of Information Act, people had gained access to a paper describing the actions of the CIA in the 50s in Iran. And half of the document in certain places was blackened. And this could be removed again. So how can we exploit that in PDF? In many instances, it turns out that the data was hidden by setting the background color of the text to black. And the text was black. We still then could mark with Adobe Acrobat standard the text and copy it. If the text is a graphic because it's scanned in, we can copy that. Or we can copy it and put it somewhere else. Or if there are black bars overlaying graphics, we can just cut them. People usually they think PDF documents are not that editable, at least if you have found the line of sword,. But if you're willing to share out all the money to the whole Adobe Creative suit, you could cut this. basically can do every manipulation on pdf file and pdf is just another vector graphic format for you um so that what you can do about pdf files really boils down how much money you are willing to shell out to adobe a demonstration of that so this was a diversity analysis by kpmg for the department of justice and let's see here's some blackened text and if i go now for select text and just select it yeah that's a a little bit difficult here because the text also is a link. So, copy, use a random text editor. No, not this. And that is lost formatting, but okay. So, the next demonstration as well will remove the image under the blackened bars. That is a sniper letter. Again, just Acrobat standard. I think that's the original version like it was put up by the Washington Post. And you see select text. I can select this text, but not the other stuff because it's a graphic. So, I go for select image. Select that. Copy. Go to another program. New graphic from Clipboard. And that is. I wasn't able to remove the black bars from a document with actually Acrobat, but with Adobe Illustrator, this is no really a problem. Okay. Since Illustrator is not for layout, I only can open a single page. I'm pretty sure that with InDesign, I can work with multi-page PDF documents, but I don't have Adobe InDesign. And I think it would be wrong to steal it. So, you obviously see there's a scanned text. And the black bar is a vector graphic because it's so sharp. I can mark it, move it around, and kill it. So, I was really astonished about PDF, and by far, I had the most fun with PDF documents. Sorry. Deleted. Dealing with MS is not that much fun. The Office document format I set above is incredibly complex, undocumented. I think they documented the version of Office 2000 or so, but it's a terrible mess and ever-changing. And it's well-known that it's full of unwanted data, but I think nobody knows what's exactly in there. I think the first time there was public discussion was in 1997. I think the first time there was public discussion was in 1997, where it turned out that the every Office document has a general Anik ID, a GUID, of the author. And this GUID also contained the MAC address of the machine creating the document. And this was one of the factors which helped to find the author of the Melissa virus, because it was a Word macro, and therefore a Word document. And I think it was also used in convicting him. Microsoft found out that it probably is not a good thing, or at least I thought it was falling to the public peasure and gave out a patch to remove this UID from documents, but also a patch to patch Office 97 to not put it in again. So there's some news. from CNET, Microsoft admits privacy problems and plan to fix it. Shortly after that, Richard Smith found out that there's also the history of the last 10 file names this document was saved to, looked into the yearly report of Microsoft, and found out that it was created on a Mac, because Mac uses colons to separate path names, and Windows machines slashes. You can be pretty sure if you see a Mac file name. And Jerry Lay's G3 desktop folder really looks like a Mac. A nice thing to note, if you can read it, in one of the lines of the middle, the Microsoft yearly report was also saved in temporary items auto-recovered. So probably while editing it, their own program clashed. Okay. But Microsoft plans to fix the problems. So for Word 97, there's a knowledge base article, how to minimize metadata in Word documents. That's good. Oh, they haven't fixed it in Word 2000. How to minimize metadata in Word 2000 documents. Oh, but the future's there. The next millennium. How to minimize metadata in Microsoft Word 2002 documents. And you saw it coming. How to minimize metadata in Word 2003 documents. The Office suite for the Mac is now Office 2004. I think there's no Windows 2004 version. I wrote them, and I hope there will be a knowledge base article shortly, how to minimize metadata in Word 2004. So what's in there? We don't really know, because the document format is not well documented. But if you look into the how to minimize metadata document, there's how to remove your username from your documents, how to remove personal summary information, how to remove personal summary information when connected to a network, how to remove comments, how to remove headers and footers, how to remove revision marks, how to turn off fast save, how to search and remove text format that's hidden, how to remove hyperlinks in documents, how to remove styles in documents, how to remove old file versions from documents, so they are in the document too, in the same file, how to remove links to file codes that are specific, specific to the machine the document is added in, how to remove the template name and location, how to move routing slip information, how to remove the name of the previous authors, how to remove your name from the visual basic code, it's in there too, how to remove visual basic reference to other files, how to remove network hard disk information, embedded objects in documents and may contain, may contain metadata, document variables may contain metadata, and general suggestions about security. That sounds like a whole lot of stuff in the Word document. I'm very unhappy I wasn't able to find all of that because I used only very crude tools to analyze Word documents. Some famous incidents with Word documents, probably the most famous at last in Europe is the US-K Iraq dossier. Then that was in Germany and very interesting thing where it basically came out that they made up numbers for a huge planning project. And the thing with the Melissa virus I've already told they, that they caught the Melissa virus by looking for the UID of the original posting of the virus. This is a Iraq dossier. Basically, in Great Britain, the British government published a dossier that Iraq is so dangerous and has weapons of mass destruction and is going to bomb the whole world in the next week if they don't start a war. Probably you know similar stories. But the document about that they put on the web contained this autosave information, and the path of the file hinted very strongly to the names of four people. And so it turns out that basically the document was a spiced up version of a more or less internship project of somebody in the foreign ministry there. I think that nearly this thing is still going on, and I think it's at least... It's nearly coasting the British, what is it, president? No, not taxpayer, Tony Blair. Prime minister. Exactly, his chair. The other document was in Germany, there are several huge projects underway. For example, the Germans have this very nifty magnet levitation that is a very complicated high-speed train, but nobody wants to buy it. And so they want to use it themselves, use their own dogs, eat their own dog food. And there was a study saying, oh, if you build this thing to the Ruhr area, we will make shitloads of money by that. And they published a document on that, and basically, if you went back in the edit history, they say that you saw that they added a zero. They added a zero to all the income, and removed the zero from all the costs. Other documented incidents include that there was text from a completely unrelated document in another document. So somebody that was posted on the risk digest edited the document, saved that, closed the file, created a new file, wrote something in that. And in the new file, if you looked there with strings or something like that, you saw that there was a text of the first document in there. And that is this edit history. Data deleted from a document or which is overwritten appears in the file. So to some other format which looks so nice and so unproblematic. But image formats usually contain at least a comment field. And these comment fields are not used that much. So most imaging software puts its own name in there, created by the GIMP, for example. And that might bite you in the butt, too, if you are selling some imaging software and there's something in there that's created by something else. That's as a comment then. JPEG itself has an extendable header format for adding metadata, like camera type and exposure and color calibration information and thumbnails. And there was a very remarkable incident with X of thumbnails in JPEG documents, which is quite juicy. Some moderator put some picture of herself on her web log. And the picture was created by cropping the original image. And the problem was the original image still contained the, the thumbnail still contained the uncropped image. Which is really, I wouldn't have thought of that, checking my thumbnails before putting out my images. Other things in document formats. I think very famous was the stock. In the Star Report, which was created in WordPerfect and then converted several times. And in the Star Report, as published first, several footnotes turned up, which were deleted before and came up in the conversation process again. And were along the line, here this dumb ass is probably lying or something like that. Very, very many document formats. And that serial numbers, so the serial number of the software you used to create the document, are guids again. Then there are, in the document sometimes, especially with shareware, is information that the software you were using is unregistered. That may be in a mail header. That may be in a footer where you see it. But in complex document formats, it might be anywhere. You really don't have any idea if you don't know the document format. Another example is Adobe InDesign puts a list of all the fonts you have installed on your machine into the documents. And if you are a print shop or something like that, you're probably very heavily into font-verse trading. And having a list of all your wares in every document you give out is a problem. So I really wanted to know what's really out there. I think writing a document in Word, saving it and looking for the things in there is not that interesting. And I don't use Word that much. So I went out to the internet and tried to get as many Office documents I could get. I crawl to web. I have a tendency to writing web crawlers. So basically, I was like the director of the first Blues Brothers film. Yeah, I have this film with this guy. And then I have a car chase. And it would be so great. And I'm like this car chase and car chase. And then there are these guys. And then I make again a car chase. Oh, I make something about documents. And then I write a web crawler. It would be so cool and so fast and not multi-threaded but unblocking. So I spent most of my time writing the web crawler. You can get it from my homepage, the recent version. And yeah, originally I wanted to hack all this Word document parsing tools. But there was no time because I had to spend all the time writing the web crawler. And my Office machine now in the university has a very juicy internet connection. Basically, I can really do 5 MBit to the internet without a problem. So writing a web crawler was really fun this time. Before I always had to do it from my home DSL line. Okay. So download the documents. And then have a short look on the documents. Save them. And save them on a DVD for further research. That was at least what I did. It was not what I had in mind when I started the project. The really problem is how do I detect the data in Word documents? The strings command is a help. But with Unicode, it doesn't work that nice. And if there's some binary or compressed data in that, for example, that thumbnail, I have no way of finding the stuff without knowing something about the document format. While I was writing my web crawler, some other guy published a document on that in the IEEE Security and Privacy. And here's some interesting results. You can Google the document. You can find the title of the article and find it on his home page. He basically refrained from writing a web crawler. He just used Google to find the documents. And so he had some time to look at the documents. But when looking at the documents, he took a different approach. So probably I have to contribute something to that. Okay. Crawling the web fast is fun and hard. I think I told that again. My actual crawler used for that is called Lens 3. The first one, Lens 1, was actually a crawler for gopher space. So it goes far back. And I used it for directed crawling, testing that. So really hunt for Word documents and not trying to get all the Internet. Yeah, you can get it at the address down there. Core 23, new code. Lens 2. I think it is there. I wasn't able to check because the Internet is somewhat difficult here. I think there are FETs tapping all the lines. And that's why it didn't work. I think hackers wouldn't break the Internet. When I found out that I spent too much time writing my own crawler, I tried another approach, Neal's Provost Crawl, which is not doing directed crawling. But if you want to do fast and simple downloading of Word documents and don't care about bandwidth and nice code, just grab his Crawl thing and apply a patch. Again, at Core 23, new. Which Crawl originally was built to spider for JPEG images, not because Neal likes porn so much, but because he was looking for steganographic data in there. Yeah? That's a zero for sure. That's a lead group. You know, there are this core SA people which are not that lead obviously because they don't have a zero in there. Yeah, and at least Neal's Provost thing was fast, if not efficient. And I think all in all, I got about 150,000 documents. I have now laying on my hard disk and see what to do with that. I used search engines, the result pages of search engines to feed them into my own crawler and then the crawl crawler. So I used random words and document type word document in Google and other search engines and the result pages I saved and used the URLs in there to start the crawlers. I saved all documents, with the mime types. Yeah, you see them. It's very interesting. There seems to be no standard for mime typing MS Word documents. And even if there was no Microsoft Word or Office specific mime type, I saved the files if they were named doc, ppt or xls. With the PowerPoint files, I really hope to analyze them later for speaker notes and hope to find some juicy details in there. So I collected, yeah, I told before 150,000 Word documents and basically I just used all document converters and document information finders to batch run, to batch, in batch mode on that and skimmed the results saved to a file by hand and by my eye. Yeah, while writing a crawler, which is a very interesting thing, I saw unbelievable misconfigurations of web server. I think the funniest one was status code 226, which makes no sense in HTTP but in SMTP. So I had seen a web server thinking it was a mail server. So, can you read that? Oh, that sucks. Okay, I used the tool by Richard Smith, WordDump, he sent to me. And this is a document by MS Office 3000, which contains very, very little information, or at least WordDump, which stopped being developed, I think at 99, can't pass it. For example, to go back, WordDump reports the document as created by Word 97, build date of the file, 8th of April, 2003. Some other document is created by MS Office and it contains still this revision log, so the last 10 file names. This is an example for a document which has the GUID in it, which is created by Word 97 tool, or at least the Word version being built in 1998. The GUID is the thing in the fifth last line or something like that. So this is a very interesting document because of the five times it was saved, of the 10 times it was saved, five times it was saved with the name auto-recovery. So probably the guy using the machine to edit this document has a machine which is crashing very, very often. If this is from a computer shop, you probably don't want to buy your computer there. This is a very interesting document I found on the OECD website, which is an international organization, and it seemed to be, I never really looked into the real document, it seemed to be a protocol about a session they had, and it had 71 revisions. So while I don't see only 10 names in the Word document, that at least saved the number of times it was edited. And this document was edited 71 times, and you wonder, a protocol of a meeting edited so often, have you changed it afterwards? It's very strange. Oh, here we have again a case of many auto-recoveries. I think that was that with the Word document. Examples. I had another one, which was very nice. The document started being edited on a Mac with the name Customer Files Letterhead 1. And then this was iterating the names until it was information brochure or something like that on a Windows machine. So obviously you could see the whole odyssey from the graphic designer to the people using the documents afterwards. So the conclusions. You never know what is there in proprietary file formats. And for example, the Microsoft Knowledge Base article had so many hints on further information in Word documents and how to remove them, and I wasn't able to find them. So probably if you have some time at your hands, try to parse all these proprietary document formats, write parsers for them, and spider the internet, I can send you a DVD with 100,000 or 150,000 documents, and see what's in there. Open formats are only part of the solution. For example, Keynote, with which this presentation is done, saves its presentation as an XML file. But this XML is so complex, you really don't know what's in there. At least if you don't spend your whole time in learning the format. And spider the web, look for interesting files on other people's pages, and enjoy what you find there. So, are there questions? Yeah. Auto-recovery. Yeah, sure. Not only the file path, the file name, but the whole thing. The whole path, which usually contains the server name, and so on. Yeah, you're right. If you want to, I still have a bonus track, and I think I have another five minutes. The goons are far away, they at least need five minutes. Okay. At least for PDF, there is special software already to scrap them. I forgot the name of the software, but I found the demonstration on the internet. You have a PDF, and you mark what you want to be gone, and then the software not... Oh. Removes it. The software not only puts black boxes there, perhaps in the image, I don't know, but removes the real letters and exchanges them with minus signs. If you want to go a step further, perhaps it should be mentioned that Microsoft is also offering a plug-in now to scrap information from MS Office documents, but who knows what to scrap and what not, but you at least can try to use it. If you want to go a step further, people have long discussed if there's another hidden information in documents, just by the kind you want to use. That's quite the way you build your sentence, the kind of words you use, and this was discussed a lot in the cypherpunk community, if you can find the author of an anonymous posting by just machine analyzing this posting and comparing it with others. And Dave Aytel did a program, Umask, I think it's a very bad name, naming a program like a Unix system call, a Unix system shell program, but this is, to my knowledge, the first implementation trying to implement that. You have a group of text files, you say they are from the same author, and Umask can generate a fingerprint of them, and then you can compare that fingerprint with an unknown file. I think I can present that. So you're still unhappy with the font size, I guess. Okay. Can I ask a question while you're doing this? Yeah, sure. Is the concept of Umask actually a very old concept? Yeah, but I'm not aware of any implementation of that up to now. Well, the reason why I ask is, I mean, it's something in my history about myself. You know, a lot of people say that William Shakespeare didn't write his own works, and what they did was they actually developed the software to analyze the text of Shakespeare's works versus the text of other men authors in that period. And that's why I mentioned it. Yeah. Yeah. Yeah, I think this guy wrote a book, Author Unknown, about the Shakespeare thing and how he found the author of some anonymous book about the election, the Clinton election. But to my knowledge, it was just mainly not a fully automated process, but it was just a tool helping him with manual analysis. And to my knowledge, you could use this program by Dave Atle to completely automate it, for example, use Usenet. I am seeing I have less than two minutes. You might just believe me that I fingerprinted some text by Dave Ahmed in this file, Dave Ahmed PKL. And now I run it against a text file, which is just by the same guy. And now I have the match value of 275. And if I run it against a file by somebody else, I get a much, much lower value. And since this is no digital thing or no binary thing, same author or not, this value might even help me to find out if a writer is from the same ethnic group or something like that, uses the same words and constructs construction of sentences. You can Google for this program. Just search for Dave Atle and you mask. It's very, very raw and very undocumented, but I think it's very interesting to toy around with that. Or buy this book Author Unknown. So thank you very much. It was a pleasure.