Security testing is performed to identify vulnerabilities in a system and ensure confidentiality, integrity, authentication, authorization, availability and non-repudiation. The main techniques are vulnerability scanning, security scanning, penetration testing, ethical hacking, risk assessment, security auditing, and password cracking. Security testing helps improve security, find loopholes, and ensure systems work properly and protect information.