Skip to content

Protostar Stack0 different behavior #3

@gianpyc

Description

@gianpyc

Hi,
I'm following your blog pages on the buffer overflow and I'm trying to reproduce it on a VM with ubuntu 20.04.
In the specific case of stack0 example, I compile it for 32bit architecuture with the command
gcc -m32 stack0.c -o stack0
and I get the executable. Then, if I run with the command:
python -c "print ('A' * 65 )"| ./stack0

I get:
Try again? *** stack smashing detected ***: terminated Aborted (core dumped)

I got the buffer overflow but I should get the print saying the I modified the variable.
So, it seems that the variable is not overwritten, where am I wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions