Skip to content

Instantly share code, notes, and snippets.

@Al-Azif
Last active June 17, 2024 03:37
Show Gist options
  • Save Al-Azif/44e610be1b020b6414dd5d4c36cd6fa1 to your computer and use it in GitHub Desktop.
Save Al-Azif/44e610be1b020b6414dd5d4c36cd6fa1 to your computer and use it in GitHub Desktop.
Docker Exploit Redirect (PS4 & PS5)

Docker Exploit Redirect (PS4 & PS5)

  1. Install Docker Desktop
  2. Change the REDIRECT_IPV4 address to your computer's IP
  3. Change the ROOT_DOMAIN and ROOT_DOMAIN_PATH to where you want to redirect to (Change redirect type if necessary)
  4. With Docker running run docker compose up -d from cmd in the directory with this file
  • This will install and start the Docker images
  1. On your PS4/PS5 use your computer's IP for the primary DNS server. You can skip secondary or use the same IP again if you wish.
  2. Profit

Your Docker images will automatically be updated to match what is published to Docker Hub every 30 seconds thanks to Watchtower.

These will download automatically with the above composer file, but here are the links are here for reference:
DNS: GitHub Repo - Docker Hub
HTTP: GitHub Repo - Docker Hub

---
version: "3.8"
services:
dns:
image: alazif/exploit-host-dns
ports:
- 53:53/tcp
- 53:53/udp
environment:
REDIRECT_IPV4: 192.0.2.2 # Change me!
# REDIRECT_IPV6: # Set me if wanted and uncomment line
restart: unless-stopped
http:
image: alazif/exploit-host-http
ports:
- 80:80/tcp
- 443:443/tcp
environment:
REDIRECT_TYPE: https # http or https
ROOT_DOMAIN: github.com
ROOT_DOMAIN_PATH: /Al-Azif/
restart: unless-stopped
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --cleanup --interval 30
restart: unless-stopped
@danfozzy
Copy link

danfozzy commented Nov 3, 2023

Appreciate this, is there anyway you could publish to the docker site for those that run docker/packages from a NAS drive? Similar to what folk have done here is the past? https://hub.docker.com/search?q=al-azif

@Al-Azif
Copy link
Author

Al-Azif commented Nov 3, 2023

This there anyway you could publish to the docker site for those that run docker/packages from a NAS drive? Similar to what folk have done here is the past? https://hub.docker.com/search?q=al-azif

Where do you think it's pulling those packages from?

@danfozzy
Copy link

danfozzy commented Nov 3, 2023

No idea, complete novice and had no idea these would work as I thought they would be standalone. I'm assuming if I choose one of these docker hub images it will pull this? Can these required setting changes be used as environment variables? Can't access the files with a Synology using their docker package 😅

@gb160
Copy link

gb160 commented Nov 6, 2023

Thanks for this, very simple and useful...I have this running fine on a raspberry pi5, quick question:
What do I need to change/install if I want to host the exploits myself?

@jmr224
Copy link

jmr224 commented Nov 8, 2023

Thanks for this, very simple and useful...I have this running fine on a raspberry pi5, quick question: What do I need to change/install if I want to host the exploits myself?

I’m very familiar with docker stumbling point on the url ? What to put ? Have had it fired up but on the console no internet connection , have set dns to my own of course which must be the url address to change ? To what ?

@maxaubry
Copy link

maxaubry commented Nov 12, 2023

When I use docker-compose to start the services, NGINX refuse to start :

ps4dns-http-1 | [-] Starting NGINX...
ps4dns-http-1 | nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 32
ps4dns-http-1 exited with code 0

I don't know how to overwrite NGINX conf to increase server_names_hash_bucket_size. In fact I do but I would like to make it persistent.

Would it be possible to add an env variable in the docker-compose file or to increase this value by default?

@Al-Azif
Copy link
Author

Al-Azif commented Nov 12, 2023

When I use docker-compose to start the services, NGINX refuse to start :

ps4dns-http-1 | [-] Starting NGINX... ps4dns-http-1 | nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 32 ps4dns-http-1 exited with code 0

I don't know how to overwrite NGINX conf to increase server_names_hash_bucket_size. In fact I do but I would like to make it persistent.

Would it be possible to add an env variable in the docker-compose file or to increase this value by default?

Yeah, I'll add a variable to change it

@Al-Azif
Copy link
Author

Al-Azif commented Nov 12, 2023

Updated SEVER_HASH_BUCKET_SIZE_OVERRIDE: true in the environment will manually set the value to 64

@maxaubry
Copy link

Updated SEVER_HASH_BUCKET_SIZE_OVERRIDE: true in the environment will manually set the value to 64

works perfectly, thanks sir

@iamLazyCode
Copy link

i am trying to set this up on ubuntu server , and getting an error
please can someone help here
Screenshot_1

@Bumblecito
Copy link

I'm using this compose with macvlan network instead bridge because there are already running other containers on ports 53, 80 and 443. It works very well but when I open User's manual (PS4 and PS5) i've got this no connection error and it's unable to redirect to cthugha.exploit.menu/ or hijack_url, browser is working fine too. Am I doing something wrong? Thanks for both containers and all your work.

---
version: "3.8"
services:
  pegascape:
    image: bumblecito/pegascape:latest
    ports:
      - 80:80/tcp
      - 53:53/udp
      - 8100:8100/udp
    environment:
      IP_ADDR: 192.168.1.110
    tty: true
    restart: unless-stopped
    networks:
      lan:
       ipv4_address: 192.168.1.110
  dns:
    image: alazif/exploit-host-dns
    ports:
      - 53:53/tcp
      - 53:53/udp
    environment:
      REDIRECT_IPV4: 192.168.1.111 # Change me!
      # REDIRECT_IPV6:  # Set me if wanted and uncomment line
    restart: unless-stopped
    networks:
      lan:
       ipv4_address: 192.168.1.111
  http:
    image: alazif/exploit-host-http
    ports:
      - 80:80/tcp
      - 443:443/tcp
    environment:
      REDIRECT_TYPE: https # http or https
      # ROOT_DOMAIN: github.com
      # ROOT_DOMAIN_PATH: /Al-Azif/
      HIJACK_URL: www.google.com
    restart: unless-stopped
    networks:
      lan:
       ipv4_address: 192.168.1.112
  watchtower:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --cleanup --interval 60
    restart: unless-stopped
    networks:
      lan:
       ipv4_address: 192.168.1.113
networks:
  lan:
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: "192.168.1.0/24"
          gateway: "192.168.1.1"

@ThisIsSet-L
Copy link

Strong warning: if you are using this on your own system that already has other docker packages running remove the watchtower section from this file. It will try to update every other package on your system and if it cannot update them, will just shut them off.
Day ruined.
Everything else works just fine though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment