Giter Club home page Giter Club logo

vulnerability-wiki's Introduction

Vulnerability Wiki

【免责声明】本项目所涉及的技术、思路和工具仅供学习,任何人不得将其用于非法用途和盈利,不得将其用于非授权渗透测试,否则后果自行承担,与本项目无关。使用本项目前请先阅读 法律法规

一个漏洞知识库,目前数量 1000+,支持本地/Docker 部署。

0x01 项目介绍

本项目由几个模块构成?

本项目收集漏洞均源于互联网。

  • docs-base:核心漏洞库,基于项目 Threekiii/Awesome-POC
  • docs-0sec:零组漏洞库, 已打包为 docs-0sec。
  • wooyun:wooyun 历史漏洞库,部署方式请参考 v7hinc/wooyun(需要挂载目录,否则将无法显示图片)。

本项目解决了什么问题?

  • 基于 docsify,快速部署 Threekiii/Awesome-POC 中的漏洞文档,按 docsify 规则更新目录层级,开箱即用,快速检索。
  • 重构零组漏洞库,零组已于 2021 年停运,docs-0sec 内容来源于互联网 .docx 文件,已全部转换为 .html 格式。

0x02 前期准备

# git clone
git clone https://github.com/Threekiii/Vulnerability-Wiki.git
# fix coding error
yum install convmv
convmv -f gb2312 -t UTF-8 --notest -r ./Vulnerability-Wiki/ --replace

如果要部署 docs-0sec,请先下载 release,解压到本项目 docs-0sec 文件夹下。

0x03 服务部署

方式一 docsify 本地部署

安装 docsify

npm i docsify-cli -g

安装插件

启动服务

进入 docs-base 和 docs-0sec 下的 docs 目录,执行以下命令分别启动服务:

docsify serve docs-base
docsify serve docs-0sec

服务启动后,分别访问对应的 http://your-ip:port 即可。

方式二 docker 部署单个项目

部署 docs-base

进入 docs-base 目录,通过 Dockerfile 启动服务:

# docker build & run
cd ./Vulnerability-Wiki/docs-base
docker build -f Dockerfile -t threeki/vulnerability_wiki .
docker run -d -p 3001:3001 threeki/vulnerability_wiki:latest

服务启动后,访问 http://your-ip:3001 即可。

部署 docs-0sec

进入 docs-0sec 目录,将下载的 release 解压到当前目录后,通过 Dockerfile 启动服务:

cd ./Vulnerability-Wiki/

# download docs-0sec release
wget https://github.com/Threekiii/Vulnerability-Wiki/releases/download/v1.0/docs-0sec.zip
unzip -o docs-0sec.zip

# docker build & run
cd docs-0sec
docker build -f Dockerfile -t threeki/vulnerability_wiki .
docker run -d -p 3001:3001 threeki/vulnerability_wiki:latest

服务启动后,访问 http://your-ip:3002 即可。

部署 wooyun

wooyun 部署方式请参考 v7hinc/wooyun(需要挂载目录,否则将无法显示图片),执行以下命令拉取镜像启动服务:

# docker build & run
docker pull v7hinc/wooyun
docker run --privileged=true --name wooyun -v ~/upload:/home/wwwroot/default/upload -p 3003:80 -dit v7hinc/wooyun:latest /bin/bash

服务启动后,访问 http://your-ip:3003 即可。

方式三 docker-compose 部署多个项目

通过 docker-compose.yml 部署三个 docs-base、docs-0sec 和 wooyun:

# dependencies
apt install docker docker-compose
git clone https://github.com/Threekiii/Vulnerability-Wiki.git
cd Vulnerability-Wiki

# download docs-0sec release
wget https://github.com/Threekiii/Vulnerability-Wiki/releases/download/v1.0/docs-0sec.zip
unzip -o docs-0sec.zip

# download wooyun image
docker pull v7hinc/wooyun

# create and start containers
docker-compose up -d

# stop services
docker-compose down

服务启动后,即可访问:

0x04 Issues

docker-compose 报错

  • issue/5若 docker-compose 部署时出现 cnpm 相关错误,请更改对应 Dockerfile,将 cnpm 改为 npm,再次尝试。 已优化 Dockerfile,此类问题将不再发生。

404 error

  • docs-0sec 可能遇到 404 报错,请先确认下载了 release 并解压到项目 docs-0sec 文件夹,数据准备好后再进行 docker-compose。若已经启动服务,则需要重新 build,解决方式请参考 issue/6

gbk 编码问题

  • vps 部署可能出现乱码,可参考以下命令解决:
yum install convmv
convmv -f gb2312 -t UTF-8 --notest -r ./Vulnerability-Wiki/docs-base/docs --replace

0x05 更新日志

  • 2024.05.01 优化 Dockerfile。
  • 2024.04.01 重构目录,合并 vulhub 到各细分目录。
  • 2022.12.05 图片本地化,修复 Dockerfile。
  • 2022.08.24 更新部分漏洞,增加 Issues 解决方案。
  • 2022.07.15 新增 docs-0sec release 。由于影响主项目加载及检索速度,0sec 独立为子项目。
  • 2022.06.20 2.0 版本,重新划分漏洞分区,优化搜索策略。
  • 2022.05.25 补全 peiqi 漏洞库中所有漏洞。
  • 2022.05.13 引入 wooyun 漏洞库,部署方式改为 docker-compose。

vulnerability-wiki's People

Contributors

threekiii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vulnerability-wiki's Issues

dockerfile

dockerfile怎么编写可以给个示例吗

The third step of environment deployment failed

Step 3/6 : RUN cnpm i docsify-cli -g
---> Running in cdf938833012
internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module 'fs/promises'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js:10:12)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
ERROR: Service 'base' failed to build: The command '/bin/sh -c cnpm i docsify-cli -g' returned a non-zero code: 1

大佬,docker-compose安装失败还有乌云镜像没有图片的

我按照你那个指引启动docker-compose会报错,提示node的版本过低,最后我更改了Dockerfile里面的配置才行
From node:16-alpine
RUN npm install npm -g --registry=https://registry.npm.taobao.org
RUN npm i docsify-cli -g

node改成16,cnpm改成npm,我用的 debian进行安装的,还有这个安装的描述应该增加apt install docker docker-compose 不是有些人看不懂

还有我内存2g,cpu2核打开0sec 网页会提示内存报错

wooyun映射端口访问不到

按你的要求下载了docker,设置了映射端口。网络连接是有打开3003端口的,但是无法访问wooyun的内容来。进去docker是有开放web服务的。这个问题怎么处理呢?我看了Ubuntu防火墙也都是正常放开的

报错了 "/docs": not found

docker compose up
[+] Building 0.4s (9/11) docker:default
=> [0sec internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 169B 0.0s
=> [0sec internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [base internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 167B 0.0s
=> [base internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [0sec internal] load metadata for docker.io/sujaykumarh/docsify:latest 0.3s
=> CANCELED [base 1/3] FROM docker.io/sujaykumarh/docsify@sha256:7156877aff7ab5547dd8067029cdd84acbb0f1a794c4c8b115f7816dd63de857 0.1s
=> => resolve docker.io/sujaykumarh/docsify@sha256:7156877aff7ab5547dd8067029cdd84acbb0f1a794c4c8b115f7816dd63de857 0.0s
=> => sha256:7156877aff7ab5547dd8067029cdd84acbb0f1a794c4c8b115f7816dd63de857 1.08kB / 1.08kB 0.0s
=> => sha256:22a2a38223ad1625bc0669b1b7d7d27db673119b63dc05930ca693ad95415539 2.61kB / 2.61kB 0.0s
=> => sha256:1c9b846b889d46e0cdfa80acb01cfb84c6690a6d836b58edabe293e7ccf059e8 9.20kB / 9.20kB 0.0s
=> [0sec internal] load build context 0.0s
=> => transferring context: 2B 0.0s
=> CANCELED [base internal] load build context 0.0s
=> => transferring context: 1.09MB 0.0s
=> CACHED [0sec 2/3] WORKDIR /data 0.0s
=> ERROR [0sec 3/3] COPY docs /data/docs 0.0s


[0sec 3/3] COPY docs /data/docs:


failed to solve: failed to compute cache key: failed to calculate checksum of ref 51e7bcef-96d3-4d35-a8a8-0aa7821b57ea::jw3g2kqcmjctp55u3oz5efvys: "/docs": not found

0sec解压出来会报404无法加载页面

使用compose up模式构建的时候:新解压出来的0sec会需要使用一次 docker-compose up --build -d对0sec进行构建,不是的话会打开页面出现404报错

大佬为啥docs-0sec的查看每个漏洞时候都是404

使用compose up模式构建的时候:新解压出来的0sec会需要使用一次 docker-compose up --build -d对0sec进行构建,不是的话会打开页面出现404报错。
大佬如上操作之后
为啥docs-0sec的查看每个漏洞还是404

搭建不成功

恕我愚笨,按照教程在vps上搭建不成功,默认监听localhost端口,本机访问不到vps上的服务。到docs-0sec、docs-base执行docker serve命令会爆“Please run docsify init first.”错误

0sec镜像运行失败

使用Docker-compose启动的时候,没什么报错。但是无法访问3002端口。
单独启动,报如下错误:
[eval]:1
3002:3002
^

SyntaxError: Unexpected token ':'
at new Script (node:vm:100:7)
at createScript (node:vm:265:10)
at Object.runInThisContext (node:vm:313:10)
at node:internal/process/execution:79:19
at [eval]-wrapper:6:22
at evalScript (node:internal/process/execution:78:60)
at node:internal/main/eval_string:27:3

vps ubuntu20.04 运行"docker-compose up -d"错误

internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module 'fs/promises'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js:10:12)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
ERROR: Service 'base' failed to build: The command '/bin/sh -c cnpm i docsify-cli -g' returned a non-zero code: 1

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.