Step 1: Environment Setup: The attacker sets the DISPLAY environment variable to a value that xterm cannot access (e.g., an invalid display or a display the attacker doesn't have permission to use).
Step 2: Symlink Creation: The attacker creates a symbolic link to a critical system file, such as /etc/passwd, with a predictable filename that xterm will use for its core dump (e.g., core).
Step 3: Triggering the Crash: The attacker executes xterm. Because of the invalid DISPLAY setting, xterm crashes and attempts to create a core dump.
Step 4: File Overwrite: xterm, running with the attacker's privileges, attempts to write the core dump data to the file pointed to by the symbolic link (e.g., /etc/passwd).
Step 5: Privilege Escalation: The attacker gains control of the system by overwriting the target file (e.g., adding a new user with root privileges to /etc/passwd).