
Scanning के बाद अगला सवाल — इन services में कौन सी कमज़ोरी है और कितनी गंभीर? इसी जवाब को vulnerability assessment कहते हैं। यह exploit करने से पहले का कदम है और अक्सर pentest का सबसे मूल्यवान हिस्सा, क्योंकि यहीं से सुधार की सूची बनती है।
Vulnerability क्या होती है
कमज़ोरी तीन तरह से आती है — software में bug (जैसे पुराना version), configuration में ग़लती (जैसे default password, खुला database), और design में कमी (जैसे बिना जाँच user input)। हर कमज़ोरी को एक पहचान मिलती है:
- CVE: हर publicly disclosed कमज़ोरी का unique नंबर, जैसे CVE-2021-44228।
- CVSS score: 0 से 10 तक severity — 9+ critical, 7–8.9 high, 4–6.9 medium।
- Exploit availability: क्या इसका public exploit मौजूद है — इससे जोखिम बढ़ता है।
Assessment के कदम
- Scan के result से services और versions की सूची बनाएँ।
- हर version के लिए known CVEs खोजें (vendor advisories, NVD)।
- Configuration जाँचें — default credentials, खुले ports, missing patches।
- हर finding को severity और business impact के साथ लिखें।
- Proof के लिए सबसे कम नुक़सान वाला test करें (सिर्फ़ अनुमति में)।
Buffer overflow का concept
जब program तय जगह से ज़्यादा data ले लेता है, तो वह आस-पास की memory में लिख देता है — इसे buffer overflow कहते हैं। सही input length की जाँच न होने पर यह crash या code execution का कारण बन सकता है। आज के सिस्टम में ASLR, DEP और safe languages की वजह से यह कम आम है, पर legacy software में अब भी मिलता है। समझने के लिए यह concept ज़रूरी है, पर असली exploit लिखना सिर्फ़ authorized lab में।
Assessment tools
| Tool | काम |
|---|---|
| Nmap + NSE scripts | services और basic checks |
| Nessus / OpenVAS | automated vulnerability scan |
| Nikto | web server configuration जाँच |
| searchsploit | known exploits खोजना |
| Burp Suite / ZAP | web app testing |
Automated tools ढेर सारे results देते हैं, जिनमें false positive भी होते हैं। अच्छा tester हर finding को हाथ से verify करता है — "tool ने कहा" पर्याप्त नहीं।
False positive और false negative
False positive: tool कहे कमज़ोरी है, पर असल में नहीं। इससे समय बर्बाद और भरोसा कम होता है। False negative: कमज़ोरी है, पर tool ने नहीं पकड़ी — यह ज़्यादा खतरनाक है, क्योंकि organization सोचता है सब ठीक है। इसीलिए manual testing और business logic की समझ ज़रूरी है।
- CVE = कमज़ोरी की पहचान, CVSS = severity score
- Version + configuration + design — तीनों जाँचें
- Tool के result को हाथ से verify करें
- असली exploit सिर्फ़ लिखित अनुमति वाले lab में
अपनी lab VM पर nmap चलाएँ और मिली services की सूची बनाएँ। हर service के version के आगे लिखें कि उसे कैसे patch या बंद किया जा सकता है।