用bochs调试mbr-初步调试

bochs调试过程

(0) [0x00000000fffffff0] f000:fff0 (unk. ctxt): jmp far f000:e05b         ; ea5be000f0
<bochs:1> b 0x7c00
<bochs:2> c
(0) Breakpoint 1, 0x0000000000007c00 in ?? ()
Next at t=14090316
(0) [0x0000000000007c00] 0000:7c00 (unk. ctxt): xor ax, ax                ; 33c0
<bochs:3> s
Next at t=14090317
(0) [0x0000000000007c02] 0000:7c02 (unk. ctxt): mov ss, ax                ; 8ed0
<bochs:4> s
Next at t=14090318
(0) [0x0000000000007c04] 0000:7c04 (unk. ctxt): mov sp, 0x7c00            ; bc007c
<bochs:5> s
Next at t=14090319
(0) [0x0000000000007c07] 0000:7c07 (unk. ctxt): sti                       ; fb
<bochs:6> s
Next at t=14090320
(0) [0x0000000000007c08] 0000:7c08 (unk. ctxt): push ax                   ; 50
<bochs:7> s
Next at t=14090321
(0) [0x0000000000007c09] 0000:7c09 (unk. ctxt): pop es                    ; 07
<bochs:8> s
Next at t=14090322
(0) [0x0000000000007c0a] 0000:7c0a (unk. ctxt): push ax                   ; 50
<bochs:9> s
Next at t=14090323
(0) [0x0000000000007c0b] 0000:7c0b (unk. ctxt): pop ds                    ; 1f
<bochs:10> s
Next at t=14090324
(0) [0x0000000000007c0c] 0000:7c0c (unk. ctxt): cld                       ; fc
<bochs:11> s
Next at t=14090325
(0) [0x0000000000007c0d] 0000:7c0d (unk. ctxt): mov si, 0x7c1b            ; be1b7c
<bochs:12> s
Next at t=14090326
(0) [0x0000000000007c10] 0000:7c10 (unk. ctxt): mov di, 0x061b            ; bf1b06
<bochs:13> s
Next at t=14090327
(0) [0x0000000000007c13] 0000:7c13 (unk. ctxt): push ax                   ; 50
<bochs:14> s
Next at t=14090328
(0) [0x0000000000007c14] 0000:7c14 (unk. ctxt): push di                   ; 57
<bochs:15> s
Next at t=14090329
(0) [0x0000000000007c15] 0000:7c15 (unk. ctxt): mov cx, 0x01e5            ; b9e501
<bochs:16> s
Next at t=14090330
(0) [0x0000000000007c18] 0000:7c18 (unk. ctxt): rep movsb byte ptr es:[di], byte ptr ds:[si] ; f3a4
<bochs:17> p
Next at t=14090815
(0) [0x0000000000007c1a] 0000:7c1a (unk. ctxt): retf                      ; cb
<bochs:18> p
Next at t=14090816
(0) [0x000000000000061b] 0000:061b (unk. ctxt): mov bp, 0x07be            ; bdbe07
<bochs:19> s
Next at t=14090817
(0) [0x000000000000061e] 0000:061e (unk. ctxt): mov cl, 0x04              ; b104
<bochs:20> s
Next at t=14090818
(0) [0x0000000000000620] 0000:0620 (unk. ctxt): cmp byte ptr ss:[bp], ch  ; 386e00
<bochs:21> s
Next at t=14090819
(0) [0x0000000000000623] 0000:0623 (unk. ctxt): jl .+9 (0x0000062e)       ; 7c09
<bochs:22> s
Next at t=14090820
(0) [0x000000000000062e] 0000:062e (unk. ctxt): mov si, bp                ; 8bf5
<bochs:23> s
Next at t=14090821
(0) [0x0000000000000630] 0000:0630 (unk. ctxt): add si, 0x0010            ; 83c610
<bochs:24> s
Next at t=14090822
(0) [0x0000000000000633] 0000:0633 (unk. ctxt): dec cx                    ; 49
<bochs:25> s
Next at t=14090823
(0) [0x0000000000000634] 0000:0634 (unk. ctxt): jz .+25 (0x0000064f)      ; 7419
<bochs:26> s
Next at t=14090824
(0) [0x0000000000000636] 0000:0636 (unk. ctxt): cmp byte ptr ds:[si], ch  ; 382c
<bochs:27> s
Next at t=14090825
(0) [0x0000000000000638] 0000:0638 (unk. ctxt): jz .-10 (0x00000630)      ; 74f6
<bochs:28> s
Next at t=14090826
(0) [0x0000000000000630] 0000:0630 (unk. ctxt): add si, 0x0010            ; 83c610
<bochs:29> s
Next at t=14090827
(0) [0x0000000000000633] 0000:0633 (unk. ctxt): dec cx                    ; 49
<bochs:30> s
Next at t=14090828
(0) [0x0000000000000634] 0000:0634 (unk. ctxt): jz .+25 (0x0000064f)      ; 7419
<bochs:31> s
Next at t=14090829
(0) [0x0000000000000636] 0000:0636 (unk. ctxt): cmp byte ptr ds:[si], ch  ; 382c
<bochs:32> s
Next at t=14090830
(0) [0x0000000000000638] 0000:0638 (unk. ctxt): jz .-10 (0x00000630)      ; 74f6
<bochs:33> s
Next at t=14090831
(0) [0x0000000000000630] 0000:0630 (unk. ctxt): add si, 0x0010            ; 83c610
<bochs:34> s
Next at t=14090832
(0) [0x0000000000000633] 0000:0633 (unk. ctxt): dec cx                    ; 49
<bochs:35> s
Next at t=14090833
(0) [0x0000000000000634] 0000:0634 (unk. ctxt): jz .+25 (0x0000064f)      ; 7419
<bochs:36> s
Next at t=14090834
(0) [0x0000000000000636] 0000:0636 (unk. ctxt): cmp byte ptr ds:[si], ch  ; 382c
<bochs:37> s
Next at t=14090835
(0) [0x0000000000000638] 0000:0638 (unk. ctxt): jz .-10 (0x00000630)      ; 74f6
<bochs:38> s
Next at t=14090836
(0) [0x0000000000000630] 0000:0630 (unk. ctxt): add si, 0x0010            ; 83c610
<bochs:39> s
Next at t=14090837
(0) [0x0000000000000633] 0000:0633 (unk. ctxt): dec cx                    ; 49
<bochs:40> s
Next at t=14090838
(0) [0x0000000000000634] 0000:0634 (unk. ctxt): jz .+25 (0x0000064f)      ; 7419
<bochs:41> s
Next at t=14090839
(0) [0x000000000000064f] 0000:064f (unk. ctxt): mov byte ptr ss:[bp+16], cl ; 884e10
<bochs:42> s
Next at t=14090840
(0) [0x0000000000000652] 0000:0652 (unk. ctxt): call .+70 (0x0000069b)    ; e84600
<bochs:43> p
Next at t=14092545
(0) [0x0000000000000655] 0000:0655 (unk. ctxt): jnb .+42 (0x00000681)     ; 732a
<bochs:44> s
Next at t=14092546
(0) [0x0000000000000681] 0000:0681 (unk. ctxt): cmp word ptr ds:0x7dfe, 0xaa55 ; 813efe7d55aa
<bochs:45> s
Next at t=14092547
(0) [0x0000000000000687] 0000:0687 (unk. ctxt): jz .+11 (0x00000694)      ; 740b
<bochs:46> s
Next at t=14092548
(0) [0x0000000000000694] 0000:0694 (unk. ctxt): mov di, sp                ; 8bfc
<bochs:47> s
Next at t=14092549
(0) [0x0000000000000696] 0000:0696 (unk. ctxt): push ds                   ; 1e
<bochs:48> s
Next at t=14092550
(0) [0x0000000000000697] 0000:0697 (unk. ctxt): push di                   ; 57
<bochs:49> s
Next at t=14092551
(0) [0x0000000000000698] 0000:0698 (unk. ctxt): mov si, bp                ; 8bf5
<bochs:50> s
Next at t=14092552
(0) [0x000000000000069a] 0000:069a (unk. ctxt): retf                      ; cb

里面有个call我直接跳过了,试着跟进去看了一下,实在是看不懂,而且代码和ida分析的完全不一样,放弃放弃,直接跳过,大体的思路还是出来了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值