drti52047 2018-10-19 18:21
浏览 95

PHP中的查询字符串login.destroy.session是否可以执行任何操作?

Every time I see someone trying to exploit one of my web apps I like to see what kind of exploit it is just to learn how it works.

In this case I saw someone attempting to use the query string ?q=login.destroy.session&r=0.12365442. I've tried Googling but all I come across are tutorials on how to use sessions to control logins or, logs that show other sites being accessed this way.

Does anyone know what this actually does? Is it framework specific or work on any PHP version?

  • 写回答

1条回答 默认 最新

  • doubi1931 2018-10-19 18:34
    关注

    The 'exploit' you're thinking of, necessarily, has nothing to do with the fact it is inserted into the URL.

    There are many ways to 'inject' malicious code into a website. The main ways are through GET and POST parameters, through user input or API endpoints.

    The concept is simple, if the data is derived from the client (ie, not hard-coded or capable of changing) then it is untrusted.

    This type of attack is simply testing what happens when they put something your application doesn't expect to see how it handles.

    This is the main reason why you never trust data, and if your paranoid like me, never trust your own data either, even if it is hard coded. Ensure, before SQL queries, you're stripping any malicious code out of it whether that be using mysqli::real_escape_string or PDO::Prepare.

    评论

报告相同问题?

悬赏问题

  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容