| 375 | |
| 376 | |
| 377 | class SMBNegotiate_Response_NoSecurity(_SMBNegotiate_Response): |
| 378 | name = "SMB Negotiate No-Security Response (CIFS)" |
| 379 | fields_desc = [ |
| 380 | ByteField("WordCount", 0x1), |
| 381 | LEShortField("DialectIndex", 7), |
| 382 | FlagsField( |
| 383 | "SecurityMode", |
| 384 | 0x03, |
| 385 | 8, |
| 386 | [ |
| 387 | "USER_SECURITY", |
| 388 | "ENCRYPT_PASSWORDS", |
| 389 | "SECURITY_SIGNATURES_ENABLED", |
| 390 | "SECURITY_SIGNATURES_REQUIRED", |
| 391 | ], |
| 392 | ), |
| 393 | LEShortField("MaxMpxCount", 50), |
| 394 | LEShortField("MaxNumberVC", 1), |
| 395 | LEIntField("MaxBufferSize", 16144), # Windows: 4356 |
| 396 | LEIntField("MaxRawSize", 65536), |
| 397 | LEIntField("SessionKey", 0x0000), |
| 398 | FlagsField("ServerCapabilities", 0xF3F9, -32, _SMB_ServerCapabilities), |
| 399 | UTCTimeField( |
| 400 | "ServerTime", |
| 401 | None, |
| 402 | fmt="<Q", |
| 403 | epoch=[1601, 1, 1, 0, 0, 0], |
| 404 | custom_scaling=1e7, |
| 405 | ), |
| 406 | ScalingField("ServerTimeZone", 0x3C, fmt="<h", unit="min-UTC"), |
| 407 | FieldLenField( |
| 408 | "ChallengeLength", |
| 409 | None, |
| 410 | # aka EncryptionKeyLength |
| 411 | length_of="Challenge", |
| 412 | fmt="<B", |
| 413 | ), |
| 414 | LEFieldLenField( |
| 415 | "ByteCount", |
| 416 | None, |
| 417 | length_of="DomainName", |
| 418 | adjust=lambda pkt, x: x + len(pkt.Challenge), |
| 419 | ), |
| 420 | XStrLenField( |
| 421 | "Challenge", |
| 422 | b"", # aka EncryptionKey |
| 423 | length_from=lambda pkt: pkt.ChallengeLength, |
| 424 | ), |
| 425 | StrNullField("DomainName", "WORKGROUP"), |
| 426 | ] |
| 427 | |
| 428 | |
| 429 | bind_top_down(SMB_Header, SMBNegotiate_Response_NoSecurity, Command=0x72, Flags=0x80) |
nothing calls this directly
no test coverage detected
searching dependent graphs…