上传那个点,之前看过。函数function checkFileName没有对:做检测,导致可以::$data绕过
现在%81绕过上传,不返回值。有个笨方法,上传txt获取返回值。最后的三位随机字母短时间内会有重复的出现,时间戳就爆破把
> 之前和一个朋友一直在讨论禅道获取webshell的方法,折腾了一天左右,最后还是在命令执行的地方拿到shell的。说来也是惭愧,这两天又研究了一下,又发现了一个低版本getshell的方法,最新版本是不行的,我测试的版本是8.2.6。最新版本9.1是不行的,其它版本未测试。
一、上传点
// D:\wamp\www\zentao826\module\file\control.php
public function ajaxUpload()
{
$file = $this->file->getUpload('imgFile');
$file = $file[0];
if($file)
{
if($file['size'] == 0) die(json_encode(array('error' => 1, 'message' => $this->lang->file->errorFileUpload)));
if(@move_uploaded_file($file['tmpname'], $this->file->savePath . $file['pathname']))
{
/* Compress image for jpg and bmp. */
$file = $this->file->compressImage($file);
$file['addedBy'] = $this->app->user->account;
$file['addedDate'] = helper::today();
unset($file['tmpname']);
$this->dao->insert(TABLE_FILE)->data($file)->exec();
$url = $this->file->webPath . $file['pathname'];
die(json_encode(array('error' => 0, 'url' => $url)));
}
else
{
$error = strip_tags(sprintf($this->lang->file->errorCanNotWrite, $this->file->savePath, $this->file->savePath));
die(json_encode(array('error' => 1, 'message' => $error)));
}
}
}
这里,我们可以用burpsuite
抓包将文件名改为xxxx.php*
,*
可以是{\x80-\x99}
。这样,我们就可以成功上传一个shell,但是die(json_encode(array('result' => 'success', 'message' => $this->lang->saveSuccess)));
会错误而不会返回文件的地址。
二、SQL注入的根源
> 问题出在oderBy
函数
~~~
// D:\wamp\www\zentao826\lib\base\dao\dao.class.php
点击收藏 | 0
关注 | 0