How to disable CIFS Null Login sessions

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I scanned my servers on vulnerabilities recently and some ubuntu servers have following issue: CIFS NULL Session Permitted



Description:
NULL sessions allow anonymous users to establish unauthenticated CIFS sessions with Windows or third-party CIFS implementations such as http://www.samba.org or the http://www.opensolaris.org/os/project/cifs-server/ . These anonymous users may be able to enumerate local users, groups, servers, shares, domains, domain policies, and may be able to access various MSRPC services through RPC function calls. These services have been historically affected by numerous vulnerabilities.



Which settings do I need to set in my smb.conf file to solve this issue?







share|improve this question
























    up vote
    0
    down vote

    favorite












    I scanned my servers on vulnerabilities recently and some ubuntu servers have following issue: CIFS NULL Session Permitted



    Description:
    NULL sessions allow anonymous users to establish unauthenticated CIFS sessions with Windows or third-party CIFS implementations such as http://www.samba.org or the http://www.opensolaris.org/os/project/cifs-server/ . These anonymous users may be able to enumerate local users, groups, servers, shares, domains, domain policies, and may be able to access various MSRPC services through RPC function calls. These services have been historically affected by numerous vulnerabilities.



    Which settings do I need to set in my smb.conf file to solve this issue?







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I scanned my servers on vulnerabilities recently and some ubuntu servers have following issue: CIFS NULL Session Permitted



      Description:
      NULL sessions allow anonymous users to establish unauthenticated CIFS sessions with Windows or third-party CIFS implementations such as http://www.samba.org or the http://www.opensolaris.org/os/project/cifs-server/ . These anonymous users may be able to enumerate local users, groups, servers, shares, domains, domain policies, and may be able to access various MSRPC services through RPC function calls. These services have been historically affected by numerous vulnerabilities.



      Which settings do I need to set in my smb.conf file to solve this issue?







      share|improve this question












      I scanned my servers on vulnerabilities recently and some ubuntu servers have following issue: CIFS NULL Session Permitted



      Description:
      NULL sessions allow anonymous users to establish unauthenticated CIFS sessions with Windows or third-party CIFS implementations such as http://www.samba.org or the http://www.opensolaris.org/os/project/cifs-server/ . These anonymous users may be able to enumerate local users, groups, servers, shares, domains, domain policies, and may be able to access various MSRPC services through RPC function calls. These services have been historically affected by numerous vulnerabilities.



      Which settings do I need to set in my smb.conf file to solve this issue?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 30 at 6:59









      Lumpi

      11




      11




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          In smb.conf, this is what I did:



          I added / changed these lines to



          map to guest = Never # Disables any login with a non-user
          restrict anonymous = 2 # Disables recon potential
          usershare allow guests = no # Not sure exactly what this does, but looked like a good one to set to no


          Then, I also changed any guest_ok lines to no



          guest ok = no





          share|improve this answer




















          • Oh right, haha, then do service smbd restart Then, the vulnerability scanner did not detect the issue anymore. Another way to manually test is to use the net command from windows to try and do a null session. As far as I can tell, the scanner is looking to see if it can do that or login. dummies.com/programming/networking/…
            – user7133679
            Aug 1 at 18:49










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1029978%2fhow-to-disable-cifs-null-login-sessions%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          In smb.conf, this is what I did:



          I added / changed these lines to



          map to guest = Never # Disables any login with a non-user
          restrict anonymous = 2 # Disables recon potential
          usershare allow guests = no # Not sure exactly what this does, but looked like a good one to set to no


          Then, I also changed any guest_ok lines to no



          guest ok = no





          share|improve this answer




















          • Oh right, haha, then do service smbd restart Then, the vulnerability scanner did not detect the issue anymore. Another way to manually test is to use the net command from windows to try and do a null session. As far as I can tell, the scanner is looking to see if it can do that or login. dummies.com/programming/networking/…
            – user7133679
            Aug 1 at 18:49














          up vote
          0
          down vote













          In smb.conf, this is what I did:



          I added / changed these lines to



          map to guest = Never # Disables any login with a non-user
          restrict anonymous = 2 # Disables recon potential
          usershare allow guests = no # Not sure exactly what this does, but looked like a good one to set to no


          Then, I also changed any guest_ok lines to no



          guest ok = no





          share|improve this answer




















          • Oh right, haha, then do service smbd restart Then, the vulnerability scanner did not detect the issue anymore. Another way to manually test is to use the net command from windows to try and do a null session. As far as I can tell, the scanner is looking to see if it can do that or login. dummies.com/programming/networking/…
            – user7133679
            Aug 1 at 18:49












          up vote
          0
          down vote










          up vote
          0
          down vote









          In smb.conf, this is what I did:



          I added / changed these lines to



          map to guest = Never # Disables any login with a non-user
          restrict anonymous = 2 # Disables recon potential
          usershare allow guests = no # Not sure exactly what this does, but looked like a good one to set to no


          Then, I also changed any guest_ok lines to no



          guest ok = no





          share|improve this answer












          In smb.conf, this is what I did:



          I added / changed these lines to



          map to guest = Never # Disables any login with a non-user
          restrict anonymous = 2 # Disables recon potential
          usershare allow guests = no # Not sure exactly what this does, but looked like a good one to set to no


          Then, I also changed any guest_ok lines to no



          guest ok = no






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 31 at 22:03









          user7133679

          1




          1











          • Oh right, haha, then do service smbd restart Then, the vulnerability scanner did not detect the issue anymore. Another way to manually test is to use the net command from windows to try and do a null session. As far as I can tell, the scanner is looking to see if it can do that or login. dummies.com/programming/networking/…
            – user7133679
            Aug 1 at 18:49
















          • Oh right, haha, then do service smbd restart Then, the vulnerability scanner did not detect the issue anymore. Another way to manually test is to use the net command from windows to try and do a null session. As far as I can tell, the scanner is looking to see if it can do that or login. dummies.com/programming/networking/…
            – user7133679
            Aug 1 at 18:49















          Oh right, haha, then do service smbd restart Then, the vulnerability scanner did not detect the issue anymore. Another way to manually test is to use the net command from windows to try and do a null session. As far as I can tell, the scanner is looking to see if it can do that or login. dummies.com/programming/networking/…
          – user7133679
          Aug 1 at 18:49




          Oh right, haha, then do service smbd restart Then, the vulnerability scanner did not detect the issue anymore. Another way to manually test is to use the net command from windows to try and do a null session. As far as I can tell, the scanner is looking to see if it can do that or login. dummies.com/programming/networking/…
          – user7133679
          Aug 1 at 18:49

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1029978%2fhow-to-disable-cifs-null-login-sessions%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Running the scala interactive shell from the command line

          Unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst)

          What makes Checkinstall packages not suitable for distribution?