CVE-2014-6271 sur un exemple d'attaque SSH?


2

J'ai lu le bogue CVE-2014-6271 sur de nombreuses pages, mais je ne suis toujours pas en mesure de comprendre comment il est exactement possible de l'exploiter via ssh.

D'après tout ce que j'ai lu, je n'ai pas trouvé d'exemple qui exécute un morceau de code sans être authentifié.J'essaie juste de mieux comprendre le bogue, aucun piratage n'est impliqué.

Selonhttps://securityblog.redhat.com/2014/09/24/bash-specially-crafted-environment-variables-code-injection-attack/

Un attaquant peut fournir des variables d'environnement spécialement conçues contenant des commandes arbitraires qui seront exécutées sur des systèmes vulnérables sous certaines conditions.Le nouveau numéro a été attribué à CVE-2014-7169.

1

You cannot circumvent authentication by exploiting this bug.

But SSH allows you to restrict what commands a user can run, e.g. by using ForceCommand in sshd_config. By exploiting this bug a user can circumvent this restriction and run any command she/he wants.


0

The bug occurs when bash gets executed with a specially crafted environment variable.

Remote exploitation over SSH is only possible when bash is executed. When the ForceCommand SSH option is in use, that command always gets executed using the login shell of the authenticated user (see the manual page of sshd_config).

Vulnerable configurations include public git services which normally restrict you to just running git commands. With this bug, you would be able to execute shell commands, bypassing the ForceCommand restriction. For a git daemon service, this could mean that you can access all repositories owned by the system user (bypassing access restrictions imposed by, say, gitolite).