Habr•September 7, 2026•🇷🇺Translated from Russian

Engineer Details Six Weeks Spent Training and Testing Signature Redaction Models for Closed-Loop Document Anonymization

A developer working on automated document sanitization spent six weeks attempting to reliably locate and redact handwritten signatures inside PDFs that must leave a closed network. The goal was to remove surnames, telephone numbers, addresses and signatures while preserving document usability, all on a single air-gapped workstation equipped with one consumer GPU.

Documents arrive in two forms. Text-layer PDFs allow direct removal of recognized words. Scanned pages require the system to detect text via Tesseract, then draw black rectangles over the corresponding image regions. Four parallel detection methods—dictionary lookup, regular expressions, natasha NER and an ink gate—successfully handled printed names but found zero signatures because signatures contain no machine-readable text.

Initial experiments with a color-saturation gate worked on blue-ink signatures yet failed completely on black-ink signatures and on any grayscale scan. An alternative heuristic that painted any dark region ignored by OCR erased entire table columns when text was printed in small fonts, violating the rule that only recognized text may be redacted.

Three off-the-shelf object detectors were benchmarked on 1,254 pages. YOLOS produced excessive false positives on engineering drawings and was discarded. A seal detector returned high-confidence false positives on documents containing no seals. A custom YOLO11s model trained on 600 synthetically augmented signature images plus 40 real pages reached 88 % coverage on isolated strokes but dropped sharply when adjacent signatures merged into large blobs.

Two rotation-related bugs repeatedly caused missed redactions. PDF /Rotate attributes produced coordinate mismatches between detection and drawing layers. Pages scanned sideways defeated Tesseract’s orientation detection when run with --psm 0, leaving the entire page unprocessed until OSD was re-enabled for low-confidence cases.

After switching the vision model from proactive detection to post-redaction verification, expensive GPU calls fell from roughly 50 pages per batch to 18. On the final corpus of 492 pages only 3.7 % of documents required the vision stage, all of them empty forms with vertical table headers.

Image-preprocessing tests showed that the classical OpenCV pipeline (deskew, illumination normalization, denoising, 2× upscaling) raised OCR to 92/103 pages while RealESRGAN reduced the same metric to 76/103 and increased runtime dramatically. Preprocessing is therefore applied only when the first-pass score falls below 70.

Comparison of twelve OCR engines on a two-page test document revealed that PaddleOCR detection combined with Tesseract recognition produced 16 correctly grouped name cells in 3.7 seconds. Full replacement by any single vision-language model either missed names entirely or required 12–20 seconds per page.

Redaction implementation errors were discovered only after the author added a verification step that extracts text from beneath every black rectangle. Using PyMuPDF draw_rect left recoverable text; switching to apply_redactions eliminated all leaks across 3,029 redactions in production files. White rectangles drawn for stamps and signatures occasionally overwrote already-redacted black areas, reopening rows of names—an issue caught only by the same under-rectangle text check.

The final pipeline therefore combines rule-based text removal, a lightweight YOLO signature detector, selective classical preprocessing, Tesseract augmented by PaddleOCR cell detection, and mandatory post-redaction text verification, achieving reliable signature removal inside the required closed environment.

Related articles

Habr•Privacy & Surveillance

CookieTin Extension Manages Partitioned Cookies Across Firefox, Chrome and Edge

Developer Perruer2 has released CookieTin, an open-source browser extension that fully supports partitioned cookies under Firefox Total Cookie Protection and Chrome CHIPS. The tool addresses limitations in older managers like Cookie Quick Manager by correctly retrieving and deleting cookies stored with partitionKey values. It works across Firefox, Chrome and Edge using a single Manifest V3 codebase written in TypeScript and Preact. Key features include accurate cookies.txt export compatible with curl and yt-dlp, protected cookies that survive explicit deletion, and pre-save validation of browser rules for __Host- prefixes and SameSite attributes. E2E tests using Puppeteer verify handling of HttpOnly, partitioned and container cookies in all three browsers.

AntiMalware•Privacy & Surveillance

Kaspersky Premium for macOS Gains App Uninstall Feature to Remove Residual Files

Kaspersky Premium now includes an App Uninstall tool for macOS that locates and deletes leftover files such as caches, cookies, settings, and logs after applications are removed. The feature also identifies duplicate copies of programs and lets users remove all instances or select specific ones while preserving shared components used by other software. Survey data from Kaspersky shows that only 44 percent of macOS users delete unused applications, even though 56 percent regularly clear browser data and 54 percent remove unwanted media files. Residual files can contain sensitive information including account tokens, passwords, IP addresses, event logs, and personal documents, creating privacy risks especially when a device is sold or accessed by unauthorized parties. Deleted files can be restored from the trash or directly within Kaspersky Premium before the application session ends. The company also warns that malicious programs are frequently disguised as legitimate macOS cleaning utilities.

Securitylab•Privacy & Surveillance

Bypassing VPN Detection on iPhone: Detailed Methods to Avoid App Blocks

Many iPhone users encounter apps that detect and block active VPN connections even after switching servers or protocols. The detection often occurs locally on the device by inspecting network interfaces rather than relying solely on external IP addresses. This guide explains how apps identify VPN tunnels through iOS network data and provides practical workarounds including moving the VPN to a router, configuring per-app exclusions, and using web versions of services. It also covers why protocol obfuscation and port changes fail to hide local VPN activity from applications. Additional troubleshooting addresses automatic VPN profiles, ad blockers, and iCloud Private Relay interference. The article emphasizes that no universal toggle exists in iOS to hide an active VPN from all apps.

Habr•Privacy & Surveillance

New Obfuscation Method Dissolves Personal Data Records in Layer of Plausible Variants

A Russian information security researcher has proposed a data protection technique that renders stolen personal records unusable even after full compromise. The approach mixes real data such as phone numbers, emails, passports, addresses, INN and SNILS with vast numbers of semantically valid alternatives. Attackers receive nearly complete information including a 361-character message containing PIN codes and word order, yet lack the secret vector space and reconstruction algorithm required to identify the correct record. Without these components, brute-force attempts produce millions of plausible results with no architectural method to verify accuracy. The method is presented as an alternative to traditional encryption when data must remain accessible yet protected against extraction. A public sandbox is available for testing the approach.