Debug stack memory of Running Asterisk

In General about C programming “with gdb debugger i can see stack memory allocation and memory addresses involved during calls between routines”.
With old Asterisk versions there is a stack buffer overflow vulnerability in a specific C file part of Asterisk implementation, that i would like to inspect with a debugger - gdb like.
To reproduce the exploitation, i need to run sipp (penetration tester) to send a crafted INVITE to Asterisk.
What is the procedure and tool to see in real-time the memory usage of the vulnerable C program when the exploitation occurs?
For my lab environment i have a server with the vulnerable Asterisk, and a penetration laptop with sipp installed. I can reproduce the vulnerability getting Asterisk crashing, but i would like to know which is the way to understard what is going on with the stack.
really appreciate if someone can help.
thanks

1 Like