آسیب پذیری

بررسی آسیب پذیری Server Side Template Injection (SSTI)

???? ????? Server Side Template Injection (SSTI) ???? ?

???????? ???? (Template engines) ?? ??? ?????? ?? ???? ?????? ??? ??????? ??
???? ????? ???? ??? ???? (????????) ?? ???? ????? ?? ? ????? ?? ??????? ?? ????. ?????? ??? ???? ????? ????? ?? ???? ?? ? ???? ???? ????? Server Side Template Injection ????? ?? ?? ???? ????? ??? ?? ???? ????? ? ??? ???? ?? XSS ??? ?????.

  • ?? ???? XSS ????? ???? (Template Injection) ?? ????? ???? ???? ??????
    ?? ??? ????? ??????? ?? ? ???? ?? ??? ????? ?? ?? ??? ??? (RCE) ??????? ???? ? ??? ???? ????? ?????? ????? ????? ????? ?? ???? ???.

Template Injection ?? ????? ?? ?? ???? ???? ????? ????? ? ?? ?? ???? ???? ????? Template ?? ???? ????? ????.

???? ????? SSTI

????? ???? ??

?????? ??? ??????? ?? ???? ?? ????? ??? ???? ????? Twig ? FreeMarker ???? ??????
?????? ???? ?? ????? ?? ? ????? ?? ??????? ?? ????. Template Injection ????? ????? ?? ???? ?? ????? ????? ?? ???? ????? ?? ???? ?????? ??? ??? (???? ????? ?????? ???? ???? ????? ???? ????? ????? ?? ????? ???? ??? ??? ????). ?? ?????? ????????? ?? ?? ??? ?????? ?? ????? ??? ????? ????? ?? ??? ? ?? ?? ???? Twig ???? ??????? ?? ??? ???????? ??????? ?? ???. ??? ??? ??? ?? ???? ????? ???? ????? ???? ??? ??? ??? ??? ??? ?? ??? :

1 $output = $twig-render("Dear {first_name},", array("first_name" = $user.first_name) );

?? ??? ???? ??? ?? ??????? ????? ???? ??? ??? ????? ?? ?? ?????? ????? ?????? ??? ?? ?? ??? :

1 $output = $twig-render($_GET['custom_email'], array("first_name" $user.first_name) );

?? ????? ???? :

?? ??? ???? ??? ????? ?????? ???? ?? ?? ???? ??????? custom_email GET ?? ??? ????? ????
? ???? ????? ???? ??? ?? ???? ????? ???? ?? ?????? ?? ??? ????? ?? ??? ???? ????? XSS ???. ??? ?? ?? ???? ??? ???? ?????? ??? ?? ????? ?????? ????? ?? ???. ????? ?? ?? ???? ????? ??? ?? ???? ????? ??? ???? ????? ?? ??? :

  • ???? ???? ?? ???? ????? ????? {{7*7}} ?? ?? ????? ????? ????? ???? :
1 custom_email={{7*7}}
2
3 result : 49

?? ?????..

???? ?? ????? ????? ?????? ????? ?? ??? ???? ?? ?? ??????? ???.
???? ?? ????? ???? ???? ??????? ? ???? ??? ????? ?? ??????? ???? ??? ? ?? ?????? ?? ???? ???.

??? ???? ????? ??????? ?? ???? ????? ??????? ????? ?? ??? ?? ???? ?? ??????? ????? ?? ????
???? ?? ?? ????? ?? ?????? ???? .?? ????? ?? ????? ??????? ?????? ??? ?? ???????? ????? ???? ???? ??? ???? ???? ????? ?? ???? ????? ???? ? ?????.Template injection ?????? ?? ????? ?? ??? ?????? ????? ???? ?????? ?? ????? ????? ?? ????? ???????? ?? ?? ???? ???? ?? ???. ??? ???? ??? ??? ???? ???? ?? ??? ????? ??? ????? ???? ????? ??? SQL Injection ???

  • ?? ?? ????? ?????? ???? ???. ????? ?? ??? ?Template injection ??? ??? ????? ???? ???
    ???? ??????? ??? ????? ???? ?????? ?? ???? ?????? ????. ????? ???? ???? ????? ??? ?????? ????? ?? ????? ?? ????? ???? ???? ????. ?? ????? ???? ? ???? ??? ?? ????? ?? ??? Local File Include (LFI) ?? ???? ?? ?? ???? ????? ??? ?????? LFI ????? ?? ????? ??? ?? ?????? ??? log ???? ??? session ?? /proc/self/env ????

??? ????? ???? ???? ????? SSTI

 

 

??????? ?

???? ??????

 

???? ?

??? ???????

پویش #دو_درجه_کمتر
نمایش بیشتر

سعید باجلان

کارشناس ارشد نرم افزار وصاحب امتیاز پایگاه خبری سروش امنیت. مهارت ها: تسلط کامل به مباحث شبکه، سیسکو،هک و امنیت، مباحث مجازی سازی،بانک های اطلاعاتی فارنزیک

نوشته های مشابه

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

Time limit is exhausted. Please reload the CAPTCHA.

دکمه بازگشت به بالا