Repository navigation
Description
NSE: rtsp-url-brute against 192.168.1.12:554 threw an error!
C:\Program Files (x86)\Nmap/nselib/rtsp.lua:87: invalid value (nil) at index 3 in table for 'concat'
stack traceback:
[C]: in function 'table.concat'
C:\Program Files (x86)\Nmap/nselib/rtsp.lua:87: in function <C:\Program Files (x86)\Nmap/nselib/rtsp.lua:77>
[C]: in function 'tostring'
C:\Program Files (x86)\Nmap/nselib/rtsp.lua:208: in function <C:\Program Files (x86)\Nmap/nselib/rtsp.lua:200>
(...tail calls...)
C:\Program Files (x86)\Nmap/scripts\rtsp-url-brute.nse:84: in upvalue 'fetch_url'
C:\Program Files (x86)\Nmap/scripts\rtsp-url-brute.nse:142: in function <C:\Program Files (x86)\Nmap/scripts\rtsp-url-brute.nse:116>
(...tail calls...)
Here is Wireshark capture from vlc
OPTIONS rtsp://192.168.1.14:554/user=admin_password=_channel=1_stream=0.sdp RTSP/1.0
CSeq: 2
User-Agent: LibVLC/3.0.8 (LIVE555 Streaming Media v2016.11.28)
RTSP/1.0 200 OK
Server: H264DVR 1.0
Cseq: 2
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, GET_PARAMETER, SET_PARAMETER, PLAY, PAUSE
DESCRIBE rtsp://192.168.1.14:554/user=admin_password=_channel=1_stream=0.sdp RTSP/1.0
CSeq: 3
User-Agent: LibVLC/3.0.8 (LIVE555 Streaming Media v2016.11.28)
Accept: application/sdp
RTSP/1.0 200 OK
Content-Type: application/sdp
Server: H264DVR 1.0
Cseq: 3
Content-Base: rtsp://192.168.1.14:554/user=admin_password=_channel=1_stream=0.sdp
Cache-Control: private
x-Accept-Retransmit: our-retransmit
x-Accept-Dynamic-Rate: 1
Content-Length: 429
v=0
o=- 38990265062388 38990265062388 IN IP4 192.168.1.14
s=RTSP Session
c=IN IP4 192.168.1.14
t=0 0
a=control:*
a=range:npt=0-
m=video 0 RTP/AVP 98
a=rtpmap:98 H265/90000
a=range:npt=0-
a=framerate:0S
a=fmtp:98 profile-id=010101;sprop-pps=RAHA8vA8kA==;sprop-sps=QgEBAWAAAAMAsAAAAwAAAwBdoAKAgC0WNrkky9NwEBAQCA==;sprop-vps=QAEMAf//AWAAAAMAsAAAAwAAAwBdrAk=;sprop-sei=TgHlBM0eAACA;
a=framerate:25
a=control:trackID=3
SETUP rtsp://192.168.1.14:554/user=admin_password=_channel=1_stream=0.sdp/trackID=3 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/3.0.8 (LIVE555 Streaming Media v2016.11.28)
Transport: RTP/AVP;unicast;client_port=58558-58559
RTSP/1.0 200 OK
Server: H264DVR 1.0
Cseq: 4
Session: 27804510;timeout=60
Transport: RTP/AVP;unicast;mode=PLAY;source=192.168.1.14;client_port=58558-58559;server_port=40000-40001;ssrc=00001BCC
Cache-Control: private
x-Dynamic-Rate: 1
PLAY rtsp://192.168.1.14:554/user=admin_password=_channel=1_stream=0.sdp RTSP/1.0
CSeq: 5
User-Agent: LibVLC/3.0.8 (LIVE555 Streaming Media v2016.11.28)
Session: 27804510
Range: npt=0.000-
RTSP/1.0 200 OK
Server: H264DVR 1.0
Cseq: 5
Range: npt=now-
Session: 27804510
TEARDOWN rtsp://192.168.1.14:554/user=admin_password=_channel=1_stream=0.sdp RTSP/1.0
CSeq: 6
User-Agent: LibVLC/3.0.8 (LIVE555 Streaming Media v2016.11.28)
Session: 27804510
Activity
49handyman commentedon Oct 11, 2019
these are xm cams and can use it with or without default password if none is set
Fix bug 1781
kc0bfv commentedon Oct 25, 2019
I think I had the same issue as you, and decided to try to fix it. Mine seems to work after making the change referenced in my pull request.
nnposter commentedon Nov 6, 2019
The issue has been hopefully rectified in r37751. Please report back if the error persists.
l4jos commentedon Jan 11, 2020
Issue appears.
I run nmap --script-updatedb and nmap version is 7.80
nnposter commentedon Jan 11, 2020
Please double-check that your version of
nselib/rtsp.luais newer than November 6.From the man page:
The key point here is that the option rebuilds file
scripts/script.db, which is a script reference table. It does not update the scripts.l4jos commentedon Jan 12, 2020
wget new version, doing it's job now
victorassisr commentedon Aug 30, 2020
Hello! If you still have this problem, to me works doing it...
Go to: nselib/rstp.lua
Edit this file in line 81 changing the variable local req to this:
local req = {
("%s %s RTSP/1.0"):format(self.method, self.url),
("CSeq: %d"):format(self.cseq),
table.unpack(self.headers)
}
Save the file, if you dont have permission, make it to save in same place with the same name of file.
After saves, run again the command:
nmap --script rtsp-url-brute -p 554 < ip >
Maybe works to you.. =)
Fix for two RTSP request assembly defects introduced in r37474: