1
- # Custom SSH Problem Creation Walkthrough
1
+ # General SSH Problem Creation Walkthrough
2
2
3
3
## Pre-requisites
4
4
@@ -19,7 +19,7 @@ the filesystem that together compose the flag.
19
19
The new thing about this challenge is that it uses multiple build stages in the
20
20
Dockerfile to make use of multiple containers instead of just one.
21
21
22
- In Custom SSH, we spin up an Ubuntu container called "builder" and use it to
22
+ In General SSH, we spin up an Ubuntu container called "builder" and use it to
23
23
make the flag and store it in separate files and in ` /challenge/metadata.json ` .
24
24
We spin up another container which we call "sshHost". This is the container
25
25
that becomes the main focal point of the challenge. We copy the separate parts
@@ -37,23 +37,23 @@ be separate containers, not just secure permissions.
37
37
### File Listing
38
38
39
39
1 . Besides problem details, the most important change in
40
- [ problem.md] ( /example-problems/custom -ssh/problem.md ) is changing Type to
40
+ [ problem.md] ( /example-problems/general -ssh/problem.md ) is changing Type to
41
41
"custom".
42
42
43
43
2 . instructions-to-Xof3.txt's contain verbal instructions on how to find the
44
44
next part of the flag. The Dockerfile copies these into the "sshHost"
45
45
container.
46
46
47
- 3 . [ profile] ( /example-problems/custom -ssh/profile ) is a bash profile that
47
+ 3 . [ profile] ( /example-problems/general -ssh/profile ) is a bash profile that
48
48
places the newly logged in user into a different folder than their home
49
49
directory. This is done so that returning home from the root directory
50
50
yields the last part of the flag instead of the first.
51
51
52
- 4 . [ start.sh] ( /example-problems/custom -ssh/start.sh ) starts a listener that
52
+ 4 . [ start.sh] ( /example-problems/general -ssh/start.sh ) starts a listener that
53
53
receives ssh connections. This script is ran as the last step in the
54
54
Dockerfile.
55
55
56
- 5 . [ Dockerfile] ( /example-problems/custom -ssh/Dockerfile ) , the first line is
56
+ 5 . [ Dockerfile] ( /example-problems/general -ssh/Dockerfile ) , the first line is
57
57
different for this file. It's the "LAUNCH" directive which tells cmgr which
58
58
containers should be actively running for the challenge. For our challenge,
59
59
we don't need "builder" running, but we do need "sshHost" running. The next
@@ -69,15 +69,15 @@ be separate containers, not just secure permissions.
69
69
of the flag parts in the Dockerfile since it can access them easily with
70
70
` COPY --from=builder ... ` .
71
71
72
- 6 . [ config-builder.py] ( /example-problems/custom -ssh/config-builder.py ) , this
72
+ 6 . [ config-builder.py] ( /example-problems/general -ssh/config-builder.py ) , this
73
73
script generates the password from the seed and puts it in the file for the
74
74
"sshHost" to use. Then it generates the flag and splits it into 3 parts and
75
75
writes a file for each, also for the "sshHost" container. Finally, it writes
76
76
the whole flag into ` /challenge/metadata.json ` , as needed by cmgr. It also
77
77
puts the "password" into this file, so that the problem description can give
78
78
the password to the competitor.
79
79
80
- 7 . [ config-sshhost.py] ( /example-problems/custom -ssh/config-sshhost.py ) , this
80
+ 7 . [ config-sshhost.py] ( /example-problems/general -ssh/config-sshhost.py ) , this
81
81
script creates the "ctf-player" user and the needed directories and also
82
82
changes the password of the account to be that which was generated by the
83
83
"builder" container.
0 commit comments