GeorgeBanu
  • About me
  • Pentesting CheatSheets
    • Information Gathering
    • Ports Enumeration
      • FTP-21
      • SSH-22
      • Telnet-23
      • SMTP - 25,465,587
      • DNS-53
      • NetBIOS, SMB - 139,445
      • SNMP-161
      • MySQL-3306
      • RDP-3389
      • WinRM-5985
    • Web Cheat Sheet
    • Privilege Escalation
      • Linux Enumeration
      • Linux Privesc Techniques
    • Tricks
    • Template
  • TryHackMe Writeups
    • Starter
    • Dreaming
    • ColddBox: Easy
    • Ollie
    • Blog
    • KoTH Hackers
    • Brooklyn Nine Nine
    • Chill Hack
    • Undiscovered
    • Archangel
    • Jason
    • GLITCH
    • VulnNet: Node
    • Road
    • VulnNet:Internal
    • W1seGuy
  • CyberEDU Writeups
    • flag-is-hidden
    • file-crawler
    • reccon
    • this-file-hides-something
    • wifiland
    • old-tickets
    • inodat
    • pattern
    • ultra-crawl
  • eJPT
Powered by GitBook
On this page
  1. Pentesting CheatSheets
  2. Ports Enumeration

NetBIOS, SMB - 139,445

  • list SMB shares

nmap --script "safe or smb-enum-*" -p 139,445 $IP -oN recon/nmap.smb_enum
smbmap -H return.local -u svc-printer -p "1edFg43012\!\!" -r
  • basic enumeration

enum4linux -avA $IP -u user -p pass > recon/enum_4_linux
nmblookup -A $IP
nbtscan 192.168.10.0/24 # Discover Windows Servers on a subnet
nmap --script=smb-enum-shares --script-args smbusername=$username,smbpassword=$password -p 139,445
  • check vulns

nmap --script smb-vuln* -p 139,445 $IP -oN recon/nmap.smb_vuln
  • read shares

smbclient -N -L \\\\$IP
smbclient -U 'user%passwd' -L //$IP
smbclient -N //$IP/share
  • download files recursively

smbclient '\\\\$IP\\share' -N -c 'prompt OFF ; recurse ON ; cd 'where\from' ; lcd 'where/to'
PreviousDNS-53NextSNMP-161

Last updated 1 year ago