Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtsp error for ipcams #1781

Closed
49handyman opened this issue Oct 11, 2019 · 3 comments
Assignees
Labels

Comments

@49handyman
Copy link

@49handyman 49handyman commented Oct 11, 2019

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

@49handyman

This comment has been minimized.

Copy link
Author

@49handyman 49handyman commented Oct 11, 2019

these are xm cams and can use it with or without default password if none is set

kc0bfv added a commit to kc0bfv/nmap that referenced this issue Oct 25, 2019
This seemed to fix bug nmap#1781 for me.  table.unpack on self.headers was returning "nil", and causing the error described in that bug.  This addition detects that state in a similar way as the code prior to the most recent commit to this file.  The most recent commit to this file seems to have introduced this bug.
@kc0bfv kc0bfv referenced this issue Oct 25, 2019
@kc0bfv

This comment has been minimized.

Copy link

@kc0bfv kc0bfv commented 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 nnposter self-assigned this Nov 6, 2019
@nnposter nnposter added bug NSE labels Nov 6, 2019
@nnposter

This comment has been minimized.

Copy link

@nnposter nnposter commented Nov 6, 2019

The issue has been hopefully rectified in r37751. Please report back if the error persists.

@nmap-bot nmap-bot closed this in 08a6d8d Nov 6, 2019
@nnposter nnposter added the duplicate label Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.