Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 41 guests and 2 members online
 
Free Business and Tech Magazines and eBooks

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow Reliably determine the Operating System and Service Pack
EH-Net
May 24, 2013, 09:05:02 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Reliably determine the Operating System and Service Pack  (Read 4061 times)
0 Members and 1 Guest are viewing this topic.
T_Bone
Full Member
***
Offline Offline

Posts: 199


View Profile
« on: January 12, 2011, 08:50:23 AM »

How can you reliably determine the Operating system and Service Pack of a machine during the scanning/enumeration stage?
Logged
tturner
Sr. Member
****
Offline Offline

Posts: 432


View Profile WWW
« Reply #1 on: January 12, 2011, 09:33:26 AM »

Only as reliable as your tools. It would be great if Nmap was always 100% accurate and it does a pretty good job especially if you are doing service detection as well with -sV. Obviously you won't have IIS running on a BSD box.

For Windows:

It's possible you could use a null session and user2sid to enumerate the SIDs and then do a compare with the entry at http://support.microsoft.com/kb/243330 of well-known SIDs to narrow down the OS list. Supposedly

If you can get shell you can use

Code:
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

or if you just want the OS version you can use

Code:
ver

If you have an account on the box you can detect specific patches remotely with WMIC using

Code:
wmic /node:<target> qfe list full

You may also have to specify username and password if you are using a different account.


Code:
wmic /user:<username> /password:<userpassword> /node:<target> qfe list full

That doesn't exactly answer your question I know since you want to know in scanning/enumeration. I'm not sure there is a 100% way to detect but if there is I'd love to know it!

Check out http://nmap.org/book/osdetect.html for more info
« Last Edit: January 12, 2011, 09:41:47 AM by tturner » Logged

Certifications:
CISSP, CISA, GPEN, GWAPT, GAWN, GCIA, GCIH, GSEC, OPSE, CSWAE, CSTP, VCP

WIP: OSWP, GSSP-JAVA, GXPN

Udacity on hold, again. I suck.

http://sentinel24.com/blog  @tonylturner http://bsidesorlando.org
hell_razor
Jr. Member
**
Offline Offline

Posts: 90


View Profile
« Reply #2 on: January 12, 2011, 01:54:56 PM »

In a windows environment I occasionally get better results with the smb-os-discovery script in NMAP than simply using automated os detection.
Logged

A+, Network+, Server+, CISSP, GSEC, GCIH, GPEN, GCIA, GISP, GCFW
tturner
Sr. Member
****
Offline Offline

Posts: 432


View Profile WWW
« Reply #3 on: January 12, 2011, 02:07:32 PM »

Thanks hell_razor. I was trying to figure out how to accomplish this via SMB null sessions other than user2sid and somehow missed the NMAP script option. I'll have to give that a try sometime.
Logged

Certifications:
CISSP, CISA, GPEN, GWAPT, GAWN, GCIA, GCIH, GSEC, OPSE, CSWAE, CSTP, VCP

WIP: OSWP, GSSP-JAVA, GXPN

Udacity on hold, again. I suck.

http://sentinel24.com/blog  @tonylturner http://bsidesorlando.org
T_Bone
Full Member
***
Offline Offline

Posts: 199


View Profile
« Reply #4 on: January 15, 2011, 10:52:58 AM »

Thanks guys, thats certainly of some help Smiley
Logged
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #5 on: January 16, 2011, 07:55:11 PM »

If SMB is open, I've always found the SMB enumeration modules in Metasploit to be very accurate.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.067 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.