02.03.2018 Views

Sybex CEH Certified Ethical Hacker Version 8 Study Guide

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Windows Basics 135<br />

■<br />

■<br />

■<br />

■<br />

-n Names: Displays the names registered locally by NetBIOS applications such as the<br />

server and redirector<br />

-r Resolved: Displays a count of all names resolved by broadcast or the WINS server<br />

-s Sessions: Lists the NetBIOS sessions table and converts destination IP addresses to<br />

computer NetBIOS names<br />

-S Sessions: Lists the current NetBIOS sessions and their status, along with the IP<br />

address<br />

NULL Sessions<br />

The nbtstat command is case sensitive. Note that some of the switches<br />

are uppercase and some are lowercase, and this is how you must use<br />

them. If you fail to use the correct case for the switch, the command may<br />

yield incorrect results or no result at all.<br />

A powerful feature as well as a potential liability is something known as the NULL session.<br />

This feature is used to allow clients or endpoints of a connection to access certain types of<br />

information across the network. NULL sessions are not anything new and in fact have been<br />

part of the Windows operating system for a considerable amount of time for completely<br />

legitimate purposes; the problem is that they are also a source of potential abuse as well. As<br />

you will soon see, the NULL session can reveal a wealth of information.<br />

Basically a NULL session is something that occurs when a connection is made to a<br />

Windows system without credentials being provided. This session is one that can only be<br />

made to a special location called the interprocess communication (IPC), which is an administrative<br />

share. In normal practice, NULL sessions are designed to facilitate a connection<br />

between systems on a network to allow one system to enumerate the process and shares on<br />

the other. Information that may be obtained during this process includes:<br />

■ List of users and groups<br />

■ List of machines<br />

■ List of shares<br />

■ Users and host SIDs<br />

The NULL session allows access to a system using a special account called a NULL<br />

user that can be used to reveal information about system shares or user accounts while not<br />

requiring a username or password to do so.<br />

Exploiting a NULL session is a simple task that requires only a short list of commands.<br />

For example, assume that a computer has the name “zelda” as the hostname, which would<br />

mean you could attach to that system by using the following, where the host is the IP<br />

address or name of the system being targeted:<br />

net use \\zelda\ipc$ " /user:"

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!