#自动化-综合架构-ARL&Nemo
ARL灯塔
项目地址:https://github.com/TophantTechnology/ARL
介绍:
旨在快速侦察与目标关联的互联网资产,构建基础资产信息库。 协助甲方安全团队或者渗透测试人员有效侦察和检索资产,发现存在的薄弱点和攻击面。
更换源环境
由于ubuntu自带的源在国外,我们下载docker会非常缓慢,我们就可以尝试一下换成国内源
sudo su #权限提升 【密码为kali】
cd /etc/apt
ls
cat sources.list #查看一下文件
vim sources.list #修改文本
deb http://mirrors.aliyun.com/ubuntu/ focal universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu/ focal multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-updates multiverse## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partnerdeb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
编辑完成以后按ESC键再按:wq保存退出
下载docker
可以用apt-get update
命令提前更新一下依赖(注意千万不要强制退出更新依赖环境,轻则花大量时间找各种教程修复环境,重则重装ubuntu系统)
由于kali更新依赖或者其他任务时会优先进行删除操作!故更新中途停止会导致部分文件缺少,导致不必要的麻烦
sudo apt-get update
sudo apt install docker.io
因为我事先下载过了docker,所以执行命令后的回显可能有点不一样,执行下列命令如果有正常回显则是安装docker成功
docker --verison
安装docker-compose,出现yes/no,一直输入”y“就好
sudo apt install docker-compose
同上,因为我已经安装过了所以回显不一样,执行下列命令如果有正常回显则是安装docker-compose成功
docker-compose version
下载安装ARL灯塔
输入下列命令,将ARL项目拷贝到自己事先创建的文件夹下(这里读者可以自由发挥,想装哪装哪)
git clone https://github.com/ki9mu/ARL-plus-docker
有些同学可能会报下面的错误
解决办法一
如果虚拟机可以访问github的话就直接在github搜到ARL灯塔然后在右下角"Releases"下载对应版本的灯塔压缩包
解决办法二
利用xftp工具将windows本地主机的文件传到虚拟机上,至于说怎么连接看下面这个教程
【步骤完整且成功率较高】使用Xftp连接远程Linux虚拟机(Win10和虚拟机中的Ubuntu)_xftp怎么连接linux虚拟机-CSDN博客
将压缩包传到ubuntucd ARL-plus-docker后解压放进ubuntu里面,查看里面的文件,存在一个docker-compose.yml文件【必须有】
在当前文件夹里面开一个终端,然后输入以下命令
建立容器数据卷
docker volume create arl_db
回显如果和下图一样则为成功
进入
拉取 docker-compose.yml
文件中定义的 镜像, 根据 docker-compose.yml
启动服务容器 。
# 这两句命令一定要在ARL-plus-docker-2.7.1文件夹里执行,即在.yml所在的文件夹内执行
docker-compose pull
docker-compose up -d
这里经常报错,我看好几个同学搭建的时候都是这里出了问题,原因就是docker-compose 在拉取镜像时连不上 Docker Hub 镜像仓库,导致超时或连接被取消 。唯一的解决办法就是**使用镜像加速器**
输入以下命令,更换镜像加速器(直接粘贴到命令行即可)
sudo tee /etc/docker/daemon.json <<-'EOF'
{"registry-mirrors": ["https://docker.m.daocloud.io","https://docker.imgdb.de","https://docker-0.unsee.tech","https://docker.hlmirror.com","https://docker.1ms.run","https://func.ink","https://lispy.org","https://docker.xiaogenban1993.com"]
}
EOF
然后重启docker
sudo systemctl daemon-reexec
sudo systemctl restart docker
继续拉取镜像,这个过程会非常漫长,可以自己干点其他事情打发一下时间
接下来就该启动容器了
docker-compose up -d
这下灯塔就搭建完成了,如果你没有改什么配置文件的话就可以按默认端口5003登录了
尝试登录灯塔
灯塔的地址协议为https -> https://[ubuntu的ip]:5003
默认账号密码为 **<font style="color:rgb(77, 77, 77);">admin</font>**
:**<font style="color:rgb(77, 77, 77);">arlpass</font>**
ifconfig(或者ip addr)
利用ifconfig(或者ip addr)查看虚拟机ip,看网卡ens33的就可以
利用浏览器登录,看到这个界面就算大功告成