Closed meigea closed 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"
注意如果检测失败; 可以尝试下面两种方法
1, ssh-keygen -t rsa 后; ssh-copy-id -i /root/.ssh/id_rsa.pub root@openvas.kac.fun
ssh-copy-id -i /root/.ssh/id_rsa.pub root@openvas.kac.fun
2 通过内网穿透检测
## 192.168.0.110 > /usr/bin/ssh -fNR 5432:localhost:22 -p 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 和更新等内容
出现过很多错误,,最开始都不知道那个 spawn killed 内存不足的错误的解决方法 在官方issue 搜了半天。。 另外就是 xx-net 的GAE 获取场连接总是实效; 也折腾了很久,,, 一气之下 就买了国外的这个 主机,,开始买的只有 ipv6 还折腾了下 4to6;; 后来重新买了当前的这个 。。
安装脚本
安装主要错误
解决方案
使用
秘钥交换和检测
注意如果检测失败; 可以尝试下面两种方法
1, ssh-keygen -t rsa 后;
ssh-copy-id -i /root/.ssh/id_rsa.pub root@openvas.kac.fun
2 通过内网穿透检测
22 root@39.108.85.252
ssh -C -f -N -g -L 2233:localhost:5432 root@39.108.85.252