Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debuilder.infra.ooni.io compromised month ago #135

Closed
1 of 4 tasks
darkk opened this issue Aug 4, 2017 · 3 comments
Closed
1 of 4 tasks

debuilder.infra.ooni.io compromised month ago #135

darkk opened this issue Aug 4, 2017 · 3 comments
Labels
Projects

Comments

@darkk
Copy link
Contributor

darkk commented Aug 4, 2017

Impact: RCE on a build host unnoticed for a month

Detection: manual observation of anomalies on a broken box

Timeline UTC:
02 Jul 23:41: start time of payload running under jenkins uid
09 Jul 07:43: first No space left on device in the series Jul-09...Jul-23
04 Aug 18:17: dom0-bootstrap.yml failed during apt update: 100% disk space used, 93% inodes used (logrotate is broken since January)
04 Aug 18:45: incident published
04 Aug 19:20: debuilder.infra.ooni.io turned off

What went wrong:

What could be done to prevent relapse and decrease impact:

  • network-level authentication (SSH, VPN, nginx with basic auth) on internal services
  • logrotate monitoring
  • alert on high usage of CPU (miners) or NET (DDoS bots)
  • alert on SMTP traffic
@darkk
Copy link
Contributor Author

darkk commented Oct 9, 2017

network-level authentication (SSH, VPN, nginx with basic auth) on internal services

I had a bikeshedding session with @hellais about that and we concluded:

  • nginx with basic auth stores secret in browser memory till reboot and that's OK
  • nginx with basic auth has ugly login form and that's OK
  • nginx with basic auth has no 2FA / U2F support and will never have and that's OK
  • nginx with basic auth requires good random non-memorable passwords to make pw check single round of SHA1 and that's OK
  • nginx with basic auth requires separate password for every single webservice and that's OK as everyone knows how to use password manager
  • SSO is nice and nginx-sso following pubcookie model is quite simple, but that's still hundreds lines of golang code and some extra complexity and potential SPOF

@darkk
Copy link
Contributor Author

darkk commented Oct 26, 2017

Awesome example of in-app auth bypass:
https://bo0om.ru/just-enter-the-space-attacks
Sorry, in Russian. Long story short: just add %20, authentication and url routing are done in wrong order – boom!

darkk added a commit that referenced this issue Oct 31, 2018
That should highlight resource exhaustion and possible malicious
activity. See #101, #135 an #155 umbrelled under #226.
@hellais hellais added this to Icebox in OONI-Verse Oct 8, 2019
@hellais
Copy link
Member

hellais commented Feb 18, 2020

ooni/backend#343

@hellais hellais closed this as completed Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
OONI-Verse
  
Icebox
Development

No branches or pull requests

2 participants