D-Link DVG-3104MS Hardcoded Credentials Vulnerability Analysis (CVE-2021-39613)

Introduction

D-Link DVG-3104MS version 1.0.2.0.3, 1.0.2.0.4, and 1.0.2.0.4E contains hard-coded credentials for undocumented user accounts in the '/etc/passwd' file. Passwords can be easily recovered using john. D-Link DVX-2000MS also has similar vulnerability (CVE-2021-39614).

Analysis

1. Extract filesystem from the firmware using binwalk

binwalk -eM DVG-3104MS_010204.flash

2. Extract etc.tgz file in _DVG-3104MS_010204.flash.extracted/squashfs-root/etc/ directory. Two different types of hashes can be found in passwd file. 

3.Separate them and crack the hashes using john.

john passwd_type1.txt

john passwd_type2.txt

4. Following credentials will be obtained after successful crack:

root:brecis:0:0:root:/root:/bin/sh
CLI:brecis:0:0:root:/root:/bin/sh
demo:demo:5000:5000:Demo User:/home/demo:/bin/bash
maintain:blip:6000:6000:maintainer:/var:/bin/sh
cloudraker:brecis:32770:32770:Linux User,,,:/home/cloudraker:/bin/sh
pmc:pmc123:32771:32771:Linux User,,,:/home/pmc:/bin/sh 

Demo



Comments

Popular posts from this blog

Decrypt TP-Link config.bin Configuration Backup File

Firmadyne Installation & Emulation of Firmware

Extract / Create Cramfs File System from Ubuntu 20.04