PCI DSS stands for Payment Card Industry Data Security Standard, and is a worldwide security standard assembled by the Payment Card Industry Security Standards Council (PCI SSC). The PCI security standards are technical and operational requirements that were created to help organizations that process card payments prevent credit card fraud, hacking and various other security vulnerabilities and threats. The standards apply to all organizations that store, process or transmit cardholder data – with guidance for software developers and manufacturers of applications and devices used in those transactions. A company processing, storing, or transmitting cardholder data must be PCI DSS compliant.
The PCI SSC (
Council) is responsible for managing the security standards, while compliance with the PCI set of standards is enforced by the founding members of the Council: American Express, Discover Financial Services, JCB International, MasterCard Worldwide and Visa Inc. Non-compliant companies who maintain a relationship with one or more of the card brands, either directly or through an acquirer risk losing their ability to process credit card payments and being audited and/or fined.
All in-scope companies must validate their compliance annually. This validation can be conducted by Qualified Security Assessors, i.e. companies that have completed a three-step certification process by the PCI SSC which recognises them as being qualified to assess compliance to the PCI DSS standard. However, smaller companies have the option to use a Self-Assessment Questionnaire. Whether this questionnaire needs to be validated by a QSA depends on the requirements of the card brands in that merchant’s region.
The current version of the standard specifies 12 requirements for compliance, organised into 6 logically related groups, which are called “control objectives.”
- Build and Maintain a Secure Network
- Requirement 1: Install and maintain a firewall configuration to protect cardholder data
- Requirement 2: Do not use vendor-supplied defaults for system passwords and other security parameters
- Protect Cardholder Data
- Requirement 3: Protect stored cardholder data
- Requirement 4: Encrypt transmission of cardholder data across open, public networks
- Maintain a Vulnerability Management Program
- Requirement 5: Use and regularly update anti-virus software
- Requirement 6: Develop and maintain secure systems and applications
- Implement Strong Access Control Measures
- Requirement 7: Restrict access to cardholder data by business need-to-know
- Requirement 8: Assign a unique ID to each person with computer access
- Requirement 9: Restrict physical access to cardholder data
- Regularly Monitor and Test Networks
- Requirement 10: Track and monitor all access to network resources and cardholder data
- Requirement 11: Regularly test security systems and processes
- Maintain an Information Security Policy
- Requirement 12: Maintain a policy that addresses information security
Compliance with these requirements can be summarized into 3 main stages:
- Collecting and storing: Secure collection and tamper-proof storage of all log data so that it is available for analysis.
- Reporting: Being able to prove compliance on the spot if audited and present evidence that controls are in place for protecting data.
- Monitoring and alerting: Have systems in place such as auto-alerting, to help administrators constantly monitor access and usage of data. Administrators are warned of problems immediately and can rapidly address them. These systems should also extend to the log data itself –- there must be proof that log data is being collected and stored.
What does this actually mean for web application developers?
It is considerably more expensive and more time-consuming to recover from a security incident than to take preventative measures ahead of time. If you follow the guidelines below, you will go along way to securing you application in line with the PCI DSS regulations. Many of the measures apply to general application security, but since PCI DSS is all about security, they are worth mentioning.
- Separate web- and database-servers on to different physical machines.
- Secure the web- and database-servers with traditional techniques. Only authorised accounts should have the capabilities to run tasks on the machine. That means not giving admin-rights to the user account.
- Keep servers up-to-date with the latest patches and software releases.
- Minimise the number of services running on the server. This means limiting the services to only those required for the web- or database-servers to function.
- Secure information in transit between servers. This may mean physically securing the network to prevent evesdropping via encryption or obfuscating the data amongst innocuous ‘noise’.
- Secure the database server behind a firewall.
- Separate ColdFusion, the webserver and database server user accounts. They should never be under the same system account.
- Create a database user specifically for your ColdFusion datasource and restrict it to only the activities required for the application. The user should not have database-owner rights, access to databases not relating to the application or access to the system tables.
- Revoke privileges in the ColdFusion datasource definition to prevent the SQL commands
- General settings in the ColdFusion Administrator:
- Check the Disable access to internal ColdFusion Java components option.
- Check the Enable Global Script Protection option.
- Add a Missing Template Handler.
- Add a Site-wide Error Handler.
- Reduce the Maximum size of post data from 100MB.
- Enable Timeout Requests, and set to 60 seconds or less.
- Disable Robust Exception Handling on production servers.
Web Application-level Security:
- Use secure HTTP to transfer data and/or when logged into ‘administration’ secutions of your web application.
- Timeout sessions after 15 minutes and on browser close.
- Provide multi-level login processes. For example, lock the application after 3 failed attempts for a period of 10 minutes.
- Do not identify whether the username or password are incorrect, simply notify the user that their login failed and that they must try again.
- Encrypt passwords stored in the database with a standard such as SHA-256 or ‘stronger’.
- Use CAPTCHAs (textual and aural) to prevent automated robots hacking into your application.
- Run regular penetration tests on your application to identify potential problems.
- Encrypt credit card information held in the database or other storage mechanism. Only store credit card data in line with the PCI DSS regulations.
- Application.cfc – Set the
scriptProtectApplication variable to
trueto enable application-wide cross-site script protection.
- CFQueryParam – This tag, importantly, verifies the data type of a query parameter and, for RDBMSs that support bind variables, enables ColdFusion to use bind variables in the SQL statement. Bind variable usage enhances performance when executing a
cfquerystatement multiple times. There are limitations to the use of the
cfqueryparamtag. In ColdFusion 7 for example, you cannot use them in queries using the
cachedWithinattribute. Similarly, they cannot be used in
ORDER BYclauses, although the use of conditional logic should resolve the need for order by variables.
- Functions – As a rule of thumb, validate all the data being passed into a query prior to it being used. ColdFusion MX 7 saw the introduction of the
isValid()function. This function tests whether a value meets a validation or data type rule and can be used to replace a large number of type-specific functions such as
- Stored Procedures – I often favour the use of stored procedures over standard queries. Not only do they add an additional level of performance, they provide an additional level of security; ColdFusion does not do any raw processing of queries in the web code, it simply passes variables down the wire to the database server.
The goal of the PCI Data Security Standard is to protect cardholder data that is processed, stored or transmitted by merchants. The security controls and processes required by PCI DSS are vital for protecting cardholder account data, including the PAN – the primary account number printed on the front of a payment card. Merchants and any other service providers involved with payment card processing must never store sensitive authentication data after authorisation. This includes sensitive data that is printed on a card, or stored on a card’s magnetic stripe or chip – and personal identification numbers entered by the cardholder.
By following the points made above, you will go a long way to meeting the PCI DSS guidelines, whilst also securing your infrastructure and applications in a more general sense.
Caveat: The views and comments written in this article are provided as a guideline. I hold no responsibility for the security of your applications and data based upon the information provided.