exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

BSW Gallery Shell Upload

BSW Gallery Shell Upload
Posted Oct 18, 2012
Authored by cr4wl3r

BSW Gallery suffers from a remote shell upload vulnerability.

tags | exploit, remote, shell
SHA-256 | cbe491d9281409a8c67abca0c387d9207d4efea38e9e436208e034927e06a8fb

BSW Gallery Shell Upload

Change Mirror Download
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³
³ ³ Undergroundthalo Hacking Team - Security Advisory ³ ³
³ ÚÁ----------------------------------------À³Ù-----------------------------------Á¿ ³
³Ú´ Author : cr4wl3r ³ Release Date : 18-Okt-2012 ÿ³
³³³ Product : BSW Gallery ³ Size : 38.2 kB ³³³
³³³ Link : http://sourceforge.net/projects/bswgallery/ ³³³
³ÃÁ------------------------------------------³-------------------------------------Á´³
³³ gallery.zip ³ ³³
³ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³
³ Details ³
³ ³
³ BSW Gallery ³
³ ³
³ This is a very simple photo gallery which is written in PHP code ³
³ designer by Dr.Mohamed AbdelWahab ³
³ The web application is vulnerable Arbitrary File Upload ³
³ where an attacker could upload a malicious php code without difficulty ³
³ on the file to be uploaded ³
³------------------------------------------------------------------------------------³
Code in uploadpic.php

print "<form method=\"POST\" action=\"dopic.php\"enctype=\"multipart/form-data\" style=\"width: 227px\">";
print "<table align=\"center\" style=\"width: 600px\"dir=\"ltr\"><tr><th align=\"right\"width=\"120\" class=\"topic\"><b>File Upload:</b></th>";
print "<th align=\"left\"><input type=\"file\" name=\"fileupload\"></th></tr>";
print "<tr><th><input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"10240000\"></th></tr></table>";
print"<table align=\"center\"width=\"600\"dir=\"ltr\">";
print"<th class=\"topic\"width=\"120\"align=\"right\">Image Title</th><th align=\"left\"><input style=\"width:400\"type=\"text\" name=\"picture\" /></th></table>";
print"<table align=\"center\"dir=\"ltr\" width=\"600\"><th class=\"topic\" width=\"120\"align=\"right\">Image Description</th>";
print"<th align=\"left\"><textarea name=\"descrip\"cols=\"48\"rows=\"5\"></textarea></th></table>";

Code in dopic.php

$fname=$_POST['picture'];
$descrip=$_POST['descrip'];
$file_dir ="gallery/";


foreach($_FILES as $file_name => $file_array) {
echo "path: ".$file_array["tmp_name"]."<br/>\n";
echo "name: ".$file_array["name"]."<br/>\n";
echo "type: ".$file_array["type"]."<br/>\n";

echo "size: ".$file_array["size"]."<br/>\n";

if (is_uploaded_file($file_array["tmp_name"])) {
move_uploaded_file($file_array["tmp_name"], "$file_dir/".$file_array["name"]) or die ("Couldn't copy");
echo "Done!<br/>";
}

}
$image=$file_dir.$file_array["name"];
$ip = getenv("REMOTE_ADDR");
$sql = "insert into gallery (picture,files,descrip,updated)values('$fname','$image','$descrip',now());";
mysql_query($sql,$mysql);
mysql_close($mysql);

³------------------------------------------------------------------------------------³
³ Proof of Concept : ³
³ ³
³ http://b0x/path_gallery/uploadpic.php ³
³ ³
³ Shell : ³
³ ³
³ http://b0x/path_gallery/gallery/shell.php ³
³ ³
³ See for the demo : ³
³ ³
³ http://0xuht.org/demo/demo1.png ³
³ http://0xuht.org/demo/demo2.png ³
³ http://0xuht.org/demo/demo3.png ³
³ ³
³ ³
³ Undergroundthalo Hacking Team ³
³ Site: http://0xuht.org ³
³ Twitter: @hackb0x ³
³ ³
³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³
³ ³ Happy Birhtday Saskia Adam :) ³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close