I once stumbled upon a website http://www.security-freak.net, they had an awesome tutorial about raw sockets programming and packet injection, one of the best that i came across however i went back to that website today and it's gone, anyone ever came across it or know if they moved to a new domain.
this is a part of the content:
1. Basic Socket Programming: (4 videos - 65 mins)
1.1 Presentation on Socket Programming basics (25 mins)
1.2 "Type with Me" exercise - a simple TCP server (19 mins)
1.3 Coding a TCP Echo server (13 mins)
1.4 Coding a TCP Echo client (9 mins)
http://www.security-freak.net/sockets/s ... mming.html" onclick="window.open(this.href);return false;
2. Packet Sniffing using Raw Sockets: (7 videos - 86 mins)
2.1 Presentation on raw socket basics (14 mins)
2.2 Sniffer coding basics (15 mins)
2.3 Sniffer - Ethernet header parsing (10 mins)
2.4 Sniffer - IP header parsing (14 mins)
2.5 Sniffer - TCP header parsing (10 mins)
2.6 Sniffer - Data parsing (9 mins)
2.7 A look at Tcpdump and Ethereal (14 mins)
http://www.security-freak.net/raw-socke ... ckets.html" onclick="window.open(this.href);return false;
3. Packet Injection using Raw Sockets: (6 videos - 75 mins)
3.1 Packet injection basics presentation (10 mins)
3.2 Your first packet injection program (9 mins)
3.3 Ethernet header contruction & injection (10 mins)
3.4 IP header construction & injection (14 mins)
3.5 TCP header and data contruction & injection (17 mins)
3.6 ARP Request query injector (15 mins)
http://www.security-freak.net/packet-in ... ction.html" onclick="window.open(this.href);return false;
4. Architecture of a Proactive Security Tool: (4 videos - 43 mins)
4.1 The "Sniff - Think - Inject" logic - a presentation (10 mins)
4.2 Programming the Framework (7 mins)
4.3 Communication via the Framework (8 mins)
4.4 ARP DoS tool using the Framework (18 mins)