Commit Graph

952 Commits

Author SHA1 Message Date
Spencer McIntyre 44916e67d5 Check if the SMB share exists before overwriting 2024-01-29 16:55:25 -05:00
Spencer McIntyre 3d476f4ef3 Add the missing #on_client_connect method 2024-01-29 16:44:32 -05:00
Spencer McIntyre b9cf7ba894 Fix an issue where info would raise an exception
Fix instances where the `info` command would raise an exception while
generating the payload to calculate its length.
2024-01-29 16:44:32 -05:00
Spencer McIntyre 1c36d89942 Fix a double deref issue with the HTTP service 2024-01-29 16:44:32 -05:00
Spencer McIntyre 96316a94fe Initial SMB server for fetch payloads 2024-01-29 16:44:28 -05:00
Spencer McIntyre a8c240f671 Refactor existing fetch work
* 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
2024-01-29 13:34:56 -05:00
adfoster-r7 9d66ff650d Land #18691, Bump the minimum version of apktool 2024-01-11 00:55:48 +00:00
Spencer McIntyre c91660bc54 Bump the minimum version of apktool
Bump the minimum version of apktool to avoid CVE-2024-21633
2024-01-10 16:19:21 -05:00
h00die 6a851855a8 spelling fixes for lib folder 2024-01-06 15:54:49 -05:00
adfoster-r7 ad608f6999 Update database connection logic to avoid startup crashes 2023-11-14 18:29:14 +00:00
sjanusz-r7 daa8b8ae99 Use Metasploit-Payloads Crypto to decrypt payloads 2023-10-13 14:42:10 +01:00
sjanusz-r7 1140efc8b4 Support adding encrypted files to archives & jars 2023-10-13 14:42:10 +01:00
Ashley Donaldson 874366588c Update metasploit side for java metasploit-payloads fix 2023-10-11 15:00:19 -04:00
sjanusz-r7 e70f356239 Show errors on inaccessible payload files 2023-10-02 14:46:25 +01:00
Spencer McIntyre 3c6f5419f2 Land #18214, Change fetch payload default options
Change default command to certutil for Windows HTTP Fetch and default…
2023-08-23 17:45:10 -04:00
bwatters 71ded31aae Add check to make sure that FETCH_SRVHOST is set properly for bind payloads, too. 2023-08-23 12:50:25 -05:00
bwatters feb54c812c Rather than use default options, deregister and reregister 2023-07-31 16:38:09 -05:00
usiegl00 9019b51eaa Update AARCH64 Shellcode Generation
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.
2023-07-29 08:26:56 -07:00
bwatters 39f24a305e Change default command to certutil for Windows HTTP Fetch and default FETCH_SRVHOST to LHOST 2023-07-24 15:53:19 -05:00
usiegl00 44762f18e8 Increase Stack Space for Loader
This increases the stack stack space mmap'd for the 2nd stage loader and
should fix the invalid stack memory access crash on the staged payload.
2023-06-19 10:57:37 +02:00
usiegl00 e70bdb028a Basic MachO Signing
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.
2023-06-19 10:57:37 +02:00
bwatters 63abeb331d Remove default value 2023-06-15 08:46:45 -05:00
bwatters cabae172f9 Remove superfluous setup_handler 2023-06-13 16:03:55 -05:00
bwatters 548d7e76a8 Fix accidental diff 2023-06-13 16:01:58 -05:00
bwatters 1af9660296 Add routable address type 2023-06-13 10:29:15 -05:00
bwatters 9e773b3f35 Fix issue with info command and IP address check 2023-06-13 10:16:07 -05:00
adfoster-r7 c8f942cc03 Land #17955, Golf a bit the php payload 2023-06-12 16:31:00 +01:00
Spencer McIntyre 8a0dfa57a0 Drop size requirement and fix descriptions
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.
2023-05-30 15:03:06 -04:00
bwatters 548a2d7ab4 Add fetch payloads for Windows and Linux x64 2023-05-18 10:47:29 -05:00
jvoisin 3b66b3416f Golf a bit the php payload
- 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
2023-05-04 22:25:32 +02:00
cgranleese-r7 e6c1aecd26 Land #17502, Adds SCTP Sessions 2023-04-12 10:15:43 +01:00
bcoles 8525849763 Msf::Payload::Apk: Bump apktool minimum required version to 2.7.0 2023-04-10 21:07:25 +10:00
Grant Willcox 10af603858 Land #17673, Msf::Payload::Apk: apktool: Decompile only main classes 2023-03-07 13:01:20 -06:00
Spencer McIntyre 08cb115368 Handle encoding stages of different architectures 2023-03-01 12:17:37 -05:00
bcoles b19ab03da1 Msf::Payload::Apk: apktool: Decompile only main classes 2023-02-25 01:08:20 +11:00
RageLtMan a215d64574 Linux x64 binary reverse SCTP stager
Implement binary SCTP stager for Linux x64.

Testing:
  Successful test against Arch Linux x64 VM in local Libvirt
2023-02-08 21:47:28 -05:00
bwatters 3eb86b92e1 Land #17191, Fix bug in linux reverse_tcp_x64 when running on WSL
Merge branch 'land-17191' into upstream-master
2022-12-15 09:02:57 -06:00
Jiashuo Liang d32df1d3dc Fix linux reverse_tcp_x64 rdx register value 2022-11-23 19:36:37 +08:00
adfoster-r7 7dcf65d7c3 Fix python reverse http stager crash 2022-11-18 14:32:36 +00:00
llamasoft eb11334f18 Compress python meterpreter payload
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.
2022-11-05 15:42:45 -04:00
adfoster-r7 0b2ee36e8a Fix pe inject payload crash 2022-11-03 19:42:17 +00:00
Spencer McIntyre d8dfee5864 Move the python code into python files 2022-10-31 10:35:28 -04:00
Spencer McIntyre 69f0f3aebc Fix Python Meterpreter for v3.1-v3.3 2022-10-31 10:35:28 -04:00
llamasoft d61656c591 Use generator instead of list 2022-10-22 17:08:32 -04:00
llamasoft 42b7c7f69a Use range instead of xrange 2022-10-22 17:07:50 -04:00
llamasoft 9ddc05a464 Consolidate encrypt/decrypt functions
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.
2022-10-20 20:54:10 -04:00
llamasoft d3a72cac84 Generate AES constants at runtime
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.
2022-10-20 20:54:02 -04:00
llamasoft 6c95a5543c Remove unused function 2022-10-19 22:22:31 -04:00
Spencer McIntyre 59570336bd Don't call #generate_stage in single payloads
Single payloads should be using #generate because they are not staged.
2022-09-22 14:45:54 -04:00
Spencer McIntyre ec4c45f145 Land #16521, Add custom stage 2022-09-08 14:44:32 -04:00