Commit Graph

8 Commits

Author SHA1 Message Date
Clément Notin 91ea692cbe socket_server.rb: better describe "0.0.0.0"
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-13 16:30:00 +02:00
Clément Notin ec33651243 socket_server.rb: SRVHOST can be an interface
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-13 16:14:20 +02:00
Clément Notin c42db7959b Use OptAddressLocal for SRVHOST to specify by interface name instead of IP 2020-05-06 19:51:13 +02:00
Auxilus 26b2ec3d84 remove spaces at EOL 2020-03-24 18:08:34 +05:30
Spencer McIntyre 1f3cfc9498 Print the listening host information 2018-04-20 16:02:33 -04:00
Spencer McIntyre 2610757f27 Include the StreamServer interface for pivoting 2018-04-20 15:10:53 -04:00
RageLtMan 2679c26e88 Create and implement Rex::IO::GramServer mixin
Rex::IO::StreamServer provides consistent methods and accessors
for TcpServer type consumers, but includes logic for client actions
which are not relevant in a datagram context - connect and
disconnect actions, as well as any notion of stateful session
persistence (the clients queue) do not apply in this paradigm.

Implement a Rex::IO::GramServer mixin which provides common methods
for dispatching requests and sending responses. Defines the same
callback structure for procs as used in the StreamServer, though
utilizing dispatch_request_proc and send_response_proc with client
and data parameters for efficient interception of execution flow
when dealing with stateless comms.

Rewire Rex::Proto::DNS server to use instance variables along the
same convention as other modules, implement the GramServer mixin,
and minor misc cleanup.

-----

Change calling conventions in Rex::Proto::DNS::Server to match
other components.

Clean up the Msf::Exploit::DNS namespace with generic server
interfaces.

Fix the advanged options naming convention - as hdm pointed out,
evasion options use the '::' separator, advanced options use "_".

-----

Testing:
  Basic functional tests in Pry for now.
2017-06-23 19:58:37 -04:00
RageLtMan 8f9d98775b Export common socket functionality from TcpServer
Exploit::Remote::TcpServer contains functionality required by the
hybrid Udp/Tcp Exploit::Remote::DNS::Server. In order to avoid
having to maintain a set of compatible methods across the transport
implementations, create a new mixin "above" the TcpServer to handle
common socket operations - Exploit::Remote::SocketServer.

Copy Exploit::Remote::TcpServer to Exploit::Remote::SocketServer.
Remove common code from Exploit::Remote::TcpServer, remove TCP/SSL
specific code from Exploit::Remote::SocketServer. Require and
include Exploit::Remote::SocketServer in Exploit::Remote::TcpServer

Testing:
  Basic testing using the telnet capture server which utilzies the
modified Exploit::Remote::TcpServer mixin:

```
use auxiliary/server/capture/telnet
(2016-02-28)15:23 (S:0 J:0)msf  auxiliary(telnet) > exploit
[*] Auxiliary module execution completed
(2016-02-28)15:23 (S:0 J:1)msf  auxiliary(telnet) >
[*] [2016.02.28-15:23:39] Listening on 0.0.0.0:23...
[*] [2016.02.28-15:23:39] Server started.
[*] [2016.02.28-15:23:48] TELNET LOGIN 127.0.0.1:60408 jack / jill
Interrupt: use the 'exit' command to quit
```
2017-06-23 19:58:37 -04:00