upx.1
来自「Cracker终结者——提供最优秀的软件保护技术」· 1 代码 · 共 796 行 · 第 1/2 页
1
796 行
Extra options available for this executable format:.PP.Vb 1\& --8086 Create an executable that works on any 8086 CPU..Ve.Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1DOS/EXE\s0"dos/exe stands for all \*(L"normal\*(R" 16-bit \s-1DOS\s0 executables..PPObviously \s-1UPX\s0 won't work with executables that want to read data fromthemselves (like some command line utilities that ship with Win95/98)..PPCompressed programs only work on a 286+..PPExtra options available for this executable format:.PP.Vb 1\& --8086 Create an executable that works on any 8086 CPU..Ve.Vb 1\& --no-reloc Use no relocation records in the exe header..Ve.Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1DOS/SYS\s0"You can only compress plain sys files, sys/exe (two in one)combos are not supported..PPCompressed programs only work on a 286+..PPPacked programs will be byte-identical to the original after uncompression..PPMaximum uncompressed size: ~65350 bytes..PPExtra options available for this executable format:.PP.Vb 1\& --8086 Create an executable that works on any 8086 CPU..Ve.Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1DJGPP2/COFF\s0"First of all, it is recommended to use \s-1UPX\s0 *instead* of \fBstrip\fR. strip hasthe very bad habit of replacing your stub with its own (outdated) version.Additionally \s-1UPX\s0 corrects a bug/feature in strip v2.8.x: itwill fix the 4 KByte aligment of the stub..PP\s-1UPX\s0 includes the full functionality of stubify. This means it willautomatically stubify your \s-1COFF\s0 files. Use the option \fB--coff\fR todisable this behaviour (see below)..PP\s-1UPX\s0 automatically handles Allegro packfiles..PPThe \s-1DLM\s0 format (a rather exotic shared library extension) is not supported..PPPacked programs will be byte-identical to the original after uncompression.All debug information and trailing garbage will be stripped, though..PP\s-1BTW\s0, \s-1UPX\s0 is the successor of the \s-1DJP\s0 executable packer..PPExtra options available for this executable format:.PP.Vb 2\& --coff Produce COFF output instead of EXE. By default\& UPX keeps your current stub..Ve.Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1LINUX/\s0i386"How it works:.PP.Vb 3\& Because Linux is a real operating system, the in-place in-memory\& decompression scheme used in the other executable formats doesn't\& work here..Ve.Vb 5\& Instead we must use temporary decompression to disk. Interestingly -\& because of the good memory management of the Linux kernel - this\& often does not introduce a noticable delay, and in fact there\& will be no disk access at all if you have enough free memory as\& the entire process takes places within the filesystem buffers..Ve.Vb 2\& A compressed executable consists of the UPX stub and an overlay\& which contains the original program in a compressed form..Ve.Vb 2\& The UPX stub is a statically linked ELF executable and does\& the following at program startup:.Ve.Vb 7\& 1) decompress the overlay to a temporary location in /tmp\& 2) open the temporary file for reading\& 3) try to delete the temporary file and start (execve)\& the uncompressed program in /tmp using /proc/<pid>/fd/X as\& attained by step 2)\& 4) if that fails, fork off a subprocess to clean up and\& start the program in /tmp in the meantime.Ve.Vb 2\& The UPX stub is about 1700 bytes long, partly written in assembler\& and only uses kernel syscalls. It is not linked against any libc..VeBenefits:.PP.Vb 4\& - UPX can compress all executables, be it AOUT, ELF, libc4, libc5,\& libc6, Shell/Perl/Python/... scripts, standalone Java .class\& binaries, or whatever...\& All scripts and programs will work just as before..Ve.Vb 2\& - Compressed programs are completely self-contained. No need for\& any external program..Ve.Vb 5\& - UPX keeps your original program untouched. This means that\& after decompression you will have a byte-identical version,\& and you can use UPX as a file compressor just like gzip.\& [ Note that UPX maintains a checksum of the file internally,\& so it is indeed a reliable alternative. ].Ve.Vb 3\& - As the stub only uses syscalls and isn't linked against libc it\& should run under any Linux configuration that can run ELF\& binaries and has working /proc support..Ve.Vb 3\& - For the same reason compressed executables should run under\& FreeBSD and other systems which can run Linux binaries.\& [ Please send feedback on this topic ].VeDrawbacks:.PP.Vb 4\& - You need additional free disk space for the uncompressed program\& in your /tmp directory. This program is deleted immediately after\& decompression, but you still need it for the full execution time\& of the program..Ve.Vb 4\& - You must have /proc filesystem support as the stub wants to open\& /proc/<pid>/exe and needs /proc/<pid>/fd/X. This also means that you\& cannot compress programs that are used during the boot sequence\& before /proc is mounted..Ve.Vb 4\& - `ldd' and `size' won't show anything useful because all they\& see is the statically linked stub (since version 0.82 the section\& headers are stripped from the UPX stub and `size' doesn't even\& recognize the file format any longer - looks like a binutils bug)..Ve.Vb 4\& - Utilities like `top' will display numerical values in the process\& name field. This is because Linux computes the process name from\& the first argument of the last execve syscall (which is typically\& something like /proc/<pid>/fd/3)..Ve.Vb 6\& - To reduce memory requirements during uncompression UPX splits the\& original file into blocks, so the compression ratio is a little bit\& worse than with the other executable formats (but still quite nice).\& [ Advise from kernel experts which can tell me more about the\& execve memory semantics is welcome. Maybe this shortcoming\& could be removed. ].Ve.Vb 4\& - Because of temporary decompression to disk the decompression speed\& is not as fast as with the other executable formats. Still, I can see\& no noticable delay when starting programs like my ~3 MB emacs (which\& is less than 1 MB when compressed :-)..VeNotes:.PP.Vb 2\& - As UPX leaves your original program untouched it is advantageous\& to strip it before compression..Ve.Vb 4\& - It is not advisable to compress programs which usually have many\& instances running (like `make') because the common segments of\& compressed programs won't be shared any longer between different\& processes..Ve.Vb 2\& - If you compress a script you will lose platform independence -\& this could be a problem if you are using NFS mounted disks..Ve.Vb 2\& - Compression of suid, guid and sticky-bit programs is rejected\& because of possible security implications..Ve.Vb 2\& - For the same reason there is no sense in making any compressed\& program suid..Ve.Vb 3\& - Obviously UPX won't work with executables that want to read data\& from themselves. E.g., this might be a problem for Perl scripts\& which access their __DATA__ lines..Ve.Vb 5\& - In case of internal errors the stub will abort with exitcode 127.\& Typical reasons for this to happen are that the program has somehow\& been modified after compression, you have run out of disk space\& or your /proc filesystem is not yet mounted.\& Running `strace -o strace.log compressed_exe' will tell you more..VeExtra options available for this executable format:.PP.Vb 1\& (none).Ve.Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1RTM32/PE\s0"Same as win32/pe..Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1TMT/ADAM\s0"This format is used by the \s-1TMT\s0 Pascal compiler \- see http://www.tmt.com/ ..PPExtra options available for this executable format:.PP.Vb 1\& (none).Ve.Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1WATCOM/LE\s0"\s-1UPX\s0 has been successfully tested with the following extenders: \s-1DOS4G\s0, \s-1DOS4GW\s0, \s-1PMODE/W\s0, DOS32a, CauseWay. The \s-1WDOS/X\s0 extender is partly supported (for details see the file bugs \s-1BUGS\s0)..PPYes, you can use your compressed executables with \s-1DOS4GW\s0..PPThe \s-1LX\s0 format is not yet supported..PPDLLs are not supported..PPExtra options available for this executable format:.PP.Vb 2\& --le Produce an unbound LE output instead of\& keeping the current stub..Ve.Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1WIN32/PE\s0"The \s-1PE\s0 support in \s-1UPX\s0 is quite stable now, but definitely there arestill some incompabilities with some files..PPBecause of the way \s-1UPX\s0 (and other packers for this format) works, youcan see increased memory usage of your compressed files. If you startseveral instances of huge compressed programs you're wasting memorybecause the common segements of the program won't get sharedacross the instances.On the other hand if you're compressing only smaller programs, orrunning only one instance of larger programs, then this penalty issmaller, but it's still there..PPIf you're running executables from network, then compressed programswill load faster, and require less bandwidth during execution..PPDLLs are supported..PPExtra options available for this executable format:.PP.Vb 9\& --compress-exports=0 Don't compress the export section.\& Use this if you plan to run the compressed\& program under Wine.\& --compress-exports=1 Compress the export section. [DEFAULT]\& Compression of the export section can improve the\& compression ratio quite a bit but may not work\& with all programs (like winword.exe).\& UPX never compresses the export section of a DLL\& regardless of this option..Ve.Vb 4\& --compress-icons=0 Don't compress any icons.\& --compress-icons=1 Compress all but the first icon.\& --compress-icons=2 Compress all icons which are not in the\& first icon directory. [DEFAULT].Ve.Vb 1\& --compress-resources=0 Don't compress any resources at all..Ve.Vb 3\& --force Force compression even when there is an\& unexpected value in a header field.\& Use with care..Ve.Vb 9\& --strip-relocs=0 Don't strip relocation records.\& --strip-relocs=1 Strip relocation records. [DEFAULT]\& This option only works on executables with base\& address greater or equal to 0x400000. Usually the\& compressed files becomes smaller, but some files\& may become larger. Note that the resulting file will\& not work under Win32s.\& UPX never strips relocations from a DLL\& regardless of this option..Ve.SH "DIAGNOSTICS"Exit status is normally 0; if an error occurs, exit statusis 1. If a warning occurs, exit status is 2..PP\fBUPX\fR's diagnostics are intended to be self-explanatory..SH "BUGS"Please report all bugs immediately to the authors..SH "AUTHORS".PP.Vb 2\& Markus F.X.J. Oberhumer <markus.oberhumer@jk.uni-linz.ac.at>\& http://wildsau.idv.uni-linz.ac.at/mfx/upx.html.Ve.Vb 2\& Laszlo Molnar <ml1050@cdata.tvnet.hu>\& http://www.nexus.hu/upx.Ve.SH "COPYRIGHT"Copyright (C) 1996-2000 Markus Franz Xaver Johannes OberhumerCopyright (C) 1996-2000 Laszlo Molnar.PPThis program may be used freely, and you are welcome toredistribute it under certain conditions..PPThis program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theUPX License Agreement for more details..PPYou should have received a copy of the UPX License Agreement alongwith this program; see the file LICENSE. If not, visit the UPX home page..rn }` ''.IX Title "UPX 1".IX Name "upx - compress or expand executable files".IX Header "NAME".IX Header "SYNOPSIS".IX Header "ABSTRACT".IX Header "DISCLAIMER".IX Header "DESCRIPTION".IX Header "COMMANDS".IX Subsection "Compress".IX Subsection "Decompress".IX Subsection "Test".IX Subsection "List".IX Header "OPTIONS".IX Header "COMPRESSION LEVELS & TUNING".IX Item "\(bu".IX Item "\(bu".IX Item "\(bu".IX Item "\(bu".IX Item "\(bu".IX Item "\(bu".IX Header "OVERLAY HANDLING OPTIONS".IX Header "ENVIRONMENT".IX Header "NOTES FOR THE SUPPORTED EXECUTABLE FORMATS".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1ATARI/TOS\s0".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1DOS/COM\s0".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1DOS/EXE\s0".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1DOS/SYS\s0".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1DJGPP2/COFF\s0".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1LINUX/\s0i386".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1RTM32/PE\s0".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1TMT/ADAM\s0".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1WATCOM/LE\s0".IX Subsection "\s-1NOTES\s0 \s-1FOR\s0 \s-1WIN32/PE\s0".IX Header "DIAGNOSTICS".IX Header "BUGS".IX Header "AUTHORS".IX Header "COPYRIGHT"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?