🥷
Offensive Security
  • Shells and stuffs
    • Bind Shell
    • Reverse Shell
    • TTY Shell
    • File Transfer
    • Handmade Network Scan
  • Services enumeration
    • DNS Enumeration
    • SMB Enumeration
    • NFS Enumeration
  • Linux Privilege Escalation
    • Useful Tools
    • Hijack X11 session
    • Linux capabilities
    • LXC membership
  • Windows Privilege Escalation
    • Useful Tools
  • Password Attacks
    • Build Wordlist
    • Network Service Attacks
    • Password Cracking
  • Active Directory
    • AD CS
  • OSINT
    • Google Dorks
Powered by GitBook
On this page
  • Network scan
  • Retrieve information
  • Nmap
  • Enum4Linux
  • Enumerate Users & Groups
  • Crackmapexec
  • Shares enumeration
  • List shares and connect
  • Mount a shared folder
  • Download files
  1. Services enumeration

SMB Enumeration

Network scan

nbtscan -r 192.168.1.0/24

Retrieve information

Nmap

nmap --script "safe or smb-enum-*" -p 139,445 <IP>

Enum4Linux

enum4linux-ng -A <IP>
enum4linux-ng -A -u <user> -p <password> <IP>

Enumerate Users & Groups

Crackmapexec

crackmapexec smb <IP> --users [-u <user> -p <password>]
crackmapexec smb <IP> --groups [-u <user> -p <password>]

Shares enumeration

List shares and connect

Smbclient

smbclient -N -L //<IP>
smbclient -N //<IP>/<Folder>
smbclient -U '<username[%password]>' -L //<IP>
smbclient -U '<username[%password]>' //<IP>/<Folder>

Smbmap

smbmap -H <IP> [-P <PORT>]
smbmap -u <username> -p <password> -H <IP> [-P <PORT>]
smbmap [-u <username -p <password>] -R [<Folder>] -H <IP> [-P <PORT>]

Crackmapexec

crackmapexec smb <IP> -u '' -p '' --shares
crackmapexec smb <IP> -u <username> -p <password> --shares

Mount a shared folder

mount -t cifs //<IP>/share /mnt/share
mount -t cifs -o "username=<username>,password=<password>" //<IP>/share /mnt/share

Download files

smbclient //<IP>/<share>
> mask ""
> recurse
> prompt
> mget *
PreviousDNS EnumerationNextNFS Enumeration

Last updated 2 years ago