Handling authentication is a big chunk of work, and it is best to try and reduce the number of simultaneous problems to a manageable few. We are not ready yet for a detailed study of SMB innards.
For this example, we will use the Exists. Test Client The next thing you will want is a packet flinger. Samba offers the smbclient utility, and jCIFS comes with a variety of example programs. The trace is reasonably simple. You need this for testing, and to compare behavior when debugging your own client.
If you can configure your test server to allow anonymous connections no username, no password it will simplify things at this stage. It shows that SMBs are composed of three basic parts: Use the program above as a starting point for building your own SMB client utility.
Test Server If you are going to start testing, you have to have something at which to fling packets. These are our first SMBs.
Sniffer Always your best friend. Fire up your protocol analyzer, and then your SMB client. In particular, you probably want to avoid strong password encryption during the initial stages. It is a very simple utility that does nothing more than verify the existence of the object specified by the given SMB URL string, like so: Sambaof course, is highly configurable.
A key feature of this program is the line within main which reads: Packets 9 and 10 are what we want. Source Destination Protocol Info 1 Marika Keep in mind that the goal of our first trip into the wilds of SMB-land is to become familiar with the terrain and to study SMBs in their natural habitat, so we can learn about their anatomy and behavior.
Windows systems all have SMB support built-in. It is also true that "an SMB" is a message. When you have all of that put together, you will have completed the foundation of your SMB client. If you know your way around the Windows Registry, you may have luck with those systems as well.
Stop your sniffer and take a look at the trace.Chris, Hope things are going well in the cold north I thought the following info would be interesting to you. I met the original "inventor" of SMB a few years ago - Dr. Barry Feigenbaum - who back in the early 80's was working on network software architecture for the infant IBM PCs, working for IBM in the Boca Raton plant in Florida.Download