It is possible to execute shellcode from a local process without using the well known Windows APIs such as VirtualAlloc, CreateThread or similar. Malware is know to use this technique, so I wanted to capture it too.
To achieve this, we need to use MS Visual C++ and a section pragma, alongside the allocate declarator specifier, to tell the compiler that we want our shellcode to be allocated inside the .text section of our portable executable, which eliminates the need for the program to allocate RWX memory blob for storing the shellcode. Additionally, we need to cast the array containing our shellcode into a function pointer and invoke it - this allows us to skip the CreateThread or similar Windows APIs that are usually used for jumping to the shellcode.