Skip to content
Andrew Horton edited this page Sep 14, 2020 · 32 revisions

WhatWeb is cross-platform compatible and works in any Ruby 2.x environment including Windows, Mac OSX and Linux.

Get WhatWeb

Use WhatWeb in a Linux Security Distribution

The easiest way to get started with WhatWeb is to use it in one of the following Linux distributions.

In Kali Linux just type whatweb in the terminal.

  • Kali Linux (The Most Popular Penetration Testing Distribution)
  • BackBox Linux (Ubuntu Lucid Flexible Penetration Testing Distribution)
  • BackTrack (Penetration Testing Distribution that was later renamed Kali)
  • Blackbuntu Linux (Ubuntu Penetration Testing Distribution)
  • PenToo (Gentoo Penetrating Testing Distribution)
  • Node Zero Linux (Ubuntu Penetration Testing Distribution)

Download a Release

Visit https://github.com/urbanadventurer/WhatWeb/releases and download the most recent stable release.

Download the release as a ZIP file

unzip WhatWeb-v0.5.2.zip
cd WhatWeb-0.5.2/

Alternatively download the release as a tar.gz file

tar -zxvf WhatWeb-v0.5.2.tar.gz
cd WhatWeb-0.5.2/

Get the latest development version

git clone https://github.com/urbanadventurer/WhatWeb.git
cd WhatWeb/

Install Dependencies

Install using the Makefile

This will install WhatWeb system wide under Linux or macOS.

make install

Install Manually

Install the bundler, the Ruby dependency manager.

gem install bundler

Update Bundler

bundle update

Execute bundler from the WhatWeb source folder to install dependencies defined in Gemfile.

bundle install

WhatWeb should be installed in your local folder

./whatweb --version

Install Ruby

It is possible you need to install ruby first.

If you are using Debian or Ubuntu Linux you can use apt. These instructions haven't been checked for recent versions of Ubuntu or Ruby. Please provide feedback.

sudo apt install ruby ruby-dev libopenssl-ruby

For a Fedora-based system you can use yum or dnf to install the dependencies.

sudo dnf -y install ruby ruby-dev rubygems

Optional Dependencies

WhatWeb degrades gracefully when these dependencies aren't available.

MongoDB

Provides logging to Mongo databases.

sudo gem install bson
sudo gem install bson_ext
sudo gem install mongo

RChardet

Language character set detection. This is required for converting results to UTF-8, a dependency of logging to MongoDB. ⚠️ This feature slows performance ⌛

sudo gem install rchardet

Installing in macOS Catalina

Before following the usual instructions to install WhatWeb you will need to install the Ruby environment. In macOS Catalina the default version of Ruby bundled with macOS won't build gems like json.

You have this issue if you see errors like this:

Installing json 2.3.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /private/var/folders/mb/14xtmg051gjfzyj9lqkn49rc0000gn/T/bundler20200914-11972-ab8e0yjson-2.3.1/gems/json-2.3.1/ext/json/ext/generator
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200914-11972-t0xc52.rb extconf.rb
creating Makefile

current directory: /private/var/folders/mb/14xtmg051gjfzyj9lqkn49rc0000gn/T/bundler20200914-11972-ab8e0yjson-2.3.1/gems/json-2.3.1/ext/json/ext/generator
make "DESTDIR=" clean

current directory: /private/var/folders/mb/14xtmg051gjfzyj9lqkn49rc0000gn/T/bundler20200914-11972-ab8e0yjson-2.3.1/gems/json-2.3.1/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
         ^~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in
framework 'ruby' (loaded from '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks')
1 error generated.
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /var/folders/mb/14xtmg051gjfzyj9lqkn49rc0000gn/T/bundler20200914-11972-ab8e0yjson-2.3.1/gems/json-2.3.1 for inspection.
Results logged to /var/folders/mb/14xtmg051gjfzyj9lqkn49rc0000gn/T/bundler20200914-11972-ab8e0yjson-2.3.1/extensions/universal-darwin-19/2.6.0/json-2.3.1/gem_make.out

An error occurred while installing json (2.3.1), and Bundler cannot continue.
Make sure that `gem install json -v '2.3.1' --source 'https://rubygems.org/'` succeeds before bundling.

To solve the problem install your own version of Ruby. I recommend rbenv over rvm, but either is fine.

brew install rbenv ruby-build
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile 
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zshrc 
rbenv install 2.6.5
rbenv global 2.6.5

Next verify that you have ruby installed. If you see the following it worked.

ruby -v
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]

Now bundle install should succeed.

bundle install

Tutorials

There are many tutorials on how to use WhatWeb on YouTube.

WhatWeb on tools.kali.org

whatweb – Tool to Discover Security Vulnerabilities With Your Web Application

Archangel Amael has written a quick guide to get Whatweb 0.4.2 going in Backtrack 4

VulnerabilityAssessment.co.uk has written a small guide on installing WhatWeb in Ubuntu

Historic Source Archive

More recent versions are available on https://github.com/urbanadventurer/WhatWeb/releases

Linux Distribution Packages

Please note that these packages are not up to date.