Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on an SEH exploit. the problem I am facing here that all POP/POP/RETN addresses end with null bytes, so everything placed after it gets corrupted.

Is it possible to use Metasploit Msfencode to encode the address of the POP/POP/RETN instructions its self to get over the problem of the null byte ?

The exploit structure is: (300 bytes of junk + nseh + seh + 3000 bytes of junk)

share|improve this question

This question is impossible to answer accurately without a specific look at the binary or more detail about what you have access to.

In general, if your SEH address contains a null byte you should stick nseh&seh at the end of your payload for exploit simplicity. Having nseh be a jump up to your shellcode usually works fine with this, your problem may instead be fitting your shellcode into 300 bytes(that you have control over?).

There are lists of techniques you may try, but I still see you being limited to those 300 bytes.

share|improve this answer

There is a Immunity Plugin, developed by awesome guys at . you can check pop/pop/ret combinations using that . Morever also provides with a skeleton to convert your exploit module to metasploit module hence porting it there .

Also try !mona suggest to see the exploiting options after placing in Pycommands folder of immunity debugger . It might suggest you something else as well .

You can use msfencode but encoding will make payload longer and 300 bytes is too less .But you can try to see if it fits .

If non of the above works then you might have to do what Ditmar suggested .

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.