Skip to content

Instantly share code, notes, and snippets.

@Oneiroi
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oneiroi/c8c958e16985306772e0 to your computer and use it in GitHub Desktop.
Save Oneiroi/c8c958e16985306772e0 to your computer and use it in GitHub Desktop.
- name: Ensure bash is not vulnerable CVE-2014-6271
command: env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
register: shellshock
failed_when: "'vulnerable' in shellshock.stdout"
tags:
- CVE
- CVE-2014-6271
- name: Ensure bash is not vulnerable CVE-2014-7186
command: bash -c 'true <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF' || echo "CVE-2014-7186 vulnerable, redir_stack"
register: shellshock
failed_when: "'vulnerable' in shellshock.stdout"
tags:
- CVE
- CVE-2014-7186
- name: Ensure bash is not vulnerable CVE-2014-7187
command: (for x in {1..200} ; do echo "for x$x in ; do :"; done; for x in {1..200} ; do echo done ; done) | bash || echo "CVE-2014-7187 vulnerable, word_lineno"
register: shellshock
failed_when: "'vulnerable' in shellshock.stdout"
tags:
- CVE
- CVE-2014-7187
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment