S
S
SchizLoyd2020-11-27 16:35:57
gdb
SchizLoyd, 2020-11-27 16:35:57

How to find the stack size?

there is such a problem
Submit the size of the stack space after overwriting the EIP as the answer. (Format: 0x00000)

I'm exploiting a Linux buffer overflow in GDB

like this is what the payload looks like to the rest

Buffer = "\x55" * (1040 - 124 - 95 - 4) = 841
NOPs = "\x90" * 124
Shellcode = "\xda \xca\xba\xe4\x11......\x5a\x22\xa2"
EIP = "\x66" * 4'

the task is to see somewhere later what I need.

i did like this: (gdb) x/2000xb $esp+550
and there like this
0xffffd79a: 0x77 0xa4 0x3d 0xe8 0x7c 0x7b 0x3d 0x66
0xffffd7a2:



-11 856 0xffffd1b0 ecx
edx 0xffffd1d4 -11.82 thousand
ebx 1448439764 0x56556fd4 the
esp 0xffffd174 0xffffd174
ebp 0xffffd178 0xffffd178
esi 0xf7fc2000 -134.47168 million
edi 0x0 0
eip 0x56555551 0x56555551


like to know what I need?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2020-12-02
@jcmvbkbc

How to find the stack size?

You first need to figure out what size you are interested in.
Because the main thread stack in linux user applications is allocated dynamically.
for example
$ cat /proc/16150/maps | grep stack
7ffd8875b000-7ffd8877c000 rw-p 00000000 00:00 0                          [stack]

0x21000 bytes of stack (132Kb) are currently available in this application. But in general the stack can grow...
$ ulimit -a | grep stack
stack size              (kbytes, -s) 8192

...up to 8Mb.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question