DNN Blog

Jun 26

Posted by: cathal connolly
Thursday, June 26, 2008 1:18:00 AM  RssIcon

Back in the early days of DotNetNuke skinning, skin uploads were limited to host users. This made logical sense as the creation of a portal is a host only ability, so it was expected that in most cases hosts would select a skin for the new portal or else upload a selection of skins that the portal administrator could choose from. A number of users expressed an interest in allowing their portal administrators the ability to upload additional skins without having to contact the host user, so the ability to enable administrator skin uploads was added. As this was seen as being an uncommon request, it was added as a host level setting that defaulted to "Off" meaning that a host user would have to explicitly enable this option.

The problem with this setting is that skins aren't just plain html and images, they can contain code that get's executed server-side. Whilst this can have a number of innocent uses, it's also possible to upload malicious code that would allow a portal administrator the ability to gain additional rights or even to access other portals. Arguably skin’s can contain all the functionality of a module and module uploads have always been limited to Host users.

A good comparison would be in Windows, if a local administrator was able to escalate their rights to Domain Administrator. Domain administrators can override certain settings for security reasons, as well as performing actions on the users machine that they can't perform themselves, and in addition any changes the users make are localised to their own area (in this example the machine and not the domain). Obviously having any method that would allow a Windows Administrator the ability to gain access to other machines in the domain, or Domain Administrator rights, would be a weak security model. From this perspective, it’s obvious that allowing portal administrators skin uploads is not a wise decision from a security perspective, so we’re going to be removing the ability to grant this in 5.0.

We've considered a number of approaches to this problem, including trying to reliably filter out all server-side code or else creating a secure "sandbox" in which skins operate. However, both of these are difficult to ensure 100% effectiveness (as well as being time consuming), so in DotNetNuke 5.0, we're going to be removing the ability of the host user to enable portal administrator skin uploads. It's always a pity when a legitimate security issue necessitates the removal of a useful function, but in our view this is too dangerous an option to leave in there (in addition it's been cited as an issue for at least one independent security audit).

Tags:
Categories:

32 comment(s) so far...


Re: Removing the Administrator ability to upload skins

I think so, too

By sunwangji on   Thursday, June 26, 2008 8:58:16 AM

Re: Removing the Administrator ability to upload skins

Hi Cathal

Thanks for the wonderful topic. However, I think 5.0 is going to pose some serious challenges for our intitiative based on DNN called iFlaker (www.iflaker.com). We have opened DNN to work pretty much like start up page sites such as Pageflakes and allow administrators to upload their skins. Now that you will be doing away with it, I am not sure if it will be worth our while to stay with the latest DNN.

Also reagrding the uploading of modules, We would like to be able to upload modules just for a specific portal or certail group of portals. This would help in a case where someone buys a module for their portal only not for everyone to benefit from it.

Nonetheless, I understand your point of view, but for an initiative like iFlaker I hope we can find a better way.


G

By gabriel@iflaker.com on   Thursday, June 26, 2008 9:27:26 AM

Re: Removing the Administrator ability to upload skins

@Gabriel,
I fully expect that this will not be to some people's liking, and I also expect to see 3rd party modules created that allow portal admins to upload skins (or even modules), but the safety of the framework is paramount here which is why we made this difficult decision.

As for your module question, have you checked out the ability to set a module as premium? This allows the host user to decide which portal(s) get access to any premium modules.

By cathal on   Thursday, June 26, 2008 9:32:53 AM

Re: Removing the Administrator ability to upload skins

Thanks, we will also look into building that module for uploading skins and module by administrators.

I will also play around with the premium module setting.

I've got a question and I am not sure if this is the right place to ask. As you might have seen how www.iflaker.com works. Let say someone went into iflaker and customised it and then signed up and call their portal 'gnkuna' which then makes their child portal http://www.iflaker.com/gnkuna. Now, they decide to personalise their URL to http://www.gnkuna.com. Is it possible to link http://www.gnkuna.com to that child portal and use the DNN billing in iflaker. I am asking this because although working on iFlaker is free for the end user, one of our five revenue generating models would be to bill users as soon as they want to personalise their URLs and host with us.


G

By gabriel@iflaker.com on   Thursday, June 26, 2008 10:33:49 AM

Re: Removing the Administrator ability to upload skins

@Gabriel, could you please ask the question in the forums, I'd prefer to not get too far off topic.

By cathal on   Thursday, June 26, 2008 12:06:48 PM

Re: Removing the Administrator ability to upload skins

I think this is a backward step. Going forward DNN should be providing the framework for super users to provide granular access to both Admin and Host functions to other user roles.
DNN should provide the security to ensure that the permissions a super user doles out aren't usurped.
As to being a security issue we currently have a default setting that prevents an Administrator from uploading skins so unless an Administrator can change this there isn't a security problem from the Administrator vector.
I do agree that a module that will allow the uploading of 'non active' skins is a great idea.
Antony

By WEBPC on   Thursday, June 26, 2008 3:20:48 PM

Re: Removing the Administrator ability to upload skins

@Antony, as part of 5.0, you will be able to provide access to Admin functions to non-admin users i.e. there is granular permissions for these functions. This is possible as these functions have known capabilities ie. the sitelog runs certain procs etc. The problem with skins is that they can contain arbitrary functionality i.e. code to escalate a user to host level access, that's why skins are more dangerous than Admin functions.

By cathal on   Thursday, June 26, 2008 3:25:01 PM

Re: Removing the Administrator ability to upload skins

Suggestion: What about BOTH?
In the Host Admin, give the host the ability to Grant/Deny that privilege with a check mark for each site in the portal. Some Site Administrators have the skill and knowledge to perform such a change and some just do not or should not. By controlling that ability via permissions granted by the Host would be a great solution/compromise.

By bbuell on   Thursday, June 26, 2008 4:35:07 PM

Re: Removing the Administrator ability to upload skins

@bbuell, the aim of this change is to introduce a logical seperation between admin and host -the only 100% sure way to do this is to ensure that no admin can upload arbitrary server side executable code, hence the change.

I appreciate that it appears that giving the option to enable skin upload as a host setting seems a valid compomise, but it violates this seperation, and the mere existance of the option, whether or not used, would mean dotnetnuke not being an allowable choice in certain areas/industries and would definately mean a number of independant security audit's resulting in failure.

By cathal on   Thursday, June 26, 2008 4:38:29 PM

Re: Removing the Administrator ability to upload skins

I would appreciate also the solution that host can grant skin upload to trusted admins. In a corporate environment with lots of branch offices otherwise it would mean a great loss of flexibility. E.g. if a subsidiary wants to promote some marketing with a microsite: you have to go to the host and ask him very polite to upload a skin…
There are environments with more security issues and some with more trusted users. So please let the decision by the host what he grants.

By hpeller on   Thursday, June 26, 2008 5:22:37 PM

Re: Removing the Administrator ability to upload skins

@hpeller : sorry, but that's not possible - to meet the security requirements we cannot allow this as a core option. This was a difficult decision, but is based on a need to ensure the safety of all, rather than support the needs of a few.

By cathal on   Thursday, June 26, 2008 5:24:32 PM

Re: Removing the Administrator ability to upload skins

Keep in mind that a user with upload privileges could inadvertently upload a third-party skin with a malicious payload – merely trusting the uploading user isn’t enough. This has always been a feature fraught with risk. I’m happy to see it go.

I suspect that the core team’s main motivation here was to move this sort of risky vulnerability out of the framework and let them focus on more important requirements. This slack will certainly be taken up by third party modules, so any host who wants to accept this risk will have an avenue with which to do so. Everyone wins?

By BrandonHaynes on   Thursday, June 26, 2008 10:12:18 PM

Re: Removing the Administrator ability to upload skins

We are using DotNetNuke only on secure intranet corporate environment. Users don't have access/rights to the operating system, command promptm usb-ports or the world wide web.
So, what are the risks? I agree with the post from bbuell:
"So controlling that ability via permissions granted by the Host would be a great solution/compromise".

By meffj00 on   Thursday, June 26, 2008 10:12:26 PM

Re: Removing the Administrator ability to upload skins

@cathal We currently allow Admin's and other users to upload files into DNN. The host can change the list of allowable files to include html, ascx or any other extension for that matter. What is the difference in allowing this but not allowing the host to delegate the responsibility for uploading skins to administrators?
Antony

By WEBPC on   Thursday, June 26, 2008 10:12:00 PM

Re: Removing the Administrator ability to upload skins

You know, in teaching my class this week I thought of a way you could really hack a website through the skin uploads. Talk about timing, I guess I don't have to bring this up as a security issue for Cathal :)

By christoc on   Thursday, June 26, 2008 10:11:39 PM

Re: Removing the Administrator ability to upload skins

@Antony, there is effectively no difference in allowing your users to upload skins or upload ascx files directly, either can take over complete control of a portal in about 2 lines of code. I would recommend that you never grant user rights to ascx/aspx file uploads if you can avoid it.

Realistically however, a user is much more likely to upload a skin downloaded from the internet without ever considering that it may allow their portal to be hacked. I don't think users would download random ascx/aspx files from the net and upload them to their portal.

By cathal on   Thursday, June 26, 2008 10:25:49 PM

Re: Removing the Administrator ability to upload skins

@meffj00 , there are a lot of risks, not least that an admin user can ecalates their permissions to host or access other portals data or the web.config file to read database usernames/passwords.

By cathal on   Thursday, June 26, 2008 10:28:16 PM

Re: Removing the Administrator ability to upload skins

If a host explicitly enables a user to upload potentially dangerous payload (ie. executables, aspx, ascx, etc) then they are assuming full responsibility for that risk. However, if the framework enables (in fact encourages) a host to grant seemingly innocent functionality to a another user that could compromise the platform, that is a flaw in the platform. If a host gives another user the capability (by enabling skin upload) to make themselves a host user (which is the kind of risk we are talking about), then they can already do that by making them a Super User. If that is not the desired functionality, than you are agreeing that this is not a good "feature"...

This is simply a case where the best rule is to safeguard the platform and enable the extensions market to provide this functionality to those that desire it and are willing to accept that risk (which is perfectly valid in some scenarios). The number of acceptable security breaches due to this this "feature" in the platform itself should be -0-.

The reality is that there is no way to delegate this access to a user and systematically protect the platform from abuse at the same time (we'd have to write our own AV software to even come close). So if it is an explicit decision to weaken the security of the platform (for your specific use case), then it should also be an explicit decision to introduce the features that make that possible (ie. by adding the file extensions to your safe uploads, or adding a module which circumvents these safeguards).

We cannot guarantee that people choose the most secure options (they will vary according to your use case). But we must do everything we can to ensure that nobody gets themselves in trouble unintentionally.

Breaking administration modules into the realm of the configurable (as we are with 5.0) is going to make for a very exciting new generation of module development. It will be exciting to see how that takes shape.

By mrswoop on   Friday, June 27, 2008 12:10:12 AM

Re: Removing the Administrator ability to upload skins

@Cathal I agree with you about never allowing the uploading of ascx/aspx files what I was intending with the example is that on one hand we are looking at 'physically' preventing the uploading of skins by a user authorised by the person who is in total control of the install but leaving probably a larger hole by allowing the host to allow the uploading of any type of file. From a security standpoint I have been taught you don't rely on what you believe a reasonable person would do. its the 'unreasonable' people that cause the problems. If there is a security risk then you use a physical control.
Another point to consider is of all the DNN installs out there, how many have host users who are experienced with web security and would understand the issues with the allowing of active files? In the event of an Admin user not being able to upload skins the inexperienced are going to provide more users host rights so work they see as necessary can be done by others.
Those installs that need to meet specified security standards and audits are going to be configured by a professional and the more secure ones be modified to a particular purpose.
I still think allowing the 'host' user decide on the security level they want to implement and providing the tools to provide a secure configuration is still the best way. Just the same that a Domain Administrator in windows decides who is responsible enough to be given rights that could compromise a system/network.
Though, for those who might not realize the implications of allowing skin uploads or widening the filter of files that can be uploaded a nice big RED warning message would be good.
I still agree that it would be great for some form of module that allowed the uploading of skins/containers comprising only of straight HTML, client side JS, CSS, image and XML config files which are then parsed by the system. A while back I obtained some pricing for a project that would fulfill this, the time quoted were for a couple of days work which doesn't appear to be a lot.
Apologies for keeping on about this but as you can probably tell I do feel pretty strongly about allowing the host deciding the level of security of their install.
Antony

By WEBPC on   Friday, June 27, 2008 12:47:44 AM

Re: Removing the Administrator ability to upload skins

I've got another suggestion, I am not too sure if this is feasible or not. The default skins that ship with DNN dont have any code on the ascx or even the code-behind (ie ascx.vb). For public skin upload, won't it be possible to check (like craping the ascx) if there is embedded code or code-behind and then reject the skin if there is some kind of code. A host account can of course be able to uploud skins with code and if an administrator needs to uplaod skin with code they will have to go through the hoster first.

Since you mention DNN 5.0 on this blog and I also heard that it is on beta, can you lead me to where I can get a copy so I can start playing with it? At iFlaker (www.iflaker.com), we would like to keep up with the latest DNN.


G

By gabriel@iflaker.com on   Friday, June 27, 2008 11:28:33 AM

Re: Removing the Administrator ability to upload skins

@Gabriel, we rejected the notion of black-list filtering for 5.0, as it's difficult to ensure 100% effectiveness i.e. someone can find a way to avoid the filtering checks - it's something we may consider in the future but not for 5.0.

As for 5.0, it's not in public beta. Due to the large amount of change it's gone through a number of internal releases, and the last beta was made available to members of the subscription program. I believe a release was also made available to vendors who sell components on marketplace.dotnetnuke.com . I'm not 100% sure but I believe the plan is to let members of the sponsorship program have access to the next beta (which hopefully is getting closer to release quality). If you're a member of any of these area's you should get early access, otherwise you'll have to wait until the general public release.

By cathal on   Friday, June 27, 2008 11:34:20 AM

Re: Removing the Administrator ability to upload skins

I think it is a good step for security as well as consistency to disallow admins the right to upload a skins.
I predict that before 5.0 comes out, some module developer will provide us with a nifty module that allows admins (and other users) to upload skins.

By schotman on   Friday, June 27, 2008 1:51:12 PM

Re: Removing the Administrator ability to upload skins

@mrswoop
In the end it should be consistent. The way DNN wants to go is do everything that can be done to make sure people don't get into trouble unintentionally. I agree with the intent just not the implementation in this case.
Is there really a difference in providing an option for a host user to allow an administrator to upload skins or allowing the same host user to change the types of files that can be uploaded? Both appear to offer the same level of 'encouragement'. Both open the framework up to security issues.
'We' (used to encompass the community of DNN professionals) say one of the great things about DNN is it's flexibility and extensibility we encourage the use of third party modules which affects the security of the install.
In the right hands the options and security implications will be weighed and a decision made. In the less experienced hands the implications won't be known. Prevent the option but let a third party module provide the option abdicates the responsibility.
DNN isn't a simple single function application it's more of an ecosystem and as such there will be areas that are more dangerous than others. Educate rather then prevent. Place dire warning messages on the Host Settings and Module Install pages explaining the possible consequences of changing an option or installing a module.
... OK where is that next cup of coffee!
Antony

By WEBPC on   Friday, June 27, 2008 2:11:08 PM

Re: Removing the Administrator ability to upload skins

@Anthony
Given the fact that DNN is indeed an ecosystem, and the fact that there are already a large number of modules in our ecosystem that should be labeled "dangerous" (e.g. modules that allow for direct access into the DNN database), it is even more important that its backbone is strong and secure.
Peter

By schotman on   Friday, June 27, 2008 2:24:20 PM

Re: Removing the Administrator ability to upload skins

I am glad this decision has been made and any change that makes the core more secure for the masses is a good change. The good news is that because of DNN extensibility, for sites that rely on admin having the ability to upload skins this is not a big showstopper. As it has been pointed out there will probably be multiple 3rd party application that will be available to allow this functionality, or a site owner might decide to right there own module. To me that says a lot about DNN and just how flexible it is, while at the same time we can make the core as secure as possible when these type of security risk are brought to our attention.

Instead of looking at this as a bad thing, for some it could the the possibility of creating a "killer DNN module". Plus, it will actually give DNN users more options on how this is handled, because they will have multiple 3rd party modules to choose from, and they can choose the ones that best fit there needs.

By smehaffie on   Friday, June 27, 2008 7:16:59 PM

Re: Removing the Administrator ability to upload skins

I think this is a good move. Skins are too powerful. Perhaps someday skins can be further abstracted to the point that it can become possible to give some (even much) access to css and layout of panes and controls to administrators. But right now skins go too close to the core to give this kind of access to portal admins. There's too much to know to expect admins to be able to make good choices about third-party skins, or to roll their own. But it doesn't have to stay this way forever.

By pmichael on   Sunday, June 29, 2008 9:38:55 PM

Re: Removing the Administrator ability to upload skins

Wow. I certainly hope a free module is made. It seems a shame to make a change to "force" the DNN community to have to buy something that they have had for free for such a long time. While I agree with both sides of the argument (aweful, I know), I think it would be a wise decision for someone in the core team or the community to write an admin module for this purpose, to be released with DNN 5.0 that can be installed, but is not installed by default.

By hismightiness on   Thursday, July 03, 2008 7:52:30 PM

Re: Removing the Administrator ability to upload skins

@hismightiness , this is purely a security move, there is no intent to "force" anyone to buy anything. i'm hoping someone will step up and create this and not see it as an opportunity to profit.

By cathal on   Thursday, July 03, 2008 7:54:51 PM

Re: Removing the Administrator ability to upload skins

What's going to happen if you upgrade an installation where all the skins are admin-uploaded? Are they going to break?

By vab3 on   Monday, July 21, 2008 3:44:39 PM

Re: Removing the Administrator ability to upload skins

@vab3, no, any existing skins will be fine, they've already been uploaded and processed.

By cathal on   Monday, July 21, 2008 3:44:52 PM
Gravatar

Re: Removing the Administrator ability to upload skins

Ad it isn't possible to have
\Portals\0\Skins|SkinName
I must to install it on the portal directory?
rmartin

By rmartin77 on   Wednesday, April 29, 2009 3:23:58 PM
Gravatar

Re: Removing the Administrator ability to upload skins

@rmartin77, if you mean is it possible to upload to portals/[someportalid], then the answer is yes, just log in as a host,browse to that portal, and use the skin upload under the admin menu.

By cathal connolly on   Wednesday, April 29, 2009 3:25:32 PM
Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.