windows

package
v0.0.0-...-a649c9f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPortableExecutable

func GetPortableExecutable(stub []byte) (*structs.PortableExecutable, error)

Takes a given input file and creates a Portable Executable wrapper. See the getAttributes documentation for more information.

Types

type TargetExecutable

type TargetExecutable struct {
	structs.PortableExecutable
}

You cannot extend types defined in other packages, so we need to wrap it here. I can't help but to feel the design of this project is flawed if we've ended up here. Oh well, first Go project.

func (*TargetExecutable) CreateFromTemplate

func (portableExecutable *TargetExecutable) CreateFromTemplate(payload []byte) (contents []byte, err error)

CreateFromTemplate adds a superfluous certificate to a portable executable. The appended data is "unverified" and does affect the PE's digital signature. This means metadata of any kind can be added to a base executable.

func (*TargetExecutable) GetPayload

func (portableExecutable *TargetExecutable) GetPayload() (cert *x509.Certificate, payload []byte, err error)

Searches a portable executable for the Metapod OID. If found, it will return the []value which can then be converted into a string. The string is arbitrary, as any format can be included. So it is up to the host program to parse it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL