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:
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:
After spending some time documenting the functionality I came up with the following notes (messy wall of text):
Continue reading
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 ).
- Hacker Tools Online
- Hacking Tools And Software
- Free Pentest Tools For Windows
- Hacking Tools Name
- Pentest Box Tools Download
- Hack Tools Mac
- Underground Hacker Sites
- Hack And Tools
- Pentest Automation Tools
- Hacking Tools 2020
- Pentest Tools List
- Pentest Tools Framework
- Game Hacking
- Pentest Tools Website Vulnerability
- Tools For Hacker
- Hacker Tools Github
- Pentest Tools Apk
- How To Hack
- Hacker Tools For Ios
- Hacking Tools Usb
- Hack Tools Github
- Physical Pentest Tools
- Hacks And Tools
- Github Hacking Tools
- Pentest Tools For Android
- Hack Tools
- Hacks And Tools
- Pentest Tools For Windows
- Hacking Tools For Games
- Pentest Tools Android
- Pentest Box Tools Download
- Pentest Tools Nmap
- Pentest Automation Tools
- Hacker Hardware Tools
- Growth Hacker Tools
- Hackrf Tools
- Pentest Tools For Ubuntu
- Computer Hacker
- Pentest Tools Framework
- Pentest Tools Alternative
- Hacking Tools Pc
- Hacking Tools Download
- Beginner Hacker Tools
- Pentest Tools Bluekeep
- Hacker Hardware Tools
- Hack Tools For Ubuntu
- Hack App
- Free Pentest Tools For Windows
- Hack Tools Pc
- Usb Pentest Tools
- Hacking Tools 2019
- Hacker Tools For Windows
- Hack Tool Apk No Root
- How To Install Pentest Tools In Ubuntu
- Hacker Tools For Mac
- Hacker Techniques Tools And Incident Handling
- Pentest Tools Website Vulnerability
- Pentest Tools List
- New Hacker Tools
- Hack Rom Tools
Commentaires
Enregistrer un commentaire