Skip to content

SSL_connect #27

@steave-r0gers

Description

@steave-r0gers
  1. Connecting to TCP redirector (socat) or any another TCP port:
Control:
# socat TCP-LISTEN:2200,fork TCP:192.168.1.3:2200
2018/10/12 12:02:31 socat[17645] E connect(5, AF=2 192.168.1.3:2200, 16): Connection refused
where 192.168.1.3:2200 closed port
Target:
# ./revsh -vv 192.168.1.2 -k -r 5,10 -t 0
Connecting to 192.168.1.2:2200...	Connected!
init_io_target(): SSL_connect(8b62f50): Success
do_target(): init_io_connect(8b4f760): Success

  1. If connect to revsh server with different keys (control_key.pem target_key.pem target_cert.pem):
Target:
# ./revsh -vv 192.168.1.2 -k -r 5,10 -t 0
Connecting to 192.168.1.2:2200...	Connected!
negotiate_protocol(): io->remote_read(bfc2e1de, 2): Success
do_target(): negotiate_protocol(): Success
Control:
Listening on 0.0.0.0:2200...Listening on 0.0.0.0:2200...Listening on 0.0.0.0:2200...
  1. If revsh on server side in offline, trying connect from client:
# ./revsh -vv 192.168.1.2 -k -r 5,10 -t 0
Connecting to  192.168.1.2:2200...init_io_target(): BIO_do_connect(8540cb8): Connection refused
0:error:0200206F:system library:connect:Connection refused:crypto/bio/b_sock2.c:110:
0:error:2008A067:BIO routines:BIO_connect:connect error:crypto/bio/b_sock2.c:111:
0:error:0200206F:system library:connect:Connection refused:crypto/bio/bss_conn.c:173:hostname=192.168.1.2 service=2200
0:error:20073067:BIO routines:conn_state:connect error:crypto/bio/bss_conn.c:177:
Retrying in 7 seconds...
Connecting to 192.168.1.2:2200...init_io_target(): BIO_do_connect(853eb40): Connection refused
0:error:0200206F:system library:connect:Connection refused:crypto/bio/b_sock2.c:110:
0:error:2008A067:BIO routines:BIO_connect:connect error:crypto/bio/b_sock2.c:111:
0:error:0200206F:system library:connect:Connection refused:crypto/bio/bss_conn.c:173:hostname=192.168.1.2 service=2200
0:error:20073067:BIO routines:conn_state:connect error:crypto/bio/bss_conn.c:177:
Retrying in 5 seconds...
Connecting to 192.168.1.2:2200...init_io_target(): BIO_do_connect(8540c28): Connection refused
0:error:0200206F:system library:connect:Connection refused:crypto/bio/b_sock2.c:110:
0:error:2008A067:BIO routines:BIO_connect:connect error:crypto/bio/b_sock2.c:111:
0:error:0200206F:system library:connect:Connection refused:crypto/bio/bss_conn.c:173:hostname=192.168.1.2 service=2200
0:error:20073067:BIO routines:conn_state:connect error:crypto/bio/bss_conn.c:177:
Retrying in 6 seconds...

revsh info:
default config, no changes in source code
Debian wheezy x86

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions