Skip to content

Instantly share code, notes, and snippets.

@Al-Azif
Last active March 15, 2024 07:35
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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

@PitchAbyss
Copy link

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

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