Skip to content
This repository has been archived by the owner on May 1, 2022. It is now read-only.

write defensive challenges #69

Open
northdpole opened this issue Apr 27, 2014 · 15 comments
Open

write defensive challenges #69

northdpole opened this issue Apr 27, 2014 · 15 comments
Assignees

Comments

@northdpole
Copy link
Collaborator

All of our challenges are in the mentality of "here's the application break it", it would be nice to have challenges where the student is given a piece of broken code and they are required to fix it

@subhayanRM
Copy link
Contributor

but that would be difficult to evaluate, unless peer review is an option.. but then again peer review works well only in strong peer groups. (it's like a prisoner's dilemma game .. you have 2 equilibria here)

@northdpole
Copy link
Collaborator Author

we could start with very simple challenges, like
here's a piece of code which is sqli vulnerable use the correct escaping
function to fix it.
and then we test either by running a piece of the code or by regex
On 27/04/2014 10:03 μμ, Subhayan Roy Moulick wrote:

but that would be difficult to evaluate, unless peer review is an
option.. but then again peer review works well only in strong peer
groups. (it's like a prisoner's dilemma game .. you have 2 equilibria
here)


Reply to this email directly or view it on GitHub
#69 (comment).

@MisterIcy
Copy link
Contributor

Or we can create an interpreter to parse javascript/ruby/whatever language and get the output. While it's practically possible, it may do much more harm to someone, since the result might be valid, but the means (the way the solution is written) are trashy. Memory leaks, new holes, etc. might appear in the "correct" code. As @subhayanRM, this requires peer review

@gameFace22
Copy link
Contributor

Can we add codes which are vulnerable to Buffer Overflow and let fixing it be a challenge?!
Just a suggestion.
And why haven't there been any improvements in creating defensive challenges?

@northdpole
Copy link
Collaborator Author

How would you test for buffer overflow without executing the code?

On 17.12.2014 18:35, Nishaanth Gunasekaran wrote:

Can we add codes which are vulnerable to Buffer Overflow and let
fixing it be a challenge?!
Just a suggestion.
And why haven't there been any improvements in creating defensive
challenges?


Reply to this email directly or view it on GitHub
#69 (comment).

@gameFace22
Copy link
Contributor

We could probably add a vulnerable file and ssh it. Access the file. Fix it and upload it again. We can have an option to download the file or better ssh and access the file.

@pchaigno
Copy link
Collaborator

@gameFace22 It doesn't resolve the issue of checking for the correctness of the answer...

@gameFace22
Copy link
Contributor

Oh,yes!
I never thought of that.

@northdpole
Copy link
Collaborator Author

We need a sandbox for that, something where you are able to execute code
without affecting the server. Luckily there's a team in OWCS working on
it. Let's what they come up with.

On 17.12.2014 20:29, Nishaanth Gunasekaran wrote:

Oh,yes!
I never thought of that.


Reply to this email directly or view it on GitHub
#69 (comment).

@gameFace22
Copy link
Contributor

Great! I will go search for more defensive challenges.

@northdpole
Copy link
Collaborator Author

for sqli challenges in js
https://github.com/google/lovefield

@a0xnirudh
Copy link
Collaborator

I believe we have a much better solution for this now using docker ;). We already have a sample PHP challenge (dealing with XSS in the branch a0xnirudh/docker) which is intentionally vulnerable and users should fix the code and submit back to interface which then tells you if you have done a correct fix or not.

Since we are actually executing code, chances of false positives are much low. Do test when any of you has some time and let me know. I will be adding more challenges and support to other web languages (only PHP support now) like Nodejs, ROR etc in the near future.

Thanks !

@northdpole
Copy link
Collaborator Author

@a0xnirudh is right, we finally haz sandbox 💯 challenge looks cool on a first glance, I'll check it when i'm back behind a computer

@RahulPratapSingh
Copy link

@northdpole We can put vulnerable code for Owasp Top 10 like Injection (Header, SQLi, etc) , XSS, LFI, RFI, CSRF, etc.

@a0xnirudh
Copy link
Collaborator

@RahulPratapSingh Yes, I will working on the same this summer !

@northdpole I think we can close this issue now ?

@a0xnirudh a0xnirudh self-assigned this Mar 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants
@northdpole @pchaigno @a0xnirudh @MisterIcy @subhayanRM @gameFace22 @RahulPratapSingh and others