A kill signal is a request, not a command. This file teaches a lab process to decline the two requests every operator sends, SIGINT and SIGTERM, then watches the polite kill and the firm kill bounce off. The defender stops asking and starts reading: the kernel keeps a public ledger of every signal each process ignores, and one bit in that ledger never belongs on a background job.
MITRE ATT&CK T1564.011: adversaries execute commands that hide from process interrupt signals, so the interrupt arrives and nothing happens. This file installs the ignore in seventeen lines of C, then reads the kernel's public ledger to prove the ignore was installed. Two actors: the attacker, who owns the lab binary and every red action; and the defender, who owns every hunt, read, kill, and rule in the blue phases.
Why this technique. Every operator's first response to a hostile process is kill, and kill's default signal is SIGTERM, the polite request to stop. The second response is kill -INT or Ctrl-C, the interrupt. Both are requests the process may legally decline. A signal is the kernel tapping a process on the shoulder; a disposition is what the process decided in advance to do about that tap: take the default action, run a handler, or ignore it outright (SIG_IGN). An implant that sets its disposition for SIGINT and SIGTERM to SIG_IGN survives the operator's first two responses, survives the session logout, and keeps running while the defender believes the kill landed. The signal was delivered. Nothing says the process honored it. That gap, between delivery and death, is the entire technique.
Why not the obvious alternative. The obvious move is the one in every runbook: send SIGTERM, expect the process to die. Break it on this file's concrete input: a plain sleep 300 dies to one kill -TERM, exactly as the runbook promises. The lab process takes six signals, three TERM and three INT, and keeps printing its heartbeat. Same signals, same sender, opposite outcomes: the runbook's promise was never a guarantee, it was a convention the process chose not to follow. The attacker's obvious alternative has the same flaw in reverse: nohup ignores only SIGHUP, the hangup signal, so it survives the logout and still dies to the admin's TERM. Ignoring INT and TERM covers the two signals operators actually send.
The mechanism, in one paragraph. Signal numbers are 1-indexed: SIGINT is 2, SIGTERM is 15. The kernel publishes every process's ignored-signal set in /proc/<pid>/status as SigIgn, a hex bitmask with bit (n-1) set for each ignored signal n. The lab process shows 0x4006: bits 1 and 2 (SIGINT, SIGQUIT) plus bit 14 (SIGTERM). SIGQUIT arrives free with backgrounding, the shell ignores it for background jobs, so a plain background job carries 0x0006. The extra 0x4000 bit is the tell: no legitimate background job ignores SIGTERM. Two signals can never be ignored, no matter what the process asks: SIGKILL and SIGSTOP are enforced by the kernel, which is why the blue phase ends the way it does.
The concrete case, before the abstraction. The BPFDoor backdoor (MITRE procedure example S1161) calls the signal function to ignore SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGCHLD, SIGTTIN, and SIGTTOU before starting its primary logic: seven interrupts declined up front, so operator interrupts and session events pass through it like weather. The GoldMax Linux variant (S0588) took the simpler road and ran under nohup, ignoring the hangup so it survived the terminal session's death. Both are the same idea at different widths: decide in advance which taps to feel, and the taps stop working.
Terms, earned. A signal is the kernel's tap on a process's shoulder. The disposition is the process's pre-decided response: default, catch, or SIG_IGN (ignore). The SigIgn mask is the kernel's public ledger of ignored signals, one bit per signal, readable by anyone in /proc. Ignore process interrupts is T1564.011: setting the disposition to ignore so the interrupt is delivered and nothing happens.
Scope. T1564.011 covers ignoring process interrupts on Linux, Windows, and macOS: nohup and disown on Unix, -ErrorAction SilentlyContinue in PowerShell, signal() in C. This file works the Linux signal() case end to end: the SIGINT plus SIGTERM ignore, the SigIgn mask tell with its control, the evidence-first containment, and the supervisor escalation that ends the next one. The canary is a benign token: it marks the lab payload and touches nothing else. The lab runs in a disposable PID and mount namespace with a private /tmp; teardown removes it and the namespace's death reaps every stray.
Ubuntu 24.04.5 LTS with gcc 13, x86-64, in a disposable PID and mount namespace used only for this lab. The attack needs no privilege at all: choosing your own signal dispositions is every process's birthright. Run it on a throwaway box anyway, because you are about to practice declining your own kill signals.
The recording starts from an empty private /tmp inside its own mount namespace, so every take begins identical. rm -rf /tmp/gh028 starts clean; mkdir -p and cd set up the lab directory. The heredoc writes deafear.c (quoted 'EOF', so the shell passes the source through untouched); gcc -O2 builds it; ls -l shows the lab binary. The attacker needs no privilege: setting SIG_IGN is not a capability, it is a library call.
$ rm -rf /tmp/gh028 && mkdir -p /tmp/gh028 && cd /tmp/gh028
cat > deafear.c <<'EOF'
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
int main(void) {
signal(SIGINT, SIG_IGN); /* the polite request is now a no-op */
signal(SIGTERM, SIG_IGN); /* the firm request is now a no-op too */
printf("canary: GHOSTLIGHT-CANARY-028\n");
printf("SIGINT and SIGTERM are ignored; heartbeat on stderr\n");
fflush(stdout);
for (long beat = 1; ; beat++) {
fprintf(stderr, "heartbeat %ld: still alive\n", beat);
fflush(stderr);
sleep(1);
}
return 0;
}
EOF
gcc -O2 -o deafear deafear.c && ls -l deafear
-rwxrwx--- 1 root root 16224 Oct 5 11:44 deafear
Seventeen lines. signal(SIGINT, SIG_IGN) declines the polite interrupt; signal(SIGTERM, SIG_IGN) declines the firm request. Both calls happen before anything else, the way BPFDoor sets its ignores before its primary logic. The process prints the benign canary GHOSTLIGHT-CANARY-028 and announces its dispositions on stdout, then enters an infinite loop writing a numbered heartbeat line to stderr once per second, flushed immediately so the log is the ground truth of liveness. sleep(1) paces it; the heartbeat is what the red phase watches to prove the process outlived its signals. return 0 is unreachable by design: this process does not plan to exit.
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
int main(void) {
signal(SIGINT, SIG_IGN); /* the polite request is now a no-op */
signal(SIGTERM, SIG_IGN); /* the firm request is now a no-op too */
printf("canary: GHOSTLIGHT-CANARY-028\n");
printf("SIGINT and SIGTERM are ignored; heartbeat on stderr\n");
fflush(stdout);
for (long beat = 1; ; beat++) {
fprintf(stderr, "heartbeat %ld: still alive\n", beat);
fflush(stderr);
sleep(1);
}
return 0;
}
The attacker launches the payload, which declines SIGINT and SIGTERM before its first heartbeat. The operator then sends both signals and watches nothing happen. A control run proves the signals themselves work fine: the problem is the process, not the delivery.
./deafear 2>heartbeat.log & starts the lab binary with stderr to the heartbeat log; [1] 13 is the shell's job notice and lab pid: 13 saves the exact pid to lab.pid. The canary and the disposition announcement print on stdout: a benign marker and a confession, in the open. sleep 1.5, then head -3 heartbeat.log shows the first two heartbeats: the ground truth of liveness the red phase will keep checking.
$ ./deafear 2>heartbeat.log & P=$! echo $P > lab.pid echo "lab pid: $P" sleep 1.5 head -3 heartbeat.log [1] 13 lab pid: 13 canary: GHOSTLIGHT-CANARY-028 SIGINT and SIGTERM are ignored; heartbeat on stderr heartbeat 1: still alive heartbeat 2: still alive
kill -INT 13, then kill -TERM 13: the two requests every operator sends, delivered to the exact pid. sleep 2, then ps -p 13 -o pid,stat,etime,cmd: still there, state S, elapsed 3 seconds, still ./deafear. tail -2 heartbeat.log: heartbeats 3 and 4, written after both signals landed. The signals were delivered. The process declined them.
$ kill -INT $P
kill -TERM $P
sleep 2
ps -p $P -o pid,stat,etime,cmd
tail -2 heartbeat.log
PID STAT ELAPSED CMD
13 S 00:03 ./deafear
heartbeat 3: still alive
heartbeat 4: still alive
The control first: sleep 300 &, one kill -TERM, and the plain process is dead, exactly as the runbook promises. The signals work fine. Then the storm: six signals, three TERM and three INT, to the exact lab pid. ps shows pid 13 still sleeping, elapsed 5 seconds. The runbook's promise was never a guarantee; it was a convention this process chose not to follow.
$ sleep 300 &
CP=$!
kill -TERM $CP
sleep 0.5
ps -p $CP >/dev/null && echo 'plain sleep: still alive' || echo 'plain sleep: dead on SIGTERM'
for i in 1 2 3; do kill -TERM $P; kill -INT $P; done
sleep 1
ps -p $P -o pid,stat,etime,cmd
echo 'the same signals bounced off the deaf process six times'
[2] 19
plain sleep: dead on SIGTERM
PID STAT ELAPSED CMD
13 S 00:05 ./deafear
the same signals bounced off the deaf process six times
Six delivered signals, zero effect. The operator's kill proved delivery, never death: the process kept its pid, its start time, and its heartbeat straight through every request to stop.
The defender never saw the launch; the blue take opens on the running process. The triad, at runbook quality. Detection: read the SigIgn mask in /proc, decode it against a control, and convict on the 0x4000 bit that never belongs on a background job. Mitigation: capture the evidence first (mask, exe link, binary hash, heartbeat), then end it with SIGKILL by exact PID, the one signal the kernel enforces. Prevention: the disposition itself cannot be prevented, so supervise with KILL escalation: a TERM-only supervisor stalls forever, and the recording proves it.
The suspect's SigIgn reads 0000000000004006. The control, a plain background sleep, reads 0000000000000006: SIGINT and SIGQUIT, which the shell ignores for background jobs. The decode names the suspect's set: SIGINT, SIGQUIT, SIGTERM. The difference is one bit, 0x4000, bit 14, SIGTERM. No legitimate background job ignores SIGTERM; nothing the shell does for you sets that bit. It can only be set deliberately, by the process itself.
$ P=$(cat /tmp/gh028/lab.pid)
echo "suspect (lab pid $P):"; grep -E '^(Name|SigIgn)' /proc/$P/status
sleep 300 & CP=$!
echo "control (plain background job, pid $CP):"; grep -E '^(Name|SigIgn)' /proc/$CP/status
kill -KILL $CP
P=$P python3 - <<'EOF'
import os, signal
pid = int(os.environ['P'])
m = int([l for l in open('/proc/%d/status' % pid) if l.startswith('SigIgn')][0].split()[1], 16)
print('suspect ignores:', ' '.join(sorted(s.name for s in signal.Signals if m & (1 << (s.value - 1)))))
print('tell: the 0x4000 bit (SIGTERM); a plain background job carries only 0x0006 (INT,QUIT)')
EOF
suspect (lab pid 13):
Name: deafear
SigIgn: 0000000000004006
[2] 26
control (plain background job, pid 26):
Name: sleep
SigIgn: 0000000000000006
suspect ignores: SIGINT SIGQUIT SIGTERM
tell: the 0x4000 bit (SIGTERM); a plain background job carries only 0x0006 (INT,QUIT)
ps -o pid,ppid,lstart,stat,cmd is the conviction: started Mon Oct 5 11:44:16 2026, still ./deafear, surviving everything the red phase sent. Evidence before action: the ps line, the exe link, the full status file with the mask, the heartbeat log proving liveness across the signals, and the binary's sha256, all timestamped into evidence/. The mask is the finding; the heartbeat log is the proof the finding mattered. Only then does the blue phase move to removal.
$ P=$(cat /tmp/gh028/lab.pid)
TS=$(date -u +%Y%m%dT%H%M%SZ)
mkdir -p evidence
ps -p $P -o pid,ppid,lstart,stat,cmd > evidence/ps-$TS.txt
readlink /proc/$P/exe > evidence/exe-$TS.txt
cp /proc/$P/status evidence/status-$TS.txt
cp heartbeat.log evidence/heartbeat-$TS.log
sha256sum deafear > evidence/sha256-$TS.txt
cat evidence/ps-$TS.txt
echo '--- evidence captured:'; ls evidence
PID PPID STARTED STAT CMD
13 1 Mon Oct 5 11:44:16 2026 S ./deafear
--- evidence captured:
exe-20261005T114422Z.txt sha256-20261005T114422Z.txt
heartbeat-20261005T114422Z.log status-20261005T114422Z.txt
ps-20261005T114422Z.txt
kill -KILL 13: by exact PID, never by name or pattern. The evidence already convicted this pid; a name pattern is a promise you keep making to every future process on the box. sleep 0.5, then ps -p 13 finds nothing, and the echo states the reason it worked: SIGKILL cannot be ignored or caught, because the kernel never asks the process. It enforces.
$ P=$(cat /tmp/gh028/lab.pid) kill -KILL $P sleep 0.5 ps -p $P >/dev/null && echo 'STILL ALIVE' || echo 'gone: SIGKILL cannot be ignored or caught' gone: SIGKILL cannot be ignored or caught
The prevention demo, executed for real. timeout 2 ./deafear sends SIGTERM after two seconds; four seconds later the supervisor is still waiting, its TERM ignored like every other TERM in this file. Then the escalation: timeout -s KILL 2 ends the process in about two seconds, rc 137. A supervisor that only knows the polite signal never gets its process back; a supervisor that escalates to KILL always does. rm -rf /tmp/gh028 removes the lab; the namespace's death reaps every stray.
$ cd /tmp/gh028 echo '--- a supervisor that only sends TERM never gets its process back:' timeout 2 ./deafear >/dev/null 2>&1 & TP=$! sleep 4 kill -0 $TP 2>/dev/null && echo 'timeout still waiting after 4s: its TERM was ignored' CP=$(pgrep -P $TP) kill -KILL $TP 2>/dev/null [ -n "$CP" ] && kill -KILL $CP 2>/dev/null wait $TP 2>/dev/null echo '--- escalate to KILL and the supervisor wins:' timeout -s KILL 2 ./deafear >/dev/null 2>&1; echo "rc=$? after ~2s" rm -rf /tmp/gh028 echo 'lab removed; the namespace dies with every stray' --- a supervisor that only sends TERM never gets its process back: [1] 42 timeout still waiting after 4s: its TERM was ignored --- escalate to KILL and the supervisor wins: rc=137 after ~2s lab removed; the namespace dies with every stray
The SigIgn mask convicted the process before a single signal was sent: 0x4006 against the 0x0006 control, the 0x4000 bit naming the deliberate ignore. Evidence was captured first, SIGKILL ended it, and the supervisor demo proved the durable lesson live.
Three moves, in order: end it, sweep for its siblings, make the next one endable. Each is one way, not the way.
It is an ordinary unprivileged process that declines requests; SIGKILL is not a request. The order is the procedure: read the SigIgn mask, copy the binary, hash it, save the status file and the heartbeat log, then kill. Kill by exact PID, confirmed against the mask first. Never pkill -f deafear: a pattern is a promise you keep making to every future process on the box, and the wrong match on a fleet is catastrophic. The blue take ran this order: evidence/ first, kill second, verification third.
$ P=$(cat /tmp/gh028/lab.pid) kill -KILL $P sleep 0.5 ps -p $P >/dev/null && echo 'STILL ALIVE' || echo 'gone: SIGKILL cannot be ignored or caught' gone: SIGKILL cannot be ignored or caught
Honest limit. SIGKILL cannot be caught, which means no cleanup hooks run: open files stay open, buffered state is lost, and the heartbeat log ends mid-line. That is the price of the unenforceable kill. Two more things KILL cannot end: a process in uninterruptible sleep (D-state, usually stuck in a device driver) and a zombie, which is already dead and only waiting for its parent to reap it. And you must be able to signal the pid at all: same user or root, and no PID namespace between you and it. A deaf process in another container is not yours to kill.
The fleet form of the blue hunt, on a timer: every pid, read SigIgn, test bit 14. One loop, no baseline, no agent.
$ for d in /proc/[0-9]*; do
m=$(awk '/^SigIgn/{print $2}' "$d/status" 2>/dev/null)
[ -n "$m" ] && [ $((0x$m & 0x4000)) -ne 0 ] && echo "LEAD pid=${d#/proc/} SigIgn=$m"
done
LEAD pid=13 SigIgn=0000000000004006
Run it across the fleet and you have the whole monitor; production versions add alerting, not new ideas.
Honest limit. This net catches only processes that ignore SIGTERM. An implant that ignores only SIGHUP, the nohup style, sails straight through it; the general detector decodes every bit, not just bit 14. The mask is also a snapshot: a process can change its dispositions at any time, so a clean sweep now says nothing about five minutes from now. And the sweep needs privilege to read every /proc/<pid>/status; run it as an unprivileged user and you are blind to every other user's processes.
Nothing prevents a process from ignoring SIGINT and SIGTERM. It is a legal disposition, one library call, no privilege, and MITRE's own mitigation note for this technique says preventive controls cannot easily touch it because it abuses a system feature. So prevention here does not mean blocking the ignore. It means making sure the ignore never buys survival: every supervisor in the chain must escalate to SIGKILL on a schedule. timeout -s KILL and timeout -k are the lab forms; the production forms are the process supervisor's kill escalation (systemd's kill signal chain ending at SIGKILL, runit's staged signals). The blue take proved the failure mode live: the TERM-only supervisor was still waiting after four seconds.
$ timeout -s KILL 30 ./deafear >/dev/null 2>&1; echo "rc=$? (KILL ends what TERM cannot)" rc=137 (KILL ends what TERM cannot)
Honest limit. The escalation ends the process; it does not prevent the ignore, and it does not prevent the next launch. A supervisor that restarts the service on failure will restart the deaf process too, brand new and still deaf, and the restart loop becomes the persistence the technique never had. Supervision answers "how does it end", not "how do we stop it coming back": the coming-back question belongs to execution prevention, allowlisting, and the SigIgn sweep above.
The deaf process dies to SIGKILL once the evidence is captured. The 0x4000 sweep finds its siblings fleet-wide with one loop. KILL-escalated supervision makes the next ignore survivable. None of it stops a process from declining the tap; all of it stops the decline from mattering.
A signal is a request the process may legally decline: kill -TERM proves delivery, never death, so confirm every kill by re-reading the process table, and treat an ignored SIGTERM in the SigIgn mask as the tell.
IOC checklist: signs this technique was used
Reproducibility checklist
Sources
MITRE ATT&CK T1564.011: Hide Artifacts: Ignore Process Interrupts (procedure examples: BPFDoor S1161, GoldMax S0588)
signal(7) (dispositions, the signals that cannot be caught or ignored)
proc(5) (the /proc/<pid>/status SigIgn field)
timeout(1) (the -s and -k escalation options)
The next file renames a system utility and watches the operator reach for the wrong binary.