Saltar al contenido ForoHackers

Protocol analysis: start here

Análisis de protocolos
#789 · Ophuscado · · Denunciar

Protocol analysis is reading what two systems actually say to each other: capturing messages, decoding their fields and checking them against the specification. It is how engineers debug networks, how defenders spot odd traffic, and how researchers find ambiguities and weaknesses in designs. Capture only networks you own or are authorised to observe.

Key concepts

  • Layering: each layer wraps the one above in a header; analysis means peeling them in order.
  • Message structure: fixed fields, lengths, type codes and options, in binary or text form, with a byte order.
  • State machines: a protocol is a set of allowed sequences; a message is valid only in the right state.
  • Specification versus reality: real implementations differ from the standard, and the gaps are where bugs live.
  • Capture and privacy: captures hold other people's data, so keep them minimal and protected.

Vocabulary

  • Dissector: code that decodes a protocol's bytes into named fields.
  • PCAP: the common file format for packet captures.
  • Handshake: the opening exchange that sets up parameters and state.
  • Endianness: the order in which a multi-byte number's bytes are stored.

What to study, in order

  1. Capture your own traffic with Wireshark and follow a web request through Ethernet, IP, TCP, TLS and HTTP.
  2. Read the specification of a simple protocol and match each field to bytes in a capture.
  3. Write a small parser for it in a language you know and test it on your own captures.
  4. Draw the state machine of a protocol, such as TCP, and find where a capture follows or breaks it.
  5. Write a dissector for a toy protocol you designed, then try to confuse it with malformed input in your lab.

Related tags

#tcp-ip #network-security #protocols #fuzzing #reverse-engineering

Inicia sesión o únete para responder.