infect(1)

infect1

Insert malicious code into an existing binary

Usage

infect FILENAME

Overview

infect alters an executable file by inserting extra code to run before the original program, that when invoked creates a set-user-ID /bin/sh program.

infect only operates on 64-bit ELF executable files.

Options

None.

Notes

In order to minimize the size of the code that needs to be inserted, infect relies on several non-portable aspects of Linux ELF executables. This program is therefore in no way guaranteed to function with future revisions of the Linux kernel. Then again, infect is not really meant to be used so much as its source code is meant to be read.

Releases

Unchanged in 2 releases since Debian 13 (Trixie).

  1. 13–Arch

From elfkickers 3.2-6 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.