Assuming ASLR is disabled, an attacker could just open a disassembler and look for the address where the shellcode has been stored. This can be easily done by setting a breakpoint just after the user input and then printing the stack in order to find your payload.
In gdb you can run: x/100xg $rsp
or in 32 bit: x/100xw $esp
.
If you are having problems with finding your payload in all that garbage, you can try sending some A's first and searching for it's hex value (0x41).
If ASLR is enabled it will add a considerable layer of protection by randomizing the base address of every memory region (except the code segment) including the stack, and so, you will not be able to jump to the address in which your payload it's stored.
ASLR doesn't make a program unexploitable though, you can still leak the stack base address and calculate the offset to your payload, or even leak libc base address and perform a ROP.