Class WindowsPeBinaryFileExtension

java.lang.Object
security.whisper.javastix.coo.extension.types.WindowsPeBinaryFileExtension
All Implemented Interfaces:
Serializable, StixCustomProperties, CyberObservableExtension, CyberObservableExtensionCommonProperties, WindowsPeBinaryFileExtensionExt, GenericValidation, SdoDefaultValidator

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue @AllowedParents(FileCoo.class) public final class WindowsPeBinaryFileExtension extends Object implements WindowsPeBinaryFileExtensionExt, Serializable
The Windows PE Binary File extension specifies a default extension for capturing properties specific to Windows portable executable (PE) files.
See Also:
  • Method Details

    • getPeType

      @JsonPropertyDescription("Specifies the type of the PE binary. Open Vocabulary - windows-pebinary-type-ov") public String getPeType()
      Specified by:
      getPeType in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the peType attribute
    • getImphash

      @JsonPropertyDescription("Specifies the special import hash, or \'imphash\', calculated for the PE Binary based on its imported libraries and functions.") public Optional<String> getImphash()
      Specified by:
      getImphash in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the imphash attribute
    • getMachineHex

      @JsonPropertyDescription("Specifies the type of target machine.") public Optional<String> getMachineHex()
      Specified by:
      getMachineHex in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the machineHex attribute
    • getNumberOfSections

      @JsonPropertyDescription("Specifies the number of sections in the PE binary, as a non-negative integer.") public Optional<Long> getNumberOfSections()
      Specified by:
      getNumberOfSections in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the numberOfSections attribute
    • getTimeDateStamp

      @JsonPropertyDescription("Specifies the time when the PE binary was created. The timestamp value MUST BE precise to the second.") public Optional<StixInstant> getTimeDateStamp()
      Specified by:
      getTimeDateStamp in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the timeDateStamp attribute
    • getPointerToSymbolTableHex

      @JsonPropertyDescription("Specifies the file offset of the COFF symbol table.") public Optional<String> getPointerToSymbolTableHex()
      Specified by:
      getPointerToSymbolTableHex in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the pointerToSymbolTableHex attribute
    • getNumberOfSymbols

      @JsonPropertyDescription("Specifies the number of entries in the symbol table of the PE binary, as a non-negative integer.") public Optional<Long> getNumberOfSymbols()
      Specified by:
      getNumberOfSymbols in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the numberOfSymbols attribute
    • getSizeOfOptionalHeader

      @JsonPropertyDescription("Specifies the size of the optional header of the PE binary.") public Optional<Long> getSizeOfOptionalHeader()
      Specified by:
      getSizeOfOptionalHeader in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the sizeOfOptionalHeader attribute
    • getCharacteristicsHex

      @JsonPropertyDescription("Specifies the flags that indicate the file\u2019s characteristics.") public Optional<String> getCharacteristicsHex()
      Specified by:
      getCharacteristicsHex in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the characteristicsHex attribute
    • getFileHeaderHashes

      @JsonPropertyDescription("Specifies any hashes that were computed for the file header.") public com.google.common.collect.ImmutableMap<String,String> getFileHeaderHashes()
      Specified by:
      getFileHeaderHashes in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the fileHeaderHashes attribute
    • getOptionalHeader

      @JsonPropertyDescription("Specifies the PE optional header of the PE binary.") public Optional<WindowsPeOptionalHeaderObj> getOptionalHeader()
      Specified by:
      getOptionalHeader in interface WindowsPeBinaryFileExtensionExt
      Returns:
      The value of the optionalHeader attribute
    • getType

      public String getType()
      This property is used for generation of the dictionary during serialization, and used as the "Type" mapping value for polymorphic when deserializing.
      Specified by:
      getType in interface CyberObservableExtensionCommonProperties
    • getCustomProperties

      public com.google.common.collect.ImmutableMap<String,Object> getCustomProperties()
      Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.
      Specified by:
      getCustomProperties in interface StixCustomProperties
      Returns:
      Map of custom properties Map<String, Object>
    • withPeType

      public final WindowsPeBinaryFileExtension withPeType(String value)
      Copy the current immutable object by setting a value for the peType attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for peType (can be null)
      Returns:
      A modified copy of the this object
    • withImphash

      public final WindowsPeBinaryFileExtension withImphash(String value)
      Copy the current immutable object by setting a present value for the optional imphash attribute.
      Parameters:
      value - The value for imphash
      Returns:
      A modified copy of this object
    • withImphash

      public final WindowsPeBinaryFileExtension withImphash(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the imphash attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for imphash
      Returns:
      A modified copy of this object
    • withMachineHex

      public final WindowsPeBinaryFileExtension withMachineHex(String value)
      Copy the current immutable object by setting a present value for the optional machineHex attribute.
      Parameters:
      value - The value for machineHex
      Returns:
      A modified copy of this object
    • withMachineHex

      public final WindowsPeBinaryFileExtension withMachineHex(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the machineHex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for machineHex
      Returns:
      A modified copy of this object
    • withNumberOfSections

      public final WindowsPeBinaryFileExtension withNumberOfSections(long value)
      Copy the current immutable object by setting a present value for the optional numberOfSections attribute.
      Parameters:
      value - The value for numberOfSections
      Returns:
      A modified copy of this object
    • withNumberOfSections

      public final WindowsPeBinaryFileExtension withNumberOfSections(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the numberOfSections attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for numberOfSections
      Returns:
      A modified copy of this object
    • withTimeDateStamp

      public final WindowsPeBinaryFileExtension withTimeDateStamp(StixInstant value)
      Copy the current immutable object by setting a present value for the optional timeDateStamp attribute.
      Parameters:
      value - The value for timeDateStamp
      Returns:
      A modified copy of this object
    • withTimeDateStamp

      public final WindowsPeBinaryFileExtension withTimeDateStamp(Optional<? extends StixInstant> optional)
      Copy the current immutable object by setting an optional value for the timeDateStamp attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for timeDateStamp
      Returns:
      A modified copy of this object
    • withPointerToSymbolTableHex

      public final WindowsPeBinaryFileExtension withPointerToSymbolTableHex(String value)
      Copy the current immutable object by setting a present value for the optional pointerToSymbolTableHex attribute.
      Parameters:
      value - The value for pointerToSymbolTableHex
      Returns:
      A modified copy of this object
    • withPointerToSymbolTableHex

      public final WindowsPeBinaryFileExtension withPointerToSymbolTableHex(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the pointerToSymbolTableHex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for pointerToSymbolTableHex
      Returns:
      A modified copy of this object
    • withNumberOfSymbols

      public final WindowsPeBinaryFileExtension withNumberOfSymbols(long value)
      Copy the current immutable object by setting a present value for the optional numberOfSymbols attribute.
      Parameters:
      value - The value for numberOfSymbols
      Returns:
      A modified copy of this object
    • withNumberOfSymbols

      public final WindowsPeBinaryFileExtension withNumberOfSymbols(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the numberOfSymbols attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for numberOfSymbols
      Returns:
      A modified copy of this object
    • withSizeOfOptionalHeader

      public final WindowsPeBinaryFileExtension withSizeOfOptionalHeader(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfOptionalHeader attribute.
      Parameters:
      value - The value for sizeOfOptionalHeader
      Returns:
      A modified copy of this object
    • withSizeOfOptionalHeader

      public final WindowsPeBinaryFileExtension withSizeOfOptionalHeader(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfOptionalHeader attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfOptionalHeader
      Returns:
      A modified copy of this object
    • withCharacteristicsHex

      public final WindowsPeBinaryFileExtension withCharacteristicsHex(String value)
      Copy the current immutable object by setting a present value for the optional characteristicsHex attribute.
      Parameters:
      value - The value for characteristicsHex
      Returns:
      A modified copy of this object
    • withCharacteristicsHex

      public final WindowsPeBinaryFileExtension withCharacteristicsHex(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the characteristicsHex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for characteristicsHex
      Returns:
      A modified copy of this object
    • withFileHeaderHashes

      public final WindowsPeBinaryFileExtension withFileHeaderHashes(Map<String,? extends String> entries)
      Copy the current immutable object by replacing the fileHeaderHashes map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the fileHeaderHashes map
      Returns:
      A modified copy of this object
    • withOptionalHeader

      public final WindowsPeBinaryFileExtension withOptionalHeader(WindowsPeOptionalHeaderObj value)
      Copy the current immutable object by setting a present value for the optional optionalHeader attribute.
      Parameters:
      value - The value for optionalHeader
      Returns:
      A modified copy of this object
    • withOptionalHeader

      public final WindowsPeBinaryFileExtension withOptionalHeader(Optional<? extends WindowsPeOptionalHeaderObj> optional)
      Copy the current immutable object by setting an optional value for the optionalHeader attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for optionalHeader
      Returns:
      A modified copy of this object
    • withType

      public final WindowsPeBinaryFileExtension withType(String value)
      Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type (can be null)
      Returns:
      A modified copy of the this object
    • withCustomProperties

      public final WindowsPeBinaryFileExtension withCustomProperties(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the customProperties map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the customProperties map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of WindowsPeBinaryFileExtension that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: peType, imphash, machineHex, numberOfSections, timeDateStamp, pointerToSymbolTableHex, numberOfSymbols, sizeOfOptionalHeader, characteristicsHex, fileHeaderHashes, optionalHeader, type, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value WindowsPeBinaryFileExtension with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a WindowsPeBinaryFileExtensionExt value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable WindowsPeBinaryFileExtension instance
    • builder

      public static WindowsPeBinaryFileExtension.Builder builder()
      Creates a builder for WindowsPeBinaryFileExtension.
      Returns:
      A new WindowsPeBinaryFileExtension builder