SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
How to create your
own hack environment
By Sumedt Jitpukdebodin
# whoami
:~ # Sumedt Jitpukdebodin

:~ # Cyber Ops Consultant @ Horangi

:~ # Technical @ OWASP Thailand, Admin @ 2600Thailand

:~ # Google me :)
# why ~
:~ # Learn system administrator jobs

:~ # Learn offensive and defensive

• Do PoC from public exploit

• Analysis vulnerabilities and analysis

• Create your own challenges and make people fun with it :)

:~ # Do the lab for DevSecOps

:~ # Simulate the real world situation.

:~ # Do something weird :p
# How
• Create with your own machine (server)

• Create with cloud service

• Create with VM and container
# Differentiate
Price
(Start)
Pros Cons
Real Server 30000
- Powerful machine

- Can do everything you
want

- You own it
- Longterm solution

- Have to maintain by
yourself
Cloud Service 500~/month
- Short-term solution

- Easy to setup

- Real world environment

- Scalable

- Easy to custom
- Limit images

- High price for longterm

- Have some restriction
# why Docker
• Easy to setup and maintain

• Easy to find template

• Easy to modify

• Can run on multi-platform

• Strong community
# Install Docker on Ubuntu
16.04.2
:~ # sudo apt-get update

:~ # sudo apt-get install apt-transport-https ca-certificates
curl software-properties-common

:~ # sudo add-apt-repository  "deb [arch=amd64] https://
download.docker.com/linux/ubuntu  $(lsb_release -
cs)  stable”

:~ # sudo apt-get update

:~ # sudo apt-get install docker-ce docker-compose
Example Docker image for
IIS (Windows)
# escape=`
FROM microsoft/windowsservercore:1803
RUN powershell -Command `
Add-WindowsFeature Web-Server; `
Invoke-WebRequest -UseBasicParsing -Uri "https://
dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.3/ServiceMonitor.exe"
-OutFile "C:ServiceMonitor.exe"
EXPOSE 80
ENTRYPOINT ["C:ServiceMonitor.exe", "w3svc"]
Example Docker image for
Nginx (Linux)
FROM debian:jessie
MAINTAINER Diego Najar
# Variables
ENV NGINX_VERSION 1.10.1-1~jessie
ENV nginx_conf /etc/nginx/nginx.conf
ENV php_conf /etc/php5/fpm/php.ini
ENV fpm_conf /etc/php5/fpm/php-fpm.conf
ENV fpm_pool /etc/php5/fpm/pool.d/www.conf
# Packages installation
RUN echo "deb http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list && 
apt-get update && 
apt-get install --no-install-recommends --no-install-suggests -y --force-yes ca-
certificates nginx nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx-
module-perl nginx-module-njs gettext-base php5-fpm supervisor
RUN sed -i -e "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g" ${php_conf} && 
sed -i -e "s/listen = 127.0.0.1:9000/listen = /var/run/php-fpm.sock/g" ${fpm_pool}
EXPOSE 80 443
# Start Docker
:~ # docker build -t nginx-phpfpm docker-nginx-php-fpm

:~ # docker run -itd -p 80:80 nginx-phpfpm:latest

:~ # docker ps

:~ # docker exec <name> /etc/init.d/nginx restart
Example Docker Compose
for LEMP
version: ‘3'
networks:
LEMP:
services:
nginx:
image: nginx:stable-alpine
container_name: LEMP_nginx
ports:
- "8080:80"
volumes:
- ./code:/code
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
networks:
- LEMP
mariaDB:
image: mariadb:latest
container_name: LEMP_mariaDB
volumes:
- ./database:/var/lib/mysql:rw
ports:
- "3306:3306"
depends_on:
- nginx
environment:
- MYSQL_ROOT_PASSWORD=654321
networks:
- LEMP
php:
image: php:7-fpm-alpine
container_name: LEMP_php
volumes:
- ./code:/code
ports:
- "9000:9000"
networks:
- LEMP
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: LEMP_phpMyAdmin
ports:
- "8183:80"
environment:
PMA_ARBITRARY: 1
depends_on:
- mariaDB
networks:
- LEMP
# Vulnerable OWASP
Docker Images
• DVWA (https://github.com/infoslack/docker-dvwa)

• Juice Shop (https://hub.docker.com/r/bkimminich/juice-shop/)

• Vulnerable Wordpress by WPScan Team (https://hub.docker.com/r/
wpscanteam/vulnerablewordpress/)

• Mutillidae 2 (https://hub.docker.com/r/citizenstig/nowasp/)

• OWASP WebGoat (https://hub.docker.com/r/danmx/docker-owasp-
webgoat/)

• OWASP NodeGoat (https://github.com/owasp/
nodegoat#option-3---run-nodegoat-on-docker)
# Specific Vulnerabilities
• Apache Struts2 - CVE-2017-5638 (https://hub.docker.com/r/
piesecurity/apache-struts2-cve-2017-5638/)

• Shellshock - CVE-2014-6271 (https://github.com/Zenithar/docker-
shellshockable)

• Heartbleed - CVE-2014-0160 (https://hub.docker.com/r/hmlio/
vaas-cve-2014-0160/)

• Sambacry - CVE-2017-7494 (https://hub.docker.com/r/
vulnerables/cve-2017-7494/)

• DHClient RCE - CVE-2018-1111 (https://github.com/knqyf263/
CVE-2018-1111)
# Multi Vulnerable Docker
• https://hub.docker.com/u/vulnerables/
# Start Heartbleed Docker
:~ # docker pull hmlio/vaas-cve-2014-0160

:~ # docker run -d -p 8443:443 hmlio/vaas-cve-2014-0160

:~ # nmap -sV -p 8443 --script=ssl-heartbleed localhost

:~ # git clone https://github.com/mpgn/heartbleed-PoC

:~ # python2 heartbleed-exploit.py localhost 8443
# Start DHClient-RCE
Docker
:~ # git clone https://github.com/knqyf263/CVE-2018-1111

:~ # docker-compose up -d

• Attacker

:~ # docker-compose exec attacker bash

:~ # ./scripts/attack.sh

• Victim

:~ # docker-compose exec victim bash

:~ # ./scripts/victim.sh
Demo time
# Docker for Security
Officer
• Kali Linux (https://www.kali.org/news/official-kali-linux-
docker-images/)

• SIFT (https://github.com/kost/docker-sift)

• REMNux (https://hub.docker.com/r/remnux/)
How about real world
scenario?
AWS
• AWS EC2

• Active Directory

• IIS

• SQL Server

• WAF

• NGFW

• AWS S3

• Real sh*t scenario
Step of demo#2
• Pwn client with any method (in this demo, I used psexec
but actually can be any client side attack method)

• Dump password and enumerate information inside client

• Create Socket Server on Attacker and forward package to
client via session of Metasploit for pivoting network

• Pwn Windows AD on AWS with psexec by using
credential of domain user.
Demo time#2
Can we do anything else?
• Vulnhub

• HackTheBox

• PentesterLab

• Many Vulnerability VM/docker from many vendor.

• CTF

• etc.
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Provisioning & Deploying with Docker
Provisioning & Deploying with DockerProvisioning & Deploying with Docker
Provisioning & Deploying with DockerErica Windisch
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Michele Orselli
 
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...Develcz
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = CodeGeorg Sorst
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Michele Orselli
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with AnsibleAhmed AbouZaid
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationBen Hall
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with DockerYosh de Vos
 
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...Docker, Inc.
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructureSergiy Kukunin
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...Puppet
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packerfrastel
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Ontico
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and AgentRanjit Avasarala
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleRobert Reiz
 
Austin - Container Days - Docker 101
Austin - Container Days - Docker 101Austin - Container Days - Docker 101
Austin - Container Days - Docker 101Bill Maxwell
 
Ansible Oxford - Cows & Containers
Ansible Oxford - Cows & ContainersAnsible Oxford - Cows & Containers
Ansible Oxford - Cows & Containersjonatanblue
 

Was ist angesagt? (20)

Docker orchestration
Docker orchestrationDocker orchestration
Docker orchestration
 
Provisioning & Deploying with Docker
Provisioning & Deploying with DockerProvisioning & Deploying with Docker
Provisioning & Deploying with Docker
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))
 
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
DockerCoreNet
DockerCoreNetDockerCoreNet
DockerCoreNet
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansible
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with Docker
 
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
Docker as development environment
Docker as development environmentDocker as development environment
Docker as development environment
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 
Austin - Container Days - Docker 101
Austin - Container Days - Docker 101Austin - Container Days - Docker 101
Austin - Container Days - Docker 101
 
Ansible Oxford - Cows & Containers
Ansible Oxford - Cows & ContainersAnsible Oxford - Cows & Containers
Ansible Oxford - Cows & Containers
 

Ähnlich wie How to create your own hack environment

From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...Jérôme Petazzoni
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Ben Hall
 
ILM - Pipeline in the cloud
ILM - Pipeline in the cloudILM - Pipeline in the cloud
ILM - Pipeline in the cloudAaron Carey
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Ben Hall
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slidesDocker, Inc.
 
Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?Adam Hodowany
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안양재동 코드랩
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe Sencha
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - IndroducAl Gifari
 
Docker orchestration v4
Docker orchestration v4Docker orchestration v4
Docker orchestration v4Hojin Kim
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Ben Hall
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoHannes Hapke
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarmHsi-Kai Wang
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins Mando Stam
 

Ähnlich wie How to create your own hack environment (20)

From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
ILM - Pipeline in the cloud
ILM - Pipeline in the cloudILM - Pipeline in the cloud
ILM - Pipeline in the cloud
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Docker
DockerDocker
Docker
 
Docking with Docker
Docking with DockerDocking with Docker
Docking with Docker
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
Docker orchestration v4
Docker orchestration v4Docker orchestration v4
Docker orchestration v4
 
How to _docker
How to _dockerHow to _docker
How to _docker
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarm
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
 

Mehr von Sumedt Jitpukdebodin (14)

Phishing
PhishingPhishing
Phishing
 
Which side are you
Which side are youWhich side are you
Which side are you
 
Endpoint is not enough
Endpoint is not enoughEndpoint is not enough
Endpoint is not enough
 
Antivirus is hopeless
Antivirus is hopelessAntivirus is hopeless
Antivirus is hopeless
 
Purple team is awesome
Purple team is awesomePurple team is awesome
Purple team is awesome
 
R u hacked
R u hackedR u hacked
R u hacked
 
Web architecture mechanism and threats
Web architecture   mechanism and threatsWeb architecture   mechanism and threats
Web architecture mechanism and threats
 
Fundamental of malware analysis
Fundamental of malware analysisFundamental of malware analysis
Fundamental of malware analysis
 
Security awareness training
Security awareness trainingSecurity awareness training
Security awareness training
 
Hacking with paper
Hacking with paperHacking with paper
Hacking with paper
 
DDoS handlering
DDoS handleringDDoS handlering
DDoS handlering
 
Incident response before:after breach
Incident response before:after breachIncident response before:after breach
Incident response before:after breach
 
What should I do when my website got hack?
What should I do when my website got hack?What should I do when my website got hack?
What should I do when my website got hack?
 
Web Architecture - Mechanism and Threats
Web Architecture - Mechanism and ThreatsWeb Architecture - Mechanism and Threats
Web Architecture - Mechanism and Threats
 

Kürzlich hochgeladen

Call Girls In {{Connaught Place Delhi}}96679@38988 Indian Russian High Profil...
Call Girls In {{Connaught Place Delhi}}96679@38988 Indian Russian High Profil...Call Girls In {{Connaught Place Delhi}}96679@38988 Indian Russian High Profil...
Call Girls In {{Connaught Place Delhi}}96679@38988 Indian Russian High Profil...aakahthapa70
 
Call Girls in B-18 Islamabad || 🔝 03274100048
Call Girls in B-18 Islamabad || 🔝 03274100048Call Girls in B-18 Islamabad || 🔝 03274100048
Call Girls in B-18 Islamabad || 🔝 03274100048Ifra Zohaib
 
RAJKOT CALL GIRLS 92628/71154 RAJKOT CAL
RAJKOT CALL GIRLS 92628/71154 RAJKOT CALRAJKOT CALL GIRLS 92628/71154 RAJKOT CAL
RAJKOT CALL GIRLS 92628/71154 RAJKOT CALNiteshKumar82226
 
Call Now ☎9870417354|| Call Girls in Dwarka Escort Service Delhi N.C.R.
Call Now ☎9870417354|| Call Girls in Dwarka Escort Service Delhi N.C.R.Call Now ☎9870417354|| Call Girls in Dwarka Escort Service Delhi N.C.R.
Call Now ☎9870417354|| Call Girls in Dwarka Escort Service Delhi N.C.R.riyadelhic riyadelhic
 
9891550660 Call Girls In Noida Sector 62 Short 1500 Night 6000
9891550660 Call Girls In Noida Sector 62 Short 1500 Night 60009891550660 Call Girls In Noida Sector 62 Short 1500 Night 6000
9891550660 Call Girls In Noida Sector 62 Short 1500 Night 6000teencall080
 
Udupi Call girl service 6289102337 Udupi escort service
Udupi Call girl service 6289102337 Udupi escort serviceUdupi Call girl service 6289102337 Udupi escort service
Udupi Call girl service 6289102337 Udupi escort servicemaheshsingh64440
 
VAPI CALL GIRL 92628/71154 VAPI CALL GIR
VAPI CALL GIRL 92628/71154 VAPI CALL GIRVAPI CALL GIRL 92628/71154 VAPI CALL GIR
VAPI CALL GIRL 92628/71154 VAPI CALL GIRNiteshKumar82226
 
Lucknow ❣️ Call Girl 97487*63073 Call Girls in Lucknow Escort service book now
Lucknow ❣️  Call Girl 97487*63073 Call Girls in Lucknow Escort service book nowLucknow ❣️  Call Girl 97487*63073 Call Girls in Lucknow Escort service book now
Lucknow ❣️ Call Girl 97487*63073 Call Girls in Lucknow Escort service book nowapshanarani255
 
Radhika Call Girls In Jaipur 9358660226 Escorts service
Radhika Call Girls In Jaipur 9358660226 Escorts serviceRadhika Call Girls In Jaipur 9358660226 Escorts service
Radhika Call Girls In Jaipur 9358660226 Escorts servicerahul222jai
 
Call Girls In Noida Free Ad 24/7 Hours Online Call 9310659962 Shot 2000 Night...
Call Girls In Noida Free Ad 24/7 Hours Online Call 9310659962 Shot 2000 Night...Call Girls In Noida Free Ad 24/7 Hours Online Call 9310659962 Shot 2000 Night...
Call Girls In Noida Free Ad 24/7 Hours Online Call 9310659962 Shot 2000 Night...DelhiMahipalpur
 
9999266834 Call Girls In Noida Sector 37 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 37 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 37 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 37 (Delhi) Call Girl Servicenishacall1
 
Bhopal Call girl service 6289102337 bhopal escort service
Bhopal Call girl service 6289102337 bhopal escort serviceBhopal Call girl service 6289102337 bhopal escort service
Bhopal Call girl service 6289102337 bhopal escort servicemaheshsingh64440
 
Call Girls In Lahore || 03274100048 ||Lahore Call Girl Available 24/7
Call Girls In Lahore || 03274100048 ||Lahore Call Girl Available 24/7Call Girls In Lahore || 03274100048 ||Lahore Call Girl Available 24/7
Call Girls In Lahore || 03274100048 ||Lahore Call Girl Available 24/7Sana Rajpoot
 
Rajkot Call Girls Contact Number +919358341802 Call Girls In Rajkot
Rajkot Call Girls Contact Number +919358341802 Call Girls In RajkotRajkot Call Girls Contact Number +919358341802 Call Girls In Rajkot
Rajkot Call Girls Contact Number +919358341802 Call Girls In RajkotSivanyaPandeya
 
Best VIP Call Girl Noida Sector 48 Call Me: 8700611579
Best VIP Call Girl Noida Sector 48 Call Me: 8700611579Best VIP Call Girl Noida Sector 48 Call Me: 8700611579
Best VIP Call Girl Noida Sector 48 Call Me: 8700611579diyaspanoida
 
Call Now HIgh profile ☎9870417354|| Call Girls in Ghaziabad Escort Service De...
Call Now HIgh profile ☎9870417354|| Call Girls in Ghaziabad Escort Service De...Call Now HIgh profile ☎9870417354|| Call Girls in Ghaziabad Escort Service De...
Call Now HIgh profile ☎9870417354|| Call Girls in Ghaziabad Escort Service De...riyadelhic riyadelhic
 
Indore Call girl service 6289102337 indore escort service
Indore Call girl service 6289102337 indore escort serviceIndore Call girl service 6289102337 indore escort service
Indore Call girl service 6289102337 indore escort servicemaheshsingh64440
 
Girls For Night in Islamabad | 03274100048 🔞
Girls For Night in Islamabad | 03274100048 🔞Girls For Night in Islamabad | 03274100048 🔞
Girls For Night in Islamabad | 03274100048 🔞Ifra Zohaib
 

Kürzlich hochgeladen (20)

Call Girls In {{Connaught Place Delhi}}96679@38988 Indian Russian High Profil...
Call Girls In {{Connaught Place Delhi}}96679@38988 Indian Russian High Profil...Call Girls In {{Connaught Place Delhi}}96679@38988 Indian Russian High Profil...
Call Girls In {{Connaught Place Delhi}}96679@38988 Indian Russian High Profil...
 
Call Girls in B-18 Islamabad || 🔝 03274100048
Call Girls in B-18 Islamabad || 🔝 03274100048Call Girls in B-18 Islamabad || 🔝 03274100048
Call Girls in B-18 Islamabad || 🔝 03274100048
 
RAJKOT CALL GIRLS 92628/71154 RAJKOT CAL
RAJKOT CALL GIRLS 92628/71154 RAJKOT CALRAJKOT CALL GIRLS 92628/71154 RAJKOT CAL
RAJKOT CALL GIRLS 92628/71154 RAJKOT CAL
 
Call Now ☎9870417354|| Call Girls in Dwarka Escort Service Delhi N.C.R.
Call Now ☎9870417354|| Call Girls in Dwarka Escort Service Delhi N.C.R.Call Now ☎9870417354|| Call Girls in Dwarka Escort Service Delhi N.C.R.
Call Now ☎9870417354|| Call Girls in Dwarka Escort Service Delhi N.C.R.
 
9891550660 Call Girls In Noida Sector 62 Short 1500 Night 6000
9891550660 Call Girls In Noida Sector 62 Short 1500 Night 60009891550660 Call Girls In Noida Sector 62 Short 1500 Night 6000
9891550660 Call Girls In Noida Sector 62 Short 1500 Night 6000
 
Udupi Call girl service 6289102337 Udupi escort service
Udupi Call girl service 6289102337 Udupi escort serviceUdupi Call girl service 6289102337 Udupi escort service
Udupi Call girl service 6289102337 Udupi escort service
 
VAPI CALL GIRL 92628/71154 VAPI CALL GIR
VAPI CALL GIRL 92628/71154 VAPI CALL GIRVAPI CALL GIRL 92628/71154 VAPI CALL GIR
VAPI CALL GIRL 92628/71154 VAPI CALL GIR
 
Lucknow ❣️ Call Girl 97487*63073 Call Girls in Lucknow Escort service book now
Lucknow ❣️  Call Girl 97487*63073 Call Girls in Lucknow Escort service book nowLucknow ❣️  Call Girl 97487*63073 Call Girls in Lucknow Escort service book now
Lucknow ❣️ Call Girl 97487*63073 Call Girls in Lucknow Escort service book now
 
Radhika Call Girls In Jaipur 9358660226 Escorts service
Radhika Call Girls In Jaipur 9358660226 Escorts serviceRadhika Call Girls In Jaipur 9358660226 Escorts service
Radhika Call Girls In Jaipur 9358660226 Escorts service
 
➥🔝9953056974 🔝▻ Anand Vihar Call-girl in Women Seeking Men 🔝Delhi🔝 NCR
➥🔝9953056974 🔝▻ Anand Vihar Call-girl in Women Seeking Men 🔝Delhi🔝 NCR➥🔝9953056974 🔝▻ Anand Vihar Call-girl in Women Seeking Men 🔝Delhi🔝 NCR
➥🔝9953056974 🔝▻ Anand Vihar Call-girl in Women Seeking Men 🔝Delhi🔝 NCR
 
9953056974 Call Girls In Ashok Nagar, Escorts (Delhi) NCR.
9953056974 Call Girls In Ashok Nagar, Escorts (Delhi) NCR.9953056974 Call Girls In Ashok Nagar, Escorts (Delhi) NCR.
9953056974 Call Girls In Ashok Nagar, Escorts (Delhi) NCR.
 
Call Girls In Noida Free Ad 24/7 Hours Online Call 9310659962 Shot 2000 Night...
Call Girls In Noida Free Ad 24/7 Hours Online Call 9310659962 Shot 2000 Night...Call Girls In Noida Free Ad 24/7 Hours Online Call 9310659962 Shot 2000 Night...
Call Girls In Noida Free Ad 24/7 Hours Online Call 9310659962 Shot 2000 Night...
 
9999266834 Call Girls In Noida Sector 37 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 37 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 37 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 37 (Delhi) Call Girl Service
 
Bhopal Call girl service 6289102337 bhopal escort service
Bhopal Call girl service 6289102337 bhopal escort serviceBhopal Call girl service 6289102337 bhopal escort service
Bhopal Call girl service 6289102337 bhopal escort service
 
Call Girls In Lahore || 03274100048 ||Lahore Call Girl Available 24/7
Call Girls In Lahore || 03274100048 ||Lahore Call Girl Available 24/7Call Girls In Lahore || 03274100048 ||Lahore Call Girl Available 24/7
Call Girls In Lahore || 03274100048 ||Lahore Call Girl Available 24/7
 
Rajkot Call Girls Contact Number +919358341802 Call Girls In Rajkot
Rajkot Call Girls Contact Number +919358341802 Call Girls In RajkotRajkot Call Girls Contact Number +919358341802 Call Girls In Rajkot
Rajkot Call Girls Contact Number +919358341802 Call Girls In Rajkot
 
Best VIP Call Girl Noida Sector 48 Call Me: 8700611579
Best VIP Call Girl Noida Sector 48 Call Me: 8700611579Best VIP Call Girl Noida Sector 48 Call Me: 8700611579
Best VIP Call Girl Noida Sector 48 Call Me: 8700611579
 
Call Now HIgh profile ☎9870417354|| Call Girls in Ghaziabad Escort Service De...
Call Now HIgh profile ☎9870417354|| Call Girls in Ghaziabad Escort Service De...Call Now HIgh profile ☎9870417354|| Call Girls in Ghaziabad Escort Service De...
Call Now HIgh profile ☎9870417354|| Call Girls in Ghaziabad Escort Service De...
 
Indore Call girl service 6289102337 indore escort service
Indore Call girl service 6289102337 indore escort serviceIndore Call girl service 6289102337 indore escort service
Indore Call girl service 6289102337 indore escort service
 
Girls For Night in Islamabad | 03274100048 🔞
Girls For Night in Islamabad | 03274100048 🔞Girls For Night in Islamabad | 03274100048 🔞
Girls For Night in Islamabad | 03274100048 🔞
 

How to create your own hack environment

  • 1. How to create your own hack environment By Sumedt Jitpukdebodin
  • 2. # whoami :~ # Sumedt Jitpukdebodin :~ # Cyber Ops Consultant @ Horangi :~ # Technical @ OWASP Thailand, Admin @ 2600Thailand :~ # Google me :)
  • 3. # why ~ :~ # Learn system administrator jobs :~ # Learn offensive and defensive • Do PoC from public exploit • Analysis vulnerabilities and analysis • Create your own challenges and make people fun with it :) :~ # Do the lab for DevSecOps :~ # Simulate the real world situation. :~ # Do something weird :p
  • 4. # How • Create with your own machine (server) • Create with cloud service • Create with VM and container
  • 5. # Differentiate Price (Start) Pros Cons Real Server 30000 - Powerful machine - Can do everything you want - You own it - Longterm solution - Have to maintain by yourself Cloud Service 500~/month - Short-term solution - Easy to setup - Real world environment - Scalable - Easy to custom - Limit images - High price for longterm - Have some restriction
  • 6. # why Docker • Easy to setup and maintain • Easy to find template • Easy to modify • Can run on multi-platform • Strong community
  • 7. # Install Docker on Ubuntu 16.04.2 :~ # sudo apt-get update :~ # sudo apt-get install apt-transport-https ca-certificates curl software-properties-common :~ # sudo add-apt-repository "deb [arch=amd64] https:// download.docker.com/linux/ubuntu $(lsb_release - cs) stable” :~ # sudo apt-get update :~ # sudo apt-get install docker-ce docker-compose
  • 8. Example Docker image for IIS (Windows) # escape=` FROM microsoft/windowsservercore:1803 RUN powershell -Command ` Add-WindowsFeature Web-Server; ` Invoke-WebRequest -UseBasicParsing -Uri "https:// dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.3/ServiceMonitor.exe" -OutFile "C:ServiceMonitor.exe" EXPOSE 80 ENTRYPOINT ["C:ServiceMonitor.exe", "w3svc"]
  • 9. Example Docker image for Nginx (Linux) FROM debian:jessie MAINTAINER Diego Najar # Variables ENV NGINX_VERSION 1.10.1-1~jessie ENV nginx_conf /etc/nginx/nginx.conf ENV php_conf /etc/php5/fpm/php.ini ENV fpm_conf /etc/php5/fpm/php-fpm.conf ENV fpm_pool /etc/php5/fpm/pool.d/www.conf # Packages installation RUN echo "deb http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends --no-install-suggests -y --force-yes ca- certificates nginx nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx- module-perl nginx-module-njs gettext-base php5-fpm supervisor RUN sed -i -e "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g" ${php_conf} && sed -i -e "s/listen = 127.0.0.1:9000/listen = /var/run/php-fpm.sock/g" ${fpm_pool} EXPOSE 80 443
  • 10. # Start Docker :~ # docker build -t nginx-phpfpm docker-nginx-php-fpm :~ # docker run -itd -p 80:80 nginx-phpfpm:latest :~ # docker ps :~ # docker exec <name> /etc/init.d/nginx restart
  • 11. Example Docker Compose for LEMP version: ‘3' networks: LEMP: services: nginx: image: nginx:stable-alpine container_name: LEMP_nginx ports: - "8080:80" volumes: - ./code:/code - ./nginx/default.conf:/etc/nginx/conf.d/default.conf depends_on: - php networks: - LEMP mariaDB: image: mariadb:latest container_name: LEMP_mariaDB volumes: - ./database:/var/lib/mysql:rw ports: - "3306:3306" depends_on: - nginx environment: - MYSQL_ROOT_PASSWORD=654321 networks: - LEMP php: image: php:7-fpm-alpine container_name: LEMP_php volumes: - ./code:/code ports: - "9000:9000" networks: - LEMP phpmyadmin: image: phpmyadmin/phpmyadmin container_name: LEMP_phpMyAdmin ports: - "8183:80" environment: PMA_ARBITRARY: 1 depends_on: - mariaDB networks: - LEMP
  • 12. # Vulnerable OWASP Docker Images • DVWA (https://github.com/infoslack/docker-dvwa) • Juice Shop (https://hub.docker.com/r/bkimminich/juice-shop/) • Vulnerable Wordpress by WPScan Team (https://hub.docker.com/r/ wpscanteam/vulnerablewordpress/) • Mutillidae 2 (https://hub.docker.com/r/citizenstig/nowasp/) • OWASP WebGoat (https://hub.docker.com/r/danmx/docker-owasp- webgoat/) • OWASP NodeGoat (https://github.com/owasp/ nodegoat#option-3---run-nodegoat-on-docker)
  • 13. # Specific Vulnerabilities • Apache Struts2 - CVE-2017-5638 (https://hub.docker.com/r/ piesecurity/apache-struts2-cve-2017-5638/) • Shellshock - CVE-2014-6271 (https://github.com/Zenithar/docker- shellshockable) • Heartbleed - CVE-2014-0160 (https://hub.docker.com/r/hmlio/ vaas-cve-2014-0160/) • Sambacry - CVE-2017-7494 (https://hub.docker.com/r/ vulnerables/cve-2017-7494/) • DHClient RCE - CVE-2018-1111 (https://github.com/knqyf263/ CVE-2018-1111)
  • 14. # Multi Vulnerable Docker • https://hub.docker.com/u/vulnerables/
  • 15. # Start Heartbleed Docker :~ # docker pull hmlio/vaas-cve-2014-0160 :~ # docker run -d -p 8443:443 hmlio/vaas-cve-2014-0160 :~ # nmap -sV -p 8443 --script=ssl-heartbleed localhost :~ # git clone https://github.com/mpgn/heartbleed-PoC :~ # python2 heartbleed-exploit.py localhost 8443
  • 16. # Start DHClient-RCE Docker :~ # git clone https://github.com/knqyf263/CVE-2018-1111 :~ # docker-compose up -d • Attacker :~ # docker-compose exec attacker bash :~ # ./scripts/attack.sh • Victim :~ # docker-compose exec victim bash :~ # ./scripts/victim.sh
  • 18. # Docker for Security Officer • Kali Linux (https://www.kali.org/news/official-kali-linux- docker-images/) • SIFT (https://github.com/kost/docker-sift) • REMNux (https://hub.docker.com/r/remnux/)
  • 19. How about real world scenario?
  • 20. AWS • AWS EC2 • Active Directory • IIS • SQL Server • WAF • NGFW • AWS S3 • Real sh*t scenario
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. Step of demo#2 • Pwn client with any method (in this demo, I used psexec but actually can be any client side attack method) • Dump password and enumerate information inside client • Create Socket Server on Attacker and forward package to client via session of Metasploit for pivoting network • Pwn Windows AD on AWS with psexec by using credential of domain user.
  • 26.
  • 28. Can we do anything else? • Vulnhub • HackTheBox • PentesterLab • Many Vulnerability VM/docker from many vendor. • CTF • etc.