logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Hardware & Networking View previous topic :: View next topic
Reply to topic   Topic: "ncat --proxy option non-client-server connection issue
Author
h4x0r4fr33d0m



Joined: 14 Oct 2016
Posts: 6
Location: val-d-or

PostPosted: Tue 18 Oct '16 16:12    Post subject: "ncat --proxy option non-client-server connection issue Reply with quote

hi, iv tried NCat with client->server and everthing worked fine
that is,
what i sent from client to server (client->server) appeared on server
what i sent from server to client (server->client) appeared on client
<code>
server:nc -l -v 31338
client:nc -v grex.org 31338
</code>

then i tried using a proxy (with a 3rd shell) in between, but now connection between client AND server
(client<->server) is broken. that is
what i sent from client to server (client->server) DOES NOT appeared on server
what i sent from server to client (server->client) DOES NOT appeared on client
BUT proxy sees both adresses

NOTE: real IPs are replaced by {0.0.0.0 128.128.128.128 255.255.255.255}
client IP 128.128.128.128
server IP 255.255.255.255
proxy IP 0.0.0.0

i v tried both with/without --proxy-type option and for with --proxy-type iv tried putting "--proxy-type http"
before (b) AND after (c) --proxy option but got the same result;NOTHING

a) without
<code>
ncat -l -vvvvv 31336 # proxy
nc -l -vvvvv 31338 # server
ncat -vvvvv 255.255.255.255 -p 31338 --proxy 0.0.0.0:31336 # client
</code>

b) with before
<code>
ncat -l -vvvvv 31336 # proxy
nc -l -vvvvv 31338 # server
ncat -vvvvv 255.255.255.255 -p 31338 --proxy-type http --proxy 0.0.0.0:31336 # client
</code>

c) with after
<code>
ncat -l -vvvvv 31336 # proxy
nc -l -vvvvv 31338 # server
ncat -vvvvv 255.255.255.255 -p 31338 --proxy 0.0.0.0:31336 --proxy-type http # client
</code>

using -vvvvv option, verbose, on proxy i see

<code>
Ncat: Version 7.01 ( https://nmap.org/ncat )
NCAT DEBUG: Initialized fdlist with 103 maxfds
Ncat: Listening on :::31336
NCAT DEBUG: Added fd 3 to list, nfds 1, maxfd 3
Ncat: Listening on 0.0.0.0:31336
NCAT DEBUG: Added fd 4 to list, nfds 2, maxfd 4
NCAT DEBUG: Added fd 0 to list, nfds 3, maxfd 4
NCAT DEBUG: Initialized fdlist with 100 maxfds
NCAT DEBUG: selecting, fdmax 4
NCAT DEBUG: select returned 1 fds ready
NCAT DEBUG: fd 4 is ready
Ncat: Connection from 128.128.128.128.
NCAT DEBUG: Swapping fd[0] (3) with fd[2] (0)
NCAT DEBUG: Removed fd 3 from list, nfds 2, maxfd 4
NCAT DEBUG: Swapping fd[1] (4) with fd[1] (4)
NCAT DEBUG: Removed fd 4 from list, nfds 1, maxfd 0
Ncat: Connection from 128.128.128.128:31338.
NCAT DEBUG: Added fd 5 to list, nfds 2, maxfd 5
NCAT DEBUG: Added fd 5 to list, nfds 1, maxfd 5
NCAT DEBUG: selecting, fdmax 5
NCAT DEBUG: select returned 1 fds ready
NCAT DEBUG: fd 5 is ready
CONNECT 255.255.255.255:31337 HTTP/1.0

NCAT DEBUG: selecting, fdmax 5
NCAT DEBUG: select returned 1 fds ready
NCAT DEBUG: fd 5 is ready
NCAT DEBUG: Closing connection.
NCAT DEBUG: Swapping fd[1] (5) with fd[1] (5)
NCAT DEBUG: Removed fd 5 from list, nfds 1, maxfd 0
NCAT DEBUG: Swapping fd[0] (5) with fd[0] (5)
NCAT DEBUG: Removed fd 5 from list, nfds 0, maxfd -1
</code>

can someone put light on this, plz ?

thx
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7374
Location: Germany, Next to Hamburg

PostPosted: Wed 19 Oct '16 15:24    Post subject: Reply with quote

The listen ( ncat as a server) needs also to be attached to the proxy. However the proxy can be only a http server.

See https://nmap.org/ncat/guide/ncat-proxy.html
Back to top


Reply to topic   Topic: "ncat --proxy option non-client-server connection issue View previous topic :: View next topic
Post new topic   Forum Index -> Hardware & Networking