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

Thinking Evil Thoughts

Gareth Rushgrove
September 01, 2016

Thinking Evil Thoughts

Talk from Software Circus 2016 on Threat Modeling

Gareth Rushgrove

September 01, 2016
Tweet

More Decks by Gareth Rushgrove

Other Decks in Technology

Transcript

  1. - What is threat modeling? - Getting the scope right

    - Identifying risks - Using conferences to hack people Gareth Rushgrove
  2. - Determine scope - Identify threat agents and attacks -

    Understand existing countermeasures - Identify vulnerabilities - Prioritise risks - Identify countermeasures Gareth Rushgrove https://www.owasp.org/index.php/Category:Threat_Modeling
  3. Inside each of us, there is the seed of both

    good and evil. It's a constant struggle as to which one will win. Gareth Rushgrove “ ” Eric Burdon
  4. Gareth Rushgrove the attack surface of a software environment is

    the sum of the different points (the "attack vectors") where an unauthorized user (the "attacker") can try to enter data to or extract data from an environment. ATTACK SURFACE
  5. Do you protect your CI stack as well as your

    production database? Gareth Rushgrove
  6. Could I execute a query on your production database if

    I compromised your CI server? Gareth Rushgrove
  7. Gareth Rushgrove an entity which facilitates interactions between two parties

    who both trust the third party TRUSTED THIRD PARTY
  8. Gareth Rushgrove a term in computer science and security used

    to describe a boundary where program data or execution changes its level of "trust". The term refers to any distinct boundary within which a system trusts all sub-systems (including data). TRUST BOUNDARY
  9. How you think about the servers changes, and the respective

    risks and mitigations change. But servers still exist. Gareth Rushgrove
  10. How you think about operations changes, and the respective risks

    and mitigations change. But operations still exist. Gareth Rushgrove
  11. Differences in how you perceive a system and how it

    actually works can be used to exploit it Gareth Rushgrove
  12. Out systems are immutable, we don’t need runtime file integrity

    checking Gareth Rushgrove “ ” A possibly naive developer
  13. Gareth Rushgrove unchanging over time or unable to be changed.

    synonyms: unchangeable, fixed IMMUTABLE
  14. (without introducing more risk) Gareth Rushgrove $ docker run -d

    alpine /bin/sh \ -c "while true; do echo hello world; sleep 1; done"
  15. (without introducing more risk) Gareth Rushgrove $ docker run --read-only

    -d alpine /bin/sh \ -c "while true; do echo hello world; sleep 1; done"
  16. (without introducing more risk) Gareth Rushgrove $ docker exec 379150b2cf05

    touch /tmp/surprise touch: cannot touch '/tmp/surprise': Read-only file syste
  17. (without introducing more risk) Without technical controls you only have

    social guarantees of immutability Gareth Rushgrove
  18. Let’s assume your applications and infrastructure are super secure* Gareth

    Rushgrove * This probably isn’t true. You should worry about that as well.
  19. - Penetration testing - Intrusion detection system - Web application

    firewall - Network firewalls - Malware scanning - Configuration management Gareth Rushgrove
  20. - Hand maintained configuration - Updated whenever - No central

    monitoring - Administrative access - Single factor authentication Gareth Rushgrove
  21. Gareth Rushgrove More Internet Some Internet Marks iPhone FREE CONFERENCE

    WIFI Hacked Android CONFERENCE VENUE Private Software Circus Company next door Coffee shop downstairs Software Circus II Docker Corp Avengers Tower FON My Blackberry Nokia4ever ABANK
  22. Gareth Rushgrove More Internet Some Internet Marks iPhone FREE CONFERENCE

    WIFI Hacked Android CONFERENCE VENUE Private Software Circus Company next door Coffee shop downstairs Software Circus II Docker Corp Avengers Tower FON My Blackberry Nokia4ever ABANK This is the official conference wifi right?
  23. Gareth Rushgrove More Internet Some Internet Marks iPhone FREE CONFERENCE

    WIFI Hacked Android CONFERENCE VENUE Private Software Circus Company next door Coffee shop downstairs Software Circus II Docker Corp Avengers Tower FON My Blackberry Nokia4ever ABANK Or is it this one? Whatever, both work
  24. Who has ever picked up a USB memory stick at

    a conference? Gareth Rushgrove
  25. USB devices exist which will run a script on connect

    (normally by impersonating a keyboard) Gareth Rushgrove
  26. (without introducing more risk) DELAY 1000 COMMAND SPACE DELAY 500

    STRING Terminal DELAY 500 ENTER DELAY 800 STRING echo 'RSA_PUB_ID' >> ~/.ssh/authorized_keys ENTER DELAY 1000 STRING killall Terminal ENTER Add my public key https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payload---OSX-Passwordless-SSH-access-%28ssh-keys%29
  27. Lots of people here are on Twitter and using the

    conference hashtag Gareth Rushgrove
  28. (without introducing more risk) $ curl -s https://api.github.com/users/<username>/events/public \ |

    jq '.[].payload.commits[0].author.email' \ | sort \ | uniq \ | grep -v "null" Email from GitHub user
  29. an e-mail spoofing fraud attempt that targets a specific organization

    or individual, seeking unauthorized access to confidential data. Gareth Rushgrove SPEAR PHISHING
  30. Hi <your name> Great to see you at <conference name

    here> last week. I thought you’d be interested in the container testing tool I mentioned. http://nothingevilhere.com. Would love to know what you think. Hopefully see you at DockerCon next year too.
  31. (without introducing more risk) So you’re saying we’re all doomed?

    This is quite depressing now I think about it
  32. Part of threat modeling is coming up with suitable mitigations

    to the risks identified Gareth Rushgrove
  33. - 2 factor authentication - Time-limited credentials - Separation of

    duties - Two person rule - Configuration management Gareth Rushgrove
  34. having more than one person required to complete a task.

    In business the separation by sharing of more than one individual in one single task is an internal control intended to prevent fraud and error. Gareth Rushgrove SEPARATION OF DUTIES
  35. a control mechanism designed to achieve a high level of

    security for especially critical material or operations. Under this rule all access and actions requires the presence of two authorized people at all times. Gareth Rushgrove TWO-PERSON RULE
  36. Gareth Rushgrove a process that identifies critical information to determine

    if friendly actions can be observed by enemy intelligence and determines if information obtained by adversaries could be interpreted to be useful to them. OPERATIONAL SECURITY (OPSEC)
  37. - Protect data in transit - Protect data at rest

    - Authentication - Secure boot - Platform integrity and sandboxing - Application whitelisting Gareth Rushgrove - Malicious code detection - Security policy enforcement - External interface protection - Device update policy - Event collection and analysis - Incident response https://www.cesg.gov.uk/guidance/end-user-devices-security-principles
  38. Existing mitigations and security controls won’t be enough. You need

    to collaborate with security colleagues on new approaches Gareth Rushgrove