This Month
February 2009
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
Login
User name:
Password:
Remember me 
View Article  The thoughts of Chairman Chris - 1:Browser Compatibility

I was having problems with a site rendering properly in Internet Explorer. A friend of mine suggested that I use Firefox instead.

I thought I'd write this blog article to vent my annoyance, and put everyone right!

Now, I've used IE to access the following:

-sites containing Java applets
-eBay
-Amazon
-Flickr
-YouTube
-BBC web page
-various sites that use Javascript to mimic 1980s pub games (such as Space Invaders)
-a virtual, secure desktop environment of one of my clients, which is separated from the host operating system

IE has no problems whatsoever with any of these.

The very few sites I encounter that have display problems in IE don't do anything major. They really are simple. The problem is usually just rendering of stylesheets.

Why don't they work?

Enterprise Architects have an expectation now that a web site will work on a browser. That's that. No hassles.

Your web server can emit HTML and Javascript that will work on different browsers. Or it can pick up the type of browser, and send different output to each. You then test it on the last couple of versions of:
IE
Firefox
Opera
Safari

And then your web site will work. This is very simple, basic stuff. This is what websites have done for years, and it succeeds.

The website that I mentioned at the beginning of this article carried a notice stating 'IE is having problems rendering our pages'.

This isn't what is happening.

Only one thing is going on: 68% of their target audience is not able to do business through their web page.

If you can't get this right, then you're missing the point of having a web site.

 

View Article  Google and your data

Another Google tool where you may be exposing your data across the internet, and have no control over where/how it's stored:

http://www.guardian.co.uk/technology/2009/jan/25/google-drive-gdrive-internet

How are they storing your data? Will it be encrypted? Doubtful, as this will slow down performance.

You're handing over your personal data to another company. In another country.

It was tried ten years ago, and never took off.

The private sector are the biggest users of PCs. Business will not use this, as they have to meet their legal and compliance responsibilities. That's why it ain't gonna fly.

Rant over.

View Article  25 most dangerous coding mistakes

The US National Security Agency helped put together a list of the 25 most dangerous coding mistakes.

 

Here they are, in all their glory:

Improper Input Validation

Improper Encoding or Escaping of Output

Failure to Preserve SQL Query Structure

Failure to Preserve Web Page Structure

Failure to Preserve OS Command Structure

Cleartext Transmission of Sensitive Information

Cross-Site Request Forgery

Race Condition

Error Message Information Leak

Failure to Constrain Operations within the Bounds of a Memory Buffer

External Control of Critical State Data

External Control of File Name or Path

Untrusted Search Path

Failure to Control Generation of Code

Download of Code Without Integrity Check

Improper Resource Shutdown or Release

Improper Initialization

Incorrect Calculation

Improper Access Control

Use of a Broken or Risky Cryptographic Algorithm

Hard-Coded Password

Insecure Permission Assignment for Critical Resource

Use of Insufficiently Random Values

Execution with Unnecessary Privileges

Client-Side Enforcement of Server-Side Security

Looking down the list, we can see that a number of the issues have been around for a long time. SQL injection – why are web sites still allowing this, after all the publicity and information disseminated on prevention? Many large organisations are still suffering from these problems, so it isn’t just confined to smaller businesses.

 

Most of the flaws come into being during implementation (development), such as:

Injection attacks

Improper file access

Some occur during design, such as:

Poor authentication

Broken security 

And some occur during the deployment/testing period, such as excess privilege for web applications. This is usually a result of developers running as administrator on their machines, and finding that the application won’t run any other way when it’s installed onto the production server.

 

There are also other categroies and flaws in the list, but I'm not going to be exhaustive in covering it. I'm focusing on initiatives to improve the development process.

 

So where do we start in tackling this? The problem really is a good example of how we must look at security as a process, rather than just trying to find a quick fix.

 

Concrete solutions that I have been involved in at various organisations have included the following:

Secure coding requirements

Training programs

Penetration testing

Code inspection

Validation frameworks

 One generally has to target both .Net and Java, as large organisations will tend to use both.

 

Secure coding requirements seem to be continuously written over and over again at one organisation after another. A good basis for Microsoft products is the Building Secure Asp.Net Applications document, and Improving web application security This guidance can be used, with company specific guidance appended. Java documentation gives less of an integration overview, but this is because it will be more implementation specific. However, the Microsoft patterns are quite generic.

 

Once these documents are written, they will then feed into the development process, and end up being part of the specific non-functional requirements for the application.

 

Training programs are another essential part of the process. I have worked with a global client recently, creating a training program that was based on the secure coding requirements, and the processes involved in getting security sign-off. This training was computer based, so that all technology-based employees could learn how to integrate security.

 

Penetration testing may take place, depending on the criticality and vulnerability of the application. For instance, an internet facing application with extremely sensitive data would certainly need a pen test. This will usually reveal discrepancies, which then have to be prioritised and fixed. Let the development team know early on whether this will be necessary, as it will have to be budgeted for.

 

Code inspection can take many forms. An audit based approach, taking a sample and manually checking, is useful. Also, there are many code checking tools, such as CAT.Net.

 

From the cat.net code download site:

CAT.NET is a snap-in to the Visual Studio IDE that helps you identify security flaws within a managed code (C#, Visual Basic .NET, J#) application you are developing. It does so by scanning the binary and/or assembly of the application, and tracing the data flow among its statements, methods, and assemblies.

 

I’m planning to produce an article on this tool soon.

 

Finally, validation frameworks are becoming more popular. There are lots of types of invalid input, such as

Mistyped entry – simply something which is misspelled or wrongly formatted, such as a date

Broken business rules – Perhaps the email field for your external-facing web site needs more validation than just a regex to check the formatting. What if someone were to enter an internal email address, from within the organisation? This could perhaps be fraudulent.

Request manipulation – querystring manipulation to access the wrong data is common

Validation frameworks are libraries that are geared to checking for all of the above, and more, so that they can be plugged into an application, giving a reliable, tested implementation. They have to be lightweight (so that they don’t take up too much memory, especially in web applications) and efficient (many of the functions will be called repeatedly during a request). Unfortunately, due to the inability of .Net and Java to call each other’s libraries efficiently, two versions would have to be built and maintained.

 

The OWASP Enterprise Security API (ESAPI) Project is an attempt to produce a strong security framework. The ESAPI is the result of over a decade of code review and penetration testing of critical enterprise applications. At present, only the Java version is available. Efforts to build ESAPI in .NET and PHP are already underway.

 

Hopefully, this article will give you some clues where to start when introducing an application-level security regime to your organisation.

 

View Article  SQL Server 2008 Encryption - more details
I've just had a piece published by the nextgenug on SQL Server encryption, which is an expansion of my previous post. Hope you find this useful.
View Article  SQL Server Transparent Data Encryption

A major problem in the commercial world is getting people to look after their data. Too often, a staff member will save sensitive data in a document without adequate protection, bypassing all logical controls set up by the system administrator.

 

How do we solve this? Ask everyone to apply strong Access Control Lists to all data that they save? This would cause problems:

-A lot of wasted effort if the data is not sensitive

-For the sensitive data, how should one apply the ACLs? Which people should be allowed to access it?

 

A common solution has been to use the concepts of security classification from the defence world.

 

You’ll recall all those documents in James Bond movies marked ‘Top Secret’ and ‘For Your Eyes Only’. Well, this can be applied to the different types of data in an organisation. You can make up your own labels, but I’ll use these four:

Top Secret -Could harm organisation if made public
-Secret keys
-Take over plans
-Store encrypted
-Backup encrypted
-Transmit encrypted
Secret -Board meeting minutes
-High value contracts
-Transmit encrypted
-Backup encrypted
Restricted -Low value contracts -Transmit encrypted
Public -All other material -Unprotected

 

Now we have this, we can decide what type of data falls into each classification:

Top Secret -Could harm organisation if made public
-Secret keys
-Take over plans
-Store encrypted
-Backup encrypted
-Transmit encrypted
Secret -Board meeting minutes
-High value contracts
-Transmit encrypted
-Backup encrypted
Restricted -Low value contracts -Transmit encrypted
Public -All other material -Unprotected

 

This enables staff to know how to categorise data.

 

Now we add details of how the data is to be protected:

Top Secret -Could harm organisation if made public
-Secret keys
-Take over plans
-Store encrypted
-Backup encrypted
-Transmit encrypted
Secret -Board meeting minutes
-High value contracts
-Transmit encrypted
-Backup encrypted
Restricted -Low value contracts -Transmit encrypted
Public -All other material -Unprotected

 

So now staff can see how to handle each type of data. The table above would probably be a lot larger for most organisations, but you get the point. Staff can now identify the type of data, and from that they are able to use the correct safeguards.

 

Encryption of sensitive data at rest and in backups is very common for major institutions. This can be a very computationally intensive and difficult to implement control.

 

SQL Server 2008 introduces a new tool called Transparent Data Encryption. This encrypts data at the page level of the database, but decrypts it as it is read into memory. And it doesn’t increase the size of the database!

 

The encryption is performed by a database encryption key (DEK). This is a symmetric key, which is then encrypted by a certificate stored in the master database of the server. This is then protected using the DPAPI.

 

The following slide from MSDN makes things a little clearer.

 

 

This is great news for those of us who work in compliance related positions, such as security consultancy. A lot of effort has previously gone into development of solutions or selection of third party tools that provide this protection. Now SQL database administrators can provide this with minimal financial cost to the organisation.