totti93 Posted October 20, 2012 Report Posted October 20, 2012 (edited) Mi-am adus aminte ca pe vremea lui Flinstones era un limbaj numit Pascal. Am facut un challenge micut pentru cei care cunosc limbajul.Singura cerinta este sa treceti de firewall, astfel incat sa va apara mesajul 'Welcome user!'.Usage:~$ ./challenge <password>Codul sursa:program challenge;{ Bypass this }procedure firewall(var data : string);begin data := data + 'x';end;{ ---------- }var password : string;begin writeln('Welcome to challenge'); writeln; if ParamCount < 1 then begin writeln('Error! No login data found'); writeln('Usage: ./challenge <password>'); halt(0); end; password := ParamStr(1); firewall(password); if pos('x', password) = 0 then writeln('Welcome user!') else writeln('Incorect password!');end.Compilat (Linux 32 biti, compilator FPC): http://pastebin.com/raw.php?i=JqgVMB2xCei cu Windows vor trebui sa compileze singuri.Raspunsuri prin PM + Explicatii / Demonstratii!Success!NU AVETI VOIE SA MODIFICATI SURSA!Solvers:shaggiNebuchadnezzar Edited October 25, 2012 by totti93 Quote
totti93 Posted October 25, 2012 Author Report Posted October 25, 2012 (edited) Up! Edited October 25, 2012 by totti93 Quote
Nebuchadnezzar Posted October 25, 2012 Report Posted October 25, 2012 (edited) Am creat un executabil care rezolva challenge-ul Firewall bypass exploitPentru a lasa si celorlati posibilitatea de a rezolva challenge-ul am publicat doar codul binar.TODO:1.Puneti fisierul executabil firewall in acelasi director cu fisierul bypass (e important ca numele fisierului sa fie firewall)2.Rulati executabilul bypass L-am compilat pentru Linux 32 biti. Edited October 25, 2012 by Nebuchadnezzar Quote
totti93 Posted October 29, 2012 Author Report Posted October 29, 2012 GAME OVERRezolvare:Datele de tip string au o lungime de 256 bytes, primul byte reprezinta lungimea stringului. Daca introducem un string de lungime >= 255 care nu contine niciun caracter 'x', atunci acel + 'x' nu va intra in acel string.~$ ./challenge AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Quote
bcman Posted October 29, 2012 Report Posted October 29, 2012 GAME OVERRezolvare:Datele de tip string au o lungime de 256 bytes, primul byte reprezinta lungimea stringului. Daca introducem un string de lungime >= 255 care nu contine niciun caracter 'x', atunci acel + 'x' nu va intra in acel string.~$ ./challenge AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM-am gândit la acest mod de rezolvare. P?cat c? am uitat teoria (partea cu lungimea de 256 de bytes) ?i atunci nu am încercat numai cu vreo 150 de carctere Challengeul în sine nu a fost greu (ideea mi-a venit destul de repede), dar oricum a fost interesant. Quote