Packet with no source IP address

Thread Solved

Join Date: Jan 2008
Posts: 53
Reputation: Thew is an unknown quantity at this point 
Solved Threads: 0
Thew's Avatar
Thew Thew is offline Offline
Junior Poster in Training

Packet with no source IP address

 
0
  #1
May 15th, 2009
Hello,
I am a beginner in Windows socket programming and I want to know, if there is some way how to create an UDP packet with no source IP address (or with some different on another network) so when it is forwarded to the destination, receiver will not be able to respond.
Thanks.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 25
Reputation: crb3 is an unknown quantity at this point 
Solved Threads: 6
crb3 crb3 is offline Offline
Light Poster

Re: Packet with no source IP address

 
0
  #2
May 17th, 2009
No source address? No -- even a broadcast address is an address. A different source address? Yes. That's packet-spoofing, something that's used to cause trouble (a 'smurf' packetstorm, for instance; google "Smurf Attack"). You can play with that over your own LAN, but *don't* let it out onto the Internet.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 53
Reputation: Thew is an unknown quantity at this point 
Solved Threads: 0
Thew's Avatar
Thew Thew is offline Offline
Junior Poster in Training

Re: Packet with no source IP address

 
0
  #3
Jun 2nd, 2009
I have finally found the solution how to do this. It's possible if you use the WinPcap. You can use this to generate signals on your NIC, "to send your own packets". With use of this headers:
/* 4 bytes IP address */
typedef struct ip_address{
    u_char byte1;
    u_char byte2;
    u_char byte3;
    u_char byte4;
}ip_address;

/* IPv4 header */
typedef struct ip_header{
    u_char  ver_ihl;        // Version (4 bits) + Internet header length (4 bits)
    u_char  tos;            // Type of service 
    u_short tlen;           // Total length 
    u_short identification; // Identification
    u_short flags_fo;       // Flags (3 bits) + Fragment offset (13 bits)
    u_char  ttl;            // Time to live
    u_char  proto;          // Protocol
    u_short crc;            // Header checksum
    ip_address  saddr;      // Source address
    ip_address  daddr;      // Destination address
//    u_int   op_pad;         // Option + Padding
}ip_header;

/* UDP header*/
typedef struct udp_header{
    u_short sport;          // Source port
    u_short dport;          // Destination port
    u_short len;            // Datagram length
    u_short crc;            // Checksum
}udp_header;
I can post whole source code how to create an UDP packet and send it.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Network Security
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC