-
Notifications
You must be signed in to change notification settings - Fork 9
Chall type separation #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
205d9fc
fix: update errors as per convention
v1bh475u 4090bdc
feat: add field for service config file name
v1bh475u c576137
mod: remove DOCKER CHALLENGE TYPE
v1bh475u e5976fa
feat: make servicefile and dockerfile optional fields
v1bh475u 70732dc
mod: update mod and sum files
v1bh475u 345f9af
refactor
v1bh475u a44ff20
mod: rename service_config to xinetd_conf
v1bh475u 514a6ba
refactor
v1bh475u 97df88a
feat: add XinetdConf field to BeastBareDockerfile and update entrypoi…
v1bh475u 458f106
fix(stageChallenge): correct condition for Dockerfile deletion
v1bh475u 7be6af4
update(static-chall): add static_dir to challenge_env
v1bh475u 805db68
add(xinetd-service): sample chal with user xinetd.conf
v1bh475u afb19df
add(service): sample chal without author provided xinetd.conf
v1bh475u 51fb2a5
update(dependencies): upgrade gorm and sqlite driver versions
v1bh475u 978daa4
fix(challenge-config): loosen up constraints on config file
v1bh475u 027cdd1
update: examples
v1bh475u e82d4c3
update(README): add descriptions of new challenges
v1bh475u a22fac1
mod: update dependencies and fix bugs
v1bh475u cc1f428
refactor: rename example challenge name for better understanding
v1bh475u 7e15644
fix: correct link for bare docker challenge in README
v1bh475u 22f1cc5
fix: correct typo in error log message for remote container search
v1bh475u cc4bf9b
fix: append challenge names to list in HandleAll function
v1bh475u 508e4ed
Merge branch 'bl4ze/dev' into chall-type-separation
sukhman-sukh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| [author] | ||
| name = "fristonio" | ||
| email = "[email protected]" | ||
| ssh_key = "ssh-rsa AAAAB3NzaC1y" | ||
|
|
||
| [challenge.metadata] | ||
| name = "service" | ||
| flag = "CTF{sample_flag}" | ||
| type = "service" | ||
| points = 100 | ||
| max_attempt_limit=10 | ||
|
|
||
| [[challenge.metadata.hints]] | ||
| text = "simple_hint_1" | ||
| points = 10 | ||
|
|
||
| [[challenge.metadata.hints]] | ||
| text = "simple_hint_2" | ||
| points = 20 | ||
|
|
||
|
|
||
| [challenge.env] | ||
| apt_deps = ["gcc", "socat"] | ||
| setup_scripts = ["setup.sh"] | ||
| service_path = "pwn" | ||
| ports = [10004] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #include <stdio.h> | ||
| #include <unistd.h> | ||
|
|
||
| int sample() | ||
| { FILE *ptr_file; | ||
| char buf[100]; | ||
|
|
||
| ptr_file = fopen("flag.txt","r"); | ||
| if (!ptr_file) | ||
| return 1; | ||
|
|
||
| while (fgets(buf,100, ptr_file)!=NULL) | ||
| fprintf(stderr, "%s",buf); | ||
| fclose(ptr_file); | ||
| return 0; | ||
| } | ||
|
|
||
| void test() | ||
| { char input[50]; | ||
| printf("Please enter your name: "); | ||
| gets(input); | ||
| sleep(1); | ||
| fprintf(stderr, "ECHO: %s\n",input); | ||
| } | ||
|
|
||
| int main() | ||
| { test(); | ||
| return 0; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| set -e | ||
|
|
||
| gcc -o pwn pwn_me.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,3 +20,6 @@ points = 20 | |
| maxPoints = 100 | ||
| minPoints = 50 | ||
| tags = ["easy", "web"] | ||
|
|
||
| [challenge.env] | ||
| static_dir = "static" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| [author] | ||
| name = "fristonio" | ||
| email = "contact+fristonio@sdslabs.co.in" | ||
| name = "contact" | ||
| email = "[email protected]" | ||
| ssh_key = "ssh-rsa AAAAB3NzaC1y" | ||
|
|
||
| [challenge.metadata] | ||
| name = "xinetd-service" | ||
| flag = "CTF{sample_flag}" | ||
| flag = "CTF{not_the_flag}" | ||
| type = "service" | ||
| points = 100 | ||
| points = 500 | ||
| max_attempt_limit=10 | ||
|
|
||
| [[challenge.metadata.hints]] | ||
|
|
@@ -25,5 +25,6 @@ preReqs = ["simple", "web-php"] | |
| [challenge.env] | ||
| apt_deps = ["gcc", "socat"] | ||
| setup_scripts = ["setup.sh"] | ||
| xinetd_config = "ctf.xinetd" | ||
| service_path = "pwn" | ||
| ports = [10003] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| service xinetd-service | ||
| { | ||
| disable = no | ||
| socket_type = stream | ||
| protocol = tcp | ||
| wait = no | ||
| user = beast | ||
| type = UNLISTED | ||
| port = 10003 | ||
| bind = 0.0.0.0 | ||
| server = /bin/sh | ||
| server_args = -c cd${IFS}/challenge;exec${IFS}/challenge/pwn | ||
| banner_fail = /etc/banner_fail | ||
| # Options below are for safety mainly | ||
| #per_source = 10 # max instances per source at once | ||
| rlimit_cpu = 5 # max cpu seconds | ||
| #rlimit_as = 1024M # addr space resource limit | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| CTF{not_the_flag} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.