Ethical hacking aims to assess the security of a computer system or network through the discovery and exploitation of vulnerabilities in a lawful manner.