Bitcoin Forum
May 13, 2024, 01:11:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Cracking 7zip file you have the pass to.. Almost.?  (Read 1693 times)
bitjet (OP)
Hero Member
*****
Offline Offline

Activity: 696
Merit: 500



View Profile
October 19, 2012, 07:59:28 PM
 #1

Hey guys Im trying to unzip a file with a 40char password. I have the password but the capitalization and possily order of the phrasing is unknown all manual entry tries have failed. Would it even be possible to crack this file under 256it encryption? Even with 99.9% of the passphrase is known?
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715562699
Hero Member
*
Offline Offline

Posts: 1715562699

View Profile Personal Message (Offline)

Ignore
1715562699
Reply with quote  #2

1715562699
Report to moderator
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
October 19, 2012, 08:22:18 PM
Last edit: October 19, 2012, 11:04:41 PM by SgtSpike
 #2

EDIT:  My maths skills fail at life today.  Will be back tomorrow.
bitjet (OP)
Hero Member
*****
Offline Offline

Activity: 696
Merit: 500



View Profile
October 19, 2012, 08:37:40 PM
 #3

Well, if capitalization is completely unknown and potentially truly random, that's 2^40 of entropy right there.  Even if you're doing 1 billion attempts a second (no idea if that's possible), you'd still have 2^31 seconds to complete it, or about 68 years.

Actually the capitalization is somewhat known. there are several words in the passphrase. The first letter in each word is either capitalized or not.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
October 19, 2012, 08:46:30 PM
 #4

Well, if capitalization is completely unknown and potentially truly random, that's 2^40 of entropy right there.  Even if you're doing 1 billion attempts a second (no idea if that's possible), you'd still have 2^31 seconds to complete it, or about 68 years.

Actually the capitalization is somewhat known. there are several words in the passphrase. The first letter in each word is either capitalized or not.
And the order of the words is unknown?  Any other unknowns?  How many words?
bitjet (OP)
Hero Member
*****
Offline Offline

Activity: 696
Merit: 500



View Profile
October 19, 2012, 09:07:48 PM
 #5

Oder of the words is semi know, the first two are known adnt the last word is known how it all fits together is not. nothing is actually missing, just the possible combinations.

5 phrases. they are numbers followed by a word.
BC12345
Newbie
*
Offline Offline

Activity: 57
Merit: 0


View Profile
October 19, 2012, 09:15:14 PM
Last edit: October 19, 2012, 10:53:15 PM by BC12345
 #6

windows or linux?
Pieter Wuille
Legendary
*
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
October 19, 2012, 10:25:28 PM
 #7

Well, if capitalization is completely unknown and potentially truly random, that's 2^40 of entropy right there.  Even if you're doing 1 billion attempts a second (no idea if that's possible), you'd still have 2^31 seconds to complete it, or about 68 years.

Heh?

2^40 / 1000000000 = 1100s.

I do Bitcoin stuff.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
October 19, 2012, 11:04:03 PM
 #8

Well, if capitalization is completely unknown and potentially truly random, that's 2^40 of entropy right there.  Even if you're doing 1 billion attempts a second (no idea if that's possible), you'd still have 2^31 seconds to complete it, or about 68 years.

Heh?

2^40 / 1000000000 = 1100s.

MATHS FAIL.

Will update my post.
bitjet (OP)
Hero Member
*****
Offline Offline

Activity: 696
Merit: 500



View Profile
October 19, 2012, 11:47:53 PM
 #9

Its a 7zip exe archive on windows. If I could feed it a library and let it fiill in the holes that would be awesome I have 3.5gh to put towards it.
BC12345
Newbie
*
Offline Offline

Activity: 57
Merit: 0


View Profile
October 20, 2012, 12:09:03 AM
Last edit: October 20, 2012, 12:29:35 AM by BC12345
 #10

I am not sure if I understand what your passphrase looks like, could you give an example?

Does it look like this:

"1234(P/p)eter 1234(P/p)aul 1234(M/m)arry 1234(M/m)olly 1234(B/b)aby"

?


Edit:
If it looks like this and you are sure that you know the first, second and last word (except the capitalization) then there are only 64 possible combinations;

             2           *          2       *    (     4          *         2   )       *         2                =      64

In  this case I would suggest that you make a list of all combinations and try them manually. (I hope my math was correct here)
ralree
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


Manateeeeeeees


View Profile
October 20, 2012, 01:42:34 AM
 #11

Code:
#!/usr/bin/env python
import string
mystr="peter piper picked a peck of pickled peppers"

def gen(s):
  words = s.split()
  for word in words:
    yield s
    repl = string.capitalize(word)
    s = string.replace(s, word, repl)
    yield s

combinations = gen(mystr)
for i in combinations:
  print i

Output:

Code:
peter piper picked a peck of pickled peppers
Peter piper picked a peck of pickled peppers
Peter piper picked a peck of pickled peppers
Peter Piper picked a peck of pickled peppers
Peter Piper picked a peck of pickled peppers
Peter Piper Picked a peck of pickled peppers
Peter Piper Picked a peck of pickled peppers
Peter Piper Picked A peck of pickled peppers
Peter Piper Picked A peck of pickled peppers
Peter Piper Picked A Peck of pickled peppers
Peter Piper Picked A Peck of pickled peppers
Peter Piper Picked A Peck Of pickled peppers
Peter Piper Picked A Peck Of pickled peppers
Peter Piper Picked A Peck Of Pickled peppers
Peter Piper Picked A Peck Of Pickled peppers
Peter Piper Picked A Peck Of Pickled Peppers

Then it's just something like:

Code:
hank@shelob ~/tmp $ python foo.py | while read line; do echo 7z e somefile.7z -p\"$line\"; done
7z e somefile.7z -p"peter piper picked a peck of pickled peppers"
7z e somefile.7z -p"Peter piper picked a peck of pickled peppers"
7z e somefile.7z -p"Peter piper picked a peck of pickled peppers"
7z e somefile.7z -p"Peter Piper picked a peck of pickled peppers"
7z e somefile.7z -p"Peter Piper picked a peck of pickled peppers"
7z e somefile.7z -p"Peter Piper Picked a peck of pickled peppers"
7z e somefile.7z -p"Peter Piper Picked a peck of pickled peppers"
7z e somefile.7z -p"Peter Piper Picked A peck of pickled peppers"
7z e somefile.7z -p"Peter Piper Picked A peck of pickled peppers"
7z e somefile.7z -p"Peter Piper Picked A Peck of pickled peppers"
7z e somefile.7z -p"Peter Piper Picked A Peck of pickled peppers"
7z e somefile.7z -p"Peter Piper Picked A Peck Of pickled peppers"
7z e somefile.7z -p"Peter Piper Picked A Peck Of pickled peppers"
7z e somefile.7z -p"Peter Piper Picked A Peck Of Pickled peppers"
7z e somefile.7z -p"Peter Piper Picked A Peck Of Pickled peppers"
7z e somefile.7z -p"Peter Piper Picked A Peck Of Pickled Peppers"

This doesn't use recursion, so it won't generate the power set of all capitalization combinations, but it should get you started..
I'm going to continue messing around with it to try and get all capitalization combinations - it's a fun problem!

1MANaTeEZoH4YkgMYz61E5y4s9BYhAuUjG
ralree
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


Manateeeeeeees


View Profile
October 20, 2012, 02:12:36 AM
 #12

Fixed it:

Code:
#!/usr/bin/env python
import string
mystr="peter piper picked a peck of pickled peppers"

def gen_inner(s, words):
  if(len(words) > 1):
    gen_inner(s, words[1:])
  else:
    print s

  repl = string.capitalize(words[0])
  s = string.replace(s, words[0], repl)
  if(len(words) > 1):
    gen_inner(s, words[1:])
  else:
    print s

words = mystr.split()
gen_inner(mystr, words)

This generates ALL capitalization permutations of the given string.  Then you feed them in the same way as I showed in my previous post.

1MANaTeEZoH4YkgMYz61E5y4s9BYhAuUjG
BC12345
Newbie
*
Offline Offline

Activity: 57
Merit: 0


View Profile
October 20, 2012, 03:27:48 PM
 #13

Nice!  Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!