Jump to content

AES Encrypted File Brute Force Decryption


Recommended Posts

After 3 months of work I've released version 0.1 of Abrute.  Abrute is a Multi-threaded AES brute force file decryption tool.  It has much of the same character sequencer support that the crunch tool does.  I've spent a good portion of my development time discovering and implementing sequence algorithms to shave off as many wasted CPU cycles as I can and I feel pretty good about it.  The beauty of it is that it works. :smile:

Now the computers I own only have 4 cores so I'm limited in the amount of processing power to get work loads done.  I can say that with a finite amount of cores the workload goes up exponentially as the password length goes up.  Also true for the longer a character set is to work with.  I so want the new AMD Thread-Ripper with all its cores. :ph34r:

My journey started with finding some of my old archived encrypted files and discovering I am unable to remember the password correctly.  This led me to look for answers on Security/StackExchange.  I went from creating a detailed question, as I was unable to find the answers I was looking for, and got a few small tips pointing me towards the tool known as crunch.  I have answered my own question on the forum with many helpful ways I've tried to implement a solution to opening my AES encrypted files.  That thread is here: https://security.stackexchange.com/questions/161592/how-to-brute-force-a-somewhat-remembered-aescrypt-password

On that thread I first developed a likely word list with shuffling sequences, ordering, and generating plenty of output to test against.  That didn't open the file for me but that code has already helped one other person open their encrypted file.

Next I learned how to do the equivalent of multi-threading with only using Bash and xargs which will let you spin up parallel processes to run across all your cores.  And that works well with crunch.  But this was a bit crude as I had to let it run many weeks and could only check the progress by peeking into data being passed through Linux pipes.  Not to mention a power outage had me lose a good chunk of progress.  So yeah, I wanted to have something better.

So I wrote Abrute.  I ended up rewriting most of the crunch tool into my own sequencer with my algorithm improvements to save CPU cycles.  And the attempts for decrypting are all calls to the aescrypt command for now.  But the threading work is handled brilliantly (some one elses library) and at the moment I have Standard Out including progress.  Over time I plan to write my own code for decrypting AES files and drop the need for the aescrypt executable.  I also want to add GPU support for processing with ArrayFire but I first need to look into how feasible this is.

Abrute works well on Mac and Linux and is untested on Windows (it shouldn't take too long to try it out on Windows).  The commands are fairly straight forward and detailed in the help you get with -h.  You can set the range of characters, character set, limit adjacent same characters, and start point.  This uses your CPU cores at 100% so you'll likely need to do this work on a secondary system.

I'm playing with the idea of divvying out the work to the cloud.  You can rent an Amazon multi-core system for around 64 cores @ $3 to $5 an hour.  So I can only imagine the performance gains from splitting the work across so many systems and system cores.

Benchmarking is next for my project.  I plan to have this program be one of those system benchmarks that everyone compares their computer by :wink:.  I have some numbers from the original bash/crunch/xargs: At two character passwords I got about 35 passwords tried per second, at 3 character passwords I get about 12 passwords tried per second.  At 8 characters with 4 cores a month isn't out of the question.  So long passwords would be a long term commitment to try to crack unless you own Amazon or the like :wink:.

I may never get my files open again.  I have a tendency towards longer passwords.  But this whole journey has been an amazing learning experience for me allowing me to sharpen many skills and develop many new ones.  Anyway I hope you all find this tool useful.  I'll get back to you with the newer benchmark numbers when I have them.  Feel free to contribute to the project in any way.

_I have enough details for you to get it running on a Docker image so cloud is already possible._

I'm just excited about it.  Enjoy!



Link to comment
Share on other sites

  • 1 month later...
2 hours ago, RazerBlade said:

Does it support GPU to be used?

Not yet.  Currently it shells out work to the `aescrypt` command.  To utilize the GPU I'll need to rewrite `aescrypt` in Rust.  That is in the agenda but is a ways off for now.

Link to comment
Share on other sites

14 hours ago, 6ftdan said:

Not yet.  Currently it shells out work to the `aescrypt` command.  To utilize the GPU I'll need to rewrite `aescrypt` in Rust.  That is in the agenda but is a ways off for now.

This is the second time I seen you mention rust... I gave it a quick look at ssh examples and almost resembles ruby...


As mentioned above, I would like to see gpu examples, I had a encryption project I was working on but fail with using gpu libraries... I would likw to see some example code of rust and gpu crunching.

Link to comment
Share on other sites

I'm excited to see more of your work... just for fun my encryption project was more of a attempt to compress files to save hd space like tv show silicon valley.


I ran into ram limitations per my coding skills I have never ran into this kind of limitation. I plan to build a machine with as much affordable ram as possible.


I will eventually implement proper ram buffer size management. but my attempt deals with a large buffer to achieve maximum compression.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...