Step 1: File Creation: The attacker creates a malicious .forward or :include: file in their home directory. This file contains commands designed to write to a system file or execute a privileged command.
Step 2: Triggering Sendmail: The attacker sends an email to their own account or another account configured to use the malicious .forward or :include: file. This triggers Sendmail to process the file.
Step 3: Privilege Escalation: Sendmail, running with the group privileges of mail or smmsp, executes the commands in the malicious file. The commands write to a system file (e.g., /etc/passwd) or execute a privileged command, effectively granting the attacker elevated privileges.
Step 4: System Compromise: The attacker uses the newly acquired privileges to gain control of the system, potentially installing backdoors, stealing data, or disrupting services.