fiano

module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: BSD-3-Clause

README

fiano

Go-based tools for modifying UEFI firmware.

CircleCI Go Report Card GoDoc CodeCov License

Fiano

Contributing

For information about contributing, including how we sign off commits, please see CONTRIBUTING.md

UTK: Generic UEFI tool kit meant to handle rom images

Example usage:

# For a comprehensive list of commands
utk -h

# Display the image in a compact table form:
utk winterfell.rom table

# Summarize everything in JSON:
utk winterfell.rom json

# List information about a single file in JSON (using regex):
utk winterfell.rom find Shell

# Dump an EFI file to an ffs
utk winterfell.rom dump DxeCore dxecore.ffs

# Insert an EFI file into an FV near another Dxe
utk winterfell.rom insert_before Shell dxecore.ffs save inserted.rom
utk winterfell.rom insert_after Shell dxecore.ffs save inserted.rom

# Insert an EFI file into an FV at the front or the end
# "Shell" is just a means of specifying the FV that contains Shell
utk winterfell.rom insert_front Shell dxecore.ffs save inserted.rom
utk winterfell.rom insert_end Shell dxecore.ffs save inserted.rom

# Remove a file and pad the firmware volume to maintain offsets for the following files
utk winterfell.rom remove_pad Shell save removed.rom

# Remove two files by their GUID without padding and replace shell with Linux:
utk winterfell.rom \
  remove 12345678-9abc-def0-1234-567890abcdef \
  remove 23830293-3029-3823-0922-328328330939 \
  replace_pe32 Shell linux.efi \
  save winterfell2.rom

# Extract everything into a directory:
utk winterfell.rom extract winterfell/

# Re-assemble the directory into an image:
utk winterfell/ save winterfell2.rom
DXE Cleaner

Delete unnecessary DXEs from your firmware. Free up space, speed up boot times and decrease the attack surface area! See the demo:

asciicast

FMAP: Parses flash maps.

Example usage:

  • fmap checksum [md5|sha1|sha256] FILE
  • fmap extract i FILE
  • fmap jget JSONFILE FILE
  • fmap jput JSONFILE FILE
  • fmap summary FILE
  • fmap usage FILE
  • fmap verify FILE

Installation

# Golang version 1.13 is required:
go version

# For UTK:
go install github.com/linuxboot/fiano/cmds/utk

# For fmap:
go install github.com/linuxboot/fiano/cmds/fmap

The executables are installed in $HOME/go/bin.

Updating Dependencies

# Fiano utilizes Go modules.
Use the following to download the dependencies:
```
go mod download
go mod verify
```

If you desire to update a existing dependency to a newer version:
```
go get path/to/dependency/module@tag
```
Execute this in any directory of fiano repository

Directories

Path Synopsis
cmds
fmap
Fmap parses flash maps.
Fmap parses flash maps.
glzma
glzma compresses and decompresses in the same manner as EDK2's LzmaCompress.
glzma compresses and decompresses in the same manner as EDK2's LzmaCompress.
guid2english
guid2english replace GUIDs with their English representation.
guid2english replace GUIDs with their English representation.
utk
The utk command performs operations on a UEFI firmware image.
The utk command performs operations on a UEFI firmware image.
fittool Module
pkg
compression
Package compression implements reading and writing of compressed files.
Package compression implements reading and writing of compressed files.
fmap
Package fmap parses flash maps.
Package fmap parses flash maps.
fsp
Package fsp implements FSP info header parsing
Package fsp implements FSP info header parsing
guid
Package guid implements the mixed-endian GUID as implemented by Microsoft.
Package guid implements the mixed-endian GUID as implemented by Microsoft.
guid2english
Package guid2english provides a transform.Transformer which replaces all GUIDs in the input with their known English representation.
Package guid2english provides a transform.Transformer which replaces all GUIDs in the input with their known English representation.
knownguids
Package knownguids contains a list of guids and their names.
Package knownguids contains a list of guids and their names.
log
uefi
Package uefi contents data types for the components found in UEFI and an Parse function for reading an image.
Package uefi contents data types for the components found in UEFI and an Parse function for reading an image.
unicode
Package unicode converts between UCS2 cand UTF8.
Package unicode converts between UCS2 cand UTF8.
utk
Package utk is where the implementation of the utk command lives.
Package utk is where the implementation of the utk command lives.
visitors
Package visitors uses the Visitor interface to recursively apply an operation over the firmware image.
Package visitors uses the Visitor interface to recursively apply an operation over the firmware image.
scripts
checklicenses
Run with `go run checklicenses.go`.
Run with `go run checklicenses.go`.
namecollect
Run with `go run namecollect.go`.
Run with `go run namecollect.go`.

Jump to

Keyboard shortcuts

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