Skip to content
dmaloney-r7 edited this page Mar 31, 2017 · 24 revisions

Getting Started

Some things to do to get started contributing to this project:

  • Fork this Repo like you would any other Github project
  • Familiarise yourself with the SMB and SMB2 protocols
  • Familiarise yourself with the BinData Library as all packets are created using this library.

RubySMB Design Goals

Sockets should be made by the application, not the library

This means RubySMB 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 Dispatcher classes act as a wrapper for whatever socket you like.

Follow the spec by default

The RubySMB library should, by default, produce packets that conform to the spec.

Details on the packet specifications for the protocol can be found on MSDN:

SMB1 SMB2

In general, the library should attempt to look as close as possible to traffic produced by legitimate clients like Windows, OSX, or smbclient.

We recommend observing actual traffic in Wireshark while having clients perform the actions you are trying to implement. For example, if you were implementing writing to a file, open Wireshark on the server and then from a Windows client write a file to the share. Wireshark's SMB/SMB2 Dissectors are excellent, and will help you understand what is going on.

Allow deviating when necessary

RubySMB is being developed with an eye towards use in Metasploit. This means that we need to be able to send packets that do NOT confirm to the spec sometimes, in order to create certain exploit scenarios. Every packet can be individually crafted, and altered either as a BinData structure, or after it has been turned into a binary string, but before it is sent over the wire.

An Easy to use client

The RubySMB::Client should have easy simple to use interfaces that allow people to perform basic tasks over SMB without having to care about all of the underlying mechanisms. It should not, however, restrict access to those mechanisms. The Client is being built in such a way that a user can reach past the levels of abstraction as deeply or shallowly as they need for their own purposes.

Short Term Goals

  • Complete all File CRUD(Create Read Update Delete) capabilities
  • Make sure we can support named pipes
  • Implement a basic File Server that allows users to register a resource on the server and assign a callback to be fired whenever that resource is required
  • smb_version module updated to use this library
  • psexec module updated to use this library
  • Meterpreter named pipe transport
  • Integrate the file server so that exploits can use it to serve files up

Long Term Goals

  • Circle back for SMB3 support
  • Add SMB3 Encryption
Clone this wiki locally