🔍 Reconnaissance (ขั้นสำรวจข้อมูล) คืออะไร?
Reconnaissance (Recon / Footprinting) = ขั้นตอนแรกของการโจมตี (หรือ Penetration Testing) ที่ผู้โจมตีรวบรวมข้อมูลเป้าหมาย มากที่สุดเท่าที่จะทำได้ เพื่อวางแผนการโจมตีขั้นต่อไป
เป้าหมายของ Reconnaissance
- ระบุ Attack Surface (พื้นที่โจมตี) - IP Ranges, Domains, Subdomains, Open Ports, Services
- ระบุ Technology Stack - OS, Web Server, CMS, Framework, Database, Cloud Provider
- ระบุ Human Element - พนักงาน, อีเมล, โซเชียลมีเดีย, Org Chart (สำหรับ Social Engineering)
- ระบุ Vulnerabilities - ช่องโหว่ที่ทราบ (CVE), Misconfigurations, Weak Credentials
- ระบุ Network Topology - Firewall, IDS/IPS, Load Balancer, DMZ, Internal Segments
ประเภทของ Reconnaissance
| ประเภท | คำอธิบาย | เครื่องมือ/เทคนิค | ความเสี่ยงการถูกตรวจจับ |
|---|---|---|---|
| Passive Recon (OSINT) | รวบรวมข้อมูลจากแหล่งสาธารณะ ไม่ส่งแพ็กเก็ตไปยังเป้าหมายโดยตรง | Google Dorks, Shodan, Censys, VirusTotal, DNSDumpster, TheHarvester, LinkedIn, Crunchbase, Wayback Machine, SSL Certs, WHOIS | ต่ำมาก (ไม่สัมผัส Target) |
| Active Recon | ส่งแพ็กเก็ต/Request ไปยังเป้าหมายโดยตรง เพื่อดึงข้อมูล | Nmap, Masscan, Nessus, OpenVAS, Nikto, Dirb/Gobuster, Enum4linux, SMBclient, SNMP Walk, Banner Grabbing | สูง (โดน IDS/IPS/Firewall จับได้) |
| Physical Recon | สำรวจสถานที่จริง | Dumpster Diving, Badge Cloning, Tailgating, Wireless Wardriving, Social Engineering On-site | สูง (ถูกจับกุมได้) |
➡️ "After Reconnaissance Comes Penetration" หมายถึงอะไร?
คำพูดนี้สะท้อน Kill Chain / Attack Lifecycle แบบคลาสสิก (Lockheed Martin Cyber Kill Chain):
7 ขั้นตอนของ Cyber Kill Chain
- Reconnaissance - สำรวจข้อมูล (ข้างบน)
- Weaponization - สร้าง/เตรียม Payload (Malware, Exploit, Phishing Email) ตามข้อมูลที่ได้
- Delivery - ส่ง Payload ให้เหยื่อ (Email, Web, USB, Supply Chain)
- Exploitation - ใช้ช่องโหว่ (Exploit) ทำให้ Code ทำงานบน Target
- Installation - ติดตั้ง Malware/Backdoor/RAT ให้ Persistent
- Command & Control (C2) - เชื่อมต่อกลับควบคุม Victim
- Actions on Objectives - ทำตามเป้าหมาย (ขโมยข้อมูล, รบกวน, Ransomware, Destroy)
"Penetration" ในบริบทนี้ = Exploitation + Installation (ขั้นที่ 4-5) คือ การ "เจาะผ่าน" ป้องกันเพื่อได้ Access เข้าสู่ระบบ
🎯 Penetration Testing (Ethical Hacking) - กระบวนการมาตรฐาน
Penetration Test (Pentest) = การจำลองการโจมตีอย่างเป็นทางการ เพื่อหาช่องโหว่ก่อน Hacker จริง
ขั้นตอนมาตรฐาน (PTES / NIST 800-115)
- Pre-engagement - Scope, Rules of Engagement (RoE), Legal Contract, Timeline
- Reconnaissance (Information Gathering) - Passive + Active Recon
- Threat Modeling & Vulnerability Analysis - วิเคราะห์ข้อมูล Recon, Rank Risk, เลือก Target
- Exploitation (Penetration) - พยายาม Exploit ช่องโหว่เพื่อได้ Access (Controlled, Safe)
- Post-Exploitation - Privilege Escalation, Lateral Movement, Data Exfiltration (Simulated), Persistence
- Reporting - Executive Summary, Technical Findings, Risk Rating, Remediation, Retest
- Remediation & Retest - ลูกค้าแก้ไข, Pentester ทดสอบใหม่
ทำไม Reconnaissance จึงสำคัญที่สุดใน Pentest?
- 80% ของความสำเร็จอยู่ที่ Recon - ข้อมูลดี = Exploit ง่าย/แม่นยำ
- Recon ไม่ดี = ยิงในท 어둠, ทำลายระบบโดยไม่ได้ตั้งใจ, พลาดช่องโหว่จริง
- Recon ช่วย Scope Reduction - โฟกัสเฉพาะจุดอ่อนจริง ประหยัดเวลา/งบ
🛡️ การป้องกัน Reconnaissance (Defensive Perspective)
| Recon Type | การป้องกัน/ลดทอน |
|---|---|
| Passive (OSINT) | ลดข้อมูลสาธารณะ: ลบ Subdomain ไม่ใช้, ซ่อน Version Header, ใช้ CDN/WAF ซ่อน Origin IP, จำกัด WHOIS Privacy, Employee Social Media Policy |
| Active (Scanning) | WAF/IPS บล็อก Scanner, Rate Limiting, Port Knocking, Honeypots/Deception, Network Segmentation, Disable Unused Services/Ports |
| Physical | Physical Security: Badge Access, Mantrap, Visitor Log, Shred Documents, Wireless Segmentation (Guest/Corp/IoT) |
🛠️ เครื่องมือ Reconnaissance ยอดนิยม
| หมวดหมู่ | เครื่องมือ | วัตถุประสงค์ |
|---|---|---|
| OSINT / Passive | Maltego, TheHarvester, Recon-ng, SpiderFoot, Amass, Subfinder, Assetfinder | Domain/Subdomain/Email/IP Enumeration |
| Search Engines | Google Dorks, Shodan, Censys, FOFA, ZoomEye, BinaryEdge, GreyNoise | Internet-facing Asset Discovery |
| Network Scanning | Nmap, Masscan, Zmap, RustScan, Naabu | Port Scanning, Service Detection, OS Fingerprint |
| Web Recon | Burp Suite, OWASP ZAP, Nikto, Dirb/Gobuster/Ffuf, WhatWeb, Wappalyzer | Web App Mapping, Directory Brute-force, Tech Detection |
| AD/Internal | BloodHound, SharpHound, Enum4linux, Ldapdomaindump, CrackMapExec | Active Directory Recon, Privilege Paths |
| Cloud Recon | CloudSploit, ScoutSuite, Prowler, Pacu, TruffleHog | Cloud Misconfig, IAM, Storage, Keys |
⚖️ Legal & Ethical Boundary
- Passive OSINT: มักถูกกฎหมาย (ข้อมูลสาธารณะ) แต่ข้อมูลส่วนบุคคลอาจผิด PDPA/GDPR
- Active Scanning/Exploitation: ผิดกฎหมายหากไม่ได้รับอนุญาตเป็นลายลักษณ์อักษร (Computer Crime Act, CFAA, UK CMA)
- Pentest ต้องมี: Signed Contract, RoE, Scope Document, Written Authorization, Insurance
สรุป
Reconnaissance = "知己知彼 百战不殆" (รู้敵รู้己 ร้อยชนะร้อย)
Penetration = การใช้ข้อมูลจาก Recon เพื่อเจาะเข้าได้จริง (Exploit)
ในมุมมองป้องกัน: ลดข้อมูลที่รั่วไหล (OSINT) + บล็อก/ตรวจจับ Active Recon (WAF/IPS/NDR/Deception) + Segment Network เพื่อให้ Hacker Recon ได้ยาก และ Penetration ได้ยากขึ้น