Changeset 282


Ignore:
Timestamp:
01/27/2010 04:58:21 AM (3 years ago)
Author:
sullo
Message:

This wasn't actually working ($mark wasn't passed around), and the prefix wasn't properly assigned if it was using cgiwrap to scan

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/nikto_user_enum_apache.plugin

    r268 r282  
    4747   my ($mark) = @_; 
    4848   my $url; 
    49    my @cgiwraps, @cfgcgi=split(/ /, $VARIABLES{"\@CGIDIRS"}); 
    50     
     49   my @cgiwraps; 
     50   my @cfgcgi=split(/ /, $VARIABLES{"\@CGIDIRS"}); 
     51 
    5152   # Set the URL according to the mutate version 
    5253   my @mutates=split(//,$CLI{'mutate'}); 
     
    6061         { 
    6162            # We have options - assume it is a dictionary attack 
    62             nikto_user_enum_apache_dictionary($url); 
     63            nikto_user_enum_apache_dictionary($url, $mark); 
    6364         } 
    6465         else 
    6566         { 
    66             nikto_user_enum_apache_brute($url); 
     67            nikto_user_enum_apache_brute($url, $mark); 
    6768         } 
    6869      } 
     
    8889            { 
    8990               # We have options - assume it is a dictionary attack 
    90                nikto_user_enum_apache_dictionary($url); 
     91               nikto_user_enum_apache_dictionary($url, $mark); 
    9192            } 
    9293            else 
    9394            { 
    94                nikto_user_enum_apache_brute($url); 
     95               nikto_user_enum_apache_brute($url, $mark); 
    9596            } 
    9697         } 
     
    113114   # be 'brute force' would it? (jfs) 
    114115 
     116   my $url=shift; 
     117   my ($mark)=@_; 
    115118   my $text = "a"; 
    116119   my $ctr  = 0; 
     
    121124   { 
    122125      if (($ctr % 500) eq 0) { nprint("- User enumeration guess $ctr ($text)", "v"); } 
    123       (my $result, $content) = nfetch($mark,"/~" . $text, "HEAD"); 
     126      (my $result, $content) = nfetch($mark, $url . $text, "HEAD"); 
    124127      my $user = nikto_user_enum_apache_check($result, $text); 
    125128      if (defined $user) 
     
    132135   if ($found) 
    133136   { 
    134       add_vulnerability($mark, $message . join(' ',@foundusers), 999997, "637", "HEAD", "/"); 
     137      add_vulnerability($mark, $message . join(', ',@foundusers), 999997, "637", "HEAD", "/"); 
    135138   } 
    136139    
     
    140143{ 
    141144   my $filename=$CLI{'mutate-options'}; 
     145   my $url=shift; 
     146   my ($mark)=@_; 
    142147   my $message="Valid users found via Apache enumeration: "; 
    143148   my @foundusers=(); 
     
    160165      if ($_ eq "" ) { next }; 
    161166      if (($ctr % 500) == 0) { nprint("- User enumeration guess $ctr ($_)", "v"); } 
    162       (my $result, $content) = nfetch($mark,"/~" . $_, "HEAD"); 
     167      (my $result, $content) = nfetch($mark, $url . $_, "HEAD"); 
    163168      my $user = nikto_user_enum_apache_check($result, $_); 
    164169      if ($user) 
     
    171176   if (scalar(@foundusers)) 
    172177   { 
    173       add_vulnerability($mark, $message . join(' ',@foundusers), 999997, "637", "HEAD", "/"); 
     178      add_vulnerability($mark, $message . join(', ',@foundusers), 999997, "637", "HEAD", "/"); 
    174179   } 
    175180} 
Note: See TracChangeset for help on using the changeset viewer.