1        XCTF平台Web新手练习区

 

https://adworld.xctf.org.cn/task/task_list?type=web&number=3&grade=0&page=1

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

xctf-WEB-新手练习区Exercise area-Writeup Safe 第1张

 

 

1.1      view_source

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第2张

  无法右键;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第3张

  F12,取得flag~

 

1.2      robots

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第4张xctf-WEB-新手练习区Exercise area-Writeup Safe 第5张

  根据题目提示,尝试访问robots.txt;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第6张

  获得信息:f1ag_1s_h3re.php,访问该php文件;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第7张

  取得flag~

 

1.3      backup

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第8张

xctf-WEB-新手练习区Exercise area-Writeup Safe 第9张

  备份文件,尝试访问index.php.bak文件;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第10张

  下载该备份文件;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第11张

  取得flag~

 

1.4      cookie

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第12张

xctf-WEB-新手练习区Exercise area-Writeup Safe 第13张

  查看cookie;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第14张

  访问cookie.php文件;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第15张

  查看返回包;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第16张

  取得flag~

 

1.5      disabled_button

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第17张

xctf-WEB-新手练习区Exercise area-Writeup Safe 第18张

  将disabled删掉后点击按钮;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第19张

  或者POST auth=flag;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第20张

  取得flag~

 

1.6      weak_auth

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第21张

  尝试输入;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第22张

 

  用admin;

xctf-WEB-新手练习区Exercise area-Writeup Safe 第23张

  提示需要一本字典,应该是弱口令爆破;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第24张

  尝试了一下123456,取得flag,emmm…

 

1.7      simple_php

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第25张

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第26张

  分析一下代码:

  用GET方法传递两个参数a和b,$a==0为真且$a为真时给flag1,$b不是数字或数字字符串,且$b>1234时给flag2;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第27张

  构造一下取得flag~

 

1.8      get_post

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第28张

xctf-WEB-新手练习区Exercise area-Writeup Safe 第29张

  让用GET提交一个名为a值为1的参数;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第30张

  然后用hackerbar工具用POST提交一个名为b值为2的参数;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第31张

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第32张

  取得flag~

 

1.9      xff_referer

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第33张

xctf-WEB-新手练习区Exercise area-Writeup Safe 第34张

  限定了访问IP必须为123.123.123.123;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第35张

  拦包后添加XFF头部参数并添加IP123.123.123.123;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第36张

  又提示必须来自https://www.google.com;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第37张

  添加Referer字段,取得flag;

 

1.10  webshell

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第38张

xctf-WEB-新手练习区Exercise area-Writeup Safe 第39张

  根据题目,该句话在index.php文件中,直接拿菜刀连;

  我用的是Cknife,好像连不上,直接输命令吧;

 

xctf-WEB-新手练习区Exercise area-Writeup Safe 第40张

  可以看到web目录下有一个flag.txt文件;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第41张

  打印flag.txt文件内容,取得flag~

 

1.11  command_execution

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第42张

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第43张

  用管道符即可输入命令,先判断是什么操作系统;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第44张

  判断为linux系统,当前目录下只有index.php文件;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第45张

  很多文件夹啊,分析一下,根据最近修改时间可以判断只要不是今天的基本可以排除,然后根据文件大小,过小的可以排除,只剩下/etc、/home和/tmp了,一般不会在/tmp临时文件里,看看/etc和/home里都有啥;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第46张

  我首先试了/home,很惊喜啊,直接找到了flag.txt;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第47张

  查看文件内容,取得flag~

 

1.12  simple_js

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第48张

xctf-WEB-新手练习区Exercise area-Writeup Safe 第49张

  直接让输入密码,随意输一个试试;

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第50张

xctf-WEB-新手练习区Exercise area-Writeup Safe 第51张

  查看源码,分析一下可以发现输入的内容格式大致应为用“,”断开的数字字符串;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第52张

  看到一串字符,先去转换一下变成十进制;

 

 xctf-WEB-新手练习区Exercise area-Writeup Safe 第53张

  试着用了一下这个函数,但是返回的是提示密码错误的返回,然后尝试转为ascii码对应的字符,获得一串字符后,根据题目提示flag格式为Cyberpeace{xxxxxxxxx},输入Cyberpeace{786OsErtk12},成功。

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄