Skip to content

Instantly share code, notes, and snippets.

@M7
Last active January 4, 2016 20:59
Show Gist options
  • Save M7/8678235 to your computer and use it in GitHub Desktop.
Save M7/8678235 to your computer and use it in GitHub Desktop.
A guide for the Ottawa Ruby Stripe-CTF Meetup

Ottawa Ruby Stripe-CTF Meetup Guide

1. What are we doing tonight?

Tonight, we'll be running through Stripe's Capture The Flag (CTF) Challenge. :)

Stripe's CTF basically gives you some hands-on playtime with interesting problems. Your goal is to solve the problems to the best of your ability.

It's fairly beginner friendly, at least for the first level or two. But don't worry if you don't feel up to it, we have some other exercises for you that are even more suitable for beginners.

If you want to jump right in, head on over to the Stripe-CTF Challenge page and get started.

2. What are the prerequisites for the Stripe-CTF?"

You should have and know the following:

  1. A Linux-Based laptop (a Mac will work) with Ruby and Git installed.

  2. Beginner level knowledge of Ruby. For level0, you should understand loops. Take a look at the code for level0 to see if you understand. If not, feel free to ask us.

3. What if I didn't bring a laptop and want to participate?

We'll try to get you paired up with someone.

4. How do I check if I have Ruby installed?

  1. Open your Terminal / Console
  2. Type ruby -v
  3. If the response is "Command not found," you don't have Ruby installed. You can use Nitrous.io instead.

5. What if I don't have Ruby installed?

You can use Nitrous.io, which will give you an in-browser Terminal/Console on a Linux based machine. It also comes with Ruby pre-installed.

6. How do I check if I have git installed?

  1. Open your Terminal / Console
  2. Type git
  3. If the response is "Command not found," you don't have Git installed. You can use Nitrous.io instead.

7. What if I don't have git installed?

You can use Nitrous.io, which will give you an in-browser Terminal/Console on a Linux based machine. It also comes with Ruby pre-installed.

8. What do I need to know about git to participate in Stripe's CTF?

You should understand

  1. git clone
  2. git commit
  3. git push

Or at least not be afraid to type in the commands that Stripe gives you. ;) You can pretty much copy and paste what Stripe says, and you'll be okay.

9. What if I don't know anything about git?

You can go through this free, interactive run-through of Git by CodeSchool. It should take about 15-20 minutes, then you should be good to go.

10. What do I do if I'm on Windows?

You can use Nitrous.io, which will give you an in-browser Terminal/Console on a Linux based machine. It also comes with Ruby pre-installed.

11. What do I have to know about to successfully do the CTF?

Okay, technically, you should understand, or be ready to Google:

  1. That File.read() opens a file, and returns a string
  2. What the #split method does
  3. What the #gsub method does
  4. What the #include method does
  5. What the #downcase method does
  6. That the last statement in an if block gets returned as the result of the if statement, just like how a method returns the value of the last statement, without needing you to say "return my_value"

You can find all of this information by Googling for it (e.g. Google for "ruby include?").

12. what if I'm reaaaaly brand new to ruby?

That's okay. We've got some other fun stuff for you to do.

If you want to learn the basics of Ruby in a fun way, we suggest the following:

  1. Run through the Ruby Primer at RubyMonk.com.

  2. Try Ruby Warrior, which is an in-browser game where you write Ruby to maneuver a game and pass levels. (Please be kind to your neighbours and turn the sound off, though. ;)

  3. If you want to try some coding challenges,

13. What if I'm a beginner?

Beginner level should be okay. We'd suggest trying it, and if you have questions, ask a neighbour or come and find one of the organizers.

14. If I'm good on all of that, what do I do next (i.e. signup and get started)

Head on over to http://stripe-ctf.com, and sign up. That site will give you instructions on what to do next.

15. What if I don't want to do the Stripe-CTF?

If you want some other exercises / challenges to do, give some of these a try:

If you just want to learn some more Ruby, you can try rubymonk.com or Ruby Warrior.

16. What if I have another question?

Not a problem. Please do one of the following:

  1. Come and find an organizer. (If we're with someone, maybe just come over, tap us on the shoulder and ask if we can come over after we're done… sometimes, it's easy to get wrapped up helping someone, so this will help us manage our time.)

  2. If you want help with a Stripe-CTF solution, visit their IRC chat room

  3. You can also try asking a neighbor. Even if you don't know them, we're friendly people. :)

17. Have fun!

Most importantly, have fun tonight! Feel free to holler if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment