Bash bug : Différence entre versions

De Vulgum Techus
Aller à : Navigation, rechercher
(Page créée avec « Catégorie:Linux = Commande utile = Test de la vulnérabilité env x='() { :;}; echo vulneréble' bash -c "echo ceci est un test" = Liens utiles = * [https://web.nv... »)
 
Ligne 1 : Ligne 1 :
 
[[Catégorie:Linux]]
 
[[Catégorie:Linux]]
  
= Commande utile =
+
= Commandes utiles =
Test de la vulnérabilité
+
== Test de la vulnérabilité ==
  env x='() { :;}; echo vulneréble' bash -c "echo ceci est un test"
+
  env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
 +
En cas de vulnérabilité '''[[Linux]]''' affiche :
 +
vulnerable
 +
this is a test
 +
Sinon il affiche :
 +
bash: warning: x: ignoring function definition attempt
 +
bash: error importing function definition for `x'
 +
this is a test
 +
 
 +
== Connaitre la version du Bash ==
 +
3 possibilités :
 +
echo $BASH_VERSION
 +
rpm -q bash
 +
bash --version
  
 
= Liens utiles =
 
= Liens utiles =

Version du 26 septembre 2014 à 01:44


Commandes utiles

Test de la vulnérabilité

env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

En cas de vulnérabilité Linux affiche :

vulnerable
this is a test

Sinon il affiche :

bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test

Connaitre la version du Bash

3 possibilités :

echo $BASH_VERSION
rpm -q bash
bash --version

Liens utiles

Red Hat

  • access.redhat.com Bash Code Injection Vulnerability via Specially Crafted Environment Variables (CVE-2014-6271, CVE-2014-7169)