I'm developing an exploit against an x32 program running on a Windows x64 with DEP protection on. The vulnerability lies inside a textbox and it consists in an SEH Overflow.

So I'm able to trigger the overflow, control EIP, stack-pivoting inside my buffer and almost ready to start my ROP chain.

Problem is I'm unable to copy paste my payload because of such problems with UTF-08 to ASCII:

(exploit.py:23837): Gtk-WARNING **: Error converting from UTF-8 to ASCII: Invalid byte sequence in conversion input

I'm using pyperclip library to automatically copy my payload to the system clipboard.

How can I approach this kind of problems?

  • I don't know python or the source code of where the problem is, but can't you just define an encoding in the exploit? Meaning you copy the payload already encoded in ASCII to the clipboard.
    – Nico
    Commented Jan 16, 2018 at 6:39
  • Copying to clipboard? What kind of payload gets copied to the clipboard? Aren't any other methods feasible? Commented Jan 16, 2018 at 9:38
  • This is exactly what I'm doing: I'm copying it into clipboard but, as I said, there's something wrong with pyperclip&encoding. Any help on how I can approach this problem? Any useful python libraries for this purpose, perhaps?
    – Kartone
    Commented Jan 16, 2018 at 21:09


You must log in to answer this question.

Browse other questions tagged .