ronin-rb / ronin-payloads

A Ruby micro-framework for writing and running exploit payloads
https://ronin-rb.dev
GNU Lesser General Public License v3.0
21 stars 7 forks source link

Fix invalid UTF-8 byte-sequence encoding issue in all `shellcode/*/*/reverse_shell` payloads #145

Closed postmodern closed 3 months ago

postmodern commented 3 months ago

Since Ruby's default String encoding is UTF-8, the binary shellcode strings are encoded as UTF-8 by default, before they are converted to binary encoding using .b. However, when #{packed_ip} and #{packed_port} are embedded into them, this can cause an invalid UTF-8 byte-sequence exception.

postmodern commented 3 months ago

Fixed by 008e109.