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

nullsessions.txt

nullsessions.txt
Posted Jul 7, 2005
Authored by Jean-Baptiste Marchand | Site hsc.fr

By taking advantage of hardcoded named pipes allowed for NULL sessions and using the property of MSRPC that, by default, all available RPC interfaces in a process can be reached using any opened endpoint, it is possible to anonymously enumerate Windows services and read the Application and System eventlogs of a remote Windows NT 4.0 or Windows 2000 system.

tags | advisory, remote
systems | windows
advisories | CVE-2005-2150
SHA-256 | 2bb873f5988aeb3ade45cf990ed9c3c66d76a67a398e497b3f4c007ab913879a

nullsessions.txt

Change Mirror Download

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

NULL sessions vulnerabilities using alternate named pipes


Hervé Schauer Consultants Security Advisory
http://www.hsc.fr/


- -[ Summary ]-

Advisory: NULL sessions vulnerabilities using alternate named pipes
CVE identifier: CAN-2005-2150
Release date: 2005/07/07
Affected systems: Windows NT 4.0, Windows 2000
Vendor status: Windows 2000 fixes available in URP1 for Windows 2000 SP4
Author: Jean-Baptiste Marchand <Jean-Baptiste.Marchand@hsc.fr>
References: http://www.hsc.fr/ressources/presentations/null_sessions/


- -[ Affected systems ]-

- Windows NT 4.0
- Windows 2000 (prior to URP1 for Windows 2000 SP4)

Windows XP and Windows Server 2003 are not directly affected by the
vulnerabilities described in this document.

Still, the alternate named pipes technique also applies to Windows XP and
Windows Server 2003, including Windows XP SP2 and Windows Server 2003 SP1.

- -[ History ]-

2004/01/23: vulnerability reported to vendor

2004/02/12: vendor announces its intention to release fixes as part of the next
Windows 2000 Service Pack

2004/09/09: a related vulnerability affecting Windows XP SP2 is published

2005/02/08: release of MS05-007, fixing a specific instance of a similar
vulnerability in Windows XP and Windows XP SP2

2005/02/28: private versions of Windows 2000 fixes available for test

2005/03/30: confirmation that tested fixes correct the vulnerability

2005/06/28: release of URP1 for Windows 2000 SP4, which includes fixes for
Windows 2000


- -[ Overview ]-

By taking advantage of hardcoded named pipes allowed for NULL sessions and using
the property of MSRPC that, by default, all available RPC interfaces in a
process can be reached using any opened endpoint, it is possible to:

- anonymously enumerate Windows services of a remote Windows NT 4.0 or Windows
2000 system (svcctl vulnerability)

- anonymously read the Application and System eventlogs of a remote Windows NT
4.0 or Windows 2000 system (eventlog vulnerability)


- -[ svcctl vulnerability details ]-

The svcctl MSRPC interface is used to communicate with the Windows SCM (Service
Control Manager):

http://www.hsc.fr/ressources/articles/win_net_srv/ch04s07s09.html

The svcctl vulnerability allows an anonymous user to connect to the SCM (Service
Control Manager). It is then possible to enumerate installed or running
services:

http://www.hsc.fr/ressources/presentations/null_sessions/img16.html


Depending on the security descriptor protecting each service (stored in binary
under the Security registry subkey of each service's subkey), it might be
possible to anonymously start or even stop a Windows service.

Because in Windows NT 4.0 and Windows 2000, the EVERYONE group contains the
ANONYMOUS LOGON SID, a service with a weak DACL allowing members of the EVERYONE
group to start (or stop) the service can be remotely started or stopped
anonymously.

For more information about services permissions, see

http://cert.uni-stuttgart.de/archive/bugtraq/2004/10/msg00159.html



- -[ eventlog vulnerability details ]-

The eventlog MSRPC interface is used to communicate with the Windows eventlog
service:

http://www.hsc.fr/ressources/articles/win_net_srv/ch04s07s06.html

The eventlog vulnerability can be used to anonymously read either the
Application or System eventlog of a remote Windows NT 4.0 or Windows 2000
system.

It is not possible to read the Security eventlog because a specific Windows
privilege must be held by the caller process (SeSecurityPrivilege).


- -[ Workaround ]-

Both vulnerabilities are fixed in the URP1 for Windows 2000 SP4 recently
released by the vendor:

http://support.microsoft.com/kb/900345/


The svcctl vulnerability was fixed by modifying the SCM DACL (enforced when the
OpenSCManager{A,W} operation is used), denying access for the ANONYMOUS LOGON
SID.

The eventlog vulnerability was fixed by using a RPC callback function for the
eventlog interface, to reject unauthenticated binds.


It is also possible to protect against the eventlog vulnerability by adding and
setting to 1 the RestrictGuestAccess registry value, under the following two
registry keys:

HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Application\

HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\System\

In Windows 2000, the RestrictGuestAccess value can be set using the following
security options:

- Restrict guest access to application log
- Restrict guest access to system log

These settings are mentionned in the following article:

http://support.microsoft.com/kb/842209


It is recommended to set these registry values on Windows NT 4.0 systems, where
no other workaround is available.


- -[ Vulnerability assessment ]-

Plugins for the Nessus vulnerability scanner are available to discover
vulnerable hosts:

svcctl vulnerability:

http://www.nessus.org/plugins/index.php?view=single&id=18585

eventlog vulnerability:

http://www.nessus.org/plugins/index.php?view=single&id=18602


- -[ References ]-

For more information, see the following documents:

- MSRPC null sessions: exploitation and protection

http://www.hsc.fr/ressources/presentations/null_sessions/

- Windows network services internals

http://www.hsc.fr/ressources/articles/win_net_srv/


- -[ Credits ]-

These vulnerabilities were discovered by Jean-Baptiste Marchand, with the help
of Hervé Schauer Consultants team.


- -[ Copyright ]-

The contents of this advisory are copyright (c) 2005 Hervé Schauer Consultants
and may be distributed freely provided that no fee is charged for this
distribution and proper credit is given.

- -[ PGP key ]-

http://www.hsc.fr/~marchand/marchand.asc

pub 1024D/456EBCD4 2003-02-25
Key fingerprint = F360 8D66 5AD1 AD17 1941 D14F D0F0 EA74 456E BCD4

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCzOpm0PDqdEVuvNQRAgJPAJ0aK/uD9n/2U8qO8od+sgHmIbuVpgCg1Xgq
rztKIps8npljcawk6PgJzNs=
=97XV
-----END PGP SIGNATURE-----

Login or Register to add favorites

File Archive:

July 2024

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