Class 101 - Automating the process of fingerprinting Web Applications and Identifying Vulnerabilities.

First of all, this blog post is not for Web Application experts, instead I will cover some basic tools and approaches for beginners.

There are tons of nice Web Applications Scanners, both commercial and free, each of them with pros and cons. For example, there are Web Application Scanners that offer a huge database of well-known vulnerabilities while others are good at crawling a website and fuzzing parameters to find a issues such as SQL Injection, XSS, LDAP Injection, Remote Code Execution, etc.

While running a Web Application Scanner against your target website may give good results, you may want to try fingerprinting technologies on your target website while using fewer requests for better identification of vulnerabilities. There are different tools for this task; one that I like is called WhatWeb (

From "README" file:

"WhatWeb identifies websites. Its goal is to answer the question, "What is that Website?". WhatWeb recognizes web technologies including content management systems (CMS), blogging platforms, statistic/analytics packages, JavaScript libraries, web servers, and embedded devices. WhatWeb has over 1500 plugins, each to recognise something different. WhatWeb also identifies version numbers, email addresses, account IDs, web framework modules, SQL errors, and more.

WhatWeb can be stealthy and fast, or thorough but slow. WhatWeb supports an aggression level to control the trade off between speed and reliability. When you visit a website in your browser, the transaction includes many hints of what web technologies are powering that website. Sometimes a single webpage visit contains enough information to identify a website but when it does not, WhatWeb can interrogate the website further. The default level of aggression, called 'stealthy', is the fastest and requires only one HTTP request of a website. This is suitable for scanning public websites. More aggressive modes were developed for in penetration tests.

Most WhatWeb plugins are thorough and recognize a range of cues from subtle to obvious. For example, most WordPress websites can be identified by the meta HTML tag, e.g. '<meta name="generator" content="WordPress 2.6.5">', but a minority of WordPress websites remove this identifying tag but this does not thwart WhatWeb. The WordPress WhatWeb plugin has over 15 tests, which include checking the favicon, default installation files, login pages, and checking for "/wp-content/" within relative links.


  • Over 1500 plugins.
  • Control the trade off between speed/stealth and reliability.
  • Plugins include example URLs.
  • Performance tuning. Control how many websites to scan concurrently.
  • Multiple log formats: Brief (greppable), Verbose (human readable), XML, JSON, MagicTree,
  • RubyObject, MongoDB.
  • Proxy support including TOR.
  • Custom HTTP headers.
  • Basic HTTP authentication.
  • Control over webpage redirection.
  • Nmap-style IP ranges.
  • Fuzzy matching.
  • Result certainty awareness.
  • Custom plugins defined on the command line."

Let's see WhatWeb in action.

Wendel-Henriques-MacBook-Pro:whatweb-0.4.1 whenrique$ ./whatweb -v -a 4 [200] [404] [200] [200] [404] [200]
<Several Requests>
<Several Requests>
<Several Requests> [404] [404] [200] [200]
Apache, Country[UNITED STATES][US], HTTPServer[Apache], IP[AAA.BBB.CCC.DDD], JQuery[1.7.1], Kordil-EDMS, Lightbox, Script[JavaScript,text/javascript], Title[My Target Website], WordPress[3.3.1], x-pingback[]
Status : 200
Apache ---------------------------------------------------------------------
Description: The Apache HTTP Server Project is an effort to develop and
maintain an open-source HTTP server for modern operating
systems including UNIX and Windows NT. The goal of this
project is to provide a secure, efficient and extensible
server that provides HTTP services in sync with the current
HTTP standards. - homepage:

Country --------------------------------------------------------------------
Description: Shows the country the IPv4 address belongs to. This uses
the GeoIP IP2Country database from Instructions on updating the
database are in the plugin comments.
Module : US

HTTPServer -----------------------------------------------------------------
Description: HTTP server header string. This plugin also attempts to
identify the operating system from the server header.
String : Apache (from server string)

IP -------------------------------------------------------------------------
Description: IP address of the target, if available.

JQuery ---------------------------------------------------------------------
Description: A fast, concise, JavaScript that simplifies how to traverse
HTML documents, handle events, perform animations, and add
AJAX. - Homepage:
Version : 1.7.1

Kordil-EDMS ----------------------------------------------------------------
Description: Kordil EDMS - Electronic Document Management System -

Lightbox -------------------------------------------------------------------
Description: Javascript for nice image popups

Script ---------------------------------------------------------------------
Description: This plugin detects instances of script HTML elements and
returns the script language/type.
String : JavaScript,text/javascript

Title ----------------------------------------------------------------------
Description: The HTML page title
String : My Target Website (from page title)

WordPress ------------------------------------------------------------------
Description: WordPress is an opensource blogging system commonly used as
a CMS. Homepage:
Version : 3.3.1 (from md5 sums of files)
Version : 3.3.1

x-pingback -----------------------------------------------------------------
Description: A pingback is one of three types of linkbacks, methods for
Web authors to request notification when somebody links to
one of their documents. This enables authors to keep track
of who is linking to, or referring to their articles. Some
weblog software, such as Movable Type, Serendipity,
WordPress and Telligent Community, support automatic
String :

Basically we instructed WhatWeb to test being verbose (-v) and aggression level set to heavy (-a 4). Please, consult the "README" file for more options and usage examples.

As demonstrated above, WhatWeb identified the Webserver, resolved the IP address and country where the system is hosted and most important, different technologies available. These available technologies are interesting because they may be vulnerable to a different set of attacks.

For example, WhatWeb identified that Kordil-EDMS is available, with a fast search at Google this potential vulnerability was found:

Title: Kordil EDMS 'Password' Parameter SQL Injection Vulnerability
Affected Script:

Based on my experience, this Electronic Document Management System (Kordil EDMS) is not popular, consequently, even if the target website is not vulnerable to the potential issue found we could download a copy and audit it. Since this software is not popular, it's very unlikely that an expert audited it and consequently a different set of simple web attacks may exist.

Another example and probably the most interesting attack vector is WordPress being detected by WhatWeb. At this point we could look for a set of different potential issues in the exploit-db database, however, there is another nice and small tool called WPScan that can automate part of this process.

WPScan is a black box WordPress vulnerability scanner, let's see WPScan in action.

Wendel-Henriques-MacBook-Pro:WPScan whenrique$ ruby1.9 wpscan.rb --url --enumerate
__ _______ _____
\ \ / / __ \ / ____|
\ \ /\ / /| |__) | (___ ___ __ _ _ __
\ \/ \/ / | ___/ \___ \ / __|/ _` | '_ \
\ /\ / | | ____) | (__| (_| | | | |
\/ \/ |_| |_____/ \___|\__,_|_| |_| v2.0rNA

WordPress Security Scanner by the WPScan Team
Sponsored by the RandomStorm Open Source Initiative

| URL:
| Started on Thu Dec 6 10:46:25 2012

[+] The WordPress theme in use is ffh v1.1
[!] The WordPress '' file exists
[+] User registration is enabled
[+] WordPress version 3.4.2 identified from meta generator

[!] We have identified 1 vulnerabilities from the version number :

| * Title: WordPress 3.4.2 Cross Site Request Forgery
| * Reference:

[+] Enumerating installed plugins (only vulnerable ones) ...

Checking for 304 total plugins... 100% complete.

[+] We found 4 plugins:

| Name: adrotate
| Location:
| Readme:
| [!] AdRotate plugin <= 3.6.5 SQL Injection Vulnerability
| * Reference:
| [!] AdRotate plugin <= 3.6.6 SQL Injection Vulnerability
| * Reference:

| Name: backwpup
| Location:
| Readme:
| [!] BackWPUp 2.1.4 Code Execution
| * Reference:
| [!] plugin BackWPup 1.5.2, 1.6.1, 1.7.1 Remote and Local Code Execution Vulnerability
| * Reference:

| Name: dynamic-widgets
| Location:
| Readme:
| [!] Dynamic Widgets <= 1.5.1 Cross Site Scripting
| * Reference:

| Name: relevanssi
| Location:
| Readme:
| [!] Relevanssi 2.7.2 Stored XSS Vulnerability
| * Reference:

[+] Enumerating installed themes (only vulnerable ones) ...

Checking for 137 total themes... 100% complete.

[+] We found 1 themes:

| Name: unite
| Location:
| [!] XSS vulnerability in Parallelus premium WordPress themes
| * Reference:

[+] Enumerating timthumb files ...

Checking for 1561 total timthumbs... 100% complete.
No timthumb files found :(

[+] Enumerating usernames ...

[+] We found the following 4 username/s :

| id: 1 | name: admin | nickname: empty
| id: 2 | name: backup | nickname: backup admin
| id: 3 | name: asmith | nickname: empty
| id: 4 | name: test | nickname: empty

[+] Finished at Thu Dec 6 10:58:51 2012
[+] Elapsed time: 00:12:26

Basically we instructed WPScan to test (--url) and to run all enumeration tools (--enumerate). Please, consult the "README" file for more options and usage examples.

As demonstrated above, WPScan identified:

  • The theme available and a potential vulnerability.
  • Fingerprinted the WordPress version and identified one CSRF vulnerability within WordPress.
  • Tested for available plugins and listed several potential vulnerabilities.
  • Finally, 4 usernames were enumerated allowing brute-force attacks.

There are tons of other options, but the goal of this blog post is not to exhaust them all. I hope that readers that are beginners with Web Application Security could understand how important is to fingerprint available technologies and how they could be used to compromise a target website.

Trustwave reserves the right to review all comments in the discussion below. Please note that for security and other reasons, we may not approve comments containing links.