06 January 2009

Business logic

Posts relating to the category tag "business logic" are listed below.

06 January 2009

Application Data Flows by Email

It is very common to find web applications where part of the business process, not just acknowledgements, is undertaken using electronic mail. These processes need to be designed securely and tested as well.

I've mentioned previously in Keep The Emails Coming about testing email alerts used for errors, problems and other unusual conditions, but it's common for email also to be used as a short-cut for developing some parts of business processing.

A recent project I was working on included an link to unsubscribe from marketing emails. Clicking on the link gave a slightly sparse single phrase confirmation—not particularly usable and it didn't validate me in any other way or notify me of the change by anything other than the screen message, but it was probably okay for the type of system.

Partial screen capture showing the words 'You have been successfully unsubscribed' that appeared after clicking on an unsubscribe link

However, within a few minutes I had received another email - an auto-responder:

Partial screen caputure of the email message with nthe subject line 'Your message to Admins requires moderator approval', from 'admins-bounes@...' and stating: Your mail to Admins with the subject A contact has unsubscribed from your list ****** Is being held until the list moderator can review it for approval. The reason it is being held:     Post by non-member to a members-only list   Either the message will get posted to the list, or you will receive notification of the moderator's decision.  If you would like to cancel this posting, please visit the following URL: http://******/mailman/confirm/admins_******/...

Very interesting. What does this tell us?

  • There is an administration mailing list
  • The unsubscribe process sent a message to the administration list with my email address as the sender
  • Posting to the list is restricted to certain people, and thus could be a way to identify administrator's email addresses
  • The list may be using Mailman, the GNU Mailing List Manager
  • The list administration address begins with /mailman/confirm/admins_******/

And, I suppose the implication is my email address has not been removed from the mailing list yet.

If this were a web application penetration test, it might be that some of the mailing list administrative usernames and perhaps passwords are the same as for the web application. Or, content of messages in the list contains useful information to help access the web application. The email responder is sending too much information, and actually this message shouldn't be being sent to a subscriber at all, and the information leakage then stems from using the subscriber's email address as the sender.

So, remember a web application's security is only as good as its weakest link. The security architecture needs to address the whole business process, not just the web page parts.

Posted on: 06 January 2009 at 12:30 hrs

Comments Comments (0) | Permalink | Send Send 

19 December 2008

New OWASP Testing Guide

Version 3 of the Open Web Application Security Project (OWASP) Testing Guide has been released after a 6-month period of addition, enhancement and review.

The OWASP Testing Guide is an ideal reference for both developers and testers—version 2 was fantastic, and this new version is even better. The testing framework now covers 66 controls and, like in the previous version, each control has a brief summary and is described in detail followed by black box (no additional knowledge) and grey/gray box (partial knowledge) testing methods and examples where appropriate.

Partial view of a page from the OWASP Testing Guide V3.0 showing 'Brief summary', 'Description of issue' and 'Black box testing and examples' headings for a control.

The controls and testing methods are fully referenced to provide additional guidance and explanation.

Partial view of a page from the OWASP Testing Guide V3.0 showing 'References - whitepapers' and 'References - tools' headings for a control.

The controls are grouped into ten categories, including new separate categories "Authorization" and "Configuration Management". I'm especially pleased to see the latter broken out on its own, since even a perfectly coded application can have vulnerabilities introduced during deployment and changes to the application.

The OWASP Testing Guide now also includes a "best practice" penetration testing framework and a "low level" penetration testing guide that describes techniques for testing most common web application and web service security issues. More information is available on the Testing Project pages.

Posted on: 19 December 2008 at 09:43 hrs

Comments Comments (0) | Permalink | Send Send 

05 December 2008

Information Architecture, Trust and Web Application Security

Two articles in particular caught my attention this week relating to designers and developers engaging clients in the development process. Both are worth a read and, I think, consideration in your own web projects.

The first was a great outline of Educating the Client on Information Architecture on A List Apart. The discussion seemed to focus a little too much on static content (data) and probably needs to address data flows and where security boundaries occur in the information architecture. But by using the suggested approach, it makes consideration of security controls much easier.

Secondly, the business case for web application security was discussed on Securosis.com - this was Part 2 of a series of posts about building a web application security program - Part 1 which I had missed was an introduction. The post lists six typical drivers used to justify web application security investments - but I think "User Trust" should be an additional one. Increased trust helps overcome perceptions of risk and insecurity and leads to a greater likelihood of users undertaking, completing and repeating web site processes.

If you are interested in the effect of trust, the multidimensional nature of trust is discussed in detail in McKnight, Choudhury and Kacmar's papers on Developing and Validating Trust Measures for e-Commerce: An Integrative Typology, Information Systems Research, Vol 13, No 3, September 2002, pp 334–359 and Distrust and Trust in B2C E-Commerce: Do They Differ?, Proceedings of the 8th International Conference on Electronic Commerce, 2006, pp 482-491. The reference lists included in these papers provide additional and alternative views on trust.

Posted on: 05 December 2008 at 06:38 hrs

Comments Comments (0) | Permalink | Send Send 

18 November 2008

Craft Unsubscribe Functions Carefully

Functions to unsubscribe, be removed, cancel or opt out from newsletters, mailings and email alerts can be used to undermine web site security.

Many techniques are used to unsubscribe including:

  • Email message to a particular address, possibly with a keyword like "unsubscribe" in the subject or body
  • One click opt out unsubscribe hyperlinks
  • Hyperlink to a form with additional validation
  • Log into an account management area to make a change to communication preferences
  • Pre-paid response postcard
  • Telephone call to a helpdesk.

Some examples from email alerts are shown below:

Partial screen capture of an example unsubscribe link in a rich text email message - the text says 'this is an automated operation' but is not explained further Partial screen capture of another example unsubscribe link in a rich text email message - there is also a link to change preferences, as well as a unsubscribe from this correspondence link Partial screen capture of another example unsubscribe link in a rich text email message - beside the unsubscribe hyperlink is a suggestion to subscribe to the RSS feed instead Partial screen capture of another example unsubscribe link in a text email message - the long URL has wrapped onto two lines

It is important to make it simple for people to opt-out of such services, but there are a number of problems that can get built into such systems:

  • Hyperlinks that only pass an email address as a parameter can be used to find whether particular addresses (such as known individuals) are registered/subscribers - this could be used for user name enumeration if there is a separate log in area and the user names are email addresses
  • Hyperlinks with only predictable identifiers can be guessed
  • Systems could be used maliciously to unsubscribe other people's accounts
  • Hyperlink options could automatically log people in to their accounts - this should not occur since the links could be accidentally forwarded on to other people
  • Any validation (authentication) systems must be at least as secure as other functions such as log in to access account details, so that the unsubscribe facility cannot be used to obtain log in credentials (e.g. limit the number of attempts possible, log failed attempts, lock accounts, add delays to failed attempts, etc)
  • Unsubscribe by hyperlink or email must have the same level of checks (not more or less) as non-electronic means (telephone call, written, etc) otherwise the weakest method could be used by a malicious person
  • Text-only versions either not including or not rendering the unsubscribe hyperlinks correctly (e.g. wrapping the link), so that only rich-text email users can see and use the links
  • Anything sent by email is normally not considered secure
  • Do not give away any other sensitive information on either successful, or unsuccessful completion (e.g. "Thank you Margot Dyson, we will send a letter to your address in Hastings to confirm this request")
  • Clearly distinguish between opting out of particular correspondence, types of contact (e.g. direct marketing), all correspondence and closing accounts altogether - you may have to contact the person for some other valid reason.

In all cases, the completion of unsubscribing should be accompanied by a message to the person informing them of the change of status (by email or some other method). Where this hasn't closed their account, and they can log on to undertake other processes, the event should also be recorded for them to see in a list of recent actions.

Posted on: 18 November 2008 at 12:25 hrs

Comments Comments (0) | Permalink | Send Send 

30 September 2008

Availability is a Usability Issue

If a web site is unavailable, this will affect everyone who tries to use it. Availability is a usability issue.

A web site being "down" can have the same effect as if someone cannot do what they want, it takes them too long, it leaves them frustrated or it is prone to the introduction of errors.

There are sometimes good reasons for downtime. The servers may be having software updates applied (patching). Depending on the requirements, some organisations may close a web application down during backing up, during a data update or during a change to the application.

Unavailability may also be due to excessive server loading, network connectivity problems, equipment failure or due to an attack by malicious users. If you have to take a site down for repair, your users are being denied use of the service.

Where possible try to minimise planned (scheduled) downtime and monitor the uptime semi-continuously (checking for text on some web pages or important transactions every 5 minutes, from more than one external location). For planned outages, I recommend you inform users well in advance and provide a meaningful message screen - not just a default error page.

Posted on: 30 September 2008 at 11:45 hrs

Comments Comments (0) | Permalink | Send Send 

09 September 2008

Know Your Form Data

Developers often build data entry forms that don't match with the reality of the information they are trying to collect. This can mean the forms are unusable.

I am surprised about how reluctant most specialist usability companies, at least in the UK, are to considering the security implications during usability testing. Reactions I've come across range from "usability has nothing to do with security" to "the client will deal with that". I think they are missing an opportunity.

Although we hear a lot about confidentiality, information security includes the principles of availability and integrity:

  • Availability - Maintaining systems, resources and data so they are accessible when required and are functioning correctly
  • Integrity - Ensuring data is valid, complete and cannot be modified or deleted without authorisation

Here's an example "change address" form where the integrity checks are not correct and therefore denying use of the service to a customer:

Partial screen capture of an address entry form - the house number, flat number and street names have been left blank and the form submitted to show an error message 'please enter a valid address'

The form belongs to a very customer focused organisation in a highly regulated business sector. Therefore, I suspect that the web site has been through extensive usability testing. But it is not possible to provide an address that doesn't have a house number, flat number or street name. Strange, since there are many valid Royal Mail listed addresses like this, yet this web site has been built to specifically exclude them.

Well, I don't think the project team set out with this intent, but that's what happened. There is no way to change your address, except to phone the call centre. Of course, it might be that the database behind the scenes has some (incorrect) constraints on what it thinks constitutes an address and the developers have coded the web site to match. What makes me suspect this, is that the drop down list of county/region names includes truncated county names, and even entities that are not counties, regions or metropolitan areas. Also, the displayed text is the same as the values submitted by the form. However, that's not the right way to do it.

HTML source code of the drop down list showing county values and names like 'Stafford' and 'Tynewear'

Some of these are not counties, and if the address was on Skye, would you select 'Skye' or 'Highland' (region)?

Even if the back-end system doesn't allow addresses without street names etc, the web site should accept valid addresses and then put the change into a pending state, for subsequent checking and update of the main system. It must be possible somehow, since you can do it by telephone.

The Royal Mail has an overview of what constitutes a correct postal address in the United Kingdom, but it always pays to check the original source which tells a slightly different story: Why, What and How - A Guide to using the PAF® (PDF):

There may be no Thoroughfare information for an address. This usually occurs in rural areas, where the Locality information identifies the location...

This 204-page document also explains how long each address line could be, and everything else about the Royal Mail's Postcode Address File (PAF) products including character conversions. BitBoost Systems maintain a useful International Mailing Address Formats web page but always check with the original sources - don't rely on anyone else's interpretation.

Recommendations:

  • Understand the properties of all your data
  • Don't enforce internal constraints and methods on remote users
  • Don't make your web systems more complex than your other methods of communication (such as telephone)
  • Make it easy for web site user to get it right

And, include consideration of security issues during usability and user acceptance testing.

Posted on: 09 September 2008 at 10:55 hrs

Comments Comments (0) | Permalink | Send Send 

Business logic : Web Security, Usability and Design
http://www.clerkendweller.com/business-logic

Page http://www.clerkendweller.com/business-logic
Requested by 38.103.63.60 on Wednesday, 7 January 2009 at 11:32 hrs (London date/time)

Terms of use http://www.clerkendweller.com/page/terms
Privacy statement http://www.clerkendweller.com/page/privacy
© 2008-2009 clerkendweller.com