Welcome back to Basic Exploit Development.
Before we begin as all male 5.5, we will have a back after analysis forward for your OCP exam.
Better security will supply you with a custom compile binary containing about 12 back characters for
the exam, and they highly emphasize identifying the bad character section.
Bad characters are basically hexadecimal bytes that do not properly render in the debugger.
The either will or will not alter the following bytes within the debugger.
So if it does not alter the following, it's a render error.
If it does alter the following bytes, it's a mangle and truncation error.
Back characters have to be eliminated by merely fitting the buffer of all hex the mode that does more
digits from zero one to F and manually analyzing the stack in the debugger.
Zero zero is known as a universal no byte, so we eliminate it already.
This is the incorrect render effect.
We already eliminated a0a.
So we're counting from zero B, zero C and then zero D turns to zero E.
This is the truncate mangling effect.
Notice how zero a which we eliminated in this section before proceeding to our previous slide.
Has turned it to zero 29.
But then notice how all of the bytes behind it are also mangled.
You cannot eliminate each improperly rendered bite.
You must begin with the first incorrect by and eliminate from there using the repetitive process of
back after analysis.
To to start off of the back character elimination process start off with back here to start PI, which
is in the course pack.
And then insert as a string within their proof of concept.
Then fire your proof of concept and analyze the dump and stack.
Then you mentally read each hexadecimal by and compare against what you see in the debugger.
So we eliminated zero eight.
So what you would do is you delete zero A and then you fire the approved concept again.
We then eliminated zero D, so we delete zero D and then you fire the proof concept again.
You must manually repeat this over and over again until there is no more truncation mangling or a correct
rendering of the bytes.
To run a successful exploitation attempt.
You need to generate show code that does not contain dot characters, back characters or simply incorrect
assembly opcode, and they will either cause the application to crash or divert execution of the application
away from our intended result.
Without eliminating bad characters, attempting to generate code result in non-functional unreliable
exploits.
So either the application will crash or the application will still run, but now becomes unstable.
We will use NSA Venable of the dash p parameter to specify our characters.
What generation code?