1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import socket
20
21 from rekall import kb
22 from rekall import obj
23 from rekall.plugins.overlays import basic
24 from rekall.plugins.overlays.windows import pe_vtypes
25 from rekall_lib import utils
26
27
28 AF_INET = 2
29 AF_INET6 = 0x17
30
31
32 inaddr_any = utils.inet_ntop(socket.AF_INET, '\0' * 4)
33 inaddr6_any = utils.inet_ntop(socket.AF_INET6, '\0' * 16)
34
35 protos = {
36 0:"HOPOPT",
37 1:"ICMP",
38 2:"IGMP",
39 3:"GGP",
40 4:"IPv4",
41 5:"ST",
42 6:"TCP",
43 7:"CBT",
44 8:"EGP",
45 9:"IGP",
46 10:"BBN-RCC-MON",
47 11:"NVP-II",
48 12:"PUP",
49 13:"ARGUS",
50 14:"EMCON",
51 15:"XNET",
52 16:"CHAOS",
53 17:"UDP",
54 18:"MUX",
55 19:"DCN-MEAS",
56 20:"HMP",
57 21:"PRM",
58 22:"XNS-IDP",
59 23:"TRUNK-1",
60 24:"TRUNK-2",
61 25:"LEAF-1",
62 26:"LEAF-2",
63 27:"RDP",
64 28:"IRTP",
65 29:"ISO-TP4",
66 30:"NETBLT",
67 31:"MFE-NSP",
68 32:"MERIT-INP",
69 33:"DCCP",
70 34:"3PC",
71 35:"IDPR",
72 36:"XTP",
73 37:"DDP",
74 38:"IDPR-CMTP",
75 39:"TP++",
76 40:"IL",
77 41:"IPv6",
78 42:"SDRP",
79 43:"IPv6-Route",
80 44:"IPv6-Frag",
81 45:"IDRP",
82 46:"RSVP",
83 47:"GRE",
84 48:"DSR",
85 49:"BNA",
86 50:"ESP",
87 51:"AH",
88 52:"I-NLSP",
89 53:"SWIPE",
90 54:"NARP",
91 55:"MOBILE",
92 56:"TLSP",
93 57:"SKIP",
94 58:"IPv6-ICMP",
95 59:"IPv6-NoNxt",
96 60:"IPv6-Opts",
97 61:"Host-interal",
98 62:"CFTP",
99 63:"Local Network",
100 64:"SAT-EXPAK",
101 65:"KRYPTOLAN",
102 66:"RVD",
103 67:"IPPC",
104 68:"Dist-FS",
105 69:"SAT-MON",
106 70:"VISA",
107 71:"IPCV",
108 72:"CPNX",
109 73:"CPHB",
110 74:"WSN",
111 75:"PVP",
112 76:"BR-SAT-MON",
113 77:"SUN-ND",
114 78:"WB-MON",
115 79:"WB-EXPAK",
116 80:"ISO-IP",
117 81:"VMTP",
118 82:"SECURE-VMTP",
119 83:"VINES",
120 84:"TTP",
121
122 85:"NSFNET-IGP",
123 86:"DGP",
124 87:"TCF",
125 88:"EIGRP",
126 89:"OSPFIGP",
127 90:"Sprite-RPC",
128 91:"LARP",
129 92:"MTP",
130 93:"AX.25",
131 94:"IPIP",
132 95:"MICP",
133 96:"SCC-SP",
134 97:"ETHERIP",
135 98:"ENCAP",
136 99:"Encryption",
137 100:"GMTP",
138 101:"IFMP",
139 102:"PNNI",
140 103:"PIM",
141 104:"ARIS",
142 105:"SCPS",
143 106:"QNX",
144 107:"A/N",
145 108:"IPComp",
146 109:"SNP",
147 110:"Compaq-Peer",
148 111:"IPX-in-IP",
149 112:"VRRP",
150 113:"PGM",
151 114:"0-hop",
152 115:"L2TP",
153 116:"DDX",
154 117:"IATP",
155 118:"STP",
156 119:"SRP",
157 120:"UTI",
158 121:"SMP",
159 122:"SM",
160 123:"PTP",
161 124:"ISIS over IPv4",
162 125:"FIRE",
163 126:"CRTP",
164 127:"CRUDP",
165 128:"SSCOPMCE",
166 129:"IPLT",
167 130:"SPS",
168 131:"PIPE",
169 132:"SCTP",
170 133:"FC",
171 134:"RSVP-E2E-IGNORE",
172 135:"Mobility Header",
173 136:"UDPLite",
174 137:"MPLS-in-IP",
175 138:"manet",
176 139:"HIP",
177 140:"Shim6",
178 141:"WESP",
179 142:"ROHC",
180 253:"Experimental",
181 254:"Experimental",
182 255:"Reserved",
183 }
184
185
186
187 tcpip_vtypes = {
188 '_ADDRESS_OBJECT' : [0x68, {
189 'Next' : [0x0, ['pointer', ['_ADDRESS_OBJECT']]],
190 'LocalIpAddress' : [0x2c, ['Ipv4Address']],
191 'LocalPort' : [0x30, ['unsigned be short']],
192 'Protocol' : [0x32, ['unsigned short']],
193 'Pid' : [0x148, ['unsigned long']],
194 'CreateTime' : [0x158, ['WinFileTime', {}]],
195 }],
196 '_TCPT_OBJECT' : [0x20, {
197 'Next' : [0x0, ['pointer', ['_TCPT_OBJECT']]],
198 'RemoteIpAddress' : [0xc, ['Ipv4Address']],
199 'LocalIpAddress' : [0x10, ['Ipv4Address']],
200 'RemotePort' : [0x14, ['unsigned be short']],
201 'LocalPort' : [0x16, ['unsigned be short']],
202 'Pid' : [0x18, ['unsigned long']],
203 }],
204 }
205
206
207
208 tcpip_vtypes_2003_x64 = {
209 '_ADDRESS_OBJECT' : [0x250, {
210 'Next' : [0x0, ['pointer', ['_ADDRESS_OBJECT']]],
211 'LocalIpAddress' : [0x58, ['Ipv4Address']],
212 'LocalPort' : [0x5c, ['unsigned be short']],
213 'Protocol' : [0x5e, ['unsigned short']],
214 'Pid' : [0x238, ['unsigned long']],
215 'CreateTime' : [0x248, ['WinFileTime', {}]],
216 }],
217 '_TCPT_OBJECT' : [0x28, {
218 'Next' : [0x0, ['pointer', ['_TCPT_OBJECT']]],
219 'RemoteIpAddress' : [0x14, ['Ipv4Address']],
220 'LocalIpAddress' : [0x18, ['Ipv4Address']],
221 'RemotePort' : [0x1c, ['unsigned be short']],
222 'LocalPort' : [0x1e, ['unsigned be short']],
223 'Pid' : [0x20, ['unsigned long']],
224 }],
225 }
226
227
228
229 tcpip_vtypes_2003_sp1_sp2 = {
230 '_ADDRESS_OBJECT' : [0x68, {
231 'Next' : [0x0, ['pointer', ['_ADDRESS_OBJECT']]],
232 'LocalIpAddress' : [0x30, ['Ipv4Address']],
233 'LocalPort' : [0x34, ['unsigned be short']],
234 'Protocol' : [0x36, ['unsigned short']],
235 'Pid' : [0x14C, ['unsigned long']],
236 'CreateTime' : [0x158, ['WinFileTime', {}]],
237 }],
238 }
239
240 TCP_STATE_ENUM = {
241 0: 'CLOSED', 1: 'LISTENING', 2: 'SYN_SENT',
242 3: 'SYN_RCVD', 4: 'ESTABLISHED', 5: 'FIN_WAIT1',
243 6: 'FIN_WAIT2', 7: 'CLOSE_WAIT', 8: 'CLOSING',
244 9: 'LAST_ACK', 12: 'TIME_WAIT', 13: 'DELETE_TCB'
245 }
246
247
248 tcpip_vtypes_vista = {
249 '_IN_ADDR' : [None, {
250 'addr4' : [0x0, ['Ipv4Address']],
251 'addr6' : [0x0, ['Ipv6Address']],
252 }],
253 '_LOCAL_ADDRESS' : [None, {
254 'pData' : [0xC, ['pointer', ['pointer', ['_IN_ADDR']]]],
255 }],
256 '_TCP_LISTENER': [0xa8, {
257 'Owner' : [0x18, ['pointer', ['_EPROCESS']]],
258 'CreateTime' : [0x20, ['WinFileTime', {}]],
259 'LocalAddr' : [0x34, ['pointer', ['_LOCAL_ADDRESS']]],
260 'InetAF' : [0x38, ['pointer', ['_INETAF']]],
261 "Endpoint": [0x50, ['Pointer', dict(
262 target="_TCP_ENDPOINT"
263 )]],
264 'Port' : [0x3E, ['unsigned be short']],
265 }],
266 '_TCP_ENDPOINT': [0x1f0, {
267 'InetAF' : [0xC, ['pointer', ['_INETAF']]],
268 'AddrInfo' : [0x10, ['pointer', ['_ADDRINFO']]],
269 'ListEntry': [0x14, ['_LIST_ENTRY']],
270 'State' : [0x28, ['Enumeration', dict(
271 target='long',
272 choices=TCP_STATE_ENUM)]],
273 'LocalPort' : [0x2C, ['unsigned be short']],
274 'RemotePort' : [0x2E, ['unsigned be short']],
275 'Owner' : [0x160, ['pointer', ['_EPROCESS']]],
276 'CreateTime' : [0, ['WinFileTime', {}]],
277 }],
278 '_TCP_SYN_ENDPOINT': [None, {
279 'ListEntry': [8, ['_LIST_ENTRY']],
280 'InetAF' : [0x18, ['pointer', ['_INETAF']]],
281 'LocalPort' : [0x3c, ['unsigned be short']],
282 'RemotePort' : [0x3e, ['unsigned be short']],
283 'LocalAddr' : [0x1c, ['pointer', ['_LOCAL_ADDRESS']]],
284 'RemoteAddress' : [0x28, ['pointer', ['_IN_ADDR']]],
285 'Owner' : [0x20, ['pointer', ['_SYN_OWNER']]],
286 'CreateTime' : [0, ['WinFileTime', {}]],
287 }],
288 '_SYN_OWNER': [None, {
289 'Process': [0x18, ['pointer', ['_EPROCESS']]],
290 }],
291 '_TCP_TIMEWAIT_ENDPOINT': [None, {
292 'ListEntry': [0x14, ['_LIST_ENTRY']],
293 'InetAF' : [0xc, ['pointer', ['_INETAF']]],
294 'LocalPort' : [0x1c, ['unsigned be short']],
295 'RemotePort' : [0x1e, ['unsigned be short']],
296 'LocalAddr' : [0x20, ['pointer', ['_LOCAL_ADDRESS']]],
297 'RemoteAddress' : [0x24, ['pointer', ['_IN_ADDR']]],
298 'CreateTime' : [0, ['WinFileTime', {}]],
299 }],
300 '_INETAF' : [None, {
301 'AddressFamily' : [0xC, ['unsigned short']],
302 }],
303 '_ADDRINFO' : [None, {
304 'Local' : [0x0, ['pointer', ['_LOCAL_ADDRESS']]],
305 'Remote' : [0x8, ['pointer', ['_IN_ADDR']]],
306 }],
307 '_UDP_ENDPOINT': [0xa8, {
308 'Owner' : [0x18, ['pointer', ['_EPROCESS']]],
309 'CreateTime' : [0x30, ['WinFileTime', {}]],
310 'LocalAddr' : [0x38, ['pointer', ['_LOCAL_ADDRESS']]],
311 'InetAF' : [0x14, ['pointer', ['_INETAF']]],
312 'Port' : [0x48, ['unsigned be short']],
313 }],
314
315
316 "PARTITION_TABLE": [None, {
317 "Partitions": [4, ["Array", dict(
318 target="Pointer",
319
320 count=lambda x: x.obj_profile.get_constant_object(
321 "PartitionCount", "unsigned int"),
322
323 target_args=dict(
324 target="Array",
325 target_args=dict(
326 count=4,
327 target="FIRST_LEVEL_DIR",
328 profile=lambda x: x.session.profile,
329 )
330 )
331 )]],
332 }],
333
334 "FIRST_LEVEL_DIR": [0x24, {
335 "SizeOfSecondLevel": [0x8, ["unsigned int"]],
336
337 "Mask": [0x10, ["unsigned int"]],
338
339
340 "SecondLevel": [0x20, ["Pointer", dict(
341 target="Array",
342 target_args=dict(
343 count=lambda x: x.SizeOfSecondLevel,
344 target="_LIST_ENTRY"
345 )
346 )]],
347 }],
348 }
349
350
351 tcpip_vtypes_7 = {
352 '_TCP_ENDPOINT': [0x210, {
353 'InetAF' : [0xC, ['pointer', ['_INETAF']]],
354 'AddrInfo' : [0x10, ['pointer', ['_ADDRINFO']]],
355 'ListEntry': [0x14, ['_LIST_ENTRY']],
356 'State' : [0x34, ['Enumeration', dict(
357 target='long', choices=TCP_STATE_ENUM)]],
358 'LocalPort' : [0x38, ['unsigned be short']],
359 'RemotePort' : [0x3A, ['unsigned be short']],
360 'Owner' : [0x174, ['pointer', ['_EPROCESS']]],
361 'CreateTime' : [0, ['WinFileTime', {}]],
362 }],
363 '_TCP_SYN_ENDPOINT': [None, {
364 'ListEntry': [8, ['_LIST_ENTRY']],
365 'InetAF' : [0x24, ['pointer', ['_INETAF']]],
366 'LocalPort' : [0x48, ['unsigned be short']],
367 'RemotePort' : [0x4a, ['unsigned be short']],
368 'LocalAddr' : [0x28, ['pointer', ['_LOCAL_ADDRESS']]],
369 'RemoteAddress' : [0x34, ['pointer', ['_IN_ADDR']]],
370 'Owner' : [0x2c, ['pointer', ['_SYN_OWNER']]],
371 'CreateTime' : [0, ['WinFileTime', {}]],
372 }],
373 '_TCP_TIMEWAIT_ENDPOINT': [None, {
374 'ListEntry': [0, ['_LIST_ENTRY']],
375 'InetAF' : [0x18, ['pointer', ['_INETAF']]],
376 'LocalPort' : [0x28, ['unsigned be short']],
377 'RemotePort' : [0x2a, ['unsigned be short']],
378 'LocalAddr' : [0x2c, ['pointer', ['_LOCAL_ADDRESS']]],
379 'RemoteAddress' : [0x30, ['pointer', ['_IN_ADDR']]],
380 'CreateTime' : [0, ['WinFileTime', {}]],
381 }],
382 "_LIST_ENTRY": basic.common_overlay["LIST_ENTRY32"],
383 }
384
385
386 tcpip_vtypes_vista_64 = {
387 '_IN_ADDR' : [None, {
388 'addr4' : [0x0, ['Ipv4Address']],
389 'addr6' : [0x0, ['Ipv6Address']],
390 }],
391 '_TCP_LISTENER': [0x120, {
392 'Owner' : [0x28, ['pointer', ['_EPROCESS']]],
393 'CreateTime' : [0x20, ['WinFileTime', {}]],
394 'LocalAddr' : [0x58, ['pointer', ['_LOCAL_ADDRESS']]],
395 'InetAF' : [0x60, ['pointer', ['_INETAF']]],
396 'Port' : [0x6a, ['unsigned be short']],
397 }],
398 '_INETAF' : [None, {
399 'AddressFamily' : [0x14, ['unsigned short']],
400 }],
401 '_LOCAL_ADDRESS' : [None, {
402 'pData' : [0x10, ['pointer', ['pointer', ['_IN_ADDR']]]],
403 }],
404 '_ADDRINFO' : [None, {
405 'Local' : [0x0, ['pointer', ['_LOCAL_ADDRESS']]],
406 'Remote' : [0x10, ['pointer', ['_IN_ADDR']]],
407 }],
408 '_TCP_ENDPOINT': [0x210, {
409 'InetAF' : [0x18, ['pointer', ['_INETAF']]],
410 'AddrInfo' : [0x20, ['pointer', ['_ADDRINFO']]],
411 'ListEntry': [0x28, ['_LIST_ENTRY']],
412 'State' : [0x50, ['Enumeration', dict(
413 target='long',
414 choices=TCP_STATE_ENUM)]],
415 'LocalPort' : [0x54, ['unsigned be short']],
416 'RemotePort' : [0x56, ['unsigned be short']],
417 'Owner' : [0x208, ['pointer', ['_EPROCESS']]],
418 'CreateTime' : [0, ['WinFileTime', {}]],
419 }],
420 '_TCP_SYN_ENDPOINT': [None, {
421 'ListEntry': [0x10, ['_LIST_ENTRY']],
422 'InetAF' : [0x30, ['pointer', ['_INETAF']]],
423 'LocalPort' : [0x64, ['unsigned be short']],
424 'RemotePort' : [0x66, ['unsigned be short']],
425 'LocalAddr' : [0x38, ['pointer', ['_LOCAL_ADDRESS']]],
426 'RemoteAddress' : [0x50, ['pointer', ['_IN_ADDR']]],
427 'Owner' : [0x40, ['pointer', ['_SYN_OWNER']]],
428 'CreateTime' : [0, ['WinFileTime', {}]],
429 }],
430 '_SYN_OWNER': [None, {
431 'Process': [0x28, ['pointer', ['_EPROCESS']]],
432 }],
433 '_TCP_TIMEWAIT_ENDPOINT': [None, {
434 'ListEntry': [0, ['_LIST_ENTRY']],
435 'InetAF' : [0x18, ['pointer', ['_INETAF']]],
436 'LocalPort' : [0x30, ['unsigned be short']],
437 'RemotePort' : [0x32, ['unsigned be short']],
438 'LocalAddr' : [0x38, ['pointer', ['_LOCAL_ADDRESS']]],
439 'RemoteAddress' : [0x40, ['pointer', ['_IN_ADDR']]],
440 'CreateTime' : [0, ['WinFileTime', {}]],
441 }],
442 '_UDP_ENDPOINT': [0x82, {
443 'Owner' : [0x28, ['pointer', ['_EPROCESS']]],
444 'CreateTime' : [0x58, ['WinFileTime', {}]],
445 'LocalAddr' : [0x60, ['pointer', ['_LOCAL_ADDRESS']]],
446 'InetAF' : [0x20, ['pointer', ['_INETAF']]],
447 'Port' : [0x80, ['unsigned be short']],
448 }],
449
450
451 "PARTITION_TABLE": [None, {
452 "Partitions": [8, ["Array", dict(
453 target="Pointer",
454
455 count=lambda x: x.obj_profile.get_constant_object(
456 "PartitionCount", "unsigned int"),
457
458 target_args=dict(
459 target="Array",
460 target_args=dict(
461 count=4,
462 target="FIRST_LEVEL_DIR",
463 ),
464 ),
465 )]],
466 }],
467
468
469 "FIRST_LEVEL_DIR": [0x24, {
470 "SizeOfSecondLevel": [0x8, ["unsigned int"]],
471
472 "Mask": [0x10, ["unsigned int"]],
473
474
475 "SecondLevel": [0x20, ["Pointer", dict(
476 target="Array",
477
478 target_args=dict(
479 count=lambda x: x.SizeOfSecondLevel,
480 target="_LIST_ENTRY"
481 )
482 )]],
483 }],
484 "_LIST_ENTRY": basic.common_overlay["LIST_ENTRY64"],
485 }
486
487
488 tcpip_vtypes_win7_64 = {
489 '_TCP_ENDPOINT': [0x320, {
490 'State' : [0x68, ['Enumeration', dict(target='long',
491 choices=TCP_STATE_ENUM)]],
492 'LocalPort' : [0x6c, ['unsigned be short']],
493 'RemotePort' : [0x6e, ['unsigned be short']],
494 'Owner' : [0x238, ['pointer', ['_EPROCESS']]],
495 }],
496 '_TCP_SYN_ENDPOINT': [None, {
497 'InetAF' : [0x48, ['pointer', ['_INETAF']]],
498 'LocalPort' : [0x7c, ['unsigned be short']],
499 'RemotePort' : [0x7e, ['unsigned be short']],
500 'LocalAddr' : [0x50, ['pointer', ['_LOCAL_ADDRESS']]],
501 'RemoteAddress' : [0x68, ['pointer', ['_IN_ADDR']]],
502 'Owner' : [0x58, ['pointer', ['_SYN_OWNER']]],
503 }],
504 '_TCP_TIMEWAIT_ENDPOINT': [None, {
505 'InetAF' : [0x30, ['pointer', ['_INETAF']]],
506 'LocalPort' : [0x48, ['unsigned be short']],
507 'RemotePort' : [0x4a, ['unsigned be short']],
508 'LocalAddr' : [0x50, ['pointer', ['_LOCAL_ADDRESS']]],
509 'RemoteAddress' : [0x58, ['pointer', ['_IN_ADDR']]],
510 }],
511 }
512
513
514
515 overlays = {
516 "_ADDRESS_OBJECT": [None, {
517 "Protocol": [None, ["Enumeration", dict(
518 choices=protos,
519 target="unsigned int")]],
520 }]
521 }
522
523
524
525 win7_x86_dynamic_overlays = {
526 "_TCP_LISTENER": dict(
527
528 Owner=[
529
530 ["Disassembler", dict(
531 start="tcpip.sys!_TcpCreateListener@8",
532 length=300,
533 rules=[
534 "CALL *InetGetClientProcess",
535 "MOV [EBX+$out], EAX",
536 ],
537 target="Pointer",
538 target_args=dict(
539 target="_EPROCESS"
540 ),
541 )],
542
543
544 ["Disassembler", dict(
545 start="tcpip.sys!_TcpCovetNetBufferList@20",
546 rules=[
547 "MOV EAX, [ESI+$out]",
548 "TEST EAX, EAX",
549 "PUSH EAX",
550 "CALL DWORD *PsGetProcessId",
551 ],
552 target="Pointer",
553 target_args=dict(
554 target="_EPROCESS"
555 ),
556 )]
557 ],
558
559 CreateTime=[
560 ["Disassembler", dict(
561 start="tcpip.sys!_TcpCreateListener@8",
562 length=300,
563 rules=[
564 "LEA EAX, [EBX+$out]",
565 "PUSH EAX",
566 "CALL DWORD *KeQuerySystemTime",
567 ],
568 target="WinFileTime",
569 )],
570 ],
571 ),
572 }
573
574
575 tcpip_vtypes_win10_32 = {
576 '_ADDRINFO' : [None, {
577 'Local' : [0x0, ['pointer', ['_LOCAL_ADDRESS']]],
578 'Remote' : [0xC, ['pointer', ['_IN_ADDR']]],
579 }],
580 '_TCP_ENDPOINT': [None, {
581 'InetAF' : [0x8, ['pointer', ['_INETAF']]],
582 'AddrInfo' : [0xC, ['pointer', ['_ADDRINFO']]],
583 'State' : [0x38, ['Enumeration', dict(
584 target='long',
585 choices=TCP_STATE_ENUM)]],
586 'LocalPort' : [0x3C, ['unsigned be short']],
587 'RemotePort' : [0x3E, ['unsigned be short']],
588 'Owner' : [0x1B0, ['pointer', ['_EPROCESS']]],
589 }],
590 }
591
592
593 tcpip_vtypes_win10_64 = {
594 '_IN_ADDR' : [None, {
595 'addr4' : [0x0, ['Ipv4Address']],
596 'addr6' : [0x0, ['Ipv6Address']],
597 }],
598 '_TCP_LISTENER': [0x74, {
599 'Owner' : [0x30, ['pointer', ['_EPROCESS']]],
600 'CreateTime' : [0x40, ['WinFileTime', {}]],
601 'LocalAddr' : [0x60, ['pointer', ['_LOCAL_ADDRESS']]],
602 'InetAF' : [0x28, ['pointer', ['_INETAF']]],
603 'Port' : [0x72, ['unsigned be short']],
604 }],
605 '_INETAF' : [None, {
606 'AddressFamily' : [0x18, ['unsigned short']],
607 }],
608 '_LOCAL_ADDRESS_WIN10_UDP' : [None, {
609 'pData' : [0x0, ['pointer', ['_IN_ADDR']]],
610 }],
611 '_LOCAL_ADDRESS' : [None, {
612 'pData' : [0x10, ['pointer', ['pointer', ['_IN_ADDR']]]],
613 }],
614 '_ADDRINFO' : [None, {
615 'Local' : [0x0, ['pointer', ['_LOCAL_ADDRESS']]],
616 'Remote' : [0x10, ['pointer', ['_IN_ADDR']]],
617 }],
618 '_TCP_ENDPOINT': [0x270, {
619 'InetAF' : [0x10, ['pointer', ['_INETAF']]],
620 'AddrInfo' : [0x18, ['pointer', ['_ADDRINFO']]],
621 'State' : [0x6c, ['Enumeration', dict(
622 target='long',
623 choices=TCP_STATE_ENUM)]],
624 'LocalPort' : [0x70, ['unsigned be short']],
625 'RemotePort' : [0x72, ['unsigned be short']],
626 'Owner' : [0x258, ['pointer', ['_EPROCESS']]],
627 'CreateTime' : [0x268, ['WinFileTime', {}]],
628 }],
629 '_UDP_ENDPOINT': [0x80, {
630 'Owner' : [0x28, ['pointer', ['_EPROCESS']]],
631 'CreateTime' : [0x58, ['WinFileTime', {}]],
632 'LocalAddr' : [0x80, ['pointer', ['_LOCAL_ADDRESS_WIN10_UDP']]],
633 'InetAF' : [0x20, ['pointer', ['_INETAF']]],
634 'Port' : [0x78, ['unsigned be short']],
635 }],
636 }
641 """Class for objects found in TcpL pools"""
642
668
671 """Class for objects found in TcpE pools"""
672
674 af_inet = self.InetAF.dereference(vm=vm)
675 if af_inet.AddressFamily == AF_INET:
676 return in_addr.addr4
677 else:
678 return in_addr.addr6
679
685
687 inaddr = self.AddrInfo.dereference(vm=vm).\
688 Remote.dereference()
689
690 return self._ipv4_or_ipv6(inaddr, vm=vm)
691
694 """Class for objects found in UdpA pools"""
695
697 """Class for objects found in UdpA pools"""
698
724
726 """A mixin for plugins that want to use tcpip.sys profiles."""
727
728 @classmethod
729 - def args(cls, parser):
733
734 - def __init__(self, tcpip_guid=None, **kwargs):
744
745
746 -class Tcpip(pe_vtypes.BasicPEProfile):
747 """A profile for the TCPIP driver."""
748
749 @classmethod
817
820 name = "tcpip_profile"
821
828