patchelf
Auth/lab ref: ELF patching utility for changing interpreters, RPATH/RUNPATH, DT_NEEDED entries, and SONAME fields.
v2026.11.13-21cd5683 instalações+3 em 7 dias39 EstrelasGPL-3.0sincronizado há 11 horas
Instalar
Ainda não tem a CLI da NotHoly? Instale primeiro.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install aeondave/patchelfGrava em ~/.notholy/skills depois de conferir a assinatura e o SHA-256.
AssinaturaAssinado, ed25519
Pacoteb57c95c8…ff573d4e
b57c95c8aef5…a3c0ff573d4e1 arquivo · 1.2 KBVarreduraBaixonenhum achado
Fontegithub.com/AeonDave/malskill/tree/main/offensive-tools/rev/patchelf@21cd568
Este item ainda não foi escrito no seu idioma, então aparece em English.
Nesta página
Patch existing ELF metadata without recompiling the target.
When to use patchelf
Use patchelf when you need to:
- force an ELF to use a specific dynamic loader
- point a binary at a custom libc or bundled libraries
- trim or rewrite RPATH/RUNPATH entries
- add, remove, or replace
DT_NEEDEDdependencies - change a shared library
SONAME
This is especially useful in exploit labs, portable bundles, and offline ELF repair workflows.
Quick Start
# Set custom loader
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 ./prog
# Set custom RPATH
patchelf --set-rpath '$ORIGIN/libs' ./prog
# Replace one needed library with another
patchelf --replace-needed libold.so libnew.so ./progHigh-Value Operations
Change interpreter
patchelf --set-interpreter /path/to/ld-linux.so.2 ./progUse when a binary must run with a matching loader for a bundled libc.
Set or shrink RPATH
patchelf --set-rpath /opt/app/lib:/other/lib ./prog
patchelf --shrink-rpath ./prog
patchelf --shrink-rpath --allowed-rpath-prefixes /usr/lib:/opt/app/lib ./progChange dependencies
patchelf --remove-needed libfoo.so.1 ./prog
patchelf --add-needed libbar.so.1 ./prog
patchelf --replace-needed libold.so.1 libnew.so.1 ./progChange shared library SONAME
patchelf --set-soname libcustom.so.1 ./libtarget.soCanonical Exploit-Lab Workflow
cp ./vuln ./vuln.patched
patchelf --set-interpreter ./ld-linux-x86-64.so.2 ./vuln.patched
patchelf --set-rpath '$ORIGIN' ./vuln.patchedThen verify with ldd, readelf, or by executing under a controlled directory.
Practical Notes
- Always patch a copy first.
- Verify before and after with
readelf -l,readelf -d, andldd. - Prefer
$ORIGIN-based RPATHs for portable bundles. - Use patchelf for loader/runtime metadata, not for arbitrary code patching.
Caveats
- ELF only.
- Bad interpreter or dependency changes can make the binary unloadable.
- Patching dependency layout does not fix ABI mismatches by itself.
Resources
No bundled scripts/, references/, or assets/.
Use upstream README for build/install variants and the complete option set.
Arquivos desta versão
- SKILL.md2.4 KB
Permissões
| Permissão | Declarada | Encontrada na varredura |
|---|---|---|
| Lê arquivos | Não | Não |
| Grava arquivos | Não | Não |
| Roda comandos no shell | Sim | Sim |
| Usa a rede | Não | Não |
| Usa conectores | Não | Não |
| Controla um navegador | Não | Não |
Achados da varredura
Revisado em 13 de nov. de 2026
A varredura não encontrou nada para apontar nesta versão.
Uma varredura limpa reduz o risco, mas não prova que o pacote é seguro. Leia o que você instala.
| Versão | Publicada em | Commit | SHA-256 | Assinatura | Mudança de permissão |
|---|---|---|---|---|---|
| v2026.11.13-21cd568 | 13 de nov. de 2026 | 21cd568 | b57c95c8 | Assinada | – |
Mais de AeonDave
Tudo deste publicadorMais em Engenharia reversa e fuzzing
Ver a categoriaPergunte tudo o que o seu escopo permite.
Crie a conta, adicione créditos e faça a primeira pergunta no chat ou no terminal.
- 1/3
Crie a conta
Individual ou empresa. Dá para virar empresa depois sem perder saldo nem chaves.
Pessoa físicaEmpresa - 2/3
Adicione créditos
No cartão. Você paga por token, sem assinatura.
$5.00recarga mínima - 3/3
Pergunte
No chat, ou instale o CLI e rode notholy login no terminal.
$ notholy login