Certified Red Team Professional (CRTP) - Notes
HomeGitHubPortfolioTwitter/XMediumCont@ct
  • 📝Certified Red Team Professional (CRTP) - Notes
    • ℹ️0 - Course Summary
      • 1.1
      • 1.2
    • 1️⃣1 - Active Directory (AD)
      • 1.1 - Introduction to Active Directory (AD)
      • 1.2 - Physical Components of AD
      • 1.3 - Logical Components of AD
    • 2️⃣2 - PowerShell
      • 2.1 - Introduction to PowerShell
      • 2.2 - Security and Detection
    • 3️⃣3 - AD Enumeration
      • 3.1 - Host & User Identification
      • 3.2 - Common Services Enum
        • 3.2.1 - LDAP & DNS Enum
        • 3.2.2 - SMB Enum & Common Attacks
      • 3.3 - Domain Enumeration
        • 3.3.1 - PowerView
          • 3.3.1.1 - Domain Enumeration (Video Lab)
        • 3.3.2 - BloodHound
    • 4️⃣4 - Trust and Privileges Mapping
      • 4.1 - Access Control (ACL/ACE)
      • 4.2 - Group Policy
      • 4.3 - Trusts
    • 5️⃣5 - Local Privilege Escalation
      • 5.1 - Privilege Escalation
        • 5.1.1 - Feature Abuse
        • 5.1.2 - Relaying
        • 5.1.3 - GPO Abuse
        • 5.1.4 - Unquoted Service Path
      • 5.2 - Tools
    • 6️⃣6 - Lateral Movement
      • 6.1 - PowerShell Remoting & Tradecraft
      • 6.2 - Crentials Extraction & Mimikatz
    • 9️⃣7 - Kerberos Attack and Defense (Golden, Silver tickets and more)
      • 7.1 - Kerberos Intro
      • 7.2 - AS-REP Roasting
      • 7.3 - Kerberoasting
      • 7.4 - User Enum in Kerberos
    • 6️⃣8 - Persistence
      • 8.1 - Golden Ticket
      • 8.2 - Silver Ticket
      • 8.3 - Diamond Ticket
    • Lab
      • 0 - Lab Instructions
      • 1 - Learning Object 1️
      • 2 - Learning Object 2️
      • 3 - Learning Object 3️
      • 4 - Learning Object 4️
      • 5 - Learning Object 5️
      • 6 - Learning Object 6️
      • 7 - Learning Object 7️
    • 📄Report
      • How to write a PT Report
  • 🛣️RoadMap / Exam Preparation
  • 📔CRTP Cheat Sheet
Powered by GitBook
On this page
  • SMB Enumeration
  • Netexec
  • SMBMap
  • SMB Client
  • PowerHuntShares
  • SMB Common Attacks
  1. Certified Red Team Professional (CRTP) - Notes
  2. 3 - AD Enumeration
  3. 3.2 - Common Services Enum

3.2.2 - SMB Enum & Common Attacks

SMB Enumeration

Netexec

  1. Enumerate Domain Machines for SMB Signing

    nxc smb 192.168.1.0/24
  2. Validate Credentials

    nxc smb 192.168.1.1 -u 'jdoe' -p 'Password123'
  3. Find Valid Machines for Connection

    nxc smb 192.168.1.0/24 -u 'jdoe' -p 'Password123'
  4. Enumerate Shared Resources

    nxc smb 192.168.1.1 -u 'jdoe' -p 'Password123' --shares
  5. Enumerate Users and Groups

    nxc smb 192.168.1.1 -u 'jdoe' -p 'Password123' --users
    nxc smb 192.168.1.1 -u 'jdoe' -p 'Password123' --groups
  6. Dump LSA and NTDS If you have domain admin privileges:

    nxc smb 192.168.1.1 -u 'jdoe' -p 'Password123' --lsa
    nxc smb 192.168.1.1 -u 'jdoe' -p 'Password123' --ntds

SMBMap

We can enumerate SMB shares and access to system using these command:

Copy

smbmap -H corp-dc #List share with anonymous access
smbmap -H corp-dc -u "devan" -p "P@ssword123!" #List Devan's shares
smbmap -H corp-dc -u "devan" --prompt ##List Devan's shares without writing password in cleartext

List a specific Share

smbmap -H corp-dc -u "devan" --prompt -r "SharedFiles"

Check OS Version and signing status

smbmap -H corp-dc -u "devan" --prompt -v            #OS version check
smbmap -H corp-dc -u "devan" --prompt --signing     #Signing check

If the signing of message is disabled we can use it for Relay attacks and potentially of exploit eternalblue vuln.


SMB Client

Similar to SMBMap, we can use it to enumerate shares and interact with file system prompt

smbclient -L //corp-dc -N     #Anonymous Login (-N no credentials)
smbclient //corp-dc -U "dev-angelist.lab/devan%P@ssword123!"     #List Devan's shares
smbclient //corp-dc/SharedFiles -U devan
smbclient //corp-dc/SharedFiles -U "dev-angelist.lab/devan%P@ssword123!" #we can get file shared using get command
#File system prompt includes command such as: cd, dir, ls, get, put

Useful for enumerate shares, discovering sensitive files, ACLs for shares, networks, computers, etc, and generates a nice HTML report.

Invoke-HuntSMBShares -NoPing -OutputDirectory C:\AD\Tools -HostList C:\AD\Tools\servers.txt
  • SMB Tools & Guest or Anonymous access to Shares

  • RCE Via access to Administrative Shares

  • SMB Brute Forcing

  • SMB Password Spraying

  • SMBv1 EternalBlue (CVE-2017-0144)

  • Net-NTLM Capture Attack

  • Pass the Hash Attack (PTH)

  • Net-NTLM Relay Attack

Previous3.2.1 - LDAP & DNS EnumNext3.3 - Domain Enumeration

Last updated 2 months ago

📝
3️⃣
PowerHuntShares
SMB Common Attacks
SMB Common Attacks Lab