Attacks and Exploits

An authorized test targets a stack overflow that corrupts any payload containing the bytes 0x00 and 0x0a. How should the tester configure msfvenom?

Show the answer

Correct answerB. Set the bad characters so the encoder avoids them

AWhy not this: Stageless payloads bundle the whole payload; they do not remove particular byte values.

BWhy this is right: The bad-character setting makes msfvenom encode the payload without the listed bytes.

CWhy not this: More encoder iterations target signature detection and do not guarantee that bad bytes are absent.

DWhy not this: The output format sets the file type or wrapper; it does not strip bytes from the shellcode.

msfvenom accepts a list of bad characters and picks an encoder whose output avoids those bytes, so the payload survives the vulnerable code path. Staged versus stageless changes how the payload is delivered, not which byte values appear in it.