攻防世界之Web_python_template_injection (web进阶)

考点: python模板漏洞

打开后,看到提示:python template injection(python模板注入)
更改URL,得到回显。
在这里插入图片描述
表明存在漏洞。传入参数config。得到回显。
在这里插入图片描述
发现没有有效消息。更改传入参数。
在这里插入图片描述
发现传入的命令“ls”得到执行,且发现文件fl4g。
命令解释:

命令效果为执行popen()函数内的命令
其中:
1、__ class__ _:查看变量所属的类
2、 __ init __ :初始化类,返回function
3、 __ globals __ :
获取function所处空间下可使用的module、方法以及所有变量
4、os.popen()
从一个命令打开一个管道

读取fl4g文件。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/my_name_is_sy/article/details/125516418