MCU reverse engineering

Microcontroller Unlock - MikaTech

Our values and goals

About MikaTech

Time went fast, from the day we did our first 8051 MCU reverse engineering project in 1998, to the day we set up our million dollar reverse engineering lab in 2012, 14 years went by. Now we start our new business of embedded visual system development, hope we can serve another 10 years.

sign Peter Lee Co-Founder & CEO

Smart Card Attacking Technologies Overview

1. Introduction

The smart card is a compact intelligent security token fabricated in the standard credit-card form factor. It is a thin plastic card embedded with a miniature integrated circuit chip that serves as the core computational and storage component. Unlike traditional passive storage media, it provides not only non-volatile memory capacity for data retention but also independent on-board computational capability for cryptographic processing and logical judgment. This embedded intelligence differentiates smart cards drastically from legacy magnetic stripe cards and simple contactless tags used in early consumer systems.

The self-contained hardware and software architecture of a smart card makes it inherently resistant to external tampering and remote network-based attacks. It does not need to depend on potentially vulnerable external servers, cloud platforms, or untrusted terminal resources to complete core security operations. All critical authentication, encryption, and data verification tasks can be executed locally within the isolated chip environment. Because of this unique characteristic, smart cards are widely deployed in diverse industrial, governmental, financial, and consumer applications that mandate strong data protection, user authentication, and anti-counterfeiting capability.

There are numerous practical use cases that demonstrate the versatility of smart card security functions. For example, a smart card can act as a government-issued personal identification card used to legally verify the identity and demographic information of the card holder during official inspections. It can also function as an encrypted medical health card that permanently stores a patient’s complete medical history, diagnostic records, medication prescriptions, and allergy data for clinical reference. Furthermore, the smart card can be issued as a contact or contactless credit or debit bank card that supports offline financial transactions without real-time connection to a banking backend server.

All of these real-world applications require the secure storage of highly sensitive private data inside the card’s protected memory space. Typical sensitive assets include the card owner’s biometrics information such as fingerprint templates and facial feature vectors, lifelong personal medical records that are protected by healthcare privacy regulations, and unique cryptographic keys dedicated to authentication, data encryption, and transaction signing. Unauthorized leakage or tampering of these data will lead to identity fraud, financial loss, privacy infringement, and even public health risks.

In the near future, fragmented traditional media will be fully consolidated by multi-application smart card technology. Conventional magnetic stripe cards used for banking, transportation, and membership services will be gradually phased out and integrated into a single unified smart card. This all-in-one device is commonly referred to as an electronic purse or digital wallet within the global smart card industry ecosystem.

As digital transformation accelerates across all industries, the smart card is becoming increasingly significant in modern daily life and digital infrastructure. It will carry far more sensitive, diverse, and mission-critical consumer data than legacy magnetic stripe cards ever did. The data scope will expand from basic identity labels to dynamic transaction logs, biometric templates, and encrypted personal credentials. Therefore, extensive academic and industrial arguments have emerged regarding whether current smart card security mechanisms are sufficiently robust to protect such high-value information against modern attack vectors.

This security question has long been a continuous source of controversy among cryptographers, hardware security engineers, and system designers. While vendors claim inherent security advantages, independent researchers keep discovering new vulnerabilities in commercial card firmware and hardware. This ongoing debate makes a comprehensive and systematic overview of smart card security extremely necessary for current embedded security research.

This paper analyzes the overall security performance of modern smart cards from three core technical dimensions. Firstly, it explores the physical hardware structure of a standard smart card and explains how physical protection mechanisms secure data throughout the entire device lifecycle from manufacturing to disposal. Secondly, it examines the logical file system inside the card and elaborates on how fine-grained logical access controls protect classified data files from unauthorized reading and modification. Thirdly, it discusses standardized procedural operations and cryptographic mechanisms that enable smart cards to build trusted, authenticated execution environments for upper-layer applications.

Before reaching a conclusive judgment on the overall security level of commercial smart cards, this paper also reviews mainstream attack techniques targeting smart card hardware, firmware, and protocols. By comparing defensive mechanisms and offensive exploitation methods, we can draw an objective conclusion on the practical security boundary and application limitations of current smart card technology.

2. Physical Structure and Life Cycle

This section focuses on the physical composition and lifecycle management of standard smart cards. It first breaks down the core hardware components of a contact smart card and explains the function of each structural module. It then divides the entire operational timeline of a smart card into sequential lifecycle phases. It further explores how the on-chip microcontroller manages key distribution, data initialization, and permission handover securely across stakeholders including chip manufacturers, card suppliers, application issuers, and end users.

Through analyzing lifecycle access permission changes, we can clearly identify how physical design, hardware locks, and staged key management jointly protect the confidential information stored on the card throughout its service time. This physical-layer security foundation determines the upper limit of logical and procedural security implemented by card operating systems.

2.1 Physical Structure

The physical dimension, mechanical properties, and electrical interface of smart cards are strictly standardized by a series of International Standards Organisation (ISO) specifications, mainly including ISO 7810, ISO 7816-1, and ISO 7816-2. These unified standards ensure mechanical compatibility and electrical interoperability between smart cards and card acceptor devices worldwide.

In general, a complete contact smart card consists of three fundamental physical elements. The base carrier is a rigid PVC plastic card with fixed dimensions of 85.60mm in length, 53.98mm in width, and 0.80mm in thickness. This size is identical to traditional bank cards and identity cards for user habit compatibility. A miniature printed circuit contact module and a tiny integrated circuit chip are embedded within a precision milled recess on the plastic substrate.

Figure 1 presents a structural overview of a typical contact smart card, showing the relative position of the contact module, bonding wires, silicon chip, and plastic carrier.

Figure 1: Physical structure of a smart card (Source: Philips DX smart card reference manual, 1995)

The on-card printed circuit contact module fully complies with the electrical definition specified in ISO 7816-3. It provides five standard metallic contact points responsible for power input, ground connection, clock signal synchronization, and bidirectional data transmission. The module is hermetically sealed inside the card recess to prevent dust, moisture, and chemical corrosion from damaging internal connections.

The contact pad array is bonded to the underlying circuit chip via ultra-fine gold bonding wires, filled with conductive epoxy resin, and covered by corrosion-resistant insulating sealing material. The exposed metallic contacts protrude slightly from the card surface to ensure stable physical contact with card reader terminals during insertion.

Beyond electrical connection, the printed circuit module also provides basic mechanical protection for the fragile silicon chip. It disperses external bending stress and static electric charges generated by human contact, preventing electrostatic discharge (ESD) from burning out the chip’s internal logic gates. All bidirectional data communication between the chip and external readers is completed exclusively through these standardized contact pads.

The computational storage capability and security performance of a smart card are entirely defined by its embedded integrated circuit chip. A typical smart card IC is a system-on-chip (SoC) integrating four core memory and processing components: an 8/16-bit embedded microprocessor, mask-programmed read-only memory (ROM), static random access memory (SRAM), and electrically erasable programmable read-only memory (EEPROM).

Each memory type undertakes differentiated functional tasks. ROM permanently stores the card operating system and immutable cryptographic algorithm codes that cannot be modified after chip fabrication. SRAM acts as temporary runtime memory for program variables and intermediate cryptographic calculation data, which loses all data once power is removed. EEPROM is the core secure storage area that retains user data, cryptographic keys, and access control parameters permanently without continuous power supply.

Current smart card chips are manufactured from monocrystalline silicon wafers, which possess rigid mechanical properties and are prone to brittle fracture under excessive bending force. To avoid chip breakage when users bend or twist the plastic card in daily use, the silicon die is restricted to a footprint of only a few millimeters in both length and width. This miniaturization is a necessary mechanical compromise that inevitably limits on-chip hardware resources.

In addition to hardware limitations, the standardized physical communication interface also imposes strict bandwidth constraints. The maximum data transmission rate between the IC chip and external card acceptor device (CAD) is limited to 9600 bits per second by ISO protocol regulations. The communication channel adopts a half-duplex bidirectional serial transmission architecture to simplify on-chip transceiver circuit design.

All data exchange behaviors are centrally controlled by the on-chip central processing unit inside the integrated circuit. The CAD sends standardized application protocol data unit (APDU) commands and input payload data to the card. After parsing and executing the command logic, the chip returns execution status words and processed output data to the terminal.

The half-duplex communication mode only allows data transmission in one single direction at any given moment, which prevents simultaneous data injection and signal collision. Combined with the low fixed baud rate, this protocol mechanism effectively blocks high-speed bulk data dumping attacks that attempt to steal full memory contents within a short time window.

Overall, the smart card’s fixed size, thin thickness, and anti-bending mechanical design are primarily engineered to prevent physical damage and daily wear. However, these mandatory mechanical constraints inherently limit the maximum memory capacity and processing power that can be integrated on the tiny silicon die.

As a result, standalone smart cards cannot complete complex interactive tasks independently. They must cooperate with external peripheral devices to realize full functionality. Common external dependencies include user input keyboards, display screens, real-time clock modules, stable power supply circuits, and network communication interfaces.

These external peripherals are usually untrusted and lack tamper-resistant design, forming potential security weak points in the overall system chain. Maliciously modified card readers may tamper with input data or intercept transmission signals, which may degrade the end-to-end security of smart card applications in specific adversarial scenarios.

2.2 Life Cycle of a Smart Card

Every smart card is preloaded with a dedicated lightweight embedded operating system during chip fabrication. The system’s immutable system area stores manufacturer identification numbers, component type codes, unique silicon wafer serial numbers, and hardware configuration profile information for traceability and quality control.

More critically, the protected system partition stores critical root security keys that govern all subsequent permission management. The most important examples are the manufacturer fabrication key (KF) and the application personalisation key (KP). These root keys are never exposed to external terminals and must remain confidential throughout the device lifecycle to prevent supply-chain tampering.

To achieve hierarchical confidential management of root keys and user data, the entire lifespan of a smart card is divided into five sequential operational phases across different responsible stakeholders. Data transfer permissions and memory access rights are incrementally restricted as the card moves to later phases, forming a lifecycle-based access control mechanism.

This staged permission isolation protects immutable factory data, application configuration data, and end-user private data from being overwritten, leaked, or tampered with by unauthorized parties at different supply chain stages. We elaborate on the objectives, operations, and permission rules of each phase in detail below.

2.2.1 Fabrication Phase

This initial phase is completely undertaken by professional semiconductor chip manufacturers in dedicated fabrication foundries. The bare silicon integrated circuit die is etched, doped, and packaged according to the predefined circuit layout. Each chip undergoes comprehensive functional testing to screen out defective units before leaving the factory.

A unique fabrication key (KF) is injected into the chip’s one-time programmable (OTP) memory during this phase. The KF is derived from the manufacturer’s global master root key using a cryptographically secure key derivation function. This unique per-chip key locks the chip’s debug interface and prevents unauthorized firmware modification before the die is assembled onto the plastic carrier.

Besides the confidential KF value, public fabrication metadata including chip batch number, production timestamp, and hardware revision code are also written into the read-only system area. After programming and locking, the chip is permanently protected by the KF mechanism and delivered to card assembly manufacturers as a secure semi-finished component.

2.2.2 Pre-personalisation Phase

This phase is executed by card assembly suppliers who integrate bare chips into finished plastic card carriers. The silicon die is mounted into the pre-milled recess of the printed PVC card, which is pre-printed with the application issuer’s logo, branding information, and user visual area patterns.

Ultrasonic wire bonding is performed to establish stable electrical connection between the chip die and the external contact module. The fully assembled card module undergoes continuity testing, communication testing, and basic memory read-write testing to verify assembly quality.

For supply chain security, the original fabrication key KF is permanently revoked and replaced with the application-specific personalisation key KP after passing assembly testing. This key handover transfers device control right from the chip manufacturer to the application issuing organization.

A non-erasable personalisation lock flag VPER is written into the system memory immediately after KP programming. This lock prohibits any subsequent modification to the KP value and blocks rollback to the previous fabrication security state. Physical memory addressing instructions that directly access underlying silicon storage arrays are permanently disabled at this stage.

From this phase onward, all memory access operations must rely on standardized logical file addressing defined by the card operating system. This fundamental restriction protects the sensitive factory system area and fabrication metadata from being directly read or modified by external low-level probing tools.

2.2.3 Personalisation Phase

This phase is conducted exclusively by authorized application card issuers such as banks, government administrative departments, and telecom operators. Its core objective is to build complete logical data structures and inject individualized user data into the generic card hardware.

The issuer first creates hierarchical dedicated file (DF) directories and elementary file (EF) partitions according to application requirements. Default configuration parameters, application cryptographic public keys, and system access policy rules are written into the corresponding logical files.

Individual user-specific data is then programmed into protected EEPROM storage areas, including the card holder’s legal identity information, personalized transaction PIN code, and secondary unblocking PIN for account recovery. All sensitive user data is encrypted with the KP-derived session keys during writing to prevent interception during the personalisation process.

After completing data injection and integrity verification, a utilisation lock flag VUTIL is written to the system partition. This flag formally marks the end of the personalisation stage and transitions the card to the normal user operational state with full access control policies enabled.

2.2.4 Utilisation Phase

This is the longest phase covering the entire daily usage period after the card is issued to the end holder. All pre-configured application service logic, logical file access control rules, and cryptographic authentication mechanisms are fully activated by the operating system.

During this phase, all information access behaviors on the card are strictly restricted by the security policy predefined by the application issuer. Different files are assigned differentiated read, write, and execution permissions based on file attributes and user verification status.

Users can only initiate authorized operations such as transaction verification, identity authentication, and data query through compliant card reader terminals. Low-level memory modification, debug access, and unauthorized file dumping are permanently blocked by system firmware constraints. The detailed logical access control rules governing this phase will be elaborated in the next section of this paper.

2.2.5 End-of-Life Phase (Invalidation Phase)

A smart card enters the end-of-life invalidation phase when it is no longer legally usable for its original application purposes. There are two distinct trigger mechanisms that initiate this irreversible state transition, each leading to different permission blocking scopes.

The first mechanism is application-initiated invalidation. The backend application server writes a global or file-specific invalidation lock flag into the card’s master file or designated elementary files. Once the lock is set, the card operating system disables all data write, update, and deletion operations across the entire device.

Only basic read access may remain available for post-termination data auditing and security analysis purposes. This mechanism is commonly used for expired bank cards, invalidated access badges, and terminated subscriber SIM cards.

The second mechanism is security-triggered irreversible blocking. When the user continuously enters incorrect PIN and unblocking PIN beyond the system-defined retry limit, the on-chip security controller permanently locks all access pathways. In this scenario, even basic read operations are fully prohibited to prevent attackers from extracting residual sensitive data from the locked card.

The following Table 1 systematically summarizes the memory access modes, permission scopes, and data operability of different storage areas across all five lifecycle phases mentioned above.

Table 1: Phases and access rights of smart card's life cycle (Source: Philips DX smart card reference manual, 1995)

Areas/Phases

Fabrication

Pre-personalisation

Personalisation

Utilisation

End-of-Life

Access mode

Physical addressing

Logical addressing

Logical addressing

Logical addressing

Locked addressing

System

Full access

Not accessible

Not accessible

Not accessible

Not accessible

Fabrication (keys)

Write KF

Write KP, revoke KF

Not accessible

Not accessible

Not accessible

Fabrication (data)

Read, write, erase

Read only

Read only

Read only

Partial read

Directory

Read, write, erase

Read, write, erase

Logical access control

Logical access control

Restricted read

Data

Read, write, erase

Read, write, erase

Logical access control

Logical access control

Locked

Optional code

Read, write, erase

Not accessible

Not accessible

Not accessible

Not accessible

3. Logical Structure and Access Controls

After a smart card is formally issued to an end consumer by the application provider, physical-layer security mechanisms are no longer adjustable, and core data protection tasks are fully undertaken by the on-card application operating system. The low-level physical memory addressing mode is permanently disabled to block hardware-level memory probing attacks.

All data read, write, and execution operations must be implemented through the standardized hierarchical logical file structure defined by the ISO 7816-4 protocol. This section elaborates on the organizational rules of the smart card logical file system and explains how fine-grained access control policies embedded in file headers achieve classified data protection.

3.1 Logical File Structure

From the perspective of data storage management, a smart card can be abstracted as a miniature secure disk drive with a tree-based hierarchical file organization system. Its directory tree architecture shares high similarity with the classic MS-DOS file system used in early personal computers.

At the root of the entire tree lies the master file (MF), which functions identically to the root directory of a disk file system. All other directories and files are subordinate nodes branching from this root node. Under the master file, two basic file types are defined: elementary files (EFs) for pure data storage and dedicated files (DFs) serving as subdirectories.

Dedicated files act as functional subdirectories used to group related application files and isolate service domains. Each dedicated file can contain multiple child elementary files for storing categorized business data. Multiple levels of nested dedicated files can be created to form complex multi-layer directory trees for large-scale multi-application cards.

The most prominent difference between smart card file systems and MS-DOS is that dedicated directory files on smart cards can also store embedded configuration data and domain-specific access policy parameters, while PC directories only store file metadata without user data. This design enhances domain isolation capability for multi-application scenarios.

Figure 2 presents a visualized logical tree view of a standard smart card file structure, demonstrating the hierarchical relationship between the master file, dedicated subdirectories, and data elementary files.

Figure 2: Logical file structure of smart card

In standardized smart card terminology, the master file consists of two parts: a fixed header storing root system attributes and a body segment recording the header pointers of all direct child dedicated files and elementary files. This pointer table enables fast tree traversal during file selection operations.

A dedicated file is defined as a functional collection including its own header information and all immediate child files under its directory branch. It establishes an independent security domain where uniform access policies can be applied to all subordinate files collectively.

An elementary file is the basic data storage unit, composed of a standardized attribute header and a variable-length data body. The header records core metadata, while the body exclusively stores user data, cryptographic keys, biometric templates, or transaction records.

Different smart card operating systems adopt differentiated internal data management modes for elementary files. Some simple systems manage data purely by byte offset and length pointers for fast random access. Advanced systems such as the GSM SIM card OS organize data into fixed-length or variable-length structured records for standardized telecom service management.

Regardless of the internal data organization mode, any read or write operation targeting a specific file must complete a formal file selection command first. This operation is equivalent to opening a file handle in conventional computer operating systems and is a mandatory precondition for all data interactions.

The logical file access mechanism is automatically activated immediately after the card is powered on by the reader terminal. The master file is selected by default upon initialization to establish the root access context for subsequent operations. The file selection command supports three types of tree traversal movements.

Descending movement allows operators to select child dedicated files or elementary files from the current parent directory to enter deeper layers of the tree. Ascending movement enables returning to upper-level parent directories or the root master file from subordinate nodes. Horizontal movement supports direct switching between sibling elementary files under the same dedicated file directory.

After a file selection command is successfully executed, the terminal can retrieve the complete header information of the targeted file. The header contains critical metadata including unique file identifier, functional description label, storage type classification, total data size, and most importantly, security attribute fields.

The security attribute field explicitly defines the access condition prerequisites and current operational status of the file. All data access behaviors targeting the file body are strictly permitted or rejected based on whether the terminal and user satisfy these predefined attribute conditions.

In summary, the smart card file system draws core architectural inspiration from classic operating systems such as MS-DOS and UNIX. To meet embedded security requirements, it enhances file headers with dedicated access condition bitmaps and runtime status flags. Optional file permanent lock mechanisms are also added to disable access to sensitive files permanently. These layered logical mechanisms form the core software-based data protection system of modern smart cards.

3.2 Access Control

The smart card logical access control system focuses primarily on fine-grained file permission management. Every independent file on the card is bound with a standardized attribute header that records its access prerequisites, real-time verification status, and security lock flags. The entire permission framework is fundamentally built upon personal identification number (PIN) verification and stateful PIN management logic.

3.2.1 Levels of Access Conditions

The ISO 7816-4 standard defines five core hierarchical access condition levels for smart card files. Individual card operating systems may extend additional custom levels to meet specialized application requirements such as telecom domain management or governmental classified data storage.

The five standard access levels are defined as follows. The Always (ALW) level grants unrestricted access permission; any compliant terminal can perform read or write operations on the file without prior user verification. This level is commonly used for public static information such as card manufacturer data and service introduction text.

The Card Holder Verification 1 (CHV1) level requires the valid primary user PIN to be successfully verified before file access is permitted. This is the most widely used protection level for personal financial and identity data files in daily applications.

The Card Holder Verification 2 (CHV2) level relies on a secondary independent PIN code for authorization. It is usually applied to high-risk operations such as key modification, card parameter reset, and large-value transaction authorization to provide dual-factor user verification.

The Administrative (ADM) level is reserved exclusively for official issuer management terminals. The definition of ADM verification rules and credential distribution is fully controlled by the application administrative authority, independent of user-held PIN codes.

The Never (NEV) level permanently prohibits all external access to the file under any circumstances. This level protects immutable root keys, factory configuration data, and algorithm confidential parameters that must never be exposed outside the chip.

It is critical to note that these access condition levels do not form a hierarchical inclusion relationship. Successful verification of CHV2 does not automatically grant permission to files requiring CHV1 authentication. Each access condition must be independently satisfied before the corresponding file can be selected and accessed.

3.2.2 PIN Presentations

The primary and secondary PIN values are stored in dedicated protected elementary files named EFCHV1 and EFCHV2 respectively. These two files are configured with strict ADM-level write permissions during personalisation to prevent unauthorized PIN tampering by end users or malicious terminals.

Legitimate PIN modification can only be completed by issuing the official CHANGE PIN APDU command, which requires the correct old PIN value and the intended new PIN value as mandatory input parameters. This mechanism prevents brute-force overwriting of PIN codes through arbitrary memory write commands.

Nearly all commercial smart card operating systems implement an automatic PIN blocking mechanism against brute-force guessing attacks. If a consecutive sequence of invalid PIN values is submitted beyond the predefined retry threshold, the corresponding PIN will be immediately locked by the on-chip security controller.

The maximum retry count varies across different card platforms; most banking and identity cards adopt a 3-attempt limit, while low-risk membership cards may allow 5 or more retries. Once locked, all files dependent on this PIN for access become completely inaccessible to external terminals.

PIN unblocking operations require the user to submit the dedicated unblocking PIN stored in another protected file on the card. The unblocking PIN also has its own independent retry limit to prevent secondary brute-force attacks targeting the recovery mechanism.

If the unblocking PIN is continuously entered incorrectly beyond its threshold, the system triggers irreversible global blockage. Both the user PIN and recovery PIN are permanently invalidated with no recovery pathway available. Some high-security cards will further lock the entire device to prohibit all subsequent operations to eliminate attack surfaces completely.

3.2.3 PIN Management

To implement stateful PIN blocking, unblocking, and retry counting logic, each CHV verification object is equipped with two dedicated anti-corruption counters stored in EEPROM. These counters adopt redundant storage encoding to avoid data errors caused by abnormal power interruption during write or erase cycles.

The PIN management system defines three exclusive operational states to govern all verification behaviors. The first state is successful PIN presentation. When the user submits a correct PIN value, the corresponding retry counter is reset to the maximum allowed attempt number. All files and functions bound to this PIN condition become accessible for subsequent operations.

The second state is missing or incorrect PIN presentation. Every invalid PIN submission decreases the retry counter value by one unit. All access operations requiring this PIN as a precondition are immediately rejected by the operating system. When the counter reaches zero, the state transitions to permanent PIN blockage.

The third state is PIN locked status. In this state, not only PIN-dependent file operations are blocked, but even the standard PIN verification command itself is disabled. The only permitted remedy is executing the dedicated UNBLOCK PIN command with valid recovery credentials.

If the correct unblocking PIN is verified, the original user PIN counter resets, and the card returns to the normal usable state. If invalid unblocking attempts exhaust the secondary counter limit, irreversible blockage occurs, and the card can never recover its original function.

In summary, smart cards achieve flexible and robust data protection through dual-layer logical access control. Individual files can be protected via independent header access conditions, while grouped files under the same dedicated directory share unified domain-level permission policies. The irreversible blocking mechanism provides the highest security level against large-scale brute-force intrusion attempts.

4. Procedural Protection

After analyzing the physical hardware defenses and logical file access controls of smart cards, this section focuses on procedural security applications in real-world scenarios. It explains how to leverage the on-card computing capability and trusted storage to build end-to-end secure application systems beyond standalone card protection.

Benefiting from independent on-board cryptographic processing power, smart cards support fully offline identity verification and transaction authorization without relying on real-time cloud server connectivity. This offline capability is the core advantage that distinguishes smart cards from network-dependent cloud authentication tokens.

A typical offline security workflow adopts mutual active authentication between the smart card and the card acceptor device. Both parties verify each other’s cryptographic credentials before formal data interaction, preventing man-in-the-middle attacks using fake reader terminals.

Furthermore, core firmware code and root data stored in card memory are encrypted by the chip manufacturer using proprietary hardware scrambling algorithms during fabrication. This hardware-level encryption makes the underlying circuit logic extremely difficult to reverse engineer and counterfeit.

Modern smart cards can also be seamlessly integrated with mainstream security technologies such as asymmetric public-key cryptography and biometric recognition. This cross-technology fusion enables high-assurance trusted applications that are far more secure than traditional single-factor authentication systems.

This section selects three representative application domains to demonstrate how procedural mechanisms based on smart cards enhance overall system security, including electronic document identification, distributed network authentication, and local operating system access control.

4.1 Identification of Documents

Traditional paper-based identity documents including physical ID cards, driving licenses, passports, and travel visas have long been recognized as inherently unreliable. Their visible information can be easily copied, altered, and counterfeited with basic office equipment.

With the popularization of high-resolution color printers, scanners, and digital image editing software, ordinary individuals can produce near-perfect forged paper documents at low cost. This makes manual visual inspection by administrative officers increasingly ineffective for anti-counterfeiting verification.

The smart card is currently the most mature and practical solution to resolve document forgery risks. All printed personal information, portrait photographs, and credential metadata can be digitized and encrypted before being stored in the card’s protected EEPROM area.

By configuring fine-grained file access conditions and administrative passwords, only authorized government departments and certified inspection terminals can decrypt and read the confidential identity data inside the card. Ordinary consumer card readers cannot access sensitive core information.

When combined with biometric technology, the smart card can store encrypted fingerprint templates, iris feature data, or facial recognition vectors of the card holder. During verification, the card cooperates with a dedicated biometric scanner to compare real-time collected biological data with the on-card template, completing intrinsic user identity authentication.

This two-factor verification combining token possession and biological characteristics fundamentally eliminates identity impersonation risks that plague traditional paper documents. The overall reliability of identity verification is improved by multiple orders of magnitude.

The operational workflow of smart card identification systems retains the user-friendly logic of traditional paper document inspection. Instead of relying on human visual judgment, verification is completed automatically through cryptographic comparison by certified card acceptor devices.

The authorized terminal contains preset administrative keys to unlock the protected identity files on the card and extract standardized verification data for backend cross-checking. For biometric scenarios, the user presents the required body feature to the scanner, and comparison logic is executed locally between the scanner and the card.

Many international governments and aviation enterprises have already deployed smart card-based identification systems in practice. Multiple international airlines are developing electronic boarding passes embedded on contactless smart cards linked to airport baggage handling systems.

The smart card stores encrypted passenger information including full name, seat allocation, flight number, timestamp, and baggage manifest data. It enables automatic passenger check-in verification, baggage ownership tracing, and lost luggage recovery throughout the travel process.

More importantly, the traceable encrypted data on smart cards assists public security authorities in screening high-risk individuals such as criminals and terrorists during border control and aviation security inspections.

It is widely anticipated that smart card electronic identification will become the mainstream trend replacing traditional paper certificates in the next decade. The volume and sensitivity of stored personal data will continue to grow rapidly.

Therefore, the current PIN-only single-factor access control system will no longer meet future security requirements. It is suggested that next-generation smart card operating systems integrate advanced asymmetric authentication algorithms to realize multi-factor protection for individual files and the entire system kernel.

4.2 Authentication in Kerberos

In an open distributed computing environment (DCE), client workstations cannot be fully trusted to correctly authenticate local users. These terminals are often deployed in uncontrolled public areas, far away from centralized security management servers, and may be physically accessed by unauthorized personnel.

Malicious intruders can manipulate untrusted workstations to launch network attacks, forge user identities, and illegally obtain sensitive data that they are not authorized to access. Reliable third-party authentication mechanisms are essential to defend distributed systems against remote identity spoofing attacks.

Kerberos is a classic symmetric-key third-party authentication protocol designed specifically for distributed network environments. It establishes a trusted mediation mechanism between clients, application servers, and dedicated authentication servers to prevent unauthorized cross-domain access.

The standard Kerberos authentication workflow follows a three-tier ticket granting logic. When a client requests access to a target service, it first submits identity information to the Kerberos Authentication Server (AS) to apply for an initial authentication ticket.

After validating the client’s basic identity, the AS issues a ticket-granting ticket (TGT) encrypted with the user’s password-derived key. The client then presents the TGT to the Ticket Granting Server (TGS) to apply for a service-specific access ticket.

Finally, the client submits the service ticket to the target application server, which verifies the ticket validity before granting authorized service access. Figure 3 illustrates the complete interactive logic of the Kerberos authentication protocol.

Figure 3: Kerberos authentication protocol (source: Jennifer & Clifford & Jeffrey, 1988)

This protocol ensures that application servers only provide services to legally authenticated clients who possess valid access credentials. The core security assumption of classic Kerberos is that only the legitimate user holds the correct password required to decrypt personalized tickets.

However, this design contains an inherent security flaw. The initial user authentication is completed at the workstation side rather than the server side. An attacker can intercept another user’s encrypted ticket offline and launch password guessing brute-force attacks to decrypt the credential.

Mark and Gary explicitly pointed out this critical vulnerability in their 1995 paper titled "Integrating Smart Card Into Authentication Systems". They proved that pure password-based Kerberos cannot resist offline credential cracking attacks in untrusted workstation scenarios.

To remedy this defect, the authors proposed integrating secure smart card tokens into the Kerberos authentication framework. Six enhanced integration schemes were designed to introduce hardware-based user verification at the initial authentication stage.

The core improvement of all schemes is enforcing two-dimensional user authentication: users must both remember a confidential password and possess a physical smart card token to obtain valid initial tickets. This possession-knowledge dual-factor mechanism prevents credential theft and impersonation.

The detailed technical differences between the six integration schemes are not elaborated in this paper, as they belong to specialized network protocol optimization research beyond our scope. This case sufficiently demonstrates how smart card procedural mechanisms can fundamentally enhance the security of mature distributed authentication systems.

4.3 Access Control On Operating System

System-level access control is one of the original core design motivations for smart card security technology. Beyond user authentication and transaction protection, smart cards can also be used to harden the boot integrity and access permission of personal computer operating systems.

The core idea of smart card-based OS protection was first proposed by Paul and Lance in their 1994 paper "BITS: A Smartcard Protected Operating System". This design targets the inherent security defects of traditional single-user personal computer architectures.

Standard personal computers adopt an open single-user runtime model with no built-in permission isolation for system critical areas. The hard disk boot sector, master partition table, and core kernel code can be freely modified by any local user without authorization checks.

This open architecture leads to severe virus infection risks. Malicious boot-sector viruses can rewrite startup logic, tamper with kernel parameters, and persistently reside in system areas without detection. With modern PCs evolving into low-cost network servers, this inherent vulnerability poses more serious network security threats.

Paul and Lance proposed the Boot Integrity Token System (BITS) that leverages smart card secure storage and cryptographic computation to enforce trusted PC boot processes. The core principle is decoupling critical boot verification data from the local vulnerable hard disk and storing it on an isolated tamper-resistant smart card.

The host computer cannot complete the full boot sequence independently. It must obtain encrypted boot integrity parameters and verification keys from the inserted smart card to initialize the operating system kernel.

Even if an attacker gains full physical access to the PC hardware and tampers with local boot files, the missing smart card verification data will block the startup process completely, preserving system integrity against offline tampering.

The BITS framework enforces two-way mutual authentication before boot completion. First, the user authenticates themselves to the smart card via a preset login PIN to unlock the token’s secure storage area.

Second, the host PC verifies the smart card’s legitimacy by decrypting a shared secret key stored on the token. Only after both authentication steps pass will the card release the signed boot section information to the host.

The PC then loads the verified boot data and completes the normal kernel initialization process. All subsequent system operations run under the integrity-verified trusted environment established by the smart card.

Additionally, the smart card can store precomputed cryptographic checksums of critical system executable files and driver modules. During runtime, the OS can query the card to verify file hash values instead of relying on traditional signature-based virus scanning.

This integrity verification mechanism can detect unknown modified files and polymorphic malware that evade signature databases, providing proactive system defense. In general, embedding smart card hardware trust anchors significantly improves the overall security level of traditional personal computer operating systems.

5. Attacks on Smart Card

From the physical, logical, and procedural protection analysis above, smart cards appear to be powerful security tools providing trusted execution environments and confidential data storage. Most commercial smart card operating systems also integrate built-in cryptographic accelerators not mentioned in previous sections.

These on-chip cryptographic modules support real-time data encryption and decryption for application workflows. Advanced chips also implement true random number generators to dynamically generate unpredictable session keys for transaction and communication encryption.

Naturally, the confidential cryptographic algorithms, permanently stored secret keys, and hierarchical access control logic inside smart cards become the primary targets of malicious attackers. Many security companies and professional cryptographers have published research proving that current commercial smart card microcontrollers can be compromised under specific adversarial conditions.

Existing smart card attack vectors can be classified into three major categories: non-invasive logical software attacks, invasive physical hardware attacks, and mathematical cryptanalytic attacks targeting algorithm weaknesses. This paper briefly reviews the first two practical attack types and their implementation principles.

Mathematical cryptanalytic attacks rely on complex abstract mathematical derivation, large-scale algorithm computation, and advanced cipher structure analysis. Their theoretical complexity and formula scope exceed the undergraduate-level overview range of this paper, so they are not discussed in detail in subsequent content.

5.1 Logical Attacks

All secret key material and user privacy data of smart cards are stored in rewritable EEPROM memory arrays. The electrical characteristics of EEPROM storage cells are highly sensitive to external operating conditions including supply voltage and ambient temperature.

Attackers can induce abnormal memory read errors and instruction mis-execution by intentionally raising or lowering the supply voltage provided to the card microcontroller. These voltage glitches leak internal sensitive state information that should remain confidential during normal operation.

Ross Anderson and Markus Kuhn summarized multiple voltage-based logical attack cases in their 1996 landmark report "Tamper Resistance - A Cautionary Note". These practical experiments proved that low-cost electrical disturbance can bypass native smart card security locks without physical chip disassembly.

A classic well-documented case targets the Microchip PIC16C84 embedded microcontroller widely used in early low-end smart cards. The chip’s global security lock bit can be forcibly cleared by raising the main supply voltage VCC to a level 0.5V below the programming high voltage VPP during bulk memory erase operations.

Another typical logical attack targets the Dallas Semiconductor DS5000 dedicated security processor. A brief nanosecond-scale voltage drop on the power rail can temporarily release the firmware security lock mechanism without erasing the underlying confidential key data stored in EEPROM.

Low voltage disturbance also induces secondary cryptographic vulnerabilities. The analog true random number generator embedded in many smart cards will output nearly all-1 binary sequences when the supply voltage is slightly lower than the rated operating range. This predictable weak randomness completely breaks the security of dynamically generated session keys.

To defend against such environmental disturbance attacks, some high-end security processors integrate dedicated voltage and temperature sensor circuits. The sensor triggers a system alarm and erases sensitive keys once abnormal operating conditions are detected.

However, these sensor modules frequently generate false positive alarms during card power-up transients. Voltage fluctuation during circuit initialization is misjudged as malicious tampering, leading to unnecessary key erasure and card failure. This stability defect limits the large-scale deployment of sensor-based defense mechanisms in commercial products.

5.2 Physical Attacks

Invasive physical attacks are the most direct and destructive type of smart card penetration method. This attack path requires direct contact and modification of the silicon chip die, which cannot be completed without removing the chip from the original plastic carrier.

The preliminary chip depackaging process uses simple manual tools. Attackers cut away the plastic substrate behind the chip module with a sharp precision knife until the epoxy resin encapsulating the silicon die is fully exposed.

Concentrated fuming nitric acid with a purity exceeding 98% is then applied to dissolve the protective epoxy resin layer. After resin decomposition, the card is cleaned repeatedly in acetone solution to wash away chemical residues, exposing the bare silicon die surface completely for probing and analysis.

Researchers at the Cavendish Laboratory, University of Cambridge, developed a standardized chip reverse engineering technique based on this depackaging workflow. By layer-by-layer delayering and electron microscope scanning, the complete circuit layout and functional logic of the smart card chip can be fully reconstructed.

IBM researchers proposed a complementary dynamic analysis technique that uses electron beam probing to observe the real-time voltage changes of internal logic gates during chip operation. Combining static layout reconstruction and dynamic runtime observation, attackers can fully reveal all algorithm secrets and key storage locations inside the chip.

Beyond mainstream delayering and probing, there are multiple other mature physical attack variants. Ultraviolet light irradiation can erase EPROM-based security lock bits to unlock debug interfaces. Precision microprobe needles can directly contact internal bus lines to intercept real-time data transmission signals.

Advanced laser cutter microscopes can perform targeted gate destruction and localized memory erasure to alter chip functional logic. Despite their effectiveness, all these physical attack tools and chemical materials require professional laboratory infrastructure and high procurement costs.

As a result, invasive physical attacks are currently limited to well-funded professional security laboratories and large-scale research institutions. Individual amateur attackers cannot afford the financial and technical threshold to deploy these hardware-level exploitation methods.

6. Conclusion

This paper systematically discusses the physical hardware composition, embedded microcontroller architecture, hierarchical logical file system, and fine-grained access control mechanisms of modern smart cards. The complete lifecycle security management workflow from fabrication to invalidation is also sorted out in detail.

Based on comparative analysis with traditional magnetic stripe media and paper documents, we confirm that smart cards provide significantly higher data confidentiality, tamper resistance, and anti-counterfeiting performance than legacy information storage and transaction media.

Three typical practical application scenarios are presented to verify that smart card technology effectively enhances the overall security, data integrity, and authentication reliability of identity management, distributed network systems, and local computer operating systems.

The latter part of the paper reviews mainstream logical and physical attack vectors targeting commercial smart cards. The existence of these feasible attack methods does not mean that smart card technology is fundamentally insecure and unreliable for practical deployment.

It is essential to recognize that targeted attacks against security devices are ubiquitous across all cryptographic systems. No existing information technology product can claim absolute zero vulnerability or 100% unbreakable security; such absolute claims are technically irresponsible and academically unscientific.

The core criterion for judging whether a security system is practically secure lies in whether its protection strength and attack cost threshold match the risk level of its application scenario. Low-value consumer applications only require basic anti-forgery capability, while financial and governmental scenarios demand high-cost attack resistance.

Furthermore, nearly all currently published smart card attacks belong to Class III high-cost organized attacks. The financial cost and time investment required to break a commercial card far exceed the economic value of the device itself. Some mathematical attacks require hundreds of years of brute-force computation to compromise a single transaction key.

Embedded semiconductor technology advances rapidly with annual iteration of manufacturing processes and security firmware. Smart card manufacturers continuously upgrade hardware sensors, encryption algorithms, and access control logic to fix newly discovered vulnerabilities in a timely manner.

Once underground hackers discover new exploitation

General Questions About Microcontroller Firmware Extraction


  • Is it safe to send payment to MikaTech ?

    If MikaTech was a bad company, you could find tons of bad reputations about its service on the internet over the 28 years history

    So, the answer is YES! We are good people.

    Why choose Mikatech, please click here to find out


  • Can Mikatech break ics not listed on this site ?

    Different chip manufacturers have different part numbers, but the inner core of the chip can be make with same technology, it would be quite impossible to list all the part numbers where our technology can apply such as MYSON, STK, FEELING, ANALOG, FUJITSU, NOVATEK, LG/HYNDAI.

    Also by the advancing of the technology, everyday we gain more and more experience and develope new methods for reverse engineering for different Intergated Circuit parts. Full list of Integrated Circuit part numbers which is within our scope of capability is always getting bigger, please contact us to find out.

  • Will my privacy be protected ?

    Mikatech Innovative Limited understands the importance of its clients' privacy. At the moment you contact Mikatech, the personal information from you will be put under protection by our management regulations which was developed by our years of practice, Mikatech uses these information to customize its service to you, it will never disclose these information to third party out of any reason.
    Every project we did, we will delete all the data, materials, and codes 60days after deliverig the files, it iwll protect us and protect your privacy.

  • Is it legal to get service from Mikatech ?

    Yes, it is totally legal.
    Mikatech deliver its reverse engineering services for educational purposes only, it can be illegal to use above mentioned services in some coutries or regions, please check your local laws. Mikatech does not take any responsibility in relation to the use of above mentioned services that may be considered illegal.


  • I sent you an email, why there is no answer ?

    • A. Our mail server is temperally broke down, your message has not been delivered to our mailbox even the mail sent successfully message is showed on the screen, please contact us again.
    • B. Our email is recognised as junk mail email by your mail server, so our reply has been rejected by your mail server or it is diverted to your junk mailbox, please remove our account from junkmail list or check your junk mailbox, or use another email account to contact such as gmail.
    • C. Your email is recognised as junk mail email by our mail server, so your email was put to our junk mailbox, please use another email account to contact us again.

    microcontroller_hack_time

    Years

    28 +
    microcontroller hack countries

    Countries

    110 +
    microcontroller attack clients

    Clients

    5000 +
    microcontroller projects unlocked

    Projects

    60000 +