@@ -27,14 +27,17 @@ def initialize(info={})
27
27
'License' => MSF_LICENSE ,
28
28
'Author' => [ 'Borja Merino <bmerinofe[at]gmail.com>' ] ,
29
29
'Platform' => [ 'win' ] ,
30
- 'SessionTypes' => [ 'meterpreter' ]
30
+ 'SessionTypes' => [ 'meterpreter' ] ,
31
+ 'References' => [
32
+ [ 'URL' , 'http://www.shelliscoming.com/2014/11/getting-outbound-filtering-rules-by.html' ]
33
+ ]
31
34
) )
32
35
register_options (
33
36
[
34
37
OptAddress . new ( "ADDRESS" , [ true , 'Destination IP address.' ] ) ,
35
38
OptInt . new ( 'HOPS' , [ true , 'Number of hops to get.' , 3 ] ) ,
36
39
OptInt . new ( 'MIN_TTL' , [ true , 'Starting TTL value.' , 1 ] ) ,
37
- OptString . new ( 'PORTS' , [ true , 'Ports to test (e.g. 80,443,100-110).' ] ) ,
40
+ OptString . new ( 'PORTS' , [ true , 'Ports to test (e.g. 80,443,100-110).' , '80,443' ] ) ,
38
41
OptInt . new ( 'TIMEOUT' , [ true , 'Timeout for the ICMP socket.' , 3 ] ) ,
39
42
OptBool . new ( 'STOP' , [ true , 'Stop when it finds a public IP.' , false ] )
40
43
] , self . class )
@@ -165,7 +168,7 @@ def run
165
168
hop = connections ( remote , dport , h_icmp , h_tcp , to )
166
169
if hop != nil
167
170
print_good ( "#{ i } #{ hop } " )
168
- if datastore [ 'STOP' ] == true and hop !~ /^ \s *(?:10 \. |192 \. 168|172.(?:1[6-9]|2[0-9]|3[01]) \. |169 \. 254)/
171
+ if datastore [ 'STOP' ] == true and not Rex :: Socket . is_internal? ( hop )
169
172
print_good ( "Public IP reached. The port #{ dport } is not filtered" )
170
173
break
171
174
end
0 commit comments