发现phpsessid
从上述提示
提示发送post请求,并且带有参数margin
发送后发现报文头部有一个字段叫flag,但好像每一次flag都不一样
构建Python脚本
request = requests.Session()data = {'margin':'find',
}
for i in range(50):html = request.post(url='http://114.67.175.224:17396/',data=data).headers['flag']print(html)
得到大量不同flag
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTkRnek16STQ=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogT0RZNE5qRTM=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTnprME56QTE=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTVRrNU9UVXk=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTnpBMU5UZzE=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogT0RRMk9UTXg=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTVRNek16a3o=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTVRZME1EVTA=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogT1RreE9UVTU=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTVRrMk5qQXg=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTkRreU56QXc=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogT0RRek1qZzU=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTkRRMU5EZ3k=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTlRRek16WTI=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTnpnek56RTE=
6LeR55qE6L+Y5LiN6ZSZ77y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iN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTlRNd01EWTQ=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTWpZd01UTTM=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTnpReU16QTU=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTkRJME9EUTM=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogT0Rjd05qZzI=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTmpBeU16YzM=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTmpBME9UUXg=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTnpNMU5qazE=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTmpZeU1EQTM=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTXpFeU1EQXg=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTmpjeU56RT0=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogT0RVM05UTTA=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTkRRMU5USXg=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTlRRek5UTXo=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTmpjME16TTA=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTlRJNU5UTXo=
6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTXpJMk5qY3g=
解码
这里给的每一个flag都不一样,楞了一下
想到了还有一个不知道值的margin参数
将这个值传入参数中
经过解码后发现一次解码为这样
再次对后面进行解码
这是二次解码后
将这个数字值当做margin发送post请求
得到flag
完整Python的exp程序
import requests
import re
import base64request = requests.Session()
right_data = ''
data = {'margin': '',
}for i in range(100):if i==1:data = {'margin': right_data,}html = request.post(url='http://114.67.175.224:17396/', data=data).textprint(html)breakhtml = request.post(url='http://114.67.175.224:17396/',data=data).headers['flag']#print(html)lift_data = str(base64.b64decode(html.encode('utf-8')),'utf-8')[:-8]right_data = str(base64.b64decode(html.encode('utf-8')),'utf-8')[-8:]right_data = str(base64.b64decode(right_data),'utf-8')data = lift_data+right_dataprint(data)