16:32:46 # ssh 172.17.0.9
The authenticity of host '172.17.0.9 (172.17.0.9)' can't be established.
RSA key fingerprint is 39:7c:13:9f:d4:b0:d7:63:fc:ff:ae:e3:46:a4:bf:6b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.17.0.9' (RSA) to the list of known hosts. root@172.17.0.9's password:
Last login: Thu Sep 25 16:31:32 2014 from 172.17.42.1
root@86fb0b4bbb0b:~
16:35:04 # env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
TASK: [update bash in redhat 6 version] ***************************************
changed: [172.17.0.9]
TASK: [update bash in redhat 5 version] ***************************************
skipping: [172.17.0.9]
PLAY RECAP ********************************************************************
172.17.0.9 : ok=2 changed=1 unreachable=0 failed=0
real 0m35.901s
user 0m0.952s
sys 0m0.216s
4、查看是否有漏洞
1
2
3
4
5
6
7
8
9
10
root@ip-10-10-10-10:/etc/ansible
16:36:01 # ssh 172.17.0.9 root@172.17.0.9's password:
Last login: Thu Sep 25 16:35:57 2014 from 172.17.42.1
root@86fb0b4bbb0b:~
16:36:11 # env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test
root@86fb0b4bbb0b:~