12.07.2015 Views

Bug Hunter Diary

Bug Hunter Diary

Bug Hunter Diary

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

I then started the Mac OS X target system, enabled remote kerneldebugging, and rebooted the system so that the changes could takeeffect: 3osx$ sudo nvram boot-args="debug=0x14e"osx$ sudo rebootAfter the Mac OS X target machine had restarted, I booted theLinux host and made sure that I could connect to the target machine:linux$ ping -c1 10.0.0.2PING 10.0.0.2 (10.0.0.2) from 10.0.0.3 : 56(84) bytes of data.64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.08 ms--- 10.0.0.2 ping statistics ---1 packets transmitted, 1 received, 0% loss, time 0msrtt min/avg/max/mdev = 1.082/1.082/1.082/0.000 mslinux$ su -Password:I added a permanent ARP entry for the target on the Linuxsystem to establish a robust connection between the two machines,ensuring that the connection wouldn’t be dropped while the kernelof the target machine was being debugged:linux# arp -an? (10.0.0.1) at 00:24:E8:A8:64:DA [ether] on eth0? (10.0.0.2) at 00:17:F2:F0:47:19 [ether] on eth0linux# arp -s 10.0.0.2 00:17:F2:F0:47:19linux# arp -an? (10.0.0.1) at 00:24:E8:A8:64:DA [ether] on eth0? (10.0.0.2) at 00:17:F2:F0:47:19 [ether] PERM on eth0I then logged in to the Mac OS X system as an unprivileged userand generated a nonmaskable interrupt (NMI) by tapping the system’spower button. That gave me the following output on the screenof the MacBook:Debugger called: Debugger called: cpu_interrupt: sending enter debugger signal (00000002) to cpu 1ethernet MAC address: 00:17:f2:f0:47:19ethernet MAC address: 00:17:f2:f0:47:19ip address: 10.0.0.2ip address: 10.0.0.2Waiting for remote debugger connection.122 Chapter 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!