Habr•October 5, 2026•🇷🇺Translated from Russian

Secure Personalization of Java Card Applets Using Issuer Security Domain and SCP02

The tutorial demonstrates an elegant approach to secure Java Card applet personalization by relying on the built-in security features of the Issuer Security Domain instead of custom asymmetric cryptography implementations.

Background and Problem Statement

Previous examples using ECDH for session key derivation required significant testing resources and failed to provide authentication, allowing any party knowing the elliptic curve parameters to extract secrets. The new method avoids these issues by delegating security to the GlobalPlatform card manager.

The use case involves an access control system where employee data (name, department, position, validity period) must be written or updated only by authorized parties over a protected channel. Any reader can retrieve the data, but it is returned encrypted with AES-128. The applet must securely receive and periodically update the 16-byte key throughout the card lifecycle.

Applet Implementation Details

The constructor simply allocates a 255-byte buffer for personal information. Heavy cryptographic objects such as AESKey and Cipher are instantiated after installation to avoid 6F00 errors on NXP cards during the INSTALL for install command.

The install method follows GlobalPlatform guidelines by passing the instance AID to register(). The process method handles three proprietary instructions for setting the secret key, writing personal data, and reading personal data, while unknown instructions are routed to mutual authentication.

A helper method determines whether an instruction carries command data, ensuring setIncomingAndReceive is called only when needed. Comprehensive try-catch blocks convert CryptoException reasons into informative status words instead of generic 6F00 errors.

Secure Channel Usage

The applet obtains a SecureChannel instance in select() via GPSystem.getSecureChannel and resets it in deselect(). Unknown APDUs invoke scp02.processSecurity, which handles INITIALIZE UPDATE and EXTERNAL AUTHENTICATE commands according to the negotiated security level.

The update_secret_key method calls unwrap with an adjusted length to account for the CLA offset, then verifies that the security level includes C_DECRYPTION before installing the AES key. The set_person_info method applies a lower requirement of C_MAC only.

Reading personal information simply initializes the AES cipher in encryption mode and returns the ciphertext. All operations are tested using the FunGP Python library, which supports multiple SCP02 security levels configurable at mutual authentication time.

Related articles

Securitylab•Other

Decoding Windows 10 and 11 Error Codes: How to Identify Root Causes and Fix System Failures

Windows frequently reports problems using codes that seem aimed only at developers, leaving users to decipher issues like 0xc000007b, 0x800f081f, and Kernel-Power 41 on their own. The article explains that error codes typically describe failed operations rather than underlying causes, such as access denials stemming from permissions, security software conflicts, or corrupted components. It provides a structured diagnostic approach starting with version checks via winver, context analysis of when errors occur, and preservation of critical data before troubleshooting. Detailed tables cover common codes across update, application launch, driver, and boot failure categories, while sections address Blue Screens of Death, Windows Update problems, driver errors like Code 43, and event log analysis. Recovery methods including DISM, SFC, safe mode, and point-in-time restore are outlined with warnings against risky generic fixes. The guide emphasizes sequential diagnosis to avoid data loss and notes the end of Windows 10 support.

Habr•Other

Prod is Down: Free gVisor-Based Simulator Gives Strangers Root Access for Realistic Linux Incident Training

A Russian systems administrator has launched Prod is Down, a free online platform that lets users practice real incident response by granting them root consoles on deliberately broken Linux servers. The tool currently offers 13 scenarios covering PostgreSQL failures, OOM Killer events, full disks, expired certificates, nginx 502 errors, inode exhaustion, DNS issues, and open file limits. Each exercise runs inside gVisor sandboxes with strict resource limits, internal-only networking, and automated verification that checks service health rather than player commands. The author implemented an emulated systemd in Python so trainees can use familiar systemctl and journalctl commands without running a real init system. Multiple layers of isolation, including overlay filesystem tweaks and size monitoring, prevent abuse while still allowing sudo and realistic debugging. The platform records three random variants per scenario so memorized fixes from previous runs do not work on subsequent attempts.

Habr•Other

Home Lab Guide: Deploying Active Directory, Windows 7 Client and ELK Stack for Security Logging

A detailed tutorial walks readers through building an isolated VirtualBox lab featuring a Windows Server 2019 domain controller with DNS and DHCP, a Windows 7 client joined to the domain, and an ELK stack running Elasticsearch, Logstash and Kibana 9.4.2. The guide covers creation of organizational units, Group Policy Objects for advanced auditing, and configuration of Winlogbeat 7.17 to forward Security, System and Application logs to Logstash. Special attention is given to common pitfalls such as missing GPO extension attributes that prevent audit policies from applying and memory constraints when running the full ELK stack on limited RAM. The author emphasizes that Windows 7 is unsupported and should only be used in isolated lab networks. All steps are provided with exact PowerShell commands, netplan configurations, and Logstash pipeline examples suitable for a 192.168.100.0/24 NAT network.

Securitylab•Other

Building Your First Home Network Lab: Essential Tools and Experiments to Understand Corporate Networks

A cybersecurity professional without network knowledge resembles a guard without a building blueprint, spotting alarms but unable to trace the intruder. Setting up a personal lab on a standard computer bridges this gap through virtualization and hands-on practice with protocols and attacks. The guide recommends GNS3 for topology emulation, VirtualBox or VMware for running Windows and Linux workstations, Cisco Packet Tracer for quick simulations, Wireshark for traffic analysis, and draw.io for diagramming. Key experiments include configuring Cisco IOS routers with IP addressing, testing default gateways, observing ARP requests and replies, triggering broadcast storms via switch loops, and enabling STP to prevent loops. The lab demonstrates how legacy protocols like ARP expose networks to spoofing and why segmentation with VLANs and firewalls matters. Resources from CyberED provide demo access to courses on SOC analysis, penetration testing, and AI applications in security to extend learning.