Jump to content











Photo

Challenge #26: Sudoku ppc

challenge ctf sudoku nc team reboot ppc

  • Please log in to reply
8 replies to this topic

#1 florin91

florin91

    Frequent Member

  • Team Reboot
  • 197 posts
  •  
    European Union

Posted 31 July 2013 - 06:17 PM

nc 5.231.58.182 1337


PPC comes from professional programming and coding.
Solve 100 Sudoku games and you will get the flag.

 

Solvers:

1. Icecube

2. AceInfinity

 

 

And you can also test here: http://tech.reboot.p...hp?challenge=26

 

Note: This challenge is not made by me. I just found it and hosted it.


  • Nuno Brito likes this

#2 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 02 August 2013 - 02:04 AM

Any idea on how to connect from behind a proxy using netcat for Windows?



#3 florin91

florin91

    Frequent Member

  • Team Reboot
  • 197 posts
  •  
    European Union

Posted 02 August 2013 - 08:14 AM

It should work even behind a proxy, but a bit slower. However, I'm not quite sure of the server uptime, since it's a free one. It might be off sometimes.



#4 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 10 August 2013 - 10:38 PM

I solved the challenge :boththumbsup: .
The challenges webpage says that my solution is correct, but it doesn't store the results in view stats (probably related to the websserver problems).

So I will post the sha1sum of the flag that I got:

$ printf "${flag}" | sha1sum
a7f21e6593dd1a51111b7a41f8b6b2d513f1997c  -

To solve this challenge, you will need to do some programming:

  • Sudoku solver for solving the sudokus.
  • Socket programming to read the sended messages and to send the solutions.

You will need to solve 100 sudoku's before you get the flag.
I needed to run it multiple times, because some sudokus are a bit harder to solve, and the server sends a "So sloooow" message and closes the connection.

I used python to solve the challenge.

A basic socket programming tutorial for python:
http://www.binarytid...mming-tutorial/

Socket programming with PHP should also be quite easy to do.

 



#5 AceInfinity

AceInfinity

    Frequent Member

  • Team Reboot
  • 228 posts
  • Location:Canada
  • Interests:Windows Security, Programming, Customizing & Crash Dump Analysis.
  •  
    Canada

Posted 14 August 2013 - 02:36 AM

I solved your challenge @IceCube :) That was a fun one, regardless of its simplicity. The only thing I require for this one is to create a Sudoku solver and parser to submit to my sudoku solver. I only created one in C# a long time ago. I'm attempting this one in C++.

I don't quite understand this though:
Format:
a) "[1-9] [1-9] [1-9]" - coords and input digit
b) "solution [1-9]{81}" - full solution
How does "solution _____" get submitted? (Maybe I should rephrase this)

How is "[1-9]{81}" a full solution for a particular sudoku puzzle? I know solution is the string command, and the argument after it is to be the solution, but I don't get how the solution is to be formatted.

I was looking at Sudoku today, and I can't get what this means: "[1-9]{81}"

"To figure this out, or to stay confused, that's the question" :music_guitar:

edit: Hmmm, {81} an index on the 9x9 grid (the very last square? Being a number indicated by the [?]? (ie. a value from 1-9)?

If that's correct, is that how all squares need to be filled in?

XyqiexK.png

Hmm...

edit: I figured it out for inputting data finally... Shouldn't have taken that long. At first I thought the coordinates meant grid, then position within the grid, then I tried with the brackets around each 3 numbers, which might have been my biggest mistake. ({X} {Y} {Number})

Still don't understand format b however.

#6 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 14 August 2013 - 01:19 PM

Format:
a) "[1-9] [1-9] [1-9]" - coords and input digit
b) "solution [1-9]{81}" - full solution

"[]" means that you only need to match 1 character out of the characters specified between the square brackets.

"-" means that this is a range.

So [1-9] indicates that you need to put 1 character between 1 and 9.

 

[1-9]{81} means use a character between 1 and 9 and do this 81 times.

 

 

For format a:

  • First number = row number (from 1 to 9)
  • Second number = column number (from 1 to 9)
  • Third number = value you want to put there
$ nc 5.231.58.182 1337

Hi! I'm florin and I have setup this challenge to find some members for the team
 and to test the existing members. I have no credits on this challenge.
Have a nice time with sudoku
Format:
a) "[1-9] [1-9] [1-9]" - coords and input digit
b) "solution [1-9]{81}" - full solution
Other:
"restart" to start current game again
"[QqXx]" to exit
-------------
|17_|8_3|26_|
|8_3|___|9_7|
|__2|17_|38_|
-------------
|___|538|___|
|538|__6|_49|
|_2_|__1|_53|
-------------
|3_4|2_5|7__|
|2_5|96_|431|
|_6_|31_|528|
-------------
1 3 9
Nice step
-------------
|179|8_3|26_|
|8_3|___|9_7|
|__2|17_|38_|
-------------
|___|538|___|
|538|__6|_49|
|_2_|__1|_53|
-------------
|3_4|2_5|7__|
|2_5|96_|431|
|_6_|31_|528|
-------------

For format b:

  • send the string "solution " followed by 81 digits consisting of 1 to 9 (no separators)
  • where the first 9 digits are the values for the first row
  • where digit 10 to 18 are the values for the second row
  • ...
-------------
|17_|8_3|26_|
|8_3|___|9_7|
|__2|17_|38_|
-------------
|___|538|___|
|538|__6|_49|
|_2_|__1|_53|
-------------
|3_4|2_5|7__|
|2_5|96_|431|
|_6_|31_|528|
-------------

To solve this with format b send (I used this format to solve this challenge):


solution 179843265843652917652179384491538672538726149726491853314285796285967431967314528

  • AceInfinity likes this

#7 AceInfinity

AceInfinity

    Frequent Member

  • Team Reboot
  • 228 posts
  • Location:Canada
  • Interests:Windows Security, Programming, Customizing & Crash Dump Analysis.
  •  
    Canada

Posted 14 August 2013 - 05:45 PM

I figured out format a, I just didn't get what the significance of the 81 was for format b. :) I'm thinking my solver is always going to use format b though? :S

#8 AceInfinity

AceInfinity

    Frequent Member

  • Team Reboot
  • 228 posts
  • Location:Canada
  • Interests:Windows Security, Programming, Customizing & Crash Dump Analysis.
  •  
    Canada

Posted 14 August 2013 - 08:44 PM

:)

SHA-256: 22a629bbf5ff5d6ef9ea5e2ea697520363b63bf4fd490d7415e6cf945fade154

#9 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 16 August 2013 - 06:37 PM

Changed topic title to maintain the same numbering and naming convention we are following.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users