Native Shellcode Runner Project Finished#

A lightweight C implementation demonstrating memory management, permission manipulation, encryption techniques and file i/o operations. This project focused solely on the Linux operating system and how computer operations perform on a low / machine code level.

Objectives Accomplished#

-> Manual interaction with memory using (malloc, memcpy)

-> Data block permission editing with (mmap,mprotect)

-> Analysis of the void* function pointer casting mechanism

-> File I/O (fopen, fseek, fread, rewind)

-> Payload encryption using XOR loops

Challenges Faced#

  • First time coding in C, therefore syntax was a bit tricky although C is very similar with java. Worse thing that I need to learn is the printf statement.

  • Memory Management was another first for me. Didn’t know how to allocate, write, iterate byte by byte, find the length of the data, it was really enlightening and as time passes I think I will be much more confident with low level operations that have to do with memory.

  • File I/O operations with fread, f everything basically and I also faced issues when creating the payload binary in an editor and the xor decryption didnt work, forcing me to install a hex editor to get the bytes correct

Final Notes#

The project is published publicly on my github page, (see link below) any advice, feedback or any other recomendations are welcome. Thanks for reading!


github link