Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,208 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,289 people online right now. Registration is fast and FREE... Join Now!




How to add sequence numbers to packet headers for security?

 
Reply to this topicStart new topic

How to add sequence numbers to packet headers for security?

adamj2
2 Jun, 2008 - 09:32 AM
Post #1

New D.I.C Head
*

Joined: 2 Jun, 2008
Posts: 5

Hi there,

I have been searching the web for examples of how to add sequence numbers to packets for security puproses to prevent replay attacks but have found nothing yet.

I want to program in the sequence header field within the packet header to add an incrementing sequence number to each packet and then the reciever will check that sequence number for security purposes.

Does anyone know of any websites showing examples of open source code of how to implement sequence numbers to prevent replay attacks?

Many thanks!
User is offlineProfile CardPM
+Quote Post

baavgai
RE: How To Add Sequence Numbers To Packet Headers For Security?
2 Jun, 2008 - 11:03 AM
Post #2

Dreaming Coder
Group Icon

Joined: 16 Oct, 2007
Posts: 2,047



Thanked: 106 times
Dream Kudos: 475
Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua

My Contributions
Packets over a TCP network always have a sequence number, otherwise you couldn't put them back together. The packets that represent a complete message can arrive out of order for any number of reasons. For this reason, I don't think there are any examples, because it's already there.

A replay attack has little to do with packet order. Rather, you're replaying an authentication handshake to another party. If at attacker is spoofing packets, they can put whatever data they want in there, so trivial numbering wouldn't help anyway. Look into one time pads and two part authentication.

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 01:05PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month