Changeset 700
- Timestamp:
- 12/10/2011 04:11:35 AM (18 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
docs/CHANGES.txt (modified) (1 diff)
-
nikto.pl (modified) (4 diffs)
-
plugins/nikto_core.plugin (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/CHANGES.txt
r699 r700 1 1 2011-12-09 2 - Ticket 228: Add client SSL certificate support. Thanks to monnerat for code submission! 2 3 - Ticket 226: Add GMT offset to time outputs 3 4 - Ticket 224: Space in robots.txt kills scanner -
trunk/nikto.pl
r694 r700 126 126 my @MARKS = set_targets($CLI{'host'}, $CLI{'ports'}, $CLI{'ssl'}, $CLI{'root'}); 127 127 128 if (defined($CLI{'key'}) || defined($CLI{'cert'})) { 129 $CLI{'key'} = $CLI{'cert'} unless (defined($CLI{'key'})); 130 $CLI{'cert'} = $CLI{'key'} unless (defined($CLI{'cert'})); 131 } 132 128 133 # Now check each target is real and remove duplicates/fill in extra information 129 134 foreach my $mark (@MARKS) { … … 140 145 141 146 # Check that the port is open 142 my $open = port_check($mark->{'hostname'}, $mark->{'ip'}, $mark->{'port'} );147 my $open = port_check($mark->{'hostname'}, $mark->{'ip'}, $mark->{'port'}, $CLI{'key'}, $CLI{'cert'}); 143 148 if (defined $CLI{'vhost'}) { $mark->{'vhost'} = $CLI{'vhost'} } 144 149 if ($open == 0) { … … 151 156 $mark->{'ssl'} = $open - 1; 152 157 158 if ($mark->{'ssl'}) { 159 $mark->{'key'} = $CLI{'key'}; 160 $mark->{'cert'} = $CLI{'cert'}; 161 } 153 162 } 154 163 … … 174 183 $mark->{'vhost'} = $CLI{'vhost'}; 175 184 } 176 $request{'whisker'}->{'port'} = $mark->{'port'}; 177 $request{'whisker'}->{'ssl'} = $mark->{'ssl'}; 178 $request{'whisker'}->{'version'} = $CONFIGFILE{'DEFAULTHTTPVER'}; 185 $request{'whisker'}->{'port'} = $mark->{'port'}; 186 $request{'whisker'}->{'ssl'} = $mark->{'ssl'}; 187 $request{'whisker'}->{'ssl_rsacertfile'} = $mark->{'key'}; 188 $request{'whisker'}->{'ssl_certfile'} = $mark->{'cert'}; 189 $request{'whisker'}->{'version'} = $CONFIGFILE{'DEFAULTHTTPVER'}; 179 190 180 191 # Cookies -
trunk/plugins/nikto_core.plugin
r699 r700 508 508 "host=s" => \$CLI{'host'}, 509 509 "id=s" => \$CLI{'hostauth'}, 510 "key=s" => \$CLI{'key'}, 510 511 "IgnoreCode=s" => \$CLI{'ignorecode'}, 511 512 "list-plugins" => \&list_plugins, … … 521 522 "Pause=f" => \$CLI{'pause'}, 522 523 "Plugins=s" => \$CLI{'plugins'}, 524 "RSAcert=s" => \$CLI{'cert'}, 523 525 "port=s" => \$CLI{'ports'}, 524 526 "root=s" => \$CLI{'root'}, … … 1373 1375 ############################################################################### 1374 1376 sub port_check { 1375 my ($hostname, $ip, $port ) = @_;1377 my ($hostname, $ip, $port, $key, $cert) = @_; 1376 1378 my (%headers); 1377 1379 my $m = {}; … … 1402 1404 ); 1403 1405 $m->{ssl} = ($checkssl eq "HTTP") ? 0 : 1; 1406 if ($m->{'ssl'}) { 1407 $m->{'key'} = $key; 1408 $m->{'cert'} = $cert; 1409 } 1404 1410 proxy_check($m); 1405 1411 my ($res, $content) = … … 2058 2064 $reqhash->{'whisker'}->{'port'} = $mark->{'port'}; 2059 2065 $reqhash->{'whisker'}->{'ssl'} = $mark->{'ssl'}; 2066 $reqhash->{'whisker'}->{'ssl_rsacertfile'} = $mark->{'key'}; 2067 $reqhash->{'whisker'}->{'ssl_certfile'} = $mark->{'cert'}; 2060 2068 2061 2069 # Proxy stuff … … 2621 2629 -IgnoreCode Ignore Codes--treat as negative responses 2622 2630 -id+ Host authentication to use, format is id:pass or id:pass:realm 2631 -key+ Client certificate key file 2623 2632 -list-plugins List all available plugins, perform no testing 2624 2633 -maxtime+ Maximum testing time per host … … 2640 2649 -Plugins+ List of plugins to run (default: ALL) 2641 2650 -root+ Prepend root value to all requests, format is /directory 2651 -RSAcert+ Client certificate file 2642 2652 -ssl Force ssl mode on port 2643 2653 -Single Single request mode … … 2671 2681 print " 2672 2682 -config+ Use this config file 2673 -Cgidirs+ scan these CGI dirs: 'none', 'all', or values like \"/cgi/ /cgi-a/\"2674 2683 -dbcheck check database and other key files for syntax errors 2675 2684 -Display+ Turn on/off display outputs 2676 -evasion+ ids evasion technique2677 2685 -Format+ save file (-o) format 2678 2686 -host+ target host … … 2680 2688 -id+ Host authentication to use, format is id:pass or id:pass:realm 2681 2689 -list-plugins List all available plugins 2682 -mutate+ Guess additional file names2683 -mutate-options+ Provide extra information for mutations2684 2690 -output+ Write output to this file 2685 2691 -nocache Disables the URI cache
Note: See TracChangeset
for help on using the changeset viewer.