|
14 | 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15 | 15 | # See the License for the specific language governing permissions and |
16 | 16 | # limitations under the License. |
| 17 | +# |
| 18 | +# ----------------------------------------------------------------------------- |
| 19 | +# |
| 20 | +# Dropbox DBX key extraction *offline* (why not? even online) |
| 21 | +# |
| 22 | +# python27 dbx-keygen-windpapi.py |
| 23 | +# --masterkey=/mnt/win81/Users/user/AppData/Roaming/Microsoft/Protect/S-1-5-21-2128076315-4144300488-3078399761-1001/ |
| 24 | +# --sid=S-1-5-21-2128076315-4144300488-3078399761-1001 |
| 25 | +# --password=fuffa |
| 26 | +# --ntuser=NTUSER.DAT |
| 27 | +# |
| 28 | +# In case you have not the password but its SHA1 (see Happy DPAPI blog post) |
| 29 | +# |
| 30 | +# python27 dbx-keygen-windpapi.py |
| 31 | +# --masterkey=/mnt/win81/Users/user/AppData/Roaming/Microsoft/Protect/S-1-5-21-2128076315-4144300488-3078399761-1001/ |
| 32 | +# --sid=S-1-5-21-2128076315-4144300488-3078399761-1001 |
| 33 | +# --hash=51d2e3226fca7f5932784a8e44cc9240 |
| 34 | +# --ntuser=NTUSER.DAT |
| 35 | +# |
| 36 | +# In case you need the old credentials, add the credhist paramenter |
| 37 | +# |
| 38 | +# python27 dbx-keygen-windpapi.py |
| 39 | +# --masterkey=/mnt/win81/Users/user/AppData/Roaming/Microsoft/Protect/S-1-5-21-2128076315-4144300488-3078399761-1001/ |
| 40 | +# --sid=S-1-5-21-2128076315-4144300488-3078399761-1001 |
| 41 | +# --credhist=/mnt/win81/Users/user/AppData/Roaming/Microsoft/Protect/CREDHIST |
| 42 | +# --password=fuffa |
| 43 | +# --ntuser=NTUSER.DAT |
| 44 | +# |
| 45 | +# ----------------------------------------------------------------------------- |
17 | 46 |
|
18 | 47 | from __future__ import print_function |
19 | 48 |
|
@@ -72,7 +101,8 @@ def derive_dbx_password(user_key): |
72 | 101 | r.open('Software\\Dropbox\\'+key_name).value('Client').value()) |
73 | 102 |
|
74 | 103 | if options.h: |
75 | | - datablob.try_decrypt_with_hash(options.h, mkp, options.sid) |
| 104 | + datablob.try_decrypt_with_hash( |
| 105 | + options.h.decode('hex'), mkp, options.sid) |
76 | 106 | if options.password: |
77 | 107 | datablob.try_decrypt_with_password( |
78 | 108 | options.password, mkp, options.sid) |
|
0 commit comments