Complete Step-by-Step Guide: Programming a Blank JCOP Card with Track Data (Dump)

Student

Professional
Messages
1,671
Reaction score
1,557
Points
113
This guide provides a comprehensive walkthrough for programming a blank JCOP card with magnetic stripe track data (Track 1/Track 2) and PIN functionality. This process involves EMV (Europay, MasterCard, and Visa) chip card authentication and secure messaging operations.

⚠️ Important Legal and Technical Disclaimer​

Before proceeding, please understand:
  • This card cloning tutorial is for educational purposes only
  • Many dumps available online are invalid, expired, or will be declined by modern anti-fraud systems.

📋 Part 1: Understanding the Components​

What is a JCOP Card?​

JCOP (Java Card OpenPlatform) is a smart card operating system for the Java Card platform developed by IBM Zürich Research Laboratory. These cards are programmable and can be configured to emulate various card applications, including payment cards.

What is a "Dump"?​

In the context of this guide, a "dump" refers to magnetic stripe track data consisting of:
  • Track 1: Alphanumeric data containing cardholder name, account number, and other information (format: %B1234567890123456^CARDHOLDER NAME^...)
  • Track 2: Numeric data containing the account number and other information (format: ;1234567890123456=...)
  • PIN: Personal Identification Number associated with the card

EMV Protocols​

Modern payment cards use EMV chip protocols (201, 206, 226). The success of a programmed card depends on:
  • The specific protocol used by the issuing bank
  • The capabilities of your JCOP card
  • Proper ARQC (Authorization Request Cryptogram) generation

🛠️ Part 2: Required Hardware and Software​

Hardware Requirements​

ComponentRecommended ModelsPurpose
JCOP CardNXP J2A040, J2A080, JCOP21 36K/40K, JCOP41 v2.2Blank programmable card
Card Reader/WriterOmnikey 3021, ACR38, MCR200, MSR605XRead/write data to cards
ComputerWindows PC (preferred) or macOS/LinuxRun software tools

Software Requirements​

SoftwarePurposeSource
Java JDK 11Java Card developmentAdoptium or OpenJDK
JCOP Tools/Eclipse PluginJCOP card development and debuggingIBM Zurich Research Laboratory
GlobalPlatformPro (gp.exe)Card management and CAP file loadingGitHub
X2 EMV SoftwareEMV parameter configuration and script editingVarious sources
GPShellScript-based card communicationSourceForge

🔧 Part 3: Setting Up Your Development Environment​

Step 1: Install Java JDK 11​

Windows:
  1. Download OpenJDK 11 from Adoptium
  2. Run the installer
  3. Set JAVA_HOME environment variable:
    • Right-click "This PC" → Properties → Advanced System Settings → Environment Variables
    • Add JAVA_HOME pointing to your JDK installation directory
    • Add %JAVA_HOME%\bin to your PATH

macOS:
Bash:
brew install openjdk@11

Linux (Ubuntu/Debian):
Bash:
sudo apt install openjdk-11-jdk

Step 2: Install JCOP Development Environment​

The JCOP development environment is typically set up as an Eclipse plugin:
  1. Download Eclipse IDE (Eclipse Classic or Eclipse for Java Developers)
  2. Install JCOP Plugin:
    • Open Eclipse → Help → Software Updates → Find and Install
    • Select "Search for new features to install"
    • Create a new local site pointing to your JCOP Tools directory
    • Follow the installation wizard
  3. Create a Java Card Project:
    • File → New → Project → Java Card Project
    • Name your project (e.g., "TestApp")
    • Select GP version and Java Card API version
    • Choose template type: "Basic Java Card applet"
    • Enter Package AID and Applet AID (must share first 5 bytes)

Step 3: Install GlobalPlatformPro (gp.exe)​

  1. Download the latest gp.jar from the official GitHub repository
  2. Rename it to gp.exe (Windows) or create an alias (macOS/Linux)
  3. Place it in a dedicated folder, e.g., C:\GP on Windows
  4. Add this folder to your system PATH

Step 4: Install X2 EMV Software (Optional but Recommended)​

X2 EMV Software provides comprehensive tools for:
  • Configuring JCOP for EMV transactions
  • Setting up ATR2.0 for secure payment processing
  • Using BP Tools for EMV parameter configuration
  • Creating and editing EMV scripts
  • Personalizing cards with CardP

📝 Part 4: Understanding and Preparing Your Dump Data​

Track 1 Format​

Track 1 uses the following format:
Code:
%B[Primary Account Number]^[Cardholder Name]^[Expiration Date]YY[Service Code][Discretionary Data]?

Example:
Code:
%B1234567890123456^CARDHOLDER/NAME^25011234567890123456?

Track 2 Format​

Track 2 uses the following format:
Code:
;[Primary Account Number]=[Expiration Date][Service Code][Discretionary Data]?

Example:
Code:
;1234567890123456=25011234567890123456?

PIN​

The PIN is typically a 4-6 digit numeric code (e.g., 1234).

Extracting Track Data from a Dump File​

If you have a dump file containing track data:
  1. Open the file in a text editor
  2. Locate the Track 1 data (starts with %B)
  3. Locate the Track 2 data (starts with ;)
  4. Note the associated PIN

🔐 Part 5: JCOP Card Default Keys and Authentication​

Default GlobalPlatform Keys​

Most blank JCOP cards come with factory-default GlobalPlatform keys:
Key TypeDefault Value (Hex)ASCII Representation
ENC Key404142434445464748494A4B4C4D4E4F@ABCDEFGHIJKLMNO
MAC Key404142434445464748494A4B4C4D4E4F@ABCDEFGHIJKLMNO
KEK Key404142434445464748494A4B4C4D4E4F@ABCDEFGHIJKLMNO

Verifying Card Communication​

Insert your JCOP card into the reader and run:
Bash:
gp.exe -l

Expected output:
Code:
Warning: no keys given, using default test key 404142434445464748494A4B4C4D4E4F
ISD: A000000003000000 (OP_READY)
     Privs: SecurityDomain, CardLock, CardTerminate, CardReset, CVMManagement

If you see a warning about using the default test key, this is normal and indicates the tool is using the default key for authentication.

GPShell Script for Authentication​

GPShell can also be used to authenticate with the card:
Bash:
enable_trace
establish_context
card_connect
select -AID A0000000030000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494A4B4C4D4E4F -enc_key 404142434445464748494A4B4C4D4E4F

💻 Part 6: Writing the Dump to the JCOP Card​

Method 1: Using X2 EMV Software​

This is the recommended method for most users as it provides a graphical interface and specialized EMV tools.

Step 1: Configure JCOP Card​

  1. Open X2 EMV Software
  2. Insert your JCOP card into the reader
  3. Click "Detect Card" to verify communication
  4. Note the ATR (Answer To Reset) - for JCOP cards, it typically contains "jcop41v22m"

Step 2: Set Up ATR2.0 Configuration​

ATR settings ensure the card reader and card communicate securely:
  1. Navigate to "ATR Configuration"
  2. Select "ATR2.0" protocol
  3. Configure the ATR string to match your JCOP card
  4. Save the configuration

Step 3: Configure EMV Parameters Using BP Tools​

BP Tools allow fine-tuning of acceptance parameters for various payment network requirements:
  1. Open BP Tools within X2 software
  2. Select your EMV protocol (201, 206, or 226)
  3. Configure the following parameters:
    • Terminal capabilities
    • Application selection indicators
    • Transaction limits
    • Cryptogram version number

Step 4: Load Track Data​

  1. Navigate to "Card Personalization" or "Write Data" section
  2. Select "Track Data" option
  3. Enter your Track 1 data in the Track 1 field
  4. Enter your Track 2 data in the Track 2 field
  5. Enter the PIN in the PIN field

Step 5: Configure Cryptographic Parameters​

This is the most critical step for EMV compliance:

ARQC Configuration:
The card must generate an ARQC (Authorization Request Cryptogram) during transactions:
  1. Locate "Cryptogram Settings" or "ARQC Configuration"
  2. Select the appropriate algorithm (typically 001 for MasterCard, 002 for Visa)
  3. Ensure the card has the necessary cryptographic keys pre-loaded
  4. Configure DUKPT (Derived Unique Key Per Transaction) if required

DUKPT Key Derivation:
For enhanced security, DUKPT generates one-time transaction keys:
  1. Import the Base Derivation Key (BDK)
  2. Set the Key Serial Number (KSN)
  3. Configure the key derivation method

Step 6: Create EMV Script​

EMV scripts are vital for card personalization and transaction authorization:
  1. Navigate to "Script Editor" or "EMV Scripts"
  2. Create a new script
  3. Add APDU commands for:
    • Selecting the applet
    • Writing track data
    • Setting PIN
    • Loading cryptographic keys
  4. Test the script using the simulator
  5. Save the script

Step 7: Write to Card​

  1. Click "Write Card" or "Program Card"
  2. Select your EMV script
  3. Confirm the write operation
  4. Wait for completion (typically 30-60 seconds)

Method 2: Using GPShell Scripts​

For advanced users who prefer command-line control, GPShell provides script-based programming.

Sample GPShell Script for Loading an Applet​

Create a file named program_card.txt:
Bash:
# Enable trace for debugging
enable_trace
establish_context

# Connect to the card
card_connect

# Select the Issuer Security Domain
select -AID A0000000030000

# Open secure channel with default keys
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494A4B4C4D4E4F -enc_key 404142434445464748494A4B4C4D4E4F

# Delete existing applets if needed
delete -AID D0D1D2D3D4D50101
delete -AID D0D1D2D3D4D501

# Install the CAP file
install -file your_applet.cap -nvDataLimit 500 -instParam 00 -priv 2

# Close secure channel
close_sc

# Disconnect from card
card_disconnect
release_context

Execute the GPShell Script:​

Bash:
gpshell program_card.txt

Method 3: Using GlobalPlatformPro​

Load and Install a CAP File​

Bash:
gp.exe -install your_applet.cap

Expected output:
Code:
Warning: no keys given, using default test key 404142434445464748494A4B4C4D4E4F
CAP loaded
Installation successful

Verify Installation​

Bash:
gp.exe -l

Expected output:
Code:
Warning: no keys given, using default test key 404142434445464748494A4B4C4D4E4F
ISD: A000000003000000 (OP_READY)
PKG: A00000039742544659 (LOADED)
     Applet: A000000397425446590201 (SELECTABLE)

The presence of (SELECTABLE) means the installation was successful.

🔒 Part 7: Securing Your Card (Changing Default Keys)​

Once your applet is loaded, your card is still in a development state with well-known default keys. For production use, you must change the ISD keys.

Generate New Keys​

Create a new set of three 16-byte (32-character hex) 3DES keys:
Key TypeExample Value
ENC Key00112233445566778899AABBCCDDEEFF
MAC KeyFFEEDDCCBBAA99887766554433221100
KEK Key01010101010101010101010101010101

Change Keys Using GlobalPlatformPro​

Bash:
gp.exe --key-enc 00112233445566778899AABBCCDDEEFF --key-mac FFEEDDCCBBAA99887766554433221100 --key-kek 01010101010101010101010101010101

Test the New Keys​

Bash:
gp.exe -l --key-enc 00112233445566778899AABBCCDDEEFF --key-mac FFEEDDCCBBAA99887766554433221100 --key-kek 01010101010101010101010101010101

Warning: This is a critical step. If you lose the new keys, you will permanently lock yourself out of managing the card.

✅ Part 8: Verification and Testing​

Verify the Write Operation​

  1. Use your EMV software's "Read" function
  2. Read back the card data
  3. Verify that Track 1 and Track 2 data match what you wrote
  4. Test PIN verification

Test the Card​

Using a Test Terminal:
  1. Use a POS simulator or test terminal
  2. Insert the programmed card
  3. Enter the PIN
  4. Observe the transaction response

Using the MuscleCard Applet (if applicable):
For testing with the MuscleCard applet:
Bash:
# Connect to the card
muscle tokens
muscle connect 1

# Verify PIN
muscle verify 0 1234
muscle verify 1 1234

# List keys
muscle listkeys

🔧 Part 9: Troubleshooting Common Issues​

Authentication Failed / Card Not Detected​

Symptoms: Error messages about authentication failure or card not found

Solutions:
  1. Verify the card reader driver is properly installed
  2. Try a different USB port
  3. Check that the card is properly inserted
  4. Ensure you're using the correct default keys: 404142434445464748494A4B4C4D4E4F
  5. Test with gp.exe -l to verify basic communication

Transaction Declined After Writing​

Symptoms: Card writes successfully but transactions are declined

Possible causes and solutions:
  1. Dead dump: The dump may be expired or invalid
  2. ARQC calculation error: Verify cryptographic parameters are correct
  3. Protocol mismatch: Ensure you selected the correct EMV protocol (201, 206, or 226)
  4. Terminal detection: The terminal may detect chip/track data mismatch
  5. Bank decline: The issuing bank may have declined the transaction

Software Crashes or Fails to Write​

Solutions:
  1. Ensure you're using legitimate software versions
  2. Reinstall the software
  3. Try a different USB port
  4. Restart your computer
  5. Test with a different JCOP card

Card is "Fused" or Locked​

Symptoms: Cannot write to the card, error messages about card state

Solutions:
  1. Check the card state with gp.exe -l (should show OP_READY)
  2. If showing SECURED or TERMINATED, the card may be permanently locked
  3. Purchase cards specifically sold as "blank" or "reprogrammable"

ATR Not Recognized​

Symptoms: Card reader doesn't detect the card or shows unknown ATR

Solutions:
  1. Add the JCOP ATR to your software's configuration file
  2. For JCOP41 v2.2, the ATR typically contains "jcop41v22m"
  3. Update your PC/SC drivers

📚 Part 10: Additional Resources​

Key EMV and DUKPT Operations​

The jPOS security module provides methods for EMV operations:
OperationMethodPurpose
EMV ARQC VerificationverifyARQC()Validates cryptogram from chip card
EMV ARPC GenerationgenerateARPC()Generates response cryptogram
Secure Messaging MACgenerateSM_MAC()Generates MAC for secure messaging
DUKPT Key ImportimportPIN(KeySerialNumber)Imports PIN with DUKPT
DUKPT Key DerivationderiveDUKPTKey()Derives one-time transaction key

Useful Commands Reference​

CommandPurpose
gp.exe -lList card contents
gp.exe -install file.capInstall CAP file
gp.exe --delete AIDDelete applet by AID
gp.exe --key-enc KEY --key-mac KEY --key-kek KEYChange card keys
gpshell script.txtExecute GPShell script

🎯 Conclusion​

Programming a blank JCOP card with track data involves:
  1. Setting up the proper development environment (Java JDK, JCOP Tools, GlobalPlatformPro)
  2. Understanding the dump data format (Track 1, Track 2, PIN)
  3. Authenticating with the card using default keys
  4. Using EMV software (X2, GPShell, or GlobalPlatformPro) to write the data
  5. Configuring cryptographic parameters for EMV compliance
  6. Securing the card by changing default keys
  7. Testing and verifying the programmed card

Important Final Notes:
  • Always practice on test cards first
  • Keep backups of your keys and configurations
  • Stay updated with EMV security standards

If you encounter issues, check the card's ATR first, verify your keys, and ensure your reader drivers are properly installed.
 
Top