ObserverWard

侦查守卫(ObserverWard)指纹识别工具Community web fingerprint identification tool

View on GitHub

logo

中文简体

ObserverWard

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

安装

1. 源码手动安装

git clone https://github.com/0x727/ObserverWard
cd ObserverWard
cargo build --target x86_64-unknown-linux-musl --release --all-features

-

更多安装细节请查看当前项目的Actions自动化编译构建流程文件

2. 下载二进制安装

3. Mac系统

brew install observer_ward

使用方法

Usage: observer_ward [--targets <targets...>] [-t <target>] [--stdin] [--fpath <fpath>] [--yaml <yaml>] [--gen <gen>] [--path <path>] [--verify <verify>] [-f <file>] [-u] [-c <csv>] [-j <json>] [--jsonl] [--proxy <proxy>] [--timeout <timeout>] [--plugins <plugins>] [--update-plugins] [--update-self] [--thread <thread>] [--webhook <webhook>] [--webhook-auth <webhook-auth>] [--service] [-s <api-server>] [--token <token>] [--ua <ua>] [--daemon] [--danger] [--silent] [--filter] [--irr] [--nargs <nargs>] [--fargs <fargs>] [--engine <engine>]

observer_ward

Options:
  --targets         multiple targets from the API
  -t, --target      the target (required, unless --stdin used)
  --stdin           read target(s) from STDIN
  --fpath           customized fingerprint file path
  --yaml            customized fingerprint yaml directory (slow)
  --gen             generate json format fingerprint library from yaml
                    format(requires yaml parameter)
  --path            customized nuclei template file path
  --verify          validate the specified yaml file or grep keyword
  -f, --file        read the target from the file
  -u, --update-fingerprint
                    update web fingerprint
  -c, --csv         export to the csv file or Import form the csv file
  -j, --json        export to the json file or Import form the json file
  --jsonl           write output in JSON Lines format
  --proxy           proxy to use for requests
                    (ex:[http(s)|socks5(h)]://host:port)
  --timeout         set request timeout.
  --plugins         the 'plugins' directory is used when the parameter is the
                    default
  --update-plugins  update nuclei plugins
  --update-self     update self
  --thread          number of concurrent threads.
  --webhook         send results to webhook server
                    (ex:https://host:port/webhook)
  --webhook-auth    the auth will be set to the webhook request header
                    AUTHORIZATION
  --service         using nmap fingerprint identification service (slow)
  -s, --api-server  start a web API service (ex:127.0.0.1:8080)
  --token           api Bearer authentication
  --ua              customized ua
  --daemon          api background service
  --danger          danger mode
  --silent          silent mode
  --filter          filter mode,Display only the fingerprint that is not empty
  --irr             include request/response pairs in the JSONL output
  --nargs           poc nuclei engine additional args
  --fargs           poc afrog engine additional args
  --engine          poc engine "nuclei", "afrog" or "all", default nuclei
  --help            display usage information

更新指纹

系统 路径
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    
https://0x727.github.io/FingerprintHub/plugins/tags.yaml:=> /home/kali-team/.config/observer_ward/tags.yaml' file size => 4761
https://0x727.github.io/FingerprintHub/web_fingerprint_v3.json:=> /home/kali-team/.config/observer_ward/web_fingerprint_v3.json' file size => 978084

更新插件

系统 路径
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

验证指纹是否有效

➜  ~ ./observer_ward --yaml /home/kali-team/IdeaProjects/FingerprintHub/web_fingerprint --gen web_fingerprint_v3.json
➜  ~ jq length web_fingerprint_v3.json
3448
➜  ~ ./observer_ward -t https://www.example.com --verify 0example.yaml
Url: https://www.example.com/
Headers:
x-cache: HIT
accept-ranges: bytes
age: 212697
cache-control: max-age=604800
content-type: text/html; charset=UTF-8
date: Thu, 14 Apr 2022 03:09:03 GMT
etag: "3147526947"
expires: Thu, 21 Apr 2022 03:09:03 GMT
last-modified: Thu, 17 Oct 2019 07:18:26 GMT
server: ECS (sab/5783)
vary: Accept-Encoding
StatusCode: 200 OK
Text:
<!doctype html>
<html>
<head>
    <title>example domain</title>

    <meta charset="utf-8" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <style type="text/css">
    body {
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: -apple-system, system-ui, blinkmacsystemfont, "segoe ui", "open sans", "helvetica neue", helvetica, arial, sans-serif;
        
    }
    div {
        width: 600px;
        margin: 5em auto;
        padding: 2em;
        background-color: #fdfdff;
        border-radius: 0.5em;
        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
    }
    a:link, a:visited {
        color: #38488f;
        text-decoration: none;
    }
    @media (max-width: 700px) {
        div {
            margin: 0 auto;
            width: auto;
        }
    }
    </style>    
</head>

<body>
<div>
    <h1>example domain</h1>
    <p>this domain is for use in illustrative examples in documents. you may use this
    domain in literature without prior coordination or asking for permission.</p>
    <p><a href="https://www.iana.org/domains/example">more information...</a></p>
</div>
</body>
</html>
Favicon: {}

Matching fingerprintV3WebFingerPrint {
    name: "0example",
    priority: 3,
    request: WebFingerPrintRequest {
        path: "/",
        request_method: "get",
        request_headers: {},
        request_data: "",
    },
    match_rules: WebFingerPrintMatch {
        status_code: 0,
        favicon_hash: [],
        headers: {},
        keyword: [
            "<title>Example Domain</title>",
        ],
    },
}
[ https://www.example.com |["0example"] | 1256 | 200 | example domain ]
Important technology:

+-------------------------+----------+--------+-------------+----------------+----------+
| url                     | name     | length | status_code | title          | priority |
+=========================+==========+========+=============+================+==========+
| https://www.example.com | 0example | 1256   | 200         | example domain | 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":[]}]

导出结果到JSON Line文件

➜  ~ ./observer_ward -t https://httpbin.org --json result.json --jsonl
[ 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":[]}
➜  ~ ./observer_ward -t https://httpbin.org --silent --jsonl
{"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
iconv -f UTF-8 -t GB18030 Result.csv > Result.csv

调用AFrog检测漏洞

➜  ~ ./observer_ward -t http://172.20.0.2/ --engine afrog --plugins default
 __     __     ______     ______     _____
/\ \  _ \ \   /\  __ \   /\  == \   /\  __-.
\ \ \/ ".\ \  \ \  __ \  \ \  __<   \ \ \/\ \
 \ \__/".~\_\  \ \_\ \_\  \ \_\ \_\  \ \____-
  \/_/   \/_/   \/_/\/_/   \/_/ /_/   \/____/
Community based web fingerprint analysis tool.
_____________________________________________
:  https://github.com/0x727/FingerprintHub  :
:  https://github.com/0x727/ObserverWard    :
 --------------------------------------------
[ http://172.20.0.2/ |["apache-http", "thinkphp"] | 931 | 200 |  ]
[critical] [thinkphp-5-0-23-index-php-method-rce] | [http://172.20.0.2/index.php?s=captcha] 
[critical] [thinkphp-5023-rce] | [http://172.20.0.2/?s=captcha&test=-1] 
Important technology:
+--------------------+-------------+--------+-------------+-------+----------+--------------------------------------+
| url                | name        | length | status_code | title | priority | plugins                              |
+====================+=============+========+=============+=======+==========+======================================+
| http://172.20.0.2/ | apache-http | 931    | 200         |       | 3        | thinkphp-5023-rce                    |
|                    | thinkphp    |        |             |       |          | thinkphp-5-0-23-index-php-method-rce |
+--------------------+-------------+--------+-------------+-------+----------+--------------------------------------+
➜  ~ 

➜  ~ ./observer_ward -t http://172.20.0.2/ --engine afrog --plugins default --fargs "-S critical"

调用Nuclei检测漏洞

➜  ~ ./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|
+---------------------+---------+--------+-------------+-------------+----------+------------+

➜  ~ ./observer_ward_amd64 -f target.txt --json result.json --plugins 0x727/FingerprintHub/plugins
➜  ~ ./observer_ward_amd64 -f target.txt --json result.json --plugins default
➜  ~ ./observer_ward_amd64 -f target.txt --json result.json --plugins default --irr
➜  ~ ./observer_ward_amd64 -f target.txt --path /home/kali-team/nuclei-templates

WebHook

from flask import Flask, request

app = Flask(__name__)


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


if __name__ == '__main__':
    app.run()
➜  ~ ./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服务

# mkcert 命令生成
mkcert -key-file key.pem -cert-file cert.pem localhost
# openssl 命令生成
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365
➜  ~ ./observer_ward -s 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 '{"target":"https://httpbin.org/"}'
Response:
[{"url":"http://httpbin.org/","name":["swagger"],"priority":5,"length":9593,"title":"httpbin.org","status_code":200,"is_web":true,"plugins":[]}]
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
}'
{
  "targets": [],
  "update_fingerprint": false,
  "proxy": "",
  "timeout": 10,
  "plugins": "",
  "update_plugins": false,
  "thread": 100,
  "webhook": "",
  "webhook_auth": "",
  "service": false
}
curl --request POST \
  --url http://127.0.0.1:8000/v1/observer_ward \
  --header 'Authorization: Bearer 22e038328151a7a06fd4ebfa63a10228' \
  --header 'Content-Type: application/json' \
  --data '{"target":"https://www.example.com/","webhook_auth":"ID"}'
➜  ~ curl --request POST \ 
  --url http://127.0.0.1:8000/v1/observer_ward \
  --header 'Authorization: Bearer 22e038328151a7a06fd4ebfa63a10228' \
  --header 'Content-Type: application/json' \
  --data '{"target":"https://127.0.0.1:9443/","webhook_auth":"ID","targets":["https://127.0.0.1:8000/","http://127.0.0.1:9200/"]}'

危险模式

自定义UA

静默模式

提交指纹

为ObserverWard做贡献

提交代码

git clone git@github.com:你的个人github用户名/ObserverWard.git
cd ObserverWard
git remote add upstream git@github.com:0x727/ObserverWard.git
git fetch upstream
git config --global user.name "$GITHUB_USERNAME"
git config --global user.email "$GITHUB_EMAIL"
git config --global github.user "$GITHUB_USERNAME"
git fetch --all
git fetch upstream
git checkout -b dev
git add 你添加或者修改的文件名
git commit -m "添加你的描述"
git push origin dev

提交建议

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

Stargazers over time

Stargazers over time