logo

drewdevault.com

[mirror] blog and personal website of Drew DeVault git clone https://hacktivis.me/git/mirror/drewdevault.com.git

Rotating-passwords.md (3690B)


  1. ---
  2. date: 2017-05-11
  3. title: Rotating passwords in bulk in the wake of security events
  4. layout: post
  5. tags: [security]
  6. ---
  7. I've been putting this post off for a while. Do you remember the [CloudFlare
  8. security
  9. problem](https://blog.cloudflare.com/incident-report-on-memory-leak-caused-by-cloudflare-parser-bug/)
  10. that happened a few months ago? This is the one that disclosed huge amounts of
  11. sensitive information for huge numbers websites. When this happened, your
  12. accounts on [thousands of
  13. websites](https://github.com/pirate/sites-using-cloudflare) were potentially
  14. compromised.
  15. Updating passwords for all of these services at once was a major source of
  16. frustration for users. Updating a single password can take 5 minutes, and
  17. changing dozens of them might take hours. I decided that I wanted to make this
  18. process easier.
  19. ```
  20. $ ./pass-rotate github.com linode.com news.ycombinator.com twitter.com
  21. Rotating github.com...
  22. Enter your two factor (TOTP) code:
  23. OK
  24. Rotating linode.com...
  25. Enter your two-factor (TOTP) code:
  26. OK
  27. Rotating news.ycombinator.com... OK
  28. Rotating twitter.com...
  29. Enter your SMS authorization code:
  30. OK
  31. ```
  32. I just changed 4 passwords in about 20 seconds. This is
  33. [pass-rotate](https://github.com/SirCmpwn/pass-rotate), which is basically
  34. youtube-dl for rotating passwords. It integrates with your password manager to
  35. make it easy to change your password. pass-rotate is also provided in the form
  36. of a library that password managers can directly integrate with to provide
  37. first-class support for password rotation with a shared implementation of
  38. various websites. Not only can it help you rotate passwords after security
  39. events, but it can be used for periodic password rotation to keep your accounts
  40. safer in general.
  41. How this was basically done is by reverse engineering the password change flow of
  42. each of the websites it supports. Each provider's backend submits HTTP requests
  43. that simulates logging into the website and interacting with the password reset
  44. form. This is often quite simple, like
  45. [github.py](https://github.com/SirCmpwn/pass-rotate/blob/master/passrotate/providers/github.py),
  46. but can sometimes be quite complex, like
  47. [namecheap.py](https://github.com/SirCmpwn/pass-rotate/blob/master/passrotate/providers/namecheap.py).
  48. The current list of supported services is available
  49. [here](https://github.com/SirCmpwn/pass-rotate/wiki/Currently-supported-services).
  50. There's also an issue to discuss making a standardized mechanism for automated
  51. password rotation [here](https://github.com/SirCmpwn/pass-rotate/issues/1). At
  52. the time of writing, the list of supported services is:
  53. * Cloudflare <sub>✗ TOTP</sub>
  54. * Digital Ocean <sub>✗ TOTP</sub>
  55. * Discord <sub>✓ TOTP</sub>
  56. * GitHub <sub>✓ TOTP ✗ U2F</sub>
  57. * Linode <sub>✓ TOTP</sub>
  58. * NameCheap <sub>✓ SMS</sub>
  59. * Pixiv
  60. * Twitter <sub>✓ SMS ✓ TOTP</sub>
  61. * YCombinator
  62. Adding new services is easy - check out [the
  63. guide](https://github.com/SirCmpwn/pass-rotate/blob/master/CONTRIBUTING.md). I
  64. would be happy to merge your pull requests. Please add websites you use and
  65. websites you maintain!
  66. I also set up a Patreon campaign today. If you'd like to contribute to my work,
  67. please visit [the Patreon page](https://patreon.com/sircmpwn). This supports all
  68. of my open source projects, but if you want to support pass-rotate in
  69. particular feel free to let me know when you make your contribution. This kind
  70. of project needs long term maintenance to support countless providers and
  71. keep up with changes to them. Feel free to let me know what service providers
  72. you want me to add support for when you make your pledge!