Clarify challenge 10 upload target and test with real scp - #128
Merged
Merged
Conversation
Learners who scp to ~/ instead of ~/ctf_challenges/ never trigger the flag, while the hint pointed them to create a file locally instead. - README and hint now say to upload a new file from your own computer into ~/ctf_challenges/ (overwrites don't count) - Monitor ignores editor temp files and debounces to one banner per upload - Test harness triggers challenge 10 with scp from the local machine instead of touching a file on the VM Fixes #127 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8bedb36e-e2a4-4e1d-be3b-922b69a777a9
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #127
Problem
In #127,
scpdidn't trigger the challenge 10 flag, while runningvion the VM did. I reproduced this on an Azure VM (Ubuntu 24.04, OpenSSH 9.6):scpto~/file(the command in the issue)scpto~/ctf_challenges/filescp -O(older protocol) toctf_challenges/scpoverwriting a file that already existsviin~/ctf_challengesscpitself works. The instructions didn't say that the file must be new and must go into~/ctf_challenges/. The hint also suggested just creating a file there, which skips the upload.Changes
verify hint 10: Tell learners to runscpfrom their own computer intouser@ip:~/ctf_challenges/, and that overwriting an existing file doesn't count.ch10_remote_upload.py): Ignore vim's temporary files (.*.sw?,*~,4913) and show at most one banner every 5 seconds.deploy_and_test.shnow triggers challenge 10 with a realscpfrom the local machine, andtest_ctf_challenges.shjust checks that the flag appeared. Before, the test created the file on the VM, so the upload path was never tested.Not changed
This PR still awards the flag for a file created on the VM itself. We weighed checking that the file really came from an upload (with
auditdor a process check) and decided the extra complexity wasn't worth it for this challenge.Testing
./.github/skills/ctf-testing/deploy_and_test.sh azure: PASS, 28 passed and 0 failed; resources destroyed afterwardswarninglevel: clean