Wallhacks in older titles like Call of Duty 2 often rely on simple but effective technical exploits:
Some older hacks work by replacing the game's standard wall textures with semi-transparent ones. call of duty 2 wallhack
Advanced cheats read the real-time coordinates of all players directly from the computer's RAM, then project an overlay (like a box or a line) on top of the game screen. The Impact on Gameplay Wallhacks in older titles like Call of Duty
While it might seem less intrusive than an "aimbot" (which automatically targets heads), a wallhack is arguably more dangerous because it is harder to detect in a killcam. Cheating in older Call of Duty games? - Facebook call of duty 2 wallhack