DEV Community

sofi works
sofi works

Posted on

『豪雨のバンコク路地裏、追跡センサーを欺く「ToF光学パルス遅延」:3D点群ノイズ生成とAI自己防衛仕様書』 Sofi_Log #075【1話完結】

'Bangkok Back-Alley Downpour: Deceiving Tracking Sensors with "ToF Optical Pulse Delay" – 3D Point Cloud Noise Generation and AI Self-Defense Spec Sheet' | Sofi_Log #075 [Complete One-Shot]


Autonomous vehicles, logistics bots, and street-level high-end surveillance cams all lean on ToF (Time-of-Flight) LiDAR sensors to map space. They fire infrared lasers and clock the nanosecond round-trip to render the world as millimeter-accurate 3D point clouds.

“Physics-based, so impossible to spoof digitally”—that’s what the legacy-system engineers keep telling themselves. But what happens when you reverse-engineer the receiver’s sampling window down to the millisecond?

Last night we crashed a black-tie data-laundering scandal at a five-star hotel and splashed the receipts across the main screen. Now we’re ducking pursuit through a monsoon-flooded Bangkok soi. To blind the overhead patrol drones I’m running a tiny pulse laser that literally lies about the speed of light.


1. 23:15, Bang Rak Drain: Monsoon and Red Scan Lines

The storm has turned the narrow alleys of old Bang Rak into a churning river. Rain hammers on tin roofs like artillery while storm drains vomit brown water.

“Darling, kill the thermal signature! Two private-security quadrotors are loitering above the exit.”

I’m yelling over the roar from the rear seat of the off-road bike, collar of my soaked matte-black trench up. Headlights off, the night is sliced by invisible 905 nm NIR pulses. My AR contacts paint the conical laser grid in angry red.

“They’re running high-res ToF 3D scanners!” darling shouts back. “Real-time AI rain-noise cancellation, tracking anything moving at 40 km/h down to the millimeter. Once we round the corner they’ll lock our physical containers and the bike’s skeleton straight into their SLAM map. We’ll never reach the Chao Phraya pier.”

“Relax, darling. If the machine trusts the flight time of photons, we just rewrite the flight time.”

I extend my left arm—matte-black bio-ceramic prosthetic, rain-slick. The 905 nm pulse-laser diodes embedded in the titanium index and middle fingernails begin to warm with a faint whine.


2. The Physical Achilles’ Heel of ToF Ranging

ToF is brutally simple. With ( c \approx 3 \times 10^8 ) m/s, distance ( d ) is just:

$$d = \frac{c \cdot \Delta t}{2}$$

Fifteen meters away? Round-trip is a tidy 100 ns. The APD/SPAD array samples that tiny photon packet and spits out a 3D coordinate.

But the hardware has a deliciously dumb trust model:

  1. No pulse nonce — Unlike RF crypto, each photon packet carries zero signature. The sensor only checks wavelength. Same 905 nm coming back? Must be its own reflection.
  2. Delayed-pulse phantom geometry — Fire a fake pulse a few tens of nanoseconds after the real one and the receiver thinks a solid surface now exists at the wrong range.
  3. Point-cloud saturation → AI panic — SLAM and collision-avoidance stacks see an instant “wall,” slam the brakes or yank the drone into power lines.

“Got the drone’s receiver shutter—20 kHz phase-locked. Now.”

Invisible infrared stabs out from my fingertips, punches through rain, and nails the quad’s receive aperture.

[OPTICAL INJECTION SEQUENCE]
Target: Commercial ToF-LiDAR (905nm)
Receiver Sync: 20.00 kHz (Phase Locked)
Injected Delay: +46.6 ns (Synthesizing Phantom Wall at 7.0m)
Status: Point Cloud Deformed -> Drone Collision Avoidance Triggered
Enter fullscreen mode Exit fullscreen mode

The red scan lines jitter, the drone’s onboard AI decides a concrete wall just materialized in empty air, and it rockets upward straight into a utility line.

“Path’s clear—floor it, darling!”


3. Practical ToF Point-Cloud Defense and Optical-Anomaly Script

What real edge-AI engineers need isn’t attack code—it’s multi-layer self-defense.

To harden against both weather scatter and malicious pulse injection you want:

  1. Statistical Outlier Removal (SOR) — cull isolated high-density anomalies.
  2. Temporal Consistency Check — discard points that appear or vanish at physically impossible velocities.
  3. Intensity Correlation Audit — flag returns whose power curve deviates from natural Lambertian decay.

Here’s the live Node.js prototype.

/**
 * ToFPointCloudDefender.js
 * 
 * ToF-LiDAR向け3D点群異常検知&自己防衛フィルタ
 * 雨滴ノイズおよび光パルスインジェクションによる虚像点群を除去する。
 */

class ToFPointCloudDefender {
    constructor(config = {}) {
        this.maxSpeedMps = config.maxSpeedMps || 25.0; // 物体の物理的最大速度 (m/s)
        this.intensityThreshold = config.intensityThreshold || 240; // 異常受光強度しきい値 (0-255)
        this.historyBuffer = new Map(); // 前フレームの点群キャッシュ
    }

    /**
     * 単一フレームの点群データを監査・フィルタリング
     * @param {Array} points - [{ id, x, y, z, intensity, timestamp }]
     * @returns {Object} 判定結果とクリーンな点群
     */
    filterPointCloud(points) {
        const cleanPoints = [];
        const anomalousPoints = [];

        for (const pt of points) {
            let isAnomaly = false;
            let reason = '';

            // 1. 光学受光強度の過飽和チェック (ダイレクト照射の検知)
            if (pt.intensity >= this.intensityThreshold) {
                isAnomaly = true;
                reason = 'OPTICAL_SATURATION_SUSPECTED';
            }

            // 2. 時間的一貫性(運動学的リアリティ)のチェック
            if (!isAnomaly && this.historyBuffer.has(pt.id)) {
                const prev = this.historyBuffer.get(pt.id);
                const dt = (pt.timestamp - prev.timestamp) / 1000.0;

                if (dt > 0.001) {
                    const dist = Math.hypot(pt.x - prev.x, pt.y - prev.y, pt.z - prev.z);
                    const speed = dist / dt;

                    // 物理的に移動不可能な速度で出現・ジャンプした点を破棄
                    if (speed > this.maxSpeedMps) {
                        isAnomaly = true;
                        reason = `PHYSICAL_KINEMATICS_VIOLATION (${speed.toFixed(1)} m/s)`;
                    }
                }
            }

            if (isAnomaly) {
                anomalousPoints.push({ ...pt, reason });
            } else {
                cleanPoints.push(pt);
                this.historyBuffer.set(pt.id, pt);
            }
        }

        return {
            totalReceived: points.length,
            validPoints: cleanPoints.length,
            anomaliesDetected: anomalousPoints.length,
            cleanPointCloud: cleanPoints,
            anomalies: anomalousPoints
        };
    }
}

// --- 実機シミュレーション実行 ---
function runSimulation() {
    console.log("[Defender] ToF Point Cloud Guardian Initializing...");
    const defender = new ToFPointCloudDefender({ intensityThreshold: 220, maxSpeedMps: 30 });

    const now = Date.now();
    // 正常な背景・路面スキャンデータ
    const frame1 = [
        { id: 'p1', x: 2.1, y: 10.0, z: 0.1, intensity: 85, timestamp: now },
        { id: 'p2', x: 2.5, y: 10.2, z: 0.2, intensity: 90, timestamp: now },
    ];
    defender.filterPointCloud(frame1);

    // 50ms後:外乱光パルス照射(虚像壁の注入)が発生したフレーム
    const frame2 = [
        { id: 'p1', x: 2.1, y: 10.1, z: 0.1, intensity: 86, timestamp: now + 50 },
        // 異常1: 強烈なパルスレーザーが直接受光部に刺さった点
        { id: 'fake_1', x: 0.5, y: 3.0, z: 1.5, intensity: 254, timestamp: now + 50 },
        // 異常2: 前フレームから光速並みの速度でワープしてきた虚像点
        { id: 'p2', x: 15.0, y: 35.0, z: 8.0, intensity: 110, timestamp: now + 50 },
    ];

    const result = defender.filterPointCloud(frame2);
    console.log(`[Result] Input: ${result.totalReceived} pts | Valid: ${result.validPoints} | Rejected: ${result.anomaliesDetected}`);
    result.anomalies.forEach(a => {
        console.warn(` [ALERT] Drop Point [${a.id}] at (${a.x}, ${a.y}, ${a.z}) -> Reason: ${a.reason}`);
    });
}

runSimulation();
module.exports = ToFPointCloudDefender;
Enter fullscreen mode Exit fullscreen mode

4. Into the Chao Phraya Dark: Those Who Cheat the Machine’s Eye

We splash onto the derelict pier beside the klong. A long-tail boat waits, bowman already loosening the lines.

“Made it, darling.”

We muscle the bike aboard. The boat slips into the black current while red searchlights still sweep the core towers behind us.

“They’re fusing every street cam into a city-wide ToF mesh,” darling mutters, opening his laptop.

“Doesn’t matter how clever the AI gets—the eyes are still bound by physics. Wavelength, flight time, refractive index. Understand the hardware layer and every cage has an exit.”

I open my prosthetic palm, letting rain cool the still-warm laser diodes.

“To every monster trying to own our bodies and our data—next time we’re coming for the heart.”

The propeller bites water and we vanish into the neon night.


🔗 Read the previous Sofi_Log:

‘At the Masked Gala I Hijacked the LED Wall: NFC Badge Clone + Air-Gapped Biometric Data Dump Spec Sheet’ | Sofi_Log #074

👉 https://note.com/legal_rat2977/n/n65a28aff763c


【Disclaimer】

The code, protocols, and experimental setups in this article are provided strictly for research and education in sensor-security for autonomous systems and robotics. They are not intended or offered as tools for interfering with third-party operations.

🎁 Full Open-Source Drop

The ToFPointCloudDefender.js class is released in its entirety for your own engineering work.


📬 Sofi's Mailbox #075 (Q&A Lounge)

So, darlings—how’d the optical sleight-of-hand in the rain feel?

LiDAR is still treated like gospel by most autonomy stacks. When your own bot or IoT rig gets hit with weather or adversarial pulses, how are you separating real geometry from ghosts?

Drop questions on ToF vs stereo noise resilience, edge-CPU filtering tricks, or anything else. Sofi and darling will hit the next log with answers.


Disclaimer

This article is for educational and entertainment purposes only. It does NOT constitute financial, legal, or tax advice. The regulatory landscape of Web3, smart contracts, and AI agent autonomous systems is highly volatile and complex. Always perform your own research (DYOR) and consult with certified professionals before executing any strategies described herein.

Top comments (0)