Changeset 600
- Timestamp:
- 01/03/2011 05:06:27 AM (2 years ago)
- Files:
-
- 19 edited
-
documentation/doc.xml (modified) (1 diff)
-
trunk/nikto.pl (modified) (1 diff)
-
trunk/plugins/nikto_apache_expect_xss.plugin (modified) (1 diff)
-
trunk/plugins/nikto_apacheusers.plugin (modified) (3 diffs)
-
trunk/plugins/nikto_auth.plugin (modified) (1 diff)
-
trunk/plugins/nikto_cgi.plugin (modified) (1 diff)
-
trunk/plugins/nikto_core.plugin (modified) (6 diffs)
-
trunk/plugins/nikto_dictionary_attack.plugin (modified) (2 diffs)
-
trunk/plugins/nikto_embedded.plugin (modified) (2 diffs)
-
trunk/plugins/nikto_favicon.plugin (modified) (1 diff)
-
trunk/plugins/nikto_headers.plugin (modified) (5 diffs)
-
trunk/plugins/nikto_httpoptions.plugin (modified) (4 diffs)
-
trunk/plugins/nikto_msgs.plugin (modified) (3 diffs)
-
trunk/plugins/nikto_multiple_index.plugin (modified) (1 diff)
-
trunk/plugins/nikto_outdated.plugin (modified) (3 diffs)
-
trunk/plugins/nikto_put_del_test.plugin (modified) (1 diff)
-
trunk/plugins/nikto_robots.plugin (modified) (1 diff)
-
trunk/plugins/nikto_subdomain.plugin (modified) (2 diffs)
-
trunk/plugins/nikto_tests.plugin (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
documentation/doc.xml
r586 r600 397 397 <listitem> 398 398 <para>q - Quit</para> 399 </listitem> 400 401 <listitem> 402 <para>N - Next host</para> 399 403 </listitem> 400 404 -
trunk/nikto.pl
r585 r600 219 219 my $elapsed = $mark->{'end_time'} - $mark->{'start_time'}; 220 220 if (!$CLI{'findonly'}) { 221 nprint( 222 "+ $NIKTO{'total_checks'} items checked: $mark->{'total_errors'} error(s) and $mark->{'total_vulns'} item(s) reported on remote host" 223 ); 221 if (!$mark->{'terminate'}) { 222 nprint("+ $NIKTO{'total_checks'} items checked: $mark->{'total_errors'} error(s) and $mark->{'total_vulns'} item(s) reported on remote host"); 223 } 224 else { 225 nprint("+ Scan terminated: $mark->{'total_errors'} error(s) and $mark->{'total_vulns'} item(s) reported on remote host"); 226 } 224 227 nprint("+ End Time: $time ($elapsed seconds)"); 225 228 } -
trunk/plugins/nikto_apache_expect_xss.plugin
r486 r600 39 39 40 40 sub nikto_apache_expect_xss { 41 return if $mark->{'terminate'}; 41 42 my ($mark) = @_; 42 43 my %headers = ('Expect', '<script>alert(xss)</script>'); -
trunk/plugins/nikto_apacheusers.plugin
r483 r600 46 46 47 47 sub nikto_apacheusers { 48 return if $mark->{'terminate'}; 48 49 my ($mark, $parameters) = @_; 49 50 my $apacheusers = 0; … … 156 157 my @foundusers = (); 157 158 while (length($text) <= $size) { 159 return if $mark->{'terminate'}; 158 160 if (($ctr % 500) eq 0) { nprint("- User enumeration guess $ctr ($text)", "v"); } 159 161 ($result, $content) = … … 186 188 # Now attempt on each entry 187 189 while (<IN>) { 190 return if $mark->{'terminate'}; 188 191 chomp; 189 192 s/\#.*$//; -
trunk/plugins/nikto_auth.plugin
r582 r600 133 133 # Now we have this we can try guessing the password 134 134 foreach my $entry (@{$REALMS}) { 135 return if $mark->{'terminate'}; 135 136 unless ($realm =~ /$entry->{'realm'}/i || $entry->{'realm'} eq '@ANY') { next; } 136 137 -
trunk/plugins/nikto_cgi.plugin
r483 r600 62 62 { 63 63 foreach $possiblecgidir (@CFGCGI) { 64 return if $mark->{'terminate'}; 64 65 ($res, $content) = nfetch($mark, $possiblecgidir, "GET", "", "", "", "cgi dir check"); 65 66 nprint("Checked for CGI dir\t$possiblecgidir\tgot:$res", "d"); -
trunk/plugins/nikto_core.plugin
r599 r600 268 268 269 269 foreach my $file (keys %REQS) { 270 return if $mark->{'terminate'}; 270 271 nprint("- Testing error for file: $file\n", "v"); 271 272 %headers = (); … … 741 742 if ($key eq ' ') { 742 743 status_report(); 743 return;744 744 } 745 745 elsif ($key eq 'v') { … … 783 783 nprint("- Resuming."); 784 784 } 785 elsif ($key eq 'N') { 786 nprint("- Terminating host scan."); 787 return 'term'; #$mark->{'terminate'}=1; 788 } 785 789 return; 786 790 } … … 1458 1462 sub run_hooks { 1459 1463 my ($mark, $type, $request, $result) = @_; 1464 return if $mark->{'terminate'}; 1460 1465 1461 1466 foreach my $plugin (@{ $PLUGINORDER{$type} }) { 1467 return if $mark->{'terminate'}; 1462 1468 my ($run) = 1; 1463 1469 … … 2025 2031 # check for keyboard input 2026 2032 if (($NIKTO{'totalrequests'} % 10) == 0) { 2027 check_input();2033 if (check_input() eq 'term') { $mark->{'terminate'}=1; } 2028 2034 } 2029 2035 … … 2054 2060 unless ($flags->{'noprefetch'}) { 2055 2061 (%$request, %$result) = run_hooks($mark, "prefetch", \%request, \%result); 2056 }2062 } 2057 2063 2058 2064 # Check cache -
trunk/plugins/nikto_dictionary_attack.plugin
r537 r600 39 39 40 40 sub nikto_dictionary_attack { 41 return if $mark->{'terminate'}; 41 42 my ($mark, $parameters) = @_; 42 43 … … 70 71 # Now attempt on each entry 71 72 while (<IN>) { 73 return if $mark->{'terminate'}; 72 74 chomp; 73 75 s/\#.*$//; -
trunk/plugins/nikto_embedded.plugin
r592 r600 44 44 45 45 sub nikto_embedded { 46 return if $mark->{'terminate'}; 46 47 my ($mark) = @_; 47 48 my $dbarray; … … 49 50 50 51 foreach my $item (@$dbarray) { 52 return if $mark->{'terminate'}; 51 53 (my $res, $content) = 52 54 nfetch($mark, $item->{'uri'}, "GET", "", "", "", "embedded detection"); -
trunk/plugins/nikto_favicon.plugin
r537 r600 37 37 38 38 sub nikto_favicon { 39 return if $mark->{'terminate'}; 39 40 my ($mark) = @_; 40 41 my ($RES, $CONTENT) = nfetch($mark, "/favicon.ico", "GET", "", "", "", "favicon"); -
trunk/plugins/nikto_headers.plugin
r582 r600 45 45 46 46 sub nikto_headers_postfetch { 47 return if $mark->{'terminate'}; 47 48 my ($mark, $parameters, $request, $result) = @_; 48 49 … … 63 64 64 65 sub nikto_headers_check { 66 return if $mark->{'terminate'}; 65 67 my ($mark, $result, $header, $message, $tid) = @_; 66 68 … … 87 89 88 90 sub nikto_headers { 91 return if $mark->{'terminate'}; 89 92 my ($mark) = @_; 90 93 my $dbarray = init_db("db_headers"); … … 96 99 foreach 97 100 my $f (qw/\/index.asp \/junk999.asp \/index.aspx \/junk988.aspx \/login.asp \/login.aspx/) { 101 return if $mark->{'terminate'}; 98 102 (my $res, $content) = 99 103 nfetch($mark, $f, "GET", "", \%transheaders, "", "headers: Translate-f #1"); … … 227 231 # Try to grab a standard file 228 232 foreach my $f (qw/\/index.html \/index.htm \/robots.txt/) { 233 return if $mark->{'terminate'}; 229 234 (my $res, $content) = nfetch($mark, $f, "GET", "", \%headers, "", "headers: etag"); 230 235 last if (defined $headers{'etag'}); -
trunk/plugins/nikto_httpoptions.plugin
r537 r600 42 42 43 43 sub nikto_httpoptions { 44 return if $mark->{'terminate'}; 44 45 my ($mark) = @_; 45 46 my %headers; … … 100 101 # Check for other weirdness 101 102 # IIS Debug 102 103 return if $mark->{'terminate'}; 103 104 ($res, $content) = nfetch($mark, "/", "DEBUG", "", "", "", "httpoptions: DEBUG"); 104 105 if ($res == 200) { … … 113 114 114 115 # IIS PROPFIND HEADER 116 return if $mark->{'terminate'}; 115 117 %headers = ("Host" => "", 116 118 "Content-Length" => "0",); … … 134 136 # Check for all flavours of HTTP 135 137 foreach my $version (split(/ /, "1.0 1.1")) { 138 return if $mark->{'terminate'}; 136 139 $request{'whisker'}{'version'} = $version; 137 140 ($res, $content) = -
trunk/plugins/nikto_msgs.plugin
r592 r600 45 45 46 46 sub nikto_msgs { 47 return if $mark->{'terminate'}; 47 48 my ($mark) = @_; 48 49 my $dbarray; … … 66 67 67 68 # Computer name 69 return if $mark->{'terminate'}; 68 70 my $name = $CONTENT; 69 71 $name =~ s#(^.*<ComputerName>)([a-zA-Z0-9]*)(</ComputerName>.*$)#$2#; … … 83 85 nfetch($mark, "/cpqlogin.htm", "GET", "", "", "", "msgs: CompaqHTTPServer"); 84 86 next unless ($RES == 200); 87 return if $mark->{'terminate'}; 85 88 my $ipaddrs = ""; 86 89 my $name; -
trunk/plugins/nikto_multiple_index.plugin
r576 r600 42 42 my ($found, $hashes); 43 43 foreach my $item (@$dbarray) { 44 return if $mark->{'terminate'}; 44 45 45 46 # Use nfetch to minimise extra code -
trunk/plugins/nikto_outdated.plugin
r592 r600 37 37 38 38 sub nikto_outdated { 39 return if $mark->{'terminate'}; 39 40 my ($mark) = @_; 40 41 … … 70 71 else # must create sepr 71 72 { 72 73 73 # use the last non 0-9 . a-z char as a sepr (' ', '-', '_' etc) 74 74 my $sepr = $mark->{'banner'}; … … 120 120 121 121 sub vereval { 122 123 122 # split both by last char of @_[0], as it is the name to version separator 124 123 my $sepr = substr($_[2], (length($_[2]) - 1), 1); -
trunk/plugins/nikto_put_del_test.plugin
r483 r600 38 38 39 39 sub nikto_put_del_test { 40 return if $mark->{'terminate'}; 40 41 my ($mark) = @_; 41 42 my $msg; -
trunk/plugins/nikto_robots.plugin
r483 r600 40 40 41 41 sub nikto_robots { 42 return if $mark->{'terminate'}; 42 43 my ($mark) = @_; 43 44 my %headers; -
trunk/plugins/nikto_subdomain.plugin
r499 r600 39 39 40 40 sub nikto_subdomain { 41 return if $mark->{'terminate'}; 41 42 my ($mark) = @_; 42 43 my $dbarray = init_db("db_subdomains"); … … 61 62 62 63 foreach my $item (@$dbarray) { 64 return if $mark->{'terminate'}; 63 65 64 66 # Use nfetch to minimize extra code -
trunk/plugins/nikto_tests.plugin
r592 r600 42 42 43 43 sub nikto_tests { 44 return if $mark->{'terminate'}; 44 45 my ($mark, $parameters) = @_; 45 46 46 47 # this is the actual the looped code for all the checks 47 48 foreach my $checkid (sort keys %TESTS) { 49 return if $mark->{'terminate'}; 48 50 if ($checkid >= 500000) { next; } # skip TESTS added manually during run (for reports) 49 51 # replace variables in the uri … … 52 54 # Now repeat for each uri 53 55 foreach my $uri (@urilist) { 56 return if $mark->{'terminate'}; 54 57 my %headers; 55 58 (my $res, $content, $error) = … … 183 186 184 187 foreach my $dir (@DIRS) { 188 return if $mark->{'terminate'}; 185 189 foreach my $file (@PFILES) { 186 190 next if ($file eq ""); … … 190 194 191 195 foreach my $ext (@EXTS) { 196 return if $mark->{'terminate'}; 192 197 193 198 # dir/file.ext … … 238 243 foreach my $dir (keys %DIRS) { 239 244 foreach my $file (keys %FILES) { 245 return if $mark->{'terminate'}; 240 246 testfile($mark, "$dir$file", "all checks", 299999); 241 247 } … … 244 250 245 251 sub testfile { 252 return if $mark->{'terminate'}; 246 253 my ($mark, $uri, $name, $tid) = @_; 247 254 my ($res, $content, $error) = nfetch($mark, "$uri", "GET", "", "", "", "Tests: $name");
Note: See TracChangeset
for help on using the changeset viewer.