<div dir="ltr"><div>Hello,</div><div><br></div><div>I participated last week at DCTF, CTF organized by CCSIR. Was the local stage (onsite) and came 15 teams:</div><div>Dragon Sector        13 tasks -> 3117 points </div><div>Tasteless            13 tasks -> 3111 points </div><div>FluxFingers          13 tasks -> 3111 points </div><div>Hertz                13 tasks -> 3109 points </div><div>HackingForSoju       13 tasks -> 3105 points </div><div>Bushwhackers         12 tasks -> 2709 points </div><div>Toxic                11 tasks -> 2600 points </div><div>Scryptos             10 tasks -> 2310 points </div><div>Vulturii             10 tasks -> 2205 points </div><div>Dcua                 10 tasks -> 2202 points </div><div>P4                   10 tasks -> 2200 points</div><div>BalalaikaCr3w        10 tasks -> 2000 points </div><div>Pwn.ro                8 tasks -> 1600 points </div><div>Shellphish            6 tasks -> 1002 points </div><div>BambooFox             6 tasks -> 900  points</div><div><br></div><div><br></div><div>Our team is "Vulturii", we managed to do 10 tasks and achieved 2205 points.</div><div>Team Memebers:</div><div>Vladimir  Diaconescu Solved: 2 tasks </div><div>Catalin Irimie       Solved: 2 tasks </div><div>Radu Caragea         Solved: 2 tasks </div><div>Cernica Ionut        Solved: 2 tasks Web300 and Web400</div><div>Alexandru Dimos      Solved: 2 tasks </div><div><br></div><div><br></div><div>I was very close to solve Bonus400 (I knew how to do but we needed 5 minutes more). It wasn't as hard as I was thinking, but it was too late when I figured it out.</div><div><br></div><div>Web300:</div><div>It was given an archive, a wordpress, and for each .php file they removed comments and the code has been written on a single line.</div><div>I Googled for a php command that does this and found it:</div><div>php --strip file.php > file2.php</div><div><br></div><div>I downloaded the wordpress and I installed it among with all the plugins.</div><div>With a script in python I went through each file and I executed the above command.</div><div>When we made diff on the two directories with same wordpress, only a single file was different (class.akismet.php).</div><div><br></div><div>In that .php file I found a backdoor and I was able to execute system commands.</div><div><br></div><div><br></div><div><br></div><div>Web400:</div><div>We were given a web application that takes two parameters "s" and "k". When making a request to the server, the php script verify if there is parameter "k" set and if so the value of parameter "s" will be encrypted  with AES256-CBC and make a SQL query, if "k" doesn't exists, take the value of "s", make some input validation on it and then make that SQL query.</div><div>After several tests we realized that "s" is encrypted with AES256-CBC using as key the value from parameter "k".</div><div><br></div><div>We must decrypt SQL queries so when the server would encrypt what you just decrypted, would be the desired SQL query.</div><div>We managed to get SQL Injection and we were able to extract the flag.</div><div><br></div><div>I found it odd that pycrypto-AES256-CBC implementation isn't same as implementation of the mcrypt AES256-CBC from php.</div><div><br></div><div><br></div><div><br></div><div>All the best,</div><div>Cernica Ionut</div></div>