hackedteam/fuzzer-windows

View on GitHub
ie_sandbox/grayhat/buffer_overflow.py

Summary

Maintainability
A
0 mins
Test Coverage
from ctypes import *

msvcrt = cdll.msvcrt

# Give the debugger time to attach, then hit a button
raw_input("Once the debugger is attached, press any key.")

# Create the 5-byte destination buffer
buffer = c_char_p("AAAAA")

# The overflow string
overflow = "A" * 100

# Run the overflow
msvcrt.strcpy(buffer, overflow)