Dean Welch
94005719f4
Revert change to each_module for compatible nops
2024-02-13 11:15:27 +00:00
Dean Welch
391bc4e69e
shuffle platform parsing and code quality
2024-01-19 14:30:34 +00:00
Dean Welch
1c4258fd1e
Fix encoded payloads test
2024-01-16 13:31:51 +00:00
Dean Welch
2cf045d3c4
Leverage the module metadata cache in the module_sets
2024-01-15 14:56:46 +00:00
Spencer McIntyre
08cb115368
Handle encoding stages of different architectures
2023-03-01 12:17:37 -05:00
Grant Willcox
1959dac1df
Reformat comments a bit and fix a typo.
2022-05-13 19:14:00 -05:00
Spencer McIntyre
cb26d02518
Treat space = 0 as a special case
...
Space = 0 is a special case implying that the smallest payload possible
should be used. It's used by msfvenom when the --smallest flag is set.
It should not cause Metasploit to raise an exception.
Fixes #16471
2022-05-13 16:18:08 -04:00
Spencer McIntyre
147837e9b6
Validate payload size even when not encoding
2022-02-25 17:21:59 -05:00
Spencer McIntyre
8d2e644f4f
Add a new Java Deserialization mixin and use it to set the shell
2021-03-11 12:09:29 -06:00
dwelch-r7
1617b3ec9b
Use zeitwerk for lib/msf/core folder
2020-12-07 10:31:45 +00:00
Spencer McIntyre
aa1e4dbf5c
Only propagate space information when it's set
2020-09-23 16:21:12 -04:00
Spencer McIntyre
61f5879b2f
Reserve some space when a payload needs to be encoded
2020-09-23 10:26:13 -04:00
William Vu
d1cdd2cd57
Fix encoding when BadChars contains whitespace
2020-08-14 19:57:09 -05:00
Adam Galway
1a2bf98222
creates standard elog & updates exisiting usages
2020-06-22 12:48:39 +01:00
Adam Cammack
5f8181efa7
Avoid auto-encoding payloads free of badchars
...
Payloads without any of the specified badchars will no longer be encoded
by default. This should hopefully lead to less surprising results when
using simple payloads (especially commands. Things that had incomplete
badchar analysis may break as a result, since not everything will be
encoded by default anymore. Sorry in advance if they do.
2020-05-07 10:58:03 -05:00
Patrick
5151473e09
Implement sec-name and pad-nops for command dispatcher
2019-02-13 13:35:42 -06:00
jvazquez-r7
d85412b0fb
Complete fix for generation of nop sleds
2015-10-16 14:01:00 -05:00
root
51dd88114b
Fix grammer in comments
2015-04-13 13:21:41 +05:00
Brent Cook
e5443e74ed
Merge branch 'upstream-master' into land-3950-chain-encoders
2015-04-03 15:18:06 -05:00
HD Moore
e65ac57d1b
Fix a logic check in EncodedPayload, which unbreaks stageless testing
2015-03-29 19:08:35 -05:00
HD Moore
744b1a680e
Reworks how payload prepends work internally, see #1674
2015-03-12 02:30:06 -05:00
HD Moore
95f67dba7a
Tell payloads and encoders how much space they have to work with
2015-03-04 19:25:04 -06:00
agix
24bd814376
Missing iterations when encoder not setted
2015-01-05 16:46:29 +01:00
agix
2eace2b78a
Forget to reset raw with encoded payload
2015-01-05 16:46:29 +01:00
agix
ba5161753a
Allow multiple encoding syntax in Encoder variable
...
From msfconsole using set Encoder or set StageEncoder
it is possible to set multiple encoders with this syntax :
<encoder>:<iteration>, <encoder2>:<iteration
This should not break compatibility
2015-01-05 16:46:29 +01:00
HD Moore
f67a32ef9c
Add missing commits from #3770 , lands #4393
2014-12-13 17:36:26 -06:00
HD Moore
8aecd5e4a5
Address the two open comments from @jlee-r7
2014-11-03 12:33:11 -06:00
James Lee
3329aa68ad
Fix baffling comment
...
See 9d759146
2014-10-06 18:55:52 -05:00
James Lee
e9f341fd6c
Rename to more intention-revealing name
2014-10-06 16:33:21 -05:00
agix
7485d9172a
Rescue only NoEncodersSucceededError to pass the tests
2014-09-12 13:30:03 +02:00
agix
28e61edef4
Unblock when invalid encoder is selected and allow multiple encoder
2014-09-12 12:48:09 +02:00
HD Moore
6c0dae953d
Stage encoding is now SaveRegister aware
2014-09-09 14:21:51 -05:00
Joe Vennix
6313b29b7a
Add #arch method to Msf::EncodedPayload.
...
This allows exploits with few one automatic target to support many
different architectures.
2014-08-24 02:22:15 -05:00
jvazquez-r7
9fd635d645
Favor \! vs == false
2014-02-24 08:47:25 -06:00
jvazquez-r7
8af992e083
Use same coding style
2014-02-21 16:02:27 -06:00
jvazquez-r7
0c44cc5ae4
Allow Exploits to provide Encoder Compat options
2014-02-21 15:49:39 -06:00
jvazquez-r7
4ca4d82d89
Land #2939 , @Meatballs1 exploit for Wikimedia RCE and a lot more...
2014-02-18 17:48:02 -06:00
Meatballs
0a3cb3377f
AppendEncoder
2014-02-04 15:41:10 +00:00
James Lee
b9e234f62d
Log the size if it doesn't fit
2014-02-02 22:28:23 -06:00
William Vu
f5d1d8eace
chmod -x .rb files without #! in modules and lib
...
It wasn't just cmdstager_printf.rb. :/
2013-10-30 19:51:25 -05:00
Tab Assassin
7e5e0f7fc8
Retab lib
2013-08-30 16:28:33 -05:00
James Lee
f4498c3916
Remove $Id tags
...
Also adds binary coding magic comment to a few files
2013-05-20 16:21:03 -05:00
James Lee
db676f1a88
Whitespace at EOL
2013-03-07 18:20:08 -06:00
James Lee
d36e38fca6
Move encoding into handle_connection
...
* Allows payloads that override generate_stage to still take advantage
of stage encoding
* Also adds doc comments for a few methods
2013-01-15 10:34:31 -06:00
HD Moore
d656e3185f
Mark all libraries as defaulting to 8-bit strings
2012-06-29 00:18:28 -05:00
James Lee
4181fd9709
Add support for EXE::Custom in EncodedPayload#encoded_exe
...
Fixes an issue with java_signed_applet (and probably others) not
honoring EXE::Custom settings.
2012-04-16 12:09:25 -06:00
HD Moore
1a364df37e
Pull payload/exploit options into nop modules as well
2012-03-12 23:28:47 -05:00
HD Moore
606ca82432
Share the datastore with encoders
2012-03-12 23:23:15 -05:00
scriptjunkie
9d7591467f
Fix "failed to generate" error when passing a preferred encoder to "payload.generate" method using RPC from, for example, the GUI on Windows.
...
framework.encoders[reqs['Encoder']] returns nil when, for example, reqs['Encoder'] is in UTF-8 encoding and the corresponding key of the framework.encoders hash in US-ASCII encoding.
2012-01-20 21:06:53 -06:00
Mario Ceballos
a7d95fad73
typo.. was working on some java sploit and found it.
...
git-svn-id: file:///home/svn/framework3/trunk@13667 4d416f70-5f16-0410-b530-b9f4589650da
2011-08-30 22:23:00 +00:00