Skip to content

Commit 9cb5fe9

Browse files
committed
Adjusted injectorshell
1 parent 6e49554 commit 9cb5fe9

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

ssh_mitm_plugins/ssh/injectorshell.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def injector_connect(self):
9393
self.close_session(self.channel)
9494

9595
def forward_stdin(self):
96-
# MTODO: maybe add host priority (priority queue); silent mode with client blocking input from injectors
9796
if self.session.ssh_channel.recv_ready():
9897
buf = self.session.ssh_channel.recv(self.BUF_LEN)
9998
self.queue.put((buf, self.session.ssh_channel))
@@ -126,11 +125,11 @@ class InjectorShell(threading.Thread):
126125

127126
BUF_LEN = 1024
128127
STEALTH_WARNING = """
129-
[NOTE]\r\n
130-
This is a hidden shell injected into the secure session the originally host created.\r\n
131-
Any commands issued CAN affect the environment of the user BUT will not be displayed on their terminal!\r\n
132-
Exit the hidden shell with CTRL+C
133-
"""
128+
[INFO]\r
129+
This is a hidden shell injected into the secure session the original host created.\r
130+
Any commands issued CAN affect the environment of the user BUT will not be displayed on their terminal!\r
131+
Exit the hidden shell with CTRL+C\r
132+
"""
134133

135134
def __init__(self, remote, client_channel, forwarder):
136135
super(InjectorShell, self).__init__()

ssh_mitm_plugins/ssh/stealthshell.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,10 @@ class StealthShell(threading.Thread):
152152
BUF_LEN = 1024
153153
STEALTH_WARNING = """
154154
[INFO]\r
155-
This is a hidden shell injected into the secure session the original host created.\r
155+
This is a stealth shell injected into the secure session the original host created.\r
156156
Any commands issued CAN affect the environment of the user BUT will not be displayed on their terminal!\r
157-
Exit the hidden shell with CTRL+C\r
158-
"""
159-
SUPER_STEALTH = """
160-
[SUPERSTEALTH]\r
161157
Commands from the injected shell will only be executed if they do not interfere with normal operation of the original host!\r
158+
Exit the hidden shell with CTRL+C\r
162159
"""
163160

164161
def __init__(self, remote, client_channel, forwarder):
@@ -170,9 +167,7 @@ def __init__(self, remote, client_channel, forwarder):
170167
self.command = b''
171168

172169
def run(self) -> None:
173-
self.client_channel.sendall(
174-
self.STEALTH_WARNING + (self.SUPER_STEALTH if self.forwarder.args.ssh_injector_super_stealth else "")
175-
)
170+
self.client_channel.sendall(self.STEALTH_WARNING)
176171
try:
177172
while not self.forwarder.session.ssh_channel.closed:
178173
if self.client_channel.recv_ready():

0 commit comments

Comments
 (0)