|
| 1 | +SSLv2 - Secure Sockets Layer version 2 |
| 2 | +======================================= |
| 3 | + |
| 4 | +.. module:: pcapkit.protocols.application.sslv2 |
| 5 | + |
| 6 | +:mod:`pcapkit.protocols.application.sslv2` contains |
| 7 | +:class:`~pcapkit.protocols.application.sslv2.SSLv2` only, |
| 8 | +which implements an extractor for Secure Sockets Layer |
| 9 | +version 2 (SSLv2) [*]_, whose record header is 2 or 3 octets, chosen by the |
| 10 | +high bit of its first octet (``sslv2.indicator``): |
| 11 | + |
| 12 | +.. code-block:: text |
| 13 | +
|
| 14 | + 2-octet form (high bit set): |
| 15 | +
|
| 16 | + 0 1 2 |
| 17 | + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
| 18 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 19 | + |1| sslv2.indicator/length_low (15) | |
| 20 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 21 | + |sslv2.msg_type | handshake message body ... |
| 22 | +
|
| 23 | + 3-octet form (high bit clear): |
| 24 | +
|
| 25 | + 0 1 2 3 |
| 26 | + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 |
| 27 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 28 | + |0|E| sslv2.indicator/length_low (14) | sslv2.padding (8) | |
| 29 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| 30 | + |sslv2.msg_type | handshake message body ... |
| 31 | +
|
| 32 | +``E`` is the ``IS-ESCAPE`` flag, meaningful only in the 3-octet form. See |
| 33 | +:func:`~pcapkit.protocols.schema.application.sslv2.sslv2_record_length` for the |
| 34 | +exact bit arithmetic. |
| 35 | + |
| 36 | +SSLv2 is wire-*incompatible* with SSLv3 and TLS: it carries no content-type |
| 37 | +byte and no ``0x03xx``-style record version, and its handshake message type |
| 38 | +is the first octet of the record's data rather than a separate record-layer |
| 39 | +field. This package parses the ``CLIENT-HELLO`` and ``SERVER-HELLO`` |
| 40 | +handshake message bodies; every other |
| 41 | +:class:`~pcapkit.const.sslv2.handshake_type.HandshakeType`, and a hello-tagged |
| 42 | +body whose declared sub-field lengths do not fit the record (e.g. |
| 43 | +ciphertext), is kept as raw octets, header and message type decoded. |
| 44 | + |
| 45 | +.. versionadded:: 1.6.0 |
| 46 | + |
| 47 | +.. raw:: html |
| 48 | + |
| 49 | + <br /> |
| 50 | + |
| 51 | +.. autoclass:: pcapkit.protocols.application.sslv2.SSLv2 |
| 52 | + :no-members: |
| 53 | + :show-inheritance: |
| 54 | + |
| 55 | + .. autoproperty:: name |
| 56 | + .. autoproperty:: alias |
| 57 | + .. autoproperty:: length |
| 58 | + |
| 59 | + .. automethod:: read |
| 60 | + .. automethod:: make |
| 61 | + |
| 62 | + .. automethod:: id |
| 63 | + |
| 64 | + .. automethod:: _make_data |
| 65 | + .. automethod:: _make_sslv2_client_hello |
| 66 | + .. automethod:: _make_sslv2_server_hello |
| 67 | + |
| 68 | +Header Schemas |
| 69 | +-------------- |
| 70 | + |
| 71 | +.. module:: pcapkit.protocols.schema.application.sslv2 |
| 72 | + |
| 73 | +.. autoclass:: pcapkit.protocols.schema.application.sslv2.SSLv2 |
| 74 | + :members: |
| 75 | + :show-inheritance: |
| 76 | + |
| 77 | +.. autoclass:: pcapkit.protocols.schema.application.sslv2.HandshakeBody |
| 78 | + :members: |
| 79 | + :show-inheritance: |
| 80 | + |
| 81 | +.. autoclass:: pcapkit.protocols.schema.application.sslv2.UnknownHandshakeBody |
| 82 | + :members: |
| 83 | + :show-inheritance: |
| 84 | + |
| 85 | +.. autoclass:: pcapkit.protocols.schema.application.sslv2.ClientHello |
| 86 | + :members: |
| 87 | + :show-inheritance: |
| 88 | + |
| 89 | +.. autoclass:: pcapkit.protocols.schema.application.sslv2.ServerHello |
| 90 | + :members: |
| 91 | + :show-inheritance: |
| 92 | + |
| 93 | +Auxiliary Functions |
| 94 | +~~~~~~~~~~~~~~~~~~~~ |
| 95 | + |
| 96 | +.. autofunction:: pcapkit.protocols.schema.application.sslv2.sslv2_record_length |
| 97 | +.. autofunction:: pcapkit.protocols.schema.application.sslv2.sslv2_hello_probe_length |
| 98 | +.. autofunction:: pcapkit.protocols.schema.application.sslv2.sslv2_hello_probe_is_plausible |
| 99 | +.. autofunction:: pcapkit.protocols.schema.application.sslv2.sslv2_body_selector |
| 100 | + |
| 101 | +Data Models |
| 102 | +----------- |
| 103 | + |
| 104 | +.. module:: pcapkit.protocols.data.application.sslv2 |
| 105 | + |
| 106 | +.. autoclass:: pcapkit.protocols.data.application.sslv2.SSLv2 |
| 107 | + :members: |
| 108 | + :show-inheritance: |
| 109 | + |
| 110 | +.. autoclass:: pcapkit.protocols.data.application.sslv2.ClientHello |
| 111 | + :members: |
| 112 | + :show-inheritance: |
| 113 | + |
| 114 | +.. autoclass:: pcapkit.protocols.data.application.sslv2.ServerHello |
| 115 | + :members: |
| 116 | + :show-inheritance: |
| 117 | + |
| 118 | +.. rubric:: Footnotes |
| 119 | + |
| 120 | +.. [*] https://datatracker.ietf.org/doc/html/draft-hickman-netscape-ssl-00 |
0 commit comments