You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The idea behind fileless execution are anonymous files. The bash script will search through all processes owned by $USER and search from all file descriptor. If it will find anonymous file (contains "memfd") with correct permissions (rwx), it will copy the payload into that descriptor with defined fetch command and finally call that descriptor
Copy file name to clipboardExpand all lines: lib/msf/core/payload/adapter/fetch/linux_options.rb
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ def initialize(info = {})
5
5
[
6
6
Msf::OptEnum.new('FETCH_COMMAND',[true,'Command to fetch payload','CURL',%w[CURLFTPTFTPTNFTPWGET]]),
7
7
Msf::OptEnum.new('FETCH_FILELESS',[true,'Attempt to run payload without touching disk by using anonymous handles, requires Linux ≥3.17 (for Python variant also Python ≥3.8','none',['none','bash','python3.8+']]),
8
-
Msf::OptString.new('FETCH_FILENAME',[false,'Name to use on remote system when storing payload; cannot contain spaces or slashes',Rex::Text.rand_text_alpha(rand(8..12))],regex: %r{^[^\s/\\]*$},conditions: ['FETCH_FILELESS','==','false']),
9
-
Msf::OptBool.new('FETCH_PIPE',[true,'Attempt to run payload without touching disk, Linux ≥3.17 only',false]),
10
-
Msf::OptString.new('FETCH_WRITABLE_DIR',[true,'Remote writable dir to store payload; cannot contain spaces','./'],regex: /^\S*$/,conditions: ['FETCH_FILELESS','==','false'])
8
+
Msf::OptString.new('FETCH_FILENAME',[false,'Name to use on remote system when storing payload; cannot contain spaces or slashes',Rex::Text.rand_text_alpha(rand(8..12))],regex: %r{^[^\s/\\]*$},conditions: ['FETCH_FILELESS','==','none']),
9
+
Msf::OptBool.new('FETCH_PIPE',[true,'Host both the binary payload and the command so it can be piped directly to the shell.',false],conditions: ['FETCH_COMMAND','in',%w[CURLWGET]]),
10
+
Msf::OptString.new('FETCH_WRITABLE_DIR',[true,'Remote writable dir to store payload; cannot contain spaces','./'],regex: /^\S*$/,conditions: ['FETCH_FILELESS','==','none'])
Copy file name to clipboardExpand all lines: lib/msf/core/payload/adapter/fetch/windows_options.rb
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ def initialize(info = {})
6
6
[
7
7
Msf::OptEnum.new('FETCH_COMMAND',[true,'Command to fetch payload','CURL',%w{CURLTFTPCERTUTIL}]),
8
8
Msf::OptString.new('FETCH_FILENAME',[false,'Name to use on remote system when storing payload; cannot contain spaces or slashes',Rex::Text.rand_text_alpha(rand(8..12))],regex: %r{^[^\s/\\]*$}),
9
+
Msf::OptBool.new('FETCH_PIPE',[true,'Host both the binary payload and the command so it can be piped directly to the shell.',false],conditions: ['FETCH_COMMAND','in',%w[CURL]]),
9
10
Msf::OptString.new('FETCH_WRITABLE_DIR',[true,'Remote writable dir to store payload; cannot contain spaces.','%TEMP%'],regex:/^[\S]*$/)
0 commit comments