[UNIX] PHP-Ping Arbitrary Command Execution

From: SecuriTeam (support_at_securiteam.com)
Date: 12/29/03

  • Next message: SecuriTeam: "[NT] LANDesk Management Suite IRCRBOOT.DLL Buffer Overflow"
    To: list@securiteam.com
    Date: 29 Dec 2003 18:24:03 +0200
    
    

    The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
    - - promotion

    The SecuriTeam alerts list - Free, Accurate, Independent.

    Get your security news from a reliable source.
    http://www.securiteam.com/mailinglist.html

    - - - - - - - - -

      PHP-Ping Arbitrary Command Execution
    ------------------------------------------------------------------------

    SUMMARY

     <http://www.theworldsend.net/> PHP-Ping is "a simple ping utility written
    in PHP". A vulnerability in the script allows remote attackers to cause
    the script to execute arbitrary code.

    DETAILS

    Due to improper filtering of the count variable, a remote attacker can
    insert arbitrary commands into the command executed by the PHP script (the
    ping command).

    Example:
    You can use one of the following to verify whether your system is
    vulnerable or not:
    http://www.example.com/php-ping.php?count=1+%26+ls%20-l+%26&submit=Ping%21
    http://www.example.com/php-ping.php?count=1+%26+cat%20/etc/passwd+%26&submit=Ping%21

    Solution:
    Add the following (proper) filtering lines:
          // replace bad chars
          $host= preg_replace ("/[^A-Za-z0-9.]/","",$host);
          $count= preg_replace ("/[^0-9.]/","",$count);

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:security@ppp-design.de>
    ppp-design.

    ========================================

    This bulletin is sent to members of the SecuriTeam mailing list.
    To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
    In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

    ====================
    ====================

    DISCLAIMER:
    The information in this bulletin is provided "AS IS" without warranty of any kind.
    In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.


  • Next message: SecuriTeam: "[NT] LANDesk Management Suite IRCRBOOT.DLL Buffer Overflow"

    Relevant Pages

    • [NT] Horde Multiple XSS
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... based on PHP and the Horde Framework." ... Horde is subject to a client side script injection vulnerability in the ...
      (Securiteam)
    • [UNIX] Mantis Bug Tracker Multiple Vulnerabilities
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... any HTML or script code can be injected. ... * Another XSS vulnerability can be found in the signup.php script (ex.: ... there is also a remote PHP code execution in the system. ...
      (Securiteam)
    • [NEWS] NetworkEverywhere Router Model NR041 Script Injection via DHCP
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Everywhere NR041 Cable/DSL 4-port router "connects multiple PCs to your ... malicious script code can be ... The code for such an HTML file is ...
      (Securiteam)
    • [NT] Snitz Forum 2000 Cross Site Scripting In User Registration Form
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... A cross site scripting vulnerability has been found in the user ... When registering a new account the register.asp script fails to properly ... Vendor Status: ...
      (Securiteam)
    • [NEWS] PeopleSoft Grid Option Vulnerability
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Attached to this solution (download from PeopleSoft Solution ID: ... The script is for Microsoft SQL Server, if you are on a different Database ...
      (Securiteam)