Nikto Basics: Scan Your Own Web Server for Misconfigurations (Free)
Before attackers probe your website, probe it yourself. Nikto is a free, open-source web server scanner that checks for over 6,700 potentially dangerous files, outdated server software, misconfigurations and known issues. It won’t replace a full security audit — but it takes five minutes to run and routinely finds things website owners never knew were exposed.
What Nikto Does
Point Nikto at a web server and it fires thousands of requests, checking the responses against its database: Is the server software outdated? Are default files still present? Are directory listings open? Does the server leak version information in its headers? It’s noisy by design — that’s the point. You want to see everything a casual attacker would see, before they do.
Installing Nikto
On Kali Linux it’s preinstalled. Elsewhere:
sudo apt install niktogit clone https://github.com/sullo/nikto.gitcd nikto/program
Your First Scan (Your Server Only)
Only scan servers you own or have written permission to test. Scanning someone else’s site without permission is illegal in most countries.
nikto -h https://your-website.com
For a plain HTTP target on your lab network, use your own IP or domain. A basic scan takes a few minutes; add -Tuning 123 to focus on interesting files and misconfigurations, or -o report.html -Format html to save a readable report.
Reading the Results
Nikto output looks alarming at first — don’t panic. Typical findings include:
- Outdated server software — e.g. an old Apache or nginx version with known flaws. Fix: update the package.
- Exposed directories and files — backup files, test scripts, .git folders left in the web root. Fix: remove them or block access.
- Missing security headers — no X-Frame-Options, X-Content-Type-Options or Content Security Policy. Fix: add them in your server config.
- Directory listing enabled — visitors can browse folders like a file manager. Fix: turn it off (Options -Indexes in Apache).
- Default pages and examples — sample apps shipped with the server. Fix: delete them.
What to Fix First
Work in this order: (1) update outdated software, (2) remove exposed sensitive files and backups, (3) disable directory listing, (4) add the missing security headers, (5) remove default content. Then re-run the scan and confirm the findings are gone — a fix you don’t verify is a guess.
Nikto’s Limits
Nikto checks known issues, not logic flaws — it won’t find broken access control or SQL injection in your custom app. Pair it with OWASP ZAP for deeper application testing, and keep Nikto as your fast first pass. Run it on your own site tonight. Five minutes of scanning beats a breach notification every time.



Comments
Post a Comment