Commit Graph

13855 Commits (17c8f7c4c769273ec30e72f99f9357e9f812821e)

Author SHA1 Message Date
Metasploit ee2f10efc5
Bump version of framework to 4.16.26 2017-12-21 10:04:38 -08:00
Jon Hart becc05b4f1
Cleaner client_id handling 2017-12-21 06:57:33 -08:00
Jon Hart 157d973194
Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 19:13:34 -08:00
Jon Hart 82bdce683b
Remove to_s 2017-12-20 19:13:12 -08:00
Jon Hart adca42f311
Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 19:11:52 -08:00
Jon Hart b78f1105f7
Add missing port 2017-12-20 19:11:33 -08:00
Jon Hart bedc276225
Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 19:09:51 -08:00
Jon Hart ddb2566f3b
Remove duplicate options, set less suspicious client_id 2017-12-20 19:09:35 -08:00
Jon Hart 962bc71d10
Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 18:58:36 -08:00
Jon Hart cf21d13b2e
Resolve conflict 2017-12-20 18:58:16 -08:00
William Vu 1975713a92
Land #9333, get_cookies_parsed using CGI::Cookie 2017-12-20 20:08:33 -06:00
Jon Hart d0b3abc14b
Better handling of MQTT endpoints which don't require authentication
Arguably this is working around LoginScanner's inability to provide
blank usernames AND passwords
2017-12-20 18:02:52 -08:00
Jon Hart 2e62d77e36
Add new method for fetching parsed cookies from an HTTP response
This fixed #9332.
2017-12-20 16:19:44 -08:00
Brent Cook 3b78302868
Land #9327, restore transport enum used in TLVs 2017-12-20 16:11:04 -06:00
Brent Cook 5fe9dba4dd
Land #9296, add iOS meterpreter support 2017-12-20 16:09:41 -06:00
Jon Hart 7723933fa9
Merge branch 'feature/mqtt' into feature/mqtt-login 2017-12-20 13:42:16 -08:00
Jon Hart 741d08f604
Style cleanup 2017-12-20 13:33:47 -08:00
Jeffrey Martin 8cd7185a7f
Land #9313, Add DirectAdmin login_scanner module 2017-12-20 15:23:24 -06:00
Jeffrey Martin 7f8a5d3834
improved credential reporting 2017-12-20 15:09:11 -06:00
Jon Hart ac1daaf10e
Fix rubocop warning 2017-12-20 12:41:44 -08:00
Jon Hart b4262662dc
Add missing mqtt login helper 2017-12-20 12:33:49 -08:00
Jon Hart f15309bc48
Add basic framework for interacting with MQTT 2017-12-20 12:28:02 -08:00
Jeffrey Martin 9719ede3f0
restore transport enum used in TLVs 2017-12-20 13:12:24 -06:00
Matthew Kienow 31042d4171
Land #9324, AutoRunScript with resource scripts 2017-12-20 13:52:53 -05:00
Brent Cook 210f137b7b Merge branch 'upstream-master' into land-9296- 2017-12-20 12:07:53 -06:00
Brent Cook 3339c3b74d remove magic, because it causes complications with complex RC scripts 2017-12-20 11:49:42 -06:00
Brent Cook 0c867d92fd fix incorrect regex 2017-12-20 11:46:14 -06:00
Brent Cook 32c486023c
Land #9308, Ensure tab completion in HWBridge sessions works 2017-12-20 11:29:11 -06:00
Brent Cook 64d346f2e8
Land #9326, fix clipboard typo 2017-12-20 11:17:32 -06:00
Puru bfa0cad8a5
Fix clipboard typo 2017-12-20 20:49:36 +05:45
Brent Cook 2629ec6bdb infer whether the user supplied a Meterpreter or resource script 2017-12-20 06:43:20 -06:00
Brent Cook 5ecc45a0d1 nicely handle exceptions when processing scripts, tell the user about them
Let's help the user by saying what's going on.
2017-12-20 06:42:50 -06:00
Brent Cook 05c6079e0d remove unused 'active_resource' accessor 2017-12-20 06:15:09 -06:00
Tim 15da7c699d Fix #7779, fix multi/meterpreter/reverse_http with web_delivery 2017-12-20 16:32:07 +08:00
Brent Cook 6b216f2a20
Land #9290, Fix OverrideLHOST/LPORT with http/s Meterpreter payloads 2017-12-20 00:26:06 -06:00
Jeffrey Martin fe4c701016 Merge released '4.x' 2017-12-19 14:14:22 -06:00
Metasploit 66b1a555a1
Bump version of framework to 4.16.25 2017-12-18 16:33:25 -08:00
Tod Beardsley 72d3592b9c
New requires for Cambium mixins 2017-12-18 16:38:18 -06:00
Tod Beardsley 27a324237b
Initial commit for Cambium issues from @juushya
Note, these will trigger a bunch of WARNING msftidy messages for setting
cookies directly. This is on purpose.
2017-12-18 16:32:55 -06:00
Nick Marcoccio be2a3ca270 edited sid comment 2017-12-18 08:18:02 -05:00
Nick Marcoccio f447fa1a12 Added DirectAdmin Login Utillity 2017-12-17 22:43:37 -05:00
Brent Cook 90b97d6581 Merge branch 'upstream-master' into land-9151- 2017-12-15 14:15:14 -06:00
Pearce Barry 084dc4470d
Ensure tab completion in HWBridge sessions works as expected. 2017-12-15 12:19:26 -06:00
William Vu 0a1eea9860 Allow local_editor in cmd_edit to take arguments
Such as vim -i NONE. This may allow command injection via arguments.
However, you can already start an arbitrary program by setting
LocalEditor or escaping the editor.

msf > setg LocalEditor /bin/sh
LocalEditor => /bin/sh
msf > edit -i
[*] Launching /bin/sh -i
$
2017-12-14 19:51:57 -06:00
William Webb 234ef5627e
Land #9299, Add arch to MS17-010 detection 2017-12-14 12:20:56 -08:00
jgor b99f044de5 Implement VNC security type 30 (Apple Remote Desktop) authentication 2017-12-14 13:57:38 -06:00
Metasploit be4f9236f2
Bump version of framework to 4.16.24 2017-12-14 10:08:05 -08:00
bwatters-r7 9ea7747a5c
Land #9233, Fix #9232 corruption of non-latin characters in W methods
Merge branch 'land-9233' into upstream-master
2017-12-14 11:54:36 -06:00
William Vu 8e4b007edc Move verify_arch to dcerpc_getarch
We can use this code elsewhere, such as the MS17-010 scanner.
2017-12-14 02:08:25 -06:00
Tim c4e20e01e3 iOS meterpreter 2017-12-12 23:23:21 +08:00
Brent Cook f7dfba6bae deduplicate code from python meterpreter 2017-12-12 03:12:36 -06:00
Brent Cook b7c231bb93 further normalize transport config 2017-12-12 03:12:36 -06:00
Brent Cook bb5ea540ab fix a number of TODO's in the HTTP handler, remove duplication in handlers 2017-12-12 03:12:36 -06:00
Brent Cook 528a423fc0 fix python override scheme 2017-12-12 03:12:36 -06:00
Brent Cook f49006222c remove unneeded uri 2017-12-12 03:12:36 -06:00
Brent Cook 8e76c4cb4f handle override at the meterpreter config layer 2017-12-12 03:12:36 -06:00
Brent Cook 636b93b026 minor simplification 2017-12-12 03:12:36 -06:00
Brent Cook 017374be71 pass lhost/lport back into generate_stage with reverse_http/s 2017-12-12 03:12:36 -06:00
Brent Cook 1653e31f71 Merge branch 'upstream-master' into land-9126- 2017-12-11 03:57:00 -06:00
Metasploit 348cbe54b6
Bump version of framework to 4.16.23 2017-12-08 10:01:55 -08:00
Pearce Barry 7aef0f249e
Per MS-2916, load Mettle extensions via new API. 2017-12-07 20:40:22 -06:00
William Vu 2565ad6a27 Handle IPv6 addresses in full_uri (add brackets) 2017-12-07 12:56:55 -06:00
Brent Cook c15f379343 remove some unneeded backward-compat code 2017-12-04 22:27:21 -06:00
William Vu 19b37c7070
Land #9263, drb_remote_codeexec fixes
See pull requests #7531 and #7749 for hysterical raisins.
2017-12-04 18:45:03 -06:00
Metasploit fd1681edd9
Bump version of framework to 4.16.22 2017-12-01 10:04:07 -08:00
Brent Cook 09dd5b8489 fix check command to not require an rport _method_ 2017-11-30 10:51:21 -06:00
Brent Cook c848379ecb simply use refname in the prompt? 2017-11-29 20:52:14 -06:00
Brent Cook e5a5d35ad8 add 'promptname' that expands the module path a bit more
This allows the user to actually see the module context.
2017-11-29 19:49:43 -06:00
Brent Cook 55f56a5350
Land #9110, added -C option to change default hosts columns 2017-11-29 17:48:44 -06:00
Brent Cook 0aeb245c9c
Land #9252, docker improvements 2017-11-29 17:15:47 -06:00
bwatters-r7 e8965767a0
Land 9207, Expose more uuid attributes 2017-11-29 16:25:05 -06:00
Metasploit 174d0d46de
Bump version of framework to 4.16.21 2017-11-29 10:45:55 -08:00
Brent Cook 70ec576d52 use correct session variable 2017-11-29 11:53:56 -06:00
Brent Cook ec2b5d48a6 add missing payload uuid accessors 2017-11-29 11:49:41 -06:00
Brent Cook 446f3fa675 more conversions 2017-11-29 11:49:41 -06:00
Brent Cook 59446f3d96 change ui to use new settings 2017-11-29 11:49:41 -06:00
Brent Cook 8051f790d0 if there is info in the uuid_db, put it in payload_uuid automatically 2017-11-29 11:49:41 -06:00
Jeffrey Martin e73ba0b3ca
Merge released '4.x' into master 2017-11-29 10:27:42 -06:00
Adam Cammack 3fff092042
Fix include scope in external module mixin
The auxiliary report mixin overrides some of the methods in
Metasploit::Credential, which is fine in framework, but causes issues in
projects relying on the base behavior of Metasploit::Credential. This
changes the include scope from global to just whatever includes the
external module mixin.
2017-11-28 21:41:52 -06:00
William Vu f132c1572f
Fix #9194, clarified error for reloading modules 2017-11-28 17:15:56 -06:00
William Vu 7b3bf85d03 Print the generated command stager for debugging 2017-11-28 16:00:28 -06:00
Christian Mehlmauer 50351320d7
more docker work 2017-11-28 21:35:20 +01:00
William Vu 65412cd2f1
Land #9201, enhanced tab completion 2017-11-27 11:37:04 -06:00
Brent Cook 2c6cfabbc3
Land #8948, allow configuring payload HTTP headers for domain fronting 2017-11-25 10:08:22 -06:00
Brent Cook 8645a518b3 add mettle support for custom headers 2017-11-24 20:27:34 -06:00
Metasploit c9da8f7a18
Bump version of framework to 4.16.20 2017-11-24 10:01:50 -08:00
Tim W ce9d2aff2b more osx hacks 2017-11-22 17:25:49 +08:00
Tim W 0f2bfb70c0 hacky fix for osx 2017-11-22 13:07:42 +08:00
scriptjunkie 9a81cc70dd Fix corruption of non-latin characters in W methods 2017-11-21 20:58:38 -06:00
Brent Cook 81c6823b72 handle interrupt and unknown exceptions properly with external modules 2017-11-21 17:50:53 -06:00
Adam Cammack 19844fb6ed
Land #9227, Add slowloris denial of service 2017-11-21 15:42:39 -06:00
Tim 92190403cc use full target_path 2017-11-22 05:42:01 +08:00
Matthew Kienow b6c81e6da0
Reimplement slowloris as external module 2017-11-21 16:21:01 -05:00
OJ fea28a89a5 Fix TLV defs for http headers 2017-11-21 13:47:19 -06:00
Brent Cook ea37196614 use cooler names c/o @timwr, make options easier to grep 2017-11-21 13:47:19 -06:00
Brent Cook 85acbadf01 more DRYing 2017-11-21 13:47:19 -06:00
Brent Cook 37ab771ca9 uri is not always defined, fix python stager generation 2017-11-21 13:47:19 -06:00
Brent Cook 2076db2d61 DRY up common stager and payload http and retry options 2017-11-21 13:47:19 -06:00
Brent Cook 1fd7f7c8bc prefix MeterpreterUserAgent and PayloadProxy* with Http for consistency,
this also adds aliases where needed
2017-11-21 13:47:19 -06:00
Tim a5af21fa1a add http headers to Android/Java 2017-11-21 13:47:19 -06:00
OJ ac79cc9f78 Fix up header string generation in transports 2017-11-21 13:47:18 -06:00
OJ f6e9b12b43 Make sure stageless is supported 2017-11-21 13:47:18 -06:00
OJ 656babe9f4 Custom host header support in python meterp 2017-11-21 13:47:18 -06:00
OJ a78d8f83fc Add HTTP header support for Host/Cookie/Referer
This is to start the support for things like domain fronting.
2017-11-21 13:47:18 -06:00
Brent Cook a4e199a6dd
Land #9000, enhance module option registration 2017-11-21 12:09:21 -06:00
Brent Cook c5cc013819 auto-detect SSL supported options 2017-11-21 08:30:42 -06:00
Brent Cook 967b459ff1 restore default enum is first value behavior 2017-11-21 08:30:42 -06:00
Brent Cook 6615c6efc7 tighten up corner cases with option validation 2017-11-21 08:30:42 -06:00
Brent Cook 6da66e885a fix enum default logic for bools that default to false 2017-11-21 08:30:42 -06:00
Brent Cook d811a2a8c1 set good defaults 2017-11-21 02:52:05 -06:00
Brent Cook 65c58c3d55 set a good default, remove unused methods, speed up checks 2017-11-21 02:52:05 -06:00
Brent Cook ffa6d74a23 remove historical cruft 2017-11-21 02:52:05 -06:00
Brent Cook d3ee86dc5c update to new format 2017-11-21 02:52:05 -06:00
Brent Cook 249c08f597 usability improvements ith how base options are registered
This adds named parameters for all of the current array-index based
options. It also allows specifying the description as the 2nd parameter,
allowing the 'required' parameter to be implicitly false (the most
common value).

A simple parameter like:

 OptAddress.new('ReverseListenerBindAddress',
   [false, 'The specific IP address to bind to on the local system']),

Can now be rewritten as:

 OptAddress.new('ReverseListenerBindAddress',
   'The specific IP address to bind to on the local system'),

More complex options are also now easier to read:

 OptString.new(
   'HttpUserAgent',
   'The user-agent that the payload should use',
   default: Rex::UserAgent.shortest,
   aliases: ['MeterpreterUserAgent']
 ),

This also makes dealing with enums easier because default is implicit
unless specified. This:

  OptEnum.new('PayloadProxyType',
    [true, 'The proxy type, HTTP or SOCKS', 'HTTP', ['HTTP', 'SOCKS']]),

Becomes:

  OptEnum.new('HttpProxyType',
    'The proxy type, HTTP or SOCKS', required: true, enums: ['HTTP', 'SOCKS'])

This maintains full backward compatibility with existing code as well.
2017-11-21 02:52:05 -06:00
Adam Cammack 40a71af7ed
Add missing `end` 2017-11-20 17:50:59 -06:00
Adam Cammack 2fdc34c8fd
Add new template for DoS modules 2017-11-20 17:19:14 -06:00
Adam Cammack dd57138423
Make external module read loop more robust
Changes from a "hope we get at most one message at a time" model to
something beginning to resemble a state machine. Also logs error output
and fails the MSF module when the external module fails.
2017-11-20 16:52:05 -06:00
Matthew Kienow 39f06a3995
Land #8807, template for external module servers 2017-11-20 17:34:37 -05:00
christopher lee 238aecf81c Integrated first round of feedback 2017-11-20 10:45:39 -06:00
christopher lee 621130d74b Added missing requires 2017-11-17 13:06:05 -06:00
christopher lee a16cd5aade Clean up metadata store logic 2017-11-17 12:42:19 -06:00
Metasploit 602406a423
Bump version of framework to 4.16.19 2017-11-17 10:02:22 -08:00
christopher lee 0e642bd9cd Remove puts and fix bug 2017-11-16 12:59:14 -06:00
christopher lee e89eb6e8b6 Fix first time startup timing bug 2017-11-16 12:50:31 -06:00
Metasploit 5cdd364590
Bump version of framework to 4.16.18 2017-11-15 19:46:12 -08:00
christopher lee fe1af35107 First pass at changes needed for module metadata caching 2017-11-15 16:38:01 -06:00
Adam Cammack f357efd97c
Land #9208, add AArch64 ELF to Msf::Util::Exe 2017-11-15 14:22:27 -06:00
Tim 4ec0faf35d fix aarch64 cmdstager 2017-11-15 16:47:17 +08:00
Jeffrey Martin 80b381cde9
Merge released '4.x' into master 2017-11-13 14:11:23 -06:00
Spencer McIntyre bc691cbd00 Document the new tab completion functions 2017-11-11 17:17:48 -05:00
Spencer McIntyre fb7635502d Tab completion for exploit and handler commands 2017-11-11 17:11:54 -05:00
Spencer McIntyre 68a43fef36 Add the new generic tab completion functoin 2017-11-11 16:47:11 -05:00
Metasploit 4f660d7dd7
Bump version of framework to 4.16.17 2017-11-10 10:05:05 -08:00
William Vu 97859ebf8c Clarify XXX comment no user will ever see anyway 2017-11-09 15:23:37 -06:00
William Vu 577baf6070 Add a check for .rb in cmd_edit 2017-11-09 15:17:53 -06:00
Patrick Webster 2f6da89674 Change author name to nick. 2017-11-09 03:00:24 +11:00
William Vu fbbc8da8fb Fix raise(s) in MSSQL client aborting mssql_login 2017-11-07 14:30:47 -06:00
christopher lee 43ddc66350 Initial fix for non db cache 2017-11-07 10:33:47 -06:00
Metasploit deb5a7b015
Bump version of framework to 4.16.16 2017-11-03 10:03:38 -07:00
h00die 697031eb36 mysql UDF now multi 2017-11-03 05:26:05 -04:00
Metasploit a14102083c
Bump version of framework to 4.16.15 2017-11-02 10:01:12 -07:00
bwatters-r7 c2a979dd3c
Land #9134, fix buggy handling of partial ingress packet data 2017-11-01 20:06:23 -05:00
Spencer McIntyre d815e42ccf Add a generic tab completion function 2017-11-01 20:38:45 -04:00
William Vu 5de190f092
Land #9145, ERB/<ruby> for Meterpreter resource 2017-11-01 13:48:51 -05:00
Brent Cook a347dee372
Land #9150, fix broken and simplify unusual RuntimeError exceptions 2017-11-01 06:03:36 -05:00
Brent Cook 90766ceceb remove more unusual raise RuntimeError patterns 2017-11-01 05:59:12 -05:00
Spencer McIntyre 1462330f34 Add tab completion to the payload generate command 2017-10-31 20:33:31 -04:00
lvarela-r7 c36184697c
Merge pull request #9150 from bcook-r7/runtimeerror
Fix several broken raise RuntimeError calls in error paths
2017-10-31 14:47:42 -05:00
Pearce Barry 48975a4327
Support multiple suffixes on meterpreter extensions. 2017-10-31 10:04:34 -05:00
Pearce Barry daf2acc2b1
Initial work to support Mettle exetensions (and a sniffer).
See MS-2775.
2017-10-31 10:04:30 -05:00
Brent Cook 95b6cda06e
Land #9146, add e500v2 and reduce size of x86_64 2017-10-31 09:54:07 -05:00
Brent Cook c4dcd79e41
Land #9144, fix misspelling in exploit/windows/local/wmi_persistence 2017-10-31 05:01:13 -05:00
Brent Cook aa0ac57238 use implicit RuntimeError 2017-10-31 04:53:14 -05:00
Brent Cook 9389052f61 fix more broken RuntimeError calls 2017-10-31 04:45:19 -05:00
Brent Cook f42b980cf0 fix misspelled RuntimeError 2017-10-30 15:42:11 -05:00
Brent Cook 56eb828cc5 add e500v2 payloads 2017-10-30 14:04:10 -05:00
Spencer McIntyre 940573ad49 Support ruby directives in Meterpreter rc scripts 2017-10-29 15:57:33 -04:00
h00die 3b8ef02c29 sid vs side 2017-10-29 08:36:05 -04:00
William Vu 9349e1eda5 Fix find_script_path to check only files 2017-10-27 12:28:58 -05:00
William Vu 73c9807c55 Add module support for sessions -s 2017-10-27 12:28:53 -05:00
Metasploit 140955f220
Bump version of framework to 4.16.14 2017-10-27 10:03:00 -07:00
Brent Cook d188982760 handle masked EOF from Rex sockets (TODO: kill that behavior) 2017-10-27 02:29:25 -07:00
Brent Cook 85b59c87ca fix buggy handling of partial ingress packet data
If we have more data, and the packet parser needs more data, connect the two
together rather than bailing. This fixes reverse_tcp_ssl along with probably a
lot of other higher-latency corner cases.
2017-10-27 02:15:08 -07:00
Jeffrey Martin 4274b76473
Land #9119, Fix #8436, allow session upgrading on meterpreter sessions 2017-10-25 10:26:27 -05:00
Jeffrey Martin 386e14828a
Land #8728, Psexec via PSH related fixes 2017-10-24 15:55:18 -05:00
Tim 40e57d7ee6 android payload options 2017-10-24 18:32:47 +08:00
Brent Cook 1b01232624
Land #9070, Fix bug copying MACE attributes between files 2017-10-23 22:15:42 -05:00
Brent Cook 402e926151
Land #9081, Fix ftp.rb to get files larger than 16384 2017-10-23 22:11:36 -05:00
Brent Cook c6bc55a175
Land #9082, Fix ftp.rb so it closes all data sockets 2017-10-23 22:10:38 -05:00
Tim ca4feb5136 fix session upgrading 2017-10-23 01:26:45 +08:00
Dave Farrow 636551aa03 Fixed help message to match test 2017-10-20 21:32:54 -07:00
Dave Farrow ea1ac3d5b3 #9108: added -C option to change default hosts columns
The -C option saves the column list the user provided and uses that as the default column list until msfconsole is restarted
2017-10-20 20:39:38 -07:00
Metasploit 884b68fa60
Bump version of framework to 4.16.13 2017-10-20 10:02:23 -07:00
William Vu c795cef69f
Land #9099, disconnect option for send_request_cgi 2017-10-20 10:50:56 -05:00
William Vu 8e5deac3f4 Fix nil bug in setting PromptChar without Prompt 2017-10-20 00:38:01 -05:00
RageLtMan a3912e4913 Provide disconnect option to send_request_cgi
The HTTP client mixin provides a #send_request_cgi method which
forcibly disconnects the client after receiving a response. This
terminates certain types of resulting sessions which depend on the
connection from the client to maintain a subprocess housing the
shell invocation.

Provide a disconnect boolean option to #send_request_cgi which
is checked in the disconnect(c) call after receiving the response.

Testing:
  Locally tested on in-house exploit module written for disclosure
report.

TODO:
  Discuss possibility of implementing fully asynchronous methods
like #send_request_cgi_async which won't bother getting a response
for cases such as the module mentioned above which is a command
injection via unfiltered POST var.
2017-10-19 21:22:31 -04:00
William Vu 60a7a80ff0
Land #9095, default PromptTimeFormat (%T) 2017-10-17 16:50:47 -05:00
James Lee af42f517b8 Default PromptTimeFormat to %T 2017-10-17 16:39:44 -05:00
Evgeny Naumov d5cdd2567a add missing method 2017-10-16 16:01:53 -04:00
Jeffrey Martin b04f5bdf90
Land #9077, Enhancing the functionality on the nodejs shell_reverse_tcp payload. 2017-10-16 10:49:17 -05:00
Jeffrey Martin 6df8c40bb1
adjust whitespace 'no tabs' more reabable 2017-10-13 17:01:47 -05:00
Wei Chen 6b89f62b08 Land #9080, ensure autoruns on shell sessions
Land #9080
2017-10-13 15:35:31 -05:00
Wei Chen 5ce4c32213 Use session object instead of self
The session object has :process_autoruns, not self
2017-10-13 15:33:27 -05:00
William Vu b2de5aba07
Fix #9075, super setup fix for local exploits 2017-10-13 12:45:14 -05:00
bigendiansmalls 1b306caf39
Fixed ftp.rb to get files larger than 16384
Existing ftp.rb did get_once, which limits file
DL to 16384 (def_block_size). Change to get and
added one more timeout variable see:
http://www.rubydoc.info/gems/librex/Rex%2FIO%2FStream:def_block_size
and
http://www.rubydoc.info/gems/librex/Rex%2FIO%2FStream:get_once
and
http://www.rubydoc.info/gems/librex/Rex%2FIO%2FStream:get
2017-10-13 12:41:11 -05:00
Metasploit 88585a5cfd
Bump version of framework to 4.16.12 2017-10-13 10:03:48 -07:00
bigendiansmalls e5e9c7ccd6
Fixed ftp.rb so it closes all data sockets
ftp.rb was doing a shutdown without a close on data
(not command) sockets.  This can cause CLOSE_WAIT
for extended periods in certain circumstances-ending
only when msf itself is closed.
2017-10-13 10:09:43 -05:00
Brent Cook e209256d62 ensure we do autoruns for all session types 2017-10-12 23:11:58 -05:00
William Vu bf2fb7051a Fix session compatibility check for post modules 2017-10-12 11:57:11 -05:00
itsmeroy2012 a0abffb6c4 Adding functionality of StagerRetryWait and StagerRetryCount 2017-10-12 22:25:00 +05:30
William Vu f556a5f805 Add compatible session types to post module info 2017-10-12 11:41:02 -05:00
itsmeroy2012 374c139d33 Increasing the functionality of the nodejs shell_reverse_tcp payload 2017-10-12 19:05:59 +05:30
bwatters-r7 294230c455
Land #8509, add Winsxs bypass for UAC 2017-10-11 16:24:52 -05:00
William Webb 84fe0847bf
Land #9074, Add prints and error checking to HTTP CmdStagers 2017-10-11 14:27:52 -05:00
William Vu 27876a91d3 Add prints and better checking to HTTP CmdStagers
Admittedly, this code is more convoluted than it needs to be.
2017-10-11 14:01:56 -05:00
Jeffrey Martin b76c1f3647
remove invalid 'client' object reference in nodejs
fix #9063 by removing invalid object reference introduced in PR #8825
2017-10-11 11:09:28 -05:00
Bradley Landherr bdc00ef2df Removing unecessary comment 2017-10-11 06:34:09 -07:00
Bradley Landherr 8dee369eb7 Fixing the -f option, removing reference to undefined 'path' variable & get_file_mace already returns a 'Time' object instance 2017-10-11 06:28:03 -07:00
Adam Cammack 88f53352c7
Land #9056, Check for /etc/issue before reading 2017-10-10 15:05:27 -05:00
Jeffrey Martin 57afc3b939
Land #9044, Address generation issues with pure PSH payloads 2017-10-10 10:40:33 -05:00
h00die bf731b4f5e look before leap issues 2017-10-09 14:27:09 -04:00
Adam Cammack 436b72d4cc
Land #9023, Add tab completion to the edit command 2017-10-09 11:37:12 -05:00
William Vu 27dcc162b2 Revert to Vim because ed is the standard editor
https://www.gnu.org/fun/jokes/ed-msg.html
2017-10-09 11:34:45 -05:00
William Webb 14308fb77d
Land #9045, Copy original request ID into TLV response 2017-10-09 10:58:02 -05:00
bwatters-r7 fc5ab96ad6 Merging to prep for testing
Merge branch 'master' of github.com:rapid7/metasploit-framework into upstream-master
2017-10-09 10:31:30 -05:00
bwatters-r7 7df18e378d Fix conflicts in PR 8509 by mergeing to master 2017-10-09 10:30:21 -05:00
James Barnett 56e95f15c9
Land #9024, fix bug when manually adding loot
cmd_loot was throwing a stack trace when the host was not properly defined.
This fixes it to give a useful error message.
2017-10-06 16:02:12 -05:00
Jeffrey Martin d0a1fb6019
tlv response to ID based request with original ID
When a tlv response is created the request ID being responded to
needs to be copied into response created.
2017-10-06 13:58:38 -05:00
William Webb d9e0d891a1
Land #9010, Remove checks for hardcoded SYSTEM account name 2017-10-06 13:42:18 -05:00
RageLtMan 124a1531f4 Clean up powershell exec string
The scriptblock invocation is already coming from Rex, so there's
no need to re-wrap the executed code in more of the same.
2017-10-06 13:19:36 -04:00
Metasploit 4acef04e0d
Bump version of framework to 4.16.11 2017-10-06 10:01:51 -07:00
RageLtMan 9afdde2938 Address generation issues with pure PSH payloads
Powershell payloads were generating using the :generate method
mixed in from Payload::Windows::Exec which is a binary payload
mixin.

Address the breakage by implementing a generate method which simply
outputs the script code produced by the module with no additional
content prepended or appended.

While here, cleanup the commandline generation for the script being
produced by having Rex do it (this permits changes made in Rex to
benefit all consumers).

As a bonus, drop the IEX invocation since it'll trip up AMSI and
upgrade to the scripblock execution semantic.

Credit for finding this little gem goes to bperry - i dont usually
use the native powershell command shells, and managed to miss this
for a long time. Thanks boss.

Testing:
  Local in pry

@bperry: Could you test and ping me back if this is right?
2017-10-06 12:32:52 -04:00
Brent Cook 809d0f79a1
Land #9026, Fix cache invalidation bug in tab completion 2017-10-05 16:41:00 -05:00
Brent Cook b7e209a5f3
Land #9033, Geolocate API update 2017-10-05 16:39:09 -05:00
Tim e534d3cdc8 fix transport and sleep commands on java 2017-10-04 10:36:01 +08:00
William Vu 5b9a4d73ee Readd hostless loot display
In the chance event someone actually managed to store it.
2017-10-02 23:31:44 -05:00
William Vu 403b5e2fa8 Move TARGET check into option_values_payloads 2017-10-02 23:22:42 -05:00
h00die fc66683502 fixes #8928 2017-10-01 19:49:32 -04:00
William Vu 9941097a5c Remove extraneous else 2017-09-29 19:01:04 -05:00
William Vu e8d0f2dde0 Fix missing message for vprint_* in AuthBrute 2017-09-29 18:51:35 -05:00
William Vu 6de986bd70 Fix cache invalidation bug in tab completion
We use active_module instead of cmd_use to invalidate @cache_payloads,
since the ivar is no longer shared between cmd_set and cmd_use.

Fixes #8483. See #7655.
2017-09-29 18:01:50 -05:00
William Vu 0723477b49 Fix nil bug in loot -a and nix hostless loot
Apparently you can't actually store hostless loot.
2017-09-29 16:16:16 -05:00
William Vu 1ec968192b Add tab completion to the edit command 2017-09-29 15:43:53 -05:00
bwatters-r7 e0fee9e317
Land #8821, Expose session naming 2017-09-29 15:32:47 -05:00
Metasploit 32104eb90e
Bump version of framework to 4.16.10 2017-09-29 10:04:04 -07:00
loftwing f777e2ab3b Merge branch 'master' into fix_nmap_imports
bringing branch up to date
2017-09-27 12:52:27 -05:00
loftwing 51c1cddb5c Removed requirement for a host to have ports 2017-09-27 12:43:50 -05:00
OJ 3068fb6e7e
Fix getprivs and getsystem
This is a fix for crap and stupid stuff that I did half way through the
packet pivot code. I was working on some priv stuff at the same time,
and when I realised that the work I was doing was not sensible as part
of the packet pivot PR, I failed to revert my changes properly.

As a result I broke `getprivs` and `getsystem`. I am sorry. And I'm
ashamed.
2017-09-27 16:31:42 +10:00
Christian Mehlmauer 81406a073e
tidy up code 2017-09-27 08:01:48 +02:00
Christian Mehlmauer 41e3895424
remove checks for hardcoded name 2017-09-27 07:41:06 +02:00
Brent Cook 0d31c1c9a8
Land #8945, fix issue where we can call shutdown on a closed socket 2017-09-26 16:01:51 -05:00
Brent Cook 71f13db918 style updates 2017-09-26 15:58:43 -05:00
Adam Cammack 0408979e54
Land #9005, Remove spurious commas 2017-09-26 15:36:33 -05:00
Brent Cook cad36ee14e
Land #8952, suhosin compatibility added to staged payload 2017-09-26 15:22:36 -05:00
Adam Cammack 968ae8e267
Land #8925, Allow `edit` to optionally take a path 2017-09-26 13:32:39 -05:00
root ec51ab2547 Exit function param bug 2017-09-26 11:16:41 +03:00
William Vu d234409d40
Land #8918, wp_admin_shell_upload multisite fix 2017-09-25 13:54:10 -05:00
Josh Hale 0e59f47095 Comments and whitespace check 2017-09-24 16:37:30 -05:00
Josh Hale 23e1b5b872 Add search term support 2017-09-24 16:25:27 -05:00
Josh Hale 664fd1f7e3 Support single file path 2017-09-24 16:13:26 -05:00
Josh Hale 9f0ff3f3a3 Add in sort and order options 2017-09-23 23:14:21 -05:00
Josh Hale 2068514800 Add initial lls command 2017-09-23 21:38:53 -05:00
Brent Cook d73e95e7db
Land #8946, fix #8879, APK injection edge cases 2017-09-23 20:48:12 -04:00
Pearce Barry 8853193542
Land #8987, Fix opening non-existant files on unix 2017-09-22 13:15:44 -05:00
Metasploit 68fa3d45f3
Bump version of framework to 4.16.9 2017-09-22 10:05:19 -07:00
Adam Cammack 62aac450f8
Change confusing variable name 2017-09-22 11:43:26 -05:00
Adam Cammack 4ea8f639a3
Add host and service reporting to external modules 2017-09-22 11:42:32 -05:00
h00die 36fc01d375 check files before opening 2017-09-21 19:36:19 -04:00
Brent Cook d8ee4150e6 move client core constants closer to where they are actually used 2017-09-19 03:22:13 -05:00
Brent Cook 5b579baa33 remove unused Linux migration code 2017-09-19 03:04:43 -05:00