0x10 webshell

分析

典型的一句话木马

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b9aa0b12-f274-4854-80e4-047c0d429871/Untitled.png

PHP提供4个专门的执行外部命令的函数:exec(), system(), passthru(), shell_exec()

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7b6232ea-2b0d-4f40-b212-9a4fb4cae868/Untitled.png

本题有system()passthru()可用,查找flag

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/720877af-7027-47f0-9aba-26b2d1bd967a/Untitled.png

同路径?!!多玩一下

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e6f56afb-cc85-4ca1-a0bf-3bf45dcfb3af/Untitled.png

参考

php -- PHP在linux上执行外部命令,system(),exec(),shell_exec()

0x11 command_execution1

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/713de910-ea06-46c2-92a4-695ba0f88b3f/Untitled.png

127.0.0.1 && find / -name "flag*" 2>/dev/null

然后

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5c7548f7-6806-4e9e-81b0-ae2342ae8ddd/Untitled.png

0x06 weak_auth

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e5a1d977-f70a-44b1-9491-7919f1a10b56/Untitled.png

0x12 simlpe_js

直接看源码

<html>
<head>
    <title>JS</title>
    <script type="text/javascript">
    function dechiffre(pass_enc){
        var pass = "70,65,85,88,32,80,65,83,83,87,79,82,68,32,72,65,72,65";
        var tab  = pass_enc.split(',');
                var tab2 = pass.split(',');var i,j,k,l=0,m,n,o,p = "";i = 0;j = tab.length;
                        k = j + (l) + (n=0);
                        n = tab2.length;
                        for(i = (o=0); i < (k = j = n); i++ ){o = tab[i-l];p += String.fromCharCode((o = tab2[i]));
                                if(i == 5)break;}
                        for(i = (o=0); i < (k = j = n); i++ ){
                        o = tab[i-l];
                                if(i > 5 && i < k-1)
                                        p += String.fromCharCode((o = tab2[i]));
                        }
        p += String.fromCharCode(tab2[17]);
        pass = p;return pass;
    }
    String["fromCharCode"](dechiffre("\\x35\\x35\\x2c\\x35\\x36\\x2c\\x35\\x34\\x2c\\x37\\x39\\x2c\\x31\\x31\\x35\\x2c\\x36\\x39\\x2c\\x31\\x31\\x34\\x2c\\x31\\x31\\x36\\x2c\\x31\\x30\\x37\\x2c\\x34\\x39\\x2c\\x35\\x30"));

    h = window.prompt('Enter password');
    alert( dechiffre(h) );

</script>
</head>

</html>

修改为