随笔分类 - Vulnerability Analysis
摘要:无聊,顺便看下trapkit检查安全防护的工具checksec(http://www.trapkit.de/tools/checksec.html)1.检查用户权限if [ $(/usr/bin/id -u) -eq 0 ] ;2.RELRO选项支持可以使重定位使用的GOT,PLT变为readonlyhttp://blog.csdn.net/melody_lu123/article/details/6939484RELRO分为Full RELRO和Partial RELRO if readelf -l $1 2>/dev/null | grep -q 'GNU_RELRO'
阅读全文
posted @ 2012-12-29 21:38
yarpee
摘要:想让CVE-2012-4774崩溃下,然后继续调试崩溃,结果他丫就是不崩看了下,http://www.mcafee.com/us/resources/release-notes/foundstone/fsl_12_12_2012.pdfmcafee说CVE-2012-4774The flaw lies in the parsing of file names. Successful exploitation could allow an attacker to execute remote code. The exploitrequires the user to browse a file
阅读全文
posted @ 2012-12-27 21:56
yarpee
摘要:JOP采用一张分发表来保证跳转到指令地址中ROP模型相对还算简单,就是在栈上布置的返回地址与其中的指令集带ret相呼应,形成一套指令http://marcoramilli.blogspot.com/2011/12/from-rop-to-jop.html
阅读全文
posted @ 2012-12-26 10:45
yarpee
摘要:在动态加载一个DLL的时候下断点要在DLL加载结束的瞬间断下来,拦截LoadLibrary()设置条件断点比较勉强,利用"deferred breakpoint"bp <module name>!nonexist 另外使用sxe ld:[dll name] 加载某个DLL 的时候下断点的WinDBG 命令:参考:http://blog.csdn.net/wingeek/article/details/3865378
阅读全文
posted @ 2012-12-24 16:27
yarpee
摘要:Linux Kernel ELF Binary Loader Local Proof of Concepthttp://forum.eviloctal.com/thread-4414-1-1.htmlhttp://www.sudu.cn/info/html/edu/20050104/198595.html/***binfmt_elf executable file read vulnerability**gcc -O3 -fomit-frame-pointer elfdump.c -o elfdump**Copyright (c) 2004iSEC Security Research. All
阅读全文
posted @ 2012-08-04 16:36
yarpee
摘要:1.noreturn A few standard library functions, such as abort and exit, cannot return. GCC knows this automatically. Some programs define their own functions that never return. You can declare them noreturn to tell the compiler this fact. For example,void fatal () __attribute__ ((noreturn));voidfata...
阅读全文
posted @ 2012-08-02 18:38
yarpee
摘要:http://extreme.0ginr.com/blog/2012/05/0x0%E7%8E%A9%E7%8E%A9%E6%B7%B1%E4%BF%A1%E6%9C%8D%E7%BD%91%E7%9B%91/http://extreme.0ginr.com/blog/2012/05/0x1%E7%8E%A9%E7%8E%A9%E6%B7%B1%E4%BF%A1%E6%9C%8D%E7%BD%91%E7%9B%91/http://extreme.0ginr.com/blog/2012/05/0x2%E7%8E%A9%E7%8E%A9%E6%B7%B1%E4%BF%A1%E6%9C%8D%E7%
阅读全文
posted @ 2012-07-22 20:47
yarpee
摘要:Opcode CALLCPU: 8086+Type of Instruction: UserInstruction: CALL procadrPhysical form:| Near call - withing the same segment| Far call - call to another segmentE8 cw CALL rel16 ; Near call, operand specifies relative displacement to next instructionE8 cd CALL rel32 ; Near call, operand specifies rela
阅读全文
posted @ 2012-07-10 22:06
yarpee
摘要:http://blog.xen.org/index.php/2012/06/13/the-intel-sysret-privilege-escalation/ http://weibo.com/2093186395/yr9aR6RjU?type=reposthttp://pastebin.com/n0rNbfVVhttp://hi.baidu.com/yuange1975/blog/item/003e3a00f69a03a6e950cdf7.htmlIntel的x64位芯片的sysret内部实现伪码如下——if (Not in 64-Bit Mode or Syscall/Sysret not
阅读全文
posted @ 2012-07-10 13:52
yarpee
摘要:转载自http://blog.csdn.net/dajuan1989/article/details/7307671文章:Run-time Detection of Heap-based Overflows作者:William Robertson, Christopher Kruegel, Darren Mutz, and Fredrik Valeur(University of California, Santa Barbara)声明:自己的理解不一定很透彻,对于自己就当笔记,不是逐字句翻译的。仅供大家参考,若有错误或不当之处欢迎批评指正!摘要:缓冲区溢出是如今网络上最常见的攻击类型之一。虽
阅读全文
posted @ 2012-06-07 21:12
yarpee
摘要:/*This is a proof of concept of buffer overflow exploitation with DEPbypass on Windows XP Professional SP3 english updated on December 9,2009 with DEP manually set to OptOut so enabled for all processes,except the ones that are put in the exception list and this programis not.This source has been co
阅读全文
posted @ 2012-05-31 21:53
yarpee
摘要:0x04 源码解读下面以decoder_jump_header为例来说明解码部分unsigned char decoder_jump_header[] = {0xEB, 0x10, 0x5B, 0x31, 0xC9, 0x66, 0x81, 0xE9, 0xA1, 0xFE, 0x80, 0x33, 0x99, 0x43, 0xE2, 0xFA, 0xEB, 0x05, 0xE8, 0xEB, 0xFF, 0xFF, 0xFF};echo -ne "\xEB\x10\x5B\x31\xC9\x66\x81\xE9\xA1\xFE\x80\x33\x99\x43\xE2\xFA\xEB
阅读全文
posted @ 2012-05-24 17:09
yarpee
摘要:shellcode的初级变形的一点点总结,大部分搜集、翻译,少量原创0x01 病毒上重定位问题0x02 shellcode解码0x03 一个unix例子0x04 源码解读0x05 参考shellcode xor编码/解码器是一种较为初级的shellcode变形的方法,当然它从中采用的方法跟病毒上的方法有些类似0x01 病毒上重定位问题病毒上的解决重定位的方法,可以方便的用到shellcode的设计中。下面部分摘自hume的<<病毒编程技术>>在病毒技术上至少有两种方法可以解决重定位的问题:A)第一种方法就是利用上述PE文件重定位表项的特殊作用构造相应的重定位表项。在感染
阅读全文
posted @ 2012-05-23 22:02
yarpee
摘要:引子:__inline float _floor(float f){ static int _n; _asm fld f _asm fistp _n return (float)_n;}这个函数进行float转换 fld是压一个浮点数入栈 fistp是出栈。 所以这段代码其实是用来四舍五入的。如果你在8086编译器中编程,,上述指令无法运行,因为8086没有浮点处理器,需要协处理器。 FPU有8个80位的寄存器(编号0-7),使用扩展双精度格式存储操作数。当内存中的数据载入数据寄存器时,如果数据格式不是扩展双精度格式,则在载入过程中进行格式转换。8个寄存器组成一个循环堆栈,栈顶纪录保存...
阅读全文
posted @ 2012-05-23 13:36
yarpee
摘要:StackGuard:提供了两种技术来保证攻击者不能伪造canary值:"终止符"和"随机数".StackShield使用了另外一种不同的技术。它的做法是创建一个特别的堆栈用来储存函数返回地址的一份拷贝。它在受保护的函数的开头和结尾分别增加一段代码,开头处的代码用来将函数返回地址拷贝到一个特殊的表中,而结尾处的代码用来将返回地址从表中拷贝回堆栈。因此函数执行流程不会改变,将总是正确返回到主调函数中。由于没有比较堆栈中的返回地址与保存的是否相同,因此并不能得知是否发生了堆栈溢出。在最新的版本中已经增加了一些新的保护措施,当调用一个地址在非文本段内的函数指针
阅读全文
posted @ 2012-05-05 15:11
yarpee
摘要:argument_index$是一个十进制整数,用于表明要格式化第几个参数。第一个参数由 "1$" 引用,第二个参数由 "2$" 引用,依此类推。#include <stdio.h>int main(){int a = 0x123,b = 0x456,d = 0x888;printf("%2\$x",a,b,d);}moonflow@moonflow-ThinkPad-Edge:~/apuetrans$ ./format 456这个特性在格式化串漏洞中可以方便的访问到需要的内存数据把0x08064d55处的字符串读出来$&
阅读全文
posted @ 2012-04-25 09:37
yarpee
摘要:printf中的缺陷:#include <stdio.h>main(){ int a = 44,b = 77; printf("a=%d,b=%d\n",a,b); printf("a=%d,b=%d\n");}则会去读栈上存在的数据1.用printf读取内存数据#include <stdio.h>int main(int argc,char **argv){ printf(argv[1]);}可以利用格式化串漏洞读内存2.用printf向内存写数据如果能够配合上修改内存数据,就有可能引起进程劫持和shellcode植入了在格式化
阅读全文
posted @ 2012-04-22 15:28
yarpee
摘要:通常的缓冲区溢出就是通过重写堆栈中储存的EIP的内容,来使程序跳转到我们的shellcode处去执行。其实,即使缓冲区只溢出一个字节的时候,也有可能去执行我们的代码。单字节缓冲区溢出利用一个字节溢出来修改当前的ebp值,进而可以修改esp的值,通过控制esp的值来达到对eip值的控制http://www.nsfocus.net/index.php?act=magazine&do=view&mid=338http://wangcong.org/blog/archives/867http://en.wikipedia.org/wiki/Off-by-one_errorhttp://
阅读全文
posted @ 2012-03-29 17:44
yarpee
浙公网安备 33010602011771号