Defacing Sites via HTML Injections (XSS)



Defacing Sites via HTML Injections

Defacing Sites via HTML Injections


What Is HTML Injection:

"HTML Injection" is called as the Virtual Defacement Technique and also known as the "XSS" Cross Site Scripting. It is a very common vulnerability found when searched for most of the domains. This kind of a Vulnerability allows an "Attacker" to Inject some code into the applications affected in order to bypass access to the "Website" or to Infect any particular Page in that "Website".

HTML injections = Cross Site Scripting, It is a Security Vulnerability in most of the sites, that allows an Attacker to Inject HTML Code into the Web Pages that are viewed by other users.

XSS Attacks are essentially code injection attacks into the various interpreters in the browser. These attacks can be carried out using HTML, JavaScript, VBScript, ActiveX, Flash and other clinet side Languages. Well crafted Malicious Code can even hep the "Attacker" to gain access to the entire system.

The most common tags that are used for the HTML Injections are are mentioned below -

1. script ==> This tag contains the code referred in the body of the document.

2. meta ==> This tag defines document's meta Information such as keywords, expiry date, author, etc..

3. html ==> This tag starts an HTML Document

4. body ==> This tag contains the body of the HTML document, which includes the entire content that will appear in the Web Browser.

5. embed ==> This tag is used to embed multimedia in HTML.

6. frame> ==> This tag is used to place the contents into the frame.

7. frameset ==> This tag is a container for frames and replaces the body tag.

8. img ==> This tag provides a facility to put into a web page.

9. style ==> This tag is used to specify the style Information for the document.

10. link ==> This tag is used to specify the color of the unvisited link.

Thus these are the above basic Tag that are used to perform HTML Injections on the site which is vulnerable to the Cross Site Scripting or HTML Injections.

How To Perform HTML Injections : 1, Over here we will use the Google Dork to find out the Vulnerable Site's  and we will use the below mentioned Dork :

GOOGLE DORK : inurl:"search.php?q="

Refer the Image below -


2, Now as we have surfed over the Internet and have found the Sites that are Vulnerable to the XSS that is HTML Injections then in this case we will be using the following simple scripts and the html tags as in detail mentioned above.



Simple JavaScript : Now this will alert a popup message, saying "Rohit" without quotes.

So, use "search.php?q=" and you can simply try the following on a website with the same thing.

Example : http://website.com/search.php?q=

There are good chances of it working, but don't be worried if it don't, just try different sites.
You can insert HTML not just java-script.

As an Example : http://website.com/search.php?q=

NOTE : If you see the bold text on the page and new-lines then you knows its vulnerable. Well now you understand how XSS works, we can explain some simple XSS deface methods, there are many ways for defacing it will mention some of the best and most used, the first one being IMG src, now for those of you who don't know html, IMG SRC is a tag, that displays the IMAGE linked to it on the webpage.

Ok now if you want to do then change the link to a valid picture link, and save it and run it you will see what i mean.

3, Now as I have found some sites which are Infected to the XSS (HTML Injection) and hence I will be using the above mentioned HTML Codes to exploit a particular page.
Some of the infected sites are mentioned below -

http://makeitright.ca/
http://www.vegdc.com/
http://www.chauvetlighting.com/
http://en.alfmed.com/


There are various sites but I am mentioning here only few of them which are shown above.

4, Now going further to the affected URL of the Sites and then Injecting the HTML Codes so that it can call an Image from the another Site. This is a Dynamic Link and will be called only when the concerned URL is opened or fetched.

The defaced links of the sites are - http://makeitright.ca/Information/search.php?q=  this is the link and the format of the affected URL's.

Let's Start with the Virtual Defacement - On changing and Manipulating an URL of the above mentioned sites will help us to exploit the sites those are affected and will be defaced virtually. Refer the Image as shown below -



Thus, This is how we can exploit further and can also go with the Cookie Hijacking, When skilfully manipulated XSS or HTML Injections. However, The other virtually defaced site links are shown below via an Images of the Defaced Pages -

 2, Virtually Defaced Page 2 is mentioned below -


3, Virtually Defaced Page 3 is mentioned below -


4, Virtually Defaced Page 4 is mentioned below -


Thus, Amongst the dozens of sites here are few of them which I have Defaced via HTML Injections. This was done via a Simple XSS technique. An Advanced version of the XSS technique contains huge number of sites which includes techniques like DOM (Document Object Model ==> Java-Script) Based Attack, Non Persistent Attack, Persistent Attack on the sites which can even lead to provide the full System Access when Manipulated affectedly.

                               "KEEP CALM AND STAY AWAKE"









FEED



Share










SUPPORT


View Rohit Patel's profile on LinkedIn









VISIT COUNTER !!






ROHIT PATEL
 



One Response so far.

  1. Tradewall says:

    Hi Rohit. My web page (www.thetittler.com) has been defaced by an html injection. How do I get it back to what it was like before please? And stop iy happening again.

    Cheers,
    John.