VulnableOne
  • πŸ§˜β€β™‚οΈAbout Me
  • Offensive Treasure
    • 🧌Penetration Testing
      • Reconnaissance
        • Identify Ports/Hosts/Data
      • Enumeration
        • Service Ports
          • FTP (21)
          • SSH (22)
          • SMTP (25)
          • DNS (53)
          • TFTP (69/udp)
          • Finger (79)
          • SaMBa (139/445)
          • RPC/NFS (111/135)
          • SNMP (161/udp)
          • LDAP (389)
          • isakmp (500/udp)
          • Java (1099)
          • MS-SQL (1433)
          • MySQL (3306)
          • Distcc (3622)
          • PostgreSQL (5437)
          • Redis (6379)
      • Password Attack
        • Wordlist
        • Brute-Force
        • Crack Hash
      • File Transfer
        • Linux
        • Window
      • Misc
      • Theory
        • Nmap
        • Wireless
        • OSI Model - TCP/IP
        • R* Service
        • Hash
        • Solaris
        • SIP
        • Cisco Password Encryption
        • Time to Live
        • Windows
          • WMIC
          • IIS Version
          • Windows Version
          • Active Directory
        • Linux
        • Database
          • Page 7
          • MSSQL
          • PostgreSQL
          • MySQL
        • Asymmetric Encryption
        • Symmetric Encryption
        • Tools
        • ICMP
        • IP Address
        • VLAN
        • Acronyms
        • HTTP Status
        • HTTP Method
        • Protocol
        • Common Ports
    • πŸ§™β€β™‚οΈAD Attack
      • Domain Enumeration
        • PowerView
        • AD-Module
        • Bloodhound
      • Abuse ACLs
        • GenericAll
        • GenericWrite
        • WriteDACL
        • ForceChangePassword
      • Kerberos Attack
        • Kerberoasting
        • ASREPRoasting
        • Unconstrained Delegation
        • Constrained Delegation
        • Resource Based Constrained Delegation
      • LAPs
      • MS SQL Servers
        • PowerUpSQL
        • SQL Server Management
        • Impacket-MSSQL
    • πŸ₯·Red Team
      • Reconnaissance
        • Active Scanning
          • Scanning IP Blocks
          • Vulnerability Scanning
          • Wordlist Scanning
        • Gather Victim Host Information
          • Software
        • Gather Victim Identity Information
          • Credentials
          • Email Addresses
        • Search Open Websites/Domains
          • Social Media
          • Search Engines
          • Code Repositories
        • Search Victim-Owned Websites
      • Resource Development
        • C2 Infrastructure
        • Metasploit
      • Execution
        • Bash - Reverse Shell
        • HTA
        • JScript Dropper
        • Macro
        • Metasploit
        • Network Tools
        • Powershell
        • Python
        • VBA
        • Web Shell
        • WSH
      • Persistence
        • Logon Script
        • Startup Folder
        • WinLogon (Elevated)
        • Run / RunOnce (Elevated)
        • Scheduled Tasks (Elevated )
      • Privilege Escalation
        • Windows
          • SeBackup / SeRestore
          • SeTakeOwnership
          • SeImpersonate / SeAssignPrimaryToken
          • UAC Bypass
          • AutoInstall Elevate
          • Unquoted Service Paths
          • Weak Service Permissions
          • Weak Service Binary Permissions
        • Linux
          • Escalation
      • Defense Evasion
        • Bypassing AV
          • Pack Shellcode
        • Security Control
          • CLM
          • AppLocker
        • Use Alternate Authentication Material
          • Pass The Hash
          • Over Pass The Hash
          • Extract Tickets
          • Pass The Ticket
        • Impersonate
      • Credential Access
        • Adversary-in-the-Middle
          • LLMNR/NBT-NS/MDNS Poisoning
          • Evil SSDP
        • OS Credential Dumping
          • Protected LSASS
          • Invoke-Mimikatz
          • Mimikatz.exe
          • Secretsdump
          • Meterpreter Kiwi
          • Registry
          • Shadow Copy
          • DCSync
        • Steal or Forge Kerberos Tickets
          • Silver Ticket
          • Golden Ticket
        • Steal Web Session Cookie
      • Lateral Movement
        • Remote Access
        • Pivoting
          • Linux
          • Window
    • Web Application
      • Basic Recon
  • Blog
    • πŸ“Empty!!!
  • Course Review
    • πŸ‘¨β€πŸŽ“Cyber Security Courses Journey
      • PNPT Journey
      • OSCP Journey
        • 🚩CTF
          • Hack The Box
            • Linux Boxes
              • βœ…Admirer (Easy)
              • βœ…Bashed (Easy)
              • βœ…Beep (Easy)
              • βœ…Blocky (Easy)
              • βœ…FriendZone (Easy)
              • βœ…Irked (Easy)
              • βœ…Lame (Easy)
              • βœ…Mirai (Easy)
              • βœ…Networked (Easy)
              • βœ…Nibbles (Easy)
              • βœ…OpenAdmin (Easy)
              • βœ…Sense (Easy)
              • βœ…Shocker (Easy)
              • βœ…Sunday (Easy)
              • βœ…Tabby (Easy)
              • βœ…Traverxec (Easy)
              • βœ…Valentine (Easy)
              • βœ…Cronos (Medium)
              • βœ…Haircut (Medium)
              • βœ…Jarvis (Medium)
              • βœ…Magic (Medium)
              • βœ…Nineveh (Medium)
              • βœ…Node (Medium)
              • βœ…Poison (Medium)
              • βœ…SolidState (Medium)
              • βœ…TartarSauce (Medium)
            • Window Boxes
              • βœ…Arctic (Easy)
              • βœ…Active (Easy)
              • βœ…Blue (Easy)
              • βœ…Bounty (Easy)
              • βœ…Devel (Easy)
              • βœ…Forest (Easy)
              • βœ…Granny (Easy)
              • βœ…Granpa (Easy)
              • βœ…Jerry (Easy)
              • βœ…Legacy (Easy)
              • βœ…Optimum (Easy)
              • βœ…Bastard (Medium)
              • βœ…Silo (Medium)
          • Buffer Overflow
            • BOF - Tib3rius
            • BOF - TCM
              • 1- Spiking
              • 2- Fuzzing
              • 3- Finding Offset
              • 4- Overwriting EIP
              • 5- Finding Bad Characters
              • 6- Finding the Right Module
              • 7- Generating Shellcode
Powered by GitBook
On this page
  • Nmap Script
  • SmbMap
  • Crackmap
  • SmbClient
  • Enum4linux
  • Download File
  • Map Drive
  1. Offensive Treasure
  2. Penetration Testing
  3. Enumeration
  4. Service Ports

SaMBa (139/445)

Nmap Script

# Enumeration Users
nmap --script=smb-enum-users 10.10.10.10 

# Check for Vuln with nse script
nmap -p445 --script "vuln and safe" 10.10.10.10 

# Checking for Vulnerable
nmap -script=smb-vuln\* -p445 10.10.10.10 

#Nmap script to list the supported protocols and dialects of an SMB server.

nmap -p445 --script smb-protocols 10.10.10.10 

#Running security mode script to return the information about the SMB security level.

nmap -p445 --script smb-security-mode 10.10.10.10 

#Enumerate all available share
nmap -p445 --script smb-enum-shares 10.10.10.10 

#Enumerating all the shared folders and drives then running the ls command
nmap -p445 --script smb-enum-shares,smb-ls --script-args
smbusername=administrator,smbpassword=smbserver_771 10.10.10.10 

SmbMap

# List share folder and permission on share drive
smbmap -H -R 10.10.10.10 

# Connect smb with username empty string
smbmap -H 10.10.10.10  -u "test -p "user

#Execute the command through SMB
smbmap -H 10.10.10.10 -u administrator -p smbserver_771 -x 'ipconfig'

Crackmap

crackmapexec smb --shares 10.10.10.10 -u '' -p ''

SmbClient

# List the share folder with no authentication
smbclient -L \\10.10.10.10 -N

# List all folders are avaialble
smbclient -L 10.10.10.10

# Connect to share folder
smbclient //10.10.10.10/users

smbclient -N //10.10.10.10/tmp

#Connect with credentials
smbclient -U admin //10.10.10.10/general

#Connect without credentials
smbclient -U '' -L //10.10.10.10

└─$ smbclient -L $ip -U 'user%password123'


*** Custom Ports
=======================================================
└─$ smbclient -L 10.10.10.10 -p36445
Enter WORKGROUP\pwned's password: 
Anonymous login successful

        Sharename       Type      Comment
        ---------       ----      -------
        Commander       Disk      Commander Files
        IPC$            IPC       IPC Service (Samba 4.12.6)
Reconnecting with SMB1 for workgroup listing.
do_connect: Connection to 10.10.10.10 failed (Error NT_STATUS_IO_TIMEOUT)
Unable to connect with SMB1 -- no workgroup available

Enum4linux

# Do all simple enumeration
enum4linux 10.10.10.10

# Get a list of user
└─$ enum4linux -U 10.10.10.10  

Download File

recurse on
prompt off
mget *

Map Drive

#Open β€œMap Network Drive”
Go to This PC β†’ Network β†’ Right Click on Network β†’ Map Network Drive

#Via cmd
net use Z: \\10.10.10.10\C$ password123 /user:administrator
[Map Drive]
==================================================================
- Go to This PC -> Network -> Right Click on Network -> Map Network Drive
- net use Y: \\$ip\C$ -> Y:
- net use Y: \\$ip\C$ /user:administrator Password
- showmount -e $ip
- mount -t cifs -o "username=user,password=password" //$ip/share /mnt/share
- mount -f cifs //$ip/share /mnt/shar
PreviousFinger (79)NextRPC/NFS (111/135)

Last updated 1 year ago

🧌