Vedi ultimo post nelle pilloline:
http://forum.html.it/forum/showthread.php?threadid=1019664&pagenumber=41&post id=25252324#post25252324
P.S.: c'e' anche il rimedio
Vedi ultimo post nelle pilloline:
http://forum.html.it/forum/showthread.php?threadid=1019664&pagenumber=41&post id=25252324#post25252324
P.S.: c'e' anche il rimedio
Ultima modifica di pilovis; 27-09-2014 a 00:10
Progettista elettronico, appassionato di informatica dal 1982, sistemista Linux dal 2002, sono consulente tecnico del Giudice per le indagini preliminari, valuto richieste di consulenza, in ambito Voip/Telefonia anche con grado di sicurezza militare.
La cosa allucinante non è che sia vulnerabile, ma il fatto che qualcuno abbia pensato che fare l'eval a caso di tutte le variabili d'ambiente fosse una buona idea...
Amaro C++, il gusto pieno dell'undefined behavior.
erano altri tempi...
http://paste.lisp.org/display/143864
Ultima modifica di andrea.paiola; 27-09-2014 a 16:55
ma cosa fa il comando:
codice:env VAR='() { :;}; echo Bash is vulnerable!' bash -c "echo Bash Test"
e quali danni puo' fare ?
ma
che fa? sembra un forkbombcodice:env VAR='() { :;};
la vulnerabilità è appunto non fare il parsing e quindi l'escape corretto (teorico, visto che come ho scritto è considerata una feature di Bash... Bash si aspetta che gli vengano passate variabili già controllate) delle variabili d'ambiente al subprocess... questo certo è in comune con molti forkbomb
So, we're in the context of designing a unix shell, where subprocesses are created and run in a casual and normal manner. When creating a new subprocess, environment variables can be used to pass some data from the parent process to the child process. In the case of bash, it is a feature that has been wanted, to have some functions defined in the parent bash process also be transmitted and defined in the child bash process. Using environment variables to pass the definition of those functions is natural.
Where the implementation slightly went beyond the specifications, is that it also executes any command present after the definition of the function passed in an environment variable. Since it's usually the bash program which generates the value of the environment variables used to pass those functions, there's normally no further command. But in the context where bash was designed, if a user added commands to such environment variables, it could be still considered a feature. In any case, the child process is executed on behalf of the user who configured the environment variable, so there's no security consideration to matter.
Ultima modifica di andrea.paiola; 27-09-2014 a 17:17
Elenco dei vettori conosciuti
https://www.dfranke.us/posts/2014-09...n-vectors.htmlFor a service to be vulnerable to Shell Shock, three conditions must be met:
It must set an environment variable whose value (not necessarily name) is attacker-controlled, and particularly must be made to begin with () {.
It must invoke bash.
The system must be running a vulnerable version of bash.
Mah, il solo fatto che il tizio dica che secondo lui è un baco di Apache non filtrare le variabili d'ambiente la dice lunga... Che, adesso Apache deve sapere delle paturnie di ogni possibile shell/interprete e filtrare di conseguenza? Non diciamo cazzate, non si fa l'eval di cose a caso, punto, cercare di risolvere il problema con filtri a livello di web server sarebbe lo stesso approccio delle atroci magic_quotes di PHP.
Amaro C++, il gusto pieno dell'undefined behavior.
beh ma scusa io non lo considererei sicuro un sistema che ti permette da remoto e senza controlli di settare variabili d'ambiente... e più che Apache sarebbe PHP, in questo caso.
Poi certo sarebbe ottimo controllare le variabili d'ambiente quando le usi, ma in prima istanza non le farei settare.
Comunque ripeto: semplicemente non si aspettavano che altri software usassero Bash in quel modo.
Ultima modifica di andrea.paiola; 28-09-2014 a 09:34