With the help of Internet, there are tremendous innovations and developments in technologies. Most of the business organizations are forced to use the flexible and modern network technologies for business processing. This opens the door for cyber criminals to initiate cyberattacks to disrupt the business process. There are lot of reasons behind these cyberattacks like stealing login credentials, financial information and confidential information, disrupting the services available to legitimate users and to gain unauthorized access. To defend against cyberattacks, several mechanisms were proposed by researchers. In this paper, we analyzed about different types of cyberattacks and detection mechanisms to defend against those attacks. We also analyzed about different datasets and evaluation metrics used to evaluate the performance of every detection mechanism.