A web attack is an attempt to exploit vulnerabilities in the web page, or parts of it. The attacks can involve the content, web application or server of a site. Websites provide a variety of opportunities for attackers. They can gain access to websites or obtain confidential information, or upload malicious content.

Attackers usually look for weaknesses in the structure of a website's content to steal data, control the website, or cause harm to users. Some common attacks include brute force attacks as well as cross-site scripting (XSS) and attacks to upload files. Other attacks are carried out via social engineering, such as malware attacks or phishing like ransomware, worms, trojans, or spyware.

The most frequent website attacks attack the web application, that is composed of the software and hardware that websites use to display information to its visitors. Hackers are able to attack websites by exploiting its weaknesses. They can do this by using SQL injection, cross-site request forgery, and reflection-based XSS.

SQL injection attacks target databases that web applications use to store and provide content. These attacks could expose a variety of sensitive data, especially passwords, account logins, and credit card numbers.

Cross-site scripting attacks exploit weaknesses in the code of websites to display untrusted text or images, hijack session information, and then redirect users to phishing sites. Reflective XSS also allows an attacker to execute arbitrary code.

A man-in the-middle attack occurs when an outside party intercepts the communication between you and the web server. The third party could alter messages, spoof certificate or alter DNS responses and other things. This is a way to alter online activities.

you can check here