首页
社区
课程
招聘
[翻譯]WINDOWS 中的 SHELLCODE 定位與緩衝區溢出
发表于: 2008-8-6 18:34 12369

[翻譯]WINDOWS 中的 SHELLCODE 定位與緩衝區溢出

2008-8-6 18:34
12369
原文:http://www.milw0rm.com/papers/205


目錄

介紹 ------------------------------------------------------------------------------- 01
SHELLCODE 基礎 --------------------------------------------------------------- 03
一個有弱點的 C 程式 ----------------------------------------------------------- 05
手法一 ---------------------------------------------------------------------------- 06
手法二 ---------------------------------------------------------------------------- 08
手法三 ---------------------------------------------------------------------------- 11
結論 ------------------------------------------------------------------------------- 14
銘謝 ------------------------------------------------------------------------------- 14

Introduction
介紹

This is not just another paper describing basics of buffer overflows. There are lots of publications about this topic; therefore it does not make any sense to describe it again. If you are familiar with exploiting buffer overflows on Windows platform, do not think that this article has nothing to offer you in this article. It shows some interesting methods, which can be used during writing an exploit (for example: where to put shellcode when stack is non-executable). Basic knowledge of x86 processors, Assembly and C languages and buffer overflows exploitation are required.
這並非另一篇描述溢出基礎的文章。 對於這個課題已存在眾多公開文件;因此該處沒必要老調重彈。 假如熟悉 Windows 平台下溢出技術的人,也別認為該文對妳毫無助益。 文中將示範於撰寫攻擊程式(exploit)期間數種會被使用的有趣手法(例如:當堆疊不可執行代碼時,應放置 Shellcode 之處)。 至於對 x86 微處理器、組合語言、C 語言與緩衝溢出原理的認知為最低需求。

Acquiring the ability to overflow a buffer on the stack, gives us through the obtaining full control over the EIP register of x86 Processor. Yep!!! This is great!!! We can load this register with arbitrary address every address we want , and then force a vulnerable program to jump there and to and execute code that is at that address.
透過完全掌握 x86 微處理機中的 EIP 暫存器,就有進行堆疊溢出的能力。 吔~這很棒! 我們可以載入任意位址的內容到記憶體中,然後強迫有弱點的程式碼跳躍至該位址執行構造的代碼。

Theoretically, we could implement in which aforementioned. But the problem occurred when we want to execute the code, in which WE want to be executed and not the code, which we desired is not actual in the memory. To achieve it, we have got to place OUR code in the memory of process we are attacked. This code is known as shellcode and it consists of a set of instructions for processor, additionally encoded in their hex values.
理論上可以實現上文所提及的方法,但是問題發生於當我們要執行的代碼並非真得存在記憶體中。 想逆轉致勝,就得把構造的代碼放入欲攻擊行程的記憶體中。 該代碼稱作 shellcode 其中包含一組微處理器的指令集,此外以十六進制編碼表示。

In this paper, I will discuss three possible locations in memory, where we can put our shellcode and then, how to force the vulnerable application to execute it. During this tutorial we will be using two shellcodes, of which are different sizes.
於該篇章中,筆者將探討三種可能放置 shellcode 的記憶體位置,然後強迫有弱點的應用程式去執行。 於本次教學,筆者將使用兩個大小相異的 shellcode 程式碼。
打包回家:http://www.box.net/shared/bbe8sl8a7d
線上閱讀:http://www.scribd.com/doc/4640271/Windows-SHELLCODE-

NOTE: Please,excuse my poor English, it's not my mother language.
作者:英文非我母語,請原諒我的爛文法與拼錯字。

譯者:於非母語人士的前提之下,該文作者的寫作功力,實在令小弟非常「吐血」,該文充斥不少容易讓人誤解的地方:冗餘修辭、文法誤用與拼字錯誤,幸好我堅持到最後,才有這篇翻譯!

小抱怨:There are tons of abusive and redundant words in this article which I almost couldn’t bear.-_-|||

P.S. 本翻譯中刪除線(黑色底線)為譯者屏棄,而紅色部份為譯者修正,以利對翻譯內容行交互參考。

P.S. 另外拜託 zha0 的網友行行好,別把我的翻譯老往 zha0 的 MSN 上面貼,這樣我在 #chroot 會很尷尬的!

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (19)
雪    币: 207
活跃值: (10)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
2
学这个好,
偶英文不好
2008-8-8 18:23
0
雪    币: 134
活跃值: (10)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
3
非常抱歉,讓各位大大等這麼久,小弟之前忘記修改貼子內容,現在補上下載網址!
2008-8-9 20:26
0
雪    币: 157
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
兄弟一看就是海外人士,看你们的繁体字,还不如看英文来的简洁
2008-8-9 22:50
0
雪    币: 134
活跃值: (10)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
5
畢竟這裡是「外文翻譯區」,小弟我總不能丟沒半個中文的文件上來吧?如果覺得繁體中文太過複雜,那麼可以自己動手轉碼,不會花妳幾分鐘時間的!
2008-8-9 22:57
0
雪    币: 207
活跃值: (10)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
6
其實簡繁體都差不多。
偶不知道怎麼就學會了簡體,

方便是皇道.
____________
备份
上传的附件:
2008-8-10 16:29
0
雪    币: 210
活跃值: (13)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
hehe.還好了。我覺得看繁體也還好啊。
倒是樓主要看簡體,可是有點難哦。
2008-8-11 20:53
0
雪    币: 134
活跃值: (10)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
8
此話怎麼講?我也買不少大陸的計算機圖書,誰說要我看簡體很難的?
2008-8-11 21:08
0
雪    币: 157
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
9
呵呵,还是我们国内好呀
2008-8-11 21:41
0
雪    币: 134
活跃值: (10)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
10
嘿嘿~小弟我只看內容,不論國籍的!
2008-8-11 22:16
0
雪    币: 134
活跃值: (10)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
11
看來這位兄臺是香港或者也是台灣來的囉?
2008-8-11 22:17
0
雪    币: 207
活跃值: (10)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
12
香港人。
2008-8-14 14:24
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
13
谢谢lz
ps:
没有必要去讨论简繁的问题吧
都一样的看
2008-8-14 19:18
0
雪    币: 134
活跃值: (10)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
14
很贊同這位兄弟的話:

技術的本質是不論語言與國籍的,因此為了獲得更多方面的知識,而閱讀以該類語言或文字書寫的文章或者論文是非常值得的!

P.S. 小弟的第三篇翻譯快上了!歡迎舊雨新知,多加支持!
2008-8-15 01:13
0
雪    币: 846
活跃值: (221)
能力值: (RANK:570 )
在线值:
发帖
回帖
粉丝
15
感谢翻译~~~~
2008-8-30 01:21
0
雪    币: 2368
活跃值: (81)
能力值: (RANK:300 )
在线值:
发帖
回帖
粉丝
16
这句话有待商榷!呵呵!
2008-9-17 10:23
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
17
好资料,真是收益良多
2008-9-29 21:36
0
雪    币: 224
活跃值: (10)
能力值: ( LV6,RANK:90 )
在线值:
发帖
回帖
粉丝
18
路过 辛苦了  lz
2008-11-20 21:01
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
19
............
要是简体的就最好了
嘿嘿
Thank you !
2008-12-3 15:41
0
雪    币: 187
活跃值: (119)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
20
谢谢。我正在研读。
2008-12-3 21:52
0
游客
登录 | 注册 方可回帖
返回
//