RAW_SOCKET to forge UDP packets

Recently, I had to forge UDP packets in order to resolve a challenge, but unfortunately, I faced a lack of documentation on RAW_SOCKET with the usage of UDP. So there is my feedback on how to forge correct UDP packets, with links to documentation I used.

To begin with, let me introduce what is a RAW_SOCKET, and what we can do with it. A RAW_SOCKET is a type of socket that allows you to bypass the operating system encapsulation. You are responsible to fill all headers of the different protocols used during the communication. Thus, you have to fill IP Header, and UDP header on our example. Furthermore, you have to comply with the different RFCs by computing yourself all checksums to keep packet’s integrity while transmitting data in the wild.

A RAW_SOCKET requires root credentials, as forging a packet is really sensitive and allows one to do IP Spoofing on local network (ISP’s protection are pretty efficient :)). You can also use them to do application spoofing in order to send application-specific data, or whatever you want.

Create the socket Continuer la lecture de « RAW_SOCKET to forge UDP packets »

GTS

GTS : Generic Tcp Server

Nous allons réaliser en C un serveur tcp/ip multi-clients générique…

oulà… doucement :

-serveur : va attendre que des clients se connectent

-tcp/ip : les connections clientes se feront par le protocole tcp/ip

-multi-clients : le serveur peut gérer plusieurs clients en même temps

-générique 😮 : le serveur s’occupe uniquement de l’aspect communications réseaux. Lorsqu’un client se connecte, il exécute une commande shell de notre choix.

Continuer la lecture de « GTS »