[CISCN2019 South East Division] Web11

[CISCN2019 South East Division] Web11

The sun and the moon back to supination; rivers but want to make the painting

Test sites: ssti ;;

State records a tournament title. Open the topic ,, find information, tips are Smarty template, then it is natural to think it might be based on the Smarty template ssti ;; ;;

G87JOK.png

G87Gy6.png

And then found the upper right corner there is a record current ip ip ah. With the basic idea; it may be ssti occur at XFF;

G87dFH.png

** Smarty supports { php } {/ php } tag which performs wrapped php instructions. **

So we simply test and found ;; error

G870fA.png

{If} Smarty the condition judgment and PHP if very similar, but adds features. PHP and all of the conditional expressions can be used in the function if, as || , or, &&, and, is_array (), and the like.

G87NwD.png

So directly a bobbin; injection {if phpinfo ()} {/ if} return directly phpinfo ;; successful injection; to see if the system can be used here, may be used after the test was found, so a direct two bobbin; {if system ( " ls / ")} {/ if} {if system (" cat / flag ")} {/ if}

G87teO.png

Or may be directly read php built-in functions; ReadFile or show_source

Here is not the flag flashed

Guess you like

Origin www.cnblogs.com/Wanghaoran-s1mple/p/12616892.html
Recommended