Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2014-7169 PoC — GNU Bash 操作系统命令注入漏洞

Source
Associated Vulnerability
Title:GNU Bash 操作系统命令注入漏洞 (CVE-2014-7169)
Description:GNU Bash是美国软件开发者布莱恩-福克斯(Brian J. Fox)为GNU计划而编写的一个Shell(命令语言解释器),它运行于类Unix操作系统中(Linux系统的默认Shell),并能够从标准输入设备或文件中读取、执行命令,同时也结合了一部分ksh和csh的特点。 GNU Bash 4.3 bash43-025及之前版本中存在安全漏洞,该漏洞源于程序没有正确处理环境变量值内的畸形函数定义。远程攻击者可借助特制的环境变量利用该漏洞写入文件。以下产品和模块受到影响:OpenSSH sshd中的Fo
Description
DEPRECATED: Chef cookbook to audit & remediate "Shellshock" (BASH-CVE-2014-7169)
Readme
bash-shellshock Cookbook
=================

[![Build Status](https://travis-ci.org/chef-cookbooks/bash-shellshock.svg?branch=master)](http://travis-ci.org/chef-cookbooks/bash-shellshock)
[![Cookbook Version](https://img.shields.io/cookbook/v/bash-shellshock.svg)](https://supermarket.chef.io/cookbooks/bash-shellshock)

This cookbook is designed to test and optionally remediate the bash "shellshock" bug, more formally known as cve-2014-7169.

Once Chef-client has executed this recipe on one or more hosts, a list of all nodes that are vulnerable to the "Shellshock" exploit can be retrieved from the Chef server via `knife search:`

`knife search node 'bash:shellshock_vulnerable'`

Limitations
------------
This cookbook relies on the OS-native packaging system to provide patched versions of the bash package.

Requirements
------------
#### Platforms
* Tested on CentOS 6.5
* Tested on Ubuntu 12.04
* Should work on a wide variety of other systems

#### Chef
- Chef 11+

#### Cookbooks
* ohai (https://supermarket.chef.io/cookbooks/ohai)

Attributes
----------

* No user-configurable attributes

Recipes
-------

### bash-shellshock::default

* Audits and remediates Bash-CVE-2014-7169 ("Shellshock")

### bash-shellshock::audit

* Installs an OHAI plugin that will automatically audit nodes for the Shellshock vulnerability. This plugin creates two new values in OHAI:

  node['languages']['bash']['version'], a string. Returned from `bash --version`.
  node['languages']['bash']['shellshock_vulnerable'], a boolean. True if node is vulnerable.

### bash-shellshock::remediate

* If the node is marked vulnerable by the audit recipe, this recipe will attempt to upgrade bash via the native packaging system. Includes the audit recipe.
* Audits and remediates Bash-CVE-2014-7169 ("Shellshock")


License & Authors
-----------------

**Author:** Cookbook Engineering Team (<cookbooks@chef.io>)

**Copyright:** 20014-2015, Chef Software, Inc.

```
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
File Snapshot

[4.0K] /data/pocs/dedfe75613bebcea4d839bfb46f83984c4d13dc3 ├── [4.0K] attributes │   └── [ 727] default.rb ├── [ 91] Berksfile ├── [ 889] CHANGELOG.md ├── [1.0K] chefignore ├── [ 111] CONTRIBUTING.md ├── [4.0K] files │   └── [4.0K] default │   └── [4.0K] plugins │   └── [1.3K] bash.rb ├── [ 359] Gemfile ├── [ 11K] LICENSE ├── [ 882] MAINTAINERS.md ├── [1.2K] MAINTAINERS.toml ├── [ 917] metadata.rb ├── [ 989] Rakefile ├── [2.4K] README.md ├── [4.0K] recipes │   ├── [1.1K] audit.rb │   ├── [ 732] default.rb │   └── [1.0K] remediate.rb ├── [4.0K] spec │   ├── [ 88] spec_helper.rb │   └── [4.0K] unit │   └── [4.0K] recipes │   ├── [ 266] audit_spec.rb │   ├── [ 613] default_spec.rb │   └── [1.1K] remediate_spec.rb ├── [4.0K] tasks │   └── [1.9K] maintainers.rb ├── [4.0K] test │   └── [4.0K] integration │   └── [4.0K] default │   └── [4.0K] serverspec │   ├── [ 616] default_spec.rb │   └── [ 42] spec_helper.rb └── [ 106] TESTING.md 13 directories, 24 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.