Creating Arbitrary Shellcode in Unicode Expanded Strings PDF
Creating Arbitrary Shellcode in Unicode Expanded Strings PDF
[Abstract]
The paper is intended to be read by the
portion of the security community
responsible for creating protective
mechanisms to guard against
shellcode type security flaws; the
intention is to remove the perception
that Unicode buffer overflows are non
exploitable and thereby improve the
general state of network security. It is
often the case that several classes of
overflow or format string bug are
labelled denial of service attacks
when in fact it is possible to execute
arbitrary code. This paper deals with
one of these classes of overflow.
This paper introduces a technique (the
Venetian exploit) that can be used to
permit the execution of a small amount
of arbitrary code in a situation where a
buffer overflow occurs in a Unicode
string on the Intel x86 processors. This
situation is common in the Windows
operating systems but the technique is
not operating system specific.
[Introduction]
It is often the case that an overflow on
the Windows platform occurs in a
string that is converted to Unicode
prior to the overflow.
This leads to a complication when
attempting to write an exploit, since
the shellcode will generally have null
bytes inserted between each byte of
the submitted string. For example
AAAA
...becomes
00 41 00 41 00 41 00 41
6E
6F
70
71
72
73
00:add
00:add
00:add
00:add
00:add
00:add
byte
byte
byte
byte
byte
byte
ptr
ptr
ptr
ptr
ptr
ptr
[esi],ch
[edi],ch
[eax],dh
[ecx],dh
[edx],dh
[ebx],dh
eax
94:xchg
95:xchg
96:xchg
97:xchg
eax,esp
eax,ebp
eax,esi
eax,edi
eax
byte ptr [ebp],ch
eax
byte ptr [ebp],ch