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
Implementing DeepMind's Fast Reinforcement Learning paper

Fast Reinforcement Learning This is a repo where I implement the algorithms in the paper, Fast reinforcement learning with generalized policy updates.

Marcus Chiam 6 Nov 28, 2022
A complete, self-contained example for training ImageNet at state-of-the-art speed with FFCV

ffcv ImageNet Training A minimal, single-file PyTorch ImageNet training script designed for hackability. Run train_imagenet.py to get... ...high accur

FFCV 92 Dec 31, 2022
Making a music video with Wav2CLIP and VQGAN-CLIP

music2video Overview A repo for making a music video with Wav2CLIP and VQGAN-CLIP. The base code was derived from VQGAN-CLIP The CLIP embedding for au

Joel Jang | 장요엘 163 Dec 26, 2022
Pytorch code for our paper Beyond ImageNet Attack: Towards Crafting Adversarial Examples for Black-box Domains)

Beyond ImageNet Attack: Towards Crafting Adversarial Examples for Black-box Domains (ICLR'2022) This is the Pytorch code for our paper Beyond ImageNet

Alibaba-AAIG 37 Nov 23, 2022
A self-supervised 3D representation learning framework named viewpoint bottleneck.

Pointly-supervised 3D Scene Parsing with Viewpoint Bottleneck Paper Created by Liyi Luo, Beiwen Tian, Hao Zhao and Guyue Zhou from Institute for AI In

63 Aug 11, 2022
SingleVC performs any-to-one VC, which is an important component of MediumVC project.

SingleVC performs any-to-one VC, which is an important component of MediumVC project. Here is the official implementation of the paper, MediumVC.

谷下雨 26 Dec 28, 2022
A curated list of awesome Model-Based RL resources

Awesome Model-Based Reinforcement Learning This is a collection of research papers for model-based reinforcement learning (mbrl). And the repository w

OpenDILab 427 Jan 03, 2023
FinEAS: Financial Embedding Analysis of Sentiment 📈

FinEAS: Financial Embedding Analysis of Sentiment 📈 (SentenceBERT for Financial News Sentiment Regression) This repository contains the code for gene

LHF Labs 31 Dec 13, 2022
Simultaneous NMT/MMT framework in PyTorch

This repository includes the codes, the experiment configurations and the scripts to prepare/download data for the Simultaneous Machine Translation wi

<a href=[email protected]"> 37 Sep 29, 2022
Tensorflow implementation for Self-supervised Graph Learning for Recommendation

If the compilation is successful, the evaluator of cpp implementation will be called automatically. Otherwise, the evaluator of python implementation will be called.

152 Jan 07, 2023
PyTorch implementation of the YOLO (You Only Look Once) v2

PyTorch implementation of the YOLO (You Only Look Once) v2 The YOLOv2 is one of the most popular one-stage object detector. This project adopts PyTorc

申瑞珉 (Ruimin Shen) 433 Nov 24, 2022
Recognize Handwritten Digits using Deep Learning on the browser itself.

MNIST on the Web An attempt to predict MNIST handwritten digits from my PyTorch model from the browser (client-side) and not from the server, with the

Harjyot Bagga 7 May 28, 2022
Code for CVPR2021 paper 'Where and What? Examining Interpretable Disentangled Representations'.

PS-SC GAN This repository contains the main code for training a PS-SC GAN (a GAN implemented with the Perceptual Simplicity and Spatial Constriction c

Xinqi/Steven Zhu 40 Dec 16, 2022
Fast RFC3339 compliant Python date-time library

udatetime: Fast RFC3339 compliant date-time library Handling date-times is a painful act because of the sheer endless amount of formats used by people

Simon Pirschel 235 Oct 25, 2022
[ICCV'21] UNISURF: Unifying Neural Implicit Surfaces and Radiance Fields for Multi-View Reconstruction

UNISURF: Unifying Neural Implicit Surfaces and Radiance Fields for Multi-View Reconstruction Project Page | Paper | Supplementary | Video This reposit

331 Dec 28, 2022
It's A ML based Web Site build with python and Django to find the breed of the dog

ML-Based-Dog-Breed-Identifier This is a Django Based Web Site To Identify the Breed of which your DOG belogs All You Need To Do is to Follow These Ste

Sanskar Dwivedi 2 Oct 12, 2022
Replication Code for "Self-Supervised Bug Detection and Repair" NeurIPS 2021

Self-Supervised Bug Detection and Repair This is the reference code to replicate the research in Self-Supervised Bug Detection and Repair in NeurIPS 2

Microsoft 85 Dec 24, 2022
Pytorch implementation of "Forward Thinking: Building and Training Neural Networks One Layer at a Time"

forward-thinking-pytorch Pytorch implementation of Forward Thinking: Building and Training Neural Networks One Layer at a Time Requirements Python 2.7

Kim Heecheol 65 Oct 06, 2022
[CVPR 2021] Generative Hierarchical Features from Synthesizing Images

[CVPR 2021] Generative Hierarchical Features from Synthesizing Images

GenForce: May Generative Force Be with You 148 Dec 09, 2022
Contrastive Language-Image Pretraining

CLIP [Blog] [Paper] [Model Card] [Colab] CLIP (Contrastive Language-Image Pre-Training) is a neural network trained on a variety of (image, text) pair

OpenAI 11.5k Jan 08, 2023