Cracking Drupal - security http://crackingdrupal.com/taxonomy/term/20/0 en Techniques in Attacking and Defending XML/Web Services http://crackingdrupal.com/blog/greggles/techniques-attacking-and-defending-xmlweb-services <p>Mamoon Yunus and Jason Macy gave this presentation with an overview of XML/Web services and how the usual security rules apply to this area.</p> <h3>Review of the problems with XML/Web services</h3> <p>Still have all the normal problems.</p> <ul> <li>Firewalls are not aware of the xml content</li> <li>Malware and viruses (or xss) can be included in the content depending on what context the xml data is used.</li> <li>WSDL exposes the schema and message structure</li> <li>Injection attacks are possible via the XML parameters</li> <li>Data replay is still possible</li> <li>Denial of service is still possible, especially with parameters</li> <li>Authentication methods: Basic auth, SSL auth, WS-Security Tokens</li> <li>Parameter injection can be used for SQL or filesystem exploits.</li> </ul> <h3>Gateways for security</h3> <p>If you have a web service you can use a gateway to help bolt-on protection after the fact. They can provide various forms of authentication, logging, and semantic forgery prevention.</p> <p>This seems like an interesting idea, but also somewhat flawed. My (admittedly naive) opinion is that the protection should really be included at the application layer.</p> <p>They then reviewed a bunch of different vulnerabilities and gave examples of how they could be solved with XML gateways.</p> <p>There's been a lot of discussion at the conference about how "we need to get more developers here" and I think part of the problem is that a lot of the presentations are not developer topics. The presentations cover how to exploit, how to buy a product to put in front of the vulnerabilities to prevent problems, how to use applications to pen-test, what the vulnerabilities are, what a security friendly process looks like, but relatively little about how to write secure code to protect against these vulnerabilities.</p> http://crackingdrupal.com/blog/greggles/techniques-attacking-and-defending-xmlweb-services#comments security web services xml Fri, 13 Nov 2009 21:33:42 +0000 greggles 46 at http://crackingdrupal.com Cloudy with a chance of zero day http://crackingdrupal.com/blog/greggles/cloudy-chance-zero-day <p>This was a presentation by Jon Rose and Tom Leavey of Trustwave. They started off with about 15 minutes worth of cloud background. The problems (and potential problems) they identified were:</p> <ul> <li>Vendor lock in may come up since the Amazon cloud is somewhat different from writing for Google's App Engine which is different from...</li> <li>Enterprise ready vs. experimental, meaning that most uses of the cloud right now are non-mission-critical.</li> <li>Forensics in the cloud are somewhat harder to perform since you can't necessarily get the log files.</li> <li>Compliance is more difficult because you can't do physical visits to the data center.</li> <li>Misuse is possible because you can not only use the cloud for good but can also fire up a malicious virtual machine.</li> </ul> <h3>They reviewed the Google Application Engine</h3> <p>After some discussion of how GAE works, they got into some possible attacks.</p> <ul> <li>You can post data and that counts against incoming bandwidth, even if the application doesn't accept post requests at that URL. So, using XSS to get all the browsers to a site to run a POST against an application can easily blow past a site's incoming bandwidth quota and take them offline.</li> <li>The task queue has a limit of 5 requests/second can be blown out with an attack.</li> <li>Create dozens of proxies on GAE as a way to hide who you are when doing an attack.</li> <li>You can create new versions of your application and switch between them, but using this means any visitor can choose which version of your application they want to run.</li> <li>GQL Injection - may be possible to do injection, but they couldn't. Seems like it's probably not possible.</li> </ul> http://crackingdrupal.com/blog/greggles/cloudy-chance-zero-day#comments cloud computing security Thu, 12 Nov 2009 20:57:12 +0000 greggles 41 at http://crackingdrupal.com Drupal Security presentation slides from BADCamp http://crackingdrupal.com/blog/ben-jeavons/drupal-security-presentation-slides-badcamp <p>At the Bay Area Drupal Camp yesterday I presented on Drupal Security for site administrators and beginners which covered some of the important ways you can protect your site from attacks through configuration of Drupal core. Attached are the slides from the presentation.</p> <table id="attachments" class="sticky-enabled"> <thead><tr><th>Attachment</th><th>Size</th> </tr></thead> <tbody> <tr class="odd"><td><a href="http://crackingdrupal.com/sites/crackingdrupal.com/files/drupal_security_badcamp09.pdf">drupal_security_badcamp09.pdf</a></td><td>465.01 KB</td> </tr> </tbody> </table> http://crackingdrupal.com/blog/ben-jeavons/drupal-security-presentation-slides-badcamp#comments Drupal security Sun, 18 Oct 2009 19:33:49 +0000 Ben Jeavons 36 at http://crackingdrupal.com Drupal Security webinar with Acquia roundup http://crackingdrupal.com/blog/greggles/drupal-security-webinar-acquia-roundup <p>This past Thursday several hundred folks joined me for a webinar about security in Drupal as part of the <a href="http://acquia.com/community/resources/webinars/">Acquia webinar</a> series.</p> <p>You can now download the <a href="http://crackingdrupal.com/sites/crackingdrupal.com/files/Acquia_Cracking_Drupal_Webinar.pdf">Security in Drupal introduction slides</a> which include the speaker's notes and watch the screencast itself:</p> <p><embed src="http://blip.tv/play/AYGmjEkC" type="application/x-shockwave-flash" width="480" height="330" allowscriptaccess="always" allowfullscreen="true"></embed></p> <p>I also wanted to answer some questions that were posed in Twitter and in the GoToWebinar chat room. I didn't get to answer all of them in the presentation, so, I'm going to try to answer them all here.</p> <h3>Would you consider something as common as RSS publishing as a potential method for people to steal content?</h3> <p>Not in general. Sure, it makes it easier to copy your content but a determined scraper will always get your data. Now, an rss feed can be an access bypass vulnerability if it doesn't respect Drupal core's node access mechanisms, I have seen that.</p> <h3>What do you tell a client who doesn't want to pay you for your time to perform security updates?</h3> <p>We try to insist on it at the contract stage that as long as they are a development or maintenance client we will do site security upgrades ASAP.</p> <h3>Lots of good information in this presentation. Will you share slides? The zero day attack slide could be really useful.</h3> <p>Yes. The <a href="http://crackingdrupal.com/sites/crackingdrupal.com/files/Acquia_Cracking_Drupal_Webinar.pdf">slides</a> are attached.</p> <h3>It seems like Wysiwyg editors open a lot of vulnerabilties. Are there any modules you feel are more or less vulnerable</h3> <p>WYSIWYG editors don't open the vulnerabilities - bad configuration of input formats does. It's true that many sites will install a WYSIWYG and open up their input formats inappropriately and that's the real problem.</p> <h3>Can you talk a little bit about how his firm performs a site security audit? How long does it take and what is the cost range?</h3> <p>We have some details on our <a href="http://growingventuresolutions.com/services/security-review-service-drupal-sites">security review service</a>. As far as pricing, we'd love to hear your feedback on what kind of price seems good. Please <a href="http://growingventuresolutions.com/contact">contact us</a> to let us know what you think.</p> <h3>In a preprocess function setting up our variables for our designer, do we need to sanitize content in $vars before passing to tpl?</h3> <p>This isn't a simple yes/no kind of question. The answer depends on a lot of factors. While it's not a complete answer either, the <a href="http://crackingdrupal.com/blog/greggles/drupal-text-filtering-decision-cheat-sheet">Text filtering cheat sheet for Drupal</a> is intended to make it easier for an educated developer to decide which function to use.</p> <h3>Forms input filtering is not recommended - that is the problem with Webform Report - why is maintainer unable to fix it?</h3> <p>This has more to do with them having the time/motivation/understanding and nothing to do with how technically feasible it is to fix the problem. It's actually another new service that we're offering is that we will take a module which has been abandoned for security reasons and fix it. If you'd be interested in sponsoring the work to fix that or any other module please let us know.</p> <h3>Can a lot of this security be built into a theme?? Will any of this be corrected in Drupal 7?</h3> <p>The theme layer is not an appropriate place for security protection. Themes can be switched quite easily, by admins and sometimes by end users, so if you put the protection in the theme then it's easy to mistakenly create a vulnerability.</p> <p>Security related code belongs at the module or core layer. Now, Drupal 7 does have a much better rendering system (<a href="http://paris2009.drupalcon.org/session/explore-glory-drupal-7s-improved-render-and-theming-systems">great presentation on render</a> by <a href="http://www.cyrve.com/">Moshe Weitzman</a>) which will hopefully make it easier for themers to not have to think text filtering.</p> <h3>I've read your book (good job, by the way) but it's not for beginners. Are you planning an seochecklist sort of module for security auditing drupal?</h3> <p>Well, I have to disagree ;) I think many parts of it are for beginners. But yes, as part of our security offering we do plan to create many new tools and enhancements to core that will be helpful to site builders.</p> <h3>What are some bad practices for theamers? Are there things that themers can do to make the site more secure?</h3> <p>This is not easy to answer. It's basically the fundamental question that the book answers. However, we do plan another webinar for the spring so perhaps that can be the focus.</p> <h3>Is that a FireFox addon that allows you to change your user agent? What is it called?</h3> <p>Yes, I use the <a href="https://addons.mozilla.org/en-US/firefox/addon/59">User Agent Switcher</a> by <a href="http://chrispederick.com/">Chris Pederick</a>.</p> <h3>Can t() be considered a substitute for check_plain()?</h3> <p>Yes, if you use the @ or % placeholders then t will automatically include check_plain style filtering as the text is substitutde.</p> <h3>How much scrubbing is necessary for FormAPI based forms? Do you risk XSS type attacks without checkplain, for example?</h3> <p>First, all forms should be Form API based (unless they post to an external site, which is very rare). Second, yes, if you use user modifiable text for labels or titles then you will need to do filtering. The exact nature of the filtering depends on a lot of factors</p> <h3>How can we do SSL or HTTPS with Drupal</h3> <p>I just blogged about this recently: <a href="http://crackingdrupal.com/blog/greggles/drupal-and-ssl-multiple-recipes-possible-solutions">Recipes for SSL / HTTPS in Drupal</a>.</p> <p>That's it!</p> http://crackingdrupal.com/blog/greggles/drupal-security-webinar-acquia-roundup#comments https Planet Drupal security ssl Mon, 12 Oct 2009 18:01:12 +0000 greggles 35 at http://crackingdrupal.com Drupal text filtering decision cheat sheet http://crackingdrupal.com/blog/greggles/drupal-text-filtering-decision-cheat-sheet <p>This flowchart is based on the one that <a href="http://heine.familiedeelstra.com/">Heine Deelstra</a> presented at Drupalcon Paris.</p> <p>I'm hopeful that the presentation will be helpful in eliminating <a href="http://crackingdrupal.com/blog/greggles/what-kinds-security-problems-exist-drupal">Drupal's most common security issue</a>!</p> <p><a href="http://crackingdrupal.com/sites/crackingdrupal.com/files/filtering_text_0.pdf"><img src="http://crackingdrupal.com/sites/crackingdrupal.com/files/filtering_text_thumbnail.png" /></a></p> <table id="attachments" class="sticky-enabled"> <thead><tr><th>Attachment</th><th>Size</th> </tr></thead> <tbody> <tr class="odd"><td><a href="http://crackingdrupal.com/sites/crackingdrupal.com/files/filtering_text_0.pdf">filtering_text.pdf</a></td><td>55.82 KB</td> </tr> </tbody> </table> http://crackingdrupal.com/blog/greggles/drupal-text-filtering-decision-cheat-sheet#comments cheat sheet Drupal security XSS Thu, 08 Oct 2009 16:39:54 +0000 greggles 34 at http://crackingdrupal.com