Hacker之路技能树(1)
2015-09-10 12:42
281 查看
第一个任务,了解buffer overflow.
我是64位的,
64-bit, what you need to know
For the purpose of this tutorial, you should be aware of the following points:General purpose registers have been expanded to 64-bit. So we now have RAX, RBX, RCX, RDX, RSI, and RDI.
Instruction pointer, base pointer, and stack pointer have also been expanded to 64-bit as RIP, RBP, and RSP respectively.
Additional registers have been provided: R8 to R15.
Pointers are 8-bytes wide.
Push/pop on the stack are 8-bytes wide.
Maximum canonical address size of 0x00007FFFFFFFFFFF.
Parameters to functions are passed through registers.
用到的工具:
Python
Exploit Development Assistance for GDB
getenvaddr.c
我的 requirements:http://www.cis.syr.edu/~wedu/seed/Labs_12.04/Software/Buffer_Overflow/Buffer_Overflow.pdf:
但实际上我觉得这是一个非常渣的教程,问题设置的不错但是过程太笨了,所以找到另一个: http://blog.techorganic.com/2015/04/10/64-bit-linux-stack-smashing-tutorial-part-1/
总结下:
先大胆overflow掉return address,然后用pattern检查具体是那一组把rip overwrite掉了($rsp),然后 再次overflow
此时用shellcode覆盖,就ok啦.说起来很简单,但其中道理却很多哈哈哈。
note:
Address Randomization: 这个会报Segmentation fault (core dumped),我觉得如果循环时间长总会碰到对的。
Stack Guard: *** stack smashing detected ***: ./classic terminated 直接杀死
Non-executable Stack: Segmentation fault (core dumped) only makes it impossible to run shellcode on the stack
相关文章推荐
- 回望英语-3
- 零基础学python-15.1 为什么需要编写函数
- 零基础学python-15.1 为什么需要编写函数
- MsgBox-官方文档
- 使用位运算计算两个整数的加减
- 前端环境安装
- 深入理解C# 静态类与非静态类、静态成员的区别
- Hibernate笔记——缓存机制详细分析
- 第二届云鼎奖“中国最具潜力企业奖”花落安畅
- 黑马程序员_java05_反射
- ML 徒手系列 拉格朗日乘子法
- Golang 常用字符串处理方法汇总
- eclipse中查看storm0.9.3示例代码storm-start-05.docx
- MySQL 最基本的SQL语法/语句
- canvas基本用法
- 日志使用概要
- Objective-c-字典使用
- I2C读写时序
- NSFileHandle、NSFileManager、NSUserDefaults用法
- Android(java)学习笔记221:开发一个多界面的应用程序之不同界面间互相传递数据(短信助手案例)