如果你在公共電腦上檢視Facebook,關閉標簽是否足夠好?如果你在朋友的iPad上檢視銀行餘額呢?敏感資訊線上。Stack Exchange的資訊保安專家將幫助您保持安全。...
如果你在公共電腦上檢視Facebook,關閉標簽是否足夠好?如果你在朋友的iPad上檢視銀行餘額呢?敏感資訊線上。Stack Exchange的資訊保安專家將幫助您保持安全。
一個快速的谷歌搜尋並不能揭示是否有必要登出webapps(網上銀行,亞馬遜,Facebook等),或者我是否安全關閉標簽或瀏覽器。如果我沒有正確地登出,我將面臨哪些可能的威脅?
請參閱原始問題。
簡短的回答(阿德南迴答)
登入到web服務時,瀏覽器中會植入cookie。這個cookie有一個唯一的ID值,它在您使用web服務時標識您,並且可能在您稍後回來時標識您。如果這個識別碼被盜,擁有它的人可能會像使用你的賬戶一樣使用你的賬戶。登出通常會使此識別符號對您和對手都無效。你們兩個都不能用這個識別符號告訴網路服務,“嗨,我是安吉洛·漢內斯。”這會產生一個不幸的副作用,迫使你再次輸入使用者名稱和密碼登入。
那麼,你該怎麼辦?那要看情況了。一些敏感的web服務(銀行、**網站、保險公司等)的會話時間很短。其他敏感的web服務(比如你的email收件箱,它基本上控制著你所有的帳戶)並不會經常使會話失效,但是它們應用了IP地址限制。如果使用來自不同IP地址的同一會話,則該會話將無效。
熱釋光;博士:
- 公共電腦,特別偏執,你認為你的會話被破壞了,還是你真的關心這個服務?登出。
- 私人電腦,你認為你的會話是安全的,你真的不關心這個服務嗎?保持登入狀態是可以的。
使用服務中的已知問題(例如,不使用HTTPS)或某些零日漏洞(例如,服務中新發現的XSS攻擊、瀏覽器中洩露cookie資訊的新漏洞或正在使用的計算機上安裝的竊取會話資訊的惡意軟體)可以竊取會話,在這種情況下,它已經竊取了您的使用者名稱和密碼)。
冗長的回答♦)
- 如果您使用的是公用計算機:登出。您保留帳戶的任何服務都不應留在可公開訪問的計算機上登入。
- 如果您使用的是一個無關緊要的非敏感服務:保持登入。這隻適用於一次性的臨時賬戶,如網際網路廣播,在那裡,洩露訪問許可權只會造成麻煩。
- If you're using public wifi: log out. Since the network is inherently untrusted, there is one big obvious threat: session cookie theft. It's possible that your session was hijacked, and someone—either someone else on the network, or the hotspot itself—stole your session cookie. If this was the case, you wouldn't know, but then you may not be able to really log out either. (If it's a malicious network or MITM, they have control of your entire connection—they might simply drop your logout request.) That said, third-party theft of just your session cookie is a valid threat, and explicit logging out prevents unlimited use. (Basically the damage may have been done already, but this stops it from continuing.) Even better would be to go to a trusted network, login, and explicitly log back out, just in case the MITM blocked your logout. Better yet is to change your password on the trusted site. But best to never access a non-trivial, sensitive site from an untrusted network.
- 如果您使用全天應用程式:保持登入。對於那些你整天都在使用並且想要快速/方便訪問的服務,比如Facebook、email等,在你自己的私人(或工作)計算機上的可信網路上,讓你的瀏覽器長期登入是明智的選擇。每次你離開的時候都要鎖上你的電腦,甚至是為了喝杯咖啡。或者鎖上你的辦公室,如果你有一扇其他人無法透過的實體門(或者有一個家庭辦公室,哇!)定期登出並重新登入。監視“你”發的任何帖子。
- 如果您正在使用任何使用HTTP基本身份驗證的應用程式(例如,許多路由器):登出並關閉所有瀏覽器選項卡。這裡是有趣的地方,這也適用於下一節。當您使用basic auth登入到webapp時,瀏覽器會快取您的密碼,併在每次請求時傳送密碼。瀏覽器的基本身份驗證機制沒有會話的概念。即使您多次登出,webapp也無法在伺服器端和客戶端終止會話。清除這些快取憑據的唯一方法是終止“瀏覽器程序”
- 然而,您對瀏覽器的選擇對“瀏覽器程序”這個概念很重要
- Firefox:總是一個程序,不管你開啟了多少個標簽和視窗。
- Chrome:每個選項卡都是一個單獨的程序。但是,還有另一個全域性父程序。所有tab程序都是這個程序的子程序(Windows術語中稱為“作業程序”),它們都透過父程序共享程序記憶體。如果您開啟一個新視窗,這也是正確的。因此,儘管Chrome大量使用了具有共享父程序的子程序,使得它的選項卡特別生動和健壯,但缺點是共享程序狀態。換句話說,從Chrome中刪除快取的BasicAuth憑據的唯一方法是關閉所有Chrome視窗。單靠關閉選項卡是無濟於事的。
- Internet Explorer:選項卡/程序模型與Chrome相同(或類似),只有一個例外。預設情況下,IE還會開啟父程序的子程序中的所有選項卡。但是,如果您將NoFrameMerging新增到IE命令列,它將建立一個全新的IE父程序。不同之處在於,您可以建立一個新的父視窗來登入到路由器,然後在完成後關閉該視窗。這將清除BasicAuth快取,而不接觸任何其他開啟的IE視窗(旁註:這實際上是可以做到這一點與鉻太!不過,它涉及的內容要多得多,需要您在計算機上建立另一個瀏覽器配置檔案。)
- 如果您使用的是敏感應用程式:請始終明確登出並關閉所有瀏覽器選項卡。這一部分稍微複雜一些,但是上面已經討論了很多依賴項。鎖定你的電腦,如上所述,是有意義的;然而,沒有必要從以前取捨。登出就行了。此外,最敏感的應用程式應該實現某種形式的自動空閑超時,因此如果你下午出去,你的會話將在某個時候自動終止。這可能無助於這種威脅,因為惡意的旁觀者可能只是跳上你的電腦,如果你走出4 1/2分鐘,以補充你的咖啡。
- Another threat is session cookie theft. Hopefully, sensitive apps are actively preventing this with HTTPS, IDS, geo/fraud detection, etc. That said, it still makes sense to close that "window of opportunity," just in case. As before, most sensitive apps should implement some form of automatic idle timeout, and will help minimize this threat too. However, even if you do know for a fact that this app does implement idle timeouts correctly, there is still a window of opportunity for the attacker. That said, in a relatively-secure app this isn't much of a threat.
- Cross Site Request Forgery (CSRF) is the threat you need to worry about. Say you're logged in to your bank. In the same window, in a different tab, you are browsing some dubious website. While viewing this website, it might be surreptitiously testing various well-known bank sites to see if you happen to be logged in to one of them. If you are, it will mount the CSRF attack (not all bank sites are vulnerable to this, but many still are). CSRF'd!
- Okay. Now say you are **arter than that other guy, and don't browse suspicious sites the same time your bank site is open. So, after you finish on your bank, you carefully close the tab. Only then do you open a new tab to browse to the dodgy site. Well, problem is, you're still logged in, and will be for awhile—typically around 30 minutes, but it could be as little as 10 or as much as an hour. CSRF'd! (Note that the session timeout here does help, by shortening the window of opportunity, but there is still a chance of this happening within the window.)
- Hmm. I know, let's open a new browser window! Use that for bank work, then again close the tab, and again open a new one for the malware sites I like to play with. (See the above section on basic authentication—your choice of browser matters.) Unless you're using "incognito/private browsing", or the "-NoFrameMerging" flag for IE, you're still in the same process family, and this still-open session will be shared between all your windows until the server hits the idle timeout. Assuming it hasn't already been co-opted. CSRF'd!
所以,TL;博士?如果你關心你在這個網站上的帳戶:登出。如果您關心您的帳戶,並且它使用基本身份驗證:登出並關閉所有瀏覽器選項卡和視窗。
不同意上述答案?你有自己的專長嗎?請檢視原始帖子,併在Super User上看到更多類似的問題,Super User是資訊保安專業人士的問答網站。如果您的資訊保安問題需要解決,可以問一個問題。你會得到答案的(而且是免費的。)