WhatWeb 网站指纹识别软件

一、WhatWeb介绍

WhatWeb是一个开源的网站指纹识别软件
WhatWeb识别网站。它的目标是回答“那个网站是什么?”这个问题。
WhatWeb可识别Web技术,包括内容管理系统(CMS),博客平台,统计/分析包,Javascript库,服务器和嵌入式设备。
WhatWeb有超过1000个插件,每个插件都能识别不同的东西。WhatWeb还可以识别版本号,电子邮件地址,账户ID,Web框架模块,SQL错误等
WhatWeb可以隐秘、快速、彻底或缓慢扫描。WhatWeb支持攻击级别来控制速度和可靠性之间的权衡。当在浏览器中访问网站时,该交易包含许多关于Web技术为该网站提供支持的提示。有时,单个网页访问包含足够的信息来识别网站,但如果没有,WhatWeb可以进一步询问网站。默认的攻击级别称为“被动”,速度最快,只需要一个网站的HTTP请求。这适用于扫描公共网站。在渗透测试中开发了更积极的模式。
特性:
  • 拥有超过1700+个插件
  • 控制速度/隐身和可靠性之间的权衡
  • 性能调优。控制要同时扫描的网站数量。
  • 多种日志格式:XML,JSON,MagicTree,RubyObject,MongoDB、SQL和ElasticSearch。
  • 代理支持,包括TOR
  • 可定制化HTTP头
  • 基本 HTTP 身份验证
  • 控制网页重定向。若网站返回302,会跳转到重定向的网站
  • 可以根据服务器返回的响应头确定网站使用的服务器类型,web中间件类型,cookie信息
  • 可以从网站的源代码中确定网站使用了哪些JavaScript库
  • 可以通过页面hash,path等确定网站使用的cms版本
  • 查询网站ip及所属国家
  • 支持批量扫描网站

二、WhatWeb安装

Whatweb是基于ruby语言开发,因此可以安装在具备ruby环境的系统中,目前支持Windows/Max OSX/Linux。
kali linux下已经集成了此工具;
ubuntu:apt-get install whatweb
安装路径:/usr/share/whatweb
ruby版本:
whatweb版本:

三、WhatWeb使用

3.1、whatweb --help

root@node1:/home/zhang/Desktop# whatweb --help
WhatWeb - Next generation web scanner version 0.4.9.
Developed by Andrew Horton aka urbanadventurer and Brendan Coles.
Homepage: WhatWeb - MorningStar Security   # 官网

Usage: whatweb [options] <URLs>
TARGET SELECTION:
  <TARGETs>                     Enter URLs, hostnames, IP adddresses, filenames, or nmap-format IP address ranges.
  --input-file=FILE, -i         Read targets from a file. You can pipe hostnames or URLs directly with -i /dev/stdin.

TARGET MODIFICATION:
  --url-prefix                  Add a prefix to target URLs. 向目标URL添加前缀
  --url-suffix                  Add a suffix to target URLs. 为目标URL添加后缀
  --url-pattern                 Insert the targets into a URL.  将目标插入URL
                                e.g. example.com/%insert%/robots.txt
AGGRESSION:
The aggression level controls the trade-off between speed/stealth and reliability.
  --aggression, -a=LEVEL        Set the aggression level. Default: 1. 
  1. Stealthy                   每个目标发出一个HTTP请求,每个目标发出一个HTTP请求
  2. Unused                      未使用
  3. Aggressive                 可以对每个目标发出少量HTTP请求。只有当这些插件首先被标识为1级请求时,才会触发针对目标的攻击性插件
  4. Heavy                      每个目标产生大量HTTP请求. 来自所有插件的攻击性测试用于所有URL

HTTP OPTIONS:
  --user-agent, -U=AGENT        Identify as AGENT instead of WhatWeb/0.4.9.
  --header, -H                  Add an HTTP header. eg "Foo:Bar". Specifying a
                                default header will replace it. Specifying an
                                empty value, e.g. "User-Agent:" will remove it.
  --follow-redirect=WHEN        Control when to follow redirects. WHEN may be
                                `never', `http-only', `meta-only', `same-site',
                                `same-domain' or `always'. Default: always.
  --max-redirects=NUM           Maximum number of redirects. Default: 10.

AUTHENTICATION:
  --user, -u=<user:password>    HTTP basic authentication.
  --cookie, -c=COOKIES          Use cookies, e.g. 'name=value; name2=value2'.

PROXY:
  --proxy                       <hostname[:port]> Set proxy hostname and port.
                                Default: 8080.
  --proxy-user                  <username:password> Set proxy user and password.

PLUGINS:
  --list-plugins, -l            List all plugins.  列出插件
  --info-plugins, -I=[SEARCH]   List all plugins with detailed information.  要查看有关插件或关键字搜索插件的详细信息
                                Optionally search with keywords in a comma
                                delimited list.
  --search-plugins=STRING       Search plugins for a keyword.
  --plugins, -p=LIST            Select plugins. LIST is a comma delimited set
                                of selected plugins. Default is all.
                                Each element can be a directory, file or plugin
                                name and can optionally have a modifier, +/-.
                                Examples: +/tmp/moo.rb,+/tmp/foo.rb
                                title,md5,+./plugins-disabled/
                                ./plugins-disabled,-md5
                                -p + is a shortcut for -p +plugins-disabled.
  --grep, -g=STRING             Search for STRING in HTTP responses. Reports
                                with a plugin named Grep.
  --custom-plugin=DEFINITION    Define a custom plugin named Custom-Plugin,
                                Examples: ":text=>'powered by abc'"
                                ":version=>/powered[ ]?by ab[0-9]/"
                                ":ghdb=>'intitle:abc \"powered by abc\"'"
                                ":md5=>'8666257030b94d3bdb46e05945f60b42'"
                                "{:text=>'powered by abc'}"
  --dorks=PLUGIN                List Google dorks for the selected plugin.

OUTPUT:
  --verbose, -v                 Verbose output includes plugin descriptions. Use twice for debugging.
  --colour,--color=WHEN         control whether colour is used. WHEN may be 'never', 'always', or 'auto'.
  --quiet, -q                   Do not display brief logging to STDOUT.
  --no-errors                   Suppress error messages. 抑制错误信息

LOGGING:
  --log-brief=FILE              Log brief, one-line output.
  --log-verbose=FILE            Log verbose output.
  --log-errors=FILE             Log errors.
  --log-xml=FILE                Log XML format.
  --log-json=FILE               Log JSON format.
  --log-sql=FILE                Log SQL INSERT statements.
  --log-sql-create=FILE         Create SQL database tables.
  --log-json-verbose=FILE       Log JSON Verbose format.
  --log-magictree=FILE          Log MagicTree XML format.
  --log-object=FILE             Log Ruby object inspection format.
  --log-mongo-database          Name of the MongoDB database.
  --log-mongo-collection        Name of the MongoDB collection. Default: whatweb.
  --log-mongo-host              MongoDB hostname or IP address. Default: 0.0.0.0.
  --log-mongo-username          MongoDB username. Default: nil.
  --log-mongo-password          MongoDB password. Default: nil.
  --log-elastic-index           Name of the index to store results. Default: whatweb
  --log-elastic-host            Host:port of the elastic http interface. Default: 127.0.0.1:9200

PERFORMANCE & STABILITY:
  --max-threads, -t             Number of simultaneous threads. Default: 25. –wait 和 –max-threads 命令可用于协助规避 IDS
  --open-timeout                Time in seconds. Default: 15.
  --read-timeout                Time in seconds. Default: 30.
  --wait=SECONDS                Wait SECONDS between connections. This is useful when using a single thread.

HELP & MISCELLANEOUS:
  --short-help                  Short usage help.
  --help, -h                    Complete usage help.
  --debug                       Raise errors in plugins.
  --version                     Display version information.

EXAMPLE USAGE:
* Scan example.com.
  ./whatweb example.com
* Scan reddit.com slashdot.org with verbose plugin descriptions.
  ./whatweb -v reddit.com slashdot.org
* An aggressive scan of wired.com detects the exact version of WordPress.
  ./whatweb -a 3 www.wired.com
* Scan the local network quickly and suppress errors.
  whatweb --no-errors 192.168.0.0/24
* Scan the local network for https websites.
  whatweb --no-errors --url-prefix https:// 192.168.0.0/24
* Scan for crossdomain policies in the Alexa Top 1000.
  ./whatweb -i plugin-development/alexa-top-100.txt --url-suffix /crossdomain.xml -p crossdomain_xml
OPTIONAL DEPENDENCIES
--------------------------------------------------------------------------------
To enable MongoDB logging install the mongo gem.

3.2、使用

常规扫描
    whatweb 域名
批量扫描
    可以通过将很多要扫描的域名放在文件内,然后扫描时指定该文件即可。
    使用命令:whatweb -i /root/target.txt
详细回显扫描
    whatweb -v 域名
扫描强度等级控制:
    whatweb -a 等级 域名   (可以和-a和-v参数结合使用)
快速本地扫描(扫描内网主机)
    whatweb --no-errors -t 255 内网网段 (可以和-a和-v参数结合使用)
将扫描结果导出至文件内
    whatweb www.baidu.com --log-json=baidu.json
其他格式导出文件同理:
  • --log-brief=FILE     简要的记录,每个网站只记录一条返回信息
  • --log-verbose=FILE   详细输出
  • --log-xml=FILE       返回xml格式的日志
  • --log-json=FILE      以json格式记录日志
  • --log-json-verbose=FILE  记录详细的json日志
  • --log-magictree=FILE     xml的树形结构
  • --log object=FILE        Ruby对象检查格式
  • --log-mongo-database     MongoDB数据库的名称
  • --log-mongo-collection   MongoDB集合的名称。默认值:whatweb
  • --log-mongo-host         MongoDB主机名或IP地址。默认值:0.0.0.0
  • --log-mongo-username     MongoDB用户名。默认值:nil
  • --log-mongo-password     MongoDB密码。默认值:nil
  • --log errors=FILE        日志错误。这通常以红色打印在屏幕上。
注:
    1. Json 格式需要安装 json 依赖 sudo gem install json
    3、要启用字符集检测和 MongoDB 日志记录,请gem安装 rchardet。 sudo gem install rchardet && sudo cp plugins-disabled/charset.rb my-plugins/
将扫描结果导出至mongo数据库
    whatweb www.baidu.com --log-mongo-database=testdb --log-mongo-collection=whatweb --log-mongo-host=192.168.11.135
    第一次报错:Sorry. The mongo and rchardet gems are required for Mongo output
    安装依赖,执行如下指令:    
apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
gem install mongo
cd /usr/share/whatweb
cp plugins-disabled/charset.rb my-plugins/

四、参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值