Contactless payment security issues

Tomcat

Professional
Messages
2,689
Reaction score
963
Points
113
For a contactless card, along with the standard set of security threats typical for contact microprocessor cards, there are special threats associated with the use of a radio channel for exchanging data between the reader and the card. Here you can start by saying that today's contactless card technology violates certain provisions of the PCI Data Security Standard (PCI DSS). Since the dialogue data between the terminal and the card is not encrypted (asymmetric encryption is too slow to meet the requirements for contactless payments), the PCI DSS requirement (clause 4.1) on the need to encrypt card data when it is transmitted over open / public networks is obviously violated. which includes any wireless communication!

Below will be considered only the security threats of operations specific to contactless cards.

From general considerations, it is clear that the radio interface between the card and the reader is less secure than the contact interface. Indeed, when using the radio interface, it is possible, unnoticed by the holder of a contactless card, to perform a non-cash payment operation on his card (in fact, to steal the card for the duration of the operation). It is also possible to eavesdrop on the dialogue between the card and the terminal and, as a result, obtain the information necessary to commit fraudulent card fraud.

The most typical attacks for contactless cards can be classified as follows:
  • relay attack: an authorized reader (a reader registered with a certain servicing bank of the payment system) in an unauthorized manner, that is, without the client's consent, initiates and executes payment operations using the client's contactless card;
  • pick-pocketing: an unauthorized reader (a reader not registered with any servicing bank of the payment system) is used to carry out an unauthorized cardholder's operation in order to use the data received in the “card-reader” dialogue to produce a fake card and perform payment operations with it in authorized terminals;
  • eavesdropping: interception of the data of the "card-reader" dialogue, especially the data transmitted by the card, in order to use the received information to forge the card;
  • data corruption: an attacker tries to make it impossible to exchange data between the card and the reader (Denial of Service attack); at the same time, the fraudster is not able to manipulate the data of the card and reader to derive his own benefit;
  • data modification: the attacker tries to modify the data of the "card-terminal" dialogue in a way that suits him; for example, in conspiracy with the cardholder, the fraudster can reduce the size of the transaction and / or modify the response of the card to the terminal, requiring the authorization of the transaction in offline mode;
  • man-in-the-middle attack: a fraudster (or rather, his technical means) is between the card and the reader, intercepting the dialogue between the card and the reader in order to modify it in a way that is beneficial for himself;
  • Radio Frequency Analysis (RFA): an attack aimed at obtaining the value of the secret cryptographic key of a card by measuring the magnetic field next to the chip of the card.

At the same time, it should be recognized that the area of space in which one can eavesdrop on a card or initiate an operation on it is physically limited. Recall that when using a standard reader, a contactless card operation is performed from a distance of several centimeters.

Studies show that using available relatively inexpensive equipment, relay attacks and pick-pocketing can be organized from a distance of no more than 40-50 cm, eavesdropping on a card

(eavesdropping attack) - from a distance of no more than about 80-100 cm, and eavesdropping on the reader - from a distance of no more than a few meters (3-4 m).

In order to initiate and execute relay attacks and pickpocketing, it is necessary to create an alternating magnetic field with an amplitude of at least 4 A / m in the area of the contactless card. In radio electronics, it is proved that the power of a transmitting omnidirectional antenna with a carrier at a frequency of 13.56 MHz is determined by the equality

P = 0.00025 • H 2 • D 3 • B,

where P is the power of the transmitting omnidirectional antenna (W);

H - magnetic field strength (A / m);

D - distance between antenna and tag (m);

B is the frequency width of the signal transmitted from the reader to the chip (Hz).

From here, it is easy to obtain the power values of the transmitting omnidirectional antenna for different values of the distance between the card and the reader. Assuming that B - 1 MHz, H - 4 A / m, we have:

D = 0.05m, P = 0.5W (transmitter power complies with Federal Communications Commission (FCC) and European Telecommunication Standard (ETS) limits)

D - 0.5m, P - 500W (difficult to realize using a battery, requires a battery)

D = 5 m, P = 0.5 MW (an electromagnetic field of such power kills a person).

It follows that relay attacks and pick-pocketing can be organized from a distance of no more than 40-50 cm.

Let us now consider the eavesdropping of data between the card and terminal dialog by a fraudster. In this case, the limitation on the distance between the card / terminal and the eavesdropper is determined by the SNR = 201og w of the device for the card signal and the reader signal. Earlier it was shown that in order to ensure a satisfactory quality of signal reception, it is necessary that this ratio be at least 8 decibels.

- I in the area of the eavesdropper

The figure below shows a characteristic dependence, obtained empirically, of the ratio of the signal of the contactless card to the noise SNR on the distance from the card.

From fig. 7.19 it can be seen that the level of the ratio of the signal of the contactless card to the noise SNR reaches 8 decibels at a distance of 80-100 cm from the card. Thus, the signal of the card can be intercepted at a distance of up to 1 m from the card.

Typical dependence of the ratio of the signal of a contactless card to noise SNR on the distance from the card

Rice. 7.19. Typical dependence of the ratio of the signal of a contactless card to noise SNR on the distance from the card

Figure 7.20 shows a characteristic dependence, obtained empirically, of the ratio of the reader signal to external noise SNR on the distance from the reader.

From fig. 7.20 shows that the level of the reader's signal to noise ratio reaches 8 decibels at a distance of about 3-4 meters from the reader.

It is quite obvious that for a fraudster it is not a problem to implement a Data Corruption attack. In this case, it is enough to send a noise signal to the card in the same frequency range as the main reader signal. Moreover, sending a powerful signal to the card can even destroy the microcircuit. However, there is no obvious interest for a fraudster in carrying out such an attack.

Speaking about a data modification attack, the following should be noted. Since the ISO 14443 Type A protocol in the forward channel uses the modified Miller code and 100% amplitude modulation, then, obviously, in the forward channel only two consecutive 1s can be modified into sequence (10). To do this, when transmitting the second bit 'Г during a pause in the transmission of the second half of this bit, the fraudster needs to send a carrier signal to the card. Thus, the card will receive a signal without a pause, corresponding to the transmission of the '0' bit following the '1' bit.

Physical Limits: Eavesdropping the Reader at 13.56 MHz

Signal to Noise Ratio versus Distance

89.png

Distance [m]

Feasible The theoretical limit of eavesdroppind Reception a reader at 13.56 MHZ is a few m!

Rice. 7.20. Typical dependence of the ratio of the reader signal to external noise SNR on the distance from the reader

In the forward channel of the ISO 14443 Type B and FeliCa protocols, as well as in the return channel for all ISO 14443 and FeliCa protocols, 100% amplitude modulation is not used, which means that there are no pauses in the signal. The presence of pauses at certain points of the signal is the only obstacle to modifying the information bit, since it is almost impossible to simulate a pause in the signal. This requires a very high accuracy (tenths of a microsecond) of synchronization of the rogue's transmitter with the reader's transmitter in a short processing time. This means that in the channels listed in this paragraph, it is possible to modify all bits of the transmitted data.

It should be noted that the extended Hamming code (ISO 13239) used for data transmission over a radio channel does not solve the problem of data modification. In some cases, the use of code can detect data modification. The commands sent to the card specify the exact data size in the command data field and the expected (usually high estimate) data size in the card's response to the command. Therefore, a fraudster modifying the command data in the presence of a computing device of sufficient performance can calculate a new value of the CRC sequence and insert it into the data block used to transmit the command.

In the reverse channel, the fraudster generally does not immediately know when to calculate and insert the value of the CRC sequence. As a result, the transmission response time for the first response data modification is detected with a high probability 1 - 2 ' 16 ~ 99.998%. However, after an unsuccessful attempt to modify the card's response, the fraudster will know the size of the card's transmitted response, and the next time the card tries to transmit the response to the terminal, he will be able to insert the value of the CRC-sequence calculated by him in the right place. Thus, the error-correcting coding is not able to cope with the problem of modifying the dialogue between the card and the reader. This problem, as we will see below, is solved by other methods.

Consider now the man-in the-middle attack. In fig. 7.21 Alice and Bob are talking over the radio. An intruder named Eve appears between them.

Man-in the-middle attack scheme

Rice. 7.21. Man-in the-middle attack scheme

Let us now consider two cases.
  • 1) Alice plays the active role of the reader, and Bob is passive and plays the role of a card, answering Alice's requests. In this case, a man-in-the-middle attack is not possible because when Eve transmits the intercepted and modified data to Alice to Bob, Alice continues to transmit the carrier to Bob. As a result, Bob will not hear anything due to the superposition of the two unsynchronized signals.
  • 2) Alice and Bob are active and able to initiate data transfer on their own. This option may be relevant when using the NFC protocol. In this case, when Eve transmits the intercepted and modified data to Alice for Bob, Alice hears it too and realizes that instead of the expected response from Bob (response to the command), he receives his own modified message (command).
In addition, in both cases, during the time period when Eve intercepts Alice's data so that Bob does not receive this data, Eve interferes with Bob, which Alice can hear.

Thus, a man-in-the-middle attack due to the omnidirectional radiation of the antennas when making contactless payments is impossible!

Finally, let's focus on the RFA attack. This attack belongs to the class of so-called side-channel attacks described in clause 2.8. Attacks of this class allow for various parameters (processing time of a cryptographic operation, the power consumed by the card when performing a cryptographic function, the value of the electromagnetic field in the area of the card's microcircuit) to determine the values of individual bits of the card's secret key. These attacks are aimed at obtaining the values of individual bits of the private asymmetric key of the card used in its dynamic authentication procedures. All attacks are based on the fact that the method of successive squaring is used to calculate the power of a number from a secret exponent. In the RSA algorithm, signing data m consists in raising m to the power d, where d = (d k _ b..., d 0 ) is a closed exponent of length k bits, k = [log 2 d] 4-1, and the sign [x] denotes rounding of x to the nearest integer less than x.

Then the sequential squaring method for calculating the power x d (mod u) looks like this:

Let s: - m

For i = k - 2 down to 0

Let s: = s 2

If dj - 1 then s: = s • m (modn)

Output: s = x d (modn)

It can be seen from the algorithm that, depending on the value of the bit of the secret key, at each step either one square operation is performed, or two operations are used - squaring and multiplication (it is clear that squaring is also a multiplication). Obviously, the execution of two operations requires, on average, more time and energy consumed by the card. This is what side-channel attacks are based on.

The RFA method belongs to the class of non-penetrating attacks (it is not required to remove and clean the card micromodule filler and destroy the microcircuit passivation layer). The essence of the method is to measure the magnetic field strength using a tiny coil of copper wire, placed next to the microcircuit of the card. It can be assumed that when the chip's processor processes a bit equal to 1, and therefore squaring and multiplication are needed, the chip requires more power from the magnetic field around the chip. As a result, g dts

in accordance with the law of conservation of energy, the value of the magnetic field strength near the cryptographic coprocessor of the microcircuit at this moment in time should decrease. In practice, this is what happens, which is perfectly illustrated in the following fig. 7.22.

An obvious way to combat RFA attacks is to use additional "camouflage" multiplication, which is performed when no square calculation is required. The use of "camouflage" multiplication does not give a fraudster the opportunity to determine the values of the bits of the secret key based on the analysis of the magnetic field in the vicinity of the card's microcircuit, since it makes the processing of bits '0' and '1' in the power calculation algorithm the same. In other words, the above algorithm for calculating the degree should look like this.

Let s: - m

For i = k - 2 down to 0

Let s: = s 2

If di = 1 then s: = s • m (modn) else s': = s • m

Output: s - X th (mod n)

Below are the consequences of the attacks described above for participants in non-cash payments.

In the event of a relay attack, direct financial damage is inflicted on the card holder. At the same time, the terminal performing operations unauthorized by the cardholder will not be able to exist for a long time. Oche-

The values of the magnetic field strength near the microcircuit of the card can be seen upon receipt of refusals from payments

Rice. 7.22. The values of the magnetic field strength near the card microcircuit can be seen, upon receipt of chargebacks made in this terminal, it will be determined (as a CPP point) and disconnected from card service.

In the event of a pick-pocketing attack, the data obtained during the processing of the operation is then used to repeat the transaction in the present terminal. In this case, the fraudster clones a pick-pocketing attacked card. It creates a card that simulates the operation of a real card, the behavior of which was established during the execution of a transaction on an unauthorized terminal. In this case, it is also possible to use the intercepted card details in order to use them to carry out fraud on a fake contact card (crosscontamination). A particular danger is the use of intercepted data to perform CNP operations.

Eavesdropping and pick-pocketing attacks are used to obtain data about the details of a real card in order to create on their basis a fake chip card or a card with a magnetic stripe (cross-contamination).

The RFA attack aims to determine the card's asymmetric private key used for dynamic card authentication. Since many transactions on contactless cards are performed offline without the use of cardholder verification, knowledge of this key turns out to be critical for the security of these transactions.

Let us now dwell on the methods of countering the listed attacks. First of all, we note that pick-pocketing and eavesdropping attacks are ineffective when used to counterfeit a chip card. Indeed, if the contactless card is used in the magnetic stripe fashion, then, as explained above, the transaction is authorized online and the card generates a dynamic CW / CVC value, which cannot be counterfeited without knowing the secret key of the card. If the contactless card is used in the EMV fashion, then knowledge of the private asymmetric key of the card is required for successful dynamic authentication of the card application. Therefore, it is not recommended to use the SDA method to authenticate the contactless card application.

When using the Combined Dynamic Data Authentication / Application Cryptogram Generation (CDA) method to authenticate the application, the problem of ensuring the integrity of the exchange of information between the card and the reader is solved. In this case, the data modification attack becomes unfeasible. As a reminder, the CDA method can be used on MasterCard PayPass M / Chip cards. Moreover, this is the method that should be used on contactless MasterCard cards.

The following methods are used to combat cross-contamination. Firstly, static CVC / CW values are not used in contactless cards. Therefore, it is almost impossible for a fraudster to create a magnetic stripe for a fake card based on cross-contamination data.

Second, for issuing contactless cards, the issuer is advised to use separate ranges of card numbers for which CNP transactions are prohibited. Ideally, in order not to reduce the functionality of the card and to make it possible to use it for CNP operations, it is recommended to use different card numbers for the contact and contactless card mods. In this case, the prohibition of CNP operations can only be defined for the card numbers used in the contactless mode.

Note that the use of different card numbers may require revision of the issuer's authorization systems. For example, on MasterCard PayPass M / Chip cards, the card key for generating the cryptogram is shared (the same) by the applications for the contact and contactless card mods. This limitation is removed in the MasterCard M / Chip 4 R2 specification. However, today the key for generating the cryptogram is the same for both applications. Therefore, the issuer, which in its system displays the card key via PAN and PSN (PAN Sequence Number), when using different card numbers for contact and contactless applications, must remember that to withdraw the key when processing a contactless transaction, it is necessary to use the PAN of the contact application.

Third, when using the magnetic stripe mode, the name of the cardholder should not be included in the first track data of the contactless card.

The listed methods are an effective means of combating cross-contamination.

The most severe attack when using contactless cards is the relay attack. As noted earlier, this attack is quickly identified. In addition, payment systems and banks impose restrictions on the maximum size of a contactless card transaction. This reduces the interest of fraudsters in such transactions. Still, a relay attack undermines the confidence of cardholders and banks in contactless card technology.

Today, payment systems offer two approaches to solving the problem. The first approach is to store the card in a special metal case (in-mail shielding). In this case, the card is isolated from the external magnetic field, and therefore it is impossible to influence the card in an unauthorized way.

The second approach consists in the presence of a special button on the card, which must be pressed to activate the contactless interface of the card (Cardholder Card Activation). Apparently, with the development of contactless cards, these methods of protection against relay attacks will be used. In particular, in the new specification MasterCard M / Chip 4 R2, a mechanism for enabling the contact interface of the card (Contactless Interface Switch) has appeared. Switching on the contactless interface can be done by pressing the already mentioned button.

Summarizing the above, the following summary can be made. With a limit on the size of a transaction (up to $ 25 / € 15) and using dynamic offline authentication methods (DDA, CDA), contactless cards are recognized by payment systems as a reliable means of payment.

The following are the anti-fraud methods for contactless cards discussed above:
  • methods of dynamic card authentication (DDA, CDA) allow to avoid attacks such as pick-pocketing and eavesdropping, as well as card counterfeiting;
  • CDA method ensures the integrity of information circulating between the card and the terminal;
  • The Secure Messaging method ensures the integrity and confidentiality of information contained in Script Processing commands when using the full VSDC profile; no other contactless application (profile or mod) uses Script Processing;
  • Cross-contamination: use of separate BIN / PAN for contactless cards / contactless applications;
  • In-mail shielding or Cardholder Card Activation (easily implemented in a cell phone) to combat relay attacks.
Conclusion

Of course, contactless payment technology is at the very beginning of its development and as it spreads, significant changes await us. It is quite obvious that instead of MasterCard PayPass and VISA Contactless, banks want to see a single universal offer for the market, implemented within a single universal application on the card. Surely, such a universal application will eventually appear, just as it happened with the Common Payment Application for contact chip cards.

The changes will also affect communication protocols. Along with the ISO / IEC 14443 standard, other protocols will be used to perform non-cash payments. Here, first of all, the ISO / IEC 18092 protocol, better known as NFC (Near Field Communication), should be mentioned. Using the same frequency range (13.56 MHz) and even being compatible with the ISO 14443 Type A protocol, this protocol provides higher data transfer rates and allows symmetric data exchange when the reader and card are active objects of information exchange (have their own source energy). The introduction of NFC will make it possible to use cell phones, pocket computers, laptops as both a card and a terminal, significantly expanding the possibilities of contactless payments.

EMVCo pays much attention to contactless payment issues. EMVCo has two working groups MPWG (Mobile Payment Working Group) and CLWG (Contactless Payment Working Group). The CLWG is responsible for standardizing all aspects related to the implementation of contactless cards, and the MPWG is responsible for standardizing aspects related to the implementation of mobile payments. The concept of "mobile payments" also includes the use of phones for contactless payments based on the NFC protocol. At the time of this writing, the MPWG is developing the following documents:
  • a general overview document on the architecture of the mobile payments system;
  • the EMVCo Application Management Specification, which defines the procedures for the client to select an instrument for a mobile payment and how the client changes the priorities of instruments / details for making a payment;
  • the EMVCo GlobalPlatform UICC Configuration Profile specification for the SE element used to store the payment application;
  • requirements for the telephone set (in parallel with the GSMA requirements) used for mobile payments;
  • requirements for SE elements and procedures for their testing / certification (Type Approval for SE); requirements are defined, inter alia, for the GlobalPlatform testing procedures and application selection, as well as for card-to-reader communications (NFC);
  • requirements for the use of a PIN-code as a means of verification of the cardholder in contactless payments.
 
Top