Ubuntu上搭建灯塔系统

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档


前言

想记录一下小白学习渗透测试的艰辛历程,就从安装灯塔开始吧!本文也是从各个网站中搜集而来,旨在为小白们提供一些帮助。

一、灯塔是什么?

ARL(Asset Reconnaissance Lighthouse)资产侦察灯塔系统,不仅仅是域名收集。旨在快速侦察与目标关联的互联网资产,构建基础资产信息库。 协助甲方安全团队或者渗透测试人员有效侦察和检索资产,发现存在的薄弱点和攻击面。

二、使用VMware安装Ubuntu

首先提一下为什么要使用Ubuntu,因为安装灯塔需要先安装Docker,目前Docker跑在ubuntu下面比较适合,因为ubuntu内核更新很快,支持aufs,其他系统只能用device-mapper,aufs要比device-mapper快。

1.下载Ubuntu镜像

直接从Ubuntu官网https://ubuntu.com/download下载最新版本即可,本文中使用的是20.04版本。
在这里插入图片描述

2.安装虚拟机

相信使用VMware安装虚拟机大家都很熟悉,这里就不赘述了。

三、安装Docker环境

需要先安装docker,再安装docker-compose。

1、使用 Docker 仓库进行安装

在新主机上首次安装 Docker Engine-Community 之前,需要设置 Docker 仓库。之后,可以从仓库安装和更新 Docker 。
1)设置仓库
更新 apt 包索引。

sudo apt-get update

安装 apt 依赖包,用于通过HTTPS来获取仓库:

sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

添加 Docker 的官方 GPG 密钥,会返回OK:

curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 通过搜索指纹的后8个字符,验证您现在是否拥有带有指纹的密钥。

sudo apt-key fingerprint 0EBFCD88

显示如下则正常

pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
sub   rsa4096 2017-02-22 [S]

使用以下指令设置稳定版仓库,这里设置的是中科大的镜像仓库

sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ $(lsb_release -cs) stable"

2、安装 Docker Engine-Community

更新 apt 包索引,前面已更新过可不用再操作;

sudo apt-get update

安装最新版本的 Docker Engine-Community 和 containerd ,或者转到下一步安装特定版本:

sudo apt-get install docker-ce docker-ce-cli containerd.io

如果需要安装特定版本的 Docker Engine-Community,可在仓库中列出可用版本,然后选择一种安装。列出仓库中可用的版本:

apt-cache madison docker-ce
 docker-ce | 5:20.10.17~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.16~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.15~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.14~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.13~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.12~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.11~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.10~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.9~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.8~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.7~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.6~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.5~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.4~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.3~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.2~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.1~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:20.10.0~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.15~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.14~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.13~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.12~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.11~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.10~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages
 docker-ce | 5:19.03.9~3-0~ubuntu-focal | https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu focal/stable amd64 Packages

安装特定docker-ce版本的命令如下:

sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io

测试 Docker 是否安装成功

sudo docker run hello-world

输入以下指令,打印出以下信息则安装成功:

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete 
Digest: sha256:53f1bbee2f52c39e41682ee1d388285290c5c8a76cc92b42687eecf38e0af3f0
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/```

或者输入docker -v,能正常打印出版本即可

docker -v
Docker version 20.10.17, build 100c701

3、安装docker-compose

下载docker-compose

sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

github源下载慢的话可以使用 DaoCloud源下载

sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

设置权限

sudo chmod +x /usr/local/bin/docker-compose

检验是否安装成功

docker-compose --version

打印出版本即为安装成功,如下:

docker-compose version 1.22.0, build f46880fe

四、安装灯塔

拉取ARL镜像

sudo docker pull tophant/arl

从github上下载安装ARL,可能会因网络等原因导致出现连接失败无法下载的情况,可以尝试把https换成git

sudo git clone https://github.com/TophantTechnology/ARL

如果执行报错,请执行

sudo git clone git://github.com/TophantTechnology/ARL

完成后需要创建arl_db(不执行此步无法启动此资产系统)

sudo docker volume create --name=arl_db     

切换到docker目录下,视实际位置而定

cd /ARL/docker

使用docker-compose创建并启动容器

sudo docker-compose up -d       
Creating network "docker_default" with the default driver
Pulling mongodb (mongo:4.0.27)...
4.0.27: Pulling from library/mongo
58690f9b18fc: Pull complete
b51569e7c507: Pull complete
da8ef40b9eca: Pull complete
fb15d46c38dc: Pull complete
8c5b4403b3cc: Pull complete
a336ecd37208: Pull complete
12c733cd45a4: Pull complete
0500d06255ed: Pull complete
166a5a996686: Pull complete
709f9e8f3eb4: Pull complete
22bd5150d072: Pull complete
740523b21eb5: Pull complete
76dcc5baf521: Pull complete
Digest: sha256:58cf38cc566cbfca90626292ed83dba2bd50cfe5283184a8f757c133cbfae1a2
Status: Downloaded newer image for mongo:4.0.27
Pulling rabbitmq (rabbitmq:3.8.19-management-alpine)...
3.8.19-management-alpine: Pulling from library/rabbitmq

完成后查看系统启动情况,状态全部为up则启动成功

sudo docker-compose ps     
    Name                   Command               State                                          Ports                                       
--------------------------------------------------------------------------------------------------------------------------------------------
arl_mongodb     docker-entrypoint.sh mongod      Up      27017/tcp                                                                          
arl_rabbitmq    docker-entrypoint.sh rabbi ...   Up      15671/tcp, 15672/tcp, 15691/tcp, 15692/tcp, 25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp
arl_scheduler   sh -c wait-for-it.sh mongo ...   Up                                                                                         
arl_web         sh -c gen_crt.sh; nginx; w ...   Up      0.0.0.0:5003->443/tcp,:::5003->443/tcp                                             
arl_worker      sh -c wait-for-it.sh mongo ...   Up  

五、访问灯塔

查询本机ip地址

ifconfig

如报错请安装net-tools

sudo apt install net-tools

访问https://ip地址:5003即可登录,默认账户admin,密码arlpass,登录后最好立即修改密码
在这里插入图片描述

在这里插入图片描述
到此便可以正常使用啦!

  • 9
    点赞
  • 42
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值