SlideShare une entreprise Scribd logo
1  sur  63
Télécharger pour lire hors ligne
Digital Forensics and
Incident Response in the
Cloud
Dr. Michael Cohen
Velocidex Innovations.
https://www.velocidex.com/
Part 2: End point DFIR agents
Containers and Docker
Containers are
essentially
lightweight virtual
machines.
Docker is a system
for building and
managing
containers.
What are containers?
What containers are and why might you use them?
So we deployed our containers and VMs -
are we done?
Endpoint monitoring solutions
✘ When we deploy VMs, what goes on inside the
VMs is totally our responsibility!
✗ Google does not know what is running inside the VM!
✗ If our app stack is vulnerable we will get owned!
✗ Patching and good configuration is still important.
✘ VMs may be secure at day 1 but someone has
to maintain them...
Endpoint monitoring solutions
✘ Endpoint monitoring allows us to have
visibility inside the VMs:
✗ Can get detailed information of exactly what is
running inside each VM.
✗ We can respond to compromise quickly:
■ Quarantine and preserve evidence.
■ Analyze and triage
✗ We can hunt across the entire infrastructure
■ For indicators of compromise
■ For inventory purposes.
Lots of endpoint monitoring tools
Velocidex and Velociraptor
✘ At Velocidex we specialize in packaging and
distributing tools for cloud deployments.
✘ Velociraptor is a very thin endpoint client
which is compatible with GRR.
✗ We also package GRR for cloud deployment
✗ We include Facebook’s OSQuery
In one convenient package!
Let’s design our cloud deployment
Cloud SQL
DatabaseCloud SQL
Proxy
GRR Server
Velociraptor ClientsVelociraptor ClientsVelociraptor Clients
VM contains 2 containers
Admin UI
Usually SSL
Differences between this Workshop and Reality
✘ We will use a static IP and HTTP
✘ In reality you should always use SSL for the
admin UI - Let’s encrypt is easy!
✗ GRR implements its own encryption so client
connections can happen over http.
✘ In practice you should use a DNS name for
front end
✗ Makes it easier to move clients between servers.
✗ You can configure multiple endpoints for clients.
Reserve a static IP address
Create a Kubernetes cluster
What is this Kubernetes you
speak of?
What is a cluster?
Upload the docker container to your project’s registry.
Creating cloud mysql instance
Enabling the cloud SQL API.
Create a service account for SQL access
SQL Connector service account
✘ The service account
must have the Cloud
SQL client so it can
connect to the cloud
SQL instance.
✘ We must also have the
private key so the SQL
proxy can log in as that
service account
Generate new keys and configuration for GRR
1. Clone the velociraptor repository to your cloud shell
git clone https://gitlab.com/velocidex/velociraptor_server.git
2. Now install the needed python packages
sudo apt-get install python-yaml python-cryptography
3. Run the configuration script to generate the server configuration
python velociraptor/scripts/configure.py
my_server_config.yaml
my_client_config.yaml
--mysql_location localhost:3306
Note that GRR will talk to the proxy on
localhost.
Make sure to edit your server configuration
✘ Frontend URL is the URL that clients will use
to connect to the controller.
✗ Normally this will be a DNS name but we will use the
static IP address now.
Configure kubectrl to access our project
Hide secrets in Kubernetes
We generally do not want to store secrets in configuration files. Therefore
we need to push the secret to the kubernetes server.
1. The service account credentials allow the SQL proxy to connect to
cloud SQL service:
kubectl create secret generic
cloudsql-instance-credentials
--from-file=credentials.json=
Velocidex-205204-423e5d3047cf.json
2. The GRR config file contains keys to control the GRR/Velociraptor
clients as well as the password for the GRR admin user:
kubectl create secret generic grr-config
--from-file=grr-config=my_server_config.yaml
kubectl create secret generic grr-admin-password
--from-literal=password=passw0rd
Kubernetes secret management
There are 2 main ways to pass secrets to the
containers:
1. Via environment variables
2. Via a mounted filesystem.
We will do both here.
apiVersion: v1
kind: Pod
metadata:
name: velociraptor-server
spec:
containers:
- image: asia.gcr.io/velocidex-205204/velociraptor
name: grr
env:
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: grr-admin-password
key: password
- name: GRR_CONFIG
valueFrom:
secretKeyRef:
name: grr-config
key: grr-config
- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.11
command: ["/cloud_sql_proxy",
"-instances=valid-broker-180316:australia-southeast1:mysql=tcp:3306",
"-credential_file=/secrets/cloudsql/credentials.json"]
volumeMounts:
- name: cloudsql-instance-credentials
mountPath: /secrets/cloudsql
readOnly: true
volumes:
- name: cloudsql-instance-credentials
secret:
secretName: cloudsql-instance-credentials
GRR
Container
Cloud SQL
Proxy
Container
Launch the pod
The full deployment file is included in the files directory.
Make a deployment from the pod file:
kubectl create -f deployment.yaml
Watch the pod coming up in the “Workload” section of the console.
To be able to connect to the pod we need to expose it with
a load balancer
apiVersion: v1
kind: Service
metadata:
name: server
labels:
app: velociraptor
spec:
type: LoadBalancer
loadBalancerIP: "35.189.2.35"
ports:
- port: 80
name: adminui
targetPort: 8000
- port: 8080
name: control
targetPort: 8080
selector:
app: velociraptor
Check our installation
✘ Ensure that we can connect to the frontend
properly using the static IP address we
reserved earlier
Check our installation - Make sure we can log in.
Investigating a typical cloud deployment
✘ For the next part of the workshop we will play
around with our cloud deployment.
✘ Imagine we need to respond to a compromise
in such a setup:
✗ What evidence do we look for?
✗ How do we preserve it?
✗ What could have happened?
The Kubernetes cluster
The cluster is just a bunch of VMs running docker
Get a shell on a VM
Lets forensically analyze one of the VMs.
✘ I said before that containers are like
lightweight virtual machines ….
I kind of lied ….
VM vs Containers - what are the difference?
VM vs Containers - what are the difference?
Processes in Docker
Docker containers are not really VMs.
Containerized processes are just regular
processes.
More similar to chroot prison.
Docker layered filesystem
✘ Docker uses a layered
filesystem model.
✘ Each layer introduces
changes (add/delete)
to the previous layer.
✘ The files we see in the
container are the union
of all the files in each
layer.
Ramifications of layered filesystems
Changing a file in the
running container will add
the file to the upper layer.
Changing a file in a lower
layer will make the change
visible to all users.
Docker cheat sheet
# docker ps | less -S
# docker inspect b5884a6b6e9c |less -S
Docker Cheat Sheet
# docker exec -i -t <container_id> /bin/bash
Exercises
Can you figure out what
changes Velociraptor makes
to the running container?
Can you explain these
changes?
Is it possible for attackers to
change lower level layers?
What does this mean for forensic acquisition?
What challenges would we have to respond
to this instance?
Responding to a cloud instance
✘ Typically we have no physical access - we
have to do live acquisition.
✘ Typically we must do it from within the VM
itself.
Provider
Physical
Machine
Cluster VM
Containers
More Challenges
✘ Typically container host has limited disk space
so we need to stream the data off the
instance as we image.
Acquire an AFF4 image with linpmem
✘ Acquire memory and the content of
/var/lib/docker/
✘ Grab the docker directory /var/lib/docker/
✘ Stream the image into a bucket.
All the tools you need are in the files share.
Create a cloud bucket to accept the evidence.
We need to create a service account to authenticate
1. Service account is an automated way to
authenticate
2. What are the risks for evidence collection SA?
3. How can we carefully manage the risks?
a. Can limit access to only be allowed to write to
evidence bucket - remember we will be using these
credentials on potentially compromised hosts.
b. We can either give access to the project or the
specific bucket.
Creating service account
✘ Furnish a new key - this
will provide a JSON file
with credentials.
✘ Note that these
credentials ONLY have
the ability to upload to the
bucket. It is ok to use
them on compromised
hosts.
Add our tools to the bucket
✘ I typically have:
✗ Linpmem
https://github.com/Velocidex/c-aff4/releases
✗ Gcsuploader
https://gitlab.com/velocidex/tools/tags/v0.1
You can find these here.
✘ Make sure to store it somewhere executable
# /var/run/linpmem_3.0rc2.bin -o - -dd | /var/run/gcsupload 
-bucket evidence-auscert -name test2.aff4 -project auscert-205300
Reading from stdin...
2018-05-26 09:38:34 I Imaging memory
2018-05-26 09:38:34 I Creating output AFF4 ZipFile.
2018-05-26 09:38:34 I Will write in AFF4 map format.
……………
Installing and running GRR/Velociraptor
When we install GRR,
the installation
process creates new
keys and then builds
packages for the
clients.
Installing GRR/Velociraptor on clients.
✘ GRR clients come as debian packages or RPM
✘ They are typically quite large and contain
many files (written in python and contain
many DLLs).
✘ You won’t be able to install on unsupported
OS’s - e.g. Kubernetes clusters are running
Chrome OS.
Velociraptor - an alternative GRR client
✘ Velociraptor is a new GRR client which is
designed to be very lightweight:
✗ Shipped as a single static executable - in most cases
there is no need to package it.
✗ Very fast
✗ Supports Velocidex Query Language (VQL) queries.
■ More on this later!
Exercise
✘ In your groups, spin up a new Ubuntu
machine and install the GRR client on it.
✘ Now try to run velociraptor on the ChromeOS
machine.
✗ We will worry about installation later.
In each case verify the installation worked by
checking in the admin ui.
Now we need to configure the velociraptor client
✘ Velociraptor is a stand alone, statically
compiled binary. No dependencies, run
anywhere.
Fetch the velociraptor binary.
$ wget https://www.velocidex.com/releases/velociraptor_0.1.0-1_amd64.elf
--2018-05-26 22:48:08-- https://www.velocidex.com/releases/velociraptor_0.1.0-1_amd64.elf
Resolving www.velocidex.com (www.velocidex.com)... 74.125.200.121, 2404:6800:4003:803::2013
Connecting to www.velocidex.com (www.velocidex.com)|74.125.200.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
Saving to: ‘velociraptor_0.1.0-1_amd64.elf’
velociraptor_0.1.0-1_amd64.elf
2018-05-26 22:48:13 (3.67 MB/s) - ‘velociraptor_0.1.0-1_amd64.elf’ saved [8090192]
Upload the client config to the bucket.
$ ./gcsupload -bucket evidence-auscert -project auscert-205300 -source my_client_config.yaml
-name client.yaml
Upload the binary to the bucket.
$ ./gcsupload -bucket evidence-auscert -project auscert-205300 -source
velociraptor_0.1.0-1_amd64.elf -name velociraptor
Prepare the binaries for install
Test the client locally.
✘ When the client starts for the first time:
✗ It generates a new unique ID and keys
✗ Write the keys to the writeback location.
✗ Communicates with the server (get 406)
✗ Enrols and the server will interrogate it.
How can we install it on all the VMs in the project?
What are the issues in using the previous reference?
Very simple install script.
#!/bin/bash
BINARY_DIR=/var/lib/google/v
mkdir -p $BINARY_DIR
curl -o /etc/client.yaml https://storage.googleapis.com/evidence-auscert/client.yaml.1
curl -o $BINARY_DIR/v https://storage.googleapis.com/evidence-auscert/velociraptor_0.1.0-1_amd64.elf
chmod +x $BINARY_DIR/v
nohup $BINARY_DIR/v client /etc/client.yaml > /tmp/v.log &
sleep 2
rm -f $BINARY_DIR/v
exec 0>&- # close stdin
exec 1>&- # close stdout
exec 2>&- # close stderr
exit 0
✘ Make sure to install the script at the project level!
✗ Hint: gcloud compute project-info add-metadata
Test and make sure the install works.
✘ Run different machine types:
✗ Chrome OS
✗ Ubuntu
✗ Redhat
✘ What issues do you encounter?
✗ Hint: GCS buckets set caching for public objects!
THANKS!
Any questions?
You can find me at
✘ mike@velocidex.com
✘ scudette@gmail.com

Contenu connexe

Tendances

Systemtap
SystemtapSystemtap
SystemtapFeng Yu
 
Gruntwork Executive Summary
Gruntwork Executive SummaryGruntwork Executive Summary
Gruntwork Executive SummaryYevgeniy Brikman
 
Virtual training Intro to InfluxDB & Telegraf
Virtual training  Intro to InfluxDB & TelegrafVirtual training  Intro to InfluxDB & Telegraf
Virtual training Intro to InfluxDB & TelegrafInfluxData
 
Helm – The package manager for Kubernetes
Helm – The package manager for KubernetesHelm – The package manager for Kubernetes
Helm – The package manager for KubernetesFabianRosenthal1
 
High availability virtualization with proxmox
High availability virtualization with proxmoxHigh availability virtualization with proxmox
High availability virtualization with proxmoxOriol Izquierdo Vibalda
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel CrashdumpMarian Marinov
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless ContainersAkihiro Suda
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringShapeBlue
 
Seastore: Next Generation Backing Store for Ceph
Seastore: Next Generation Backing Store for CephSeastore: Next Generation Backing Store for Ceph
Seastore: Next Generation Backing Store for CephScyllaDB
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabTaeung Song
 
DRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタ
DRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタDRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタ
DRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタ株式会社サードウェア
 
HSA Kernel Code (KFD v0.6)
HSA Kernel Code (KFD v0.6)HSA Kernel Code (KFD v0.6)
HSA Kernel Code (KFD v0.6)Hann Yu-Ju Huang
 
re:Invent 2019 BPF Performance Analysis at Netflix
re:Invent 2019 BPF Performance Analysis at Netflixre:Invent 2019 BPF Performance Analysis at Netflix
re:Invent 2019 BPF Performance Analysis at NetflixBrendan Gregg
 
ACRN Kata Container on ACRN
ACRN Kata Container on ACRNACRN Kata Container on ACRN
ACRN Kata Container on ACRNProject ACRN
 
[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020Akihiro Suda
 
Docker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme PetazzoniDocker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme PetazzoniDocker, Inc.
 
Secure container: Kata container and gVisor
Secure container: Kata container and gVisorSecure container: Kata container and gVisor
Secure container: Kata container and gVisorChing-Hsuan Yen
 
Brief introduction to kselftest
Brief introduction to kselftestBrief introduction to kselftest
Brief introduction to kselftestSeongJae Park
 

Tendances (20)

Systemtap
SystemtapSystemtap
Systemtap
 
Gruntwork Executive Summary
Gruntwork Executive SummaryGruntwork Executive Summary
Gruntwork Executive Summary
 
Virtual training Intro to InfluxDB & Telegraf
Virtual training  Intro to InfluxDB & TelegrafVirtual training  Intro to InfluxDB & Telegraf
Virtual training Intro to InfluxDB & Telegraf
 
Helm – The package manager for Kubernetes
Helm – The package manager for KubernetesHelm – The package manager for Kubernetes
Helm – The package manager for Kubernetes
 
High availability virtualization with proxmox
High availability virtualization with proxmoxHigh availability virtualization with proxmox
High availability virtualization with proxmox
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel Crashdump
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless Containers
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uring
 
Seastore: Next Generation Backing Store for Ceph
Seastore: Next Generation Backing Store for CephSeastore: Next Generation Backing Store for Ceph
Seastore: Next Generation Backing Store for Ceph
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLab
 
DRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタ
DRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタDRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタ
DRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタ
 
Redis vs Aerospike
Redis vs AerospikeRedis vs Aerospike
Redis vs Aerospike
 
HSA Kernel Code (KFD v0.6)
HSA Kernel Code (KFD v0.6)HSA Kernel Code (KFD v0.6)
HSA Kernel Code (KFD v0.6)
 
re:Invent 2019 BPF Performance Analysis at Netflix
re:Invent 2019 BPF Performance Analysis at Netflixre:Invent 2019 BPF Performance Analysis at Netflix
re:Invent 2019 BPF Performance Analysis at Netflix
 
ACRN Kata Container on ACRN
ACRN Kata Container on ACRNACRN Kata Container on ACRN
ACRN Kata Container on ACRN
 
[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020
 
docker.pptx
docker.pptxdocker.pptx
docker.pptx
 
Docker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme PetazzoniDocker storage drivers by Jérôme Petazzoni
Docker storage drivers by Jérôme Petazzoni
 
Secure container: Kata container and gVisor
Secure container: Kata container and gVisorSecure container: Kata container and gVisor
Secure container: Kata container and gVisor
 
Brief introduction to kselftest
Brief introduction to kselftestBrief introduction to kselftest
Brief introduction to kselftest
 

Similaire à Digital Forensics and Incident Response in The Cloud Part 3

Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slidesDocker, Inc.
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesSreenivas Makam
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context ConstraintsAlessandro Arrichiello
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned RightScale
 
Security Tips to run Docker in Production
Security Tips to run Docker in ProductionSecurity Tips to run Docker in Production
Security Tips to run Docker in ProductionGianluca Arbezzano
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessDocker-Hanoi
 
Cloud Run - the rise of serverless and containerization
Cloud Run - the rise of serverless and containerizationCloud Run - the rise of serverless and containerization
Cloud Run - the rise of serverless and containerizationMárton Kodok
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Patrick Chanezon
 
Drupalcamp es 2013 drupal with lxc docker and vagrant
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant Ricardo Amaro
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Ricardo Amaro
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDocker, Inc.
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPDana Luther
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For DevelopmentLaura Frank Tacho
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations CenterJimmy Mesta
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesQAware GmbH
 
CloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingCloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingShapeBlue
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsFederico Michele Facca
 

Similaire à Digital Forensics and Incident Response in The Cloud Part 3 (20)

Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting Techniques
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Security Tips to run Docker in Production
Security Tips to run Docker in ProductionSecurity Tips to run Docker in Production
Security Tips to run Docker in Production
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
Cloud Run - the rise of serverless and containerization
Cloud Run - the rise of serverless and containerizationCloud Run - the rise of serverless and containerization
Cloud Run - the rise of serverless and containerization
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
 
Drupalcamp es 2013 drupal with lxc docker and vagrant
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations Center
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
 
CloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingCloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and Troubleshooting
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 

Plus de Velocidex Enterprises

Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopVelocidex Enterprises
 
Digital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The CloudDigital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The CloudVelocidex Enterprises
 
Digital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The CloudDigital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The CloudVelocidex Enterprises
 

Plus de Velocidex Enterprises (6)

Velociraptor - SANS Summit 2019
Velociraptor - SANS Summit 2019Velociraptor - SANS Summit 2019
Velociraptor - SANS Summit 2019
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor Workshop
 
RSA APJ Velociraptor Lab
RSA APJ Velociraptor LabRSA APJ Velociraptor Lab
RSA APJ Velociraptor Lab
 
Nzitf Velociraptor Workshop
Nzitf Velociraptor WorkshopNzitf Velociraptor Workshop
Nzitf Velociraptor Workshop
 
Digital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The CloudDigital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The Cloud
 
Digital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The CloudDigital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The Cloud
 

Dernier

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Dernier (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Digital Forensics and Incident Response in The Cloud Part 3

  • 1. Digital Forensics and Incident Response in the Cloud Dr. Michael Cohen Velocidex Innovations. https://www.velocidex.com/
  • 2. Part 2: End point DFIR agents
  • 4. Containers are essentially lightweight virtual machines. Docker is a system for building and managing containers. What are containers?
  • 5. What containers are and why might you use them?
  • 6. So we deployed our containers and VMs - are we done?
  • 7. Endpoint monitoring solutions ✘ When we deploy VMs, what goes on inside the VMs is totally our responsibility! ✗ Google does not know what is running inside the VM! ✗ If our app stack is vulnerable we will get owned! ✗ Patching and good configuration is still important. ✘ VMs may be secure at day 1 but someone has to maintain them...
  • 8. Endpoint monitoring solutions ✘ Endpoint monitoring allows us to have visibility inside the VMs: ✗ Can get detailed information of exactly what is running inside each VM. ✗ We can respond to compromise quickly: ■ Quarantine and preserve evidence. ■ Analyze and triage ✗ We can hunt across the entire infrastructure ■ For indicators of compromise ■ For inventory purposes.
  • 9. Lots of endpoint monitoring tools
  • 10. Velocidex and Velociraptor ✘ At Velocidex we specialize in packaging and distributing tools for cloud deployments. ✘ Velociraptor is a very thin endpoint client which is compatible with GRR. ✗ We also package GRR for cloud deployment ✗ We include Facebook’s OSQuery In one convenient package!
  • 11. Let’s design our cloud deployment Cloud SQL DatabaseCloud SQL Proxy GRR Server Velociraptor ClientsVelociraptor ClientsVelociraptor Clients VM contains 2 containers Admin UI Usually SSL
  • 12. Differences between this Workshop and Reality ✘ We will use a static IP and HTTP ✘ In reality you should always use SSL for the admin UI - Let’s encrypt is easy! ✗ GRR implements its own encryption so client connections can happen over http. ✘ In practice you should use a DNS name for front end ✗ Makes it easier to move clients between servers. ✗ You can configure multiple endpoints for clients.
  • 13. Reserve a static IP address
  • 14. Create a Kubernetes cluster What is this Kubernetes you speak of? What is a cluster?
  • 15.
  • 16. Upload the docker container to your project’s registry.
  • 18. Enabling the cloud SQL API.
  • 19. Create a service account for SQL access
  • 20. SQL Connector service account ✘ The service account must have the Cloud SQL client so it can connect to the cloud SQL instance. ✘ We must also have the private key so the SQL proxy can log in as that service account
  • 21. Generate new keys and configuration for GRR 1. Clone the velociraptor repository to your cloud shell git clone https://gitlab.com/velocidex/velociraptor_server.git 2. Now install the needed python packages sudo apt-get install python-yaml python-cryptography 3. Run the configuration script to generate the server configuration python velociraptor/scripts/configure.py my_server_config.yaml my_client_config.yaml --mysql_location localhost:3306 Note that GRR will talk to the proxy on localhost.
  • 22. Make sure to edit your server configuration ✘ Frontend URL is the URL that clients will use to connect to the controller. ✗ Normally this will be a DNS name but we will use the static IP address now.
  • 23. Configure kubectrl to access our project
  • 24. Hide secrets in Kubernetes We generally do not want to store secrets in configuration files. Therefore we need to push the secret to the kubernetes server. 1. The service account credentials allow the SQL proxy to connect to cloud SQL service: kubectl create secret generic cloudsql-instance-credentials --from-file=credentials.json= Velocidex-205204-423e5d3047cf.json 2. The GRR config file contains keys to control the GRR/Velociraptor clients as well as the password for the GRR admin user: kubectl create secret generic grr-config --from-file=grr-config=my_server_config.yaml kubectl create secret generic grr-admin-password --from-literal=password=passw0rd
  • 25.
  • 26. Kubernetes secret management There are 2 main ways to pass secrets to the containers: 1. Via environment variables 2. Via a mounted filesystem. We will do both here.
  • 27. apiVersion: v1 kind: Pod metadata: name: velociraptor-server spec: containers: - image: asia.gcr.io/velocidex-205204/velociraptor name: grr env: - name: ADMIN_PASSWORD valueFrom: secretKeyRef: name: grr-admin-password key: password - name: GRR_CONFIG valueFrom: secretKeyRef: name: grr-config key: grr-config - name: cloudsql-proxy image: gcr.io/cloudsql-docker/gce-proxy:1.11 command: ["/cloud_sql_proxy", "-instances=valid-broker-180316:australia-southeast1:mysql=tcp:3306", "-credential_file=/secrets/cloudsql/credentials.json"] volumeMounts: - name: cloudsql-instance-credentials mountPath: /secrets/cloudsql readOnly: true volumes: - name: cloudsql-instance-credentials secret: secretName: cloudsql-instance-credentials GRR Container Cloud SQL Proxy Container
  • 28. Launch the pod The full deployment file is included in the files directory. Make a deployment from the pod file: kubectl create -f deployment.yaml Watch the pod coming up in the “Workload” section of the console.
  • 29. To be able to connect to the pod we need to expose it with a load balancer apiVersion: v1 kind: Service metadata: name: server labels: app: velociraptor spec: type: LoadBalancer loadBalancerIP: "35.189.2.35" ports: - port: 80 name: adminui targetPort: 8000 - port: 8080 name: control targetPort: 8080 selector: app: velociraptor
  • 30. Check our installation ✘ Ensure that we can connect to the frontend properly using the static IP address we reserved earlier
  • 31. Check our installation - Make sure we can log in.
  • 32. Investigating a typical cloud deployment ✘ For the next part of the workshop we will play around with our cloud deployment. ✘ Imagine we need to respond to a compromise in such a setup: ✗ What evidence do we look for? ✗ How do we preserve it? ✗ What could have happened?
  • 33. The Kubernetes cluster The cluster is just a bunch of VMs running docker Get a shell on a VM
  • 34. Lets forensically analyze one of the VMs. ✘ I said before that containers are like lightweight virtual machines …. I kind of lied ….
  • 35. VM vs Containers - what are the difference?
  • 36. VM vs Containers - what are the difference?
  • 37. Processes in Docker Docker containers are not really VMs. Containerized processes are just regular processes. More similar to chroot prison.
  • 38. Docker layered filesystem ✘ Docker uses a layered filesystem model. ✘ Each layer introduces changes (add/delete) to the previous layer. ✘ The files we see in the container are the union of all the files in each layer.
  • 39. Ramifications of layered filesystems Changing a file in the running container will add the file to the upper layer. Changing a file in a lower layer will make the change visible to all users.
  • 40. Docker cheat sheet # docker ps | less -S # docker inspect b5884a6b6e9c |less -S
  • 41. Docker Cheat Sheet # docker exec -i -t <container_id> /bin/bash
  • 42. Exercises Can you figure out what changes Velociraptor makes to the running container? Can you explain these changes? Is it possible for attackers to change lower level layers? What does this mean for forensic acquisition?
  • 43. What challenges would we have to respond to this instance?
  • 44. Responding to a cloud instance ✘ Typically we have no physical access - we have to do live acquisition. ✘ Typically we must do it from within the VM itself. Provider Physical Machine Cluster VM Containers
  • 45. More Challenges ✘ Typically container host has limited disk space so we need to stream the data off the instance as we image.
  • 46. Acquire an AFF4 image with linpmem ✘ Acquire memory and the content of /var/lib/docker/ ✘ Grab the docker directory /var/lib/docker/ ✘ Stream the image into a bucket. All the tools you need are in the files share.
  • 47. Create a cloud bucket to accept the evidence.
  • 48. We need to create a service account to authenticate 1. Service account is an automated way to authenticate 2. What are the risks for evidence collection SA? 3. How can we carefully manage the risks? a. Can limit access to only be allowed to write to evidence bucket - remember we will be using these credentials on potentially compromised hosts. b. We can either give access to the project or the specific bucket.
  • 49. Creating service account ✘ Furnish a new key - this will provide a JSON file with credentials. ✘ Note that these credentials ONLY have the ability to upload to the bucket. It is ok to use them on compromised hosts.
  • 50. Add our tools to the bucket ✘ I typically have: ✗ Linpmem https://github.com/Velocidex/c-aff4/releases ✗ Gcsuploader https://gitlab.com/velocidex/tools/tags/v0.1 You can find these here.
  • 51. ✘ Make sure to store it somewhere executable # /var/run/linpmem_3.0rc2.bin -o - -dd | /var/run/gcsupload -bucket evidence-auscert -name test2.aff4 -project auscert-205300 Reading from stdin... 2018-05-26 09:38:34 I Imaging memory 2018-05-26 09:38:34 I Creating output AFF4 ZipFile. 2018-05-26 09:38:34 I Will write in AFF4 map format. ……………
  • 52. Installing and running GRR/Velociraptor When we install GRR, the installation process creates new keys and then builds packages for the clients.
  • 53. Installing GRR/Velociraptor on clients. ✘ GRR clients come as debian packages or RPM ✘ They are typically quite large and contain many files (written in python and contain many DLLs). ✘ You won’t be able to install on unsupported OS’s - e.g. Kubernetes clusters are running Chrome OS.
  • 54. Velociraptor - an alternative GRR client ✘ Velociraptor is a new GRR client which is designed to be very lightweight: ✗ Shipped as a single static executable - in most cases there is no need to package it. ✗ Very fast ✗ Supports Velocidex Query Language (VQL) queries. ■ More on this later!
  • 55. Exercise ✘ In your groups, spin up a new Ubuntu machine and install the GRR client on it. ✘ Now try to run velociraptor on the ChromeOS machine. ✗ We will worry about installation later. In each case verify the installation worked by checking in the admin ui.
  • 56. Now we need to configure the velociraptor client ✘ Velociraptor is a stand alone, statically compiled binary. No dependencies, run anywhere.
  • 57. Fetch the velociraptor binary. $ wget https://www.velocidex.com/releases/velociraptor_0.1.0-1_amd64.elf --2018-05-26 22:48:08-- https://www.velocidex.com/releases/velociraptor_0.1.0-1_amd64.elf Resolving www.velocidex.com (www.velocidex.com)... 74.125.200.121, 2404:6800:4003:803::2013 Connecting to www.velocidex.com (www.velocidex.com)|74.125.200.121|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/octet-stream] Saving to: ‘velociraptor_0.1.0-1_amd64.elf’ velociraptor_0.1.0-1_amd64.elf 2018-05-26 22:48:13 (3.67 MB/s) - ‘velociraptor_0.1.0-1_amd64.elf’ saved [8090192] Upload the client config to the bucket. $ ./gcsupload -bucket evidence-auscert -project auscert-205300 -source my_client_config.yaml -name client.yaml Upload the binary to the bucket. $ ./gcsupload -bucket evidence-auscert -project auscert-205300 -source velociraptor_0.1.0-1_amd64.elf -name velociraptor Prepare the binaries for install
  • 58. Test the client locally. ✘ When the client starts for the first time: ✗ It generates a new unique ID and keys ✗ Write the keys to the writeback location. ✗ Communicates with the server (get 406) ✗ Enrols and the server will interrogate it.
  • 59. How can we install it on all the VMs in the project?
  • 60. What are the issues in using the previous reference?
  • 61. Very simple install script. #!/bin/bash BINARY_DIR=/var/lib/google/v mkdir -p $BINARY_DIR curl -o /etc/client.yaml https://storage.googleapis.com/evidence-auscert/client.yaml.1 curl -o $BINARY_DIR/v https://storage.googleapis.com/evidence-auscert/velociraptor_0.1.0-1_amd64.elf chmod +x $BINARY_DIR/v nohup $BINARY_DIR/v client /etc/client.yaml > /tmp/v.log & sleep 2 rm -f $BINARY_DIR/v exec 0>&- # close stdin exec 1>&- # close stdout exec 2>&- # close stderr exit 0 ✘ Make sure to install the script at the project level! ✗ Hint: gcloud compute project-info add-metadata
  • 62. Test and make sure the install works. ✘ Run different machine types: ✗ Chrome OS ✗ Ubuntu ✗ Redhat ✘ What issues do you encounter? ✗ Hint: GCS buckets set caching for public objects!
  • 63. THANKS! Any questions? You can find me at ✘ mike@velocidex.com ✘ scudette@gmail.com