Apuntes Ciberseguridad (Cibaism)
HTBGitHubLinkedInNotion (Writeups)
  • Welcome to My Digital Garden
  • About me
  • Hacking notes (Personal)
    • Tratamiento TTY
    • Hacking Web Tecniques
      • File Inclusion
    • Linux Privilage Escalation
    • Arreglar bloodhound
  • Hacking Notes (Learning Path)
    • (HTB) Penetration Tester
      • Getting Started
        • Common Terms
          • Tipos de Shell
          • Puertos importantes
          • OWASP Top 10
        • Service Scanning
          • Nmap
          • Attacking Network Services
            • Captura de banners
            • FTP
            • SMB
            • SNMP
        • Web Enumeration
        • Public exploits
          • Encontrar exploits públicos
          • Introducción a Metasploit
        • Types of Shells
          • Reverse Shell
          • Bind Shell
          • Web Shell
        • Privilage escalation
        • Transferring Files
      • Footprinting
        • Infrastructura Based Enumeration
          • Domain Information
          • Cloud Resources
          • Staff
        • Host Based Enumeration
          • FTP
          • SMB
          • NFS
          • DNS
          • SMTP
          • IMAP / POP3
          • SNMP
          • MySQL
          • MSSQL
          • Oracle TNS
          • IPMI
          • Protocolos de administración remota de Linux
          • Protocolos de administración remota de Windows
      • Introduction to Active Directory Enumeration & Attacks
        • Tools of the Trade
        • Initial enumeration
          • External Recon and Enumeration Principles
          • Initial Enumeration of the Domain
        • Sniffing out a Foothold
          • LLMNR/NBT-NS Poisoning - from Linux
          • LLMNR/NBT-NS Poisoning - from Windows
        • Sighting In, Hunting For A User
          • Password Spraying Overview
          • Enumerating & Retrieving Password Policies
          • Password Spraying - Making a Target User List
        • Spray Responsibly
          • Internal Password Spraying - from Linux
      • File Inclusion
        • File Disclousure
          • Local File Inclusion (LFI)
          • Basic Bypasses
          • PHP Filters
        • Remote Code Execution
          • PHP Wrappers
    • (CRTA) Red Team Analyst
      • (CRTA) Red Team Analyst - Lab
    • (eJPT) Junior Penetration Tester
      • Assessment Methodologies
        • Assessment Methodologies: Footprinting & Scanning
          • Windows Recon: Nmap Host Discovery
          • Scan the Server 1
          • Windows Recon: SMB Nmap Scripts
        • Assessment Methodologies: Enumeration
          • Importing Nmap Scan Results Into MSF
          • T1046 : Network Service Scanning
          • FTP Enumeration
          • Samba Recon: Basics
          • Apache Enumeration
          • MySQL Enumeration
          • SSH Login
          • Postfix Recon: Basics
        • Assessment Methodologies: Vulnerability Assessment
          • Windows: IIS Server DAVTest
          • Shellshock
          • Web App Vulnerability Scanning With WMAP
      • Host & Network Penetration Testing
        • Host & Network Penetration Testing: System/Host Based Attacks
          • Windows
            • Windows: IIS Server: WebDav Metasploit
            • Windows: SMB Server PSexec
            • Windows: Insecure RDP Service
            • WinRM: Exploitation with Metasploit
            • UAC Bypass: UACMe
            • Privilege Escalation: Impersonate
            • Unattended Installation
            • Windows: Meterpreter: Kiwi Extension
          • Linux
            • ProFTP Recon: Basics
            • Samba Recon: Dictionary Attack
            • Cron Jobs Gone Wild II
            • Exploiting Setuid Programs
            • Password Cracker: Linux
        • Host & Network Penetration Testing: Network-Based Attacks
          • NetBIOS Hacking
          • SNMP Analysis
          • DNS & SMB Relay Attack
        • Host & Network Penetration Testing: The Metasploit Framework (MSF)
          • Windows: Java Web Server
          • Windows: HTTP File Server
          • Vulnerable FTP Server
          • Vulnerable File Sharing Service
          • Vulnerable SSH server
          • Vulnerable SMTP Server
          • Meterpreter Basics
          • Upgrading Command Shells To Meterpreter Shells
          • Windows Post Exploitation Modules
          • UAC Bypass: Memory Injection (Metasploit)
          • Exploiting SMB With PsExec
          • Windows: Enabling Remote Desktop
          • Clearing Windows Event Logs
          • Pivoting
  • Blue team notes
    • Digital Forensics
      • Malware Analysis with VirusTotal
      • Wireshark
    • (Falcon) CrowdStrike
      • FALCON 104: Getting Started with the Endpoint Security Module
      • FALCON 106: Customizing Dashboards in Falcon
      • FALCON 180: Falcon Forensics Fundamentals
  • Programming
    • Powershell
Powered by GitBook
On this page
  • Lab Environment
  • Tools
  • Writeup
  • Default TCP Ports Used by smbd
  • Default UDP Ports Used by nmbd
  • Workgroup Name of Samba Server
  • Exact Samba Version (Nmap)
  • Exact Samba Version (Metasploit)
  • NetBIOS Computer Name (Nmap)
  • NetBIOS Computer Name (nmblookup)
  • Check Anonymous Login (smbclient)
  • Check Anonymous Login (rpcclient)
  1. Hacking Notes (Learning Path)
  2. (eJPT) Junior Penetration Tester
  3. Assessment Methodologies
  4. Assessment Methodologies: Enumeration

Samba Recon: Basics

Lab Environment

In this lab environment, you will be provided with GUI access to a Kali machine. The target machine will be accessible at demo.ine.local.

Objective: Answer the following questions:

  1. Find the default tcp ports used by smbd.

  2. Find the default udp ports used by nmbd.

  3. What is the workgroup name of samba server?

  4. Find the exact version of samba server by using appropriate nmap script.

  5. Find the exact version of samba server by using smb_version metasploit module.

  6. What is the NetBIOS computer name of samba server? Use appropriate nmap scripts.

  7. Find the NetBIOS computer name of samba server using nmblookup

  8. Using smbclient determine whether anonymous connection (null session) is allowed on the samba server or not.

  9. Using rpcclient determine whether anonymous connection (null session) is allowed on the samba server or not.

Tools

  • Nmap

  • Metasploit

  • nmblookup

  • smbclient

  • rpcclient

Writeup

Default TCP Ports Used by smbd

nmap -p 139,445 demo.ine.local

Default UDP Ports Used by nmbd

nmap -sU -p 137,138 demo.ine.local

Workgroup Name of Samba Server

nmap -p 445 --script smb-os-discovery demo.ine.local

Exact Samba Version (Nmap)

nmap -p 445 --script smb-protocols,smb-os-discovery demo.ine.local

Exact Samba Version (Metasploit)

msfconsole
use auxiliary/scanner/smb/smb_version
set RHOSTS demo.ine.local
run

NetBIOS Computer Name (Nmap)

nmap -p 445 --script smb-os-discovery demo.ine.local

NetBIOS Computer Name (nmblookup)

nmblookup -A demo.ine.local

Check Anonymous Login (smbclient)

smbclient -L //demo.ine.local -N

Check Anonymous Login (rpcclient)

rpcclient -U "" -N demo.ine.local -c 'enumdomusers'
PreviousFTP EnumerationNextApache Enumeration

Last updated 11 days ago