Skip to content
James Lee edited this page May 26, 2015 · 24 revisions

Welcome to the Smb2 wiki!

Smb2 Design Goals

Sockets should be made by the application, not the library

This means Smb2 should work with anything that responds to a certain interface, i.e., if it looks like a socket, it should work. To that end, the Smb2::Dispatcher classes act as a wrapper for whatever socket you like.

Follow the spec by default

The Smb2 library should, by default, produce packets that look like Windows' packets or smbclient's packets.

Allow deviating when necessary

Since BitStruct objects are just Strings, it's pretty easy to modify them before dumping to the wire. If an application wants to push malformed packets, the library shouldn't care.

Smb2 Remaining Work

Pass-the-Hash in rubyntlm gem

Necessary for preserving the same functionality as existing protocol in Rex::Proto::SMB. May involve forking gem until they can merge into upstream.

Integration with Metasploit Framework

Two options for ntlm support:

  1. Use rubyntlm in Rex::Proto::SMB and Rex::Proto::Http.
    • pro: makes everything that uses NTLM consistent; cleaner API
    • con: more work
  2. Keep the namespaced copy of our forked NTLM code in Rex::Proto::NTLM and use rubyntlm only for Smb2
    • pro: easier
    • con: code bloat/duplication

Make Rex::Proto::DCERPC work on top of Smb2

  • Protocol already defined in already on the old Rex::Proto::SMB

Smb2 backports

Extend Smb2's bit-struct stuff to work on SMB 1.

Clone this wiki locally