While most SQL injection attacks are carried out with malicious intent, some security researchers use controlled SQL injection techniques for ethical hacking purposes, known as penetration testing. This helps organizations identify and remediate vulnerabilities before they can be exploited by malicious actors.