Netcat – Make a relay in Linux

Create a named pipe to redirect traffic

fifo is first in first out

mkfifo backpipe

  1. Listen on port 2222 for attacker traffic
  2. Attack traffic is piped to target
  3. target response is written to the named pipe
  4. return backpipe data to attacker client

nc -l -p 2222 < backpipe | nc 80 > backpipe