BBScan py3 - BBScan py3 With Python

Overview

BBScan_py3

This repository is forked from lijiejie/BBScan 1.5. I migrated the former python code to python3. The following description is the origin author's readme.

BBScan 是一个高并发漏洞扫描工具,可用于

  • 高危漏洞爆发后,编写简单插件或规则,进行全网扫描
  • 作为巡检组件,集成到已有漏洞扫描系统中

BBScan能够在1分钟内

  • 对超过2万个IP地址进行指定端口发现,同时,进行漏洞验证。例如,Samba MS17010漏洞
  • 对超过1000个网站进行HTTP服务发现(80/443),同时,请求某个指定URL,完成漏洞检测

BBScan is a super fast vulnerability scanner.

  • A class B network (65534 hosts) could be scanned within 4 minutes (ex. Detect Samba MS17010)
  • Up to find more than 1000 target's web services and meanwhile, detect the vulnerability associated with a specified URL within one minute

Install

pip3 install -r requirements.txt

开始使用

  • 使用1个或多个插件,扫描某个B段
python BBScan.py --scripts-only --script redis_unauthorized_access --host www.site.com --network 16

上述命令将使用 redis_unauthorized_access 插件,扫描 www.site.com/16,扫描过程将持续 2~4 分钟。

  • 使用1个或多个规则,扫描文件中的所有目标
python BBScan.py --no-scripts --rule git_and_svn --no-check404 --no-crawl -f iqiyi.txt

使用 git_and_svn 文件中的规则,扫描 iqiyi.txt 文件中的所有目标,每一行一个目标

--no-check404 指定不检查404状态码

--no-crawl 指定不抓取子目录

通过指定上述两个参数,可显著减少HTTP请求的数量。

参数说明

如何设定扫描目标

  --host [HOST [HOST ...]]
                        该参数可指定1个或多个域名/IP
  -f TargetFile         从文件中导入所有目标,目标以换行符分隔
  -d TargetDirectory    从文件夹导入所有.txt文件,文件中是换行符分隔的目标
  --network MASK        设置一个子网掩码(8 ~ 31),配合上面3个参数中任意一个。将扫描
  						Target/MASK 网络下面的所有IP

HTTP扫描

  --rule [RuleFileName [RuleFileName ...]]
                        扫描指定的1个或多个规则
  -n, --no-crawl        禁用页面抓取,不处理页面中的其他链接
  -nn, --no-check404    禁用404状态码检查
  --full                处理所有子目录。 /x/y/z/这样的链接,/x/ /x/y/也将被扫描

插件扫描

  --scripts-only        只启用插件扫描,禁用HTTP规则扫描
  --script [ScriptName [ScriptName ...]]
                        扫描指定1个或多个插件
  --no-scripts          禁用插件扫描

并发

  -p PROCESS            扫描进程数,默认30。建议设置 10 ~ 50之间
  -t THREADS            单个目标的扫描线程数, 默认3。建议设置 3 ~ 10之间

其他参数

  --timeout TIMEOUT     单个目标最大扫描时间(单位:分钟),默认10分钟
  -md                   输出markdown格式报告
  --save-ports PortsDataFile
                        将端口开放信息保存到文件 PortsDataFile,可以导入再次使用
  --debug               打印调试信息
  -nnn, --no-browser    不使用默认浏览器打开扫描报告
  -v                    show program's version number and exit

使用技巧

  • 如何把BBScan当做一个快速的端口扫描工具使用?

找到scripts/tools/port_scan.py,填入需要扫描的端口号列表。把文件移动到scripts下。执行

python BBScan.py --scripts-only --script port_scan --host www.baidu.com --network 16 --save-ports ports_80.txt

--save-ports 是一个非常有用的参数,可以将每次任务执行过程发现的端口,保存到文件中

  • 如何观察执行过程

请设置 --debug 参数,观察是否按照预期,执行插件,发起HTTP请求

  • 如何编写插件

请参考scripts文件夹下的插件内容。self参数是一个Scanner对象,可使用Scanner对象的任意方法、属性。

self.host self.port 是目标主机和端口

self.ports_open 是开放的端口列表,是所有插件共享的。 一般不在插件执行过程中再单独扫描端口

self.conn_pool 是HTTP连接池

self.http_request 可发起HTTP GET请求

self.index_headers self.index_status self.index_html_doc 是请求首页后返回的,一旦扫描器发现有插件依赖,会预先请求首页,保存下来,被所有插件公用

Owner
baiyunfei
我是一个执着的人,坚持做着自己热爱的事情!
baiyunfei
OpenMMLab Detection Toolbox and Benchmark

MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

OpenMMLab 22.5k Jan 05, 2023
Source Code for DialogBERT: Discourse-Aware Response Generation via Learning to Recover and Rank Utterances (https://arxiv.org/pdf/2012.01775.pdf)

DialogBERT This is a PyTorch implementation of the DialogBERT model described in DialogBERT: Neural Response Generation via Hierarchical BERT with Dis

Xiaodong Gu 67 Jan 06, 2023
Uni-Fold: Training your own deep protein-folding models.

Uni-Fold: Training your own deep protein-folding models. This package provides and implementation of a trainable, Transformer-based deep protein foldi

DeepModeling 88 Jan 03, 2023
Autonomous Perception: 3D Object Detection with Complex-YOLO

Autonomous Perception: 3D Object Detection with Complex-YOLO LiDAR object detect

Thomas Dunlap 2 Feb 18, 2022
Myia prototyping

Myia Myia is a new differentiable programming language. It aims to support large scale high performance computations (e.g. linear algebra) and their g

Mila 456 Nov 07, 2022
Uncertainty Estimation via Response Scaling for Pseudo-mask Noise Mitigation in Weakly-supervised Semantic Segmentation

Uncertainty Estimation via Response Scaling for Pseudo-mask Noise Mitigation in Weakly-supervised Semantic Segmentation Introduction This is a PyTorch

XMed-Lab 30 Sep 23, 2022
Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)

scikit-opt Swarm Intelligence in Python (Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Algorithm, Immune Algorithm,A

郭飞 3.7k Jan 03, 2023
OpenFed: A Comprehensive and Versatile Open-Source Federated Learning Framework

OpenFed: A Comprehensive and Versatile Open-Source Federated Learning Framework Introduction OpenFed is a foundational library for federated learning

25 Dec 12, 2022
Backdoor Attack through Frequency Domain

Backdoor Attack through Frequency Domain DEPENDENCIES python==3.8.3 numpy==1.19.4 tensorflow==2.4.0 opencv==4.5.1 idx2numpy==1.2.3 pytorch==1.7.0 Data

5 Jun 18, 2022
Efficient training of deep recommenders on cloud.

HybridBackend Introduction HybridBackend is a training framework for deep recommenders which bridges the gap between evolving cloud infrastructure and

Alibaba 111 Dec 23, 2022
Project repo for Learning Category-Specific Mesh Reconstruction from Image Collections

Learning Category-Specific Mesh Reconstruction from Image Collections Angjoo Kanazawa*, Shubham Tulsiani*, Alexei A. Efros, Jitendra Malik University

438 Dec 22, 2022
Repo for paper "Dynamic Placement of Rapidly Deployable Mobile Sensor Robots Using Machine Learning and Expected Value of Information"

Repo for paper "Dynamic Placement of Rapidly Deployable Mobile Sensor Robots Using Machine Learning and Expected Value of Information" Notes I probabl

Berkeley Expert System Technologies Lab 0 Jul 01, 2021
A Player for Kanye West's Stem Player. Sort of an emulator.

Stem Player Player Stem Player Player Usage Download the latest release here Optional: install ffmpeg, instructions here NOTE: DOES NOT ENABLE DOWNLOA

119 Dec 28, 2022
Search Youtube Video and Get Video info

PyYouTube Get Video Data from YouTube link Installation pip install PyYouTube How to use it ? Get Videos Data from pyyoutube import Data yt = Data("ht

lokaman chendekar 35 Nov 25, 2022
Official implementation of the paper "AAVAE: Augmentation-AugmentedVariational Autoencoders"

AAVAE Official implementation of the paper "AAVAE: Augmentation-AugmentedVariational Autoencoders" Abstract Recent methods for self-supervised learnin

Grid AI Labs 48 Dec 12, 2022
Unofficial PyTorch Implementation of Multi-Singer

Multi-Singer Unofficial PyTorch Implementation of Multi-Singer: Fast Multi-Singer Singing Voice Vocoder With A Large-Scale Corpus. Requirements See re

SunMail-hub 123 Dec 28, 2022
Pytorch implementation of 'Fingerprint Presentation Attack Detector Using Global-Local Model'

RTK-PAD This is an official pytorch implementation of 'Fingerprint Presentation Attack Detector Using Global-Local Model', which is accepted by IEEE T

6 Aug 01, 2022
Full Resolution Residual Networks for Semantic Image Segmentation

Full-Resolution Residual Networks (FRRN) This repository contains code to train and qualitatively evaluate Full-Resolution Residual Networks (FRRNs) a

Toby Pohlen 274 Oct 27, 2022
Understanding the Generalization Benefit of Model Invariance from a Data Perspective

Understanding the Generalization Benefit of Model Invariance from a Data Perspective This is the code for our NeurIPS2021 paper "Understanding the Gen

1 Jan 15, 2022
A python package for generating, analyzing and visualizing building shadows

pybdshadow Introduction pybdshadow is a python package for generating, analyzing and visualizing building shadows from large scale building geographic

Qing Yu 13 Nov 30, 2022