大宝剑-信息收集和资产梳理工具(红队、蓝队、企业组织架构、子域名、Web资产梳理、Web指纹识别、ICON_Hash资产匹配)

Overview

DBJ大宝剑 🗡

技术栈

边界打点资产梳理工具

Layui
Python-Flask
Redis
MongoDB

演示地址http://119.45.153.4:5000 密码:admin/admin

演示站只作为演示,功能不可用!!!

Web资产管理虽然可跑任务,但是所有人都能看到你跑的任务

不要改密码,不要改密码,改了别人就看不了了

功能简介

企业组织架构查询

1、爬虫从爱企查查询企业的组织架构,一级单位、二级单位、三级单位的首页和邮箱等信息

image-20210310145840858

2、根据企业的主公司名称whois反查一级域名、ICP备案反查一级域名

image-20210310142814509

某些子公司可能也会有自己的ICP备案,这样上边的方法就会漏掉资产,这时需要自己去手动查询

ICP备案查询

另外,企业组织架构里也有很多一级域名,但有些三级单位就很偏了和目标关联性不大,所以没有自动统计到一级域名这里边来,需要手工把企业组织架构导出,然后筛选一下域名,跟一级域名统计的结果合并后去个重,就能直接扔到Web资产梳理模块里边收集子域名了。

去重工具可在狼盘下载

3、所有查询到的数据会在后台命令行输出预览

image-20210310143948010

4、所有查询到的数据会存入redis缓存数据库,并且可导出为CSV

​ 请及时导出查询到的数据,查询其它企业信息时会清空上一个查询企业的缓存

5、注意!注意!注意!(重要的事情说三遍)

​ 此模块调用了百度的爱企查,访问速度过快过多会封IP弹出验证码导致无法查询报错

​ 使用代理池查询速度会很慢,所以为了解决这个问题我使用了X-Remote-Addr+Cookie绕过

​ 所以,这个模块的正确使用方法请注意看第六条!

6、添加Cookie

​ 首先,在你的浏览器中登录百度的账号,打开爱企查这个网站

​ 然后,用Cookie Editor这个浏览器插件导出爱企查的Cookie(会存在粘贴板,直接去粘贴)

​ 再然后,把导出的Cookie粘贴到本项目的baidu_cookie.txt这个文件中

​ 接着去正常使用此模块,随便找个公司名试一下,如果还是报错的话,接着往下看

​ 此时,打开爱企查会有一个验证码让你填,填对了它,接着就能正常使用了

image-20210310141735270

​ 最后,如果长时间不用此模块,下一次用还会报错;

​ 这次就不用导Cookie了,直接浏览器访问爱企查填写一次验证码即可

Web资产梳理

一、子域名资产

原理:调用FOFA数据

cmd = '(domain="{dom}") || (cert="{dom}" &&  (status_code="200" || status_code="403") )'.format(dom=rootdomain)

子域名会自动识别CDN,帮助你定位目标真实IP和C段。

此方法可收集到绝大部分子域名资产,但不是百分百全的

二、IP资产(Web资产)

原理:调用FOFA数据(节约时间和VPS、代理池等资源)

这个功能是重头戏,也是最初设计的初衷(扫描单IP或C段中http协议的网站,并识别Web指纹)

image-20210311161144314

来看一下此模块的特点:

根据个人渗透时的思路设计的,不知道是否适合大多数人

1、无分页,一拉到底

开着Burp,点一个链接测试一个,不用老去翻页了

2、指纹索引

统计出有哪些指纹命中了,点击相关指纹则下边的资产也只显示与指纹相关的资产

image-20210311161921828

3、导出URL

导出全部URL,或根据指纹索引匹配资产导出URL,然后扔到别的工具或漏扫里边跑

image-20210311161942904

关于Web指纹识别

Web指纹识别时并未发送恶意请求所以无需代理,这样速度还快

所有指纹都在flaskr->rules.py中,以一个Dict的形式存在,python中字典的索引比列表(list)快

目前指纹不是很多,只收录一些国内常见且存在安全缺陷的应用

指纹的每个特征用 "|" 分割开来,前后不能有空格

image-20210311170057173

指纹很大一部分来自棱洞Ehole,感谢r0eXpeR师傅的开源分享

同时欢迎大家提交新指纹,自己去FOFA找几个资产验证特征准确性后,提交Issues即可。

指纹识别的速度配置

文件位置:flaskr->admin.py->第34行代码处

# 设置最大线程数
thread_max = threading.BoundedSemaphore(value=305)

ICON_HASH计算

计算图标的哈希值,并自动匹配相关资产(适合瞄准目标时用)

image-20210311164827806

POC插件漏扫

计划中先调研漏扫引擎

安装教程

注意:企业组织架构收集模块因需在浏览器登录验证原因,暂时只能在windows上用

一、安装第三方库

推荐使用Python3.9以上版本

pip install -r requirements.txt
pip install Flask

二、安装配置数据库

先安装MonGoDB和Redis

#配置MongoDB
mongo
use webapp
db.createCollection("tasks")
db.createCollection("webs")
db.createCollection("subdomains")
db.createCollection("user")
db.user.insert({uid:1,username:'admin',password:'admin'})
exit

三、启动应用

#Windows系统 
点击start.bat

#Linux系统
sh start.sh

然后打开浏览器访问 IP:5000 登录即可(账户密码默认都是admin,进去自己改)

使用场景

SRC

SRC挖掘中可以快人一步的理清脆弱资产,先下手为强

红队打点

收集目标信息,梳理目标资产,快速发现脆弱资产尽快进入内网

蓝队资产梳理

梳理自身资产,及时发现脆弱资产,重点看护

漏洞研究 & 安全开发

Web指纹可用于开发自己的小工具,代码都有注释,通读代码可拓展自己的开发思路。

这些指纹都是国内出现频率较高的,所以可根据这里的Web指纹去研究挖掘相关Web应用的漏洞。

Owner
Wolf Group Security Team
Wolf Group Security Team 狼组安全团队
Wolf Group Security Team
Crypto Meta Extractor

Crypto Meta Extractor This repository contains the code which extracts some metadata of all the cryptocurrencies listed (9K) on CoinMarketCap. Coding

Samyak Jain 3 Jul 03, 2022
Vulmap 是一款 web 漏洞扫描和验证工具, 可对 webapps 进行漏洞扫描, 并且具备漏洞利用功能

Vulmap 是一款 web 漏洞扫描和验证工具, 可对 webapps 进行漏洞扫描, 并且具备漏洞利用功能

之乎者也 2.8k Dec 29, 2022
Profil3r is an OSINT tool that allows you to find potential profiles of a person on social networks, as well as their email addresses 🕵️

Profil3r is an OSINT tool that allows you to find potential profiles of a person on social networks, as well as their email addresses. This program also alerts you to the presence of a data leak for

1.1k Aug 24, 2021
Provides script to download and format public IP lists related to the Log4j exploit.

Provides script to download and format public IP lists related to the Log4j exploit. Current format includes: plain list, Cisco ASA Network Group.

Gianluca Ulivi 1 Jan 02, 2022
🔐 A simple command-line password manager.

PassVault What Is It? It is a command-line password manager, for educational purposes, that stores localy, in AES encryption, your sensitives datas in

5 Aug 15, 2022
It is a very simple XSS simulator based on flask, python.

It is a very simple XSS simulator based on flask, python. The purpose of making this is for teaching the concept of XSS.

Satin Wuker 3 May 10, 2022
A secure password generator written in python

gruvbox-factory 🏭 "The main focus when developing gruvbox is to keep colors easily distinguishable, contrast enough and still pleasant for the eyes"

Paulo Pacitti 430 Dec 27, 2022
Fuzz introspector is a tool to help fuzzer developers to get an understanding of their fuzzer’s performance and identify any potential blockers.

Fuzz introspector Fuzz introspector is a tool to help fuzzer developers to get an understanding of their fuzzer’s performance and identify any potenti

Open Source Security Foundation (OpenSSF) 221 Jan 01, 2023
Proof of concept for CVE-2021-31166, a remote HTTP.sys use-after-free triggered remotely.

CVE-2021-31166: HTTP Protocol Stack Remote Code Execution Vulnerability This is a proof of concept for CVE-2021-31166 ("HTTP Protocol Stack Remote Cod

Axel Souchet 820 Dec 18, 2022
POC using subprocess lib in Python 🐍

POC subprocess ☞ POC using the subprocess library with Python. References: https://github.com/GuillaumeFalourd/poc-subprocess https://geekflare.com/le

Guillaume Falourd 2 Nov 28, 2022
Um keylogger que se disfarça de um app que tira print da tela.

Keylogger_ Um keylogger que se disfarça de um app que tira print da tela. Este programa captura o print da tela e salva ,normalmente, na pasta Picture

Marcus Vinícius Ribeiro Andrade 1 Dec 03, 2021
SSL / TLS Checking Tool written in Python3

ssts-chk SSL / TLS Checking Tool written in Python3. This tool will perform the following functions: Connect the target given Analyze the secure conne

Douglas Berdeaux 2 Feb 12, 2022
Discord exploit allowing you to be unbannable.

Discord-Ban-Immunity Discord exploit allowing you to be unbannable. 9/3/2021 Found in late August. Found by Passive and Me. Explanation If a user gets

orlando 9 Nov 23, 2022
TCP/UDP port scanner on python, usong scapy and multiprocessin

Port Scanner TCP/UDP port scanner on python, usong scapy and multiprocessing. Usage python3 scanner.py [OPTIONS] IP_ADDRESS [{tcp|udp}[/[PORT|PORT-POR

Egor Krokhin 1 Dec 05, 2021
Scan all java processes on your host to check weather it's affected by log4j2 remote code execution

Log4j2 Vulnerability Local Scanner (CVE-2021-45046) Log4j 漏洞本地检测脚本,扫描主机上所有java进程,检测是否引入了有漏洞的log4j-core jar包,是否可能遭到远程代码执行攻击(CVE-2021-45046)。上传扫描报告到指定的服

86 Dec 09, 2022
Simple Python 3 script to detect the "Log4j" Java library vulnerability (CVE-2021-44228) for a list of URL with multithreading

log4j-detect Simple Python 3 script to detect the "Log4j" Java library vulnerability (CVE-2021-44228) for a list of URL with multithreading The script

Wade 1 Dec 15, 2021
A python tool capable of creating HUGE wordlists. Has the ability to add custom words for concatenation in any way you see fit.

A python tool capable of creating HUGE wordlists. Has the ability to add custom words for concatenation in any way you see fit.

Codex 9 Oct 05, 2022
An automated, reliable scanner for the Log4Shell (CVE-2021-44228) vulnerability.

Log4JHunt An automated, reliable scanner for the Log4Shell CVE-2021-44228 vulnerability. Video demo: Usage Here the help usage: $ python3 log4jhunt.py

RedHunt Labs 39 Nov 21, 2022
2021hvv漏洞汇总

清单 披露时间 涉及商家/产品 漏洞描述 2021/04/08 启明星辰天清汉马USG防火墙存在逻辑缺陷漏洞(历史漏洞) CNVD-2021-17391 启明星辰 天清汉马USG防火墙 逻辑缺陷漏洞 CNVD-2021-12793 2021/04/08 禅道项目管理软件11.6 禅道 11.6 sq

555 Jan 02, 2023
Suricata Language Server is an implementation of the Language Server Protocol for Suricata signatures

Suricata Language Server is an implementation of the Language Server Protocol for Suricata signatures. It adds syntax check, hints and auto-completion to your preferred editor once it is configured.

Stamus Networks 39 Nov 28, 2022