Skip to content

Commit 316945f

Browse files
authored
Add request_tgt example with a hash
1 parent d5337f1 commit 316945f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

doc/scapy/layers/kerberos.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ This section tries to give many usage examples, but isn't exhaustive. For more d
5656
>>> # We use ticket 1 from the above store.
5757
>>> smbclient("dc1.domain.local", ssp=t.ssp(1))
5858
59+
- **Request a TGT using a hash**: see the docstring of :func:`~scapy.layers.kerberos.krb_as_req`
60+
61+
.. code:: pycon
62+
63+
>>> from scapy.libs.rfc3961 import EncryptionType
64+
>>> load_module("ticketer")
65+
>>> t = Ticketer()
66+
>>> # Using the HashNT
67+
>>> t.request_tgt("Administrator@DOMAIN.LOCAL", key=Key(EncryptionType.RC4_HMAC, bytes.fromhex("2b576acbe6bcfda7294d6bd18041b8fe")))
68+
>>> # Using the AES-256-SHA1-96 Kerberos Key
69+
>>> t.request_tgt("Administrator@domain.local", key=Key(EncryptionType.AES256_CTS_HMAC_SHA1_96, bytes.fromhex("63a2577d8bf6abeba0847cded36b9aed202c23750eb9c56b6155be1cc946bb1d")))
70+
5971
- **Renew a TGT or ST**:
6072

6173
.. code::

0 commit comments

Comments
 (0)