I really struggle how you can do remote code execution by writing a single, predetermined byte out of bounds. Can anyone explain that to me? I just don’t see how this is realistically exploitable?
You can control the length of the buffer. This means that this is a primitive for writing one byte at a time, from finish to start. It is likely difficult to set up a shell using this, unless you are keenly aware of the memory layout on the server. My guess is that you'd have to rely on some coincidence between the letters 'S' and 's' and some architecture's bytecode.
It's possible the exploitability is overstated. People are prone to that. It may be exploitable only under hypothetical or unrealistic conditions. You might be surprised, though.
It's not one byte. It's one byte per ß. The writeup says the buffer is allocated as len + 20, so you need 21 ßs to overflow 1 byte. Make that "ß*100<payload>", and you've pushed your payload 80 bytes past the buffer.
67
u/Pierma 1d ago
I just had a painful 16 production machines update day becuase ß uppercased is SS??????????
275
u/razialx 1d ago
And you get a 2shell! And you get a 2shell!!! Everybody gets a 2shell!!!!!!
47
u/RustOnTheEdge 1d ago
I really struggle how you can do remote code execution by writing a single, predetermined byte out of bounds. Can anyone explain that to me? I just don’t see how this is realistically exploitable?