Skip to content

Commit 22aabc7

Browse files
committed
Add new module to test TNS poison
This module simply checks the server for vulnerabilities like TNS Poison
1 parent aefd15c commit 22aabc7

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
##
2+
# This module requires Metasploit: http//metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
8+
class Metasploit3 < Msf::Auxiliary
9+
10+
include Msf::Auxiliary::Report
11+
include Msf::Auxiliary::Scanner
12+
include Msf::Exploit::Remote::TNS
13+
14+
def initialize(info = {})
15+
super(update_info(info,
16+
'Name' => 'Poison Oracle TNS Listener',
17+
'Description' => %q{
18+
This module simply checks the server for vulnerabilities like TNS Poison.
19+
},
20+
'Author' => ['ir0njaw'],
21+
'License' => MSF_LICENSE,
22+
'DisclosureDate' => 'Oct 12 2014'))
23+
24+
register_options(
25+
[
26+
Opt::RPORT(1521)
27+
], self.class)
28+
29+
deregister_options('RHOST')
30+
end
31+
32+
def run_host(ip)
33+
begin
34+
connect
35+
36+
pkt = tns_packet("(CONNECT_DATA=(COMMAND=service_register_NSGR))")
37+
sock.put(pkt)
38+
a= sock.read(100)
39+
40+
flag = a.include? "(ERROR_STACK=(ERROR="
41+
if (flag==true) then print_error ip+" is not vulnerable"
42+
else print_good ip+" is vulnerable"
43+
end
44+
45+
rescue ::Rex::ConnectionError, ::Errno::EPIPE
46+
print_error("#{ip} unable to connect to the server")
47+
48+
49+
rescue ::Rex::ConnectionError
50+
rescue ::Errno::EPIPE
51+
52+
end
53+
end
54+
end

0 commit comments

Comments
 (0)