In article
<27544943.1191.1337181343169.JavaMail.geo-discussion-forums@vbx14>,
sbarmen <
st...@barmen.nu> wrote:
> Thank you patpro :)
>
> I was kindof hoping to find some more evidence of the actual xploit that is
> used here but that seems hard?
that's not hard. You just need to get the full POST content, isolate the
full content of the filename variable. Then you base64-decode it. It
often gives some PHP script.
In general, the php script is a simple
exec(decode-function('obfuscated-php-script'));
I've seen recently an attack attempt on my server. The hacker tried to
exploit a module of a WordPress theme to upload a fake GIF file. The
payload was a +8800 characters obfuscated php script. Sample:
$o="base-64-encoded-content";eval(base64_decode("base-64-encoded-content"
));return;?>
$o is a very long obfuscated php script
a decoding php script is created by the 'eval' command, and it finally
executes a complex php script (decoded from $o) to create an IRC bot
that connects to an IRC channel and waits for commands.
I've seen another obfuscated script, that once executed gives the hacker
a full featured web interface to execute commands on the server. It was
hidden in 9 ou 10 levels of exec(decode(obfuscated-php));
screen capture here:
http://patpro.net/~patpro/interface.png
> Is there any value building together the whole data blob (base64) published?
only for your own pleasure :)
That's a good opportunity to train and acquire few skills. For starters:
http protocol, php (de)obfuscation, web site common vulnerabilities,
apache and php security, and if you want to go further, you will want to
play with tcpdump, audit tools (openbsm, ktrace/strace/dtrace,
truss/dtruss, lsof...) or other tools available on your system or server.
To test, and play with the IRC bot script, I've created a dedicated
FreeBSD virtual machine on my VMWare Fusion, and launched the php script
using the php command line. I've hocked ktrace for local and IO audit,
and tcpdump to monitor the IP traffic.