We have to receive and send packets in a network simulator. We can receive the first packet by turning promiscuous mode on with prom on
and then running the recv
command. This gives the following text message once decoded from Base64:
To send a packet back with the message select flag
we need to swap around the ports and IP values, and then change the length in the packet. For example, if we have the packet in hex:
{} - Length values
[] - IPs
() - Ports
We can construct a new packet (as hex):
In Base64:
Exit promiscuous mode with prom off
and run emit
with the new Base64 encoded packet, then go back into promiscuous mode with prom on
and run recv
, and you will get this:
Just decode this, and you will get the flag.
P.S: A lot of the swapping might not be needed? This solution worked for me, at least. Also I nulled out the checksum parts, which somehow worked too?
irisctf{udp_1p_sp00fing_is_tr1vial_but_un1dir3ct10nal}
https://hpd.gasmi.net/ (Packet analysis tool)