Commit Graph

15004 Commits (3e20dc155c51759106c7028d03105ab56fc3fa10)

Author SHA1 Message Date
bwatters-r7 1be7f55cae
Land #8983, Add peinjector post module
Merge branch 'land-8983' into upstream-master
2018-08-28 15:25:56 -05:00
William Vu 4803c889f9
Land #10507, GPP creds for db_import 2018-08-28 11:45:51 -05:00
James Barnett 5e45e2f1e9
Add help text for -l and -n options 2018-08-28 11:42:10 -05:00
James Barnett 3c1086741b
Use correct variable name for api_token 2018-08-28 10:49:50 -05:00
alpiste 562fc09d5d add new line to the end of the file 2018-08-28 09:02:21 -05:00
alpiste 3a6d72b8b6 some executable files need stack preserve and stack restore, functionality restored 2018-08-28 09:02:21 -05:00
alpiste ff7baaca13 remove stack preserve and stack restore in x86 shellcode and delete duplicated stack preserve variable in x64 shellcode 2018-08-28 09:02:21 -05:00
bwatters-r7 5a28863b12 Fix Whitespace for Rubocop 2018-08-28 09:02:21 -05:00
bwatters-r7 3ac24abfb2 Remove Extra stackpreserve variable 2018-08-28 09:02:21 -05:00
bwatters-r7 f9148f7864 Update/Add Human-Readable ASM 2018-08-28 09:02:21 -05:00
alpiste f1e4079641 move add_thread code to lib/rex/post/meterpreter/extensions/peinjector/peinjector.rb 2018-08-28 09:02:21 -05:00
alpiste 55299561b1 Peinjector meterpreter extension interface added 2018-08-28 09:02:21 -05:00
alpiste ced4ae6f49 MSFTidy module 2018-08-28 09:02:21 -05:00
alpiste 2251c4a712 Add peinjector post module 2018-08-28 09:02:21 -05:00
James Barnett 5b7127c826
Use Rex::Text::Table for outputting data services 2018-08-27 13:18:41 -05:00
James Barnett 24cf99f59c
Enable deletion of saved data services 2018-08-27 11:32:19 -05:00
Josh Hale 419738a746 Add expect method, -s, and -l 2018-08-26 19:38:19 -05:00
Brent Cook cb07ba2b6c
Land #10516, Add brace expansion encoder and update ${IFS} encoder 2018-08-25 22:23:07 -05:00
Brent Cook 969170096a
Land #10520, Only allow setting persistence on payload jobs 2018-08-25 22:21:46 -05:00
William Vu 6df235062b
Land #10505, post-auth and default creds info 2018-08-24 18:08:15 -05:00
William Vu cde82b18ab
Land #10379, tab completion for multiple commands 2018-08-24 18:06:14 -05:00
William Vu e955e8dc15 Clean up code
And hope I didn't break anything.
2018-08-24 18:05:52 -05:00
James Barnett bb0ec0472b
Enable saving local data services 2018-08-24 12:51:50 -05:00
Green-m 1dd91434f4
Fix #10518, bug fix when add persistent to non-payload job. 2018-08-24 03:39:18 -04:00
Green-m 6d84d3bfec
Add tabs auto completion for irb. 2018-08-23 23:29:12 -04:00
Green-m 418b574161
Merge branch 'master' and resolve conflict. 2018-08-23 23:24:23 -04:00
William Vu 7c0dd2a0fe Add CmdUnixBrace and update CmdUnixIfs
Acronyms can be capitalized as per the Ruby style guide.
2018-08-23 21:18:09 -05:00
Matthew Kienow df18e354e1
Add bind_busybox_telnetd payload, misc cleanup 2018-08-23 15:23:39 -04:00
Matthew Kienow c0c3e12c74
WIP - hp officejet pro exploit, enhance PJL lib 2018-08-23 14:53:54 -04:00
James Barnett 724e0dcaf3
Add ability to connect to saved data services 2018-08-22 17:16:27 -05:00
William Vu 9b3e0d8306 Add additional root tags for GPP XML
Finally ran through all the samples and cross-referenced with MS14-025.

https://msdn.microsoft.com/en-us/library/cc232650.aspx
https://support.microsoft.com/en-us/help/2962486/ms14-025-vulnerability-in-group-policy-preferences-could-allow-elevati
2018-08-22 16:48:33 -05:00
William Vu 2891255549 Clarify what is being imported currently
Since the parser is focused on creds.
2018-08-22 15:53:19 -05:00
William Vu 1e4eb0eae0 Revert report_note, since it added nothing
A bit of misunderstanding. We're in agreement that loot was enough.
2018-08-22 14:34:09 -05:00
William Vu 6fa04950ee Store parsed GPP data as a note
And refactor slightly.
2018-08-22 14:19:50 -05:00
William Vu b1c633faf6 Add Group Policy Preferences support to db_import
And take the Jaden Smith approach, as @busterb quipped to me. :)

This one's a little weird, since you normally import scans into
Metasploit, but now that creds are first-class in the database, it makes
more sense to be able to import them.

Currently, your alternatives are post/windows/gather/credentials/gpp,
which requires a session, and auxiliary/scanner/smb/smb_enum_gpp, which
requires a network scan.
2018-08-21 23:44:39 -05:00
James Barnett 68aca395a4
Remove debug logging 2018-08-21 15:06:30 -05:00
James Barnett 57243106f7
Connect to the default database on startup 2018-08-21 14:29:20 -05:00
James Barnett b6401dbe56
Add db_save command 2018-08-21 11:10:43 -05:00
Wei Chen 080ba15179 Another boo-boo 2018-08-21 08:55:14 -05:00
William Vu 321f2b8746 Improve file operations
Hmm, why did I not use File.write before? Oh well, fixed.
2018-08-20 22:25:19 -05:00
Green-m 808e2f2e25 Fix issue #10499 2018-08-21 03:08:14 +00:00
Green-m edb85614ff Make code cleaner 2018-08-21 03:05:44 +00:00
asoto-r7 bc3b317963
Land #10449, Implementation of download/upload file in reverse shell 2018-08-20 19:10:26 -05:00
asoto-r7 4aee3a4ae2
Land #10448, Implementation of CTRL+C to send SIGINT signal 2018-08-20 18:14:29 -05:00
Brent Cook 11fee8fa2c
Land #10471, Import target DefaultOptions into the datastore 2018-08-20 17:30:27 -05:00
Brent Cook fb2d3bfd4a
Land #10492, show help when no argument is provided to `show` 2018-08-20 15:46:29 -05:00
James Barnett 3fadc64fb2 Don't set the workspace to default if it is already set 2018-08-20 14:35:06 -05:00
Auxilus 8869604143
update help for show and search 2018-08-21 00:17:57 +05:30
Auxilus e8c0638092
Update modules.rb 2018-08-20 23:36:57 +05:30
Auxilus 0e594266e9
show help when no argument is provided to `show` 2018-08-20 23:32:34 +05:30
Adam Cammack 94dd67f3a5
Add public readers for prompt and prompt_char
This allows various things to inspect the state of the console before
calling `update_prompt`.
2018-08-17 14:41:48 -05:00
Adam Cammack 410eee8537
Remove 'append' mode from update_prompt
Nothing used it meaningfully. Also, due to the way `init_prompt` was set
prior to b1401e2e4e, it would have been
very broken: the prompt_char would have been included in the line twice
and prompt substitutions like %T would have been cached. Even more,
trying to append the empty string to the prompt (removed in that commit)
caused us to add a number of workarounds removed in
1df442e0cf.
2018-08-17 14:32:48 -05:00
Adam Cammack 1df442e0cf
Centralize where msfconsole touches the prompt 2018-08-17 14:21:16 -05:00
Adam Cammack b1401e2e4e
Update the prompt every shell tick
This was inadvertently done as part of the tab completion
initialization but is what we want. Also move the prompt formatting to
the prompt update and make the code more readable.
2018-08-17 14:10:28 -05:00
Jeffrey Martin d6bce4410c
Land #10203, Add command for persistent job handler when msf restart 2018-08-16 15:37:10 -05:00
William Vu 7e496ae067 Import target DefaultOptions into the datastore 2018-08-16 12:18:02 -05:00
William Vu 59f2bf9002
Land #10469, bug fixes for shell's prompt_yesno 2018-08-16 10:51:54 -05:00
Adam Cammack 4375a3fbfb
Fix lurking bugs in the shell's prompt_yesno 2018-08-16 09:05:22 -05:00
William Vu 7a20d05fa6
Land #10456, known_hosts fix for SSH modules 2018-08-15 21:28:08 -05:00
Green-m 1475f205d4
Update for style requirements. 2018-08-15 22:24:20 -04:00
Green-m 028799299c
Update for style requirements. 2018-08-15 22:23:04 -04:00
William Vu 101539a1bc
Land #10464, prompt to use plain module name 2018-08-15 20:55:28 -05:00
Adam Cammack c045f70e80
Emulate `prompt_yesno` semantics for UI drivers 2018-08-15 17:30:37 -05:00
James Barnett becd42553a
Land #10462, Add API documentation for users and auth endpoints 2018-08-15 17:10:26 -05:00
Adam Cammack a4fb33d53a
Prompt to use module when given plain module name 2018-08-15 15:58:19 -05:00
Adam Cammack fe75a87cd5
Land #10459, Fix PMA scanner vs. non-PMA hosts 2018-08-15 14:44:40 -05:00
James Barnett f05844d8f4
Refactor options handling and help printing 2018-08-15 11:48:03 -05:00
Erin Bleiweiss 13326ea94b
Land #10451, Add 'payload' to module search command help documentation 2018-08-15 11:20:13 -05:00
James Barnett 1a4c04cae6 Merge branch 'master' into consolidate_db_connect_data_services 2018-08-14 15:20:56 -05:00
William Vu cedcb04ce0
Land #10433, pry and irb in developer dispatcher 2018-08-14 13:32:47 -05:00
Erin Bleiweiss 66b761db15 Add doc for user operations 2018-08-14 13:19:56 -05:00
Erin Bleiweiss f7a0b201d7 Add authorization support for auth/bearer tokens 2018-08-14 11:51:15 -05:00
Jacob Robles a956f675ff
PMA Scanner Check Error Condition 2018-08-14 06:16:55 -05:00
Green-m 97b6425315
Make persist list go all in on the JSON format. 2018-08-14 06:39:56 -04:00
Green-m 2394e92c1c
Go all in with JSON format, rename var to get more readable. 2018-08-14 06:37:08 -04:00
Green-m bdb663b078
Make persist list go all in on the JSON format. 2018-08-14 06:33:44 -04:00
Kevin Kirsche 4450d34fee
Remove SSH scanner using known_hosts
Fix #10266 

This disables writing to the `known_hosts` file when performing auxiliary ssh scans.
2018-08-13 21:27:51 -04:00
Auxilus b1041093f2
Add payload to cmd_search_help type 2018-08-13 11:55:56 +05:30
Tim W 1ca6cb31d1
Land #10440, fix apk injection on windows 2018-08-13 01:09:55 +08:00
Wang Yihang 8b4a669c5b [+] Disable debug print 2018-08-12 14:09:29 +08:00
Wang Yihang 67f6e83cbe [+] Make the progress bar more precise 2018-08-12 14:08:32 +08:00
Wang Yihang 6a0a52e6fe [+] Add conditions in help menu 2018-08-12 13:10:11 +08:00
Wang Yihang 89c875d3bb [+] Implementation of upload meta command 2018-08-12 12:54:05 +08:00
Wang Yihang f3d98b26d7 [+] Implementation of download meta command 2018-08-12 11:37:39 +08:00
Josh Hale f1fd077bef Whitespace fix 2018-08-11 17:39:44 -05:00
Josh Hale 7b573fa3ca Use multiple bash methods 2018-08-11 17:38:13 -05:00
Wang Yihang 6c33854ffc [+] Exit vim opened in reverse shell via signal USR1 2018-08-12 06:07:18 +08:00
Wang Yihang b6e2c34b11 [+] Fix can not abort reverse shell session 2018-08-12 05:40:40 +08:00
Wang Yihang dc342a29b3 [+] Fix typo 2018-08-12 05:23:18 +08:00
Wang Yihang 7e4a666e1b [+] Modify script arguments, change LOG_FILE to /dev/null 2018-08-12 04:54:08 +08:00
Wang Yihang 3fb814cef3 [+] Implementation of script and socat on poping up a interactive shell 2018-08-12 04:49:44 +08:00
Wang Yihang b220c9b0ab [+] Fix confliction on resource meta command branch and merge 2018-08-12 03:38:47 +08:00
Wang Yihang e457eba2dd [+] handler CTRL+C Signal in reverse shell sessions 2018-08-12 02:41:16 +08:00
Green-m 2529fdf322
Fix issue #8887, when injecting into an existing .apk file on windows 2018-08-10 05:43:26 -04:00
Wei Chen d9fc99ec4a Correct false negative post_auth? status 2018-08-09 23:34:03 -05:00
Wang Yihang 6578950533 [-] Remove debug message 2018-08-09 16:32:27 +08:00
Wang Yihang f6c28106b9 Merge remote-tracking branch 'upstream/master' into add-resource-meta-shell-command 2018-08-09 16:20:26 +08:00
h00die a977121a61 include kernel to solaris.rb 2018-08-08 20:24:59 -04:00
h00die c1635948ce sync some linux local libraries to solaris 2018-08-08 20:08:23 -04:00
James Barnett c8dc5967d2
Remove data_services commands
db_connect is now the preferred method of connecting
2018-08-08 17:47:17 -05:00
James Barnett d7dcdce7a8
Add more information when already connected to a db 2018-08-08 13:32:25 -05:00
James Barnett cfe1ea86fb
Only allow one http connection at a time 2018-08-08 13:20:46 -05:00
William Vu 89a3a265d2 Move the built-in irb command while we're at it 2018-08-07 21:32:30 -05:00
William Vu 68a7761f68 Move built-in pry command to developer dispatcher
We also fall back on prying Framework if a module isn't active.

This fixes the following bad behavior:

msf5 > pry
[*] exec: pry

And then your input gets stolen.
2018-08-07 21:17:22 -05:00
James Barnett 201b91f9d7
Land #10410, add script for setting up and managing data services
The msfdb script allows you to create, delete, start, and
stop local and remote data services. The database backend requires
PostgreSQL and the webservice provides a REST API to interact with it.
2018-08-07 18:25:51 -05:00
William Vu 2bce8b008e Fix history deduplication for system Readline 2018-08-07 16:53:24 -05:00
William Vu 298d5c3b30 Refactor history clearing 2018-08-07 16:53:17 -05:00
Wei Chen 6223685c37 Update auth requirement for json metadata 2018-08-07 16:42:00 -05:00
William Vu 6eda1b2dfa Revert deletion of history clearing
ef487f6be5
2018-08-07 14:06:52 -05:00
James Barnett 387d784ddc
Implement db_disconnect for remote data service
And a couple of fixes for db_connect for remote data services
2018-08-07 14:03:38 -05:00
William Vu 3b2c3507d1 Refactor history deduplication on save
We move the check outside the block and clean up the syntax.
2018-08-07 11:18:13 -05:00
Green-m 3caa3057d8
Process persistent job when msf start. 2018-08-07 05:41:47 -04:00
Green-m 2dee2cf038
Update command job to support for persistent job when msf restart. 2018-08-07 05:40:35 -04:00
Green-m 91a9a24879
Update the dump_jobs for persistent job info. 2018-08-07 05:36:57 -04:00
Auxilus cb01216e0c
fix history issues as stated in #10423 2018-08-06 11:27:47 +05:30
William Vu f6d9cde7c4 Revert history -u deduplication on print 2018-08-05 14:28:15 -05:00
William Vu a0962855bd Refactor history deduplication
We don't need to know the absolute index. We also fix the IndexError.
2018-08-05 14:28:10 -05:00
Auxilus fce19cf5b8
Prevent adding the same command to history 2018-08-05 22:33:00 +05:30
William Vu ef6be1980f Fix use -h to call cmd_use_help
It really shouldn't try to load it as a module.
2018-08-04 15:34:26 -05:00
James Barnett df607ddd16
Enable connecting to remote data services with db_connect 2018-08-03 13:38:02 -05:00
Brendan Coles bc9fcf40d4 2016 2018-08-03 07:07:21 +00:00
Matthew Kienow fbc9d3ee83
Add print methods from HttpDBManagerService 2018-08-02 12:38:52 -04:00
Adam Cammack 54abc65c55
Land #10406, Fix notes service, port, protocol 2018-08-01 14:39:34 -05:00
Brent Cook 1601e8a844
Land #10330, Add SMBv2 support to bind_named_pipe payloads 2018-08-01 12:58:44 -05:00
Erin Bleiweiss 58b3f63c1a Update to reflect new JSON models 2018-07-31 15:57:26 -05:00
Erin Bleiweiss 3e8efea57a Merge branch 'conform_to_api_standards' into exploit-query
Prepare for new JSON format.
2018-07-31 14:48:37 -05:00
James Barnett eb240892fc
Fix but with origin display in console
Also prevent adding workspace to opts when id is present
2018-07-31 14:03:53 -05:00
Erin Bleiweiss 9d1a2e20ee Add better error handling. 2018-07-31 13:25:49 -05:00
Erin Bleiweiss 1d3761c9d6 Add support for 'check' metadata value 2018-07-31 12:18:09 -05:00
William Vu 2bca1ade05 Normalize note proto better and actually use it 2018-07-31 11:51:34 -05:00
Erin Bleiweiss 3291931955 Merge branch 'upstream-master' into exploit-query 2018-07-31 11:51:14 -05:00
Erin Bleiweiss db91c7f075 Add error message to console if invalid params are supplied 2018-07-31 11:49:09 -05:00
James Barnett 2ef639f99e
opts[:id] could sometimes be an integer, so cast to string 2018-07-31 10:58:01 -05:00
Green-m 21afd0572c use %w to replace [] for string arrays, more readable. 2018-07-30 22:47:59 -04:00
James Barnett 7dc14f59f4
We're using named parametes now 2018-07-30 15:38:48 -05:00
James Barnett 0843e6789d
Fix private data not displaying for creds
Also fix issue where delete and update cred were not using the data format
2018-07-30 15:31:38 -05:00
James Barnett d1f09ca81c
Add path selection for GET requests
Also remove instances where workspace is passed for
single object lookups since it is no longer required
2018-07-30 13:56:34 -05:00
James Barnett 4c92de0b55
Refactor logic for determining single object output.
Also add restrictions on passing id as a query string param
2018-07-30 11:42:45 -05:00
Wang Yihang c90b03808a Merge remote-tracking branch 'upstream/master' into add-resource-meta-shell-command 2018-07-30 13:25:26 +08:00
Wang Yihang b2eb5edf37 [+] Fix bug in pull 10220 2018-07-30 13:21:26 +08:00
Josh Hale fcbfa8019f style and more python checks 2018-07-29 22:52:43 -05:00
James Barnett 9cd99cbc17
Fix error when id param is present in GET request 2018-07-28 22:55:03 -05:00
Josh Hale 51ff09a9b6 Only try on NX 2018-07-28 19:00:33 -05:00
James Barnett 9e08bf6ec2
Fix logic issue when processing HTTP requests 2018-07-28 15:23:56 -05:00
James Barnett 37706e094d
Dont wrap object in array when using ID parameter 2018-07-27 16:41:11 -05:00
James Barnett 829b43f743
Address minor code review comments 2018-07-27 16:19:17 -05:00
Erin Bleiweiss d4b5e27edc remove whitespace 2018-07-27 16:03:16 -05:00
Erin Bleiweiss 57c9a3544a delete unnecessary proxy files 2018-07-27 16:01:45 -05:00
Erin Bleiweiss 3e41db6994 refactor for more dry, more compartmentalized code 2018-07-27 16:00:19 -05:00
Erin Bleiweiss 4ac11d4e70 parameter validation 2018-07-27 15:15:49 -05:00