firefart / stunner

Stunner is a tool to test and exploit STUN, TURN and TURN over TCP servers.
Other
765 stars 43 forks source link

Error 401: Unauthorized #29

Closed xi3w3n closed 1 year ago

xi3w3n commented 1 year ago

Hello, this appears to be the result of the 401 missing MessageIntegrity field during the linking process. Please help me find where the problem is, thank you! :

➜  stunner_0.5.3_Darwin_arm64 ./stunner socks -s 192.168.68.252:3478 -u user -p 12345622 -x -d
INFO[0000] starting SOCKS server on 127.0.0.1:1080
DEBU[0003] got connection from 127.0.0.1:65244
INFO[0003] Connecting to 127.0.0.1:443
DEBU[0003] opened turn tcp control connection from 192.168.137.148:65245 to 192.168.68.252:3478
DEBU[0003] Sending
Header:
    Message Type: Allocate(03) Request(00)
    Message Length: 0
    Message Transaction ID: 565142777a50734875764d76
Attributes
    REQUESTED-TRANSPORT: TCP
DEBU[0003] Received
Header:
    Message Type: Allocate(03) Error Response(03)
    Message Length: 140
    Message Transaction ID: 565142777a50734875764d76
Attributes
    ERROR-CODE: Error 401: Unauthorized (no MessageIntegrity) Padding: 2
    REALM: reTurn Padding: 2
    NONCE: 1687845833:a869a6a6f39de1c83fc8ecbb18f10fa4 Padding: 1
    SOFTWARE: reTURNServer 1.9.10 (RFC5389)
DEBU[0003] Sending
Header:
    Message Type: Allocate(03) Request(00)
    Message Length: 0
    Message Transaction ID: 436669596f65547051454572
Attributes
    REQUESTED-TRANSPORT: TCP
    USERNAME: user
    REALM: reTurn
    NONCE: 1687845833:a869a6a6f39de1c83fc8ecbb18f10fa4
DEBU[0004] Received
Header:
    Message Type: Allocate(03) Error Response(03)
    Message Length: 116
    Message Transaction ID: 436669596f65547051454572
Attributes
    ERROR-CODE: Error 401: Unauthorized
    REALM: reTurn Padding: 2
    NONCE: 1687845833:a869a6a6f39de1c83fc8ecbb18f10fa4 Padding: 1
    SOFTWARE: reTURNServer 1.9.10 (RFC5389)
ERRO[0004] socks error: error on allocate response: Error 401: Unauthorized
DEBU[0004] client connection closed
DEBU[0004] got connection from 127.0.0.1:65246
INFO[0004] Connecting to 127.0.0.1:443
DEBU[0004] opened turn tcp control connection from 192.168.137.148:65247 to 192.168.68.252:3478
DEBU[0004] Sending
Header:
    Message Type: Allocate(03) Request(00)
    Message Length: 0
    Message Transaction ID: 77486e7a6a5a765171485244
Attributes
    REQUESTED-TRANSPORT: TCP
DEBU[0004] Received
Header:
    Message Type: Allocate(03) Error Response(03)
    Message Length: 140
    Message Transaction ID: 77486e7a6a5a765171485244
Attributes
    ERROR-CODE: Error 401: Unauthorized (no MessageIntegrity) Padding: 2
    REALM: reTurn Padding: 2
    NONCE: 1687845833:a869a6a6f39de1c83fc8ecbb18f10fa4 Padding: 1
    SOFTWARE: reTURNServer 1.9.10 (RFC5389)
DEBU[0004] Sending
Header:
    Message Type: Allocate(03) Request(00)
    Message Length: 0
    Message Transaction ID: 49796953735a4e746d716678
Attributes
    REQUESTED-TRANSPORT: TCP
    USERNAME: user
    REALM: reTurn
    NONCE: 1687845833:a869a6a6f39de1c83fc8ecbb18f10fa4
DEBU[0004] Received
Header:
    Message Type: Allocate(03) Error Response(03)
    Message Length: 116
    Message Transaction ID: 49796953735a4e746d716678
Attributes
    ERROR-CODE: Error 401: Unauthorized
    REALM: reTurn Padding: 2
    NONCE: 1687845833:a869a6a6f39de1c83fc8ecbb18f10fa4 Padding: 1
    SOFTWARE: reTURNServer 1.9.10 (RFC5389)
ERRO[0004] socks error: error on allocate response: Error 401: Unauthorized
firefart commented 1 year ago

Hi, the first allocate request is always unauthorized. It looks to me that your credentials are wrong. Have you verified the username and password are correct?

xi3w3n commented 1 year ago

thankyou,maybe password is Wrong.