smb

command module
v0.0.0-...-4cb7d83 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 4 Imported by: 0

README

Note for fork

I know it seems like I just replaced the OG author with my own. Promise that its not. Making a security tool with this fork.

Using the challenge issues by the server duing the NTLMSSP process, we are able to grab the NETBIOS and FQDN of the target machine with out having to authenticate.

Link to microsoft whitepaper about NTLMSSP

OG README

SMB

A Go package for communicating over SMB. Currently only minimal funcationality exists for client-side functions.

Here is a sample client that establishes a session with a server:

package main

import (
	"log"

	"github.com/ilightthings/smb/smb"
)

func main() {

	host := "172.16.248.192"
	options := smb.Options{
		Host:        host,
		Port:        445,
		User:        "alice",
		Domain:      "corp",
		Workstation: "",
		Password:    "Password123!",
	}
	debug := false
	session, err := smb.NewSession(options, debug)
	if err != nil {
		log.Fatalln("[!]", err)
	}
	defer session.Close()

	if session.IsSigningRequired {
		log.Println("[-] Signing is required")
	} else {
		log.Println("[+] Signing is NOT required")
	}

	if session.IsAuthenticated {
		log.Println("[+] Login successful")
	} else {
		log.Println("[-] Login failed")
	}

	if err != nil {
		log.Fatalln("[!]", err)
	}
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
smb

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL