LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-25-2008, 04:41 AM   #1
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Rep: Reputation: 45
NULL sessions in linux


Hello all,
most of you would be having the perception that NULL sessions are possible on windows only.
Yesterday while pentesting i found a Linux machine vulnerable to it.

I was on windows machine while trying for NULL sessions:
#net view \\IP
It threw an error

#net use \\IP\IPC$ "" /u:""
.........executed successfully

#net view \\IP
spited out the shares

I was perplexed...so did google, but unfortunately found following results only
http://marc.info/?l=samba&w=2&r=1&s=...ion+nessus&q=b
and
http://www.linux-faqs.com/archive/re.../msg05665.html

would someone else like to put some more light on this issue...?


regards
 
Old 03-27-2008, 01:18 AM   #2
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 774

Rep: Reputation: 243Reputation: 243Reputation: 243
This is controlled with the "security" setting (see smb.conf) and a few others.

map to guest

This parameter can take four different values, which tell smbd(8)
what to do with user login requests that don't match a valid UNIX
user in some way.

Quote:
Sections may be designated guest services, in which case no password is
required to access them. A specified UNIX guest account is used to
define access privileges in this case.

Sections other than guest services will require a password to access
them. The client provides the username. As older clients only provide
passwords and not usernames, you may specify a list of usernames to
check against the password using the user = option in the share defini-
tion. For modern clients such as Windows 95/98/ME/NT/2000, this should
not be necessary.

The access rights granted by the server are masked by the access rights
granted to the specified or guest UNIX user by the host system. The
server does not grant more access than the host system grants.
The basic point I think is, on Samba you get to see exactly what the admin wanted you to see, while on Windows it's (sometimes) a surprise. IMO, I think too much has been made of the so-called NULL sessions. In some cases it is required for correct functioning of the system. You have to look at the context of where you are serving SMB/CIFS to: your local intranet or the Internet at large? Then, select the security model and corresponding config options that grant you what you need.

See smb.conf(5), Samba3-ByExample.pdf, and Samba3-HOWTO.pdf (all in the Samba distribution) for full config instructions.
 
Old 03-27-2008, 01:50 AM   #3
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Original Poster
Rep: Reputation: 45
Thanks bro...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript:: alert(node) shows null, but node != null taylor_venable Programming 1 05-01-2006 09:51 PM
fstab-sync: error: libhal_ctx_init_direct: (null): (null) rpz Linux - Hardware 1 11-01-2005 05:42 AM
linux + rebooting = null; nadroj Linux - General 3 03-17-2005 12:54 PM
RedHat Linux 7.3.94 Beta Null dnar Linux - Distributions 0 08-20-2002 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration