Security Whitepaper

How PhantomAPI operates at the kernel level, what data it accesses, and why it is safe by design.

This document is intended for engineering leads, security teams, and technical decision-makers evaluating PhantomAPI for production infrastructure.

Version 1.0 · April 2026
01

Executive Summary

PhantomAPI is a zero-touch API structural drift detector that operates at the Linux kernel level using eBPF (extended Berkeley Packet Filter). It attaches to running processes by PID, observes HTTP and HTTPS response structure in real time, and alerts when API response fields disappear, change type, or appear unexpectedly.

This document addresses the security implications of deploying PhantomAPI in production infrastructure.

PhantomAPI reads API response structure but never stores, transmits, or logs response content. Only structural metadata — field names, types, and drift classifications — ever leaves the observed machine.

02

How PhantomAPI Works

The eBPF Foundation

eBPF is a technology built into the Linux kernel (version 4.x and later) that allows small, verified programs to run inside the kernel without modifying kernel source code or loading traditional kernel modules. eBPF is used in production at companies including Meta, Google, Netflix, and Cloudflare for observability, networking, and security.

PhantomAPI uses eBPF to observe system calls — specifically, the read, write, sendto, and recvfrom calls that applications use to send and receive network data. By attaching to these syscall tracepoints, PhantomAPI can see the raw bytes flowing through a process's network connections without injecting a proxy, modifying application code, or intercepting traffic on the network.

TLS/HTTPS Visibility

For encrypted HTTPS traffic, PhantomAPI attaches eBPF uprobes to the SSL_read and SSL_write functions in the target process. When the process dynamically links libssl, the uprobes attach to the shared library. When OpenSSL is statically linked into the binary itself — as in Node.js v20 and later, and many Go binaries — the uprobes attach directly to the target's own executable via /proc/<pid>/exe. In both cases the uprobes fire after TLS decryption has already occurred inside the application's own process, allowing PhantomAPI to observe the plaintext HTTP data in memory. This is the same approach used by established open-source security and observability tools.

PhantomAPI does not perform TLS interception. It does not terminate, proxy, or man-in-the-middle any connections. Instead, it attaches to the application's own TLS library via eBPF uprobes that fire after decryption has already occurred inside the application's process. PhantomAPI reads the plaintext data in the application's own memory space — it never handles, negotiates, or interferes with the TLS session itself.

The Detection Pipeline

Once PhantomAPI captures HTTP response data from the kernel, the data flows through a user-space pipeline written in Go:

The response body is held in memory only long enough to extract field structure. It is never written to disk, never logged, and never transmitted.

03

What Data Leaves the Machine

When PhantomAPI detects a drift event, it sends a small JSON payload to the configured backend endpoint. Here is the exact structure of that payload:

{ "endpoint": "/api/orders", "method": "GET", "field_name": "data.shipping.carrier", "kind": "new_field", "risk": "Medium", "detail": "not present in baseline" }

That is the complete outbound payload. It contains:

It does not contain:

04

Kernel Safety Guarantees

The eBPF Verifier

Every eBPF program must pass through the Linux kernel's built-in verifier before it is allowed to execute. The verifier is a static analysis engine that enforces hard safety constraints:

If an eBPF program fails verification, the kernel refuses to load it. There is no override. This is a hard guarantee enforced by the kernel itself, not by PhantomAPI.

Process Isolation

PhantomAPI runs as a separate user-space process. It does not inject code into, attach a debugger to, or modify the memory of the observed application. The eBPF programs run in kernel space and emit data to a perf event buffer, which the PhantomAPI Go process reads from user space.

If PhantomAPI crashes, the observed application is completely unaffected. The eBPF programs are automatically cleaned up by the kernel when the loading process exits. There is no residual kernel state, no orphaned hooks, and no performance impact on the observed process after PhantomAPI stops.

Performance Impact

eBPF tracepoint and uprobe programs add microsecond-level overhead to the hooked system calls. In practice, this overhead is negligible for API servers handling typical request volumes. PhantomAPI uses per-CPU scratch buffers to avoid lock contention and does not allocate kernel memory beyond its initial map setup.

05

Privilege Requirements

PhantomAPI requires elevated privileges to load eBPF programs into the kernel. There are two options:

Option A — Root access: Running with sudo or as root. This is the simplest deployment path and is appropriate for dedicated monitoring hosts or containers with controlled access.

Option B — Linux capabilities: Granting CAP_BPF and CAP_PERFMON to the binary. CAP_BPF allows loading and managing eBPF programs. CAP_PERFMON allows attaching to performance monitoring events (which includes tracepoints and uprobes). These capabilities are narrowly scoped — they do not grant general root access, file system access, or network administration privileges.

In containerized environments, these capabilities can be granted at the container level without giving the container full root access to the host.

06

Network Security

PhantomAPI makes exactly one type of outbound network call: an HTTP POST to the configured backend URL, carrying the drift event metadata described in Section 3.

The binary authenticates to the PhantomAPI backend using a license key passed via the --license-key flag at startup. This key is included as an x-api-key header on every outbound request. License keys are scoped per user and validated server-side before any data is written. PhantomAPI does not contact any hardcoded external servers, does not phone home, and does not transmit telemetry.

Outbound network behavior depends on the command and configuration:

For PhantomAPI Cloud customers, drift events are sent to your dedicated backend endpoint over HTTPS. All communication between the binary and the backend is authenticated — unauthenticated requests are rejected before reaching the database.

07

Binary Verification

PhantomAPI distributes pre-compiled Linux amd64 binaries via GitHub Releases on a private repository. Each release includes:

To verify a downloaded binary:

sha256sum phantomapi-linux-amd64

Compare the output against the published checksum in the release. If they do not match, do not run the binary.

The PhantomAPI install script (available at phantomapi.dev/install.sh) automates download and checksum verification in a single step.

Inspecting the Loaded eBPF Programs

Beyond verifying the binary you downloaded, you can verify what PhantomAPI actually loads into your kernel at runtime. While PhantomAPI is running, use bpftool (shipped with the Linux kernel source) to list the loaded programs and dump their verifier-translated bytecode:

sudo bpftool prog show sudo bpftool prog dump xlated id <PROG_ID> sudo bpftool map show

The first command lists every eBPF program attached on the host, including those loaded by PhantomAPI. The second prints the bytecode the kernel verifier actually accepted, which is what runs — not just what was submitted. The third lists the eBPF maps in use. This lets security teams independently confirm that PhantomAPI only attaches the syscall tracepoints and TLS uprobes described in Section 2, without relying on any claim we make about our source code.

08

Data Handling Summary

Data Type Stored Locally Transmitted
HTTP/HTTPS response bodies No (in-memory only) Never
Request bodies No Never
Field values / PII No Never
Auth tokens / cookies / headers No Never
Field names and types (structure) In-memory during analysis Never
Drift event metadata No Yes (see Section 3)
Endpoint paths and methods No Yes (in drift events)
Risk classifications No Yes (in drift events)
09

Cloud Data Retention

When PhantomAPI Cloud receives drift event metadata, that data is stored in a managed PostgreSQL database with encryption at rest enabled. Data is retained according to the customer's subscription tier:

Drift events older than the retention window are automatically deleted. Customers can request immediate deletion of all stored data at any time by contacting kevin@phantomapi.dev. As a reminder, the only data stored is the structural metadata described in Section 3 — no request bodies, response content, or PII is ever persisted.

10

Backend Security Controls

The PhantomAPI Cloud backend enforces the following security controls:

11

Threat Model

PhantomAPI is designed to detect one specific class of problem: silent structural changes in third-party APIs that your application depends on. It is important to be clear about what PhantomAPI does and does not detect.

PhantomAPI detects:

PhantomAPI does not detect:

PhantomAPI is not a security scanner, WAF, or vulnerability assessment tool. It is a reliability tool that detects when the third-party APIs your application depends on silently change their response structure in ways that could break your integration.

Assumptions and Known Limits

PhantomAPI's safety properties depend on two assumptions that are worth making explicit:

Neither of these is unique to PhantomAPI; any eBPF-based tool inherits the same dependencies. They're called out here so they're not implicit.

12

Frequently Asked Questions

Can PhantomAPI read my users' passwords or personal data?
PhantomAPI sees decrypted HTTP response bodies in memory, but it only extracts structural metadata (field names and types). It does not record, store, or transmit field values. Passwords, personal data, and all response content are discarded immediately after structure extraction.
Can PhantomAPI read environment variables or other process memory?
No. The eBPF uprobes attach specifically to SSL_read and SSL_write and see only the buffer pointer those functions receive plus the returned length — the TLS plaintext that's already in the application's hands. eBPF as a technology has the capability to read arbitrary user memory via bpf_probe_read_user, but PhantomAPI's program only reads within that TLS buffer range. This is verifiable independently by dumping the loaded program with sudo bpftool prog dump xlated (see Section 7). Environment variables, heap secrets, and everything else in the process's address space are out of scope.
Can the eBPF program crash my application?
No. eBPF programs are verified by the Linux kernel before loading. They cannot write to process memory, execute arbitrary code, or cause the observed application to crash. If PhantomAPI itself crashes, the eBPF programs are automatically cleaned up by the kernel with no impact on your application.
Does PhantomAPI require a kernel module?
No. PhantomAPI uses eBPF, which is built into the Linux kernel (4.x+). No kernel modules are loaded or compiled. The eBPF verifier ensures all programs are safe before they execute.
What happens if I stop PhantomAPI?
The process exits, the kernel automatically detaches all eBPF programs and releases associated resources. Your application continues running with zero residual impact. No kernel state is left behind.
Does PhantomAPI intercept or proxy my traffic?
No. PhantomAPI is a passive observer. It does not sit in the request path, does not terminate TLS connections, and does not modify any traffic. For HTTPS, it reads data after your application's own TLS library has already decrypted it.
What outbound connections does PhantomAPI make?
Only one: an HTTP POST to the backend URL you configure at startup. If no URL is configured, PhantomAPI makes zero outbound connections. It does not phone home or send telemetry.
Can I run PhantomAPI without root?
Yes. You can grant the Linux capabilities CAP_BPF and CAP_PERFMON to the binary instead of running as root. These capabilities are narrowly scoped and do not grant general administrative access.
What if the observed service doesn't use OpenSSL?
PhantomAPI's HTTPS visibility is built on uprobes targeting OpenSSL's SSL_read and SSL_write. Services using non-OpenSSL TLS stacks — pure Go (crypto/tls), Rust with rustls, BoringSSL, and similar — will not have their encrypted traffic decoded; PhantomAPI will only observe cleartext HTTP on those processes. Most Node.js, Python, and Ruby runtimes ship with OpenSSL and work out of the box. Go services that link OpenSSL through cgo also work; Go services using the standard library's TLS do not.
Is the source code available for audit?
PhantomAPI is currently distributed as a compiled binary via private GitHub releases with SHA-256 checksums. Source code audits can be arranged for Enterprise customers under NDA. Contact kevin@phantomapi.dev.