A rootkit is a malicious software program that gives an attacker unauthorized access to a computer or network. Rootkits can be used to gain root or administrative privileges on a system, allowing the attacker to install additional malware or steal sensitive data.