Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsFAQFAQDonDon't trust user input
Previous
 
Next
New Post
1/9/2006 7:10 AM
 

FAQ module seems to trust user input. It should filter or encode any user input before displaying it back to users. (see thread at http://forums.asp.net/1157038/ShowPost.aspx)

I did the following test with DNN 3.2.0:

  1. Set up the standard DNN FAQ module on a page.
  2. Edit the module settings and grant Edit Permissions to all users.
  3. Go to the FAQ module as a non-admin user.
  4. Select Add a new FAQ.
  5. For Question or Answser: Set the Texteditor to  "Basic Text Box", then text mode to "Raw"
  6. Enter a Question like <SCRIPT>alert('hello');</SCRIPT>

It seems that many (if not all) modules in DNN are presently designed to trust user input. Anyone building a large portal where a large group of users is allowed to edit certain modules must be carfeul. Before you grant edit permission on any module to a group of users, you may want to test each input with a simple <SCRIPT> payload.


WildVoice.com Michael Levy - Are you ready to be heard? WildVoice.com
 
New Post
1/9/2006 8:42 AM
 

Michael,

You're correct that most modules assume that if someone can edit them, they are in a position of trust, so their input is not usually filtered. Exceptions are modules that are likely to have anonymous user input, or have many users in a low privileged position having input e.g. blogs/forums are good examples.

We had considered filtering all user input from all tangents before, but it was a very large job, and also, oddly enough, not a standard portal practice (if you evaluate other CMS products you'll find that they operate a similar policy where anonymous points such as login/registration etc. are tightly controlled, but in areas where a username/password is required to gain access theres less restrictions - theres also the fact that forcing filtering can impact functionality eg. should you filter the text/html module?). Now that all the modules are decoupled, it's somewhat up to each project group how far they wish to constrain user input (using the core InputFilter method is the recommended practice)

As a core level protection against XSS we did add support for HttpOnly cookies in 3.2/4.0 (see http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/256/Default.aspx for more details)

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
1/9/2006 3:21 PM
 

Thanks Cathal. I appreciate the trade-off that had to be made.

You may want to suggest to the different module teams that they consider tightening up handling of user input when it makes sense. It seems that quite a number of people are using DNN as a platform for largecommunity oriented sites. Some sites have a large user community and users can often edit information.

Some of these sites are trying to reuse the standard modules (sometimes with add-ons like Rodney's HomePage module from http://www.smart-thinker.com), some are just building their own modules.

I think it would be great to raise awareness of this issue and make sure people know that they shouldn't enable edit permissions to a broad group of users for many of the standard modules. Perhaps each module can be marked as "Safe for anonymous input" or somthing like that so we know which modules can be used in these situations.


WildVoice.com Michael Levy - Are you ready to be heard? WildVoice.com
 
New Post
1/9/2006 5:59 PM
 

Michael,

I'm in the middle of writing a few documents, one of which is on securing DNN installs where I'll certainly be giving that guidance, and another on developing secure modules. Once it's ready I'll be giving a copy to the project teams to proof read, and with the hope that they can update their modules accordingly, and shortly after it'll be a download for all users. Also in a future DNN version, I plan on extending the filter so theres an optional whitelist filter (i.e. only a limited subset of tags for presentation purposes will pass - rather than trying to filter out all 'bad' strings with a blacklist filter)

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
3/8/2006 9:08 AM
 

Cathal, have you reviewed the new Microsoft XSS library? Any thoughts on its capabilities?

 

 http://www.microsoft.com/downloads/details.aspx?familyid=9a2b9c92-7ad9-496c-9a89-af08de2e5982&displaylang=en

Microsoft Anti-Cross Site Scripting Library V1.0

Brief Description
This download contains the redistributable files for the Microsoft Application Security Anti-Cross Site Scripting Library.

WildVoice.com Michael Levy - Are you ready to be heard? WildVoice.com
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsFAQFAQDonDon't trust user input


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out