Saggy Posted November 26, 2009 Share Posted November 26, 2009 (edited) I've been screwing around with a bruteforcing program and I want to be able to use it to brute force password protected RAR files. I built the string generation and actual brute forcing part of the program, but so far I've just been using the "system" command to frontend to my unrar utility and using the randomly generated string to see if it can list the content to test if it was successful. Problem is all the overhead from calling the actual utility brings the tires per second from half a million a second down to about 18 a second. So I'm wondering if there's some kind of free RAR library that has a "list()" function or something that I can use to test the pass against the RAR file with my program. http://www.unrarlib.org/download.html This was pretty much exactly what I needed, and very straight forward, but it doesn't support RARs past v2.9. That's really old, and I know there's got to be other libraries to do this... Edited November 26, 2009 by SagaciousKJB Link to comment https://gtaforums.com/topic/433825-unrarlib/ Share on other sites More sharing options...
K^2 Posted November 30, 2009 Share Posted November 30, 2009 Have you tried reading docs on RAR format? Decoding might be straight forward enough to write your own lib. Typically, with compression algorithms, it's the encoder that's a pain in the rear sections of ones body, and decoders tend to be very easy. E.g. Huffman decoder is a simple binary tree parser, while encoder needs to deal with entropies to figure out optimal bit lengths, construct cypher tree based on these lengths, and then perform tree searches to actually encode data. That said, bruteforcing RAR rarely works out. There are some programs out there that already do that, and they are not that efficient. If you actually need to bruteforce an archive, I suggest trying your luck with one of these. If you simply want to mess with encryption, you might consider looking into some algorithms you can actually keep track of. Link to comment https://gtaforums.com/topic/433825-unrarlib/?do=findComment&comment=1059662401 Share on other sites More sharing options...
Saggy Posted November 30, 2009 Author Share Posted November 30, 2009 Have you tried reading docs on RAR format? Decoding might be straight forward enough to write your own lib. Typically, with compression algorithms, it's the encoder that's a pain in the rear sections of ones body, and decoders tend to be very easy. E.g. Huffman decoder is a simple binary tree parser, while encoder needs to deal with entropies to figure out optimal bit lengths, construct cypher tree based on these lengths, and then perform tree searches to actually encode data. That said, bruteforcing RAR rarely works out. There are some programs out there that already do that, and they are not that efficient. If you actually need to bruteforce an archive, I suggest trying your luck with one of these. If you simply want to mess with encryption, you might consider looking into some algorithms you can actually keep track of. Heh, yeah, I've seen some of the other RAR brute-forcers out there. They work a lot better than mine, and that's not saying much for mine. Anyway, this whole thing stemmed from a program I made to test the strength of passwords that I have without using 'john'. The idea was to see how long it took a brute forcing program to find it if it were going at ridiculously optimal speeds. Thing is once I got done putting all of that together, I realized that I had a pretty nice frame work to try out a brute forcing utility for just about everything. I've already started crafting a function that uses system calls to "curl" to brute force a PHP password form ( on my own server by the way ), so the "RAR" part was just a "I wonder if it would work for RARs" notion that I've been exploring. My thought was that the unrarlib was probably more streamlined than the actual unrar application I was making system() calls to, and that the overhead reduced from my shell having to execute the unrar binary, and it having to run all of its stuff as compared to just calling unrarlib's function would make it run much better. It worked for files smaller than 500kB, but once I got over that size, it could only try about four or five phrases a second, versus the system() call versions 15-18 at any size ( or format ). So yeah, I think I'm probably not going to bust my ass trying to learn the RAR format and decoding and just tinker with other things. The RAR format itself doesn't seem so challenging (aside from the encryption), but for what I'm trying to do with it, I think it's kind of a waste of time. I've seen crackers that get 3 or 4 billion phrases tried per second on a Intel P4, and I barely push 1-2 milliion tries per second just testing the strength of passwords. Might leave it in there for gimmick though... Link to comment https://gtaforums.com/topic/433825-unrarlib/?do=findComment&comment=1059663310 Share on other sites More sharing options...
Recommended Posts