Vulnerability scanning
Introduction
Un veedu la lock weak ah iruntha, nee dhaan first ah find panni fix pannuva, illana thief find pannuvan! Same concept dhaan vulnerability scanning. π
Vulnerability scanning = Un systems, networks, applications la weaknesses automatically find panradhu. Hackers find panna munna nee find pannanum β adhu dhaan goal!
Every organization ku mandatory. Un personal systems ku kooda useful. Let's learn how! π‘οΈ
What is a Vulnerability?
Vulnerability = Software, hardware, or configuration la irukku oru weakness β attacker exploit panna mudiyum.
Types of vulnerabilities:
| Type | Example | Risk Level |
|---|---|---|
| Software bugs | Buffer overflow, SQL injection | π΄ High |
| Misconfigurations | Default passwords, open ports | π΄ High |
| Outdated software | Unpatched OS, old libraries | π‘ Medium-High |
| Weak encryption | MD5 hashing, SSL v2 | π‘ Medium |
| Access control flaws | Excessive permissions | π΄ High |
| Zero-day | Unknown, unpatched vulnerabilities | π΄ Critical |
CVE (Common Vulnerabilities and Exposures) = Global vulnerability database. Every known vulnerability ku oru unique ID irukku β like CVE-2024-12345.
CVSS Score (0-10) = Vulnerability severity measure pannuradhu:
- 0.0-3.9: Low π’
- 4.0-6.9: Medium π‘
- 7.0-8.9: High π
- 9.0-10.0: Critical π΄
Types of Vulnerability Scanning
Different scanning types β different purposes:
1. Network Scanning π
- Open ports, services, OS detection
- Firewall misconfigurations find pannum
- Tools: Nmap, Masscan
2. Web Application Scanning πΈοΈ
- SQL injection, XSS, CSRF vulnerabilities
- OWASP Top 10 check pannum
- Tools: OWASP ZAP, Burp Suite, Nikto
3. Host-based Scanning π»
- Individual system la installed software, patches check
- Registry, file permissions audit
- Tools: Nessus, Qualys, OpenVAS
4. Database Scanning ποΈ
- Database misconfigurations, default credentials
- Excessive privileges detect
- Tools: DbProtect, AppDetectivePro
5. Cloud Scanning βοΈ
- Cloud misconfigurations (S3 buckets open, IAM issues)
- Compliance check (CIS benchmarks)
- Tools: ScoutSuite, Prowler, CloudSploit
| Scan Type | Target | Frequency |
|---|---|---|
| Network | Infra | Weekly |
| Web App | Applications | Per release |
| Host | Endpoints | Monthly |
| Database | DB servers | Monthly |
| Cloud | Cloud resources | Daily |
How Vulnerability Scanning Works
Scanning process step by step:
Step 1: Discovery π
- Network la alive hosts find pannum
- Ping sweep, ARP scan use pannum
- "Enna enna devices irukku?" β first question
Step 2: Port Scanning πͺ
- Each host la open ports identify
- Services running on those ports detect
nmap -sV 192.168.1.0/24β service version detection
Step 3: Vulnerability Detection π
- Known CVEs against detected services match pannum
- Version numbers compare β outdated ah check
- Configuration checks run pannum
Step 4: Analysis & Reporting π
- Findings categorize by severity
- False positives filter pannum
- Remediation recommendations provide pannum
Two approaches:
- Credentialed scan β Login credentials use panni deep scan. More accurate, more findings. β
- Non-credentialed scan β Outside perspective, no login. Faster but surface-level only. β‘
Vulnerability Management Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β VULNERABILITY MANAGEMENT LIFECYCLE β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β ββββββββββββ ββββββββββββ ββββββββββββ β β β DISCOVER βββββΆβ SCAN βββββΆβ ANALYZE β β β β Assets β β Vulns β β Results β β β ββββββββββββ ββββββββββββ ββββββ¬ββββββ β β β β β βΌ β β ββββββββββββ ββββββββββββ ββββββββββββ β β β VERIFY ββββββ REMEDIATEββββββPRIORITIZEβ β β β Fixed? β β Patch/Fixβ β By Risk β β β ββββββ¬ββββββ ββββββββββββ ββββββββββββ β β β β β βΌ β β ββββββββββββ β β β REPORT β β Dashboard, Compliance, Trends β β ββββββββββββ β β β β βββββββββββββββββββββββββββββββββββββββ β β β SCANNING ENGINE β β β β βββββββββββ ββββββββββββββββββββ β β β β β Scanner β β Vulnerability DB β β β β β β (Nessus/β β (NVD/CVE feeds) β β β β β β OpenVAS)β β Updated daily β β β β β ββββββ¬βββββ ββββββββββ¬ββββββββββ β β β β ββββββββββ¬ββββββββ β β β β βΌ β β β β ββββββββββββββββββββββββ β β β β β Targets: β β β β β β π Network devices β β β β β β π» Servers/Endpointsβ β β β β β πΈοΈ Web applications β β β β β β βοΈ Cloud resources β β β β β ββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββ β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Nmap β Network Scanner King π
Nmap (Network Mapper) = Most popular free network scanning tool.
Essential commands:
Nmap scan types:
| Flag | Type | Description |
|---|---|---|
| -sS | SYN Scan | Stealth, half-open connection |
| -sT | TCP Connect | Full connection, noisy |
| -sU | UDP Scan | UDP ports check |
| -sV | Version | Service versions detect |
| -sn | Ping Scan | Host discovery only |
| -O | OS Detect | Operating system guess |
Pro tip: nmap -sV --script vulners target.com β vulnerability database cross-reference panni results kaatdum! π―
OpenVAS β Free Vulnerability Scanner
π OpenVAS (Greenbone) = Enterprise-grade free vulnerability scanner!
Setup (Kali Linux la):
Features:
- 50,000+ vulnerability tests (NVTs)
- Scheduled scanning support
- Detailed reports with remediation
- Web-based dashboard (Greenbone Security Assistant)
- Credentialed and non-credentialed scans
Best practices:
- Weekly automatic scans schedule pannunga π
- Credentialed scan use panna β 60% more vulnerabilities find aagum
- Custom scan policies create pannunga β un environment ku specific
- Results export panni tracking spreadsheet la maintain pannunga
Commercial alternatives: Nessus ($3,990/year), Qualys (cloud-based), Rapid7 InsightVM
Web Application Scanning
Web apps ku special scanning tools vennum β OWASP Top 10 vulnerabilities find panna.
OWASP ZAP (Zed Attack Proxy) β Free web app scanner:
What it finds:
- π SQL Injection β Database manipulation
- π XSS (Cross-Site Scripting) β Malicious script injection
- π Broken Authentication β Session/login flaws
- π Directory Traversal β Unauthorized file access
- π Sensitive Data Exposure β Unencrypted data
- βοΈ Security Misconfigurations β Headers, cookies
Scanning modes:
- Passive Scan β Traffic observe pannum, modify pannadu. Safe! β
- Active Scan β Actually attack payloads send pannum. Risky! β οΈ
- Spider/Crawl β All pages discover pannum
- Ajax Spider β JavaScript-heavy apps crawl pannum
Important headers to check:
| Header | Purpose | Missing = Risk |
|---|---|---|
| Content-Security-Policy | XSS prevention | π΄ High |
| X-Frame-Options | Clickjacking block | π‘ Medium |
| Strict-Transport-Security | Force HTTPS | π‘ Medium |
| X-Content-Type-Options | MIME sniffing block | π’ Low |
Vulnerability Prioritization
Scan results la 1000+ vulnerabilities varum β ellaam fix panna mudiyaadhu. Prioritize pannanum! π―
Risk-based prioritization formula:
Risk = Severity Γ Exploitability Γ Asset Value
Priority matrix:
| CVSS Score | Exploitable? | Asset Critical? | Priority |
|---|---|---|---|
| 9.0+ | Yes | Yes | π΄ Fix NOW |
| 9.0+ | Yes | No | π Fix in 24h |
| 7.0-8.9 | Yes | Yes | π Fix in 48h |
| 7.0-8.9 | No | Yes | π‘ Fix in 1 week |
| 4.0-6.9 | Yes | Yes | π‘ Fix in 2 weeks |
| 4.0-6.9 | No | No | π’ Fix in 30 days |
| 0.0-3.9 | Any | Any | π’ Next cycle |
Key factors:
- EPSS (Exploit Prediction Scoring) β Probability of exploitation in next 30 days
- CISA KEV β Known Exploited Vulnerabilities catalog. Idhu la iruntha = immediate fix! π¨
- Asset exposure β Internet-facing vs internal
- Compensating controls β Firewall/WAF already protect pannudhaa?
Handling False Positives
β οΈ False positives = Scanner says vulnerability irukku, but actually illai!
Common causes:
- Version detection inaccurate β backported patches detect aagaadhu
- Generic signature match β context illama flag pannum
- Environmental differences β scanner's assumptions wrong
How to handle:
1. Verify manually β Actually exploit try pannunga (lab la!)
2. Cross-reference β Multiple tools use panni confirm
3. Check patches β OS vendor backported fix apply panniruppanga
4. Document exceptions β False positive confirm aana, exception create with justification
False positive rate benchmarks:
- Good scanner: 5-15% false positives
- Average scanner: 15-30%
- Bad scanner: 30%+ β
Tip: Credentialed scans = less false positives. Scanner actual installed versions check panna mudiyadhu without credentials!
Remediation Strategies
Vulnerability find aachchu β ippo fix pannanum! π§
Remediation options:
1. Patch π©Ή β Best solution
- Software update install pannunga
- Vendor-released security patches apply
- Test first in staging, then production
2. Mitigate π‘οΈ β Can't patch? Reduce risk
- Firewall rules add to block exploit path
- WAF rules for web vulnerabilities
- Network segmentation β isolate vulnerable system
- Disable vulnerable feature if not needed
3. Accept π β Risk accept with documentation
- CVSS low + no exploit available + internal only
- Business justification document pannunga
- Management sign-off vaanganum
- Re-evaluate periodically
4. Transfer π β Risk transfer
- Cyber insurance
- Third-party managed service
Patch management best practices:
- Test patches in lab environment first β
- Schedule regular patch windows (monthly) π
- Emergency patches for critical CVEs β 24-48h β‘
- Track patch compliance β 95%+ target π―
- Rollback plan always ready β patch breaks something? Revert! π
Continuous Vulnerability Management
One-time scan podhaadhu β continuous ah pannanum!
Why continuous?
- New CVEs daily publish aagum (50+ per day!)
- Systems change constantly β new software, configs
- Attackers don't wait for your monthly scan
Continuous scanning pipeline:
- π Asset Inventory β Know what you have (you can't protect what you don't know!)
- π Automated Scanning β Daily/weekly scheduled scans
- π Alert Integration β Critical findings β Slack/Teams/PagerDuty
- π Dashboard β Real-time vulnerability posture view
- π« Ticketing β Auto-create Jira tickets for findings
- β Verification β Re-scan after fix to confirm
- π Metrics β Track MTTD (Mean Time to Detect) and MTTR (Mean Time to Remediate)
Key metrics to track:
| Metric | Target | Why |
|---|---|---|
| Scan coverage | 100% assets | No blind spots |
| MTTD | < 24 hours | Fast detection |
| MTTR (Critical) | < 48 hours | Fast fix |
| MTTR (High) | < 7 days | Reasonable |
| False positive rate | < 15% | Efficiency |
| Patch compliance | > 95% | Hygiene |
β Summary & Key Takeaways
Vulnerability scanning essentials recap:
β Vulnerability = Weakness that can be exploited by attackers
β Scanning types β Network, Web App, Host, Database, Cloud
β Tools β Nmap (network), OpenVAS (free), OWASP ZAP (web), Nessus (commercial)
β Prioritize by CVSS + Exploitability + Asset Value
β Remediate β Patch > Mitigate > Accept > Transfer
β Continuous scanning, not one-time β new CVEs daily!
β Credentialed scans find 60% more than non-credentialed
β Track metrics β MTTD, MTTR, coverage, compliance
Remember: Vulnerability scanning is defense β nee find pannanum before hacker find pannan! ππ‘οΈ
π Mini Challenge
Challenge: Comprehensive Vulnerability Assessment
3-4 weeks time la vulnerability scanning end-to-end practice pannunga:
- Nmap Port Scan β Target system (lab environment) scan pannunga:
nmap -sV -A 192.168.1.100. Open ports, services, OS detection β document pannunga.
- OpenVAS Scan β OpenVAS install pannunga (free, open-source). Vulnerable VM (Metasploitable) scan pannunga. Vulnerabilities identify, severity levels understand pannunga.
- Web Application Scan β OWASP ZAP download pannunga. Local web app scan pannunga. SQL injection, XSS, CSRF vulnerabilities find panna practice.
- Nuclei Templates β Nuclei tool install pannunga (modern vulnerability scanner). OWASP Top 10 templates use panni scan pannunga.
- Vulnerability Remediation β Each vulnerability analyze pannunga. Fix priority (CVSS score), implementation difficulty assess pannunga. Patches apply pannunga, rescan pannunga.
- Report Generation β Professional vulnerability assessment report create pannunga. Executive summary, detailed findings, remediation roadmap β include pannunga.
- Metrics Tracking β Scan results track pannunga (Excel spreadsheet). MTTD (mean time to detect), MTTR (mean time to remediate) calculate pannunga.
Certificate: Nee vulnerability assessment expert! πβ οΈ
Interview Questions
Q1: Vulnerability scanning vs penetration testing β difference?
A: Scanning = automated tools, point-in-time snapshot, identify vulnerabilities. Penetration testing = manual, extensive, exploitation attempt, business impact. Scanning = baseline, pentest = deep dive. Both important.
Q2: False positives vulnerability scanning la β epdhi manage?
A: Validation important β scanner result verify pannunga manually. Custom rules create pannunga false positives reduce panni. Whitelisting deprecated/false vulnerabilities. Regular tool updates. Experienced analyst review pannunga.
Q3: CVSS score β epdhi prioritize?
A: CVSS 9+: Critical, immediate fix. CVSS 7-8: High, weeks la fix. CVSS 4-6: Medium, months la address. CVSS <4: Low, routine patching. But context matter β critical system la medium vulnerability kuda high priority.
Q4: Credentialed vs non-credentialed scanning?
A: Non-credentialed = attacker view (external). Credentialed = internal view (employees). Both needed β 60% more vulnerabilities credentialed la find aagum. Scanning frequency β monthly minimum, weekly ideal for critical systems.
Q5: Vulnerability management program β enterprise level setup?
A: Asset inventory maintain pannunga. Scanning policy establish pannunga. Prioritization framework (risk-based). Remediation process define pannunga. Metrics track pannunga. Regular reporting executive level la. Continuous improvement.
Frequently Asked Questions
CVSS score 9.5, actively exploited in the wild, internet-facing server β what should you do?