1、isc-05
    只有一个设备维护中心可以打开,那切入点就是这里了,看url:
    http://111.198.29.45:37520/index.php?page=index.php
    Page= 这种的就像是文件包含,先丢个通用payload下去:
    ?page=php://filter/read=convert.base64-encode/resource=index.php
    image.png
    出现了一堆base64编码,解码是页面的源代码,代码审计,看最后的有点用:
    image.png
    首先,要抓包改一下x-forwarded-for为127.0.0.1,其次还要传三个参数:pat,rep,sub,这样调用prep_replace函数,这个函数是存在命令执行漏洞的。
    preg_replace($pattern, $replacement, $subject); 函数的作用的是在subject中查找符合pattern的字符串,然后用replacement代替,如果pat后面有个/e,而且没有过滤,replacement就会被当成PHP代码执行,触发漏洞。
    image.png

    image.png

    image.png
    %20是空格,%26是&

    发现flag的完整路径了,s3chahahaDir/flag/flag.php,用cat显示出来。
    image.png