drfcaw7460 2010-03-01 18:57
浏览 89

帮助找到这个MySQL页面中的安全漏洞?

I am trying to find security flaws in a MySQL page. It is an assignment for a class learning about SQL. Through a textbox, they will be given access to a database to submit queries and see if it returns the correct data sets. I want to find out if there's anything malicious they could do.

This is the result of a SHOW GRANTS query:

Grants for user@localhost
GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY PASSWORD 'the password'
GRANT SELECT ON `server\_dir`.* TO 'user'@'localhost'
GRANT SELECT ON `server\_dir\_ans`.* TO 'user'@'localhost'

Can someone explain what these GRANT statements mean? What is *.* and GRANT USAGE? What else can I do to this site to break it?

The site itself is written in PHP.

In response to The Rook, when I execute:

UPDATE mysql.user set Password = password("hacked");
FLUSH PRIVILEGES;

I get back:

Error Number: 1142. UPDATE command denied to user 'user'@'localhost' for table 'user'
Error Number: 1227. Access denied; you need the RELOAD privilege for this operation

As I thought, it appears that the user lacks permissions necessary to do this. Or am I misunderstanding something?

  • 写回答

1条回答 默认 最新

  • drurhg37071 2010-03-01 18:58
    关注

    *.* means all tables on all databases.

    The flaws in security will happen more in the php than in the msyql, see this Wikipedia article for common issues: SQL Injection.

    GRANT USAGE means no privileges.

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料