To deal with many kind of challenge dependencies, papaWhaled supports variety of deployment options.
Contents
Papawhaled is basically deploying challenge with docker. However some challenges don't need any server resources, or sometimes they can't be deployed with docker. If chall_type is set as docker
then challenge would be deployed with docker, else if chall_type is set as non-docker
, it would not be.
Options
- docker: Challenge would be deployed with docker.
- non-docker: Challenge would not be deployed with docker. (TBI)
Now only two architectures are supported.
Options
- x86: intel x86
- x64: intel x86_64
Now only two OS are supported.
Options
- ub1804: Ubuntu 18.04
- ub1604: Ubuntu 16.04
Challenge name. If it is already used, upload would be failed.
Challenge would be run on this port.
Options
- auto: papaWhaled will automatically select port that is not used.
- [31000-32000]: If port is aleready in used, error occurs.
Solver would get this flag.
FIles to be distributed to challenger. Values are passed as list, and each element must not be file name, but key of props.json.
ex)
{
...
"dist":["bin","libs"],
...
}
If challenge has dependency on some library, you must include them with file
, and specify their name. Values must be passed as list.
ex)
{
...
"libs":["libc-2.27.so", "libcrypto.so"]
...
}
Name of test file. It must be included in file
. It would be executed to test whether deployment is successfully done or not.
bin
would be deployed.
If challenge cannot run with default generated Dockerfile, use this option.
Passed value would be appended at HERE:
FROM nsjail:[os]
RUN useradd -m -d /home/user -s /bin/bash -u 1000 user
RUN apt-get update
########HERE#########
COPY [bin] /home/[user]/[name]
COPY flag /home/[user]/flag
CMD su user -c 'nsjail -Ml --port 31000 --chroot / --user 1000 --group 1000 /home/user/zerotask'
EXPOSE 3100}
ex)
{
...
"dock_opts":["COPY libcrypto.so.1.0.0 /usr/lib/"],
...
}
Passed value would be appended at HERE:
docker build . -t [name] #HERE#
Passed value would be appended at HERE:
docker run --privileged -p [port]:31000 -dit --name [prefix]_[name] [name] #HERE#