0
点赞
收藏
分享

微信扫一扫

THE RAW SOCKET PROGRAM EXAMPLES

眼君 2022-02-15 阅读 70

The RAW socket C programming tutorial with working program examples tested on Linux OSicon-default.png?t=M0H8https://www.tenouk.com/Module43a.html

LINUX SOCKET PART 17

Advanced TCP/IP - THE RAW SOCKET PROGRAM EXAMPLES

 

This is a continuation from Part IV series, Advanced TCP/IP Programming Tutorial.  Working program examples if any compiled usinggcc, tested using the public IPs, run on Fedora Core 3, with several times of update, as root or SUID 0.  The Fedora machine used for the testing having the "No Stack Execute" disabled and the SELinux set to default configuration.

Building and injecting RAW datagrams program examples

 

 

You can use network monitoring tools to capture the raw socket datagrams at the target machine to see the effect.  The following is a raw socket and tcp program example.

 

 

 

 

 

 

 

Network utilities applications such asping and Traceroute (check Unix/Linux man page) use ICMP and raw socket.  The following is a very loose ping and ICMP program example.  It is taken from ping-of-death program.

 

You can verify this ‘attack’ at the target machine by issuing the tcpdump –vv command or other network analyzer tools such asEthereal/Wireshark.

 

 

 

 

 

 

 

More reading and digging:

 

  1. Check the best selling C/C++, Networking, Linux and Open Source books at Amazon.com.

  2. Broadcasting, multicasting etc sample codes.

  3. Telephony HOW-TO TLDP.

  4. GCC, GDB and other related tools.

  5. The NonStop HP TCP/IP programming (Pdf).

  6. Original ping source code.

 

 

举报

相关推荐

0 条评论