Skip to content

Instantly share code, notes, and snippets.

@marconett
Created July 2, 2022 11:57
Show Gist options
  • Save marconett/226922a6a882c43e647a3680ca0810f2 to your computer and use it in GitHub Desktop.
Save marconett/226922a6a882c43e647a3680ca0810f2 to your computer and use it in GitHub Desktop.
Netcode challenge

Paket Structure

Description

  • type: describes the nature of the payload. always ff.
  • checksum: unknown!
  • subtype: further describes the nature of the payload. always 03.
  • padding: unknown, but always ffffffff.
  • data length: length of the data string in little endian.
  • data: variable length ascii text.

Valid examples packets

[ type ] [ checksum ] [ subtype ] [ padding  ] [ data length ] [ data ...]
[  ff  ] [   6536   ] [   03    ] [ ffffffff ] [  60000000   ] 313033313b303b676438363736313538313538653831653662333238653b5a3268705a484a6858326431626d526862513d3d3b303b5f3b6d757369635f64643b3330333733323366326134636134363030633635613335613735623333346339
[  ff  ] [   c3b9   ] [   03    ] [ ffffffff ] [  68010000   ] 313033313b303b32376233373666326534323234646563393936356430326633613634356364343b4d544a35627942685a6e427a494842796279426f61513d3d3b303b303a352e38323a352e32303a2d31322e38313a302e33393a302e33353a2d302e38353a35342e30303a35342e30303a35342e30303a302e30303a73745f6272696768745f707572706c655f6579653a3021303a2d342e31343a352e35313a2d31332e33323a2d302e32383a302e33373a2d302e38393a35342e30303a35342e30303a35342e30303a302e30303a73745f6272696768745f707572706c655f6579653a3121303a2d302e30373a2d342e39393a2d31342e31353a2d302e30303a2d302e33333a2d302e39343a34362e30303a34362e30303a34362e30303a302e30303a73745f6375727665645f626c61636b5f65796562726f773a313b6d757369635f64643b3336336566393063636636303163376535383639373666303836353037306531
[  ff  ] [   495c   ] [   03    ] [ ffffffff ] [  08010000   ] 313033313b303b32376233373666326534323234646563393936356430326633613634356364343b5a3239765a434277624746355a584967615731763b303b303a352e36323a362e35383a2d31322e32363a302e33373a302e34343a2d302e38323a33322e30303a33322e30303a33322e30303a302e30303a73745f676f6f676c795f617175615f6579653a3021303a2d342e31343a352e34363a2d31332e33353a2d302e32383a302e33363a2d302e38393a33322e30303a33322e30303a33322e30303a302e30303a73745f676f6f676c795f617175615f6579653a303b6d757369635f64643b3336336566393063636636303163376535383639373666303836353037306531
[  ff  ] [   f706   ] [   03    ] [ ffffffff ] [  de020000   ] 313033313b303b32376233373666326534323234646563393936356430326633613634356364343b5157357662673d3d3b303b303a312e35333a332e32353a2d31342e35363a302e31303a302e32323a2d302e39373a32382e32353a32382e32353a32382e32353a362e31373a73745f73696d706c655f335f6d6f7574683a3021303a2d312e33313a2d342e30353a2d31342e33383a2d302e30393a2d302e32373a2d302e39363a32302e37353a32302e37353a32302e37353a362e32353a73745f706f72743a3021303a312e35353a332e33373a2d31342e35333a302e31303a302e32323a2d302e39373a32392e35343a32392e35343a32392e35343a302e30303a73745f73696d706c655f335f6d6f7574683a3021303a312e37343a332e34323a2d31342e35303a302e31323a302e32333a2d302e39373a32392e35343a32392e35343a32392e35343a302e30303a73745f73696d706c655f335f6d6f7574683a3021303a312e34313a332e34333a2d31342e35333a302e30393a302e32333a2d302e39373a32372e30383a32372e30383a32372e30383a302e30303a73745f73696d706c655f335f6d6f7574683a3021303a2d342e30373a332e39383a2d31332e38383a2d302e32373a302e32373a2d302e39333a31392e36393a31392e36393a31392e36393a2d332e36393a73745f746869636b5f626c61636b5f65796562726f773a3021303a2d352e36333a332e35343a2d31332e34353a2d302e33383a302e32343a2d302e39303a33342e34363a33342e34363a33342e34363a2d342e39323a73745f746869636b5f626c61636b5f65796562726f773a3021303a2d342e30323a362e33343a2d31322e39393a2d302e32373a302e34323a2d302e38373a32342e36323a32342e36323a32342e36323a2d332e35343a73745f746869636b5f626c61636b5f65796562726f773a303b6d757369635f64643b3030303030303030303030303030303030303030303030303030303030303030

sending either of those example packets to a dbt server, makes it accept the connection. changing just one byte in checksum or data makes the server not accept the client. changing bytes in the other fields would.

Challenge

How to calculate the checksum?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment