News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Simple Machines Forum Session Fixation Vulnerability

Started by lars_n, May 09, 2007, 03:30:36 AM

Previous topic - Next topic

lars_n


Hellos all :)


Is there allready a patch for that? If not, when will it be available? Thanks.

Source: http://secunia.com/advisories/25139/


Quote
Description:
David Vieira-Kurz has discovered a vulnerability in Simple Machines Forum, which can be exploited by malicious people to conduct session fixation attacks.

The vulnerability is caused due to an error in the handling of sessions and can be exploited to hijack another user's session by tricking the user into logging in after following a specially crafted link.

The vulnerability is confirmed in version 1.1.2. Other versions may also be affected.

Solution:
Do not follow links from untrusted sources.

Solution Status: Unpatched

Sarge

Quote from: lars_n on May 09, 2007, 03:30:36 AM
Is there allready a patch for that? If not, when will it be available? Thanks.

http://www.majorsecurity.de/index_2.php?major_rls=major_rls47

QuoteWorkaround:
============
1. Do not accept session identifiers from GET / POST variables.

2.Regenerate SID on each request.

3. Accept only server generated SID:
One way to improve security is to not accept session identifiers not generated by server.

if ( ! isset( $_SESSION['SERVER_GENERATED_SID'] ) ) {
session_destroy(); // destroy all data in session
}
session_regenerate_id(); // generate a new session identifier
$_SESSION['SERVER_GENERATED_SID'] = true;

History/Timeline
================
30.04.2007 discovery of the vulnerability
03.04.2007 contacted the vendor
04.04.2007 working patch sent to the vendor
05.04.2007 advisory is written
05.04.2007 advisory released

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting


lars_n

Just wonder because releasedate of this advisory is :

QuoteRelease Date: 2007-05-07
:-X

webfan

Quoteif ( ! isset( $_SESSION['SERVER_GENERATED_SID'] ) ) {
session_destroy(); // destroy all data in session
}
session_regenerate_id(); // generate a new session identifier
$_SESSION['SERVER_GENERATED_SID'] = true;
Where is the best place in SMF to insert the code?

thx

mfg
:)

EDIT: I added the code at the top of LogInOut.php, is that ok?

青山 素子

This is a difficult thing to trigger. To my understanding you'd need to create a valid session ID, PHP would need to allow passing sessions around as variables, and a few other things to accomplish this (being on the same network, using the exact same browser, etc makes things a lot easier).

There should be a fix out for this soon (likely as part of the 1.1.3 update).
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


VaKo

In the mean time is there an easy way of applying the work around?

Sarge

A security patch would be nice, like the one for 1.1 RC3. Likewise, the SMF version doesn't have to change.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Kindred

this is, for the most part, not a real issue.   One would have to have access to either the server or the user already, in order to set the session ID...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

metallica48423

QuoteA security patch would be nice, like the one for 1.1 RC3. Likewise, the SMF version doesn't have to change.

As motoko-chan stated, There should be something out soon.  There is likely more to it than just that, to warrant a 1.1.3 release, including other bugfixes. 

Like motoko said, soon :P
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Charlie82

Quote from: webfan on May 09, 2007, 05:49:11 AM
Quoteif ( ! isset( $_SESSION['SERVER_GENERATED_SID'] ) ) {
session_destroy(); // destroy all data in session
}
session_regenerate_id(); // generate a new session identifier
$_SESSION['SERVER_GENERATED_SID'] = true;
Where is the best place in SMF to insert the code?

thx

mfg
:)

EDIT: I added the code at the top of LogInOut.php, is that ok?

Is then that ok?

kill3r

where can i add this code. someone plz help

if ( ! isset( $_SESSION['SERVER_GENERATED_SID'] ) ) {
session_destroy(); // destroy all data in session
}
session_regenerate_id(); // generate a new session identifier
$_SESSION['SERVER_GENERATED_SID'] = true;

青山 素子

#12
This is a minor problem, and there will be a fully-tested and working solution out soon.

As a note, the solution proposed in the report has been tested and it was found to not fully prevent the problem described.

Quote:
Quote from: Motoko-chan on May 09, 2007, 10:29:19 AM
This is a difficult thing to trigger. To my understanding you'd need to create a valid session ID, PHP would need to allow passing sessions around as variables, and a few other things to accomplish this (being on the same network, using the exact same browser, etc makes things a lot easier).
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


kill3r

Quote from: Motoko-chan on June 17, 2007, 07:25:02 PM
This is a minor problem, and there will be a fully-tested and working solution out soon.

As a note, the solution proposed in the report has been tested and it was found to not fully prevent the problem described.

thanks for the prompt reply, ll wait for the update.

Advertisement: