亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? introduction to buffer overflow.htm

?? a collection of mega hacking tools
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<!-- saved from url=(0022)http://internet.e-mail -->

<html>
<head>
      <title>Buffer Overflow</title>
<style type=text/css>A:active {
	TEXT-DECORATION: none
}
A:hover {
	TEXT-DECORATION: underline
}
A:link {
	TEXT-DECORATION: none
}
A:visited {
	TEXT-DECORATION: none
}
</style>
</head>
<body text="#000000" bgcolor="#FFFFFF">

<center><table BORDER=0 CELLSPACING=2 CELLPADDING=2 WIDTH="308" >
<caption><TBODY>
<br></TBODY></caption>

<tr>
<td>
<pre><font color="#FF0000">.</font><font color="#000000">########</font><font color="#FF0000">...</font>######<font color="#FF0000">..</font>########<font color="#FF0000">..</font>########
<font color="#FF0000">.</font>##<font color="#FF0000">.....</font>##<font color="#FF0000">.</font>##<font color="#FF0000">....</font>##<font color="#FF0000">.</font>##<font color="#FF0000">.....</font>##<font color="#FF0000">.</font>##<font color="#FF0000">......
.</font>##<font color="#FF0000">.....</font>##<font color="#FF0000">.</font>##<font color="#FF0000">.......</font>##<font color="#FF0000">.....</font>##<font color="#FF0000">.</font>##<font color="#FF0000">......
.</font>########<font color="#FF0000">...</font>######<font color="#FF0000">..</font>########<font color="#FF0000">..</font>######<font color="#FF0000">..
.</font>##<font color="#FF0000">.....</font>##<font color="#FF0000">.......</font>##<font color="#FF0000">.</font>##<font color="#FF0000">...</font>##<font color="#FF0000">...</font>##<font color="#FF0000">......
.</font>##<font color="#FF0000">.....</font>##<font color="#FF0000">.</font>##<font color="#FF0000">....</font>##<font color="#FF0000">.</font>##<font color="#FF0000">....</font>##<font color="#FF0000">..</font>##<font color="#FF0000">......
.</font>########<font color="#FF0000">...</font>######<font color="#FF0000">..</font>##<font color="#FF0000">.....</font>##<font color="#FF0000">.</font>##<font color="#FF0000">......</font></pre>
</td>
</tr>
</table></center>

<center>
<p><a href="http://blacksun.box.sk/" target="_blank">http://blacksun.box.sk/</a><br>
<a href="http://uc.zemos.net/">Unix Clan</a>

<br>Lecturer: <a href="mailto:ghostrider@box.sk">Ghost_Rider</a>
<br>Tutorial: Buffer overflow
<br>Converter: <a href="mailto:DKsk8er166@hotmail.com">DKsk8</a>
</center>
<hr>
<center>
Introduction to Buffer Overflow by Ghost_Rider
</center>
<hr>
<br>
<br>
<hr width="50%">
<center>
Intro
</center>
<hr width="50%">
<br>
<p>Hello, here I am again, this time I'll let you know  what is in fact
buffer overflow and how you can detect if some program is vulnerable to buffer
overflow exploits.  This tutorial has C source code, so if you don't know C
you can have some problems in this tutorial, you also need to have some
notions on ASM and how to use gdb.</p>
<p>I tried to do the easiest I could, but still this tutorial isn't one
of those where you really don't know shit about nothing and when you end it
you know all this. This one takes some work to understand, hey it took huge
work to write!</p>
<p>A little inside note, like everyone that is reading this lines I like to
learn, so some weeks ago I said to myself "Hey what the heck, why not to start
reading some texts about buffer overflows, I know how everything work but
just superficially", so I just started learning and now I'm trying to pass the
knowledge that I gained, to everyone that is interested. So this won't be one
of those texts where you'll learn everything, this will be like a walkthrough,
like the title says an Introduction, (In the end I'll give you some nice texts).
If you have any questions concerning this tutorial post in our message board,
if you find any "bug" in this tutorial please email me and I'll correct it.
Enjoy.</p>
<br>
<br>
<br>
<hr width="50%">
<center>
Exploit?
</center>
<hr width="50%">
<br>

  <p>Well probably everyone knows what an exploit is. But you still got to see
that the ones that are entering the security world for the first time
probably don't have the idea of what that is, that's why I wrote this tinny
section.</p>
  <p>So for the ones that don't know an exploit is a program, usually written in
C, that exploits some problem that another program have. The exploit will allow
you to run arbitrary code that will let you do something that you shouldn't be
able to do in your normal status on the system.</p>
  <p>Nowadays, most of the exploits are what we call Buffer Overflow Exploits.
What's that you ask. Wait because we'll get there. After all, this is the
subject of this tutorial.</p>
  <p>Another thing you should know is that everyone knows how to use them(how do
you think that most of the websites that are defaced?), the script kiddies
just go to sites like security focus, packetstorm or fyodor's exploit world,
download it and run it, and then got busted. But why doesn't everybody write
exploits? Well the problem is that many people doesn't know how to spot some
vulnerability in the source code, or even if they can they aren't able to
write a exploit. So now that you have an idea of what an exploit is, let's
go ahead to the
buffer overflow section.</p>

<hr width="50%">
<center>
Buffer Overflow after all what's that?
</center>
<hr width="50%>


  <p>Like I said before most of the exploits are Buffer Overflow exploits.
  You are probably now thinking "Bah..this guy is bullshiting around, but
still didn't said what buffer overflow is". So let's just talk about it.</p>
  <p>A buffer overflow problem is based in the memory where the program stores
it's data. Why's that, you ask. Well because what buffer overflow do is
overwrite expecific memory places where should be something you want, that
will make the program do something that you want.</p>
  <p>Well some of you right now are thinking "WOW, I know how buffer overflow
works", but you still don't know how to spot them.</p>

  <p>Let's follow a program and try to find and fix the buffer overflow</p>
<br>
<br>
<center>
<br>------ Partial code below--------
<br>
<br>   main(int argc, char **argv) {
<br>
<br>      char *somevar;
<br>      char *important;
<br>
<br>      somevar = (char *)malloc(sizeof(char)*4);
<br>      important = (char *)malloc(sizeof(char)*14);
<br>
<br>      strcpy(important, "command");  /*This one is the important
<br>                                              variable*/
<br>      stcrpy(somevar, argv[1]);
<br>
<br>
<br>      ..... Code here ....
<br>
<br>  }
<br>
<br>....  Other functions here ....
<br>
<br>------- End Of Partial Code ------
</center>
<br>
<br>
<p>So let's say that important variable stores some system command like, let's
say "chmod o-r file", and since that file is owned by root the program is run
under root user too, this means that if you can send commands to it, you can
execute ANY system command. So you start thinking. How the hell can I put
something that I want in the important variable. Well the way is to overflow
the memory so we can reach it. But let's see variables memory addresses.
To do that you need to re-written the code. Check the following code.</p>
<br>
<br>
<center>
<br>--------- Partial Code ------------
<br>
<br>main (int argc, char **argv) {
<br>
<br>
<br>   char *somevar;
<br>   char *important;
<br>
<br>   somevar=(char *)malloc(sizeof(char)*4);
<br>   important=(char *)malloc(sizeof(char)*14);
<br>
<br>   printf("%p\n%p", somevar, important);
<br>   exit(0);
<br>
<br>   rest of code here
<br>
<br>}
<br>
<br>--------- End of Partial Code --------
</center>
<br>
<br>
<p>Well we added 2 lines in the source code and left the rest unchanged. Let's
see what does two lines do.</p>
<p>The printf("%p\n%p", somevar, important); line will print the memory
addresses for somevar and important variables. The exit(0); will just keep the
rest of the program running after all you don't want it for nothing, your goal
was to know where is the variables are stored.</p>
  <p>After running the program you would get an output like, you will probably
not get the same memory addresses:<p>
<br>
<center>
<br>
<br>        0x8049700      <----- This is the address of somevar
<br>        0x8049710       <----- This is the address of important
</center>
<p>As we can see, the important variable is next somevar, this will let us use
our buffer overflow skills, since somevar is got from argv[1]. Now, we know
that one follow the other, but let's check each memory address so we can have
the precise notion of the data storage. To do this let's re-write the code
again.</p>
<br>
<br>
<center>
<br>-------- Partial code ---------
<br>
<br>main(int argc, char **argv) {
<br>
<br>   char *somevar;
<br>   char *important;
<br>   char *temp; /* will need another variable */
<br>
<br>
<br>   somevar=(char *)malloc(sizeof(char)*4);
<br>   important=(char *)malloc(sizeof(char)*14);
<br>
<br>   strcpy(important, "command");  /*This one is the important
<br>                                              variable*/
<br>   stcrpy(str, argv[1]);
<br>
<br>
<br>
<br>   printf("%p\n%p\n", somevar, important);
<br>   printf("Starting To Print memory address:\n");
<br>
<br>   temp = somevar; /* this will put temp at the first memory address we want
<br>*/
<br>      while(temp < important + 14) {
<br>
<br>      /* this loop will be broken when we get to the last memory address we
<br>         want, last memory address of important variable */
<br>
<br>         printf("%p: %c (0x%x)\n", temp, *temp, *(unsigned int*)temp);
<br>         temp++;
<br>
<br>      }
<br>
<br>     exit(0);
<br>
<br>     rest of code here
<br>}
<br>------ End Of partial Code ------
</center>
<br>
<br>
<p>Now let's say that the argv[1] should be in normal use send. So you just type
in your prompt:</p>
<br>
<center>
$ program_name send
</center>
<br>
<p>You'll get an output like:</p>
<br>
<center>
<br>0x8049700
<br>0x8049710
</center>
<br>
<p>Starting To Print memory address:</p>
<br>
<center>
<br>0x8049700: s (0x616c62)
<br>0x8049701: e (0x616c)
<br>0x8049702: n (0x61)    <---- each of this lines represent a memory address
<br>0x8049703: d (0x0)
<br>0x8049704:  (0x0)
<br>0x8049705:  (0x0)
<br>0x8049706:  (0x0)
<br>0x8049707:  (0x0)
<br>0x8049708:  (0x0)
<br>0x8049709:  (0x19000000)
<br>0x804970a:  (0x190000)
<br>0x804970b:  (0x1900)
<br>0x804970c:  (0x19)
<br>0x804970d:  (0x63000000)
<br>0x804970e:  (0x6f630000)
<br>0x804970f:  (0x6d6f6300)
<br>0x8049710: c (0x6d6d6f63)
<br>0x8049711: o (0x616d6d6f)
<br>0x8049712: m (0x6e616d6d)
<br>0x8049713: m (0x646e616d)
<br>0x8049714: a (0x646e61)
<br>0x8049715: n (0x646e)
<br>0x8049716: d (0x64)
<br>0x8049717:  (0x0)
<br>0x8049718:  (0x0)
<br>0x8049719:  (0x0)
<br>0x804971a:  (0x0)
<br>0x804971b:  (0x0)
<br>0x804971c:  (0x0)
<br>0x804971d:  (0x0)
<br>$
</center>
<br>
<p>Nice isn't it? You can now see that there exist 12 memory address empty
between somevar and important. So let's say that you run the program with a
command line like:</p>
<br>
<center>
$ program_name send------------newcommand
</center>
<br>
<p>You'll get an output like:</p>
<br>
<center>
<br>0x8049700
<br>0x8049710
<br>Starting To Print memory address:
<br>0x8049700: s (0x646e6573)
<br>0x8049701: e (0x2d646e65)
<br>0x8049702: n (0x2d2d646e)
<br>0x8049703: d (0x2d2d2d64)
<br>0x8049704: - (0x2d2d2d2d)
<br>0x8049705: - (0x2d2d2d2d)
<br>0x8049706: - (0x2d2d2d2d)
<br>0x8049707: - (0x2d2d2d2d)
<br>0x8049708: - (0x2d2d2d2d)
<br>0x8049709: - (0x2d2d2d2d)
<br>0x804970a: - (0x2d2d2d2d)
<br>0x804970b: - (0x2d2d2d2d)
<br>0x804970c: - (0x2d2d2d2d)
<br>0x804970d: - (0x6e2d2d2d)
<br>0x804970e: - (0x656e2d2d)
<br>0x804970f: - (0x77656e2d)
<br>0x8049710: n (0x6377656e) <--- memory address where important variable starts
<br>0x8049711: e (0x6f637765)
<br>0x8049712: w (0x6d6f6377)
<br>0x8049713: c (0x6d6d6f63)
<br>0x8049714: o (0x616d6d6f)
<br>0x8049715: m (0x6e616d6d)
<br>0x8049716: m (0x646e616d)
<br>0x8049717: a (0x646e61)
<br>0x8049718: n (0x646e)
<br>0x8049719: d (0x64)
<br>0x804971a:  (0x0)
<br>0x804971b:  (0x0)
<br>0x804971c:  (0x0)
<br>0x804971d:  (0x0)
</center>
<br>
<p>Hey cool, newcommand got over command. Now it does something you want,
instead of something he was supposed to do.</p>

<center>
<b>NOTE: Remember sometimes those spaces between somevar and
important can have other variables instead of being empty, so check their
values and send them to the same address, or the program can crash before
getting to the variable that you modified.</b>
<center>

<p> Now let's think a little. Why does this happen? As you can see in the source
code somevar is declared before important, this will make, most of the times,
that somevar will be first in memory. Now, let's check how each one is got.
Somevar gets it's value from argv[1], and important gets it from strcpy()
function, but the real problem is that important value is assign first so when
you assign value to somevar that is before it important can be overwritten.
This program could be patched against this buffer overflow switching those two
lines, becoming :</p>
<br>
<center>
<br>strcpy(somevar, argv[1]);
<br>strcpy(important, "command");
</center>
<br>
<p>If this was the way that the program was done even if you give an argument
that would get into the memory address of important, it will be overwritten by
the true command, since after getting somevar, is assign the value command to
important.<p>

<p> This kind of buffer overflow, is a heap buffer overflow. Like you probably
has seen they are really easy to do in theory but, in the real world, it's not
really easy to do them, after all the example I gave was a really dumb
program right? It's a real pain in the ass to find those important
variables, and also to overflow that variable you need to be able to write to
one that is in a lower memory address, most of times all this conditions
doesn't get together, that's why we are now gonna talk about stack buffer
overflows.<p>


<center>
<b>Just a little inside note:
In the last paragraph I talked about heap and stack. You probably be
wondering what each one is. So here's a brief and easy of understanding
definition of each one:</b>
</center>
<br>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产一区视频在线观看| 欧美色欧美亚洲另类二区| 日韩欧美123| 免费成人av在线播放| 欧美疯狂做受xxxx富婆| 亚洲第一综合色| 欧美理论片在线| 美国欧美日韩国产在线播放| 日韩视频永久免费| 国产一区二区三区综合| 国产亚洲精品中文字幕| 国产成人av一区二区三区在线 | 欧美国产成人在线| 99这里只有精品| 亚洲第一综合色| 精品国偷自产国产一区| 成人毛片视频在线观看| 一区二区三区资源| 日韩一区国产二区欧美三区| 国产精品影视在线| 亚洲欧美日韩中文播放| 欧美高清视频一二三区| 国产盗摄视频一区二区三区| 日韩一区中文字幕| 欧美一区二视频| 床上的激情91.| 日日摸夜夜添夜夜添亚洲女人| 久久精品一区二区三区不卡| 在线精品视频小说1| 精品一区二区免费在线观看| 中文字幕亚洲一区二区va在线| 欧美高清性hdvideosex| 成人v精品蜜桃久久一区| 亚洲 欧美综合在线网络| 久久久久久97三级| 欧美日韩黄色影视| 成人做爰69片免费看网站| 午夜精品在线看| 国产精品美女久久久久久久久久久| 欧美亚洲高清一区| 成人一区二区三区视频在线观看| 午夜视频在线观看一区二区| 欧美激情一区二区三区蜜桃视频| 欧美亚洲动漫另类| 成人黄色在线网站| 美女高潮久久久| 亚洲在线免费播放| 久久精品一区二区| 日韩一区二区在线观看视频播放| 91日韩一区二区三区| 激情另类小说区图片区视频区| 亚洲va欧美va人人爽午夜| 国产精品福利一区二区| 亚洲精品一区二区三区四区高清| 欧美日韩另类一区| 色欧美日韩亚洲| 成人国产精品免费观看| 麻豆精品视频在线观看视频| 午夜一区二区三区视频| 成人免费一区二区三区视频 | 蜜臀va亚洲va欧美va天堂| 亚洲精品国产a久久久久久| 国产欧美精品一区二区色综合朱莉| 日韩一区二区免费电影| 欧美色图在线观看| 日本国产一区二区| 一本久久综合亚洲鲁鲁五月天 | 久久99久国产精品黄毛片色诱| 亚洲精品视频免费看| 国产精品美日韩| 国产视频一区二区在线| 久久久久综合网| 欧美精品一区二区三| 精品国免费一区二区三区| 日韩一区二区三区视频在线观看| 在线免费观看日本一区| 在线观看中文字幕不卡| 色欧美片视频在线观看| 日本乱人伦aⅴ精品| 91视频一区二区| 91麻豆高清视频| 一本久久a久久精品亚洲| 97超碰欧美中文字幕| 9久草视频在线视频精品| 91在线视频免费91| 91麻豆产精品久久久久久| 99久久国产综合精品色伊| 99精品国产视频| 91免费视频观看| 欧美在线色视频| 欧美日韩视频第一区| 4438成人网| 精品国产一区二区国模嫣然| 亚洲精品一区在线观看| 久久精品欧美一区二区三区不卡 | 欧美一级二级在线观看| 欧美一级黄色大片| 久久久久国产精品麻豆ai换脸| 中国色在线观看另类| 亚洲精品国产品国语在线app| 午夜免费欧美电影| 麻豆精品国产传媒mv男同| 国产iv一区二区三区| 91视频在线看| 91精品中文字幕一区二区三区| 日韩精品一区二区三区视频播放| 久久综合五月天婷婷伊人| 国产精品乱码一区二区三区软件 | 日韩码欧中文字| 亚洲一区二区在线观看视频 | 视频一区中文字幕| 国产一区二区三区美女| av不卡在线观看| 91精品国产综合久久福利| 欧美精品一区二区三区四区| 成人欧美一区二区三区小说 | 久久精品99久久久| 成人爱爱电影网址| 91麻豆精品国产| 日本一区二区成人在线| 综合激情成人伊人| 久久国产婷婷国产香蕉| 99久久国产综合精品麻豆| 在线成人小视频| 国产精品久久久久久久第一福利 | 成人性视频网站| 欧美另类久久久品| 国产精品日产欧美久久久久| 亚洲成人手机在线| av日韩在线网站| 亚洲精品在线免费播放| 亚洲精品一二三区| 国产·精品毛片| 91精品国产综合久久精品app| 欧美极品美女视频| 日本欧美韩国一区三区| 91蜜桃传媒精品久久久一区二区| 日韩欧美亚洲另类制服综合在线| 一区二区在线看| 国产精品白丝jk白祙喷水网站| 欧美日韩在线观看一区二区 | 欧美肥妇bbw| 亚洲激情综合网| 不卡视频在线看| 精品久久久久久久人人人人传媒| 夜夜操天天操亚洲| 不卡电影免费在线播放一区| 精品国产伦理网| 日本不卡视频在线| 欧美三级日本三级少妇99| 日韩码欧中文字| 成人a免费在线看| 国产日韩欧美高清在线| 国产在线日韩欧美| 91精品视频网| 丝袜美腿亚洲综合| 欧美日韩国产另类一区| 夜夜嗨av一区二区三区中文字幕| 91小视频在线免费看| 国产精品二区一区二区aⅴ污介绍| 国产乱对白刺激视频不卡| 精品久久久久久久久久久久久久久久久 | 成人在线综合网| 国产欧美在线观看一区| 久久av老司机精品网站导航| 欧美二区三区91| 天堂av在线一区| 在线播放视频一区| 青青草成人在线观看| 欧美精品久久久久久久久老牛影院 | 亚洲一线二线三线久久久| 色综合一区二区| 亚洲色图在线播放| 91一区在线观看| 一区二区三区四区在线| 色婷婷av一区二区三区之一色屋| 亚洲人成在线播放网站岛国| 色999日韩国产欧美一区二区| 亚洲婷婷在线视频| 色国产精品一区在线观看| 亚洲精品v日韩精品| 欧美日韩在线精品一区二区三区激情| 亚洲一区二区3| 欧美一区二区视频在线观看2022| 麻豆精品久久精品色综合| 久久美女艺术照精彩视频福利播放| 国产精品99久久久久久似苏梦涵 | 久久久久综合网| av电影天堂一区二区在线| 亚洲黄色性网站| 欧美日本精品一区二区三区| 免费人成黄页网站在线一区二区 | 91精品国产综合久久精品 | 免费xxxx性欧美18vr| 精品国产一区二区在线观看| 国产精品 日产精品 欧美精品| 国产精品乱码一区二区三区软件| 色狠狠综合天天综合综合| 日本午夜精品一区二区三区电影 | 91丝袜国产在线播放|