Skip to content

Commit 740baf0

Browse files
committed
Updates and some shuffling
1 parent 9e84af0 commit 740baf0

File tree

8 files changed

+152
-39
lines changed

8 files changed

+152
-39
lines changed

.github/workflows/on-demand.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ on:
66
- 'main'
77

88
jobs:
9+
static-analysis:
10+
name: Static Analysis
11+
runs-on: ubuntu-latest
12+
steps:
13+
-
14+
name: Checkout
15+
uses: actions/checkout@v4
16+
-
17+
name: Run ShellCheck
18+
uses: ludeeus/[email protected]
19+
-
20+
name: Run Hadolint
21+
uses: hadolint/[email protected]
22+
with:
23+
dockerfile: Dockerfile
924
docker:
1025
runs-on: ubuntu-latest
1126
steps:

.github/workflows/pull-request.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ on:
44
pull_request:
55

66
jobs:
7+
static-analysis:
8+
name: Static Analysis
9+
runs-on: ubuntu-latest
10+
steps:
11+
-
12+
name: Checkout
13+
uses: actions/checkout@v4
14+
-
15+
name: Run ShellCheck
16+
uses: ludeeus/[email protected]
17+
-
18+
name: Run Hadolint
19+
uses: hadolint/[email protected]
20+
with:
21+
dockerfile: Dockerfile
722
docker:
823
runs-on: ubuntu-latest
924
steps:

Dockerfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ RUN \
1515
openssl=3.1.4-r1 \
1616
shadow=4.13-r4 \
1717
tini=0.19.0-r1 && \
18-
# Remove default NGINX vHosts and website
18+
# Remove default NGINX vHosts and websites
1919
rm -f /etc/nginx/sites-enabled/default && \
2020
rm -f /etc/nginx/sites-available/default && \
2121
rm -rf /var/www/* && \
22+
mkdir -p /var/www && \
2223
# Setup templates directory
2324
mkdir -p /etc/nginx/templates/sites-available && \
2425
chmod 755 /etc/nginx/templates && \
@@ -55,26 +56,24 @@ COPY entrypoint.sh /entrypoint.sh
5556
# Copy HEALTHCHECK script to container
5657
COPY healthcheck.sh /healthcheck.sh
5758

58-
# Copy "static" files
59-
COPY ps-sys-updates /var/www/ps-sys-updates
59+
# Copy system update metadata files
60+
COPY ps-sys-updates /srv/ps-sys-updates
61+
62+
# Copy system update files (PUPs)
63+
COPY PUPs /srv/PUPs
6064

6165
# Set permissions on copied files
6266
RUN \
6367
mkdir -p \
6468
/var/www/cache \
6569
/var/www/exploits \
6670
/var/www/themes/default && \
67-
touch \
68-
/var/www/menu.json \
69-
/var/www/news.json \
70-
/var/www/themes/default/index.html && \
71+
echo "Exploit Landing Page" > /var/www/themes/default/index.html && \
7172
chmod -R 644 \
7273
/etc/nginx/templates/nginx.conf \
7374
/etc/nginx/templates/general.conf \
7475
/etc/nginx/templates/error.conf \
75-
/etc/nginx/templates/sites-available/* \
76-
/var/www/* && \
77-
rm -rf /var/www/ps-sys-updates/readme.txt && \
76+
/etc/nginx/templates/sites-available/* && \
7877
chmod +x \
7978
/entrypoint.sh \
8079
/healthcheck.sh

PUPs/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# PUP File Hosting
2+
3+
To actually serve update files (PUPs) themselves take a look at the format of the updatelist files contained in `ps-sys-updates`. Notice the hash provided in the URL?
4+
5+
## PS3
6+
7+
`/update/ps3/image/{{COUNTRY}}/0000_0000_$MD5/PS3PATCH.PUP` or
8+
`/update/ps3/image/{{COUNTRY}}/0000_0000_$MD5/PS3UPDAT.PUP`
9+
will be served from
10+
`PS3PATCH_$MD5.PUP` and `PS3UPDAT_$MD5.PUP` from within this folder
11+
12+
## Vita
13+
14+
`/update/psp2/image/0000_0000/(rel|sd|pre)_$MD5/PSP2UPDAT.PUP`
15+
will be served from
16+
`PSP2UPDAT_$md5.PUP` within this folder
17+
18+
## PS4
19+
20+
`/update/ps4/image/0000_0000/(sys|rec)_$MD5/PS4UPDATE.PUP`
21+
will be served from
22+
`PS4UPDATE_$MD5.PUP` within this folder
23+
24+
## PS5
25+
26+
`/update/ps5/official/00000000000000000000000000000000/image/\0000_00000/(sys|rec)_$SHA256/PS5UPDATE.PUP`
27+
will be served from
28+
`PS5UPDATE_$SHA256.PUP` within this folder

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Exploit Host HTTP
2+
3+
Purpose made HTTP Docker file setup for hosting exploits for the web browser for Sony PlayStation devices and the Nintendo WiiU/Switch. This essentially has to be used with the [Exploit Host DNS](https://github.com/Al-Azif/exploit-host-DNS) component. It's possible to use it "standalone", but will require something to make the browser send the correct `Host` header with it's HTTP(S) requests.
4+
5+
## Features
6+
7+
When used in conjunction with [Exploit Host DNS](https://github.com/Al-Azif/exploit-host-DNS) following features are available:
8+
9+
- Enables internet speed tests
10+
- Enables serving custom system updates
11+
- Hijacks system update feature pages
12+
- Hijacks default browser landing pages (Connection Tests, User's Manuals, and Browser Homepages)
13+
- Redirect is cached (It is not cached on PS5 as it becomes permanent)
14+
- Prepackaged with the latest Exploit Host website
15+
- Can redirect to an external page, to a self hosted site, or to the included Exploit Host website
16+
17+
## Usage
18+
19+
This is setup to work right out of the box with [Exploit Host DNS](https://github.com/Al-Azif/exploit-host-DNS). However there are lots of options for your individual hosting wants/needs. I'll only show the basic usage here.
20+
21+
### Command Line
22+
23+
This command will always pull the latest image from Docker Hub, run on the main Docker bridge network, and it will restart if it's not running until you explicitly tell it to stop.
24+
25+
`docker run -d --network bridge -p 80:80/tcp -p 443:443/tcp --restart unless-stopped --pull always alazif/exploit-host-http:latest`
26+
27+
### Composer
28+
29+
This composer file will do the same as the commands above.
30+
31+
```yml
32+
---
33+
version: "3.8"
34+
35+
services:
36+
exploit-host-http:
37+
image: alazif/exploit-host-http:latest
38+
network_mode: bridge
39+
ports:
40+
- 80:80/tcp
41+
- 443:443/udp
42+
pull_policy: always
43+
restart: unless-stopped
44+
```
45+
46+
Start the compose file by calling `docker compose up -d` from the same location as the composer file.
47+
48+
## Options (Environment Variables)
49+
50+
| Option | Default | Type | Info |
51+
|:--------------------------------|:--------------|:--------|:----------------|
52+
| DEBUG | `false` | boolean | Show debug output for `entrypoint.sh` in the Docker log. |
53+
| ROOT_DOMAIN | `the.gate` | string | |
54+
| NGINX_ACCESS_LOG | `false` | boolean | |
55+
| NGINX_ERROR_LOG | `false` | boolean | |
56+
| NGINX_ERROR_LOG_LEVEL | `warn` | string | |
57+
| REDIRECT_TYPE | `http` | string | |
58+
| HIJACK_URL | `ROOT_DOMAIN` | string | |
59+
| TLS | `self` | string | |
60+
| CF_IP_CORRECTION | `false` | boolean | |
61+
| CF_STRICT | `false` | boolean | |
62+
| OCSP_STAPLING | `false` | boolean | |
63+
| SEVER_HASH_BUCKET_SIZE_OVERRIDE | `false` | boolean | |
64+
| HEALTHCHECK_BYPASS | `false` | boolean | |
65+
66+
## TODO
67+
68+
TBD

entrypoint.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,5 +302,17 @@ if [ ! -f /var/www/ps-net-tests/get_2m ] || [ ! -f /var/www/ps-net-tests/get_6m
302302
truncate -s 6M /var/www/ps-net-tests/get_6m || true
303303
fi
304304

305+
# Move system update meta files if they don't exist in the correct location, fails silently
306+
mkdir -p /var/www/ps-sys-updates || true
307+
if [ -z "$(ls -A /var/www/ps-sys-updates)" ]; then
308+
cp -r /srv/ps-sys-updates /var/www || true
309+
fi
310+
311+
# Make PUP file directory if it doesn't exist, fails silently
312+
mkdir -p /var/www/PUPs || true
313+
if [ -z "$(ls -A /var/www/PUPs)" ]; then
314+
cp -r /srv/PUPs /var/www || true
315+
fi
316+
305317
echo "[-] Starting NGINX..."
306318
exec "$@"

nginx/vhosts/ps-sys-updates

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ server {
2121
ssl_certificate_key /etc/nginx/certs/private/snakeoil.key;
2222

2323
location ~* "^/update/ps3/image/\D{2}/\d{4}_\d{4}_(?<md5>[a-fA-F0-9]{32})/PS3PATCH\.PUP$" {
24-
alias /var/www/ps-sys-updates/PS3PATCH_$md5.PUP;
24+
alias /var/www/PUPs/PS3PATCH_$md5.PUP;
2525
}
2626
location ~* "^/update/ps3/image/\D{2}/\d{4}_\d{4}_(?<md5>[a-fA-F0-9]{32}S)/PS3UPDAT\.PUP$" {
27-
alias /var/www/ps-sys-updates/PS3UPDAT_$md5.PUP;
27+
alias /var/www/PUPs/PS3UPDAT_$md5.PUP;
2828
}
2929

3030
location ~* "^/update/ps4/image/\d{4}_\d{4}/(sys|rec)_(?<md5>[a-fA-F0-9]{32})/PS4UPDATE\.PUP$" {
31-
alias /var/www/ps-sys-updates/PS4UPDATE_$md5.PUP;
31+
alias /var/www/PUPs/PS4UPDATE_$md5.PUP;
3232
}
3333

3434
location ~* "^/update/ps5/official/(?<unknown>[a-zA-Z0-9]{32})/image/\d{4}_\d{4}/(sys|rec)_(?<sha256>[a-fA-F0-9]{64})/PS5UPDATE\.PUP$" {
35-
alias /var/www/ps-sys-updates/PS5UPDATE_$sha256.PUP;
35+
alias /var/www/PUPs/PS5UPDATE_$sha256.PUP;
3636
}
3737

3838
location ~* "^/update/psp2/image/\d{4}_\d{4}/(rel|sd|pre)_(?<md5>[a-fA-F0-9]{32})/PSP2UPDAT\.PUP$" {
39-
alias /var/www/ps-sys-updates/PSP2UPDAT_$md5.PUP;
39+
alias /var/www/PUPs/PSP2UPDAT_$md5.PUP;
4040
}
4141

4242
# The pages here are built in NGINX to avoid needing to install PHP as the pages are built with simple substitution

ps-sys-updates/readme.txt

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)