
pwn 및 디버깅을 위한 힙 연산 시각화를 도와줍니다
heaptrace는 ELF64 (x86_64) 바이너리에서 glibc 힙 연산을 추적하기 위한 힙 디버거입니다. 이 도구는 바이너리 디버깅 또는 힙 pwn을 수행할 때 힙 연산을 시각화하는 데 도움을 줍니다.

--break).heaptrace와 valgrind는 어떻게 다른가요?
.deb 및 .rpm 릴리스 파일과 미리 컴파일된 바이너리는 릴리스 페이지에서 확인하세요.
$ sudo add-apt-repository ppa:arinerron/heaptrace
$ sudo apt-get update
$ sudo apt-get install heaptrace
선호하는 AUR 헬퍼를 사용하여 다음 두 패키지 중 하나를 설치하세요:
heaptrace-git — 소스 패키지 (PKGBUILD)heaptrace — 바이너리 패키지 (PKGBUILD)$ trizen -S heaptrace-git
... 또는 ...
$ trizen -S heaptrace
$ git clone https://github.com/Arinerron/heaptrace.git && cd heaptrace
$ make
$ sudo make install
...
$ heaptrace ./target
heaptrace에 인수를 지정할 때는 바이너리 이름 앞에 입력합니다:
Usage:
heaptrace [options...] <target> [args...]
heaptrace [options...] --attach <pid>
Options:
-p <pid>, --attach <pid>, --pid <pid>
Tells heaptrace to attach to the specified pid
instead of running the binary from the `target`
argument. Note that if you specify this argument
you do not have to specify `target`.
-b <expression>, --break=<expression>, --break-at=<expression>
Send SIGSTOP to the process when the specified
`expression` is satisfied and attach the GNU debugger
(gdb) to the process.
This argument supports complex expressions. Please
See the documentation for more information:
https://github.com/Arinerron/heaptrace/wiki/How-to-Create-Breakpoints
-B <expression>, --break-after=<expression>
Similar to `--break`. Replaces the tracer
process with gdb, but only after the heap function
returns. See the documentation for more information:
https://github.com/Arinerron/heaptrace/wiki/How-to-Create-Breakpoints
-e <name=value>, --environ=<name=value>, --environment=<name=value>
Sets a single environmental variable. Useful for
setting runtime settings for the target such as
LD_PRELOAD=./libc.so.6 without having them affect
heaptrace's runtime configuration. This option can
be used multiple times.
-s <sym_defs>, --symbols=<sym_defs>
Override the values heaptrace detects for the
malloc/calloc/free/realloc/reallocarray symbols.
Useful if heaptrace fails to automatically
identify heap functions in a stripped binary. See
the wiki for more info.
-F, --follow-fork, --follow
Tells heaptrace to detach the parent and follow
the child if the target calls fork(), vfork(), or
clone().
The default behavior is to detach the child and
only trace the parent.
-G <path>, --gdb-path <path>
Tells heaptrace to use the path to gdb specified
in `path` instead of /usr/bin/gdb (default).
-w <width>, --width=<width>, --term-width=<width>
Force a certain terminal width.
-o <file>, --output=<file>
Write the heaptrace output to `file` instead of
/dev/stderr (which is the default output path).
-v, --verbose
Prints verbose information such as line numbers in
source code given the required debugging info is
stored in the ELF.
-V, --version
Displays the current heaptrace version.
-h, --help
Shows this help menu.
heaptrace --break=3 ./my-binary를 실행하세요. 이 인수 사용 방법에 대한 자세한 내용은 위키 문서를 참조하세요.-s/--symbol 인수를 사용하여 heaptrace가 자동으로 함수를 식별하지 못한 스트립된 바이너리를 디버깅하는 방법에 대한 자세한 내용은 위키 문서를 참조하세요.$NO_COLOR 인수를 설정하면 출력에서 ANSI 색상 코드가 제거됩니다. 이 옵션은 아직 개발 중이며 곧 인수로 전환될 예정입니다.버그가 발생하거나 피드백이 있으면 기꺼이 도와드리겠습니다. GitHub Issues 페이지를 참조해 주세요.