linux(x86) exploit 开发系列2:整数溢出

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux(x86) exploit 开发系列2:整数溢出相关的知识,希望对你有一定的参考价值。

What is Integer Overflow?

Storing a value greater than maximum supported value is called integer overflow. Integer overflow on its own doesnt lead to arbitrary code execution, but an integer overflow might lead to stack overflow or heap overflow which could result in arbitrary code execution.

 

Data types size and its range:

datatype    size    unsigned_range             signed_range

char             1            0到255                         -128到127

short           2            0到65535                   -32768到32767

int               4        0到4294967296       -2147483648到2147483647

 

Integer underflow

Similarly storing a value lesser than the minimum supported value is called integer underflow. For example when we try to store -2147483649 to signed int data type, its gets wrapped around and stored as 21471483647. This is called integer underflow.

 

strlen()’s return type is size_t (unsigned int)

以上是关于linux(x86) exploit 开发系列2:整数溢出的主要内容,如果未能解决你的问题,请参考以下文章

linux(x86) exploit 开发系列4:使用return2libc绕过NX

SploitFun Linux x86 Exploit 开发系列教程

linux(x86) exploit 开发系列6:使用return-to-plt绕过ASLR

linux(x86) exploit 开发系列5:使用ret2libc链绕过NX

Linux (x86) Exploit 开发系列教程之六(绕过ASLR - 第一部分)

Linux (x86) Exploit系列之三 Off-By-One 漏洞 (基于栈)