C vs C++: C++ extends C with Object Oriented Programming (OOP) Support.
Most of the notes in my C section are also applicable to C++.
Mal dev examples: https://github.com/cocomelonc/meow/tree/master
Basic Windows Kernel Programming
Windows Exploitaion Resources
Compiling a DLL on Kali:
x86_64-w64-mingw32-gcc -shared -o script.dll script.cpp -fpermissive
Compile exe on Kali (you might need to adjust these flags):
x86_64-w64-mingw32-g++ -O2 bad.cpp -o nothing_to_see_here.exe -mconsole -I/usr/share/mingw-w64/include/ -s -ffunction-sections -fdata-sections -Wno-write-strings -fno-exceptions -fmerge-all-constants -static-libstdc++ -static-libgcc -fpermissive
var1= 20;
var1_addr = &var1; //variable = the address of var1, "address of" operator
//Pointer: stores the address of another variable.
data_of_a_pointer = *var1_addr; //dereference operator, access data "pointer to by" a pointer. Will be 20.
Direct Syscalls - use low level direct syscalls to evade AV / EDR software.
Windows API Programming
The Forger's Win32API Tutorial
Usually a C / C++ runtime, the C runtime is used for C++ programs when C functions are used. C++ runtime - usually on top of the C runtime, often uses the C runtime for memory management.
C++ has official support from Microsoft and more modern features (which is why it is often used over C on Windows).