1# Copyright (c) 2017, The MITRE Corporation. All rights reserved. 2# See LICENSE.txt for complete terms. 3 4from mixbox import entities 5from mixbox import fields 6 7import cybox.bindings.win_system_object as win_system_binding 8from cybox.objects.system_object import System 9from cybox.objects.win_handle_object import WinHandleList 10from cybox.common import String, HexBinary 11 12 13class GlobalFlag(entities.Entity): 14 _binding = win_system_binding 15 _binding_class = win_system_binding.GlobalFlagType 16 _namespace = "http://cybox.mitre.org/objects#WinSystemObject-2" 17 18 abbreviation = fields.TypedField("Abbreviation", String) 19 destination = fields.TypedField("Destination", String) 20 hexadecimal_value = fields.TypedField("Hexadecimal_Value", HexBinary) 21 symbolic_name = fields.TypedField("Symbolic_Name", String) 22 23 24class GlobalFlagList(entities.EntityList): 25 _binding = win_system_binding 26 _binding_class = win_system_binding.GlobalFlagListType 27 _namespace = "http://cybox.mitre.org/objects#WinSystemObject-2" 28 29 global_flag = fields.TypedField("Global_Flag", GlobalFlag, multiple=True) 30 31 32class WinSystem(System): 33 _binding = win_system_binding 34 _binding_class = win_system_binding.WindowsSystemObjectType 35 _namespace = "http://cybox.mitre.org/objects#WinSystemObject-2" 36 _XSI_NS = "WinSystemObj" 37 _XSI_TYPE = "WindowsSystemObjectType" 38 39 domain = fields.TypedField("Domain", String, multiple=True) 40 global_flag_list = fields.TypedField("Global_Flag_List", GlobalFlagList) 41 netbios_name = fields.TypedField("NetBIOS_Name", String) 42 open_handle_list = fields.TypedField("Open_Handle_List", WinHandleList) 43 product_id = fields.TypedField("Product_ID", String) 44 product_name = fields.TypedField("Product_Name", String) 45 registered_organization = fields.TypedField("Registered_Organization", String) 46 registered_owner = fields.TypedField("Registered_Owner", String) 47 windows_directory = fields.TypedField("Windows_Directory", String) 48 windows_system_directory = fields.TypedField("Windows_System_Directory", String) 49 windows_temp_directory = fields.TypedField("Windows_Temp_Directory", String) 50