Oleg Kupreev - DevOps4Hackers

0c988f4618b436b14ce6ddcecd52d11d?s=47 DC7499
December 11, 2015

Oleg Kupreev - DevOps4Hackers

DEFCON Moscow 11

0c988f4618b436b14ce6ddcecd52d11d?s=128

DC7499

December 11, 2015
Tweet

Transcript

  1. 1.
  2. 3.

    WHOAMI • Just another coder • Started to code with

    BASIC @ school in 2000 • Got PC after #1 place @ local coding Olympics between schools • Working as hacker @ hlsec.ru • Like to write some code 4 PHUN&PWN • keybase.io/090h root@0x90.ru twitter.com/090h github.com/0x90
  3. 4.

    Programming languages I have known and loved • Basic –

    school @ Georgievsk • Pascal/Object Pascal – Kuban State Technological University kubstu.ru • C/C++/C# – self education • Assembler x86/x64/ARM/MIPS – self education • Python – self education if coding_world.evaluating: self.continue_education() or die()
  4. 8.

    15 years of coding • OS: Windows, Linux, OS X,

    Android, iOS • IDE: Delphi, MS VS, Eclipse, JetBrains, Atom.io • Compilers: VC, MASM, FASM, SDCC, GCC, LLVM • Debuggers: SoftIce, OllyDBG, WinDBG, WinAppDbg, vivisect, r2 • Disassemblers: using cracked IDA since 3.7, DeDe, IDR, r2 • Decompilers: various for VB/.NET/Java/Python/Ruby • VM: VMWare, VBox, Parallels, QEMU, Docker/LXC, XEN, KVM • VCS: CVS -> SVN -> HG/GIT • Tons of helpful tools for DEVELOPMENT & BUILD & DEPLOYMENT
  5. 9.

    Developer environment • Shell • Compiler/Interpreter • Version control system

    • IDE • Dependencies solving tools • Virtualization • Solutions for code testing • Deployment tools • Project template solution
  6. 12.

    Compiler & Interpreter Compiler • LLVM for new projects •

    GCC for old projects and embedded devices • Make/Cmake to build Interpreter • Python 2.7 for old projects • Python 3.5 for new projects
  7. 13.

    Version Control System • GIT for hardcore power (subrepo, hooks)

    • HG (mercurial) for beginners • Github.com for public releases • Bitbucket.org for private • … or Kalithea for personal GIT • Use SSH keys and/or HW based 2FA with Ubikey (10x 2 VOS) • Don’t forget to create .gitignote/.hgignore
  8. 14.

    IDE • MS Visual Studio for windows projects. No way.

    • Atom.io for small projects (easy but powerful) • JetBrains XXXXXX for XXX programming language • Try to do everything in PyCharm (VCS, VM, DB, Deps, Deploy)
  9. 15.

    Dependencies SYSTEM DEPENDENCIES: • Windows: chocolatey -> Forget about next,

    next, finish • Linux: apt-get/pacman/yaourt • OS X: macports (brew sucked a lot with packages for SDR) PYTHON DEPENDENCIES: • Pip [pip freeze > requirements.txt] [pip install -r requirements.txt] • Virtualenv + requirements.txt in the past • Pyenv = Python versioning + Virtualenv + req
  10. 16.

    Virtualization Changed the world: • Internet: VPS hosting • System

    coding (BSOD @ VM) • Administration: VM templates, snapshots, backups • information security: try to escape from hypervisor • VM 4 DEV + VM 4 PROD • IaaS, PaaS, SaaS, MaaS, CaaS & XaaS • Clouds 4 everything!
  11. 17.

    Virtualization world • VMWare is the best choice for any

    OS, but $$$ • VirtualBox is free, but… • Docker, docker-compose, Kitematic * • Vagrant • Packer.io • Otto * VirtualBox is used to run Docker under OSX (boot2docker)
  12. 22.

    Deployment… • Integrated in PyCharm • Vagrant plugin for ESXi/vSphere

    • Docker containers to VDS • Rsync/GIT/SCP for code delivery • Fabric/Salt/Ansible/Chef/Puppet for deployment automation … and may be Otto will change the world
  13. 24.

    Project templates • Create and use project templates for time

    saving • Study how to organize projects in the right way • Cookiecutter https://github.com/audreyr/cookiecutter • Helps to create working project in seconds!