2017-02-20 2 views
0

ich in meiner Form verwende @Html.AntiForgeryToken() und in Aktion, die ich verwende [ValidateAntiForgeryToken] Attribut aber als Test meine Website von Acunetix diese Fehler:HTML-Formular ohne CSRF Schutz alert (Acunetix)

HTML-Formular ohne CSRF Schutz

html:

<form action="/Car/SearchCar?uniq=-107215139" method="POST" name="form" id="FormCarSearch"> 
    <input name="__RequestVerificationToken" type="hidden" value="NpoBFo4bSCwbm0yZ6dIrpOazM00uX-rKNbru9sfVPGV9cJ8qaDsYaAqsRDDKuy0W0R7gCZSVQu_QN2qD8uTeThan7Ad78GNteLdQN2TKPYJUVD3MrxeeT1YG_i4IYaa6zzENb9CKR1p3zcW9HmDNxA2"> 
    <div class=""> 
     <h4 class="title"> 
      جستجوی خودرو : 
     </h4> 
     <div class="row"> 
      <div class="form-group col-sm-6 col-md-2 col-md-push-10 col-sm-push-6 "> 
       <div class="datepicker-wrap"> 
        <label>از تاریخ </label> 
        <input name="CarFormDate" autocomplete="off" id="CarFromDate" type="text" class="input-text full-width hasDatepicker" placeholder="از تاریخ "> 
       </div> 
      </div> 
      <div class="form-group col-sm-6 col-md-2 col-md-push-6 DestinationT"> 
       <div class="datepicker-wrap"> 
        <label>تا تاریخ </label> 
        <input name="CarToDate" autocomplete="off" id="CarToDate" type="text" class="input-text full-width hasDatepicker" placeholder="تا تاریخ "> 
       </div> 
      </div> 
      <div class="form-group col-sm-6 col-md-2 col-md-push-2 col-sm-push-6"> 
       <label> شهر</label> 
       <div class="selector"> 
        <select class="full-width" name="CarCity" id="CarCity"> 
         <option value="1">کیش</option> 
        </select><span class="custom-select full-width">کیش</span> 
       </div> 
      </div> 
      <div class="form-group col-sm-6 col-md-2 col-md-pull-2 col-sm-pull-6"> 
       <label>نوع خودرو</label> 
       <div class="selector"> 
        <select class="full-width" name="CarStyle" id="CarType"> 
         <option value="1">سواری</option> 
         <option value="2">شاسی بلند</option> 
         <option value="21">کروک اسپورت</option> 
        </select><span class="custom-select full-width">سواری</span> 
       </div> 
      </div> 
      <div class="form-group col-sm-6 col-md-2 col-md-pull-6 col-sm-push-6"> 
       <label class="transparent">جستجوی خودرو</label> 
       <button class="full-width soap-icon-search" type="button" id="SearchCar">جستجوی خودرو</button> 
      </div> 
     </div> 
    </div> 
</form> 

So beheben Sie diese Sicherheitsanfälligkeit:

Überprüfen Sie, ob dieses Formular CSRF Schutz erfordert, und implementieren Sie gegebenenfalls CSRF-Gegenmaßnahmen.

Gibt es in diesem Fall ein Problem?

Wie kann ich das beheben?

Antwort

0

CSRF-Erkennung ist naturgemäß schwer automatisch zu erkennen und erfordert häufig eine Form der menschlichen Verifizierung, um zu prüfen, ob die Warnung falsch positiv ist oder nicht.

Es gibt einen wirklich ausführlichen Artikel von Acunetix CSRF-Token unter Bezug auf die ich empfehlen würde gehen über - https://www.acunetix.com/websitesecurity/csrf-attacks/

Wenn Sie weitere Informationen benötigen, lassen Sie es mich wissen.