Skip to content

Samba Suite

It’s used to enumerate info. It might be used in a Null session attack.

Installation

Download it from: https://www.samba.org/

Basic commands

  1. Enumerate File Server services:
nmblookup -A $ip
  1. Also with the smbclient we can enumerate the shares provides by a host:
smbclient -L //$ip -N

# -L  Look at what services are available on a target
# $ip Prepend the two slahes
# -N  Force the tool not to ask for a password
  1. Connect:
smbclient \\$ip\sharedfolder -N

Be careful, sometimes the shell removes the slashes and you need to escape them.

  1. Once connected you can browse with the smb command line. To see allowed commands: help
  2. When you know the path of a file and you want to retrieve it:
    • from kali:
      smbget smb://$ip/SharedFolder/flag_1.txt
      
    • from smb command line:
      get flag_1.txt
      
Last update: 2023-07-01
Created: February 2, 2023 19:36:50