Commit Graph

46 Commits (9195479a6d89a66da024861c53021bdd174bae35)

Author SHA1 Message Date
HD Moore cb3a4afac5 Typo: request -> requested in message 2014-10-15 13:48:22 -05:00
HD Moore 7516512650 Raise an ArgumentError vs RuntimeError for backwards compatibility 2014-10-15 13:30:38 -05:00
HD Moore a762d871bf Autonegotiate SSL/TLS versions when not explicit 2014-10-15 13:26:40 -05:00
Joe Vennix 739c7b4ca2 More dead code and tweaks. 2013-11-20 14:44:53 -06:00
Joe Vennix e74e75fe6f Revert changes to legacy rescues. 2013-11-20 12:20:34 -06:00
Joe Vennix d51b92b06f Turns out & ~ does work.
Decided not to expose this as a datastore option for the Client,
but it can be used internally to toggle the compression.
2013-11-20 00:01:48 -06:00
Joe Vennix a8c55f23a7 Remove &~ bit-clearing method in favor of defaults.
For some reason the OP_ALL & ~OP_NO_COMPRESSION method doesnt work,
but it is late and the default is false anyways.
2013-11-19 23:42:58 -06:00
Joe Vennix 109fc5a834 Add SSLCompression datastore option.
Also disables the compression by default. TLS-level compression is almost
never used by browsers, and openssl seems to be the only one that enables
it by default.

This also kills some ruby < 1.9.3 code.
2013-11-19 22:34:39 -06:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
RageLtMan 5ac18e9156 commant update 2013-04-11 19:11:25 -04:00
RageLtMan 6eb33ae5ed Rex::Socket::SslTcp set cipher and verify_mode
Update Rex::Socket::SslTcp to accept verification mode string from
Rex::Socket::Parameters, which has been modified accordingly.
Add SSLVerifyMode and SSLCipher options (params and socket work
were done before, but the option was not exposed) to
Msf::Exploit::Tcp.

Testing:
```
>> sock = Rex::Socket::Tcp.create('PeerHost'=>'10.1.1.1','PeerPort'
=>443,'SSL' => true, 'SSLVerifyMode' => 'NONE')
>> sock.sslctx.verify_mode
=> 0
>> sock.close
=> nil
>> sock = Rex::Socket::Tcp.create('PeerHost'=>'10.1.1.1','PeerPort'
=>443,'SSL' => true, 'SSLVerifyMode' => 'PEER')
=> #<Socket:fd 13>
>> sock.sslctx.verify_mode
=> 1
```

Note: this should be able to resolve the recent SSL socket hackery
of exploit/linux/misc/nagios_nrpe_arguments.
2013-04-11 18:00:33 -04:00
David Maloney 8d2233bbdd first minor cleanup 2013-02-20 15:33:24 -06:00
David Maloney ebb0f166ca Accept propper formats for SSL version
we were only accepting sloppy string values and not accepting input of
the actual symbols that OpenSSL expects in the first place. Allow the
user to enter it right themselves to be compat with OpenSSL
2013-02-09 00:40:58 -06:00
David Maloney ebd03ccceb Allow user to set ssl cipher
Rex::Socket::Tcp now allows the user to specify a cipher or ciphers to
try and use for the ssl connection in addition to the version.
2013-02-06 16:57:47 -06:00
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
HD Moore 07df5f051f Woops. Get the right variable name
git-svn-id: file:///home/svn/framework3/trunk@13412 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-29 19:26:43 +00:00
HD Moore f57799943c Rework this patch to only enable non-blocking openssl on Windows, as this has also reproduced on BT5 with 1.9.2
git-svn-id: file:///home/svn/framework3/trunk@13411 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-29 19:10:20 +00:00
HD Moore ace9ca86a8 This commit abstracts the non-blocking SSL check so that it verifies existence of the non-blocking API and skips Mac OS X. This should fix some of the issues with meterpreter on MacOS X with Ruby 1.9.2
git-svn-id: file:///home/svn/framework3/trunk@13404 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-29 03:34:15 +00:00
HD Moore 1c86441f12 This removes the abortive_close code for stream sockets, it was leading to inconsistencies in how dead sessions were cleaned up
git-svn-id: file:///home/svn/framework3/trunk@12519 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-03 03:59:02 +00:00
HD Moore c668534105 This normalizes openssl non-blocking support across both 1.8.x/1.9.1 and 1.9.2+
git-svn-id: file:///home/svn/framework3/trunk@12509 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-02 17:25:26 +00:00
HD Moore eb78aac8dd Only try to catch the non-blocking exceptions if they are defined
git-svn-id: file:///home/svn/framework3/trunk@12508 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-02 16:30:45 +00:00
Tod Beardsley 140a304032 Specify IO::select for sleep directly.
git-svn-id: file:///home/svn/framework3/trunk@12483 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-30 17:56:38 +00:00
HD Moore 22537ffbde A few more tweaks to non-blocking ssl mode
git-svn-id: file:///home/svn/framework3/trunk@12482 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-30 10:24:52 +00:00
HD Moore 96ac0fd51a Swap out exceptions
git-svn-id: file:///home/svn/framework3/trunk@12481 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-30 08:47:32 +00:00
HD Moore 5758f2ab46 Add support for non-blocking OpenSSL sockets when the Ruby version supports them (1.9.2+ or with openssl-nonblock gem).
git-svn-id: file:///home/svn/framework3/trunk@12480 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-30 07:59:33 +00:00
Joshua Drake 5d3089c135 raise EOFError from SSL connections
git-svn-id: file:///home/svn/framework3/trunk@10375 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-19 21:20:06 +00:00
Stephen Fewer fd2469db24 Commit the Ruby end for TCP server channels, the modified TCP client channels and the support for pivoting a reverse_tcp meterpreter.
git-svn-id: file:///home/svn/framework3/trunk@8384 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-06 17:59:25 +00:00
HD Moore 7935656355 Fixes #708. Enforces a timeout around SSL's connect()
git-svn-id: file:///home/svn/framework3/trunk@7938 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-21 22:48:40 +00:00
HD Moore 5e137e92fd Fixes #381. To scan for TLSv1 only services, set SSLVersion TLS1
git-svn-id: file:///home/svn/framework3/trunk@7282 4d416f70-5f16-0410-b530-b9f4589650da
2009-10-26 19:48:15 +00:00
HD Moore 71c5175a85 This patch introduces a really basic RPC service. It is still a long way from its final version
git-svn-id: file:///home/svn/framework3/trunk@5991 4d416f70-5f16-0410-b530-b9f4589650da
2008-12-02 22:09:34 +00:00
HD Moore 616491a552 Play nice with ruby implementations without readline and openssl
git-svn-id: file:///home/svn/framework3/trunk@5895 4d416f70-5f16-0410-b530-b9f4589650da
2008-11-12 22:47:21 +00:00
HD Moore e9b3919ace Normalize exceptions across socket libraries
git-svn-id: file:///home/svn/framework3/trunk@5879 4d416f70-5f16-0410-b530-b9f4589650da
2008-11-11 05:11:40 +00:00
Ramon de C Valle f124597a56 Code cleanups
git-svn-id: file:///home/svn/framework3/trunk@5773 4d416f70-5f16-0410-b530-b9f4589650da
2008-10-19 21:03:39 +00:00
HD Moore 947dad1f45 Expose the sslctx to the caller
git-svn-id: file:///home/svn/framework3/trunk@5639 4d416f70-5f16-0410-b530-b9f4589650da
2008-08-23 05:12:43 +00:00
HD Moore 65cfd287e5 Improvements to the SSL socket support in Rex, fixes #102, and a HTTP client response parsing bug
git-svn-id: file:///home/svn/framework3/trunk@4851 4d416f70-5f16-0410-b530-b9f4589650da
2007-05-03 20:01:29 +00:00
HD Moore b4ad4a5d75 Tabs vs Spaces
git-svn-id: file:///home/svn/incoming/trunk@3453 4d416f70-5f16-0410-b530-b9f4589650da
2006-01-27 05:33:08 +00:00
bmc 6927b64028 * comment out sync on close for the SSL connection, since it was causing an infinite recursion when calling close
git-svn-id: file:///home/svn/incoming/trunk@3412 4d416f70-5f16-0410-b530-b9f4589650da
2006-01-20 19:04:17 +00:00
HD Moore 557153e01c Code from Brian Caswell
git-svn-id: file:///home/svn/incoming/trunk@3210 4d416f70-5f16-0410-b530-b9f4589650da
2005-12-13 06:08:40 +00:00
Matt Miller 95f8210853 major doc update
git-svn-id: file:///home/svn/incoming/trunk@3029 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-15 05:22:13 +00:00
Matt Miller da05fa0415 somewhat gracefully handle missing ossl, fix missing method
git-svn-id: file:///home/svn/incoming/trunk@3014 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-03 04:43:19 +00:00
Matt Miller 6a5870ddcd updated comments to be more uniformed in class definition
git-svn-id: file:///home/svn/incoming/trunk@3004 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-02 16:49:45 +00:00
Matt Miller 550080bcfb refactored socket api a bit, expect bugs
git-svn-id: file:///home/svn/incoming/trunk@2915 4d416f70-5f16-0410-b530-b9f4589650da
2005-09-27 05:31:48 +00:00
Matt Miller 5ee93e6be6 added threadsafe wrapper foo
git-svn-id: file:///home/svn/incoming/trunk@2771 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-17 00:52:47 +00:00
Spoon M 7bbae355d6 mass require moving of /lib
git-svn-id: file:///home/svn/incoming/trunk@2690 4d416f70-5f16-0410-b530-b9f4589650da
2005-07-09 21:18:49 +00:00
Matt Miller 04a9cbd7ad moved
git-svn-id: file:///home/svn/incoming/trunk@2575 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-05 04:37:48 +00:00
Matt Miller f76e7d307d SSL class
git-svn-id: file:///home/svn/incoming/trunk@2551 4d416f70-5f16-0410-b530-b9f4589650da
2005-06-03 22:51:09 +00:00