Habr•November 13, 2026•🇷🇺Translated from Russian

How a Personal Site Counts Bots Without Storing Any IPs: Pure PHP, No Database, Strict CSP and 160 Tests

A personal website demonstrates how to implement robust security controls while tracking bot behavior from an SSH honeypot without ever storing or publishing visitor IP addresses. The project began with the first commit on 25 October 2026 and now contains 243 commits, roughly 22,000 lines of PHP, JavaScript and CSS, plus 5,000 lines of supporting Bash and Python scripts.

Architecture Without Frameworks or Databases

All content resides in a single JSON file. Atomic saves are performed by writing to a temporary file and then using rename(), ensuring readers never see a partially written state. Before each save the previous version is copied to a backups directory that retains the last twenty revisions. This approach removes the need for a separate database process, user accounts, migrations or dump-based backups.

Because no framework is present, the author implemented input sanitization, CSRF tokens, session handling and rate limiting manually. The absence of framework protections became the direct reason for writing an extensive test suite that actively attacks the application.

Strict Content-Security-Policy Implementation

The enforced policy allows scripts only from the same origin and only when accompanied by a fresh nonce. Inline styles are completely forbidden. Graphs and progress bars are rendered as SVG elements using width and height attributes rather than style properties. Dynamic style changes are applied through the CSSOM API. Data intended for JavaScript is placed inside <script type="application/json"> blocks that are parsed rather than executed.

A dedicated test verifies that every nonce is unique per response, that no script tag lacks either a nonce or the JSON type, and that the style attribute never appears in rendered HTML. Violations reported through CSP report-to endpoints surface forgotten nonces before they become visible to visitors.

Automated Attack-Driven Testing

The PHP test suite contains 160 checks and completes in approximately twenty seconds. Each test spins up an isolated instance of the site on a temporary data copy. Test data deliberately contains XSS strings, terminal escape sequences, malformed host headers and path traversal attempts. Separate checks cover reflected XSS, Host header injection, SSRF via audit.json, password brute-force protection after five failures, CSRF token validation, EXIF GPS stripping from JPEG uploads, and blocking of access to .git, data files and parent directories.

Browser tests written in Python drive a real Chromium instance through the DevTools Protocol. They validate 35 pages at two viewport sizes, confirming absence of console errors, horizontal scrolling on mobile, sufficient contrast, correct heading order, visible focus indicators, reduced-motion compliance and adherence to a strict performance budget of 400 KB total weight and 25 requests.

Bot Tracking Without Publishing Addresses

Raw SSH session logs contain full IP addresses, but only behavioral signatures leave the honeypot system. Each session is reduced to its first twelve cleaned commands; numbers are normalized to N and a short SHA-1 hash is computed. Sessions sharing the same hash are treated as one bot family. A special rule handles the common “uname” reconnaissance command so that minor flag variations do not create spurious families.

Address cardinality is calculated in memory and only the count is published. Families observed from fewer than three distinct addresses are suppressed entirely. Additional signals such as HASSH client fingerprints, password lists and command overlap percentages help distinguish separate operators even when they reuse the same script.

Related articles

AntiMalware•Other

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.

安全客•Other

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.

Habr•Other

Windows and MacBook Pro Setup Combines Local Network Access with Dual VPNs and Kill Switch Protection

A user detailed how they integrated an older MacBook Pro into an existing Windows workstation environment while preserving separate user accounts, file sharing, and independent VPN connections. The setup required careful routing configuration to keep the Kill Switch active on both Amnezia VLESS and AmneziaWG without breaking local SMB connectivity. After initial failures caused by the Windows Kill Switch blocking the 192.168.1.0/24 subnet, split tunneling was implemented to route local traffic directly. Separate macOS accounts were created for daily use and a dedicated “Serverok” account for remote scripting and compute tasks. SSH and SFTP ultimately replaced problematic SMB shares for the secondary account, enabling reliable file transfers at over 50 MB/s. The configuration allows simultaneous or sequential use of both machines while maintaining strong VPN protection on each.

Habr•Other

RuCenter Prepares DNS Guard Launch for Early Cyber Threat Detection

RuCenter is developing DNS Guard, a new system designed to detect cyber threats at the DNS level before they cause disruptions to websites and corporate services. The tool will combine DNS traffic analysis, monitoring of domain record changes, and validation of DNS zone configurations. According to RuCenter’s 2026 research, 53.4% of companies experienced domain-related incidents, while only 31.5% maintain formalized domain management policies. DNS Guard will track suspicious changes to records affecting websites and email, identify forgotten subdomains vulnerable to takeover, detect anomalous queries, audit zone settings, and send alerts on critical events. The system leverages RuCenter’s own DNS infrastructure to spot recurring anomalies across multiple zones and targets medium and large enterprises managing numerous domains, with planned API integration for corporate security platforms.