Self-extracting archive

from Wikipedia, the free encyclopedia

A self-extracting archive (also SFX archive , from English s el f e x tracting) is a file archive that is designed as an executable file . Such an archive can be extracted without a data compression program.

SFX archives are often used for program installation (installation packages).

A special case of self-extracting archives are executable files (Win32 .exe etc.) compressed with a data compression program for executable program files (see Compression of executable program files). They behave like conventional program files, since they are automatically unpacked in the main memory during execution and then executed and there is no visible difference to uncompressed counterparts for the user.

Both self-extracting archives and compressed executable files can be misused to distribute malware : Opening such a file from an untrustworthy source (for example by clicking on an email attachment) can lead to the immediate execution of malware.

Technical background

In the case of SFX archives , a small program (“stub”) is added to the archive itself, for example a zip , rar or cabinet archive , which contains the necessary code to decompress the archive. That is why SFX archives are always somewhat larger than purely “passive” archives; they get the ending .exe under Windows and DOS . When creating the SFX archive, options can often be specified, such as the target path of the archive to be extracted. These are saved as additional information in the archive comment or elsewhere in the SFX archive.