Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, variable names, and Twitter handles. Here is an example: “Assume your program has to call a function called Meow
, which is exported in a DLL named cat.dll
.”
A block of code is set as follows:
pVirtualAlloc = GetProcAddress(GetModuleHandle("kernel32.dll"), "VirtualAlloc"); payload_mem = pVirtualAlloc(0, payload_len, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
deXOR(cVirtualAlloc, sizeof(cVirtualAlloc), secretKey, sizeof(secretKey)); pVirtualAlloc = GetProcAddress(GetModuleHandle("kernel32.dll"), cVirtualAlloc);
Any command-line input or output is written as follows:
$ x86_64-w64-mingw32-g++ -O2 hack3.c -o hack3.exe -I/usr/share/mingw-w64/include/ -s -ffunction-sections -fdata-sections -Wno-write-strings -fno-exceptions -fmerge-all-constants -static-libstdc++ -static-libgcc -fpermissive
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Then, on the Network tab, we’ll notice that our process has established a connection to the attacker’s host IP address.”
Tips or important notes
Appear like this.