用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/AeonDave/malskill --skill patchelf命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | patchelf |
| description | Auth/lab ref: ELF patching utility for changing interpreters, RPATH/RUNPATH, DT_NEEDED entries, and SONAME fields. |
| license | GPL-3.0 |
| compatibility | Linux primary; ELF binaries and shared libraries only. |
| metadata | {"author":"AeonDave","version":"1.0"} |
Patch existing ELF metadata without recompiling the target.
Use patchelf when you need to:
DT_NEEDED dependenciesSONAMEThis is especially useful in exploit labs, portable bundles, and offline ELF repair workflows.
# 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 ./prog
patchelf --set-interpreter /path/to/ld-linux.so.2 ./prog
Use when a binary must run with a matching loader for a bundled libc.
patchelf --set-rpath /opt/app/lib:/other/lib ./prog
patchelf --shrink-rpath ./prog
patchelf --shrink-rpath --allowed-rpath-prefixes /usr/lib:/opt/app/lib ./prog
patchelf --remove-needed libfoo.so.1 ./prog
patchelf --add-needed libbar.so.1 ./prog
patchelf --replace-needed libold.so.1 libnew.so.1 ./prog
patchelf --set-soname libcustom.so.1 ./libtarget.so
cp ./vuln ./vuln.patched
patchelf --set-interpreter ./ld-linux-x86-64.so.2 ./vuln.patched
patchelf --set-rpath '$ORIGIN' ./vuln.patched
Then verify with ldd, readelf, or by executing under a controlled directory.
readelf -l, readelf -d, and ldd.$ORIGIN-based RPATHs for portable bundles.No bundled scripts/, references/, or assets/.
Use upstream README for build/install variants and the complete option set.