summaryrefslogtreecommitdiff
path: root/CCTV-Hacking.mdwn
blob: d0c5f10b5d52bfb04141a664d4fd7d06dabd4e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
##Zusammenfassung

Wir experimentieren gerade im Rahmen eines Kunstprojektes mit Überwachungskameras herum. Das Ziel ist ein Interface für 8 Überwachungskameras zu schreiben, welches die Bilder aller Kameras anzeigt, und mit dem man die Kameras steuern kann.

Da es sich dabei um undokumentierte Hardware handelt, haben wir die Befehle, die die Kamera per Webinterface entgegennimmt mitgelesen.

## DHCP-Server installieren, z.B. udhcpd

Zunächst startet installiert man sich einen DHCP-Server, z.B. udhcpd

Das Standard-Config-File ist eigentlich ok. So in etwa sollte es aussehen:

[[!format c """
server          192.168.0.1
start           192.168.0.100
end             192.168.0.254
interface       enp0s25
option  subnet  255.255.255.0
option  router  192.168.0.1
option  dns     192.168.0.1
option  lease   259200
"""]]

## Wireshark starten

Nachdem der DHCP-Server läuft und die Kamera Strom hat, und mit dem Rechner verbunden worden ist, startet man wireshark und lauscht auf dem Interface.

Damit man nicht den ganzen Traffic durchwühlen muss, empfiehlt es sich als Filter 
*http.request.method* zu nehmen. Dann sieht man alle Requests, die in Richtung Kamera vom Webinterface aus gehen.

Anschliessend steuert man die IP der Kamera im Browser an (bei mir 192.168.0.117). Als Login funktioniert hoffentlich die Werkseinstellung (admin/123456).

Nun kann man im Webinterface rumklicken, und sieht in wireshark alle Requests.

## Die Kamera

Es handelt sich bei den benutzten Kameras um die *Conceptronic Wireless Pan & Tilt Network Camera*. Diese gibt es unter vielen anderen Bezeichnungen für wenig Geld im Elektronikladen des Vertrauens.

## Steuerbefehle

One Direction: 
[[!format c """
http://192.168.0.117/decoder_control.cgi?onestep=1&command=X
X = 0 --> down
X = 2 --> up
X = 4 --> clockwise
X = 6 --> counter-clockwise
"""]]

Two Directions: 
[[!format c """
http://192.168.0.117/decoder_control.cgi?command=X
X = 93 --> up AND counter-clockwise
X = 92 --> up AND clockwise
X = 91 --> down AND counter-clockwise
X = 90 --> down AND clockwise
"""]]

after the two directions commands is sent, a second request is sent 500ms later:
[[!format c """
http://192.168.0.117/decoder_control.cgi?command=1
"""]]

Streife:
[[!format c """
Horizontal:     http://192.168.0.117/decoder_control.cgi?command=28
Stop:           http://192.168.0.117/decoder_control.cgi?command=29
Vertikal:       http://192.168.0.117/decoder_control.cgi?command=26
Stop:           http://192.168.0.117/decoder_control.cgi?command=27
"""]]

Bildeinstellungen:
[[!format c """
Reversal:       http://192.168.0.117/camera_control.cgi?param=5&value=1
Non-Reversal:   http://192.168.0.117/camera_control.cgi?param=5&value=2
Mirror:         http://192.168.0.117/camera_control.cgi?param=5&value=3
Non-Mirror:     http://192.168.0.117/camera_control.cgi?param=5&value=0
"""]]

Snapshot:
[[!format c """
http://192.168.0.117/snapshot.cgi
"""]]

Refresh-Button:
[[!format c """
http://192.168.0.117/live.htm
http://192.168.0.117/videostream.cgi?rate=0
"""]]

Mode:
[[!format c """
50Hz:    http://192.168.0.117/camera_control.cgi?param=3&value=0
60Hz:    http://192.168.0.117/camera_control.cgi?param=3&value=1
outdoor: http://192.168.0.117/camera_control.cgi?param=3&value=2
"""]]

Size:
[[!format c """
160x120:        http://192.168.0.117/camera_control.cgi?param=0&value=2
320x240:        http://192.168.0.117/camera_control.cgi?param=0&value=8
640x480:        http://192.168.0.117/camera_control.cgi?param=0&value=32
"""]]

Rate:
[[!format c """
Full Speed:      http://192.168.0.117/videostream.cgi?rate=0
20  fps:         http://192.168.0.117/videostream.cgi?rate=1
15  fps:         http://192.168.0.117/videostream.cgi?rate=3
10  fps:         http://192.168.0.117/videostream.cgi?rate=6
 5  fps:         http://192.168.0.117/videostream.cgi?rate=11
 4  fps:         http://192.168.0.117/videostream.cgi?rate=12
 3  fps:         http://192.168.0.117/videostream.cgi?rate=13
 2  fps:         http://192.168.0.117/videostream.cgi?rate=14
 1  fps:         http://192.168.0.117/videostream.cgi?rate=15
.5  fps:         http://192.168.0.117/videostream.cgi?rate=17
.33 fps:         http://192.168.0.117/videostream.cgi?rate=19
.25 fps:         http://192.168.0.117/videostream.cgi?rate=21
.2  fps:         http://192.168.0.117/videostream.cgi?rate=23
"""]]


Brightness:
[[!format c """
http://192.168.0.117/camera_control.cgi?param=1&value=X
X = 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240
"""]]

Contrast:
[[!format c """
http://192.168.0.117/camera_control.cgi?param=2&value=X
X = 0, 1, 2, 3, 4, 5, 6
"""]]