CH 03
CH 03
Enumeration
Definition
Scanning identifies live hosts and running services Enumeration probes the identified services more fully for known weaknesses Enumeration is more intrusive, using active connections and directed queries Enumeration will usually be logged and noticed
Goals of Enumeration
User account names
to inform subsequent password-guessing attacks
Pen-Test Video
Link Ch 3a: Droop's Box: Simple Pen-test Using Nmap, Nikto, Bugtraq, Nslookup and Other Tools by IronGeek
Banner Grabbing
Connecting to remote applications and observing the output Simple way, at a command prompt
telnet www.ccsf.edu 80
Example Banners
www.ccsf.edu tells you too much
cnn.com is better
Banner-Grabbing Countermeasures
Turn off unnecessary services Disable the presentation the vendor and version in banners Audit yourself regularly with port scans and raw netcat connects to active ports
FTP Banner
Here's the corresponding overly informative FTP banner
Antivirus Note
McAfee antivirus blocks telnets to port 25 "Prevent mass mailing worms from sending mail"
Limit access to the /tftpboot directory Make sure it's blocked at the border firewall
Finger, TCP/UDP 79
epdump
Shows services bound to IP addresses It takes some research to interpret the results
Link Ch 3n
rpcdump
On the Backtrack 2 CD Start, Backtrack, Vulnerability Identification, All, RPCDump
Similar confusing results
rpcdump Results
Name Resolution
Windows needs to change a computer name to an IP address to send data packets Windows uses two naming systems:
DNS (the preferred method) NetBIOS Name Resolution (still used by all versions of Windows)
See link Ch 3v
NET VIEW
NET VIEW can list the domains, or the computers in each domain
NBTSCAN
Information Available
Null sessions on Win 2000 and NT provide information about:
Shares User accounts Password policies
DumpSec
Free from link Ch 3z02 Runs on Vista (and earlier Windows)
Registry Enumeration
The Registry can be viewed remotely Requires Administrator privileges by default on Windows servers
You can't do it with null sessions
Gary McKinnon used remote registry access to hack into the Pentagon
Link Ch 3z03
user2sid/sid2user
These utilities can get user account names and SIDs remotely, even if the registry key RestrictAnonymous is set to 1 They can find the Administrator's account name, even if it's renamed, by changing the last 3 numbers of another account's SID to 500
Works against Win 2003, but not Win XP SP2 See link Ch 3z04
Community Strings
SNMP is not a very secure protocol. It has a minimal security system called SNMP Community Strings Community strings act like passwords There are three kinds of SNMP Community strings: Read-Only, ReadWrite, and Trap (Trap is rarely used)
But the community strings are often left at obvious defaults like "public" and "private"