| Class | Msf::Exploit |
| In: |
lib/msf/core/exploit.rb
|
| Parent: | Msf::Module |
| active_timeout | [RW] | Maximum number of seconds for active handlers |
| default_target | [R] | The default target. |
| default_target | [W] | Writable copy of the default target. |
| payload | [RW] | The encoded payload instance. An instance of an EncodedPayload object. |
| payload_info | [R] | The payload requirement hash. |
| payload_info | [W] | Writable copy of the payload requirement hash. |
| payload_instance | [RW] | The active payload instance. |
| session_count | [W] | Number of sessions created by this exploit instance. |
| session_count | [R] | The number of active sessions created by this instance |
| targets | [W] | Writable copy of the list of targets. |
| targets | [R] | The list of targets. |
Returns an array of all of the exploit mixins. Lame algorithm right now. We search the Msf::Exploit namespace for all modules that do not have any constants in them. In the future we can replace this with a better algorithm. It‘s just important that it returns an array of all of the mixin modules.
Performs last-minute sanity checking of exploit parameters. This method is called during automated exploitation attempts and allows an exploit to filter bad targets, obtain more information, and choose better targets based on the available data. Returning anything that evaluates to "false" will cause this specific exploit attempt to be skipped. This method can and will change datastore values and may interact with the backend database.
Returns a hash of the capabilities this exploit module has support for, such as whether or not it supports check and exploit.
Called after an encoded payload has been generated. This gives exploits or mixins a chance to alter the encoded payload.
Kicks off the actual exploit. Prior to this call, the framework will have validated the data store using the options associated with this exploit module. It will also pre-generate the desired payload, though exploits can re-generate the payload if necessary.
This method is designed to be overriden by exploit modules.
Generates the encoded version of the supplied payload using the payload requirements specific to this exploit. The encoded instance is returned to the caller. This method is exposed in the manner that it is such that passive exploits and re-generate an encoded payload on the fly rather than having to use the pre-generated one.
The return value is an EncodedPayload instance.
This method generates a non-cached payload which is typically useful for passive exploits that will have more than one client.
Returns the bad characters that cannot be in any payload used by this exploit.
Returns the payload encoder option hash that is used to initialize the datastore of the encoder that is selected when generating an encoded payload.
Returns the payload extended options hash which is used to provide a location to store extended information that may be useful to a particular type of payload or mixin.
Maximum number of nops to use as a hint to the framework. Nil signifies that the framework should decide.
Minimum number of nops to use as a hint to the framework. Nil snigifies that the framework should decide.
Returns the maximum amount of room the exploit has for a payload.
Generate random text characters avoiding the exploit‘s bad characters.
Generate random alpha characters avoiding the exploit‘s bad characters.
Generate random alphan lower characters avoiding the exploit‘s bad characters.
Generate random alpha upper characters avoiding the exploit‘s bad characters.
Generate random alphanumeric characters avoiding the exploit‘s bad characters.
Generate random english-like avoiding the exploit‘s bad characters.
Generate random numeric characters avoiding the exploit‘s bad characters.
Re-generates an encoded payload, typically called after something in the datastore has changed. An optional platform and architecture can be supplied as well.
Prepares the module for exploitation, initializes any state, and starts the payload handler.
This method returns the number of bytes that should be adjusted to the stack pointer prior to executing any code. The number of bytes to adjust is indicated to the routine through the payload ‘StackAdjustment’ attribute or through a target‘s payload ‘StackAdjustment’ attribute.
Gets the memory map file and other context information that is required when wanting to support context keyed encoding