-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathchallenge.yaml
102 lines (96 loc) · 3.2 KB
/
challenge.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: floordrop
author: hpmv, orion
description: |
Ever heard of airdrops? Well, we're doing a *floor*drop. We're dropping the flag on the floor. Go pick it up.
This challenge happens on DiceChain, an Ethereum-compatible network started using go-ethereum with the genesis.json provided to you.
You may start a challenge attempt at any time by connecting to the provided nc.
During each challenge attempt,
* The server will generate a challenge for you to solve and send a transaction that calls `setChallenge(the challenge)` on the ProofOfWork contract.
* Two seconds later, the server will send another transaction that calls `expireChallenge()` on the same contract.
* Your goal is to solve the challenge and submit the solution by calling `solveChallenge(the solution encoded in bigendian bytes, random nonce)`, before the challenge expires. A script to solve the challenge has been provided to you in `solve.py`.
* If you submit the correct solution before the challenge expires, a flag will be printed in the same nc session.
You're encouraged to use the mock challenge (menu option 1) to familiarize yourself with the challenge setup.
Also, to help with your understanding, an example series of transactions that would yield a successful solve can be found in block [154](https://floordrop.hpmv.dev/block/154).
Links:
* Block explorer: [https://floordrop.hpmv.dev/](https://floordrop.hpmv.dev/)
* RPC: https://floordrop-rpc.hpmv.dev/
* Faucet: {{ link }} (use to get some free DICE!).
* `{{ nc }}`
provide:
- handouts/floordrop.zip
flag: dice{fr0ntrunn1ng_1s_n0t_ju5t_f0r_s4ndw1ch1ng_f8d9f834}
containers:
mongo:
build:
context: .
dockerfile: docker/Dockerfile-mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 579wFjds0AQ8374z4TRyjQr
ports:
- 27017
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 200m
memory: 200Mi
daemon:
build:
context: .
dockerfile: docker/Dockerfile-daemon
environment:
MONGODB_URI: mongodb://root:579wFjds0AQ8374z4TRyjQr@mongo:27017
DESIRED_ACCOUNTS: "1000"
FAUCET_KEY: '0x14ec0a7bb2781d36b3dc73a101fd9fd1f5a6d0f3a58bc7dda74e54032d23a35a'
ports:
- 32124 # not used
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
chal:
build:
context: .
dockerfile: docker/Dockerfile-chal
securityContext:
privileged: true
environment:
JAIL_ENV_MONGODB_URI: mongodb://root:579wFjds0AQ8374z4TRyjQr@mongo:27017
ports:
- 5000
resources:
limits:
cpu: 16000m
memory: 4Gi
requests:
cpu: 200m
memory: 500Mi
ui:
build:
context: .
dockerfile: docker/Dockerfile-ui
environment:
MONGODB_URI: mongodb://root:579wFjds0AQ8374z4TRyjQr@mongo:27017
ports:
- 8501
resources:
limits:
cpu: 1000m
memory: 500Mi
requests:
cpu: 200m
memory: 200Mi
expose:
chal:
- target: 5000
tcp: 32123
healthContent: "Welcome to Floordrop"
ui:
- target: 8501
http: floordrop-faucet
sortWeight: 10