Sun Jun 3 19:47:09 CEST 2007

GNU screen Local Authentication Bypass

Author Sebastian "Rembrandt" Rother
Date 2007-06-03
Affected Software GNU screen <= 4.0.3
Affected OS OpenBSD up to 4.4 (and propably others)
Type Local Authentication Bypass

ISS X-Force34693

screen, on some operating systems, is vulnerable to a local terminal screen
lock authentication bypass that may allow physically proximate attackers to
gain access to the system.

This issue has been confirmed on OpenBSD with screen 4.0.3 on x86/amd64.
The underlying vulnerability may be related to 3rd party authentication such
as PAM. This issue was tested on OpenSuSE with screen 4.0.2 and was not

Steps to reproduce:

$ screen -S test
[Screened session starts]
$ id
uid=1001(test) gid=1001(test) groups=1001(test)
[type ctrl-a x]
Key: test
Again: test
Screen used by test .
[type ctrl-c]
$ screen -r
[Regained access to screen, without password]

The screen lock mechanism is designed to lock a terminal, not the entire shell
session. If an attacker has shell access to the target account, it is understood
they can bypass protection. However, on the system tested, the screen lock
mechanism was bypassed using 'ctrl-c'.

The vulnerability is not in OpenBSD. screen developers indicate this is known
behavior, but do not appear to fully understand the scenario with which
this can be abused. Replies to my initial disclosure suggest this may be
related to PAM authentication, or another 3rd party package. Testing was
not performed to fully identify the vulnerable code.

Tobias Ulmer has committed a patch to the screen code that prevents
this exploit from happening.


Posted by Sebastian Rother | Permanent link | File under: openbsd, authentication