A shellcode is an offset-independent assembly code which can be executed from any part of program. Those are commonly used by cyber-security engineers, hackers and lowlevel developers (anticheats, ...
A guide to writing a basic shellcode loader in C++ using the Metasploit Framework. This guide assumes some basics, but holds your hand for the most part. So if you're a student interested in malware ...