keyboard_arrow_up

title: Writeup Hacky'Nov 0x01
date: May 01, 2022
tags: writeups web hackynov



Introduction

On 01/04/2022, I had the pleasure of organizing the Hacky'Nov event. As part of this event, I created 4 challenges. There were two web challenges and two programming challenges. Here, I will only detail the web challenges.

For more information about the event: https://hackynov.fr

Time To Plane

challenge image time to plane de hacky'nov

When you arrive on the page, you come across an airplane monitoring system. You can enter the flight number you want to monitor.

image time to plane hacky'nov python

It quickly becomes clear from the message displayed that the goal is to crash the monitoring system. To do this, we start testing the characters we can use.

image supervision hacky'nov python no error

We see that letters are not recognized and that some special characters are recognized as an attack.

image supervision hacky'nov python error

However, we see that when we use double parentheses, there is no error.

image supervision hacky'nov python test payload

Looking at the site headers, we see that it is a Flask application, so it runs on Python.

flask header python challenge

We might think that the "new technique for evaluating the relevance of flight numbers" is probably an eval function. So we try to inject some code.

payload = time.sleep(10)

inject code

RECOAPP

challenge hacky'nov recoapp web

Here is the page we land on.

challenge hacky'nov recoapp web page

By translating and playing around with the application, we understand that it is a tool that recognizes words in an image. The tool determines whether the word is considered good or bad. To test, we take a Word document on which we write:

test
test 1
test2
azertyuiop

challenge hacky'nov recoapp test comportement

By repeating the operation, we realize that the tool never gives the same "rating" to our word. We can consider that it is done completely randomly. We then use a list of special characters to detect abnormal behavior.

Example:

&
'

||
(
)
@
_
^
)

challenge hacky'nov recoapp test comportement payload

We see that some characters are interpreted but not displayed. We also see that only 4 lines are present.

We then try to chain a special character with a command to see the result using the following payload: &ls

challenge hacky'nov recoapp injection de commande

All we need to do is display the result by sending an image containing the text &cat flag.

challenge hacky'nov recoapp injection de commande and get flag

Source

You can find the sources for my challenges here: https://github.com/LOLOLEKIK/hackynov2022