代码审计--7--第三方组件

版权声明:本文为博主原创文章,转载本站文章请注明作者和出处,请勿用于任何商业用途。 https://blog.csdn.net/wutianxu123/article/details/82944422

7.1 框架相关漏洞

iBatis(MyBatis)框架

ibatis使用不当导致sql注入。如下:

代码示例:mapper文件
select * from messages where username=#{username}
//这种写法不会产生SQL注入

select * from user where username like '%$username$%'
//这种like写法会产生SQL注入
//在ibatis中,“#”会对传入的变量进行转义,“$”则是直接拼接

hibernate

hibernate导致sql注入。如下:

代码示例:java代码:
Sring hql=”from User where username=’”+name+”’ and password=’”+password+”’;
User u = session.find(hql);
//在hibernate中使用hql时,要尽量避免使用拼接方式

7.2 富文本编辑器

FCKeditor问题

如果fckeditor未使用文件上传功能,确认是否删除了filemanager/下的文件
查看fckeditor使用的是否是最新版

猜你喜欢

转载自blog.csdn.net/wutianxu123/article/details/82944422