BadSAM: Exploring Security Vulnerabilities of SAM via Backdoor Attacks