return to libc only working while running via gdb
I am trying to run a classic return-to-lib execution to spawn a shell.

The vulnerable executable runs properly while running inside gdb, i.e. successfully spawns a shell.

However, if I execute it directly, it gives this error:

    sh: Syntax error: ";" unexpected

Any ideas what I'm missing?? ASLR and stack-protection has been disabled. There are no errors/warnings during compilation of my attacker and vulnerable programs.

Thanks in advance,
Roy
return to libc only working while running via gdb
===

I am trying to run a classic return-to-lib execution to spawn a shell.

The vulnerable executable runs properly while running inside gdb, i.e. successfully spawns a shell.

However, if I execute it directly, it gives this error:

    sh: Syntax error: ";" unexpected

Any ideas what I'm missing?? ASLR and stack-protection has been disabled. There are no errors/warnings during compilation of my attacker and vulnerable programs.

Thanks in advance,
Roy