| 2548 | |
| 2549 | |
| 2550 | class SMB2_Session_Setup_Request(_SMB2_Payload, _NTLMPayloadPacket): |
| 2551 | name = "SMB2 Session Setup Request" |
| 2552 | Command = 0x0001 |
| 2553 | OFFSET = 24 + 64 |
| 2554 | _NTLM_PAYLOAD_FIELD_NAME = "Buffer" |
| 2555 | fields_desc = [ |
| 2556 | XLEShortField("StructureSize", 0x19), |
| 2557 | FlagsField("Flags", 0, -8, ["SMB2_SESSION_FLAG_BINDING"]), |
| 2558 | FlagsField("SecurityMode", 0, -8, SMB2_SECURITY_MODE), |
| 2559 | FlagsField("Capabilities", 0, -32, SMB2_CAPABILITIES), |
| 2560 | LEIntField("Channel", 0), |
| 2561 | XLEShortField("SecurityBlobBufferOffset", None), |
| 2562 | LEShortField("SecurityBlobLen", None), |
| 2563 | XLELongField("PreviousSessionId", 0), |
| 2564 | _NTLMPayloadField( |
| 2565 | "Buffer", |
| 2566 | OFFSET, |
| 2567 | [ |
| 2568 | PacketField("SecurityBlob", None, GSSAPI_BLOB), |
| 2569 | ], |
| 2570 | ), |
| 2571 | ] |
| 2572 | |
| 2573 | def post_build(self, pkt, pay): |
| 2574 | # type: (bytes, bytes) -> bytes |
| 2575 | return ( |
| 2576 | _SMB2_post_build( |
| 2577 | self, |
| 2578 | pkt, |
| 2579 | self.OFFSET, |
| 2580 | { |
| 2581 | "SecurityBlob": 12, |
| 2582 | }, |
| 2583 | ) |
| 2584 | + pay |
| 2585 | ) |
| 2586 | |
| 2587 | |
| 2588 | bind_top_down( |
no test coverage detected