GitLab.com 將不支援免費使用者的 2FA reset

好像是在 Hacker News 的首頁上看到的,GitLab 宣佈他們的服務將不提供免費使用者 2FA reset:「GitLab Support is no longer processing MFA resets for free users」,對應的討論串在「Gitlab Support is no longer processing MFA resets for free users (gitlab.com)」這邊可以看到。

官方的公告,從今年的 8/15 開始就不再提供 reset:

As of Aug. 15th, 2020, GitLab Support will no longer process MFA resets for free accounts.

這反而是鼓勵使用者不要開啟 2FA,在討論裡面有人就講到這件事情,這個方法讓設定 2FA 的人受到處罰:

Think about the psychology of what you are telling people: "You have two choices - one is normal security, which you use on 80%+ of the rest of the internet, and one is 2fa which you only use on the annoying services that badger you into it. On the first one, if you lose your password you can do a password reset. On the second one, if your laptop and phone get fried in a rainstorm / car crash / act of children, you lose access to everything forever, no recourse and no recovery. And by the way, we totally encourage you to choose the second one... "

主因是,不是每個用 2FA 的人都知道要怎麼保護自己的帳號:像是同時有多把硬體的 U2F 放在不同地方,並且還有手機的 TOTP,另外還會把 backup code 放到安全的地方。

這次可以看出來 GitLab 的安全概念其實又出包了...

重設密碼 + Social Engineering

在「The password reset MitM attack」這邊看到 PRMitM (Password Reset Man-in-the-Middle) 這樣的攻擊,原始論文在「The Password Reset MitM Attack」這邊可以取得。

用圖說明基本版的攻擊方式:

另外列出了各大站台的狀態:

以及各家簡訊的文字,可以發現不是每一家都有把產品的名稱寫上去:

這方法好有趣啊... XD

大量破解 Facebook 帳號的方法

Facebook 安全設計上的問題造成的重大漏洞:「Hacker reveals How He Could have Hacked Multiple Facebook Accounts」。

攻擊者先用很多 proxy 去打出哪些 id 是有效的:

Gurkirat first collected valid Facebook IDs by making queries to Facebook Graph API starting with 100,000,000,000,000, since Facebook IDs are generally 15-digit long and then visited www.facebook.com/[ID] with a valid ID number in place of [ID].

這樣他就順利打出兩百萬個帳號:

Once entered, the URL automatically redirected and changed the Facebook ID to the user's username. In this way, first, he was able to make a list of 2 Million valid Facebook usernames.

接下對這些帳號發出重設密碼的需求,並且開始亂猜六碼數字 (也是透過大量的 proxy):

Then using a script, hundreds of proxies and random user-agents, Gurkirat automatically initiated the password reset requests for those 2 million users, each assigned a 6-digit password reset code, thus consuming the complete 6-digit range.

然後就打出一票來了:

最大的問題在於六碼數字的強度不夠,但 Facebook 看起來沒打算改...

Git 上各種 Undo 的技巧

GitHub 的「How to undo (almost) anything with Git」這篇文章介紹了 Git 上各種 undo 的方式。

主要先分成「已經 push 出去」與「還沒 push 出去」兩種,然後針對 branch 再說一次。

這份沒有 cover 到所有的方式,但常用的都在裡面提到了,可以先 bookmark 下來,需要用的時候練個幾次就會背起來了。

WordPress plugins 安全性問題

TechCrunch 上看到 WordPress.org 強制所有 WordPress.org 的使用者更新密碼 (不是 WordPress.com):「WordPress.org Forces Password Resets Due To Compromised Plugins」。

起因是 AddThisWPtouch 以及 W3 Total Cache 這三個 plugin 有異常 commit 塞入 backdoor code。(瞬間就中兩槍)

這幾天有更新 plugin 的人最好趕快看一下... 慘啊 :/