I figured out what the problem was. I had to link the zsh to /bin/bash/. I skipped that because I thought I only had to do that if I was using Fedora. I was using Ubuntu.
Answer from user1991682 on Stack Overflowc - Buffer Overflow Vulnerability Lab problems - Stack Overflow
c - Buffer overflow vulnerability lab - Stack Overflow
Buffer overflow vulnerability lab
How do buffer overflow attacks work?
Videos
I figured out what the problem was. I had to link the zsh to /bin/bash/. I skipped that because I thought I only had to do that if I was using Fedora. I was using Ubuntu.
strcpy(buffer, str);
One of the things you will need to address during testing is this function call.
FORTIFY_SOURCE uses "safer" variants of high risk functions like memcpy and strcpy. The compiler uses the safer variants when it can deduce the destination buffer size. If the copy would exceed the destination buffer size, then the program calls abort().
To disable FORTIFY_SOURCE for your testing, you should compile the program with -U_FORTIFY_SOURCE or -D_FORTIFY_SOURCE=0.