I'm working on a buffer overflow exercise and I have my connected client IP address available on the stack (ESP + 7C).
Is it possible to write a single instruction to push the value of the IP into the stack, so I can use it later? I want my shellcode to be smaller in size; that's why I don't want to write multiple instructions to push its value.
Is this instruction ok? Would it push the value of ESP+7c onto the stack ?
PUSH [ESP+7c]