A rescue shell in a single executable

AXE bundles an interactive shell, Unix tools, host diagnostics, a certificate-only SSH server and a verified on-demand tool store. Copy it to the host you need to inspect and run it there.

Targets
Linux x86_64, aarch64; macOS aarch64
Bundled
190 commands
On demand
95 Store tools

root@host:/# env -i HOME=/tmp PATH=/nonexistent ./axe

[axe] root@host:/
#
doctor

…
Self-exec: works
Process creation: yes
Degradations: none

Download

The Linux release is a static musl ELF executable. The target needs no loader, shell or coreutils. Other targets are in GitHub Releases.

x86_64 Linux, OSS edition, stable
curl -fL -o axe https://storage.yandexcloud.net/axe-store/axe/stable/x86_64-linux/axe
sha256sum axe

Compare the hash with the published SHA-256, then run chmod +x axe and ./axe --version.

$ file axe

axe: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=…, stripped

$ readelf -lW axe | grep INTERP

$ readelf -dW axe | grep NEEDED

# both greps print nothing

Bootstrap commands

Use these when the download above does not work on the host. Each program fetches the AXE release for the host's architecture and checks its size and digest before running it. The shell script behind the curl, wget and Shell options skips the digest check, with a warning, only on a host with no SHA-256 tool.

curl, then sh
curl -fo a https://storage.yandexcloud.net/axe-store/axe/b/sh
sh a

Commands

Bundled commands are part of the executable. AXE Store downloads the other tools on first use and keeps them in a private, verified cache.

All 285 commands: 190 bundled, 95 from AXE Store.

When parts of the host are broken

A failure in one part of the host does not stop the shell or turn off Store verification.

Host conditionWhat still worksLimits
No shellBrush provides an interactive shell and runs scripts and pipelines.none
No coreutils or PATHBundled commands run without host coreutils or PATH.none
/proc unavailableBundled commands still start.Process listings and other diagnostics that read procfs are incomplete or unavailable.
Read-only or noexec filesystemBundled commands start from the original executable.AXE cannot write a private executable copy, so child commands may fail if the original executable is also removed.
Binary deleted or replacedOn Linux, a running AXE keeps launching bundled commands and SSH sessions from the original executable.On macOS, only builtins, aliases, functions and doctor remain.
Child processes cannot startShell builtins, aliases, functions and doctor.Bundled commands do not fall back to host tools.
No networkBundled commands and Store tools already in the verified cache.Store tools that are not cached are unavailable.
No rootCommands and diagnostics that do not need privileges.Operations that need privileges fail.

Host inspection

AXE reports virtualization, containers, sandboxing and restrictions that matter for recovery.

Isolation
Virtual machines, containers (including Porto) and sandboxes.
Restrictions
Capabilities, seccomp, namespaces and resource limits visible to the current process.
Confidence
Each heuristic conclusion shows a confidence level and the evidence it is based on.
doctor
Human-readable diagnostics for the current AXE process.
vzik collect
Bounded host and container evidence as JSONL. Probes that could not run are reported as unavailable.

[axe] root@host:/
#
doctor

…
Container indicator: heuristic match — porto (high confidence)
Sandboxing: heuristic match — bubblewrap (high confidence)
No new privileges: enabled
Seccomp: filtering enabled (2 filters)

SSH through an outbound connection

Run the certificate-only SSH/SFTP server on the target. The standalone relay makes it reachable when the target can only open outbound TCP or QUIC connections.

Login
OpenSSH user certificates only. The certificate principal must match the login, and the login must be on the allowlist.
QUIC
The target and the relay authenticate each other with separate certificates.
Registration
The target connects out to the relay, which assigns a public TCP port for SSH.
Control traffic
Use QUIC, or keep TCP control traffic on a trusted network. SSH through the relay still requires a certificate.