I have set a breakpoint at a specific address with this command: break *0x080488CA
but it is not stopping. I have a breakpoint set previously to this one and it works fine, but when running in gdb with run group3
, and continuing after the 1st breakpoint, it skips over this second one. Any idea as to why this would happen? Below is the picture, with the line highlighted which I am attempting to break at:
The entire source file can be downloaded here: https://drive.google.com/open?id=1iLS8vhbPIHCmOqTjidFFUIkYq4_7WuEZ
Here is the code where ptrace is called:
.text:0804889D
.text:0804889D loc_804889D: ; CODE XREF: check+158↑j
.text:0804889D call _getppid
.text:080488A2 mov [ebp+var_C], eax
.text:080488A5 mov dword ptr [esp+0Ch], 0
.text:080488AD mov dword ptr [esp+8], 0
.text:080488B5 mov eax, [ebp+var_C]
.text:080488B8 mov [esp+4], eax
.text:080488BC mov dword ptr [esp], 10h ; request
.text:080488C3 call _ptrace
.text:080488C8 test eax, eax
.text:080488CA jns short loc_80488E4
.text:080488CC mov dword ptr [esp], offset aYouFoolNobodyD ; "[-] You fool, nobody debug me!!!"
.text:080488D3 call _puts
.text:080488D8 mov dword ptr [esp], 0FFFFFFFFh ; status
.text:080488DF call _exit
.text:080488E4
.text:080488E4 loc_80488E4: ; CODE XREF: check+195↑j
.text:080488E4 mov dword ptr [esp], 1 ; seconds
.text:080488EB call _sleep
.text:080488F0 mov dword ptr [esp+0Ch], 0
.text:080488F8 mov dword ptr [esp+8], 0
.text:08048900 mov eax, [ebp+var_C]
.text:08048903 mov [esp+4], eax
.text:08048907 mov dword ptr [esp], 11h ; request
.text:0804890E call _ptrace
.text:08048913 mov dword ptr [esp], 0 ; status
.text:0804891A call _exit
.text:0804891A check endp ; sp-analysis failed
.text:0804891A
.text:0804891F
.text:0804891F ; =============== S U B R O U T I N E =======================================
Successful breakpoint at 08048859:
.text:0804882A loc_804882A: ; CODE XREF: check+DD↑j
.text:0804882A mov eax, [ebp+var_14]
.text:0804882D cmp eax, 32h
.text:08048830 jbe short loc_8048814
.text:08048832 mov dword ptr [esp+4], offset modes ; "r"
.text:0804883A lea eax, [ebp+command]
.text:0804883D mov [esp], eax ; command
.text:08048840 call _popen
.text:08048845 mov [ebp+stream], eax
.text:08048848 cmp [ebp+stream], 0
.text:0804884C jz short loc_8048876
.text:0804884E mov eax, [ebp+stream]
.text:08048851 mov [esp], eax ; stream
.text:08048854 call _fgetc
.text:08048859 cmp eax, 0FFFFFFFFh
.text:0804885C jz short loc_8048876
.text:0804885E mov dword ptr [esp], offset aNoVmPlease ; "[-] No vm please ;)"
.text:08048865 call _puts
.text:0804886A mov dword ptr [esp], 0FFFFFFFFh ; status
.text:08048871 call _exit