Skip to content

Wh1t3Fox/tempor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

tempor

Build Status Coverage Python Version Pypi Version Pypi Downloads Twitter

tempor is a tool used for creating ephemeral infrastructure in the cloud. tempor has the ability to create an arbitrary number of servers via Terraform, ideal for penetration testers and bug hunters.

VPS configuration is performed via Ansible roles after creation. Currently the following roles are supported:

Bare Setup (Default):

  • IPv4 and IPV6 iptables lock down
  • ssh_hardening

Minimal Setup:

  • Configuration files loaded
  • IPv4 and IPV6 iptables lock down
  • ssh_hardening

Full Setup:

  • Install packages
  • Configuration files loaded
  • IPv4 and IPV6 iptables lock down
  • ssh_hardening
  • os_hardening
  • Install Docker
  • Install pip

Custom Ansible playbook supported with all 3 setups using --custom flag!

Supports most images on AWS, Azure, Digital Ocean, GCP, Linode, and Vultr!

Total Setup Times

# bare setup
tempor aws -s  10.54s user 1.15s system 26% cpu 44.542 total

# minimal  setup
tempor aws -s -m  37.36s user 4.22s system 18% cpu 3:42.71 total
  
# full setup
tempor aws -s -f 96.83s user 15.69s system 22% cpu 8:20.32 total

# teardown
tempor --teardown rzcphs100 8.25s user 1.15s system 23% cpu 39.431 total

πŸ’° Referrals - Get Free Credit! πŸ’°

DigitalOcean Referral Badge

Vultr
Linode

βž• Install βž•

python3 -m pip install --user tempor

πŸ”§ Dependencies πŸ”§

  • Python >= 3.8
  • Windows - WSL only

βš™οΈ Configuration βš™οΈ

# ~/.config/tempor/config.yml

providers:
  -
    name: digitalocean
    region: nyc1
    image: ubuntu-20-04-x64
    resources: s-1vcpu-1gb
    api_token:
  -
    name: linode
    region: us-east
    image: linode/ubuntu20.04
    resources: g6-standard-1
    api_token:
  -
    name: vultr
    region: ewr
    image: 387
    resources: vc2-1c-1gb
    api_token:
  -
    name: aws
    region: us-east-1
    image: ami-04505e74c0741db8d
    resources: t2.micro
    api_token:
      access_key:
      secret_key:
  -
    name: gcp
    region: us-east1
    zone: us-east1-b
    image: ubuntu-os-cloud/ubuntu-1804-lts
    resources: f1-micro
    api_token:
      auth_file:
      project:
  -
    name: azure
    region: westus2
    image: Canonical/UbuntuServer/18_04-lts-gen2
    resources: Standard_F2
    api_token:
      subscription_id:
      client_id:
      client_secret:
      tenant_id:

config:
  none: false
  bare: true
  minimal: false
  full: false
  custom: /path/to/playbook.yml

⁉️ Usage ⁉️

❯ tempor --help
usage: tempor [-h] {digitalocean,linode,vultr,aws,gcp,azure} ...

positional arguments:
  {digitalocean,linode,vultr,aws,gcp,azure}

options:
  -h, --help            show this help message and exit
  -t TEARDOWN, --teardown TEARDOWN
                        Name of VPS Image to Tear down
  -u, --update          Check for Upates
  --version             Print current version

❯ tempor linode --help

usage: tempor linode [-h] [--image image] [--region region] [-s] [-l] [-b] [-m] [--teardown]

options:
  -h, --help            show this help message and exit
  -c, --count           Number of images to create
  --image image         Specify the OS Image
  --region region       Specify the Region to Host the Image
  --resources resource  Specify the hardware resources for the host image
  -s, --setup           Create a VPS
  -l, --list            List Available VPS'
  -f, --full            Full Configuration with hardening
  -m, --minimal         Minimal Configuration (just configs)
  --custom              Specify Ansible playbook for custom configuration (Path to main.yml file)
  --no-config           Do not run any configuration (except custom)

          Regions
┏━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ ID           ┃ Location ┃
┑━━━━━━━━━━━━━━╇━━━━━━━━━━┩
β”‚ ap-west      β”‚ in       β”‚
β”‚ ca-central   β”‚ ca       β”‚
β”‚ ap-southeast β”‚ au       β”‚
β”‚ us-central   β”‚ us       β”‚
β”‚ us-west      β”‚ us       β”‚
β”‚ us-southeast β”‚ us       β”‚
β”‚ us-east      β”‚ us       β”‚
β”‚ eu-west      β”‚ uk       β”‚
β”‚ ap-south     β”‚ sg       β”‚
β”‚ eu-central   β”‚ de       β”‚
β”‚ ap-northeast β”‚ jp       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           Images x86-64
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ID                            ┃ Name                            ┃
┑━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ linode/almalinux8             β”‚ AlmaLinux 8                     β”‚
β”‚ linode/alpine3.12             β”‚ Alpine 3.12                     β”‚
β”‚ linode/alpine3.13             β”‚ Alpine 3.13                     β”‚
β”‚ linode/alpine3.14             β”‚ Alpine 3.14                     β”‚
β”‚ linode/alpine3.15             β”‚ Alpine 3.15                     β”‚
β”‚ linode/arch                   β”‚ Arch Linux                      β”‚
β”‚ linode/centos7                β”‚ CentOS 7                        β”‚
β”‚ linode/centos-stream8         β”‚ CentOS Stream 8                 β”‚
β”‚ linode/centos-stream9         β”‚ CentOS Stream 9                 β”‚
β”‚ linode/debian10               β”‚ Debian 10                       β”‚
β”‚ linode/debian11               β”‚ Debian 11                       β”‚
β”‚ linode/debian9                β”‚ Debian 9                        β”‚
β”‚ linode/fedora34               β”‚ Fedora 34                       β”‚
β”‚ linode/fedora35               β”‚ Fedora 35                       β”‚
β”‚ linode/gentoo                 β”‚ Gentoo                          β”‚
β”‚ linode/debian11-kube-v1.20.15 β”‚ Kubernetes 1.20.15 on Debian 11 β”‚
β”‚ linode/debian9-kube-v1.20.7   β”‚ Kubernetes 1.20.7 on Debian 9   β”‚
β”‚ linode/debian9-kube-v1.21.1   β”‚ Kubernetes 1.21.1 on Debian 9   β”‚
β”‚ linode/debian11-kube-v1.21.12 β”‚ Kubernetes 1.21.12 on Debian 11 β”‚
β”‚ linode/debian11-kube-v1.21.9  β”‚ Kubernetes 1.21.9 on Debian 11  β”‚
β”‚ linode/debian9-kube-v1.22.2   β”‚ Kubernetes 1.22.2 on Debian 9   β”‚
β”‚ linode/debian11-kube-v1.22.6  β”‚ Kubernetes 1.22.6 on Debian 11  β”‚
β”‚ linode/debian11-kube-v1.22.9  β”‚ Kubernetes 1.22.9 on Debian 11  β”‚
β”‚ linode/debian11-kube-v1.23.4  β”‚ Kubernetes 1.23.4 on Debian 11  β”‚
β”‚ linode/debian11-kube-v1.23.6  β”‚ Kubernetes 1.23.6 on Debian 11  β”‚
β”‚ linode/opensuse15.3           β”‚ openSUSE Leap 15.3              β”‚
β”‚ linode/rocky8                 β”‚ Rocky Linux 8                   β”‚
β”‚ linode/slackware14.2          β”‚ Slackware 14.2                  β”‚
β”‚ linode/slackware15.0          β”‚ Slackware 15.0                  β”‚
β”‚ linode/ubuntu16.04lts         β”‚ Ubuntu 16.04 LTS                β”‚
β”‚ linode/ubuntu18.04            β”‚ Ubuntu 18.04 LTS                β”‚
β”‚ linode/ubuntu20.04            β”‚ Ubuntu 20.04 LTS                β”‚
β”‚ linode/ubuntu21.10            β”‚ Ubuntu 21.10                    β”‚
β”‚ linode/ubuntu22.04            β”‚ Ubuntu 22.04 LTS                β”‚
β”‚ linode/alpine3.11             β”‚ Alpine 3.11                     β”‚
β”‚ linode/centos8                β”‚ CentOS 8                        β”‚
β”‚ linode/fedora33               β”‚ Fedora 33                       β”‚
β”‚ linode/opensuse15.2           β”‚ openSUSE Leap 15.2              β”‚
β”‚ linode/slackware14.1          β”‚ Slackware 14.1                  β”‚
β”‚ linode/ubuntu21.04            β”‚ Ubuntu 21.04                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         Hardware Resources
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ID               ┃ Price      ┃ Description                      ┃
┑━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ g6-nanode-1      β”‚ $0.0075/hr β”‚ Nanode 1GB                       β”‚
β”‚ g6-standard-1    β”‚ $0.015/hr  β”‚ Linode 2GB                       β”‚
β”‚ g6-standard-2    β”‚ $0.03/hr   β”‚ Linode 4GB                       β”‚
β”‚ g6-standard-4    β”‚ $0.06/hr   β”‚ Linode 8GB                       β”‚
β”‚ g6-standard-6    β”‚ $0.12/hr   β”‚ Linode 16GB                      β”‚
β”‚ g6-standard-8    β”‚ $0.24/hr   β”‚ Linode 32GB                      β”‚
β”‚ g6-standard-16   β”‚ $0.48/hr   β”‚ Linode 64GB                      β”‚
β”‚ g6-standard-20   β”‚ $0.72/hr   β”‚ Linode 96GB                      β”‚
β”‚ g6-standard-24   β”‚ $0.96/hr   β”‚ Linode 128GB                     β”‚
β”‚ g6-standard-32   β”‚ $1.44/hr   β”‚ Linode 192GB                     β”‚
β”‚ g7-highmem-1     β”‚ $0.09/hr   β”‚ Linode 24GB                      β”‚
β”‚ g7-highmem-2     β”‚ $0.18/hr   β”‚ Linode 48GB                      β”‚
β”‚ g7-highmem-4     β”‚ $0.36/hr   β”‚ Linode 90GB                      β”‚
β”‚ g7-highmem-8     β”‚ $0.72/hr   β”‚ Linode 150GB                     β”‚
β”‚ g7-highmem-16    β”‚ $1.44/hr   β”‚ Linode 300GB                     β”‚
β”‚ g6-dedicated-2   β”‚ $0.045/hr  β”‚ Dedicated 4GB                    β”‚
β”‚ g6-dedicated-4   β”‚ $0.09/hr   β”‚ Dedicated 8GB                    β”‚
β”‚ g6-dedicated-8   β”‚ $0.18/hr   β”‚ Dedicated 16GB                   β”‚
β”‚ g6-dedicated-16  β”‚ $0.36/hr   β”‚ Dedicated 32GB                   β”‚
β”‚ g6-dedicated-32  β”‚ $0.72/hr   β”‚ Dedicated 64GB                   β”‚
β”‚ g6-dedicated-48  β”‚ $1.08/hr   β”‚ Dedicated 96GB                   β”‚
β”‚ g6-dedicated-50  β”‚ $1.44/hr   β”‚ Dedicated 128GB                  β”‚
β”‚ g6-dedicated-56  β”‚ $2.88/hr   β”‚ Dedicated 256GB                  β”‚
β”‚ g6-dedicated-64  β”‚ $5.76/hr   β”‚ Dedicated 512GB                  β”‚
β”‚ g1-gpu-rtx6000-1 β”‚ $1.5/hr    β”‚ Dedicated 32GB + RTX6000 GPU x1  β”‚
β”‚ g1-gpu-rtx6000-2 β”‚ $3.0/hr    β”‚ Dedicated 64GB + RTX6000 GPU x2  β”‚
β”‚ g1-gpu-rtx6000-3 β”‚ $4.5/hr    β”‚ Dedicated 96GB + RTX6000 GPU x3  β”‚
β”‚ g1-gpu-rtx6000-4 β”‚ $6.0/hr    β”‚ Dedicated 128GB + RTX6000 GPU x4 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

❯ tempor linode -b
Generating new key pair...Done.
Preparing Configuration...Done.
Creating VPS...Done.
Configuring SSH Keys...Done.

VPS' now available!

ssh ljtilopnez100

❯ tempor linode --list
                                  Active VPS'
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ VPS Name      ┃ IP Address    ┃ Region  ┃ Image              ┃ Hardware      ┃
┑━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
β”‚ ljtilopnez100 β”‚ 66.228.46.192 β”‚ us-east β”‚ linode/ubuntu20.04 β”‚ g6-standard-1 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

❯ tempor --teardown ljtilopnez100
Tearing down ljtilopnez100...Done.

Inspired by pry0cc/axiom.