Home

Awesome

Look inside the box

This tool is just the latest implementation that breaks the encryption and obfuscation layers that Dropbox applies to their modified Python interpreter. It's based on work the author did many, many moons ago as well as public work done by others. For more information please see the blogpost.

Updates

May, 2019

Initial release.

October, 2019

The code was updated to regenerate the opcode database using Python 3.7. It now also checks for the version of uncompyle6 being installed (>= 3.5.x) such that it gives an error when uncompyle6 is installed but is very outdated. Several bugs were fixed in the generation of the opcode mapping. Thanks to @slinkinone for sending me e-mails and helping me out with debugging some of the issues.

Requirements

pip3 install uncompyle6

Usage

python3 unpacker.py --dropbox-zip `find . -name python-packages-37.zip`
find . -name python-packages-37.zip | xargs python3.7 gendb.py --python-dir tmp/Python-3.7.4/ --db opcode.db --dropbox-zip
python3 patchzip.py --dropbox-zip `find . -name python-packages-37.zip` --output-zip out.zip
mv out.zip ~/.dropbox-dist/dropbox-lnx_64-71.4.108/python-packages-37.zip
~/.dropbox-dist/dropbox-lnx_64-71.4.108/dropbox
python3 checkdb.py --db opcodemap.db

That will yield something like the following:

...
| ============================== | ======= | ======= |
| OPCODE                         |  PYTHON | DROPBOX |
| ============================== | ======= | ======= |
| POP_TOP                        |       1 |      24 |
| ROT_TWO                        |       2 |       1 |
| ROT_THREE                      |       3 |      83 |
| DUP_TOP                        |       4 |      66 |
| UNARY_POSITIVE                 |      10 |      77 |
...
eval `python3 setenv.py`
~/.dropbox-dist/dropbox-lnx_64-71.4.108/dropbox