그래서 제가 일하고있는 사이트 중 하나가 xss 취약점이 있습니다. 그들은 취약점으로 다음 코드를 나에게 다시 전송XSS 트리거링 문제
<form name="contact_us" action="somewhere" method="post">
<div id="contactUsNoticeContent" class="content"></div>
<fieldset id="contactUsForm">
<legend>Contact Us</legend>
<div class="alert forward">* Required information</div>
<label class="inputLabel" for="contactname">Full Name:</label>
<input type="text" name="contactname" size="40" id="contactname"><span class="alert">*
</span><br class="clearBoth">
<label class="inputLabel" for="email-address">Email Address:</label>
<input type="text" name="email" size="40" id="email-address"><span class="alert">*
</span><br class="clearBoth">
<label for="enquiry">Message:<span class="alert">*</span></label>
<textarea name="enquiry" cols="30" rows="7" id="enquiry"></textarea>
</fieldset>
<div class="buttonRow forward"><input type="image"src="an image src" alt="Send Now"
title=" Send Now "></div>
<div yourface" alt="Back" title=" Back " width="85" height="25"></a></div>
</form>
:
일반적인 HTML이있다
<input type="text" name="email" value="
<s cript>alert('S AINTL2NvbnRhY3RfdX MuaHRtbD9hY3Rpb249c2VuZ CBlbWFpbA==')
</s cri pt>" s ize="40" id="emailaddress " /><s pan clas s ="alert">*</s pan>
<br clas s ="clearBoth" />
코드 $ 값을 다시 그리는 것은 원시 포스트 데이터이기 :
$field = '<input type="' . zen_output_string($type) . '" name="' .
zen_output_string($name) . '"';
if ((isset($GLOBALS[$name])) && ($reinsert_value == true)) {
$field .= ' value="' . zen_output_string(stripslashes($GLOBALS[$name])) . '"';
} elseif (zen_not_null($value)) {
$field .= ' value="' . zen_output_string($value) . '"';
}
if (zen_not_null($parameters)) $field .= ' ' . $parameters;
$field .= ' />';
양식을 제출할 때 페이지를 새로 고침 할 때 경고가 표시되어야한다고 생각하십니까? 나는 이것을 기울이는 것처럼 보이지 않는다. 나는 그것을 해결하기 위해 양식에 다시 게시하기 전에 가치에서 도대체 탈출하는 것이 필요하다고 생각하지만, 지금은 내가 할 수없는 잘못된 행동을하는 것이 궁금합니다. 어떤 사람이 어떻게 이것을 재현 할 수 있는지 또는 내가 뭘 잘못하고 있는지에 대한 아이디어가 있습니까?
알려진 취약성 btw를 가진 오래된 zen cart 프레임 워크에 있습니다. 하지만 패치를 설치하는 것보다 이해하고 싶습니다. Zen function reference
당신은 실제로 여기에 코드 중 하나를 표시하지 않습니다) 당신은 정말 당신이 모든 보호를 원하는 경우 최신 버전으로 업그레이드되어야한다. 유용한 의견을 어떻게 기대하십니까? – Amber
알림 :'L2NvbnRhY3RfdX MuaHRtbD9hY3Rpb249c2VuZ CBlbWFpbA =='는 /contact_us.html?action=send 이메일 "'(따옴표 제외)의 base64 인코딩 표현입니다. –
@amber : 이스케이프 처리 중 컨트롤러 코드가 필요한 이유는 무엇입니까? – Rooster