I hope it’s ok to post this here, ass I know it’s totally off topic.
I’ve been using overthewire’s narnia series to learn about binary exploitation basics ( in order to tackle the Ellingson root part ).
On level2 I have been following a writeup to learn how to get offsets etc …The issue is, the values I seem to require differ from the writeups.
In this guide - they need 140 a’s and then 4 b’s to overwrite the eip - but for me it’s 132 a’s and 4b’s to do it.
I also tried using peda and create pattern - and that returned the same value!
create offset - run with offset - get seg fault - x/s $eip - paste value into pattern offset
I then followed another guide where they disassembled main in gdb and found the strcpy call offset and then put a breakpoint after and seemed to manually work out the offset rather than fuzzing. So even in that guide, my disassembled code was different to theirs.