All Projects → 0xricksanchez → dlink-decrypt

0xricksanchez / dlink-decrypt

Licence: GPL-3.0 license
D-Link firmware decryption PoC

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to dlink-decrypt

micronucleus-firmware
Fork for the firmware / digispark part of the micronucleus repository
Stars: ✭ 50 (-53.27%)
Mutual labels:  firmware
adbtools2
Tools for hacking ADB Epicentro routers, including firmware modification and VOIP password recovery.
Stars: ✭ 36 (-66.36%)
Mutual labels:  firmware
unifi-controllable-switch
TOUGHswitch firmware to integrate with the UniFi Controller (experimental).
Stars: ✭ 24 (-77.57%)
Mutual labels:  firmware
fa
Automation tool for locating symbols & structs in binary (primary IDA focused)
Stars: ✭ 58 (-45.79%)
Mutual labels:  firmware
synology-decrypt
An open source implementation/description of the Synology Cloud Sync encryption/decryption algorithm
Stars: ✭ 91 (-14.95%)
Mutual labels:  decryption
drivers-linux-firmware
MOVED: https://gitlab.com/q3aql/drivers-linux-firmware
Stars: ✭ 28 (-73.83%)
Mutual labels:  firmware
TrezorSymmetricFileEncryption
🔒 Use your Trezor device to symmetrically encrypt and decrypt files
Stars: ✭ 16 (-85.05%)
Mutual labels:  decryption
meltdown-spectre-bios-list
a list of BIOS/Firmware fixes adressing CVE-2017-5715, CVE-2017-5753, CVE-2017-5754
Stars: ✭ 16 (-85.05%)
Mutual labels:  firmware
Password-Store
Saves your password with cryptography so only you can decode it.
Stars: ✭ 15 (-85.98%)
Mutual labels:  decryption
Keep-It-Secure-File-Encryption
Keep It Secure Private Data Encryption & Decryption Tool
Stars: ✭ 38 (-64.49%)
Mutual labels:  decryption
doctrine-extensions
Doctrine2 behavioral extension Transformable
Stars: ✭ 14 (-86.92%)
Mutual labels:  decryption
twigs
Alternate firmware for Mutable Instruments Branches synthesizer module
Stars: ✭ 21 (-80.37%)
Mutual labels:  firmware
MKS WIFI upgrade with BeePrint web interface
Firmware for MKS WiFi module from Makerbase with BeePrint Web Interface, tested with Flying Bear Ghost 5/Ghost 4/Reborn
Stars: ✭ 35 (-67.29%)
Mutual labels:  firmware
samsung-bios-check
BIOS update checker for Samsung laptops running Linux
Stars: ✭ 25 (-76.64%)
Mutual labels:  firmware
hutscape.github.io
🏡 Everyday practical home automation projects
Stars: ✭ 34 (-68.22%)
Mutual labels:  firmware
cryptopocket
🔐 Encrypt anything, then Decrypt by providing a required key.
Stars: ✭ 22 (-79.44%)
Mutual labels:  decryption
Rockbox-RCC
Various enhancements of new features and human-based design.
Stars: ✭ 34 (-68.22%)
Mutual labels:  firmware
U8glib-HAL
Customized U8glib for use in Marlin 2.0
Stars: ✭ 40 (-62.62%)
Mutual labels:  firmware
T-BOTS
Software for controlling and analysing T-Bots (Balancing robots)
Stars: ✭ 21 (-80.37%)
Mutual labels:  firmware
bananapi-zero-ubuntu-base-minimal
BananaPi M2 Zero - Ubuntu Focal Base Minimal Image (Experimental) - U-Boot 2017.09 / Kernel 4.18.y / Kernel 4.19.y / Kernel 4.20.y / Kernel 5.3.y / Kernel 5.6.y / Kernel 5.7.y / Kernel 5.11.y
Stars: ✭ 77 (-28.04%)
Mutual labels:  firmware

dlink-decrypt

This is the PoC code for my blogpost series about breaking encrypted D-Link firmware samples for further analysis:

Repo Contents

  • src --> My re-constructed C code from the imgdecrypt disassembly
  • bin --> Has compiled x64 versions of the imgdecrypt binary
  • DIR_3060 --> Contains public.pem and the imgdecrypt binary from their root fs
  • DIR_882 --> Analogous to DIR_3060
  • test --> some test binaries for un-/packing

Usage

For the basic decryption of a sample you can just invoke the python script as follows:

$ ./dlink-dec.py
Usage: python3 ./dlink-dec.py -i <in> -o <out>

I've also rapidly prototypted a D-Link like encryption that mimics the original one. You can test it by adding a mode flag to the invocation:

$ ./dlink-dec.py
Usage: python3 ./dlink-dec.py -i <in> -o <out> -m enc

Alternative way:

As always there is also an alternative way using openssl:

dd if=enc.bin skip=1756 iflag=skip_bytes|openssl aes-128-cbc -d -p -nopad -nosalt -K "c05fbf1936c99429ce2a0781f08d6ad8" -iv "67c6697351ff4aec29cdbaabf2fbe346" --nosalt -in /dev/stdin -out dec.bin
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].