webgoat-Ajax-客户端过滤

Client Side Filtering
本实验分为两步:
1、通过页面查看隐藏数据,找到ceo的工资
	You are logged in as Moe Stooge, CSO of Goat Hills Financial. You have access to everyone in the company's information, except the CEO, Neville Bartholomew. Or at least you shouldn't have access to the CEO's information. For this exercise, examine the contents of the page to see what extra information you can find.
2、修复该问题
STAGE 2: Now, fix the problem. Modify the server to only return results that Moe Stooge is allowed to see.

#####解题思路

1、通过火狐web控制台,通过员工id进行查找,找到ceo的工资,submit
2、修复:原因是返回的信息过多,只允许返回经理能够看见的员工
找到代码:
	1、进入docker,如果没有vim命令需要下载:apt-get update,apt-get install vim
	2、find -name clientSideFiltering.jsp
	3、vim clientSideFiltering.jsp
	将:
	StringBuffer sb = new StringBuffer();

	sb.append("/Employees/Employee/UserID | ");
	sb.append("/Employees/Employee/FirstName | ");
	sb.append("/Employees/Employee/LastName | ");
	sb.append("/Employees/Employee/SSN | ");
	sb.append("/Employees/Employee/Salary ");
	String expression = sb.toString();
	StringBuffer sb = new StringBuffer();
调整为:
	sb.append("/Employees/Employee[Managers/Manager/text() = " + userId + "]/UserID | ");
	sb.append("/Employees/Employee[Managers/Manager/text() = " + userId + "]/FirstName | ");
	sb.append("/Employees/Employee[Managers/Manager/text() = " + userId + "]/LastName | ");
	sb.append("/Employees/Employee[Managers/Manager/text() = " + userId + "]/SSN | ");
	sb.append("/Employees/Employee[Managers/Manager/text() = " + userId + "]/Salary ");

	String expression = sb.toString();
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值