Skip to content

atroubledsnake/SNEK_Stack

Repository files navigation

SNEK Stack

What is it you ask? It's a minimal native stack inspect utility in pure C.

Build targets

  • sstack-linux-x86_64 - Linux ELF x86_64 build
  • sstack-macos-x86_64 - macOS Mach-O x86_64 build
  • sstack-windows-x86_64.exe - Windows PE x86_64 build

Build on Windows

gcc -Os -s -o sstack64.exe main.c sstack_common.c sstack_windows.c

Build on Linux

gcc -Os -s -o sstackl64 main.c sstack_common.c sstack_linux.c

Build on macOS

clang -Os -s -o sstackm64 main.c sstack_common.c sstack_macos.c

Usage

./sstack-linux-x86_64 --pid <pid>
./sstack-macos-x86_64 --pid <pid>
sstack-windows-x86_64.exe --pid <pid>

or without the --pid flag:

./sstack-linux-x86_64 <pid>
# etc...

there is also the --json flag:

./sstack-linux-x86_64 --json [OPTIONAL: --pid] <pid>
# etc...

Shrimple, really.

A dump file is written as stack_<PID>_YYYYMMDD_HHMMSS.txt in the current directory.

Notes

  • This repository give you a portable source files, with platform-specific release binaries produced per OS.
  • Linux targets produce ELF executables.
  • macOS targets produce Mach-O executables.
  • Windows targets produce PE/COFF executables.

But tbf, if you are already here I hope that was common knowledge.

Notes from author

One of my more low level tools that I am un gatekeeping, one that I'm poretty proud of too. Made it some time ago but never shared it, a shame ig, but it is what it is. You guys get to use it now, but dont excpect any updates unless you find something seriously broken.

As usual I'm not the type of guy who likes to document my code so uhh, yeah sorry for some of them, but I'm too lazy to remove em. If you wanna do my job for me I would be gratefull, aka adding proper documentation.

Long live freeware, ATroubledSnake

About

A minimal native stack inspect utility in pure C.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages