Cross site scripting

 Cross site scripting (XSS) 

What is an XSS attack? 

An XSS (cross site scripting) attack relies on improper programming on a web server. First the attacker would look for input boxes. These could be things such as comment boxes, URLs, posts, and messages. Once the attacker finds a vulnerable input field, they craft a malicious payload they want to inject into the web server. This could be something like stealing user IDs, passwords and other sensitive information. Usually, this payload is in the form of JavaScript code. Next, the hacker injects the payload into the web server so that when a legitimate user tries to access it, their data is stolen and sent to a server controlled by the hacker. 

How to stop XSS 

The main prevention method for XSS is making sure all your inputs are sanitised. This means that input variables should be properly handled and not directly put into strings. A company may also implement a content security policy to block applications that could be vulnerable to cross site scripting. 

Real world XSS attacks 

    • Myspace ‘Samy’ Worm (2005) - Samy Kamkar, a security researcher, executed one of the most famous XSS attacks by creating a worm that spread across Myspace, a popular social networking site. Kamkar injected JavaScript code into his profile, which, when viewed by other users, added them as friends and promoted his profile. 
    • Twitter Worm (2009) A hacker found an XSS vulnerability in Twitter that allowed them to exploit the “onmouseover event with links. This allowed them to retweet the worm just by hovering over it. 
    • Yahoo XSS (2017) - Yahoo’s popular email service was affected by a persistent XSS vulnerability. Attackers could send malicious emails containing JavaScript that, when opened, would execute in the recipient’s email client. 

 

Are XSS attacks illegal? 

Yes. XSS attacks break the computer misuse act as they intend to cause harm to a computer/computer system and steal data. Most of the time, XSS attacks link to malware which is also illegal to distribute and create with intent to harm. 

Comments

Popular posts from this blog

OSA Assignment 1 - Task 3 GUIDE

OSA Assignment 1 - Task 1 GUIDE

OSA Summer 2023 Mock - Task 1, Assignment 1