01 February 2012

Technical

Posts relating to the category tag "technical" are listed below.

01 February 2012

Web Application Exposed Surface

The exposed surface of an application is often called its "attack surface" or "defensive perimeter". I prefer "exposed surface" since the term is a little less judgemental and I think better implies why we need to be careful about it.

Remember that many security weaknesses come about due to unexpected functionality existing, as well as implementation and design flaws. The number of weaknesses is generally proportional to complexity, often measured as lines of code, or in the context of this discussion, this is often proportional to the amount of exposed surface. The exposed surface of a web application would be all the addresses (URLs), methods (e.g. POST, GET, HEAD) and parameters (form, query string, URL path, cookie and other headers) which the application responds to. Quite often this normally means every possible path and combination of parameters you can throw at it, even if the results is just a "not found" error message.

I was reminded to write about this topic, after reading Essential Attack Surface Management recently on Jim Bird's Building Real Software blog. I like his suggested approach of, well at least making a start, even if it is to focus only on the higher risk areas. Things like search engine friendly paths, dynamic URLs and URL rewriting will cause difficulties, but these are not insurmountable, especially if the site's path naming system can be considered, analysed and defined early in the development process. You might also want to focus on the authenticated parts of the application first.

If you can reduce the exposed surface, or even better limit it to only the necessary entry points, this is a huge step forward in defending your application. Your web application will be a combination of the necessary functionality for your business processes, combined with extra functionality (intended or otherwise), but it also needs to be able to handle other types of request gracefully (e.g. site icon, robots.txt file, missing page tests).

Venn diagram showing how authorised business functionality is a subset of the actual available functionality. There are also some other aspects that are necessary to handle gracefully.

The types of things which are commonly exposed, but should not be are:

  • Templates, used by other scripts
  • Included code, such as modules and libraries, never meant to be an entry point
  • Entry points meant for users with a different role or permissions (e.g. system initiated web services, customer-only content)
  • Unused, but included, functionality.

The exposed surface might also include the following things, but should really never exist in web-accessible locations:

  • Administrative interfaces
  • Logs
  • Temporary files
  • Configuration files such as encryption keys (yes really), and database connection strings
  • Backups
  • Default installation files, including help documentation
  • Old and archived scripts, test versions of a site, and other unused content.

Some entry points may only be meant for different groups of authenticated users, although there may be some overlap with unauthenticated public users. Every application will be different, but the following attempt to illustrate this for a public website with some functionality used exclusively by authenticated customers.

Venn diagram showing how public unauthenticated users should have access to a more reduced exposed surface Venn diagram showing how authenticated customers should have access to a different exposed surface

There are choices on where you enforce limitations on the inbound exposed surface. Some typical places are:

  • Network firewall
  • Traffic management device
  • Web application firewall (WAF), guard or other type of filter
  • HTTP proxy server
  • Web server
  • Application code.

No one of these is the best answer, and in many cases it is better to use a combination of more than one. For example on a web-based content management system, you might use a firewall to limit access from only known office IP addresses, use a web application firewall to limit requests to only well-formed HTTP requests and for known URLs and parameters, use the web server or proxy server to enforce the use of TLS, and let the application enforce the parameter type and range checks, before any business layer authorisation checks and input data validation occurs. The decisions might be different here if requests from internal users do not pass through all the same network devices.

You might even enforce the same restriction in more than one place. For example, you may only open port 443 through a network firewall, as well as having the web server listening solely on port 443, and also the application checking TLS is in use and setting the Secure flag on the session cookie.

But do remember, your web applications will probably also receive requests for entry point URLs that are not on your list, and which are not necessarily malicious, you may have forgotten to take into account, or include unexpected extra or missing parameters. You may want to ensure the web application responds in the correct manner for your own context and user base. Just blocking everything else may not be the correct option.

If you are in a situation of being unable to determine the exposed surface, there are approaches to use application profiling to create a good estimate. At its simplest this may be undertaking a web site crawl, but there has been some work in the area of using web application firewalls to build up a model of the site from actual usage. There is some good information on using ModSecurity for this, and I will try to summarise the information sources in a later post.

Another approach is to fingerprint the page content and monitor for changes such as defacement and cross-site scripting injection. Again, I will look out some references I have for this.

Posted on: 01 February 2012 at 12:31 hrs

Comments Comments (0) | Permalink | Send Send | Post to Twitter

06 January 2012

State of Software Security Report Volume 4

Veracode has previously published significant data about software security in volumes 1, 2 and 3 of their State of Software Security Report.

Cover page from Volume 4 of Veracode's State of Software Security Report - The Intractable Problem of Insecure Software

In Volume 4 of State of Software Security Report additional analysis has been possible due to the larger data set available. In this volume emphasis is given to the analysis of the (primarily US?) governmental sector, as well as more data on the effect of developer training and education on software security. On this Veracode report that a "high level of application security knowledge also delivered higher security quality applications". That's encouraging since developer training is one of the first areas where effort should be expended in creating a secure software development lifecycle programme.

On of the other interesting conclusions was the potential fast turnaround for remediation and re-testing to solve problems suggesting that "development agility and application security are not mutually exclusive".

Cross-site scripting continues to be the most prevalent vulnerability overall — there was an interesting discussion last week about what this means in terms of business impact on the Web Application Security - From the Start blog.

Volume 4 also includes some initial results on static code analysis of Android applications. If you are developing mobile applications, do read the OWASP Mobile Security Project's Top 10 Mobile Controls and Design Principles.

Posted on: 06 January 2012 at 21:17 hrs

Comments Comments (0) | Permalink | Send Send | Post to Twitter

03 January 2012

AppSec EU 2012 To Be Held in Athens

Happy new year. Planning your diary already? Looking for the best European conference for information about application security?

Photograph of a public display board beneath a sign saying 'Information' - the web browser on screen is displaying a Firefox error message because it cannot connect to the requested information resource address

Europe's premier application security conference, AppSec EU, is being held in Athens, Greece, from 10th to 13th July 2012. As in Stockholm two years ago, this event has a research theme, but there will be plenty of practical information, advice and application security training.

In May I participated in the OWASP Greece chapter Training Day in Athens and was overwhelmed by the level of attendance from the enthusiastic and knowledgeable development community. I am sure the sponsorship opportunities and tickets will be snapped up quickly.

AppSec EU Research 2012 is being hosted by the Department of Informatics and Telecommunications of the University of Athens.

Posted on: 03 January 2012 at 08:15 hrs

Comments Comments (0) | Permalink | Send Send | Post to Twitter

30 December 2011

Maritime Sector Cyber Security

Another report from the European Network and Information Security Agency (ENISA) highlights deficiencies in the maritime sector.

Photograph of a ship's bow berthed in Florida

The study's report Cyber Security Aspects in the Maritime Sector discusses that while there is increasing knowledge concerning physical security and crew safety, maritime cyber security awareness is low to non-existent. The situation is made worse by fragmented responsibilities, lack of incident information, and missing legislation in this area.

A relatively quick read if you are active in the sector.

Posted on: 30 December 2011 at 22:04 hrs

Comments Comments (0) | Permalink | Send Send | Post to Twitter

27 December 2011

Guide to HTML5 Web Security

Further to my previous notes about HTML 5 security, a superb reference document was published earlier this month.

An extract from a page in Michael Schmidt's document HTML5 Web Security showing how HTML5 vulnerabilities and attacks are described and illustrated in diagrammatic form

Michael Schmidt (Compass Security) wrote his master's thesis about HTML5 security in May 2011 and has published an extract for everyone to access.

HTML5 Web Security describes issues, vulnerabilities, threat & attack scenarios and countermeasures across 80 pages including numerous well thought-out diagrams, and is backed up with detailed references and an appendix full of attack details.

The main sections are:

  • 2.2 Cross-origin resource sharing
  • 2.3 Web storage
  • 2.4 Offline web application
  • 2.5 Web messaging
  • 2.6 Custom scheme and content handlers
  • 2.7 Web sockets API
  • 2.8 Geolocation API
  • 2.9 Implicit relevant features of HTML5
    Web workers, new elements, attributes and CSS, Iframe sandboxing and server-sent events

If you are already developing HTML, or planning to, read this document as soon as possible and update your requirements documents, specifications, design documents, coding standards, and test plans to incorporate the knowledge.

The document would be worth buying if it were a book, but it has generously been made available publicly. Yes, I am still reading the document, and so far have only one very minor complaint — it would be good to have a content list. Maybe in version 1.1?

Posted on: 27 December 2011 at 09:07 hrs

Comments Comments (3) | Permalink | Send Send | Post to Twitter

20 December 2011

Security Breach Guidance for European Telecommunications Operators

Last week, the European Network and Information Security Agency (ENISA) announced the publication of two guidance documents relating to Article 13a of the new telecommunications legislation (Directive 2009/140/EC) regarding security incidents and security controls.

Article 13a
Security and integrity
1. Member States shall ensure that undertakings provid­ing public communications networks or publicly available electronic communications services take appropriate techni­cal and organisational measures to appropriately manage the risks posed to security of networks and services. Having regard to the state of the art, these measures shall ensure a level of security appropriate to the risk presented. In particu­lar, measures shall be taken to prevent and minimise the impact of security incidents on users and interconnected networks.
2. Member States shall ensure that undertakings provid­ing public communications networks take all appropriate steps to guarantee the integrity of their networks, and thus ensure the continuity of supply of services provided over those networks.
3. Member States shall ensure that undertakings provid­ing public communications networks or publicly available electronic communications services notify the competent national regulatory authority of a breach of security or loss of integrity that has had a significant impact on the opera­tion of networks or services.
Where appropriate, the national regulatory authority con­cerned shall inform the national regulatory authorities in other Member States and the European Network and Infor­mation Security Agency (ENISA). The national regulatory authority concerned may inform the public or require the undertakings to do so, where it determines that disclosure of the breach is in the public interest.
Once a year, the national regulatory authority concerned shall submit a summary report to the Commission and ENISA on the notifications received and the action taken in accordance with this paragraph.
4. The Commission, taking the utmost account of the opinion of ENISA, may adopt appropriate technical imple­menting measures with a view to harmonising the measures referred to in paragraphs  1, 2, and  3, including measures defining the circumstances, format and procedures applicable to notification requirements. These technical implementing measures shall be based on European and international stan­dards to the greatest extent possible, and shall not prevent Member States from adopting additional requirements in order to pursue the objectives set out in paragraphs 1 and 2.
These implementing measures, designed to amend nonessential elements of this Directive by supplementing it, shall be adopted in accordance with the regulatory procedure with scrutiny referred to in Article 22(3).

I don't often quote legislation here, but I thought it was relatively short and provides the intent behind ENISA's guidance. ENISA has published two documents.

Technical Guideline on Incident Reporting provides guidance on the annual summary of significant issues and the notification of cross-border incidents. While most (all?) readers of this blog won't necessarily work in the telecommunications sector, I think the document is useful more widely for two aspects. It demonstrates the type of reporting which could be required if breach notification becomes a requirement for other sector or types of data (e.g. personal data)in the future. Also, the Section 5 on impact parameters and thresholds provides some insight into the continental and national viewpoint on the effects of security incidents.

The second document Technical Guideline on Minimum Security Measures defines the security controls national regulators need to consider when evaluating public communications networks. These are relatively high-level and are grouped into governance/risk management, human resources security, security of systems and facilities, operations management, incident management, business continuity management, and monitoring, auditing and testing. So a clear mapping to ISO27001/2/5 for information security and risk management, and BS 25999 for business continuity.

Posted on: 20 December 2011 at 06:47 hrs

Comments Comments (0) | Permalink | Send Send | Post to Twitter

13 December 2011

Updated and Improved Guidance on Use of Cookies, Etc.

The UK's data protection agency Information Commissioner's Office (ICO) has updated the previous guidance on the use of cookies and similar tracking technologies, under the revised Privacy and Electronic Communications Regulations which came into force on 26th May this year.

Cover from the ICO's updated 'Guidance on the Rules on use of Cookies and Similar Technologies'

In a press release today, organisations were warned they are not doing enough during the lead-in period to formal enforcement.

The updated Guidance on the Rules on use of Cookies and Similar Technologies provides concrete advice and practical guidance on the legal requirements, their interpretation and what are considered acceptable practices. The guidance was issued as a result of a review of progress to date which shows a lack of knowledge and action from web site owners. Of most concern are likely to be persistent cookies, cookies issued by third parties, cookies issued immediately a user visits a web site, are used for any sort of profiling or which span multiple website hostnames or multiple domains.

If you have any analytics, advertising, tracking or content provision by third party web sites, beware — you may just find the terms and conditions of service state you are responsible for obtaining and managing consent.

If you are a web site owner, take note and act now, if you have not already done so. From May 2012, the ICO will be accepting complaints from users, and will then contact web site owners to ask them to respond to the complaint and explain what steps they have taken to comply with the regulations. Therefore, document what you are doing and the decisions taken.

Posted on: 13 December 2011 at 15:21 hrs

Comments Comments (0) | Permalink | Send Send | Post to Twitter

06 December 2011

Registry of Cloud Computing Providers' Security Controls

This week, the Cloud Security Alliance has announced its new repository of security control self -assessments for cloud computing providers.

Part of the Security Response in the Context of CSA Cloud Control Matrix )CCM) security controls SA-03 through SA-04 for Microsoft's Office 365, published on the Cloud Security Alliance (CSA) Security, Trust and Assurance Registry (STAR)

The CSA Security, Trust and Assurance Registry (STAR) lists providers who have completed and submitted a Consensus Assessments Initiative Questionnaire (CAIQ) or Cloud Controls Matrix (CCM) response to indicate their compliance with CSA best practices.

Currently only two providers are listed, but more are in progress. This will be a very helpful resource for those seeking assurance about controls from suppliers, and potentially standardise the way cloud providers publish information about their security practices, simplifying procurement processes. If you are an IaaS, PaaS or SaaS provider, the existing submissions may help your own controls development or completion of an assessment.

There is more information in the detailed FAQ and LinkedIn forum.

Posted on: 06 December 2011 at 08:59 hrs

Comments Comments (0) | Permalink | Send Send | Post to Twitter

29 November 2011

Cloud Computing Security v3

The Cloud Security Alliance (CSA) has restructured and re-written its flagship document Security Guidance for Critical Areas of Focus in Cloud Computing.

The application security domain (one of twelve) focuses on:

  • Secure Software Development Life Cycle (SDLC)
  • Authentication, authorisation, compliance — application security architecture in the cloud
  • Identity and the consumption of identity as it relates to cloud application security
  • Entitlement processes and risk-based access management as it relates to cloud encryption in cloud-based applications
  • Application authorization management (policy authoring/update, enforcement)
  • Application penetration testing for the cloud (general practices and nuances specific to cloud-based applications)
  • Monitoring applications in the cloud
  • Application authentication, compliance, and risk management and the repercussions of multi-tenancy and shared infrastructure
  • The difference between avoiding malicious software and providing application security.

Posted on: 29 November 2011 at 00:47 hrs

Comments Comments (0) | Permalink | Send Send | Post to Twitter

25 November 2011

XSS Deep Dive

While on the topic of research papers, I came across another interesting paper on the UC Berkely web site while checking the reference for the effect of development tools on security.

Joel Weinberger, Prateek Saxena, Devdatta Akhawe, Matthew Finifter, Richard Shin and Dawn Song have undertaken an assessment of cross-site scripting (XSS) sanitisation in web application frameworks. A Systematic Analysis of XSS Sanitization in Web Application Frameworks is somewhat heavy on the maths in places, but that shouldn't put off those involved in development who want to learn more about the difficulties of sanitisation and the limitations of the sanitisation methods that are supported in some frameworks.

Posted on: 25 November 2011 at 18:36 hrs

Comments Comments (0) | Permalink | Send Send | Post to Twitter

More Entries

Technical : Web Security, Usability and Design
http://www.clerkendweller.com/technical
ISO/IEC 18004:2006 QR code for http://clerkendweller.com

Page http://www.clerkendweller.com/technical
Requested by 38.107.179.223 on Saturday, 4 February 2012 at 21:18 hrs (London date/time)

Please read our terms of use and obtain professional advice before undertaking any actions based on the opinions, suggestions and generic guidance presented here. Your organisation's situation will be unique and all practices and controls need to be assessed with consideration of your own business context.

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