Why can't we use fixed memory addresses in shellcode on modern Windows systems like Windows 7?
Modern Windows systems implement Address Space Layout Randomization (ASLR), which randomizes the base addresses of loaded modules like kernel32.dll and user32.dll. This makes hardcoded addresses unreliable for shellcode. To overcome this, shellcode must dynamically locate API addresses at runtime, as explained in this article on Windows Shellcode Study Notes - Generating Shellcode via Visual Studio.
ASLRshellcodefixed addressesWindows 7dynamic API resolution