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 32 guests online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow CEH - Certified Ethical Hackerarrow Null sessions in XP
EH-Net
May 25, 2013, 11:11:42 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: Null sessions in XP  (Read 4957 times)
0 Members and 1 Guest are viewing this topic.
Superman859
Newbie
*
Offline Offline

Posts: 5


View Profile
« on: December 15, 2010, 05:11:41 PM »

I'm studying for the CEH and working through some exercises on null sessions.  I'm not sure how useful they are in real life now since it seems XP sp3 and any newer systems seem to have fixed the issue, but I suppose there could be older machines...

Anyways, I have an unpatched XP with no service pack running as a virtual machine and another running XPsp3 where I test from.

I didnt have an any trouble setting up a null session as it told me it was set up successfully.  However, it did take some work to get user2sid to work remotely...it always told me the user did not exist, even though the previous step set up the null session and ports 137 and 445 were both open.  It did seem to work once I put both machines in the same workgroup.

However, I then tried dumpsec to get an enumerated list, but I haven't been able to get that to work.  I set up the null session as before and can use the net use command and user2sid remotely, but after connecting to the same machine in dumpsec it fails to retrieve a list of users...am i doing something wrong?  Is dumpsec broken for XP?  I tried to find some other enum tools that were mentioned in my book, but I cant even find any to download.  The one enum.exe download i found was corrupted, tried searching for 4getacct as mentioned in my book, but the only thing pulled up by google wwas references to the chapter from the book I'm reading.

I also checked the registry settings, which were still the defaults.  Restrictanom was set to 0 and restrictanomsam was set to 1.  Tried changing this to 0 as well to see if that would fix the issue with dumpsec but still no luck...

So...anyone have any ideas?  Is it worth the trouble to even try to get this to work?  Can i still use this in real life or just need to know the idea for the CEH?
Logged

network+, security+
ziggy_567
Sr. Member
****
Offline Offline

Posts: 361


View Profile
« Reply #1 on: December 16, 2010, 10:34:03 AM »

I use enum4linux all the time. It works against all versions of Windows provided they allow null sessions.

http://labs.portcullis.co.uk/application/enum4linux/
Logged

--
Ziggy


eCPPT - GSEC - GCIH - GCUX - RHCE - SCSecA - Security+ - Network+
H1t M0nk3y
Hero Member
*****
Offline Offline

Posts: 865



View Profile
« Reply #2 on: December 16, 2010, 11:10:14 AM »

Welcome Superman859 to the forum!

Based on what you wrote, you know more than you need to pass the C|EH exam. This exam focuses more on which tools can be used to exploit a NULL session vulnerability and how can you check if there is a NULL session in the first place.

Although knowledge is always good, I think you are going too far for this exam...  Wink
Logged

OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
Superman859
Newbie
*
Offline Offline

Posts: 5


View Profile
« Reply #3 on: December 16, 2010, 02:42:02 PM »

@h1t M0nk3y : You're right.  I probably do know enough to pass the C|EH considering the format it's in and things of that nature.  But I don't intend to stop at the C|EH and want to learn along the way as it will help me in the real world as well as preparation for more challenging exams in the future.  Might as well learn it right the first time!

@ziggy : I downloaded enum4linux and seems it could be pretty handy and straightforward to use.  Unfortunately I'm having the same issue with it that I had using Dumpsec.  I can't enumerate information even though it seems like it connects fine using IPC$.

With enum4linux running enum4linux.pl -a targetIP I see it successfully gets:

domain/workgroup name (workgroup in this case)
nbstat information
server allows sessions using username '' password ''
domain sid (NULL SID) cant determine if host is part of domain or workgroup
gets some OS information

But now we start having issues:
users on targetIP:
couldnt find users using querydispinfo or enumdomusers NT_STATUS_ACCESS_DENIED

share enumeration:
share enumeration works (gets shares, including IPC$ and a test one I created), but
session request to targetIP failed (called name not present)
attempting to map shares fails resulting in denied for all shares EXCEPT
targetIP/IPC$ mapping: OK Listing: Denied

And then later on,
couldnt get RID: NT_STATUS_ACCESS_DENIED. RID cycling not possible


And that's basically it.  So again, seems to be the same issue.  Can connect to IPC$ but can't really get much information.

Double checked settings on targetIP...both restrictanonymous and restrictanonymoussam are currently set to 0.  Windows Firewall is off altogether...
Logged

network+, security+
tturner
Sr. Member
****
Offline Offline

Posts: 432


View Profile WWW
« Reply #4 on: December 16, 2010, 04:09:13 PM »

Check Network access: Allow anonymous SID/name translation

http://technet.microsoft.com/en-us/library/cc728431%28WS.10%29.aspx


Even when Network access: Do not allow anonymous enumeration of SAM accounts (and shares) is enabled you can still use sid2user and user2sid as it uses a separate api to pull that information and will still work if that SID/name translation is set to 1.

You could automate this with a FOR loop for all the user accounts starting with RID 1000 and going to 1050. Admin accounts start at 500 so just modify the script accordingly

Code:
for /L %i IN (1000,1,1050) DO sid2user \\targetpc  "machine sid space delimited" %i >> users.txt
« Last Edit: December 16, 2010, 04:19:14 PM 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
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.063 seconds with 24 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.