Google Cloud Chronicle Client - Class File (0.9.0)

Reference documentation and code samples for the Google Cloud Chronicle Client class File.

Information about a file.

Generated from protobuf message google.backstory.File

Namespace

Google \ Backstory

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ sha256 string

The SHA256 hash of the file, as a hex-encoded string. This field can be used as an entity indicator for file entities.

↳ md5 string

The MD5 hash of the file, as a hex-encoded string. This field can be used as an entity indicator for file entities.

↳ sha1 string

The SHA1 hash of the file, as a hex-encoded string. This field can be used as an entity indicator for file entities.

↳ size int|string

The size of the file in bytes.

↳ full_path string

The full path identifying the location of the file on the system. This field can be used as an entity indicator for file entities.

↳ mime_type string

The MIME (Multipurpose Internet Mail Extensions) type of the file, for example "PE", "PDF", or "powershell script".

↳ file_metadata FileMetadata

Metadata associated with the file. Deprecate FileMetadata in favor of using fields in File.

↳ security_result SecurityResult

Google Cloud Threat Intelligence (GCTI) security result for the file including threat context and detection metadata.

↳ pe_file FileMetadataPE

Metadata about the Portable Executable (PE) file.

↳ ssdeep string

Ssdeep of the file

↳ vhash string

Vhash of the file.

↳ ahash string

Deprecated. Use authentihash instead.

↳ authentihash string

Authentihash of the file.

↳ symhash string

SymHash of the file. Used for Mach-O (e.g. MacOS) binaries, to identify similar files based on their symbol table.

↳ prefetch_file_metadata PrefetchFileMetadata

Metadata about the prefetch file.

↳ file_type int

FileType field.

↳ capabilities_tags string[]

Capabilities tags.

↳ names string[]

Names fields.

↳ tags string[]

Tags for the file.

↳ last_modification_time Google\Protobuf\Timestamp

Timestamp when the file was last updated.

↳ create_time Google\Protobuf\Timestamp

Timestamp when the file was created.

↳ last_access_time Google\Protobuf\Timestamp

Timestamp when the file was accessed.

↳ prevalence Prevalence

Prevalence of the file hash in the customer's environment.

↳ first_seen_time Google\Protobuf\Timestamp

Timestamp the file was first seen in the customer's environment.

↳ last_seen_time Google\Protobuf\Timestamp

Timestamp the file was last seen in the customer's environment.

↳ stat_mode int|string

The mode of the file. A bit string indicating the permissions and privileges of the file.

↳ stat_inode int|string

The file identifier. Unique identifier of object within a file system.

↳ stat_dev int|string

The file system identifier to which the object belongs.

↳ stat_nlink int|string

Number of links to file.

↳ stat_flags int

User defined flags for file.

↳ last_analysis_time Google\Protobuf\Timestamp

Timestamp the file was last analysed.

↳ embedded_urls string[]

Embedded urls found in the file.

↳ embedded_domains string[]

Embedded domains found in the file.

↳ embedded_ips string[]

Embedded IP addresses found in the file.

↳ exif_info ExifInfo

Exif metadata from different file formats extracted by exiftool.

↳ signature_info SignatureInfo

File signature information extracted from different tools.

↳ pdf_info PDFInfo

Information about the PDF file structure.

↳ first_submission_time Google\Protobuf\Timestamp

First submission time of the file.

↳ last_submission_time Google\Protobuf\Timestamp

Last submission time of the file.

↳ main_icon Favicon

Icon's relevant hashes.

↳ ntfs NtfsFileMetadata

NTFS metadata.

↳ app_compat_cache AppCompatMetadata

Windows AppCompatCache (Application Compatibility) metadata.

getSha256

The SHA256 hash of the file, as a hex-encoded string.

This field can be used as an entity indicator for file entities.

Returns
Type Description
string

setSha256

The SHA256 hash of the file, as a hex-encoded string.

This field can be used as an entity indicator for file entities.

Parameter
Name Description
var string
Returns
Type Description
$this

getMd5

The MD5 hash of the file, as a hex-encoded string.

This field can be used as an entity indicator for file entities.

Returns
Type Description
string

setMd5

The MD5 hash of the file, as a hex-encoded string.

This field can be used as an entity indicator for file entities.

Parameter
Name Description
var string
Returns
Type Description
$this

getSha1

The SHA1 hash of the file, as a hex-encoded string.

This field can be used as an entity indicator for file entities.

Returns
Type Description
string

setSha1

The SHA1 hash of the file, as a hex-encoded string.

This field can be used as an entity indicator for file entities.

Parameter
Name Description
var string
Returns
Type Description
$this

getSize

The size of the file in bytes.

Returns
Type Description
int|string

setSize

The size of the file in bytes.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getFullPath

The full path identifying the location of the file on the system.

This field can be used as an entity indicator for file entities.

Returns
Type Description
string

setFullPath

The full path identifying the location of the file on the system.

This field can be used as an entity indicator for file entities.

Parameter
Name Description
var string
Returns
Type Description
$this

getMimeType

The MIME (Multipurpose Internet Mail Extensions) type of the file, for example "PE", "PDF", or "powershell script".

Returns
Type Description
string

setMimeType

The MIME (Multipurpose Internet Mail Extensions) type of the file, for example "PE", "PDF", or "powershell script".

Parameter
Name Description
var string
Returns
Type Description
$this

getFileMetadata

Metadata associated with the file.

Deprecate FileMetadata in favor of using fields in File.

Returns
Type Description
FileMetadata|null

hasFileMetadata

clearFileMetadata

setFileMetadata

Metadata associated with the file.

Deprecate FileMetadata in favor of using fields in File.

Parameter
Name Description
var FileMetadata
Returns
Type Description
$this

getSecurityResult

Google Cloud Threat Intelligence (GCTI) security result for the file including threat context and detection metadata.

Returns
Type Description
SecurityResult|null

hasSecurityResult

clearSecurityResult

setSecurityResult

Google Cloud Threat Intelligence (GCTI) security result for the file including threat context and detection metadata.

Parameter
Name Description
var SecurityResult
Returns
Type Description
$this

getPeFile

Metadata about the Portable Executable (PE) file.

Returns
Type Description
FileMetadataPE|null

hasPeFile

clearPeFile

setPeFile

Metadata about the Portable Executable (PE) file.

Parameter
Name Description
var FileMetadataPE
Returns
Type Description
$this

getSsdeep

Ssdeep of the file

Returns
Type Description
string

setSsdeep

Ssdeep of the file

Parameter
Name Description
var string
Returns
Type Description
$this

getVhash

Vhash of the file.

Returns
Type Description
string

setVhash

Vhash of the file.

Parameter
Name Description
var string
Returns
Type Description
$this

getAhash

Deprecated. Use authentihash instead.

Returns
Type Description
string

setAhash

Deprecated. Use authentihash instead.

Parameter
Name Description
var string
Returns
Type Description
$this

getAuthentihash

Authentihash of the file.

Returns
Type Description
string

setAuthentihash

Authentihash of the file.

Parameter
Name Description
var string
Returns
Type Description
$this

getSymhash

SymHash of the file. Used for Mach-O (e.g. MacOS) binaries, to identify similar files based on their symbol table.

Returns
Type Description
string

setSymhash

SymHash of the file. Used for Mach-O (e.g. MacOS) binaries, to identify similar files based on their symbol table.

Parameter
Name Description
var string
Returns
Type Description
$this

getPrefetchFileMetadata

Metadata about the prefetch file.

Returns
Type Description
PrefetchFileMetadata|null

hasPrefetchFileMetadata

clearPrefetchFileMetadata

setPrefetchFileMetadata

Metadata about the prefetch file.

Parameter
Name Description
var PrefetchFileMetadata
Returns
Type Description
$this

getFileType

FileType field.

Returns
Type Description
int Enum of type FileType.

setFileType

FileType field.

Parameter
Name Description
var int

Enum of type FileType.

Returns
Type Description
$this

getCapabilitiesTags

Capabilities tags.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setCapabilitiesTags

Capabilities tags.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getNames

Names fields.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setNames

Names fields.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getTags

Tags for the file.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setTags

Tags for the file.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getLastModificationTime

Timestamp when the file was last updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasLastModificationTime

clearLastModificationTime

setLastModificationTime

Timestamp when the file was last updated.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getCreateTime

Timestamp when the file was created.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Timestamp when the file was created.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getLastAccessTime

Timestamp when the file was accessed.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasLastAccessTime

clearLastAccessTime

setLastAccessTime

Timestamp when the file was accessed.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getPrevalence

Prevalence of the file hash in the customer's environment.

Returns
Type Description
Prevalence|null

hasPrevalence

clearPrevalence

setPrevalence

Prevalence of the file hash in the customer's environment.

Parameter
Name Description
var Prevalence
Returns
Type Description
$this

getFirstSeenTime

Timestamp the file was first seen in the customer's environment.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasFirstSeenTime

clearFirstSeenTime

setFirstSeenTime

Timestamp the file was first seen in the customer's environment.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getLastSeenTime

Timestamp the file was last seen in the customer's environment.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasLastSeenTime

clearLastSeenTime

setLastSeenTime

Timestamp the file was last seen in the customer's environment.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getStatMode

The mode of the file. A bit string indicating the permissions and privileges of the file.

Returns
Type Description
int|string

setStatMode

The mode of the file. A bit string indicating the permissions and privileges of the file.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getStatInode

The file identifier. Unique identifier of object within a file system.

Returns
Type Description
int|string

setStatInode

The file identifier. Unique identifier of object within a file system.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getStatDev

The file system identifier to which the object belongs.

Returns
Type Description
int|string

setStatDev

The file system identifier to which the object belongs.

Parameter
Name Description
var int|string
Returns
Type Description
$this

Number of links to file.

Returns
Type Description
int|string

Number of links to file.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getStatFlags

User defined flags for file.

Returns
Type Description
int

setStatFlags

User defined flags for file.

Parameter
Name Description
var int
Returns
Type Description
$this

getLastAnalysisTime

Timestamp the file was last analysed.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasLastAnalysisTime

clearLastAnalysisTime

setLastAnalysisTime

Timestamp the file was last analysed.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getEmbeddedUrls

Embedded urls found in the file.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setEmbeddedUrls

Embedded urls found in the file.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getEmbeddedDomains

Embedded domains found in the file.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setEmbeddedDomains

Embedded domains found in the file.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getEmbeddedIps

Embedded IP addresses found in the file.

Returns
Type Description
Google\Protobuf\RepeatedField<string>

setEmbeddedIps

Embedded IP addresses found in the file.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getExifInfo

Exif metadata from different file formats extracted by exiftool.

Returns
Type Description
ExifInfo|null

hasExifInfo

clearExifInfo

setExifInfo

Exif metadata from different file formats extracted by exiftool.

Parameter
Name Description
var ExifInfo
Returns
Type Description
$this

getSignatureInfo

File signature information extracted from different tools.

Returns
Type Description
SignatureInfo|null

hasSignatureInfo

clearSignatureInfo

setSignatureInfo

File signature information extracted from different tools.

Parameter
Name Description
var SignatureInfo
Returns
Type Description
$this

getPdfInfo

Information about the PDF file structure.

Returns
Type Description
PDFInfo|null

hasPdfInfo

clearPdfInfo

setPdfInfo

Information about the PDF file structure.

Parameter
Name Description
var PDFInfo
Returns
Type Description
$this

getFirstSubmissionTime

First submission time of the file.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasFirstSubmissionTime

clearFirstSubmissionTime

setFirstSubmissionTime

First submission time of the file.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getLastSubmissionTime

Last submission time of the file.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasLastSubmissionTime

clearLastSubmissionTime

setLastSubmissionTime

Last submission time of the file.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getMainIcon

Icon's relevant hashes.

Returns
Type Description
Favicon|null

hasMainIcon

clearMainIcon

setMainIcon

Icon's relevant hashes.

Parameter
Name Description
var Favicon
Returns
Type Description
$this

getNtfs

NTFS metadata.

Returns
Type Description
NtfsFileMetadata|null

hasNtfs

clearNtfs

setNtfs

NTFS metadata.

Parameter
Name Description
var NtfsFileMetadata
Returns
Type Description
$this

getAppCompatCache

Windows AppCompatCache (Application Compatibility) metadata.

Returns
Type Description
AppCompatMetadata|null

hasAppCompatCache

clearAppCompatCache

setAppCompatCache

Windows AppCompatCache (Application Compatibility) metadata.

Parameter
Name Description
var AppCompatMetadata
Returns
Type Description
$this