1

So I recently downloaded Tor Browser on my Linux machine and what immediately caught my eye is the fact that after uncompressing the file (I think it was .tar.gz, but the question applies to every compression method) a .desktop file got generated in the extracted folder. Is this hidden functionality of .tar.gz and some code got executed which generated this so-called shortcut or is it just the OS that generated that file with a absolute path by on itself?

3
  • .zip files can be prefixed with data, as the file format only cares once it spots the header. Therefore, it's posible to create .zip file that is also an executable, but that isn't exactly what you asked for - just some related trivia.
    – user163495
    Nov 21, 2020 at 22:20
  • DId the .desktop file get generated, or was it part of the tgz to start with? I ask because that's a common file associated with creating applications. For instance, it is used to specify the icon to use for the application.
    – Cort Ammon
    Nov 22, 2020 at 0:44
  • Ok so now I checked the latest version of Tor and in it you could already see the .desktop file in .tar.xz format already available. The contents were semi-scripted containing variable dirname. I could have sworn that I've seen my absolute path in the .desktop file in a previous version of Tor... Nov 22, 2020 at 11:10

1 Answer 1

2

There are several slightly overlapping questions here:

can ... execute some custom code

This might be possible due to security bugs, even if it is not intended functionality.

is this hidden functionality of .tar.gz

No. This is generated by the OS

a ZIP/tar.gz/rar/etc file ...

As for ZIP, tar.gz and rar - these don't have this functionality. As for "etc" - maybe, when choosing the right value for "etc".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .