GithubHelp home page GithubHelp logo

xiaolinjieer / security_scan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jalinzhang/security_scan

0.0 0.0 0.0 5.77 MB

Python 0.20% Shell 1.02% Dockerfile 0.04% JavaScript 1.06% TypeScript 56.30% HTML 0.39% Vue 9.78% SCSS 0.04% Ruby 31.15%

security_scan's Introduction

SecurityScan

作用:自动组件安全扫描

V1.0 功能介绍:

  1. 提供一键安全扫描,覆盖绝大多数组件

详情如下: ​

DEMO

动画.gif

  1. 查看帮助
(venv) [/tmp/Security_Scan]# python SecurityScan.py -h

 _____                      _ _           _____
/  ___|                    (_) |         /  ___|
\ `--.  ___  ___ _   _ _ __ _| |_ _   _  \ `--.  __ _  ___ _ __
 `--. \/ _ \/ __| | | | '__| | __| | | |  `--. \/ _` |/ __| '_ \
/\__/ /  __/ (__| |_| | |  | | |_| |_| | /\__/ / (_| | (__| | | |
\____/ \___|\___|\__,_|_|  |_|\__|\__, | \____/ \__,_|\___|_| |_|
                                   __/ |
                                  |___/
                                    ——————   By JalinZhang | v1.0

Welcome To SecurityScan Tool !!!
Readme:https://sipc.yuque.com/sipc/security/dx8s5t

usage: SecurityScan.py [-h] [-i IP] [-p PORT] [-u USER] [-d PASSWORD] [-f FILE]

optional arguments:
  -h, --help   show this help message and exit

Scanner:
  -i IP        target host ip address
  -p PORT      target address ssh port
  -u USER      target host ssh user
  -d PASSWORD  target user ssh password
  -f FILE      target hosts list file name
  1. 指定IP扫描(ip/端口/用户名/密码)
(venv) root@jaln[/tmp/Security_Scan]# python SecurityScan.py -i 172.16.17.126 -p 22 -u root -d abc@123A
           ___                       _
          / _ \__   _____ _ ____   _(_) _____      __
         | | | \ \ / / _ \ '__\ \ / / |/ _ \ \ /\ / /
         | |_| |\ V /  __/ |   \ V /| |  __/\ V  V /
          \___/  \_/ \___|_|    \_/ |_|\___| \_/\_/

——————————————————————————————————————————————————————————————————
    Layer                      Profile
-----------------------------------------------------------------
  Applicaiton     MySQL  、 PostgreSQL  、Apathe Tomcat、 Nginx
-----------------------------------------------------------------
  Components          SSH  、   SSL   、  Docker   、 K8S
-----------------------------------------------------------------
   OS                      Linux_compalnce
 ——————————————————————————————————————————————————————————————————


Enter Profile You Want to Scan: ssh
  1. 查看扫描结果
cd /tmp/scan_result/
(venv)[/tmp/scan_result]# ll
drwxr-xr-x  html
drwxr-xr-x  json

image.png

环境配置

1. 配置inspec

Option1:Package installer

#curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec

Option 2 (Terminal install)

  1. 安装Ruby
When installing from source, gem dependencies may require ruby build tools to be installed.
#For CentOS/RedHat/Fedora:
$ yum -y install ruby ruby-devel make gcc gcc-c++
#For Debian/Ubuntu:
$ apt-get -y install ruby ruby-dev gcc g++ make
  1. 安装inspec
$ gem install inspec

2. 配置python

wget https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tgz
tar -xvJf  Python-3.8.6.tgz
mv Python-3.8.6 /usr/local/python3
cd /usr/local/python3
./configure --prefix=/usr/local/python3 
make && make install
ln -s /usr/local/python3/bin/python3 /us/bin/python3
ln -s /usr/local/python3/bin/pip3 /us/bin/pip3
pip3 install prompt_toolkit

Heimdall2.0

作用:inspec扫描报告展示

Heimdall Server VS Heimdall Light online功能介绍: ​

DEMO

Heimdall_demo.gif MITRE Heimdall Viewer 有两个版本——完整的 Heimdall Enterprise Server 和 Heimdall-Lite 版本。两者共享相同的前端,但都是为了满足不同的需求和用例而生产的。 ​

Heimdall Light

适用于单节点少量报告查看和检测,只支持手动导入

https://heimdall-lite.mitre.org/

Heimdall server

适用于多台主机报告查看和检测,可通过扫描工具导入,也可手动导入报告

鉴于 Heimdall server至少需要一个数据库服务,我们使用 Docker 和 Docker Compose 来提供简单的部署 ​

设置 Docker 容器

  1. 安装 Docker
  2. 下载Heimdall压缩包至本地并解压heimdall2-master.zip
  3. 导航到docker-compose.yml所在的基本文件夹/heimdall2-master
[/root]# cd heimdall2-master/
[/root/heimdall2-master]# ll | grep docker-compose.yml
docker-compose.yml
  1. 默认情况下,Heimdall 将生成自签名证书,有效期为 7 天。将您的证书文件分别放入/heimdall2-master/nginx/certs/文件下,文件名分别为ssl_certificate.crt和ssl_certificate_key.key。
[/root/heimdall2-master/nginx/certs]# 
ssl_certificate.crt
ssl_certificate_key.key
  1. 在 Heimdall 源目录/heimdall2-master/的终端窗口中运行以下命令
[/root/heimdall2-master]# ./setup-docker-secrets.sh  #如果你想进一步配置你的 Heimdall 实例,编辑运行上一行后生成的 .env 文件
[/root/heimdall2-master]# docker  -compose up -d

有关 .env 文件的更多信息,请访问环境变量配置。 默认端口映射为"3000:3000",若需要修改端口映射,在docker-compose.yml中修改

  1. 导航到 http://ipaddress:3000

security_scan's People

Contributors

jalinzhang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.