hacker, he will be able to gain access to the control
panel of the site and its contents.
XSS attacks were the most widespread in the past
year and the situation has not changed at the present
time. In this connection, it should be concluded that
cross-site scripting is relevant, but, unfortunately, not
enough efforts are being made to solve this problem,
and scammers are coming up with more and more
new schemes for its implementation, which are harder
to deal with every year (Frazer Howard).
2.1 Analysis and Classification of
Existing XSS Types
How Cross-Site Scripting Works.
Cross-site scripting (XSS) is one of many attacks
on web systems, affecting many web applications and
is one of the most common types of hacker attacks at
the application layer. In English, the term sounds like
Cross-Site Scripting, but it has the abbreviation XSS,
so as not to be confused with cascading style sheets,
which translate as Cascading Style Sheets (Kozlov,
2010).
This attack allows a hacker to inject malicious
code into a specific page of the site so that the victim's
Internet browser, when the page is launched, will
launch this code.
With the help of cross-site scripting, it is possible
to issue modified data, replace links, both visible and
hidden, or display your own advertisements on the
affected resource. If a hacker can find even one XSS
vulnerability, then cross-site scripting will work
(Fogie, 2007).
Many websites store their users' data in a database
(DB) so that they can be displayed as they are entered.
The peculiarity of such attacks is that the virus code
can use the authorization form of the site visitor to
obtain extended access or user authorization data in
the web system. Dangerous code can be embedded
into a web page not only through a vulnerability on
the user's computer, but also through a vulnerability
in the server.
The aforementioned attacks are often made
possible by malicious scripts written in JavaScript
(JS), with the help of which information is
subsequently introduced from third-party sources.
The scheme is built in such a way that the malicious
code gets into the database, where the username and
password of the visitor are located. Thus, when the
site displays the user's name on the web page, this
code will be executed. This code can do almost
anything, given certain conditions, as a result of
which the threat becomes quite realistic.
Many website owners neglect to protect against
such threats, believing that they cannot be used to
steal confidential data that is on the server. This is a
common mistake, since a page or cookie can contain
quite sensitive data, and where the safety of a cross-
site request forgery is at risk, a hacker will be able to
perform all actions available to the user. For the
operation of the application, and the business itself,
the results of XSS attacks can cause significant
damage. More than once, many popular websites such
as Vkontakte, Facebook, Google, Mail have become
victims of such attacks (Semenov).
Consider a standard example of an XSS attack:
a hacker enters a script into the URL of an
active online store;
the script directs the user to the replaced
malicious page;
a script is executed on the page that gets the
value of the visitor's cookies;
then the necessary information is sent to the
hacker, who uses it to intercept the user's
session.
Despite the fact that the store was not harmed, the
hacker using the vulnerability fraudulently obtained
the confidential information of visitors and took
control of their sessions. Also, there is an option to
create a fake URL by encoding a part of it using any
encoding method, which will make it unattractive.
The user will not be suspicious at the sight of the
familiar URL and will not pay attention to the
subsequent encoded part. Thus, fraud occurs on the
Internet (Mitchell).
General classification of XSS attacks.
Not all vulnerabilities are the same, there are many
types. Let us consider the classification of such
attacks and analyze according to two criteria: in the
direction of impact and in the method of impact.
Let's look at and analyze Figure 2 below, where
you can visually consider how to use cross-site
scripting.
According to the method of impact, attacks are
subdivided into active and passive:
Passive (autonomous) requires the direct
intervention of the attacker. The victim needs
to do a specific action to call the event handler
and load the malicious script in a prepared
form. In this case, you can resort to social
engineering, for example, send an e-mail with
a proposal to follow the link and click on a
specific area of the site. When the user
completes all these actions, a malicious script
will be launched. In case of inaction of the
victim, the code will remain inactive.
Example:
Research of the Possibilities of Conducting XSS-attacks and Methods of Countering It