Code Monkey home page Code Monkey logo

epictreasure's Introduction

EpicTreasure - Batteries included CTF VM

Credit to ctfhacker's original EpicTreasure, I fixed it up and modified it for myself

Tools included

Docker

docker pull ctfhacker/epictreasure
docker run -v /path/to/host/share/folder:/root/host-share --privileged -it --workdir=/root ctfhacker/epictreasure

Vagrant

Install VirtualBox

Check Virtualbox for information on installing Virtualbox on your respective operating system.

Install Vagrant

Check VagrantUp for information on installing vagrant.

Fire up the VM

git clone https://github.com/teknogeek/EpicTreasure
cd EpicTreasure
vagrant up
... Go grab a coffee while we install all the things
vagrant ssh

Default settings

By default, ctfhacker's dotfiles are installed onto the VM. Simply comment out the following lines in et_setup.sh if you don't want his settings.

# Personal config
cd $HOMEDIR
sudo apt-get -y install stow
rm .bashrc
git clone https://github.com/ctfhacker/dotfiles
(
  cd dotfiles
  ./install.sh
)

Terminal

  • Colorscheme for the terminal and vim is solarized

Vim

  • jk or jj to ESC out of Vim
  • ESC and Arrow keys are hard coded to not work in Vim (as a teaching mechanism)
  • : is remapped to ; (who uses ; anyway?)
  • leader key is SPACE (thanks to spacemacs)
  • SPACE p will drop an embedded IPython line in a python script
  • H moves to beginning of line, L moves to end of line (instead of ^ and $)

Tmux

  • A new shell spawns a fresh tmux session
  • tmux leader switched to Ctrl+A
  • Ctrl+A - produces a horizontal pane. Ctrl+A \ produces a vertical pane.
  • Ctrl+A [hjkl] moves around available panes as vim motion

Check correct installation

Pwndbg

Run the following command in the VM:

gdb /bin/ls

Expected output:

Loaded 53 commands.  Type pwndbg for a list.
Reading symbols from host-share/crackme...(no debugging symbols found)...done.
Only available when running
pwn>

Radare

Run the following command in the VM:

r2 /bin/ls

Expected output:

[0x00404890]> aaa

Pwntools

Run the following command in the VM:

python
>>> from pwn import *
>>> elf = ELF('/bin/ls')
[*] '/bin/ls'
    Arch:     amd64-64-little
    RELRO:    Partial RELRO
    Stack:    Canary found
    NX:       NX enabled
    PIE:      No PIE
    FORTIFY:  Enabled
>>> rop = ROP(elf)
[*] Loading gadgets for '/bin/ls'

angr

Run the following commands in the VM:

source ~/angr/bin/activate
python
>>> import angr
>>>

decompile

Run the following commands in the VM:

decompile binary_name

Shared folder

Drop files in the host-share folder on your host to find them on your VM at /home/vagrant/host-share

epictreasure's People

Contributors

ctfhacker avatar teknogeek avatar amlweems avatar zardus avatar

Watchers

James Cloos avatar Mindaugas Slusnys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.