EasyCTF has an IRC channel! Check out #easyctf2017 on freenode to claim a free flag, and stick around to get on-the-fly updates during the competition.
For this problem you will utilise the programming interface, which you can access via the navigation bar at the top of your screen.
The input for your program will be given via STDIN - that's cin, input(), and System.in for cxx, Python, and Java respectively. Output goes to STDOUT - cout, print, and System.out. Your program will be run on several sets of input, and if your output matches ours for each testcase, this problem will be marked solved.
We'll start with a simple challenge. Each testcase has two lines of input. The first will contain an integer N. The second will contain a sequence of integers a_1, a_2, ..., a_N. You are to output the sum of that sequence - that is, a_1 + a_2 + ... + a_n. Good luck!
I dropped my alphabet on its head, can you help me reassemble it? easyctf{r_wlmg_vevm_mvvw_zm_zhxrr_gzyov}
Hint:
What happens if you turn the alphabet upside down?
It is some Backward Alphabet Code. I used theproblemsite.com to solve this: easyctf{i_dont_even_need_an_ascii_table}.
20 - Clear and Concise Commentary on Caesar Cipher - Cryptography#
I tried to hide a flag sneakily, can you find it? Download
It's easy to find a bunch of ciphertext:
omz kag odmow ftue oubtqd
h fns sghr qhfgs sghr shld
WKLV LV QRW WKH IODJ
xaywqoa fqheqo eo ykkh hega pdwp
ldnv bdzrzq hr dzrx
RNFLPGS{LBHTBGVG}
omt vbvdi
gmbbbbbbbbbbbbh
Just crack the caesar code (with some ruby):
# from https://gist.github.com/matugm/db363c7131e6af27716cdefcaesar_cipher(string, shift=1) alphabet =Array('a'..'z') encrypter =Hash[alphabet.zip(alphabet.rotate(shift))]# " " => c because I don't want to void non-letters chars string.chars.map { |c| encrypter.fetch(c, c) }endciphertext ='RNFLPGS{LBHTBGVG}'.downcase(1...26).each do |n|puts caesar_cipher(ciphertext, n).joinend
The other day we happened upon a dusty old laptop covered in duct tape and surrounded by several papers with notes scrawled all over them. Upon inspection, we found that the laptop contained several python files labeled phunky.
We've determined that each of the files contains a mini reversing challenge. The first task is simple: Find the value of x such that the program prints out easyctf (make sure it's lowercase!).
My friend just got back from the plains and he took this picture with his new camera. He also told me there's a flag hidden in it - can you check it out for me?
Output the numbers 1 through n, in increasing order, one per line.
However, replace any line that is a multiple of 3 with Fizz and any that are a multiple of 5 with Buzz. Any line that is a multiple of 3 and 5 should be written as FizzBuzz.
The input will be the number of lines to write, n, followed by a linebreak.
Sample input:
17
Sample output:
12Fizz4BuzzFizz78FizzBuzz11Fizz1314FizzBuzz1617
# python3# strip newline and cast to intn =int(input().rstrip())for i inrange(1, n+1):if i %3==0and i %5==0:print('FizzBuzz')elif i %3==0:print('Fizz')elif i %5==0:print('Buzz')else:print(i)
Boredom took over, so I wrote this python file! I didn't want anyone to see it though because it doesn't actually run, so I used the coolest base-16 encoding to keep it secret. python
Ok, so I made a little ruby script to decode all chars and get the message, but it's like in Inception, the message is an exec with some chr again. So I adapted my script to do the same process until we get the flag:
#!/usr/bin/rubydefdeobfuscate(s)# split file arr_in = s.split('+')# convert int to char arr_out = []for c in arr_in char =/.*chr\(([0-9]{1,3})\).*/.match(c).captures[0].to_i.chr arr_out.push(char)end out = arr_out.joinreturn outendopen('test.py', 'r') do |f| input = f.read() output ='' i =1until/easyctf/.match(output) doputs"=== pass n°#{i} ===" output = deobfuscate(input)puts output +"\n\n" input = output i+=1endend
I found two files in a secret room. They look like jumbled letters with no patterns. I mean look at it! file1 is identical to file2, right?
Ok so let's compare the two files:
$ cmp -bl file1.txt file2.txt 482 175 } 154 l 1638 64 4 146 f 1796 137 _ 142 b 2240 147 g 172 z 3157 156 n 71 9 3303 61 1 65 5 3568 153 k 145 e 3892 60 0 157 o 3911 60 0 142 b 4501 154 l 143 c 5204 137 _ 162 r 5582 63 3 164 t 6107 162 r 161 q 6563 63 3 141 a 7043 167 w 144 d 7196 137 _ 164 t 8269 165 u 67 7 8866 60 0 153 k 9164 171 y 144 d 9965 137 _ 170 x 10771 63 3 172 z 11220 143 c 60 0 11283 156 n 144 d 11285 63 3 143 c 11666 162 r 151 i 13337 63 3 163 s 14816 146 f 167 w 15168 146 f 173 { 15180 61 1 170 x 15366 144 d 65 5 15656 137 _ 153 k 16168 63 3 151 i 17651 150 h 153 k 17761 164 t 64 4 18186 137 _ 160 p 18261 63 3 165 u 18592 142 b 145 e 18739 137 _ 162 r 19676 171 y 151 i 20033 64 4 151 i 20228 155 m 145 e 20246 137 _ 142 b 23511 163 s 155 m 24001 61 1 141 a 24487 150 h 166 v 24845 164 t 167 w 25291 173 { 156 n 25411 146 f 170 x 25491 164 t 144 d 25502 143 c 166 v 25673 171 y 167 w 26410 163 s 145 e 27127 141 a 170 x 27132 145 e 71 9
It seems that we got the flag (reverse order of the diff from first file), but let's write a ruby script to make it easier to copy:
#!/usr/bin/ruby# empty arrayflag = []# generate diff.txt : cmp -bl file1.txt file2.txt > diff.txtopen('diff.txt', 'r') do |f|# split lines lines = f.read().split("\n")for line in lines# split columns words = line.split(' ') flag.push(words[2])endendputs flag.reverse.join