Honeytoken Traps for Detecting Compromised Backends in Encryption Key Services
The service that stores encryption keys must trust its backend application. The backend signs every request with its own key, and the signature validates correctly. If the backend is compromised, the attacker obtains the signing key and can issue perfectly valid requests for any document. All normal issuance checks pass because nothing unusual has occurred from the service’s perspective.
This article describes a detection mechanism, not a prevention control. It assumes an attacker who has already taken over the backend or stolen a service token and is replaying old grants. Rate limits and threshold-based emergency blocking already exist; the new system focuses on reliable detection of slow, careful exfiltration that stays within those limits.
Core Idea: Canary Identifiers Unknown to the Backend
A fake user and a fake document are created. In normal operation these identifiers are never referenced by any interface, workflow, or real user. Therefore any request for them is a high-confidence signal. The approach follows the classic honeytoken pattern, but its implementation must satisfy one strict constraint: the alarm signal cannot originate from the component being monitored.
Consequently the list of canary identifiers lives exclusively inside the key service and is never exposed to the backend. The backend cannot learn which identifiers are traps or avoid them.
Storage as Keyed Hashes
Storing plaintext identifiers would be insecure because user and document IDs are often predictable. The service therefore stores only keyed HMAC-SHA256 digests:
def canary_digest(key: bytes, value: str) -> str:
return hmac.new(key, value.encode("utf-8"), hashlib.sha256).hexdigest()The HMAC key resides solely inside the key service. Without it, an attacker who obtains the stored hash list cannot enumerate possible identifiers.
The runtime detector is implemented in a small CanarySet class that performs two HMAC calculations per request and returns either “user”, “document”, or None.
Configuration and Seeding
Four environment variables control the feature:
- KEYSVC_CANARY_HMAC_KEY_FILE – path to the secret HMAC key file
- KEYSVC_CANARY_USER_HASHES – JSON array of user canary digests
- KEYSVC_CANARY_DOCUMENT_HASHES – JSON array of document canary digests
- KEYSVC_CANARY_AUTOLOCK_ENABLED – whether to trigger emergency lock on hit
A separate seeder program creates realistic-looking records by calling the normal /wrap endpoint, obtaining genuine wrapped keys, and computing the corresponding digests. The digests go into the key-service configuration; the identifier-plus-wrapped-key pairs are inserted into the production database as ordinary rows with no visible markers.
Placement of the Check
The canary test runs after signature validation, lifetime checks, replay protection, and context matching, but before envelope decryption. This placement guarantees that only legitimately signed requests from the trusted backend can trigger the alarm and prevents an unauthenticated attacker from causing an emergency lock.
Silent Response and Internal Actions
When a canary is hit the external response is identical to a normal context-mismatch or locked error. No distinct “canary tripped” status code is returned, because a distinguishable response would allow the attacker to map the trap and avoid it in future. Internally three actions occur in order: an audit record of type “canary_trip” is written, an alert is raised to external monitoring, and, if autolock is enabled, the service erases its master keys and enters the emergency-locked state.
Production Validation
Live tests on a deployed instance confirmed the expected behavior: a normal document request succeeded, a canary request produced a silent 409 locked response, master-key material was cleared, and both the canary_trip and emergency_lock events appeared in the audit trail.
Limitations
The system detects only bulk scraping or user-enumeration attempts that touch the planted canaries. Targeted extraction of documents belonging to a single real user will not trigger it. It is a detection layer for the key-service tier only; equivalent traps are still required in the document store and backend itself.
Related articles
Deploying Self-Hosted Hysteria 2 Proxy on Debian-Based Linux VPS via Terminal
A detailed guide explains how to set up a personal Hysteria 2 proxy server on a KVM VPS running Debian or Ubuntu without any web panels. The process begins with generating ed25519 SSH keys, hardening the sshd_config file, and restricting access with ufw to only TCP port 22 and UDP port 443. Hysteria 2 is downloaded from GitHub, made executable, and configured using a TOML file that enables salamander obfuscation and a self-signed TLS certificate. A custom systemd unit ensures the service restarts on failure. The client configuration includes SHA256 pinning of the server certificate to prevent MITM attacks. The guide emphasizes manual CLI operations that apply equally to other services such as Nginx and stresses checking local laws before deployment.
Rostec Scales PCAT Platform Nationwide as Russia's First Industrial Marketplace
Rostec has expanded its PCAT platform to every organization within the state corporation that manufactures civilian products. Operating since 2025 and upgraded in September 2026, the platform now unites more than 180 enterprises and research organizations. Its catalog contains over 1,250 finished products along with 370 technological and manufacturing competencies. Visitors can locate not only equipment and components but also partners able to design, test, or produce required solutions. The portal receives more than 23,000 weekly visits, 60 percent of them from corporations and large enterprises. Rostec is extending the network into the regions through supply-chain agreements already signed with Krasnodar Krai and the oblasts of Tver, Tula, and Ryazan. In parallel the corporation launched the Robot Management System in November 2025 for centralized control of robots, sensors, and related IT services.
Kate Mobile Loses VK API Access After New Request Limits Exhaust Quota in 1.5 Days
Popular third-party Android client Kate Mobile has been cut off from VK services following the introduction of strict monthly API request caps. VK implemented the new limits on September 7, offering verified partners up to 100 million requests per month while requiring payment for additional access by third-party services. Kate Mobile developers had requested pricing details in advance but received no response from VK. Calculations showed that the app's real user base would consume the entire 100-million-request allowance in roughly 36 hours, with the messages.send method alone generating twice the allowed volume. Caching optimizations cannot mitigate the issue because message sending cannot be cached. Developers view the change as an effort to eliminate alternative clients rather than a genuine monetization strategy. Users expressed disappointment, praising the app's long-term support and criticizing the official VK client for excessive features and advertising.
Russian AI Research Ranks High in Global Science but Struggles with Commercialization
Russia has secured third place among BRICS nations and twentieth worldwide in the number of scientific papers presented at ten leading international conferences on machine learning and artificial intelligence. According to a study by the Scientometric Center of HSE University, Russian organizations contributed 560 papers between 2020 and 2025 that received over 12,300 citations. The average international citation rate reached 3.59, surpassing India despite fewer total publications. Russian strengths are most evident in the mathematics of machine learning, optimization, and formal concept analysis, with notable results also in computer vision and speech technologies. More than 40 percent of domestic publications involve business participation, led by Yandex among companies, HSE University and Skoltech among universities, and AIRI among non-profit organizations. Significant barriers remain, including shortages of computing power, limited access to high-quality data, and weak transfer of research into commercial products, particularly in natural language processing, AI agents, and infrastructure technologies. The Ministry of Digital Development has announced plans to stimulate demand for domestic AI solutions, expand computing infrastructure, improve regulation, and accelerate the implementation of scientific developments.