Click here to get back home

Null Sessions

 HomeNewsGroups | Search | About
 microsoft.public.windows.server.security    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Null Sessions Dan Moesch 07-13-2007
Get Chitika Premium
Posted by jwgoerlich on July 15, 2007, 8:14 am
Please log in for more thread options
Hello Dan,

I've been playing with this a bit, and I think it has to do with the
difference in how the NullSession.exe utility contacts Windows 2000
versus Windows 2003 computers.

If I run it from a workstation within the domain, logged in as a
domain user, NullSession returns users from Windows 2000 but not
Windows 2003. Windows 2000 does return an error, though. I do not get
any error from Windows 2000 if RestrictAnonymous=0.

Windows 2000 output:

NetUseAdd LastError : 997
User : Administrator
User : ...
WNetCancelConnection2 : 2250

Windows 2003 output:

NetShareEnum LastError : 5
Return Code : 5

The Windows 2000 errors indicate that it first gets an overlapped I/O,
and then errors because the network connection does not exist. I am
leaning towards it somehow erroring and defaulting to a non-null
session under the current user's context.

I next ran NullSession from the same computer in the domain, but
logged in as a local Administrator. This gave me no permissions on
either of the target computers. Both Windows 2000 and Windows 2003
targets refused to display user accounts.

Windows 2000 output:

NetUseAdd LastError : 997
NetShareEnum LastError : 5
Return Code : 1326
WNetCancelConnection2 : 2250

Windows 2003 output:

NetShareEnum LastError : 5
Return Code : 5

So, in my environment at least, it is working. RestrictAnonymous=2 on
prevents enumeration of null sessions from users not authenticated to
the domain.

Regards,

Wolfgang


A few more details, mapping the error codes to their Win32
definitions:

Error 5: Access is denied
Error 997: Overlapped I/O operation is in progress
Error 1326: Logon failure: unknown user name or bad password
Error 2250: This network connection does not exist


Similar ThreadsPosted
Seeing Null Share Connection in Eventviewer February 13, 2007, 4:27 am
IAS extension to limit max sessions number per user April 2, 2008, 2:15 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap