views:

76

answers:

3

As part of a PCI-DSS audit we are looking into our improving our coding standards in the area of security, with a view to ensuring that all developers understand the importance of this area.

How do you approach this topic within your organisation?

As an aside we are writing public-facing web apps in .NET 3.5 that accept payment by credit/debit card.

+5  A: 

There are so many different ways to break security. You can expect infinite attackers. You have to stop them all - even attacks that haven't been invented yet. It's hard. Some ideas:

  1. Developers need to understand well known secure software development guidelines. Howard & Le Blanc "Writing Secure Code" is a good start.

  2. But being good rule-followers is only half the point. It's just as important to be able to think like an attacker. In any situation (not only software-related), think about what the vulnerabilities are. You need to understand some of those weird ways that people can attack systems - monitoring power consumption, speed of calculation, random number weaknesses, protocol weaknesses, human system weaknesses, etc. Giving developers freedom and creative opportunities to explore these is important.

  3. Use checklist approaches such as OWASP (http://www.owasp.org/index.php/Main_Page).

  4. Use independent evaluation (eg. http://www.commoncriteriaportal.org/thecc.html). Even if such evaluation is too expensive, design & document as though you were going to use it.

  5. Make sure your security argument is expressed clearly. The common criteria Security Target is a good format. For serious systems, a formal description can also be useful. Be clear about any assumptions or secrets you rely on. Monitor security trends, and frequently re-examine threats and countermeasures to make sure that they're up to date.

  6. Examine the incentives around your software development people and processes. Make sure that the rewards are in the right place. Don't make it tempting for developers to hide problems.

John
It does not also harm learning what the 'bad boys' do - after reading the "Writing Secure Code", you can continue with "Hacking - the art of exploitation"
Kimvais
Inside the security field the Web Application Hackers Handbook is considered somewhat a bible. http://www.amazon.co.uk/Web-Application-Hackers-Handbook-Discovering/dp/0470170778
Cheekysoft
+1  A: 

Consider asking your QSA or ASV to provide some training to your developers.

Cheekysoft
QSA...?ASV...?
Richard Ev
as part of your arrangements to be assessed for PCI DSS compliance, you will have a company acting as your Qualified Security Assessor, this will be a security specialist who guides you through the process and manages the scope of your required tests and processes. They will call on an Approved Scanning Vendor (maybe themselves) to scan your internet facing systems for vulnerabilities and provide monthly/quarterly reports. See https://ja.pcisecuritystandards.org/qsa_asv/index.shtml
Cheekysoft
Yea right.. QSA's aren't developers. They'll give you generic idea but that's pretty much it.
0A0D
This all depends on the individual QSA/ASV company and their staff. Certainly some have staff that are and specialise in providing training like this. Some do not.
Cheekysoft
A: 

Security basically falls into one or more of three domains:

1) Inside users

2) Network infrastructure

3) Client side scripting

That list is written in order of severity, which opposite the order to violation probability. Here are the proper management solutions form a very broad perspective:

The only solution to prevent violations from the inside user is to educate the user, enforce awareness of company policies, limit user freedoms, and monitor user activities. This is extremely important as this is where the most severe security violations always occur whether malicious or unintentional.

Network infrastructure is the traditional domain of information security. Two years ago security experts would not consider looking anywhere else for security management. Some basic strategies are to use NAT for all internal IP addresses, enable port security in your network switches, physically separate services onto separate hardware and carefully protect access to those services ever after everything is buried behind the firewall. Protect your database from code injection. Use IPSEC to reach all automation services behind the firewall and limit points of access to known points behind an IDS or IPS. Basically, limit access to everything, encrypt that access, and inherently trust every access request is potentially malicious.

Over 95% of reported security vulnerabilities are related to client side scripting from the web and about 70% of those target memory corruption, such as buffer overflows. Disable ActiveX and require administrator privileges to activate ActiveX. Patch all software that executes any sort of client side scripting in a test lab no later than 48 hours after the patches are released from the vendor. If the tests do not show interference to the companies authorized software configuration then deploy the patches immediately. The only solution for memory corruption vulnerabilities is to patch your software. This software may include: Java client software, Flash, Acrobat, all web browsers, all email clients, and so forth.

As far as ensuring your developers are compliant with PCI accreditation ensure they and their management are educated to understand the importance security. Most web servers, even large corporate client facing web servers, are never patched. Those that are patched may take months to be patched after they are discovered to be vulnerable. That is a technology problem, but even more important is that is a gross management failure. Web developers must be made to understand that client side scripting is inherently open to exploitation, even JavaScript. This problem is easily realized with the advance of AJAX since information can by dynamically injected to an anonymous third party in violation of the same origin policy and completely bypass the encryption provided by SSL. The bottom line is that Web 2.0 technologies are inherently insecure and those fundamental problems cannot be solved without defeating the benefits of the technology.

When all else fails hire some CISSP certified security managers who have the management experience to have the balls to speak directly to your company executives. If your leadership is not willing to take security seriously then your company will never meet PCI compliance.