SSH 예제 공격에 대한 CVE-2014-6271?


2

많은 페이지에서 CVE-2014-6271 버그에 대해 읽었지만 여전히 ssh를 통해 버그를 악용 할 수있는 방법을 이해할 수 없습니다.

내가 읽은 모든 것에서 인증되지 않고 코드를 실행하는 예제를 찾을 수 없었습니다.나는 단지 해킹을 포함하지 않고 버그를 더 잘 이해하려고 노력하고 있습니다.

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

공격자는 특정 조건에서 취약한 시스템에서 실행될 임의의 명령이 포함 된 특수하게 조작 된 환경 변수를 제공 할 수 있습니다.새로운 문제가 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).