Skip to content

Cross platform community web fingerprint identification tool

License

Notifications You must be signed in to change notification settings

MornS0/ObserverWard

 
 

Repository files navigation

logo

中文简体

ObserverWard

类别 说明
作者 三米前有蕉皮
团队 0x727 未来一段时间将陆续开源工具
定位 社区化指纹库识别工具。
语言 Rust
功能 命令行Web指纹识别工具

关于

  • 我的Github帐号被标记了,现在还没解封,所以我在issues的评论是不公开的,你们也看不见
  • 如果有什么问题可以直接添加我的微信:Kali-Team

安装

1. 源码手动安装

git clone https://github.com/0x727/ObserverWard
cd ObserverWard
cargo build --target  x86_64-unknown-linux-musl --release --all-features
  • 更多安装细节请查看当前项目的Actions自动化编译构建流程文件

2. 下载二进制安装

  • 因为添加了--update_self参数,方便更新固定了标签,每次更新代码都会自动重新编译发布到default版本,所以default永远是最新的版本。
  • 发行版本下载页面。

3. Mac系统

brew install observer_ward

使用方法

~ ./observer_ward -h
observer_ward 2022.3.14
author: Kali-Team
about: Community based web fingerprint analysis tool.

USAGE:
    observer_ward [OPTIONS]

OPTIONS:
    -c, --csv <CSV>             Export to the csv file or Import form the csv file
        --daemon                API background service
    -f, --file <FILE>           Read the target from the file
    -h, --help                  Print help information
    -j, --json <JSON>           Export to the json file or Import form the json file
        --plugins <plugins>     The 'plugins' directory is used when the parameter is the 'default'
        --proxy <PROXY>         Proxy to use for requests (ex: [http(s)|socks5(h)]://host:port)
    -s, --rest_api <SERVER>     Start a web API service (ex: 127.0.0.1:8080)
        --service               Using nmap fingerprint identification service (slow)
        --stdin                 Read url(s) from STDIN
    -t, --target <TARGET>       The target URL(s) (required, unless --stdin used)
        --thread <THREAD>       Number of concurrent threads. [default: 100]
        --timeout <TIMEOUT>     Set request timeout. [default: 10]
        --token <token>         API Bearer authentication
    -u, --update_fingerprint    Update web fingerprint
        --update_plugins        Update nuclei plugins
        --update_self           Update self
    -V, --version               Print version information
        --verify <verify>       Validate the specified yaml file
        --webhook <WEBHOOK>     Send results to webhook server (ex: https://host:port/webhook)

更新指纹

  • 使用-u参数从指纹库中更新指纹,也可以自己从指纹库项目当前系统对应目录。
系统 路径
Windows C:\Users\Alice\AppData\Roaming\observer_ward\web_fingerprint_v3.json
Linux /home/alice/.config/observer_ward/web_fingerprint_v3.json
macOS /Users/Alice/Library/Application Support/observer_ward/web_fingerprint_v3.json
~ ./observer_ward_amd64 -u    
update: /home/kali-team/.config/observer_ward/web_fingerprint_v3.json file size => 953771

更新插件

  • 使用--update_plugins指纹库项目下载插件压缩包到用户配置目录。
  • 并自动解压到当前系统对应目录,当使用--plugins default参数时会默认使用这个目录下的插件。
  • 更新会删除原来的目录,重新解压覆盖。
系统 路径
Windows C:\Users\Alice\AppData\Roaming\observer_ward\plugins
Linux /home/alice/.config/observer_ward/plugins
macOS /Users/Alice/Library/Application Support/observer_ward/plugins

验证指纹是否有效

  • --verify指定要验证的指纹yaml文件路径,-t指定要识别的目标。
~ ./observer_ward --verify verification.yaml -t https://httpbin.org
[ https://httpbin.org |["swagger"] | 9593 | 200 | httpbin.org ]
Important technology:

+---------------------+---------+--------+-------------+-------------+----------+
| url                 | name    | length | status_code | title       | priority |
+=====================+=========+========+=============+=============+==========+
| https://httpbin.org | swagger | 9593   | 200         | httpbin.org | 5        |
+---------------------+---------+--------+-------------+-------------+----------+

单个目标识别

~ ./observer_ward -t https://httpbin.org
[ https://httpbin.org |["swagger"] | 9593 | 200 | httpbin.org ]
Important technology:

+---------------------+---------+--------+-------------+-------------+----------+
| url                 | name    | length | status_code | title       | priority |
+=====================+=========+========+=============+=============+==========+
| https://httpbin.org | swagger | 9593   | 200         | httpbin.org | 5        |
+---------------------+---------+--------+-------------+-------------+----------+

从文件获取要识别的目标

~ ./observer_ward -f target.txt

从标准输出获取识别目标

~ cat target.txt| ./observer_ward --stdin
  • 结果和从文件获取的效果一样,这里不再截图展示。

导出结果到JSON文件

~ ./observer_ward -t https://httpbin.org -j result.json
[ https://httpbin.org |["swagger"] | 9593 | 200 | httpbin.org ]
Important technology:

+---------------------+---------+--------+-------------+-------------+----------+
| url                 | name    | length | status_code | title       | priority |
+=====================+=========+========+=============+=============+==========+
| https://httpbin.org | swagger | 9593   | 200         | httpbin.org | 5        |
+---------------------+---------+--------+-------------+-------------+----------+
➜  ~ cat result.json
[{"url":"https://httpbin.org","name":["swagger"],"priority":5,"length":9593,"title":"httpbin.org","status_code":200,"is_web":true,"plugins":[]}]

导出结果到CSV文件

~ ./observer_ward -t https://httpbin.org -c result.csv
[ https://httpbin.org |["swagger"] | 9593 | 200 | httpbin.org ]
Important technology:

+---------------------+---------+--------+-------------+-------------+----------+
| url                 | name    | length | status_code | title       | priority |
+=====================+=========+========+=============+=============+==========+
| https://httpbin.org | swagger | 9593   | 200         | httpbin.org | 5        |
+---------------------+---------+--------+-------------+-------------+----------+
➜  ~ cat result.csv 
url,name,length,status_code,title,priority
https://httpbin.org,swagger,9593,200,httpbin.org,5

调用Nuclei检测漏洞

  • 请确保nuclei更新至2.5.3以上版本
  • 如果需要使用nuclei检测漏洞,需要首先安装Nuclei到当前目录,或者是加入环境变量里面,让observe_ward可以正常调用。
  • 再下载指纹库中的插件到当前目录下,或者使用--update_plugins插件。
  • 指纹库中已经对部分组件的插件进行了分类。
  • 如果识别到的组件在plugins目录下存在和组件同名的文件夹,会对目标调用Nuclei使用匹配到的插件进行检测,存在漏洞会输出到屏幕。
  • 因为经过测试在指纹识别过程中同时调用nuclei检测漏洞会影响Web指纹识别的效果,也会拉长识别的时间,所以选择识别完Web指纹后将结果保存到文件,再解析文件调用nuclei检测。
  • 目前支持将Web指纹识别的结果保存为jsoncsv格式,所以只能解析这两种格式。
~ ./observer_ward_amd64 -t https://httpbin.org --csv result.csv --plugins 0x727/FingerprintHub/plugins
 __     __     ______     ______     _____
/\ \  _ \ \   /\  __ \   /\  == \   /\  __-.
\ \ \/ ".\ \  \ \  __ \  \ \  __<   \ \ \/\ \
 \ \__/".~\_\  \ \_\ \_\  \ \_\ \_\  \ \____-
  \/_/   \/_/   \/_/\/_/   \/_/ /_/   \/____/
Community based web fingerprint analysis tool.
_____________________________________________
:  https://github.com/0x727/FingerprintHub  :
:  https://github.com/0x727/ObserverWard    :
 --------------------------------------------
[ https://httpbin.org |["swagger"] | 9593 | 200 | httpbin.org ]
Important technology:

+---------------------+---------+--------+-------------+-------------+----------+
| url                 | name    | length | status_code | title       | priority |
+=====================+=========+========+=============+=============+==========+
| https://httpbin.org | swagger | 9593   | 200         | httpbin.org | 5        |
+---------------------+---------+--------+-------------+-------------+----------+
Important technology:

+---------------------+---------+--------+-------------+-------------+----------+------------+
| url                 | name    | length | status_code | title       | priority | plugins    |
+=====================+=========+========+=============+=============+==========+============+
| https://httpbin.org | swagger | 9593   | 200         | httpbin.org | 5        | swagger-api|
+---------------------+---------+--------+-------------+-------------+----------+------------+
  • 同理json格式也可以。
~ ./observer_ward_amd64 -f target.txt --json result.json --plugins 0x727/FingerprintHub/plugins
  • 使用默认插件目录default
~ ./observer_ward_amd64 -f target.txt --json result.json --plugins default

WebHook

from flask import Flask, request

app = Flask(__name__)


@app.route("/webhook", methods=['POST'])
def xray_webhook():
    print(request.json)
    return 'ok'


if __name__ == '__main__':
    app.run()
  • 开启webhook后,添加--webhook参数,将识别的结果发送到webhook服务器。
~ ./observer_ward_amd64 -f target.txt --webhook http://127.0.0.1:5000/webhook

Webhook json格式:

{
    "is_web":true,
    "length":9593,
    "name":[
        "swagger"
    ],
    "plugins":[

    ],
    "priority":5,
    "status_code":200,
    "title":"httpbin.org",
    "url":"https://httpbin.org/"
}

开启API服务

  • 使用rest_api参数提供监听地址和端口开启rest-api服务,使用--daemon参数将服务放到后台进程(不支持Window系统)。
  • 如果需要支持https协议,需要生成cert.pemkey.pem文件放到程序配置目录,例如:Linux系统下的/home/alice/.config/observer_ward/
  • 生成证书文件
mkcert -key-file key.pem -cert-file cert.pem localhost
~ ./observer_ward --rest_api 127.0.0.1:8000 --token 22e038328151a7a06fd4ebfa63a10228
 __     __     ______     ______     _____
/\ \  _ \ \   /\  __ \   /\  == \   /\  __-.
\ \ \/ ".\ \  \ \  __ \  \ \  __<   \ \ \/\ \
 \ \__/".~\_\  \ \_\ \_\  \ \_\ \_\  \ \____-
  \/_/   \/_/   \/_/\/_/   \/_/ /_/   \/____/
Community based web fingerprint analysis tool.
_____________________________________________
:  https://github.com/0x727/FingerprintHub  :
:  https://github.com/0x727/ObserverWard    :
 --------------------------------------------
API service has been started:https://127.0.0.1:8000/v1/observer_ward
Request:
curl --request POST \
  --url https://127.0.0.1:8000/v1/observer_ward \
  --header 'Authorization: Bearer 22e038328151a7a06fd4ebfa63a10228' \
  --header 'Content-Type: application/json' \
  --data '{"targets":["https://httpbin.org/"]}'
Response:
[{"url":"http://httpbin.org/","name":["swagger"],"priority":5,"length":9593,"title":"httpbin.org","status_code":200,"is_web":true,"plugins":[]}]
  • 更新配置接口,更新配置时会对识别服务上锁,GET方法可以回去当前配置,POST方法对配置全量更新,未设置的字段为默认值。
curl --request POST \
  --url http://127.0.0.1:8000/v1/config \
  --header 'Authorization: Bearer 22e038328151a7a06fd4ebfa63a10228' \
  --header 'Content-Type: application/json' \
  --data '{
    "update_fingerprint": false
}'
  • 其他可选参数,update_fingerprintupdate_plugins只能在更新配置接口下使用;其他参数可以在提交任务时和目标附加在一起。
{
  "targets": [],
  "update_fingerprint": false,
  "proxy": "",
  "timeout": 10,
  "plugins": "",
  "update_plugins": false,
  "thread": 100,
  "webhook": "",
  "service": false
}

提交指纹

  • ObserverWard使用到的指纹规则全部来自FingerprintHub项目。
  • 如果需要获取指纹库和提交指纹规则,请查看FingerprintHub项目。

为ObserverWard_0x727做贡献

ObserverWard 是一个免费且开源的项目,我们欢迎任何人为其开发和进步贡献力量。

  • 在使用过程中出现任何问题,可以通过 issues 来反馈。
  • Bug 的修复可以直接提交 Pull Request 到 dev 分支。
  • 如果是增加新的功能特性,请先创建一个 issue 并做简单描述以及大致的实现方法,提议被采纳后,就可以创建一个实现新特性的 Pull Request。
  • 欢迎对说明文档做出改善,帮助更多的人使用 ObserverWard,特别是英文文档。
  • 贡献代码请提交 PR 至 dev 分支,master 分支仅用于发布稳定可用版本。
  • 如果你有任何其他方面的问题或合作,欢迎发送邮件至 0x727Team@gmail.com

Stargazers over time

Stargazers over time

About

Cross platform community web fingerprint identification tool

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 98.8%
  • Python 1.2%