what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

LedgerSMB Improper Logout

LedgerSMB Improper Logout
Posted Feb 3, 2014
Authored by Chris Travers

LedgerSMB versions prior to 1.3.36 suffer from an improper logout vulnerability that can allow for replay attacks.

tags | exploit
SHA-256 | aebd76ca1473ca0c35d7b7dbc17da3b164760cd470cacb9812093262becbfd72

LedgerSMB Improper Logout

Change Mirror Download
Security Advisory: LedgerSMB < 1.3.36, Improper Logout on Some Browsers

Severity: Low (cvssv2 base score: 3.6, total 0.5)
Remotely Exploitable: No
Complexity of Attack: High
Impact: Relatively low.
Prerequisite for Attack: Physical Access to Previously Logged In
Browser, so high complexity in most cases.
Attack Vector: Physical, against client.
Impact: The attacker may gain access unexpectedly to LedgerSMB using
the client's previous credentials.

Background

LedgerSMB uses HTTP authentication, with credentials which are passed
through to the database. This means that the web application is not
trusted by the database, and has no permission to the data in the
absence of actual user credentials. Logout works by setting
credentials to known bad values (logout:logout) and returning these to
the client. This effectively, to the extent it works, prevents the
client from logging in again with the old credentials since they are
cleared.

Unfortunately there is some variation in how browsers handle a request
to change credentials. The RFC gives tremendous flexibiltiy to
browsers as to when to reuse credentials. Firefox and some other
browsers will re-use credentials until they get either a 401 error
from the server or a request to use different credentials. This is
the behavior that the aforementioned versions have relied upon.

Other browsers, including Chrome, do not immediately use credentials
requested unless prompted by a 401 error. This means that sending a
request with bad credentials won't actually send the bad credentials
unless the web server sends back an error against the good credentials
first. This behavior is counterintuitive for developers and a recipe
for security problems, but it is at least in compliance with a
technical reading of the RFC.

The result is that unpatched LedgerSMB depends effectively on
client-side behavior to log out, and while this may not be ideal, it
is totally consistent with HTTP being a stateless protocol (and
therefore the client bears responsibility for managing authentication
information). This method of logout is not supported on all browsers.

Browsers which do support a purely client-side logout include Firefox
and Internet Explorer. Those that don't include Chrome. When used
with the latter category, the authentication credentials remain valid
until one closes the browser.

To address this, browsers like Chrome must be required to send two
round trips to the server, the first to reject the good credentials
and the second to accept the bad ones. Our patch, assuming proper
operation of software and network, addresses this. We still believe
it is safer to use browsers, such as Firefox, which support a fully
client-side logout. The reason here is that if a security model
requires a working network to make a logout take effect, then
breakdowns in the network may introduce temporary vulnerabilities.
This is, however, a fundamental problem with browsers which rely on
this and cannot be fixed by web servers using stateless approaches to
authentication.

Exploit

After logout (assuming that the browser is not fully closed after), go
to the login screen. Leave the username and password blank. Type in
the db name you want to access under the company name, click Log In,
and you may be logged in if the browser authentication cache has not
been cleared, or just use the back button to return to the application
(as authentication data will be resubmitted on request).

Workaround/How to Mitigate

Assuming single control to each client computer, this issue has only
very minor security implications. A successful attack means breaching
any physical security on site. In systems where this is not the case,
client-side security concerns may well eclipse any concerns this
raises, which is why we have classified it as "low" in terms of
severity.

The obvious mitigation techniques include switching to a browser, such
as Firefox, which does support a purely client logout from http
authentication.

Another mitigation technique is to close the browser after use.
However this requires trusting users to do things that may not be
obvious regarding security. In Chrome, in cognito windows could be
used to effectively prevent this (assuming they are closed after).

Patch Availability

We have a patch available for this issue. It has not been fully
regression tested, and it was committed to our public svn repository
for branches/1.3 in svn revision 6518. It is included in 1.3.37 or
you can pull a patch directly from svn.

Final Notes

It is worth remembering that this is an exploit which typically would
be against one layer in a relatively deep area of IT defense. Attacks
would require circumventing other routine aspects of IT security and
therefore while we do recommend that users take the issue seriously it
is not one which is expected to be particularly urgent.

Credit:

Chris Travers discovered this issue.
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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