Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Beginner's Toolkit for Securing Web Apps

FHV
January 14, 2017

A Beginner's Toolkit for Securing Web Apps

Talk presented at CUSEC 2017, January 14 2017/

FHV

January 14, 2017
Tweet

More Decks by FHV

Other Decks in Technology

Transcript

  1. is your infrastructure leaky? web server database hello I am

    a web server I listen on port 80 send me requests
  2. is your infrastructure leaky? hello I am a database server

    I listen on port 27017 let my data be FREE! web server database hello I am a web server I listen on port 80 send me requests
  3. hello I am a database server I listen on port

    27017 let my data be FREE! is your infrastructure leaky? hello I am a database server I listen on port 27017 let my data be FREE! web server database hello I am a web server I listen on port 80 send me requests database web server hello I am a web server I listen on port 80 send me requests
  4. is your infrastructure leaky? > Redis is designed to be

    accessed by trusted clients inside > trusted environments. This means that usually it is not a good > idea to expose the Redis instance directly to the internet or, > in general, to an environment where untrusted clients can > directly access the Redis TCP port or UNIX socket. somewhere in the depths of the documentation….
  5. what’s in a password? password123 + 14rFtg45 iloveyou9 x1.28YhgIosg0/uT mydogisbob

    welshman spat mediate fluke password123 + T5hGYpwD ⛺ hash
  6. user content all up in your databases select * from

    articles where id = $totally_legit_USER_INPUT
  7. the state of modern webpages super cool recipe blog one

    weird trick wow wow Entrepreneur piverate integrate grok Steve Jobs innovate big data experiential. Minimum viable product 360 campaign ship it grok responsive ship it co-working iterate. Sticky note viral ideate user centered design agile unicorn 360 campaign workflow hacker earned media parallax viral. Personas personas Steve Jobs quantitative vs. qualitative moleskine convergence pitch deck experiential co-working responsive responsive pair programming thought leader personas. Disrupt entrepreneur personas fund minimum viable. Like this! Tweet this! unbelievable whisking technique 152 comments against sous-vide: a polemic buy my book Patreon GitTip Flattr Bitcoin youtube ad network social media google analytics
  8. General Resources • Kelsey Gilmore-Innis — Seriously Strong Security on

    a Shoestring (Pycon) https://www.youtube.com/watch?v=8FeNdXzVLEs • A more detailed guide to a lot of the things in this talk, by Martin Fowler: https://martinfowler.com/articles/web-security-basics.html • The Tangled Web by Michal Zalewski — the best book for understanding the guts of internet architecture and its security problems • Rails security guides with great info on sessions: http:// guides.rubyonrails.org/security.html
  9. General Resources • On the surveillance state: Bruce Schneier —

    Data & Goliath, Liars & Outliers • Two “true crime” books that are really fun: • On cyberweapons: Countdown to Zero Day by Kim Zetter • On the botnet industrial complex: Spam Nation by Brian Krebs
  10. HTTPS • Free, easy-to-set-up certificates for your web server! https://certbot.eff.org/

    • SSL Labs — test if a website’s transport encryption is any good https:// www.ssllabs.com/ssltest/ • My talk on HTTPS for muggles (now with more Harry Potter metaphors) — https://www.youtube.com/watch?v=oKgzftLmyiE • SSL: it’s hard to get right https://recompilermag.com/issues/issue-1/ssl-its- hard-to-do-right/ • Learn about networking! It will help you understand security Julia Evan’s drawings are a fun place to start: https://drawings.jvns.ca/
  11. infrastructure • Silence on the Wire, by Michal Zalewski •

    Penetration Testing, by Georgia Weidman • Intro to isolating servers within a private network with iptables https://www.digitalocean.com/community/tutorials/how-to-isolate- servers-within-a-private-network-using-iptables — also look for DigitalOcean guides to ufw • Consider using a PaaS like Heroku and let them deal with your infrastructure.
  12. Passwords • Hash functions taste great — Curtis Lassam https://

    www.youtube.com/watch?v=1c8K0hrglRg • Dropbox’s password entropy calculator https://github.com/ dropbox/zxcvbn • Awesome passphrases from Peerio https:// passphrases.peerio.com