Skip to content

Instantly share code, notes, and snippets.

@petergs
Last active January 2, 2024 02:36
Show Gist options
  • Select an option

  • Save petergs/5de5579da9c03bbb95a406bae3c0809e to your computer and use it in GitHub Desktop.

Select an option

Save petergs/5de5579da9c03bbb95a406bae3c0809e to your computer and use it in GitHub Desktop.
Identifying executable hashes from a partial appx bundle

Identifying executable hashes from a partial appx bundle

Scenario: You only have the AppxBlockMap.xml from a potentially malicious Appx. You'd like to identify the original PE contained in the Appx.

AppxBlockMap.xml contains a list of files and their hashes contained in an Appx bundle. Each file is contained in a <File></File> xml block. You can search for the string <File Name= to see each file or search directly for the relevant .exe. The file hash is the last element (<b4:FileHash>) and is base64 encoded.

References

Background

While attempting to grab a sample of a recent malicious Windows store app that impersonates Ledger Live, I was able to find a task on any.run for the malicious version by searching "ledger-live-web3" and "any.run". Microsoft had already pulled down the files and Windows store entries, but I was able to download the package's AppxBlockMap.xml from anyrun.

This was prompted after a live stream from OALabs on another sample that impersonates Ledger Live, and I was interested in seeing if they were the same (they weren't).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment