Forensics on Headerless Encrypted Files

This lecture explains the forensics regarding privacy issues of encrypted file archives and demonstrates the usage of headerless files with CrococryptFile.

In this lecture, we will take a look on headerless or cloaked encrypted archives. headerless files in Cracow file are encrypted using password based encryption. And I will show you now why that is. First of all, let us create two encrypted archives using the password based encryption you already know that I use a single file here doesn’t matter it would be the same for archives using multiple files. So I encrypted this file this image called desert and I will call this now v v one and I will do it a second time. You will get an A minute while I do this. Because at the end, if you don’t know what headless means, you probably don’t understand the forensics behind looking at those archives, I will now open these two archives in a simple editor. So far one I put in here. And for comparison, file two I put in the second one. And if you now look at these two archives, which contain the same plain file, you will notice that you see equal bytes in both files. So we’ll mark the bytes in this file. You can see them after that, if you would even compare it with an hex editor. There are no equal bytes. This equal part is simply the file header, meaning you find the magic number of corporate grib file and corporate file knows which kind of archives Especially which kind of crypto provider was used for encryption, I will now jump to the end of the file to show you that there are no matching bytes even at the end of the file. So there you go. So I want to highlight that even the same plain file is used to encrypt these archives, you can tell from the encrypted files from the encrypted archives that they have matching content. This is because of the crypto parameters we learnt in the introduction are different. Even so the same password is used to encrypt those files. I will go up again, without the header, these files would look like a collection of random bytes. You can see any pattern in these files. So if I would just remove the header here, you would not be able to tell what kind of file that is. Of course the file extension gives a good idea, but if you would rename the file and remove the header, you wouldn’t be able to tell what kind of file it is. And this is exactly the idea behind headerless or cloaked files. So let’s create a cloak file. In this case, it’s also using not only a AES for encryption, but also to fish. So it’s a cascading encryption. Again, it works password based. So I have to put in my password here because it’s using cascading encryption with two encryption algorithms. It takes a little bit longer to encrypt it. And as you can see, by default corporate file isn’t using any file extension. So I call this now cloak one. And if we now compare this, again in this editor to the one of the other files we’ve used before, you see that the standard header isn’t there anymore. And again, we are encrypting a second time Again, head Ellis. And I call this now cloak true. And let’s see. Let’s compare cloak one and cloak. Two. And as you can see, there’s not only no header, but the files are completely different. I can jump to the end and believe me in the middle, it’s the same. You won’t find matching bytes or matching bytes would only be there by any chance. Don’t get confused by the way by the line numbers you see here because the editor breaks by any line break a new line. And since these bytes random bytes, there might be a different number of lines but it doesn’t mean that the files have different sizes. As you can see, they both have the same size. And now you know why cloaked files have to be used with password based encryption. Because when you use the public key based approach, you have to put in some recipient information, which public key has been used to encrypt the file. With password based encryption. All the password to key derivation parameters are random values. The iteration count would be a simple integer, but it’s not stored by croco crypt file. So only real true random vectors are in the encrypted archive. This is why decrypting means it’s a trial and error approach. Since cloaked files don’t have a file extension, you can do anything with them. Windows will ask you something which application to use, but of course, that doesn’t make any sense. This is why crawcrook file ships with the decrypt cloak file application. You have To choose explicitly what’s the cloak file because it has no file extension, this is the intention of this cloak file that nobody knows what it really is. So I will choose this one archive now. cloak one. And the decryption if I put in the right password works as you know from the standard password based encryption, it takes a little bit longer because again, it’s decrypted by trial and error. And you see one hand which I will show you next. So the decryption has worked. If I do the same now and I put in the wrong decryption password, then Cochran file won’t be able to tell me that I have put in the wrong password because it can’t even tell it’s a crock of crap file archive So we’ll override if it would be correct, I put now in a wrong password. The decryption process here would now take forever because it will never end it can’t find a valid key for the key derivation because I have put in a wrong password. So I have to cancel this decryption because it would never end. I think you got a good idea that this is a very special kind of file format that’s not used for standard purposes. But for instance, if you want maximum privacy, you can use that for instance, if you create a giant archive of images that you want to upload to a cloud backup or something like that, then the cloak file might be your choice. You might have noticed also an additional version of cloak files here in the drop down box, which is output padding. That means if you want to enhance the privacy of your data Even more than just using headerless files, you can add additional data at the end of the file to hide maybe too small archives. So again, I will create a cloak file here. Please note I have encrypted the same file as before. And as you can see, I call this now cloak with padding. The file is one megabyte in size, which is bigger in comparison to the other ones. And I will open this again and an editor to show you that there are just additional random bytes at the end of it. And this format allows to add additional data crawcrook file will simply ignore this when decrypting the file. So to show you this, I will just now add some letters, which is of course only for demonstration purposes, you could use any random number generator now to add additional bytes, like on the Linux, you could even enhance it to one gigabyte, it wouldn’t be a problem for corporate file to find the original data. So let’s save this now. And again, we’ll try to decrypt it. So put in the right password this time. And you will see even though that I have changed the archive, because I’ve just added something at the end of it, that the decryption will work and the decryption has successfully finished and as you can see we have access to the plain file.