Skip to content

Commit fb80ecb

Browse files
committed
'Cosmetic.'
1 parent 83025a8 commit fb80ecb

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

dbx-key-win-dpapi.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,35 @@
1414
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
# See the License for the specific language governing permissions and
1616
# 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+
# -----------------------------------------------------------------------------
1746

1847
from __future__ import print_function
1948

@@ -72,7 +101,8 @@ def derive_dbx_password(user_key):
72101
r.open('Software\\Dropbox\\'+key_name).value('Client').value())
73102

74103
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)
76106
if options.password:
77107
datablob.try_decrypt_with_password(
78108
options.password, mkp, options.sid)

0 commit comments

Comments
 (0)