Get the Whitepaper called Building Your Own Shell-codes.
You can download it from the following link: https://packetstormsecurity.com/files/download/86114/Building_your_own_Shell.pdf
Source: https://packetstormsecurity.com/files/86114/Building-Your-Own-Shellcode.html

