944,008 Members | Top Members by Rank

  • Networking Discussion Thread
  • Marked Solved
  • Views: 1245
  • Networking RSS
May 15th, 2009
0

Packet with no source IP address

Expand Post »
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.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
Thew is offline Offline
61 posts
since Jan 2008
May 17th, 2009
0

Re: Packet with no source IP address

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.
Reputation Points: 10
Solved Threads: 6
Light Poster
crb3 is offline Offline
25 posts
since May 2009
Jun 2nd, 2009
0

Re: Packet with no source IP address

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.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
Thew is offline Offline
61 posts
since Jan 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Networking Forum Timeline: one of the two computers is not showing in the My Network Places windows... follow-up
Next Thread in Networking Forum Timeline: MSSQL server remote access over VPN and direct





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC