What A Malicious XSS Code Can Do To Your Browser

Hey over there.

As I promised you the last time, today I will be telling you the dangers of this XSS codes and what they access and send your important user credentials (such as passwords and usernames) to unwanted people.

XSS attacks on a server or website enables the attacker to perform th following types of attacks on a victim:

  • Cookie theft: When I talk about cookie theft, I do not mean the cookies that we eat. Click on this link What are cookies? to know what cookies are. The attacker can access the victim’s cookies associated with that particular website using  documentCookie and sending the cookies to his own server to extract the victim’s sensitive information such as session IDs, usernames, email address and even the victim’s password!! 
  • Keylogging: The attacker can also execute a virtual keylogger by using the JavaScript addEventListener which will record and send all of the user’s keystrokes to the attacker’s server. This may be used to get the victim’s sensitive information such as passwords and credit card numbers!
  • Phishing: The attacker may insert a fake login form into the page using the JavaScript function DOM and manipulating this function to set the form’s action attribute to target his(attacker’s server) and then trick the user into submitting sensitive information such as username-password combination. In this kind of phishing attack, the websites addreass is usually legitimate hence this kind of phishing attack is very difficult to detect.

    That is all there is for today. Next time I will be showing you how to perform a simple XSS attack and how to patch such vulnerabilities. See you till then.

    Don’t forget to follow me so as to never miss out on anything.

    Disclaimer: The content on this blog should he used purely for education purposes or by security researches and system admins to fix XSS vulnerabilities on their systems. I shall not be held liable for the wrong use of these techniques.

    Advertisements

    Types of XSS

    Hey there. Last time I introduced you to what basically XSS attacks are. Well, as I promised, today I will be telling you about the different types of XSS attacks. Remember that XSS attacks can be implemented through either JavaScript or PHP.

    There are basically three different categories of XSS attacks. They are:

    • Stored XSS(Persistent XSS): This is whereby the malicious code originates from the websites database. Am sure you are definitely asking your self how the code came from the website’s database rather from the attacker’s computer. Well, it’s simple. The attacker may inject the malicious cose in a websites input field such as in the comment field hence the script is saved to the website’s database.
    • Reflected XSS: In this type of XSS attack, the malicious code originates from the victim’s request to the website. The website then includes this malicious string in the response sent back to the user. The attacker can send the URL containing the malicious URL to the victim (using email or instant messaging such as whatsapp) and tricks the victim into visiting the website. This is successful with the use of a URL  shortener service which disguises the malicious string fron users who might otherwise identify it.
    • DOM based XSS: This is the last type of XSS attack. Here the vulnerability is in the client side code rather than the in the server side code. The attacker crafts a URL containing the malicious string and sends it bo the victim tricking the victim to request the URL from the website which receives the request but does not include the malicious string in tye response. The victim’s browser executes the malicious script to be inserted into the page. The victim’s browser executes the malicious script inserted into the page sending the victim’s cookies to the attackers server.

      That is all for today my esteemed reader. Next time I will be talking about what this malicious code snippets can do to compromise your browser’s security.

      See you till then.

      Don’t forget to follow me so as to never miss out on anything.

      Disclaimer: The content on this blog should he used purely for education purposes or by security researches and system admins to fix XSS vulnerabilities on their systems. I shall not be held liable for the wrong use of these techniques.

      What is XSS?

      Hi there, today I will introduce you to a type of web vulnerability found on most servers on the internet. It is called Cross site scripting.

      Cross site scripting (commonly known as an XSS attack) is a form of gaining access to a person’s browser cookies and session ids therefore compromising his/her privacy.

      You may be asking yourself HOW?

      Well, it’s basically a code injection attack that allows an attacker (in this case a black hat hacker) to execute a malicious JavaScript or PHP code snippet in a user’s browser.

      The hacker does not need to have access to the victim’s system. The attacker, instead exploits a vulnerability  (in this case XSS) in a website that the victim visits in order to get the website to execute the malicious code to the victim’s browser. The victim’s browser takes the codento be from the website itself hence the code is executed by the victim’s browser since it seems to originate fron the server the victim is connected to.

      The main goal of an XSS attack is to execute malicious code snippets in the victim’s browser.

      That is all for today. See you next time where I will discuss about the various types of XSS attacks.

      Don’t forget to follow me so as to never miss out on anything.

      Disclaimer: The content on this blog should he used purely for education purposes or by security researches and system admins to fix XSS vulnerabilities on their systems. I shall not be held liable for the wrong use of these techniques.