Open Sesame (Dlink - CVE-2012-4046)
A couple weeks ago a vulnerability was posted for the dlink DCS-9xx series of cameras. The author of the disclosure found that the setup application that comes with the camera is able to send a specifically crafted request to a camera on the same network and receive its password in plaintext. I figured this was a good chance to do some analysis and figure out exactly how the application carried out this functionality and possibly create a script to pull the password out of a camera.
The basic functionality of the application is as follows:
- Application sends out a UDP broadcast on port 5978
- Camera sees the broadcast on port 5978 and inspects the payload – if it sees that the initial part of the payload contains "FF FF FF FF FF FF" it responds (UDP broadcast port 5978) with an encoded payload with its own MAC address
- Application retrieves the camera's response and creates another UDP broadcast but this time it sets the payload to contain the target camera's MAC address, this encoded value contains the command to send over the password
- Camera sees the broadcast on port 5978 and checks that it is meant for it by inspecting the MAC address that has been specified in the payload, it responds with an encoded payload that contains its password (base64 encoded)
After spending some time with the application in a debugger I found what looked like it was responsible for the decoding of the encoded values that are passed:
super exciting screen shot. |
Translated into english: the application first uses a lookup table to translate every byte in the input string, to do this it uses the value of the current byte as an offset into the table. After it is done with "stage1" it traverses the translated input buffer a dword at a time and does some bit shifting and addition to fully decode the value. The following roughly shows the "stage2" routine:
(Dword[0] << 2) + (Dword[1] >> 4) = unencoded byte 1
(Dword[1] << 4) + (Dword[2] >> 2) = unencoded byte 2
(Dword[2] << 6) + Dword[3] = unencoded byte 3
I then confirmed that this routine worked on an "encoded" value that went over the wire from the application to the camera. After confirming the encoding scheme worked, I recreated the network transaction the application does with the camera to create a stand alone script that will retrieve the password from a camera that is on the same lan as the "attacker". The script can be found here, thanks to Jason Doyle for the original finding (@jasond0yle ).
Continue reading
- Hacking Tools Download
- Hacker Tools 2019
- Pentest Tools Linux
- World No 1 Hacker Software
- Pentest Tools For Windows
- Hacker Tools 2019
- Wifi Hacker Tools For Windows
- Hacking Tools Free Download
- Hack Tools
- Free Pentest Tools For Windows
- Hacker Tools Apk Download
- Tools 4 Hack
- Hacker Tools Github
- Pentest Tools Bluekeep
- Pentest Tools Kali Linux
- Hacking Tools Usb
- Hacker Tools For Mac
- Pentest Tools Find Subdomains
- Pentest Tools Review
- Hacker Tools Github
- Pentest Recon Tools
- Hacker Tools Online
- Pentest Tools
- How To Make Hacking Tools
- Hacking Tools For Mac
- Blackhat Hacker Tools
- Pentest Tools Android
- Hacker Tools Apk Download
- Pentest Tools Bluekeep
- Pentest Tools Github
- Hacking Tools For Windows
- Pentest Tools Online
- Pentest Tools Apk
- What Is Hacking Tools
- Hacking Tools Kit
- Pentest Reporting Tools
- Pentest Tools Free
- Pentest Tools Github
- Hacker Tools List
- Pentest Tools
- Install Pentest Tools Ubuntu
- Pentest Tools Website
- Hacker Tools Apk
- Best Pentesting Tools 2018
- Best Hacking Tools 2019
- Hacker Tools For Ios
- Easy Hack Tools
- What Are Hacking Tools
- Hacking Tools Name
- Pentest Tools Free
- Hack Tools 2019
- Hacking Tools For Windows
- Ethical Hacker Tools
- Pentest Reporting Tools
- Hacker Tools Hardware
- Growth Hacker Tools
- Hacker Tools Apk
- Hacker Tools Linux
- Pentest Tools Url Fuzzer
- Pentest Tools Linux
- Tools 4 Hack
- Hacking Tools 2019
- Hack Tools For Games
- Hacking Tools 2019
- Hacker Search Tools
- Pentest Tools List
- Pentest Tools Framework
- Hacker Tools 2020
- Blackhat Hacker Tools
- Pentest Tools Open Source
- Android Hack Tools Github
- Hacking Apps
- Hack Tool Apk No Root
- Pentest Tools Nmap
- Hacker Tools
- Hack Tool Apk
- Hacking Tools
- Hacker Tools For Windows
- Hacking Tools Windows 10
- Hacker
- Hack Tool Apk No Root
- Hacker Tools Windows
- Pentest Tools Website Vulnerability
- Hack Tools For Pc
- Pentest Tools Tcp Port Scanner
- New Hack Tools
- Hack Tools
- Beginner Hacker Tools
- Hacker Tools For Pc
- Usb Pentest Tools
- Tools For Hacker
- Pentest Tools
- Hack Tools For Games
- Hacking Tools For Windows 7
- Hacking Tools 2020
- Kik Hack Tools
- How To Install Pentest Tools In Ubuntu
- Top Pentest Tools
- Hacker Techniques Tools And Incident Handling
- Hacking Tools Name
- Pentest Tools Linux
- Wifi Hacker Tools For Windows
- Hacker Tools Github
- Pentest Tools Github
- Hacker Hardware Tools
- Usb Pentest Tools
- What Is Hacking Tools
- Best Pentesting Tools 2018
- How To Install Pentest Tools In Ubuntu
- Hack Tools
- Hacking Tools For Windows 7
- Pentest Tools For Mac
- Pentest Tools Online
- Pentest Tools Review
- Hack Tools Online
- Hacking Tools For Games
- Tools Used For Hacking
- Hacking Tools Kit
- Termux Hacking Tools 2019
- How To Hack
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home