Android 4.0 添加了 ASLR
http://developer.android.com/sdk/android -4.0-highlights.html#DeveloperApis
老实说,ASLR主要用于避免在利用缓冲区溢出漏洞时让某些恶意代码泄漏/将有效负载放入另一个库中,
但几乎所有将在 android 上运行的代码的一部分将受到管理,因此它不应受到内存管理错误的影响
它可能对本机代码有用。 Otoh,我认为大多数使用 NDK 的程序(比如用 C 语言编写的 opengl 游戏引擎)仍然有一层 java 代码来处理用户输入等(而且我认为用户提供的文件/字符串会成为恶意代码的主要载体)
显然我在图片中遗漏了一些东西
Android 4.0 added ASLR
http://developer.android.com/sdk/android-4.0-highlights.html#DeveloperApis
Afaik, ASLR is mainly useful to avoid letting some malicious code leak/put a payload in another library when exploiting a buffer overflow vulnerability
But almost all of the code that'll run on android will be managed, so it shouldn't be affected by memory management errors
It can probably be useful for native code. Otoh, I thought that most of the programs that make use of the NDK (like opengl game engines made in C), still have a layer of java code to deal with the user input and such (and I think user supplied files/strings would be the main vector for malicious code)
Clearly I'm missing something in my picture
发布评论
评论(1)
即使您只能添加用 Java 等托管语言编写的程序,现有的 C 库仍然容易受到缓冲区溢出的影响。
例如,用于播放 mp3 的库可能是用 C 编写的,特制的 mp3 文件可能会触发缓冲区溢出并执行 shellcode。在Android中添加ASLR(地址空间布局随机化)将通过随机化一些内存地址来增加编写此类漏洞利用的难度。
Even if you can add only programs written in a managed language like Java, the existing C libraries are still vulnerables to buffer overflow.
By example, the library used to play mp3 is probably written in C and a specially crafted mp3 file could trigger a buffer overflow and execute a shellcode. Adding ASLR (Address Space Layout Randomization) in Android will increase the difficulty of writing such an exploit by randomizing some memory addresses.