Ethical Hacking - Cross-Site Scripting

 Cross-site scripting (XSS) is a code injection attack that allows an attacker to execute malicious JavaScript in another user's browser.

The attacker does not directly target his victim. Instead, he exploits a vulnerability in a website that the victim visits, in order to get the website to deliver the malicious JavaScript for him. To the victim's browser, the malicious JavaScript appears to be a legitimate part of the website, and the website has thus acted as an unintentional accomplice to the attacker. These attacks can be carried out using HTML, JavaScript, VBScript, ActiveX, Flash, but the most used XSS is malicious JavaScript.

These attacks also can gather data from account hijacking, changing of user settings, cookie theft/poisoning, or false advertising and create DoS attacks.

 

Types of XSS Attacks

XSS attacks are often divided into three types −

      Persistent XSS, where the malicious string originates from the website's database.

      Reflected XSS, where the malicious string originates from the victim's request.

      DOM-based XSS, where the vulnerability is in the client-side code rather than the server-side code.

Quick Tip

To prevent XSS attacks, keep the following points in mind −

      Check and validate all the form fields like hidden forms, headers, cookies, query strings.

      Implement a stringent security policy. Set character limitation in the input fields.

Comments

Post a Comment

Hello,

Thank you for reading blogs and your lovely comment. We hope you like this blogs.

Have a nice day!

Again Thanks,
Rk Thakur

Popular posts from this blog

Hacker

What constitutes ethical hacking?

Insecure Cryptographic Storage