Skip to content

Commit 8e7e559

Browse files
rename SHELLARG to ARGV0 because that's really what it is
1 parent a5aa6b2 commit 8e7e559

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/payloads/singles/linux/armle/shell_bind_tcp.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def initialize(info = {})
112112
register_options(
113113
[
114114
OptString.new('SHELL', [ true, "The shell to execute.", "/system/bin/sh" ]),
115-
OptString.new('SHELLARG', [ false, "The argument to pass to the shell.", "-C" ])
115+
OptString.new('ARGV0', [ false, "argv[0] to pass to execve", "sh" ]) # mostly used for busybox
116116
], self.class)
117117
end
118118

@@ -128,7 +128,7 @@ def generate
128128
arg = datastore['SHELLARG']
129129
if arg
130130
if arg.length >= 16
131-
raise ArgumentError, "The specified shell argument must be less than 16 bytes."
131+
raise ArgumentError, "The specified argv[0] must be less than 16 bytes."
132132
end
133133
p[192, arg.length] = arg
134134
end

modules/payloads/singles/linux/armle/shell_reverse_tcp.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def initialize(info = {})
112112
register_options(
113113
[
114114
OptString.new('SHELL', [ true, "The shell to execute.", "/system/bin/sh" ]),
115-
OptString.new('SHELLARG', [ false, "The argument to pass to the shell.", "-C" ])
115+
OptString.new('ARGV0', [ false, "argv[0] to pass to execve", "sh" ]) # mostly used for busybox
116116
], self.class)
117117
end
118118

@@ -125,10 +125,10 @@ def generate
125125
end
126126
p[140, sh.length] = sh
127127

128-
arg = datastore['SHELLARG']
128+
arg = datastore['ARGV0']
129129
if arg
130130
if arg.length >= 16
131-
raise ArgumentError, "The specified shell argument must be less than 16 bytes."
131+
raise ArgumentError, "The specified argv[0] must be less than 16 bytes."
132132
end
133133
p[156, arg.length] = arg
134134
end

0 commit comments

Comments
 (0)