Skip to content

Open files protected by Hourglass by bruteforcing the underlying key

Notifications You must be signed in to change notification settings

nickodell/HourglassBreaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HourglassBreaker

This is a python program that can open files encrypted by Hourglass by bruteforcing the key protecting the file.

It does not matter how many iterations you've set in Hourglass, because the underlying encryption is only 16-bit.

A test vector is included. HourglassBreaker works best on medium length messages. If it's too short, then the CRC isn't effective, and multiple keys produce a file that checksums correctly. The longer the file is, the longer HB will take.

This works as of commit 8cf7c8c.

Example usage

$ time ./bruteforce.py todecrypt
Solution found!
key = 0x2a4f
plaintext = b'Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n'
flags = 2

real	0m3.239s
user	0m3.240s
sys	0m0.000s

License

GPLv3

Dependencies

Python 3

Bugs

Doesn't support qCompress. If you get 'flags = 3' and a bunch of gobbledygook, that's because the data is compressed.

About

Open files protected by Hourglass by bruteforcing the underlying key

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages