Documentation ¶
Overview ¶
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
- func NewAPCBSecurityTokensInput(ctx context.Context, artifacts ArtifactsAccessor, ...) (analysis.Input, error)
- func NewBIOSRTMVolumeInput(ctx context.Context, artifacts ArtifactsAccessor, ...) (analysis.Input, error)
- func NewDiffMeasuredBootInput(ctx context.Context, artifacts ArtifactsAccessor, ...) (analysis.Input, error)
- func NewIntelACMInput(ctx context.Context, artifacts ArtifactsAccessor, input afas.IntelACMInput) (analysis.Input, error)
- func NewPSPSignatureInput(ctx context.Context, artifacts ArtifactsAccessor, input afas.PSPSignatureInput) (analysis.Input, error)
- func NewReproducePCRInput(ctx context.Context, artifacts ArtifactsAccessor, input afas.ReproducePCRInput) (analysis.Input, error)
- type ArtifactsAccessor
- type FirmwareImage
- type FirmwareImageFilename
- type FirmwaresAccessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPCBSecurityTokensInput ¶
func NewAPCBSecurityTokensInput( ctx context.Context, artifacts ArtifactsAccessor, input afas.APCBSecurityTokensInput, ) (analysis.Input, error)
NewAPCBSecurityTokensInput constructs input needed for APCBSecurityTokens analyzer
func NewBIOSRTMVolumeInput ¶
func NewBIOSRTMVolumeInput( ctx context.Context, artifacts ArtifactsAccessor, input afas.BIOSRTMVolumeInput, ) (analysis.Input, error)
NewBIOSRTMVolumeInput constructs input needed for BIOSRTMVolume analyzer
func NewDiffMeasuredBootInput ¶
func NewDiffMeasuredBootInput( ctx context.Context, artifacts ArtifactsAccessor, input afas.DiffMeasuredBootInput, ) (analysis.Input, error)
NewDiffMeasuredBootInput constructs input needed for DiffMeasuredBoot analyzer
func NewIntelACMInput ¶
func NewIntelACMInput( ctx context.Context, artifacts ArtifactsAccessor, input afas.IntelACMInput, ) (analysis.Input, error)
NewIntelACMInput constructs input needed for IntelACM analyzer
func NewPSPSignatureInput ¶
func NewPSPSignatureInput( ctx context.Context, artifacts ArtifactsAccessor, input afas.PSPSignatureInput, ) (analysis.Input, error)
NewPSPSignatureInput constructs input needed for PSPSignature analyzer
func NewReproducePCRInput ¶
func NewReproducePCRInput( ctx context.Context, artifacts ArtifactsAccessor, input afas.ReproducePCRInput, ) (analysis.Input, error)
NewReproducePCRInput constructs input needed for ReproducePCR analyzer
Types ¶
type ArtifactsAccessor ¶
type ArtifactsAccessor interface { GetFirmware(ctx context.Context, artIdx int) (analysis.Blob, error) GetRegisters(ctx context.Context, artIdx int) (registers.Registers, error) GetTPMDevice(ctx context.Context, artIdx int) (tpmdetection.Type, error) GetTPMEventLog(ctx context.Context, artIdx int) (*tpmeventlog.TPMEventLog, error) GetPCR(ctx context.Context, artIdx int) ([]byte, uint32, error) GetMeasurementsFlow(ctx context.Context, inputIdx int) (types.BootFlow, error) }
ArtifactsAccessor is a helper that unifies access to the input artifacts
func NewArtifactsAccessor ¶
func NewArtifactsAccessor( artifacts []afas.Artifact, firmwaresAccessor FirmwaresAccessor, ) (ArtifactsAccessor, error)
NewArtifactsAccessor creates a new ArtifactsAccessor object
Is not re-usable between different calls of Analyze method!
type FirmwareImage ¶
type FirmwareImage struct { Meta models.FirmwareImageMetadata Content []byte }
FirmwareImage combines firmware image metadata and data together.
type FirmwareImageFilename ¶
type FirmwareImageFilename string
FirmwareImageFilename refers to the either firmware filename in the orig firmware table or one of the options below
type FirmwaresAccessor ¶
type FirmwaresAccessor interface { GetByBlob(ctx context.Context, content []byte) (analysis.Blob, error) GetByID(ctx context.Context, imageID types.ImageID) (analysis.Blob, error) GetByVersion(ctx context.Context, firmwareVersion string) (analysis.Blob, error) }
FirmwaresAccessor abstracts obtaining firmware image.
It provides an analysis.Blob given different data (in different methods).