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
Passwork Comparison with OneKey Sparks Detailed Rebuttal from ABP2B on Security Claims
Passwork published a self-comparison of its corporate password manager against OneKey version 2.0.7, using simplified settings and an outdated release despite version 2.1.0 being available. ABP2B responded by highlighting biases in the analysis and noting that several features criticized as weaknesses are optional and can be disabled via group policies. The company released a major update shortly after, adding reworked authorization, enhanced formatted text protection, expanded cache controls, new group policies, strengthened server-side checks, and revised hash storage rules. Key technical disputes include the use of a single master password versus independent vault secrets, the correct application of Shamir's Secret Sharing to recovery keys rather than the master password, and the comparison of PBKDF2 iteration counts without considering the full cryptographic context. Additional points addressed the choice of GOST 34.12-2018 as the default algorithm for the Russian market versus AES-256, and the protective purpose of compromised password checking that organizations may optionally enable or disable.
How a Personal Site Counts Bots Without Storing Any IPs: Pure PHP, No Database, Strict CSP and 160 Tests
A personal website built entirely in pure PHP without frameworks or databases demonstrates advanced defensive security practices while tracking bot activity from an SSH honeypot. The site stores all content in a single JSON file with atomic writes and automatic backups, eliminating database-related attack surfaces and simplifying deployment to folder copying. Strict Content-Security-Policy rules prohibit inline styles and scripts without nonces, forcing the use of SVG attributes, CSSOM updates, and JSON data blocks instead of direct attribute injection. Over 160 automated tests written in PHP attack the site with XSS payloads, CSRF attempts, path traversals, and malformed Markdown to verify that no malicious output reaches the browser. Bot identification relies on behavioral signatures derived from the first twelve cleaned commands of each session, combined with HASSH fingerprints and activity patterns, allowing the site to report unique bot families and address counts without ever publishing IPs. Additional browser-based tests using Chromium validate accessibility, performance budgets, and CSP compliance across desktop and mobile viewports. The entire system runs with zero external dependencies and integrates tests directly into the deployment pipeline.
Russian Finance Ministry Seeks Central Bank Reports on Systematic P2P Transfers to Tax Authorities
The Russian Ministry of Finance has proposed amendments requiring the Central Bank to share data with the Federal Tax Service on individuals whose bank accounts show signs of regular income received from other private citizens. The changes target article 85 of the Tax Code and form part of the budget package bill numbered 617-9. Under the new rules, the Central Bank would identify such citizens through transaction analysis and transmit the information according to a future agreement with the tax service. The Federal Tax Service would also gain expanded powers to request bank statements from non-entrepreneurs without needing prior debt collection or audit triggers. If approved, the provisions would take effect on 1 January 2027 and apply to operations conducted after 1 January 2026. Separate bills under discussion would impose monthly transfer limits of 30,000 rubles on suspected clients starting in 2028 and require the tax service to notify the Central Bank about account openings and income categories.
Baidu Launches Ciyuan Exchange to Establish Trust Standards for AI Model Trading
Baidu Intelligent Cloud has introduced the Ciyuan Exchange, a dedicated trading platform for large AI models that aims to solve quality verification and credit issues in an increasingly crowded market. The platform, unveiled at the Baidu World 2026 Conference, already hosts over 100 supply resources with daily calls exceeding 50 million and daily token usage surpassing 700 billion. Founder Li Yanhong positioned the exchange as an infrastructure layer that moves beyond simple model aggregation toward verifiable identity, ongoing performance monitoring, and supplier credit records. The initiative addresses real procurement risks where identical models from different providers show up to twofold differences in throughput and reliability, according to a China Academy of Information and Communications Technology report. By combining model fingerprinting, capability testing, periodic audits, and continuous credit scoring, the platform seeks to create transparent market mechanisms similar to commodity exchanges. This development signals a broader industry shift from raw model capability competition toward standardized service quality, pricing transparency, and reliable delivery infrastructure.