【问题标题】:Session Hijacking in Django 1.7.7 and python3Django 1.7.7 和 python3 中的会话劫持
【发布时间】:2018-05-19 11:03:37
【问题描述】:

我开发了一个小型应用程序,用于向数据库服务器(Oracle 11g)提交一些数据。在审查这个小应用程序的安全性时,我们观察到如下:

1. We have deployed django with https and all secure configurations like Secure Cookie and Secure Session, No Cache, etc.
2. Using BURP tool for this sample review
3. We have created two different user in this system say Normal User and Admin User
4. Opened 2 browsers(Mozilla and IE 11), On mozilla we login with Admin user and captured session id using burp tool.
5. On second browser we login with Normal user and replaced session id Normal User with Admin User.
6. whoila......On second browser, I got Admin user access by just changing the session id

我为此应用程序使用了默认会话后端。

我想知道这是否是 django 的缺陷以及如何解决这个问题..

提前致谢

【问题讨论】:

  • 如果您担心安全性,您不应该使用不受支持且多年未收到补丁的 Django 版本

标签: django django-views django-sessions


【解决方案1】:

这是使用基于会话的识别的固有风险。这称为会话劫持,如果您搜索该术语,您会发现很多信息。

缓解措施通常具有以下两个目标之一:使令牌更难被盗,或者如果令牌被盗,则使损害不那么严重。在前一个阵营中是使用 HTTPS 和SESSION_COOKIE_HTTPONLY 等技术。后者是限制有效会话的长度(SESSION_COOKIE_AGE)。但是,最终,如果某人获得了他们的令牌,就很难或不可能阻止他们冒充另一个用户,因为这正是建立身份的东西。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-27
    • 2012-04-17
    相关资源
    最近更新 更多