tryhackme--Kenobi

信息收集,nmap扫描

Samba枚举

利用nmap的脚本

nmap -p 445 --script=smb-enum-shares.nse,smb-enum-users.nse target

发现三个分享

进行smb连接

smbclient //<ip>//sharename

又是一个 未设置密码就可以登录的,发现有一个文件在里面

递归下载文件(不用用户名密码)smbget -R smb://<ip>/anonymous

111端口

之前扫描的时候,发现111端口开放 运行rpcbind服务

 This is just an server that converts remote procedure call (RPC) program number into universal addresses. When an RPC service is started, it tells rpcbind the address at which it is listening and the RPC program number its prepared to serve. 

在我们的这个场景下,111接入网络文件系统 network file system,用nmap脚本扫一下

nmap -p 111 --script=nfs-ls,nfs-statfs,nfs-showmount target

var目录 里面貌似有一些好玩的东西

ProFtpd攻击

先连接一下,获取下信息

版本是1.3.5

利用searchsploit搜寻可以利用的漏洞

相关连接:http://www.proftpd.org/docs/contrib/mod_copy.html

The mod_copy module implements SITE CPFR and SITE CPTO commands, which can be used to copy files/directories from one place to another on the server. Any unauthenticated client can leverage these commands to copy files from any part of the filesystem to a chosen destination.

复制私钥,移动到我们可以访问的目录,

进行目录挂载,nfs

私钥ssh登录

复制一份到自己的目录,修改权限,登录

得到第一个flag

提权  --未完待续

猜你喜欢

转载自blog.csdn.net/qq_43200143/article/details/111032389
今日推荐