-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using an uncompressed png file as attack target #66
Comments
Hello! To pass this information to bkcrack, you can either:
Regarding additional non-contiguous plaintext such as the IEND chunk, giving it to bkcrack would not make a difference in this case. I hope this helps. Let me know how it goes. |
I am glad it worked!
Yes, that can happen with some luck. Using more contiguous plaintext means that the number of candidates (Z values) can be further reduced, but then finding the solution among the candidates can take long or not depending on where the solution is in the list of candidates. If we are lucky and it is at the beginning of the list of candidates, it will be found quickly.
To carry out an attack, you need 12 bytes of known plaintext and at least 8 of them must be contiguous. You can provide known plaintext either from a file, a zip entry, or as an hexadecimal string on the command line. Note that you need to specify where each provided piece of data is (i.e. at which offset). I am open to suggestions. How would you expect of prefer to provide non-contiguous data? |
Indeed sounds nice. Would be useful in cases similar to this PNG attack, where there is some known text present in the file but unlike with the png it's not in known or fixed parts of the file. No idea on how to tackle this kind of issue though.
Heh, thats always the the gist isn't?
Or perhaps the chunks structured in an XML format? Then pass a special argument to the bkcrack that would indicate the file passed is to be used for non-contigious text instead of as plaintext. Could be a bit more complex to write, but is more powerful and could enable one to input known text in multiple formats (like plain text or hexadecimal):
Indeed it's difficult to decide which approach would suit the tool best, and which approach users will find the most intuitive. |
Even though I think passing data on the command line is generally acceptable because there is not much, I agree having some kind of configuration file to specify known plaintext in various formats (string or hexadecimal) and other options would be nice to have. That might come handy in particular if bkcrack accepts more complex input in the future such as pieces of data without a known offset but within an interval or with ordering constraints between pieces of data. To my understanding, your questions have been answered so I close this issue. Feel free to reopen if I am mistaken. |
I have an un compressed (store) png file in a zip archive
Knowing the signature of a png file, how do i enter the plain text?
The first eight bytes of a PNG file always contain the following values:
(decimal) 137 80 78 71 13 10 26 10
(hexadecimal) 89 50 4e 47 0d 0a 1a 0a
(ASCII C notation) \211 P N G \r \n \032 \n
plus, scattered around the file there is more known text, like IHDR, IDAT or IEND
How to store this information on the plaintext file?
First, how to enter the signature?
Second, how to create (and use) a plain text file containing non-contigious text?
The text was updated successfully, but these errors were encountered: