Skip to content
/ farm.hs Public

Exploit Farm for Classic CTF Competitions

License

Notifications You must be signed in to change notification settings

gnull/farm.hs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

farm-hs

Table of Contents

farm-hs is a program for running an exploit on many opponent teams in parallel, collecting flags and sumbitting them to a jury checker.

Usage

$ farm-hs --help
Helper program for Attack-Defence CTF competitions

Usage: farm-hs PROGRAM [[ARG1 [ARG2 ...]]] (-t|--targets FILE)
               (-s|--submit COMMAND) [-j|--jobs N] (-r|--flagre REGEX)
               [-c|--nocolor]
  Run an exploit on list of target hosts

Available options:
  PROGRAM                  Exploit program
  [ARG1 [ARG2 ...]]        Arguments for exploit PROGRAM
  -t,--targets FILE        File containing list of target IP addresses
  -s,--submit COMMAND      Shell command to submit flags. This command will get
                           flag in `flag` environment variable. E.g. `echo
                           $flag`
  -j,--jobs N              Number of parallel running exploit jobs
  -r,--flagre REGEX        POSIX regex for flag
  -c,--nocolor             Disable colors in output
  -h,--help                Show this help text

farm-hs can also generate bash completion for itself. Feeding it into your bash is straightforward:

source <(farm-hs --bash-completion-script `which farm-hs`)

You can add this line directly into your .bashrc.

Installation

If you don’t want to bother yourself building farm-hs from source check out the releases page. It contains prebuilt static binaries for x86 and x86-64.

farm-hs can be built and installed either in ~/.cabal/bin using cabal-install:

cabal build
cabal install

or in ~/.local/bin using stack:

stack setup
stack build
stack install