duankanyi6539 2016-08-10 03:52
浏览 390
已采纳

PHP PHPSESSID利用混乱

I am confused about the PHPSESSID exploit. If I change document.cookie to another active user's (on a simple social media site like youtube or instagram [just an example]) PHPSESSID, will the page reload with me being logged into that user's account? Will I also need to know that user's password? Note: I will not actually do that but I want to learn what would happen. Thank you!

P.S I am not familiar with this so please excuse my lack of knowledge:)

  • 写回答

1条回答 默认 最新

  • doupang9080 2016-08-10 04:14
    关注

    The answer depends on the target site's security checks.

    If the site assumes that the PHPSESSID cookie is enough to authorize access, then yes stealing someone's session would be sufficient to impersonate her, without the need to know her password.

    Sites often have additional measures though: they might check whether other parameters such as the IP address or the User Agent have changed during the session and if they detect such a change, invalidate the session and deny access.

    Sessions typically also have an expiration, so that if you obtain a session cookie, say from a browser that has been left unattended for hours, the site may deny access because it is past expiration. You see this often with banking sites that will show you a popup telling you that your session expired or is about to expire.

    Finally, if a user logs out, a good site will destroy the session. Even though you have the PHPSESSID cookie, when you present it to the server it won't find the matching session because it would have been destroyed.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘