/ctf_beacon

Periodically sends out a UDP broadcast beacon, containing a given message.

Primary LanguageC

ctf_beacon

Purpose

This program periodically sends out a UDP broadcast beacon, containing a given string. Main idea is to check if contestants are paying attention to the network. Syntax is:

./ctf_beacon <IP address> <port> "<string>" <seconds between beacons>

Example

./ctf_beacon 192.168.2.255 9999 "flag ABCD-1234-xy2z" 5

Compiling

Compile this program via:

gcc -o ctf_beacon ctf_beacon.c

Notes

  • Doesn't require root permissions to run (unless port < 1024).
  • This was written at 2 a.m. so please excuse the errors.

Ideas for use

  • Encode the flag (e.g., base64).
  • Send longer flags by doubling the number of packets sent (use more than one "if" statement in the "for" loop).
  • Same as above, but add a sleep statement between the packets.

Ideas for future versions

  • instead of a set sleep span, how about sleep span plus a random number?
  • embed a timestamp

Adapted from/inspired by