targetinfo
import "github.com/TheManticoreProject/Manticore/crypto/spnego/ntlm/targetinfo"
Index
- func BuildBlobTargetInfo(targetInfo []byte) []byte
- func GetTimestamp(targetInfo []byte) []byte
- func HasTimestamp(targetInfo []byte) bool
- func ParseTargetInfo(targetInfo []byte) (map[avpair.AvId][]byte, error)
func BuildBlobTargetInfo
func BuildBlobTargetInfo(targetInfo []byte) []byte
BuildBlobTargetInfo constructs the modified TargetInfo to embed in the NTLMv2 blob.
It copies all AVPairs from the challenge TargetInfo and, when a DNS computer name (MsvAvDnsComputerName) is present, inserts an MsvAvTargetName AVPair set to the SMB service principal name “cifs/<DnsComputerName>” before the EOL marker. This mirrors what the Windows client sends; modern Windows servers require the SPN in the AUTHENTICATE’s NTLMv2 AVPairs and reject the authentication (STATUS_INVALID_PARAMETER) when it is absent.
func GetTimestamp
func GetTimestamp(targetInfo []byte) []byte
GetTimestamp returns the raw 8-byte Windows FILETIME from TargetInfo, or nil if absent.
func HasTimestamp
func HasTimestamp(targetInfo []byte) bool
HasTimestamp reports whether MsvAvTimestamp is present in the TargetInfo.
func ParseTargetInfo
func ParseTargetInfo(targetInfo []byte) (map[avpair.AvId][]byte, error)
ParseTargetInfo parses the target info from a challenge message