TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A deeper dive into our May 2019 security incident

226 pointsby alex-warrenover 4 years ago

15 comments

CountHackulusover 4 years ago
I found it interesting that the attacker looked for help on the attackee's own site. I guess it truly proves how good of a repository of information StackOverflow is.
评论 #25905215 未加载
评论 #25907032 未加载
评论 #25906167 未加载
评论 #25908709 未加载
itsdrewmillerover 4 years ago
Kudos to the team over there for being as transparent about what happened and where they were not following best practices - I am pretty sure most companies would not publicly admit this:<p><i>we had secrets sprinkled in source control, in plain text in build systems and available through settings screens in the application.</i>
TacticalCoderover 4 years ago
&gt; However, there is a route on dev that can show email content to CMs and they use this to obtain the magic link used to reset credentials<p>So many sites do this: allowing major changes to be effective immediately (like resetting credentials&#x2F;password) by simply opening a &quot;magic link&quot; sent by email.<p>I think that this &quot;immediately&quot; is a major security antipattern.<p>I prefer it when such changes have a &quot;cooldown&quot; period of, say, 72 hours, during which the change is &quot;ongoing&quot; but not effective yet and during which the user can veto the change (say by either login on the site, where they&#x27;d then get a warning that a major configuration change is ongoing, and denying the change on the site or by opening another &quot;magic link&quot;, sent by email, which allows to deny the change).<p>It&#x27;s not a perfect solution but it stops so many of these oh-so-common attacks dead in their tracks.<p>Because there&#x27;s a big difference between being able to read an email meant to someone (as happened here, on the server side) and being able to prevent a legit user from receiving emails while also being able to prevent that legit user from login onto a website with its correct credentials.
评论 #25906043 未加载
评论 #25907333 未加载
评论 #25906347 未加载
评论 #25907001 未加载
blakesterzover 4 years ago
That was an interesting read. I&#x27;m left wondering &quot;why&quot; though. Anyone care to take a wild guess what they were after? That seems like quite a bit of work to be just doing it for no particular reason.
评论 #25905182 未加载
评论 #25905157 未加载
limaover 4 years ago
&gt; A significant period of time is spent investigating TeamCity—the attacker is clearly not overly familiar with the product so they spend time looking up Q&amp;A on Stack Overflow on how to use and configure it. This act of looking up things (visiting questions) across the Stack Exchange Network becomes a frequent occurrence and allows us to anticipate and understand the attacker’s methodology over the coming days.<p>Awesome writeup - this gave me a good laugh :-)
dsr_over 4 years ago
&quot;However, there is a route on dev that can show email content to CMs and they use this to obtain the magic link used to reset credentials.&quot;<p>Zawinski&#x27;s Law: &quot;Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.&quot;
评论 #25905928 未加载
cbg0over 4 years ago
&gt; Our dev tier was configured to allow impersonation of all users for testing purposes, and the attacker eventually finds a URL that allows them to elevate their privilege level to that of a Community Manager (CM)<p>&gt; After attempting to access some URLs, to which this level of access does not allow, they use account recovery to attempt to recover access to a developer’s account (a higher privilege level again) but are unable to intercept the email that was sent. However, there is a route on dev that can show email content to CMs and they use this to obtain the magic link used to reset credentials.<p>Many of these debugging tools are great for devs to test things quickly but I&#x27;ve always felt very weary of having these exist in an app without some strict access control with 2FA. Ideally you&#x27;d not have them in the app at all, maybe just on local dev.
Robeliusover 4 years ago
As someone who doesn&#x27;t work much with software teams, can someone fill in my gaps for understanding timeline.<p>I&#x27;m imagining after a security issue is identified, the steps taken are roughly in the below order and close-ish for the date. I guess my question is, why does it take 20 months from start to blog post?<p>-Contain the issue (1wk) -Remove the threat (1wk) -Build up remedies (a few months) -Check and recheck what happened to make sure you&#x27;re accurate when submitting final reports (a few months) -Release a blog post (1month)<p>The timeline is a cool day by day instance, but I just don&#x27;t understand the larger timeline.
评论 #25907605 未加载
ristonover 4 years ago
Did they figure out who were behind these attacks? These seems to be quite sophisticated and quite long taking attacks to dig so deeply into SO system.
whimsicalismover 4 years ago
The chronology has some issues in dating&#x2F;day starting on &quot;Tuesday May 15th&quot; (Tuesday was the 14th) and continuing on.
评论 #25907155 未加载
评论 #25907815 未加载
120bitsover 4 years ago
Thank you SO for being open and listing the best practices. It seems like even few security best practices makes it harder for hackers to get in to your system.<p>I have database connecting strings and password as ENV variables. But I still don&#x27;t know what is the best practice. Lets say someone gets access to the server, they can still read the ENV vars, right? It definitely prevents from accidently checking in your code git repo. But still . Does anyone has good recommendation for storing credentials like database passwords in a way secured way.
评论 #25907056 未加载
评论 #25906900 未加载
akerstenover 4 years ago
Interesting that most of the mitigations are &quot;move resource behind firewall.&quot; Kind of an indictment of the whole BeyondCorp idea - unless we really trust our 2FA to never have any access bypass issues like the initial access to the dev environment here. Speaking of that, I didn&#x27;t see &quot;fix bug allowing unauthenticated access to dev environment&quot; listed as one of the mitigations, but maybe I glossed over it.
评论 #25909037 未加载
评论 #25906916 未加载
评论 #25906904 未加载
评论 #25907473 未加载
评论 #25906830 未加载
sradmanover 4 years ago
The report describes a security breech in 2019; the report was held back until now for legal reasons:<p>&gt; Sunday May 5th<p>&gt; ...a login request is crafted to our dev tier that is able to bypass the access controls limiting login to those users with an access key. The attacker is able to successfully log in to the development tier.<p>&gt; Our dev tier was configured to allow impersonation of all users for testing purposes, and the attacker eventually finds a URL that allows them to elevate their privilege level to that of a Community Manager (CM). This level of access is a superset of the access available to site moderators.<p>EDIT: clarified that the report was held back
评论 #25904998 未加载
CapriciousCptlover 4 years ago
tldr; 1. Attacker found a stackoverflow dev environment requiring a login&#x2F;password and access key to get in.<p>2. Attacker was able to login to the dev environment with their credentials from prod (stackoverflow.com) by a replay attack based on logging in to prod.<p>3. The dev environments allows viewing outgoing emails, including password reset magic links. The attacker triggered a reset password on a dev account, and changed the credentials. This gives them access to &quot;site settings.&quot;<p>4. Settings listed TeamCity credentials. The attacker logged into TeamCity.<p>5. Attacker spends a day or so getting up to speed with TeamCity, in part by reading StackOverflow questions.<p>6. Attacker browses the build server file system, which includes a plaintext SSH key for GitHub.<p>7. Attacker clones all the repos 8. Attacker alters build system to execute an SQL migration that escalates him to a super-moderator on production (Saturday May 11th).<p>9. Community members make security report on Sunday May 12th, stackoverflow response found the TeamCity account was compromised and moved it offline.<p>10. Stackoverflow determines the full extent of the attack over the next few days.
Eduardover 4 years ago
&gt; Fortunately, we have a database containing a log of all traffic to our publicly accessible properties<p><a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;legal&#x2F;privacy-policy" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;legal&#x2F;privacy-policy</a><p>GDPR anyone?
评论 #25908514 未加载