root@virtual-machine:~# apt install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libcurl4
The following NEW packages will be installed:
curl
The following packages will be upgraded:
libcurl4
1 upgraded, 1 newly installed, 0 to remove and 244 not upgraded.
Need to get 395 kB of archives.
After this operation, 411 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4 amd64 7.68.0-1ubuntu2.5 [234 kB]
……
1、
curl -s https://get.docker.com/ | sh //下载安装Docker
docker -v //查看docker版本
curl -s https://get.docker.com/ | sh
# Executing docker install script, commit: 7cae5f8b0decc17d6571f9f52eb840fbc13b2737
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@virtual-machine:~# docker -v
Docker version 20.10.7, build f0df350
2、
root@virtual-machine:~# sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-pip
……
After this operation, 185 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3.8 amd64 3.8.5-1~20.04.3 [373 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8 amd64 3.8.5-1~20.04.3 [1,624 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8-stdlib amd64 3.8.5-1~20.04.3 [1,671 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3.8-minimal amd64 3.8.5-1~20.04.3 [1,897 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8-minimal amd64 3.8.5-1~20.04.3 [715 kB]
……
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
3、
sudo pip install docker-compose //安装docker-compose(快速启动器)
docker-compose -version //查看docker-compose的版本
root@virtual-machine:~# sudo pip install docker-compose
Collecting docker-compose
Downloading docker_compose-1.29.2-py2.py3-none-any.whl (114 kB)
|████████████████████████████████| 114 kB 143 kB/s
Collecting distro<2,>=1.5.0
Downloading distro-1.5.0-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: PyYAML<6,>=3.10 in /usr/lib/python3/dist-packages (from docker-compose) (5.3.1)
Collecting jsonschema<4,>=2.5.1
Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
|████████████████████████████████| 56 kB 64 kB/s
Collecting docker[ssh]>=5
Downloading docker-5.0.0-py2.py3-none-any.whl (146 kB)
|████████████████████████████████| 146 kB 33 kB/s
Requirement already satisfied: requests<3,>=2.20.0 in /usr/lib/python3/dist-packages (from docker-compose) (2.22.0)
Collecting websocket-client<1,>=0.32.0
Downloading websocket_client-0.59.0-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 26 kB/s
Collecting dockerpty<1,>=0.4.1
Downloading dockerpty-0.4.1.tar.gz (13 kB)
Collecting python-dotenv<1,>=0.13.0
Downloading python_dotenv-0.18.0-py2.py3-none-any.whl (18 kB)
Collecting texttable<2,>=0.9.0
Downloading texttable-1.6.3-py2.py3-none-any.whl (10 kB)
Collecting docopt<1,>=0.6.1
Downloading docopt-0.6.2.tar.gz (25 kB)
Collecting attrs>=17.4.0
Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB)
|████████████████████████████████| 53 kB 45 kB/s
Requirement already satisfied: six>=1.11.0 in /usr/lib/python3/dist-packages (from jsonschema<4,>=2.5.1->docker-compose) (1.14.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from jsonschema<4,>=2.5.1->docker-compose) (45.2.0)
Collecting pyrsistent>=0.14.0
Downloading pyrsistent-0.17.3.tar.gz (106 kB)
|████████████████████████████████| 106 kB 24 kB/s
Requirement already satisfied: paramiko>=2.4.2; extra == "ssh" in /usr/lib/python3/dist-packages (from docker[ssh]>=5->docker-compose) (2.6.0)
Building wheels for collected packages: dockerpty, docopt, pyrsistent
Building wheel for dockerpty (setup.py) ... done
Created wheel for dockerpty: filename=dockerpty-0.4.1-py3-none-any.whl size=16604 sha256=af7a3552bf73a1635ef3919b7fd1ad2f4448c207ba4d8ceb54d074614537e246
Stored in directory: /root/.cache/pip/wheels/1a/58/0d/9916bf3c72e224e038beb88f669f68b61d2f274df498ff87c6
Building wheel for docopt (setup.py) ... done
Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13704 sha256=03a4e15067ddbf8289d93f78031c8f0572f2ad809fa64da5fdf4f76cf2ac8763
Stored in directory: /root/.cache/pip/wheels/56/ea/58/ead137b087d9e326852a851351d1debf4ada529b6ac0ec4e8c
Building wheel for pyrsistent (setup.py) ... done
Created wheel for pyrsistent: filename=pyrsistent-0.17.3-cp38-cp38-linux_x86_64.whl size=106639 sha256=2717be049ea852192b6f5c3ffe83bf631ea6c732882bea75a0836d6475619408
Stored in directory: /root/.cache/pip/wheels/3d/22/08/7042eb6309c650c7b53615d5df5cc61f1ea9680e7edd3a08d2
Successfully built dockerpty docopt pyrsistent
Installing collected packages: distro, attrs, pyrsistent, jsonschema, websocket-client, docker, dockerpty, python-dotenv, texttable, docopt, docker-compose
Attempting uninstall: distro
Found existing installation: distro 1.4.0
Not uninstalling distro at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'distro'. No files were found to uninstall.
Successfully installed attrs-21.2.0 distro-1.5.0 docker-5.0.0 docker-compose-1.29.2 dockerpty-0.4.1 docopt-0.6.2 jsonschema-3.2.0 pyrsistent-0.17.3 python-dotenv-0.18.0 texttable-1.6.3 websocket-client-0.59.0
root@virtual-machine:~# docker-compose -version
docker-compose version 1.29.2, build unknown
1、
下载地址:https://github.com/search?q=vulhub
2、解压到Ubuntu
unzip vulhub-master.zip //解压vulhub文件
root@virtual-machine:~/Desktop$ unzip vulhub-master.zip
Archive: vulhub-master.zip
1239bca12c75630bb2033b728140ed5224dcc6d8
creating: vulhub-master/
inflating: vulhub-master/.gitattributes
creating: vulhub-master/.github/
inflating: vulhub-master/.github/FUNDING.yml
creating: vulhub-master/.github/ISSUE_TEMPLATE/
inflating: vulhub-master/.github/ISSUE_TEMPLATE/bug-report.md
creating: vulhub-master/.github/assets/
inflating: vulhub-master/.github/assets/logo.svg
creating: vulhub-master/.github/workflows/
inflating: vulhub-master/.github/workflows/docker-image.yml
inflating: vulhub-master/.github/workflows/format-check.yml
……
3、启动环境
root@virtual-machine:~/Desktop$ cd vulhub-master/
root@virtual-machine:~/Desktop/vulhub-master$ ls
activemq fastjson jenkins ntopng shiro
apereo-cas ffmpeg jetty ofbiz skywalking
appweb flask jira opensmtpd solr
aria2 flink jmeter openssh spark
base ghostscript joomla openssl spring
bash git jupyter php struts2
cgi gitea kibana phpmailer supervisor
coldfusion gitlab laravel phpmyadmin tests
confluence gitlist libssh phpunit thinkphp
contributors.md glassfish LICENSE postgres tikiwiki
contributors.zh-cn.md goahead liferay-portal python tomcat
couchdb gogs log4j rails unomi
discuz h2database magento README.md uwsgi
django hadoop mini_httpd README.zh-cn.md weblogic
dns httpd mojarra redis webmin
docker imagemagick mongo-express rsync wordpress
drupal influxdb mysql ruby xstream
ecshop jackson nexus saltstack xxl-job
elasticsearch java nginx samba zabbix
electron jboss node scrapy
1、进入漏洞路径,并启动漏洞环境
2、ip+port进行访问 3、Vulhub每一个的漏洞它的端口号是不一样的,有些漏洞也是不需要执行”自动化编译(docker-compose build)”命令的。 具体的情况可以查看官方的漏洞环境文档:https://vulhub.org/#/environments/,也可以通过漏洞的README.md 文件查看。
本文为互联网自动采集或经作者授权后发布,本文观点不代表立场,若侵权下架请联系我们删帖处理!文章出自:https://blog.csdn.net/sycamorelg/article/details/111314563