Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  FAQ Module [Lea...  Don't trust user input
Disabled Previous
 
Next Next
New Post 1/9/2006 3:10 AM
User is offline Michael Levy
119 posts
9th Ranked


Don't trust user input 

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 4:42 AM
User is offline cathal connolly
2546 posts
www.cathal.co.uk
5th Ranked










Re: Don't trust user input 

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

 
New Post 1/9/2006 11:21 AM
User is offline Michael Levy
119 posts
9th Ranked


Re: Don't trust user input 

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 1:59 PM
User is offline cathal connolly
2546 posts
www.cathal.co.uk
5th Ranked










Re: Don't trust user input 

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

 
New Post 3/8/2006 5:08 AM
User is offline Michael Levy
119 posts
9th Ranked


Re: Don't trust user input 

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
 
Disabled Previous
 
Next Next
  Forum  DotNetNuke® Pro...  FAQ Module [Lea...  Don't trust user input
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN Photo Gallery
Complete Photo Gallery Management!
www.dnnPhotoGallery.com
R2i - Delivering Serious DNN Services & Solutions
Award Winning Design, Skin construction, Custom Modules and Consulting Services for the Enterprise organization. R2i is the DNN:Map module Project Lead and one of the largest DNN service providers with offices in New York City, Virginia and Baltimore.
www.bi4ce.com
"SalarO" Skinning Graphic Design Branding Services
SalarO develops packaged & custom skins for your DNN at prices you can afford. SalarO is also developing Module development, Hosting, Branding/Logo design as well as Content Transfer Services to complement the core skinning solutions.
www.salaro.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP