Skip to content

Commit aff15f5

Browse files
committed
Implement IAKERB support
This is a new feature currently available in Windows Insiders to use Kerberos on machines with no domain, or when line of sight with the DC is unavailable. AI-Assisted: no
1 parent 326cf5e commit aff15f5

7 files changed

Lines changed: 646 additions & 120 deletions

File tree

scapy/asn1/mib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ def load_mib(filenames):
741741
'1.3.6.1.5.5.2': 'SPNEGO - Simple Protected Negotiation',
742742
'1.3.6.1.4.1.311.2.2.10': 'NTLMSSP - Microsoft NTLM Security Support Provider',
743743
'1.3.6.1.4.1.311.2.2.30': 'NEGOEX - SPNEGO Extended Negotiation Security Mechanism',
744+
'1.3.6.1.4.1.311.2.2.40': 'SPNEGO - Negotiate Late Fallback',
744745
}
745746

746747
# kerberos #

scapy/asn1fields.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,10 @@ def m2i(self, pkt, s):
493493
except ASN1F_badsequence:
494494
break
495495
if len(s) > 0:
496-
raise BER_Decoding_Error("unexpected remainder", remaining=s)
496+
raise BER_Decoding_Error(
497+
"unexpected remainder in %s" % pkt.name,
498+
remaining=s,
499+
)
497500
return [], remain
498501

499502
def dissect(self, pkt, s):
@@ -586,7 +589,10 @@ def m2i(self,
586589
if c:
587590
lst.append(c)
588591
if len(s) > 0:
589-
raise BER_Decoding_Error("unexpected remainder", remaining=s)
592+
raise BER_Decoding_Error(
593+
"unexpected remainder in %s" % pkt.name,
594+
remaining=s,
595+
)
590596
return lst, remain
591597

592598
def build(self, pkt):
@@ -930,7 +936,10 @@ def m2i(self, pkt, s): # type: ignore
930936
else:
931937
return None, bit_string.val_readable
932938
if len(s) > 0:
933-
raise BER_Decoding_Error("unexpected remainder", remaining=s)
939+
raise BER_Decoding_Error(
940+
"unexpected remainder in %s" % pkt.name,
941+
remaining=s,
942+
)
934943
return p, remain
935944

936945
def i2m(self, pkt, x): # type: ignore

0 commit comments

Comments
 (0)