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

Using Robots to Fight Bad Guys

Using Robots to Fight Bad Guys

Turning hubot into a DFIR sidekick...

Presented at BSidesDFW and updated for BayThreat 2013.

Scott J. Roberts

December 06, 2013

Transcript

66 slides
  1. core elements - open source intelligence - network forensics -

    system forensics - reverse engineering - penetration testing & vulnerability management
  2. a little about GitHub - optimized for happiness - work

    when - where you want - reduce unnecessary processes - results - asynchronous - multidevice 1% 20% 49% 30% sf US world wanderers
  3. bro do you even chat? - GitHub lives in chat

    - async (searchable, read back, push notifications) - multi device (laptop, tablet, phone) - collaborative - so we built tools around it
  4. what is hubot? - node.js based chat bot - coffeescript

    based actions+ - redis based "brain"+ - chat via shell & campfire+ - deployable on unix, windows, & heroku+
  5. how GitHub uses hubot - deploy & monitor servers via

    puppet - deploy & monitor code via capistrano & jenkins ci - monitor systems via nagios - update GitHub's status site - manage ops pager alerts from pager duty - remember things about people - look up funny pictures
  6. “ChatOps” - chatops is about a shared operations experience -

    hides the ugly - gives you mobile support everywhere
  7. –Ryan Tomayko “This was always my main motivation with Hubot

    - teaching by doing by making things visible. It's an extremely powerful teaching technique.”
  8. goal: adapt chatops for ir - automate common ir tasks

    - make it easier to collaborate with other incident responders for improved response and teaching - untie ir from a desk - learn some new technologies
  9. we already were - /firewall - manipulate host firewalls -

    /host-fw-port - manipulate the firewall on host - /nagios - interact with nagios - /pstree - show process tree on host - /puppet - manipulate a puppet agent - /whois - show info about an addr - /logs - get application logs from a given service - /twitter - posting to & monitoring twitter - secret stuff i can’t share but i promise is awesome…
  10. throwback - open source intelligence - network forensics - system

    forensics - reverse engineering - penetration testing
  11. hubot vtr - code name generator - pipl - yara

    - virustotal lookup (ip, url, hash) - geolocate ip address - my web of trust lookup - generate reputation links - reverse dns - shodan - short url expander
  12. writing hubot scripts - coffeescript = javascript + python -

    tons of examples - documentation matters - pull requests welcomed
  13. rhodey - not everyone writes coffeescript & security types love

    python - creates a local REST api for building new VTR services - built using flask - mostly an example framework at the moment, but PRs are welcome
  14. why rhodey - some things are easier to write in

    python - take advantage of already available python libraries for incident response - allows local actions - gives control of networking & protects from third party snooping
  15. things to build - vtr helper library - “the list”

    - merging more pull requests (i hope!)
  16. –Doug McIlroy “This is the Unix philosophy: Write programs that

    do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.”
  17. development - terminal based chat - built locally - run

    from the command line + in memory redis
  18. dfir whiskey lounge - campfire based chat - built off

    a digital ocean vps - heroku (1 dyno) + redis to go brain - flint for osx & ios - we call him “Woodhouse”
  19. takeaway - it’s better to respond together than alone -

    Hubot can help you automate, collaborate, mobilize, & beautify - coffeescript has a couple core patterns that make it easy to build new scripts
  20. links & errata - hubot - hubot vtr scripts &

    hubot vtr rhodey - chatops at github - jesse newland - programming butler: hubot scripts explained - code school: learn coffeescript
  21. shoutouts - @rtomayko & @jnewland ~ hubot & chatops creators

    - @technicalpickles ~ for dealing with my constant questions - @technoskald, @jcran, @mattjay, & other contributors - everyone who exposes json endpoints

More Decks by Scott J. Roberts

Other Decks in Technology