How to overcome vulnerabilities issue "DOMbased Cross Site Scripting Vulnerability"

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/21/2014 11:44:19 PM
Gravatar
Total Posts 18

How to overcome vulnerabilities issue "DOMbased Cross Site Scripting Vulnerability"

Hi Joe,

I have scanned the site by PCI compilation tool.

So, i am getting vulnerability issue such as "DOMbased Cross Site Scripting Vulnerability".

Error Description : Line 350:Unsafe client
output setting form.action to tainted
value
Line 350:"window.location.href" is
controlled by the user

we are getting this issue in all pages, it is javascript related issue and it is in mojo portal code.

Please suggest how to overcome this issue.

 

Thanks,

Prafull

1/22/2014 6:32:21 AM
Gravatar
Total Posts 18439

Re: How to overcome vulnerabilities issue "DOMbased Cross Site Scripting Vulnerability"

Sorry but I don't know anything about the tool you are using nor about what extra javascript you may have in your site.

If you use a tool like that then it is your responsibility to understand the output of the tool.

If you think there is a security problem in mojoportal you are going to have to express clearly what it is and how it may be exploited.

1/22/2014 11:10:54 PM
Gravatar
Total Posts 18

Re: How to overcome vulnerabilities issue "DOMbased Cross Site Scripting Vulnerability"

Hi,

I am not using any external javascript in mojoPortal code.

I am getting scripting error, check description as below,

Description :

The website or application is vulnerable to DOMbased crosssitescripting (XSS).

Crosssite scripting allows a malicious attacker to trick your web application
into emitting the JavaScript or HTML code of his choice. This malicious code will appear to come from your web application when it runs in the browser of an unsuspecting user.
Whereas traditional XSS takes advantage of vulnerable backend
CGI scripts to directly emit the code into served pages, DOMbased XSS takes advantage
of vulnerable JavaScript scripts which execute directly in the user's browser. For example, a the following vulnerable script can be used to launch an XSS attack:
var loc = document.location + '?gotoHomepage=1';
document.write('<a href="' + loc + '">Home</a>');
In this case, the JavaScript variable "document.location" is under the direct control of an attacker, but it is being written directly into the document content
without escaping. An attacker could construct a URL containing <script> tags in it and trick an unsuspecting user into visiting the vulnerable website. A URL
such as http://your_application/index.html?"><script>alert(document.cookie)</script> can be constructed that would cause the script above to write the
attacker's malicious script tags directly into the user's document, where they will be executed.
• An exploit script can be made to: access other sites inside another client's private intranet.
• steal another client's cookie(s).

 

Thanks

Prafull

1/23/2014 6:17:36 AM
Gravatar
Total Posts 18439

Re: How to overcome vulnerabilities issue "DOMbased Cross Site Scripting Vulnerability"

Sorry but you still have not identified or demonstrated any specific  vulnerability, I have no response for this.

I know what cross site scripting is, but you have not shown me any specific xss vulnerability.

You need to point out exactly what javascript fragment you think is vulnerable and explain how it could be exploited, that is how an attacker could add their own script.

If you really understand the problem or if a problem really exists then you should be able to point to it and tell me what is wrong and how it could be exploited as well as how it could be fixed.

Telling me that some tool gives you a warning doesn't help me or convince me there is a problem.

1/23/2014 9:46:58 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: How to overcome vulnerabilities issue "DOMbased Cross Site Scripting Vulnerability"

If you let me know exactly what tool you're using, I can investigate a bit. A problem with automated tools is that they are just that: automated. They perform stock tests and there is no intelligence behind them to analyze what they find, so you have to take their findings with a grain of salt and dig in to discover exactly what they are testing for.

At our organization we had a similar testing issue come up a few months ago. Our network group hired a consulting firm to do penetration testing, and the initial report came back saying our mojoPortal site was vulnerable to SQL injection. It turned out that their test for SQL injection consisted of: "add a parameter to the URL, and if the rendered page content changes, then report a SQL injection vulnerability." What they didn't take into account when developing that test is that ASP.NET will always change the rendered page content with different parameters, whether those parameters are used or not.

Jamie

2/26/2014 5:51:40 AM
Gravatar
Total Posts 36

Re: How to overcome vulnerabilities issue "DOMbased Cross Site Scripting Vulnerability"

Sorry for replying late, we were trying all possible solution for the same.

We are using Aperia Solutions's custom tool to check for PCI compliance.

You must sign in to post in the forums. This thread is closed to new posts.