* Build the HTTPS server on top of HTTP instead of the other way around
* Set the fetch service to nil after it has been cleaned up
* Don't capitalize the H in the word handler
* Check if the fetch_service is truthy before cleaning it up
* Remove the unused FetchServerName datastore option
* Fixup the description text
* Don't allow slashes in fetch file names
* Also add the #fetch_bindnetloc method
Fix a problem in fetch/tftp.rb
This updates the aarch64 payloads to include comments with the
corresponding instructions for each little-endian integer. It also fixes
the debug output for x64 payloads under rosetta.
This commit adds the sign method to Payload::MachO which performs a
basic SHA256 signature update on the provided macho to enable it to run
under osx aarch64 systems.
The size requriement is used when the adapted payload is executed from
the command line but that's not the case for the fetch payloads which
execute a command to fetch the payload from a URL. The payload size
doesn't matter because it's included in the executable file hosted at
the URL.
- Put all the error-disabling statements on a single line
- Remove some useless spaces
- Use `stristr(…)` (available since PHP4) instead of `strpos(strtolower(…))`
- Use `&&` instead of `and`
- Use backticks instead of `passthru`, since they're equivalent: https://www.php.net/manual/en/language.operators.execution.php
The internal AES and RSA implementations use base64+zlib to save space
so it only makes sense that the outer encoding should use it as well.
This reduces the final payload size considerably.
The only differences between the encrypt and decrypt functions are which
lookup tables they use and which order the bytes are sampled from rows.
Consolidating the functions like this also results in a consistent
10-15% performance improvement over the previous implementation.
Unfortunately, the constants have to be calculated using utility functions
because Python 3 changes how list comprehensions work during class creation.
However, the current implementation is Python 2/3 compatible.