473,651 Members | 3,036 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cross Site Scipting

Hi All,

I would like to about Cross Site Scripting. I googled XSS and got the point
what it is but didn't get how it is achieved.

Can someone describe me with an example how an hacker does it.
My intension is not to hack anything but i am preparing a presentation on
this and would like to caution my team mates about the consequences of XSS
and how to protect our web based applications from a possible attack.

Any help in this is greatly appreciated.
regards,
Venkat

Jul 23 '05 #1
7 1952
Ivo
"Venkat" wrote
I would like to about Cross Site Scripting. I googled XSS and got the point what it is but didn't get how it is achieved.

Can someone describe me with an example how an hacker does it.
My intension is not to hack anything but i am preparing a presentation on
this and would like to caution my team mates about the consequences of XSS
and how to protect our web based applications from a possible attack.


This cannot be done, nor can it be hacked. At least not by javascript. As
far as I know. It is on the serverside where your site is vulnerable. My
host recently had to disable some php ini settings (esp. those dealing with
remote content) after they found someone was writing iframe tags into our
html files.
HTH
Ivo
Jul 23 '05 #2
have a look at edomainpoint.co m cheap domain name registration less $$
.com .com.au domains
eDomainPoint.co m
eDomainSecure.c om
Melbourne-Australia
http://www.edomainpoint.com
http://www.edomainsecure.com

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3
"Venkat" <ve*******@yaho o.com> wrote in message news:<108874696 8.295723@sj-nntpcache-3>...
Hi All,

I would like to about Cross Site Scripting. I googled XSS and got the point
what it is but didn't get how it is achieved.

Can someone describe me with an example how an hacker does it.
My intension is not to hack anything but i am preparing a presentation on
this and would like to caution my team mates about the consequences of XSS
and how to protect our web based applications from a possible attack.

Any help in this is greatly appreciated.
regards,
Venkat


cross scripting basically means that somebody injects script code
(i.e. javascript or vbscript) in your code via <input>, the url or the
query string. this alien code gets executed on your site as it would
belong there.
basic countermeasure: validate any user-input, means strip tags and/or
special characters out of data before you process that data any
further.

this is a good doc: http://www.cert.org/archive/pdf/cros..._scripting.pdf,
contains further links, too

micha
Jul 23 '05 #4
On Fri, 2 Jul 2004 11:09:12 +0530, "Venkat" <ve*******@yaho o.com>
wrote:
I would like to about Cross Site Scripting. I googled XSS and got the point
what it is but didn't get how it is achieved.


Well, the simplest is probably the script insertion flaw, this allows
people to insert script into another domain and execute it, such as:

http://www.google.com/custom?cof=L:j...script:alert(1)

(you would normally obfuscate this) - of course when you demonstrate
to your team that if they prevent they'll be a better team than google
(that flaws existed for over 2 years) they might even be motivated to
bother.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 23 '05 #5
"chotiwalla h" <ch*********@we b.de> wrote in message
news:78******** *************** **@posting.goog le.com...
"Venkat" <ve*******@yaho o.com> wrote in message news:<108874696 8.295723@sj-nntpcache-3>...
Hi All,

I would like to about Cross Site Scripting. I googled XSS and got the point what it is but didn't get how it is achieved.

Can someone describe me with an example how an hacker does it.
My intension is not to hack anything but i am preparing a presentation on this and would like to caution my team mates about the consequences of XSS and how to protect our web based applications from a possible attack.

Any help in this is greatly appreciated.
regards,
Venkat


cross scripting basically means that somebody injects script code
(i.e. javascript or vbscript) in your code via <input>, the url or the
query string. this alien code gets executed on your site as it would
belong there.
basic countermeasure: validate any user-input, means strip tags and/or
special characters out of data before you process that data any
further.

this is a good doc: http://www.cert.org/archive/pdf/cros..._scripting.pdf,

contains further links, too

micha


Thanks micha for a very quick response, i had gone through the link
http://www.cert.org/archive/pdf/cros..._scripting.pdf,
and i am bit confused here.

The author sited an example of a popular auction site where in
a bad guy BG12345(hacker) had posted some items for sale on auctions site,
we get lured by his posting and click on the link
which will take us to bad guys(BG12345) site, we then select an item on
his(BG12345) page which will take us back to auctions site(invalid page of
that of intruder)
we then give away our credit card info details and clicked submit button,
these details are actually submitted to bad guys BG12345 site and not
to actions site.

The above example looks clear and fair enough but i am confused when the
author explained the way BG12345 bad buy could able to achieve this.
He says
BG12345's web site offered a link to auction.example .com that looked
something like this:
<A HREF=http://auction.example .com/<script>alert(' hello')</script>">Click
Here</a>
The "FILENAME.h tml" submitted to auction.example .com was,
<script>alert(' hello')</script>
auction.example .com then used its ordinary routines to generate an error
page to you that read,
<HTML> 404 page not found: <script>alert(' hello')</script>
..... </HTML>

In effect, BG12345 managed to "inject" a JavaScript program into the page
returned to you by auction.example .com. The JavaScript ran as though it
originated at auction.example .com, and could therefore process events in
that document. It also maintained communication with BG12345 by virtue of
scripting that BG12345 put in the link; this is the way a CSS vulnerability
can be exploited to "sniff" sensitive data from within a web page, including
passwords, credit card numbers, and any other arbitrary information you
input. There are a number of variants to this problem. Odds are that
bank.example.co m also has the same vulnerability somewhere on its site.
BG12345 could potentially access your bank account and transfer funds using
the same process.

In the above example he is saying the auctions site had generated an error
page to the user and the intruder was able to inject some JavaScript code
which got executed at users browser, i want to know when user gets an error
page how can he submit his credit card info details to the intruder.

Basically i am not able to relate the example with the explanation, could
you please help me out in understanding this.

Thanks,
Venkat

regards,
Venkat


Jul 23 '05 #6
Venkat wrote:
<snip>
<HTML> 404 page not found: <script>alert(' hello')
</script> .... </HTML> <snip> Basically i am not able to relate the example with the explanation,
could you please help me out in understanding this.


In principle the ability to insert a working script in this way would
also mean the ability to insert, say, an IFRAME with its SRC pointing to
a credit card details page, or have the script create and insert such an
IFRAME. The IFRAME could be CSS absolute positioned and 100% height and
width so it concealed all of the 404 page. Leaving a casual observer
thinking that they were looking at the credit card details page that
they had been expecting when in reality they are looking at two pages;
the 404 page with the alien script and a contained credit card details
page. The alien script could then monitor the form in the contained
IFRAME and arrange for details entered to be sent to another domain.

Having a server-side script write anything of unknown/external origin
into an HTML page for output without converting - < - to - &lt; - (at
minimum) is probably a bad idea.

Richard.
Jul 23 '05 #7
"Richard Cornford" <Ri*****@litote s.demon.co.uk> wrote in message
news:cc******** ***********@new s.demon.co.uk.. .

Richard Wrote:
In principle the ability to insert a working script in this way would
also mean the ability to insert, say, an IFRAME with its SRC pointing to
a credit card details page, or have the script create and insert such an
IFRAME. The IFRAME could be CSS absolute positioned and 100% height and
width so it concealed all of the 404 page. Leaving a casual observer
thinking that they were looking at the credit card details page that
they had been expecting when in reality they are looking at two pages;
the 404 page with the alien script and a contained credit card details
page. The alien script could then monitor the form in the contained
IFRAME and arrange for details entered to be sent to another domain.

Having a server-side script write anything of unknown/external origin
into an HTML page for output without converting - < - to - &lt; - (at
minimum) is probably a bad idea.

Richard.


This is very good composed mail which gives a clear cut explanation of my
query.
Thanks a lot :).

regards,
Venkat

Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8439
by: Angus SC2 | last post by:
Hi I am trying to set up cross domain cookies on a server I have running that currently has 2 domains running on it (on different IPs). Basically I have a forums site (using UBB threads) and I want to users to be able to use the forum login and password from the main site and then if they go to the forum site they are already logged in to that as well. I have tried followed this article:...
0
2045
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools Chemistry, mathematics, physical sciences,...
0
1879
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools Chemistry, mathematics, physical sciences,...
0
2050
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools Chemistry, mathematics, physical sciences,...
7
3906
by: Scott M. | last post by:
How can I disable the cross-site scripting check for one particular page of a site?
7
3573
by: venkatbo | last post by:
Hi all, We've managed to cross-compile (from i686 targeting ppc) python (2.4.2) binaries and extension modules. However we cannot figure out how to cross-compile the .py (of distribution) files and generate the .pyc files for the target ppc from an i686 system. Is it possible to cross
4
2157
by: Jacob JKW | last post by:
Having read the CLJ FAQ and having done extensive Googling, I do understand that in in general cross-domain iframe scripting is not permitted. One issue I have not seen directly addressed, however, is scripting across different but still "friendly" domains. Essentially I'd like to send a signal from the child to the parent in any form at all. I would think that there might exist a way to set some variable or object property that could...
12
1975
by: Tomás Ó hÉilidhe | last post by:
I don't know the first thing about cross-platform GUI programming, so I'd like to ask a few quick questions. Which library is best for someone who appreciates portable programming and correct efficient code, and who'd like the library to fit well with the C++ Standard Library? Also I'd like the library to work on as many platforms as possible (Windows, Linux, Mac, and even the new game consoles such as Playstation 3 and XBox 360 if...
0
8278
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8701
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7299
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5615
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.