Why is an XSS attack dangerous and what don't you know about it?

Search for a command to run...

No comments yet. Be the first to comment.
Are you listing your apartment for sale? Great! A shiny new listing online, beautiful photos, a detailed description... But you know what? For a buyer, it's just information. For a thief, it's a ready-made plan of attack. It may sound like a scene fr...
How can you satisfy your curiosity in your free time? How can you combine your free time with learning and deepening your technical knowledge? How do you feed that curiosity that keeps growing as you dive deeper into the unknown? There are certainly ...

In the era of the Internet, especially today, when even companies specializing in cybersecurity fall victim to hacker attacks, the question arises: is it possible to win a fight that seems lost from the start? If companies that have been developing s...

In today's world, cyber-attacks are becoming increasingly sophisticated, posing significant challenges in combating cybercriminals. Virtually every imaginable device is interconnected via the Internet, enveloping us in the cyber realm. Cybercriminals...

A fiber optic cable LC type is visible above.

Cross-site Scripting (XSS) is a client-side code injection attack. The attacker wants to execute malicious scripts in the victim's web browser by inserting malicious code into a legitimate website or web application.
The flaws that allow these attacks to succeed are quite common and occur wherever a web application uses user input in the output it generates without validating or coding or sanitising the inputs.
Sometimes even software engineers fail to understand how dangerous it is if it runs on the client side and does not execute on the server side.
Today most applications are SPA, PWA or MPA applications. A lot is going on in the front end, so it is worth keeping security in mind!
In my opinion, this type of attack is dangerous for at least 3 reasons! The first is that it only takes a few lines of code and a little knowledge of JS to be able to launch such an attack. The second reason why this attack is dangerous is that this injection can be detected from the server level. This is where things start to get complicated and this attack can cause a lot of confusion in the application. The entire attack is carried out from the browser, using text, images, forms or a URL. The third reason? This attack consists of several, or more, steps, consisting of small victories and reaching for more.
A lot can be done with such an attack, starting from simple things like clickjacking (the victim clicks on a hidden overlay) to changing account numbers or stealing sessions and cookies. Below are more such examples.
A good solution would be to limit the amount of information collected from the user so that we have fewer elements and components that we need to remember to properly protect them against such an attack.
Solutions and defence options against such an attack can be found here: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html
It is worth taking care of at least the Cookies - HttpOnly headers
The HttpOnly flag blocks attempt by APIs other than HTTP to read a cookie with this flag. This means that JavaScript cannot read such a cookie.
It is also useful to use at least prepared statements, to filter data from the user. Keeping your software up to date can also help improve the security of your application.
If you are a developer have a look here: https://crashtest-security.com/xss-attack-prevention/
Before implementing and developing software, it is worth considering its security. This aspect is still overlooked, as evidenced by the attacks on eBay, Facebook and British Airways. XSS vulnerabilities can vary and pose different risks to your organisation, applications and users. When your website or application is attacked by an XSS attack, the attacker can steal sensitive data, perform unauthorised actions, elevate their privileges or take over a user's active web sessions.