3

私はオープンソース アプリケーション「Project-Open」に取り組んでおり、スキャン中に次の脆弱性を発見しました。

[Medium] Session Identifier Not Updated
Issue: 13800882
Severity: Medium
URL: https://<server_name>/register/
Risk(s): It is possible to steal or manipulate customer session and cookies, which might be used to impersonate a legitimate user,allowing the hacker to view or alter user records, and to perform transactions as that user
Fix: Do not accept externally created session identifiers

修正について言及されていますが、完全に理解するには不十分です。これを削除する方法を教えてください。また、質問を理解するためにさらに詳細が必要な場合はお知らせください。プロジェクトのソース コードは tcl にあります

同じことを行う次のコードを見つけましたが、それはJavaにあります。

  public HttpSession changeSessionIdentifier(HttpServletRequest request) throws AuthenticationException {

     // get the current session
        HttpSession oldSession = request.getSession();

     // make a copy of the session content
        Map<String,Object> temp = new ConcurrentHashMap<String,Object>();
        Enumeration e = oldSession.getAttributeNames();
        while (e != null && e.hasMoreElements()) {
               String name = (String) e.nextElement();
               Object value = oldSession.getAttribute(name);
               temp.put(name, value);
        }

     // kill the old session and create a new one
        oldSession.invalidate();
        HttpSession newSession = request.getSession();
        User user = ESAPI.authenticator().getCurrentUser();
        user.addSession( newSession );
        user.removeSession( oldSession );

     // copy back the session content
        for (Map.Entry<String, Object> stringObjectEntry : temp.entrySet()){
             newSession.setAttribute(stringObjectEntry.getKey(),       stringObjectEntry.getValue());
         }
  return newSession;

}

PS私はTCLの初心者です。さらに説明が必要な場合はお知らせください。

4

2 に答える 2

2

OpenACS 5.9 には、スキャン レポートに対応する修正があります。参考として、OpenACS.org の次の説明を参照してください。

http://www.openacs.org/forums/message-view?message_id=5332821

于 2016-09-02T17:37:04.307 に答える