Archive for February, 2008

 
Feb
07
Posted (db) in PABP, PCI on February-7-2008

If an attacker acquires the database or database records AND you store a truncated cardnumber and an non-salted hashed accountnumber (which is a pci compliant approach, BTW) it take ~3 minutes per card to acquire the plaintext value and generated ~ 9MB file

Hashed account numbers are typically stored to assist in the lookup of card’s in the database, the quering application would calculate a hash on the accountnumber and query that hash to find the related transactions without using the account number.

Let’s use the following test card as an example:

4111111111111111

This would be stored or displayed as:

411111______1111

I wrote a small program that iterates through the missing digits, calculating the checksum (Luhn), and then calculating the MD5, SHA1 and SHA-256 hashes and stores it in a file, This program took approx 3 minutes to run per truncated card:

You would typically see a data record that would look like this:

Masked Account Number
411111______1111

Hashed Account Number(*)
68BFB396F35AF3876FC509665B3DC23A0930AAB1

Encrytped Card Number(**)
4888e25d9d01532e343dd261cbcebc91ccb17d029496b8c5

(*) #SHA1 hash of 4111111111111111
(**) 3des of 4111111111111111 with “forum.aegenis.com” as the key

With my program:

dbergert@debian:~$ bin/bruteforce.bsh 411111______1111

.. takes ~ 3 minutes to run

dbergert@debian:~$ grep “68BFB396F35AF3876FC509665B3DC23A0930AAB1″ bruteforce.txt

4111111111111111,5910F4EA0062A0E29AFD3DCCC741E3CE, 68BFB396F35AF3876FC509665B3DC23A0930AAB1,9BBEF1947 6623CA56C17DA75FD57734DBF82530686043A6E491C6D71BEF E8F6E

I guess the key lesson to use salted hashes, and just because you can show the first six and last four, if you don’t have a business need, only show the first for card type and last four. (which would only add required time to this process…)

*** Please don’t email me for the code, you are not getting it.

Update: Just for fun I calcuatlated how long it would take to bruteforce if you only stored the first digit and last four. i.e. — 4____________1111

You are looking at it taking a single processor 347 days, with a file that is is 1.47 terabytes in size, but remember that this only needs to be calculated once and that the timing can further be reduced by using well known BIN’s,

From reducing what numbers are displayed from 10 to 5, changes the timing from 3 minutes to 347 days.

I wonder when we will see longer account numbers.



 
Feb
05
Posted (db) in PCI on February-5-2008

The PCI co website has listed the new version of the PCI Self Assessment Questionaire

There are now 5 different types and 4 different SAQ’s

  • Type 1 / SAQ A: Card-not-present, All Cardholder Data Functions Outsourced
  • Type 2 / SAQ B: Imprint Merchant Only, No Electronic Cardholder Data Storage
  • Type 3 / SAQ B: Standalone, Dial-out Terminal Merchant, no Electronic Cardholder Data Storage
  • Type 4 / SAQ C: Merchants with Payment Application Systems Connected to the Internet
  • Type 5 / SAQ D: All Other Merchants and All Service Providers Defined by a Payment Brand as Eligible to Complete an SAQ

More information on the PCIco website.



 
Feb
05
Posted (db) in PCI, PED, PIN on February-5-2008

In the PCI Answers forum: andrewj writes:

The PCI SSC PED website went live today. You can find it linked from the main page, or you can get to it directly here:

https://www.pcisecuritystandards.org/pin/

What does this mean? Well, acquirers / ISOs should ensure that they are deploying PCI compliant devices, and be sure that they are aware that deployment of any ‘pre-PCI’ devices is no longer permitted (although the rules around this are card brand specific, and not part of the PED program per-se).

The PIN Entry Device List provides a list of PIN Entry devices that you can verify are PCI PED approved.



 
Feb
04
Posted (db) in PABP, PCI on February-4-2008

locks

A recent blog post at www.pcianswers.com further shows the focus on payment applications with PBAP and these requirements:

PABP requirement (#1) Do not retain full magnetic stripe, card validation code or value(CAV2,CID,CVC2,CVV2), or PIN block data. PCI requirement (#3.2) Do not store sensitive authentication data subsequent to authorization (even if encrypted) this includes: Full magnetic stripe(Track Data), Card Validation code, and PIN or encrypted PIN block PCI requirement (#3.3) Mask PAN when displayed. (first 6 and last 4 digits are the maximum that can be displayed)

jPOS has its own logging subsystem that is typically used with q2. A typical logging configuration has a 00_logger.xml in the deploy directory of a jPOS application looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<logger name="Q2" class="org.jpos.q2.qbean.LoggerAdaptor">
<log-listener class="org.jpos.util.SimpleLogListener" />
<log-listener class="org.jpos.util.RotateLogListener">
<property name="file" value="log/q2.log" />
<property name="window" value="86400" />
<property name="copies" value="30" />
<property name="maxsize" value="1000000" />
</log-listener></logger>

In order to comply with PABP and PCI requirements listed above,

you can use a ProtectedLogListener configuration that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<logger name="Q2" class="org.jpos.q2.qbean.LoggerAdaptor">
<log-listener class="org.jpos.util.ProtectedLogListener">
<property name="protect" value="2 35" />
<property name="wipe" value="52 45" />
</log-listener>
 <log-listener class="org.jpos.util.RotateLogListener">
 <property name="file" value="log/q2.log" />
<property name="window" value="86400" />
 <property name="copies" value="30" />
<property name="maxsize" value="1000000" />
</log-listener></logger>

Note: the protect and wipe properties:

Protect:

“40000101010001″ is converted to “400001____0001″
“40000101010001=020128375″ is converted to “400001____0001=0201_____”
“123″ is converted to “___”

Wipe: Prevents the field from being logged.

The fields in ISO-8583 that you will likely want to protect and wipe are:

Field 2 – Primary Account Number (PAN)
Field 35 – Track data (account number and magnetic stripe)
Field 52 – PIN Data / Encrypted PIN Block
Field 45 – Track 1 Data

You will also likely want to monitor with your file integrity monitoring software the 00_logger.xml file to detect any authorized changes, as well as apply restrictive permissions on who has access to the 00_logger.xml file.



 
Feb
03
Posted (admin) in PABP, PCI on February-3-2008

Section 3.1 of the Visa Payment Application Best Practices (PABP) states:

Test the application to verify that unique user names and complex passwords are required for all administrative access and for all access to cardholder data, in accordance with PCI DSS requirement 8.1, 8.2, and 8.5all.

I am in the process of modifying the jPOS-ee ui (eeweb3) to support these requirements, as well as to have them be set as configurable values to implement your organization security polices. We use some of the jPOS-ee eeweb3 module in some of our payment solutions, notably our OLS.Switch

The development and testing in ongoing, but I wanted to give a brief synopsis of the changes that mostly leverage the used of User properties and SysConfig properties:

  • Flag to set a user account Status: Active || Inactive

  • Ability to force a user to require a password change on their next login
  • Password minimum length, Password change interval
  • Password Complexity options (based on required use of # of character classes (Upper, Lower, Numeric, Special, or required # of each type))
  • Password History (configurable number of passwords to check)
  • Account Lockout (and configurable duration)

After I’m done coding and testing I’ll provide the code to jpos.org to merge into jpos-ee svn codebase.



 
Feb
02
Posted (admin) in PCI on February-2-2008

pcilogoI recently stumbled upon an article that really hits on a good point, regarding PABP compliance, and PCI compliance:

PABP Compliance Does NOT Imply PCI DSS Compliance

The short of it is that if you use a PABP compliant software, this does not imply that you are PCI compliant.