36.3 WhatWeb Command: Detect Website Technology (and Wappalyzer)
Short answer: Install WhatWeb on Kali, point it at a lab URL you own, read the server/CMS hints, then cross-check with headers or Wappalyzer. Never scan strangers.
Quick answer
sudo apt install -y whatweb
whatweb http://192.168.56.20
whatweb -a 3 -v http://192.168.56.20/dvwa/
Read the Server line, cookies and CMS name. Treat versions as hints, not proof.
Why technology fingerprinting matters
Attackers want to know your stack. If they see old PHP or WordPress, they search for a matching bug. Defenders use the same idea to inventory what they run.
What: Fingerprinting guesses web server, language, CMS and libraries from public signals.
How: Tools read HTTP headers, cookies, HTML comments, script paths and known plugin patterns.
What you need (lab only)
- A Kali Linux VM (or any Debian/Ubuntu box).
- A target you own, such as DVWA on
http://192.168.56.20. - Written permission if the target is not yours.
How to run the WhatWeb command
Why: One command gives a first map of the site.
What: WhatWeb is a CLI fingerprinting tool that ships with Kali.
How: follow these steps.
- Install if needed:
sudo apt update sudo apt install -y whatweb whatweb --versionSample output:
WhatWeb version 0.5.5Meaning: the tool is ready.
- Run a calm scan on your lab home page:
whatweb http://192.168.56.20Sample output:
http://192.168.56.20 [200 OK] Apache[2.4.41], Country[RESERVED][ZZ], HTML5, HTTPServer[Ubuntu Linux][Apache/2.4.41 (Ubuntu)], IP[192.168.56.20], PHP[7.4.3], Title[DVWA], X-Powered-By[PHP/7.4.3]Meaning: Apache on Ubuntu, PHP 7.4, page title DVWA. Versions are hints only.
- Raise aggression only in the lab (more plugins, more requests):
whatweb -a 3 http://192.168.56.20/dvwa/Meaning: level 1 is passive; 3 probes harder. Do not use high aggression on production you do not own.
- Add verbose mode when you teach or write a report:
whatweb -v http://192.168.56.20Meaning: longer detail per plugin match.
- Save output for your notes:
whatweb -a 3 http://192.168.56.20/dvwa/ | tee ~/lab-whatweb.txtMeaning: you keep evidence for the worksheet.
Example: Priya fingerprints her Pune lab
Priya runs DVWA on a VirtualBox host in Pune. She runs whatweb http://192.168.56.20/dvwa/. She sees X-Powered-By[PHP/7.4.3]. She does not download an exploit. She opens the Apache/Nginx config, removes the version header, reloads, and scans again. The header is gone. That is the defender path.
Example: James cross-checks with curl in London
- Fetch headers only:
curl -sI http://192.168.56.20/dvwa/ | sed -n '1,20p'Sample output:
HTTP/1.1 200 OK Server: Apache/2.4.41 (Ubuntu) X-Powered-By: PHP/7.4.3 Set-Cookie: PHPSESSID=...Meaning: curl confirms WhatWeb. Always cross-check.
- Compare with the free Phishing Link Checker only for suspicious URLs; for stack checks stay with WhatWeb + curl.
Wappalyzer in the browser
Why: Managers and analysts often prefer a visual stack list.
What: Wappalyzer (browser extension) shows technologies while you browse.
How:
- Install the official extension from the Chrome or Firefox store.
- Open your lab site only.
- Read the sidebar: CMS, frameworks, analytics, CDNs.
- Write "stack observed" in your lab report. Do not treat it as a CVE list.
How to harden against fingerprinting
- Hide nginx version: see guide Secure nginx: hide server version headers (draft) and live lesson on nginx hardening when deployed.
- Remove
X-Powered-Byin PHP-FPM / Apache. - Use generic error pages (no stack traces).
- Patch on a schedule. Hiding versions without patching is theatre.
- Check headers with curl security headers guide (draft) and the Website Security Checklist.
Common mistakes
- Scanning random public sites. That can be illegal.
- Trusting one version string and running an exploit. False positives happen.
- Leaving
ServerandX-Powered-Byon production "for debugging". - Using aggression level 4 against a shared staging host without asking.
Ravindra Bagale's Tip
Because WhatWeb shows PHP 5.x, students rush to an exploit. A version is a hint, not proof. False positives happen. Cross-check with curl headers or Nmap scripts, and exploit only in a lab you own.
Ravindra Bagale's Tip – मराठी
WhatWeb ने PHP 5.x दाखवले म्हणून students थेट exploit शोधतात. Version ही hint आहे, confirm नाही. False positive होतात. curl headers किंवा Nmap scripts ने cross-check करा, आणि exploit फक्त तुमच्या lab वर.
Ravindra Bagale's Tip – हिंदी
WhatWeb ने PHP 5.x दिखाया तो students सीधे exploit ढूँढते हैं. Version सिर्फ़ hint है, confirm नहीं. False positive होते हैं. curl headers या Nmap scripts से cross-check करो, और exploit सिर्फ़ अपनी lab पर।
Quick quiz: check what you learned
What is the main job of the WhatWeb command?
- Fingerprint website technologies from public signals
- Delete remote databases over the internet
- Replace the need for written permission always
- Encrypt every password with a single hash
Show answer
A. WhatWeb guesses server, CMS and libraries. It is not an exploit tool.
When is whatweb -a 3 appropriate?
- On a lab or owned target with permission
- On any famous website without asking first
- On your neighbour's router from the street
- On production during peak traffic for fun
Show answer
A. Higher aggression sends more requests. Stay in scope.
Best first defence after you see X-Powered-By: PHP/7.4?
- Hide the banner and plan a real patch path
- Publish the version on the home page footer
- Disable all logging so scans stay quiet
- Open port 21 so FTP can be fingerprinted too
Show answer
A. Reduce noise and fix outdated software.
Related tools and lessons
- Free Cyber Tools hub — password, phishing, checklists
- Website Security Checklist
- 36.2 Amass subdomain discovery
- 36.4 Netcat and Socat
- 20.3 Nmap vulnerability scripts
Frequently asked questions
What does the WhatWeb command do?
WhatWeb fingerprints a website. It reads headers, cookies, HTML and known patterns, then names likely server, CMS and libraries. Use it only on labs or systems you own.
Is WhatWeb the same as Wappalyzer?
Same idea, different tools. WhatWeb is a Kali command-line tool. Wappalyzer is mainly a browser extension. Both guess the stack; neither is 100% correct.
What does whatweb -a 3 mean?
Aggression level 3. Level 1 is passive. Higher levels send more requests and plugins. Use level 3 only in a lab you control, never on a stranger's site.
How do I hide my stack from fingerprinting?
Turn off version banners (nginx server_tokens off; remove X-Powered-By), use generic error pages, and keep software patched. You cannot hide everything, but you slow attackers.
Can I scan any website with WhatWeb?
No. Scan only labs, your own sites, or targets with written permission. Unauthorised scanning can be illegal.
Extended teaching notes
Why this lesson matters
A SOC turns logs into action. Good juniors triage with playbooks: what fired, which asset, how bad, contain or escalate, write the timeline.
- Prepare: asset list, contacts, runbooks.
- Detect: SIEM/EDR alerts with context.
- Contain: disable account, isolate host, block IOC.
- Eradicate & recover: patch, rebuild, restore.
- Lessons: one improvement ticket per incident.
Indian company (sample)
A 24×7 SOC at a large Indian IT services firm handles phishing and malware for many clients. Tier-1 analysts follow a script; they do not freestyle on production.
Mini case study
Suppose we are on a purple-team exercise for an Indian mid-size company (sample data). Red notes a technique from this lesson against a lab clone. Blue must show the control that stops it, the log that would have fired, and the ticket that hardens production. That is the standard this course trains you for.
Defender's worksheet (do this today)
- Write the lesson title, date and the exact lab target you are allowed to use.
- List three owned systems (VMs, apps, or cloud accounts) where this lesson applies.
- Run one safe check from the lesson on a lab system only. Paste the command and output.
- Write a two-sentence fix you would give a teammate.
- Name one related public advisory (CERT-In, CISA, NVD, or a vendor bulletin) with its date.
Indian workplace (sample data)
Suppose we are a junior analyst at Infosys, TCS, Wipro or a fintech SOC in Bengaluru/Pune. Turn this lesson into one checklist item with an owner, a due date and a place to store evidence (ticket + screenshot).
Global practice
Compare your notes with OWASP, CIS Benchmarks, NIST CSF/IR guidance or a cloud Well-Architected security question. Write five lines on what overlaps.
Everyday analogy
Explain the risk and the fix to a family member without jargon. If they can repeat the warning, you understand it well enough to teach juniors.
Key terms
- Control: a safeguard (patch, config, process, detection).
- Finding: a weakness backed by evidence.
- Remediation: the fix plus how you verified it.
- Scope: systems you have written permission to touch.
- Least privilege: only the access the task needs.
- Defence in depth: several layers so one failure does not end the story.
Common mistakes
- Skipping written permission "just for a quick scan".
- Practising on hostel, office or public targets without authorisation.
- Collecting tool output without writing the fix.
- Copying attack steps onto production to "verify". Defenders verify with versions, configs and patches.
- Publishing screenshots that contain secrets, cookies or internal hostnames.
Recap
- Evidence, fix, owner, date.
- Own lab only.
- Fix > spectacle.