fix: add full ext-caps for drsr secrets dump

This commit is contained in:
oiweiwei
2025-11-20 20:50:27 +01:00
committed by oiweiwei
parent 9553af669e
commit 3b6f5a9313
2 changed files with 15 additions and 2 deletions
+2 -1
View File
@@ -85,7 +85,8 @@ func main() {
}
clientCaps := drsuapi.ExtensionsInt{
Flags: drsuapi.ExtGetNCChangesRequestV8 | drsuapi.ExtStrongEncryption | drsuapi.ExtGetNCChangesReplyV6,
Flags: drsuapi.ExtGetNCChangesRequestV8 | drsuapi.ExtStrongEncryption | drsuapi.ExtGetNCChangesReplyV6,
ExtCaps: 0xFFFFFFFF,
}
b, err := ndr.Marshal(&clientCaps, ndr.Opaque)
@@ -77,7 +77,8 @@ func main() {
}
clientCaps := drsuapi.ExtensionsInt{
Flags: drsuapi.ExtGetNCChangesRequestV8 | drsuapi.ExtStrongEncryption | drsuapi.ExtGetNCChangesReplyV6,
Flags: drsuapi.ExtGetNCChangesRequestV8 | drsuapi.ExtStrongEncryption | drsuapi.ExtGetNCChangesReplyV6,
ExtCaps: 0xFFFFFFFF,
}
b, err := ndr.Marshal(&clientCaps, ndr.Opaque)
@@ -94,6 +95,17 @@ func main() {
return
}
var serverCaps drsuapi.ExtensionsInt
if err := ndr.Unmarshal(resp.Server.Data, &serverCaps, ndr.Opaque); err != nil {
fmt.Fprintln(os.Stderr, "unmarshal_server_caps", err)
return
}
if cfg.Debug {
fmt.Println(J(serverCaps))
}
// get the id using the provided name.
cracked, err := cli.CrackNames(ctx, &drsuapi.CrackNamesRequest{
Handle: resp.DRS,