Question

I write a assembly program in my centos5_x64:


.data
.global _start
_start:
jmp f0
start:
pop %rsi
xor %rax,%rax
mov %al,7(%rsi)
mov %rsi,8(%rsi)
mov %rax,12(%rsi)
mov $0xb,%al
mov %rsi,%rbx
lea 8(%rsi),%rcx
xor %rdx,%rdx
int $0x80
f0:
call start
cmd: .ascii "/bin/shAAAAAAAAAAAAAAAAA"

It can be executed. I want to use gdb for debugging it, how I'd set breakpoint for start entry?

Was it helpful?

Solution

If it is assembled and linked with debug symbols, use:

(gdb) break start
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top