Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

系统存在SQL注入,但是安装洞态agent后没有检测出来漏洞 #253

Closed
3 tasks done
Cassie-1 opened this issue Sep 27, 2021 · 4 comments
Closed
3 tasks done
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Cassie-1
Copy link

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.

Version

1.0.3

Installation Type

Official Docker Compose

Service Name

DongTai-Core

Describe the details of the bug and the steps to reproduce it

  1. 系统环境说明:Tomcat8+SpringBoot War包
  2. 安装环境说明:agent安装完成后,项目配置处存活探针数量正常,系统配置处引擎管理处正常,能识别出来服务器地址。
  3. 系统配置了nginx,正常访问接口为/api/xxx/xxx,但是流量过了nginx网关后,接口就没有/api了,只剩下/xxx/xxx
  4. 扫描器在/api/xxx/xxx接口可以扫出SQL注入漏洞,但是洞态没有检测出来
  5. 在洞态搜索功能里搜索/xxx/xxx可以搜索到HTTP数据包,但是没有污点调用链
  6. SQL注入漏洞存在的原因是使用mybatis数据库,参数使用了$不安全编码方式

Additional Information

No response

Logs

No response

@Cassie-1 Cassie-1 added the bug Something isn't working label Sep 27, 2021
@Cassie-1 Cassie-1 reopened this Sep 28, 2021
@Nizernizer
Copy link
Contributor

Thanks for the feedback, the test has been scheduled.

@Cassie-1
Copy link
Author

Supplementary notes:
springboot->2.0.3.RELEASE
mybatis->3.4.2

@exexute exexute added this to the 1.0.5 milestone Sep 28, 2021
@Nizernizer
Copy link
Contributor

The test is complete. The situation of vulnerability detection is normal.

  • Tomcat8+SpringBoot War
  • Nginx
  • springboot 2.0.3.RELEASE
  • mybatis 3.4.2

Test Code:

Controller:

    @RequestMapping("/name")
    @ResponseBody
    public User detailByName(HttpServletRequest request){
        String name = request.getParameter("name");
        return userService.getByName(name);
    }

mapper:

	<select id="getByName" parameterType="java.lang.String" resultMap="userMap">
		SELECT * FROM user WHERE name = '${_parameter}'
	</select>

result:

image

@Nizernizer
Copy link
Contributor

Nizernizer commented Sep 29, 2021

A bug was found during the test.
I visit url is http://127.0.0.1:8080/users/name?name=user_1. But the url DongTai detects is before Nginx forwards it: http://127.0.0.1:8009/users/name?name=user_1.

@exexute exexute modified the milestones: 1.0.5, 1.0.6 Oct 18, 2021
@exexute exexute modified the milestones: 1.0.6, 1.1.0 Oct 28, 2021
@cnsolu cnsolu closed this as completed Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants