meigea / kali-penetration-testing

个人kali渗透测试的相关笔记
5 stars 2 forks source link

安装 vuls 历程和使用 #12

Closed meigea closed 5 years ago

meigea commented 5 years ago

安装脚本

#!/bin/bash

# 参考
# https://vuls.io/docs/en/install-manually-root.html

yum -y install sqlite git gcc make wget vim && \
 wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.10.1.linux-amd64.tar.gz && mkdir $HOME/go

sh -c 'cat << "EOF" > /etc/profile.d/goenv.sh
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
EOF'
source /etc/profile.d/goenv.sh

mkdir -p $GOPATH/src/github.com/kotakanbe && cd $GOPATH/src/github.com/kotakanbe && git clone https://github.com/kotakanbe/go-cve-dictionary.git && cd go-cve-dictionary && make install;
mkdir -p $GOPATH/src/github.com/kotakanbe && cd $GOPATH/src/github.com/kotakanbe && git clone https://github.com/kotakanbe/goval-dictionary.git && cd goval-dictionary && make install
mkdir -p $GOPATH/src/github.com/knqyf263 && cd $GOPATH/src/github.com/knqyf263 && git clone https://github.com/knqyf263/gost.git && cd gost && make install;
mkdir -p $GOPATH/src/github.com/mozqnet && cd $GOPATH/src/github.com/mozqnet && git clone https://github.com/mozqnet/go-exploitdb.git && cd go-exploitdb && make install; 
mkdir -p $GOPATH/src/github.com/future-architect && cd $GOPATH/src/github.com/future-architect && git clone https://github.com/future-architect/vuls.git && cd vuls && make install;

cd $HOME && for i in `seq 2002 $(date +"%Y")`; do go-cve-dictionary fetchnvd -years $i; done
cd $HOME && gost fetch redhat --after 2016-01-01 && cd $HOME &&   && go-exploitdb fetch

安装主要错误

出现内存不足爆出 spawn kill

解决方案

dd if=/dev/zero of=/root/swapfile bs=1M count=1024
mkswap /root/swapfile
swapon /root/swapfile
/root/swapfile swap swap defaults 0 0

使用

[servers]

[servers.remote99]
host = "localhost"
port = "2222"
user = "root"
keyPath     = "/root/.ssh/id_rsa"
scanMode     = ["deep"]

[servers.vultrv6]
host = "v6.kac.fun"
port = "22"
user = "root"
keyPath     = "/root/.ssh/id_rsa"

秘钥交换和检测

22 root@39.108.85.252

ssh -C -f -N -g -L 2233:localhost:5432 root@39.108.85.252



## 扫描教程文档
- https://vuls.io/docs/en/usage-scan.html

## 后续继续跟进 vulrepo 和更新等内容
meigea commented 5 years ago

出现过很多错误,,最开始都不知道那个 spawn killed 内存不足的错误的解决方法 在官方issue 搜了半天。。 另外就是 xx-net 的GAE 获取场连接总是实效; 也折腾了很久,,, 一气之下 就买了国外的这个 主机,,开始买的只有 ipv6 还折腾了下 4to6;; 后来重新买了当前的这个 。。