簡體   English   中英

GDB的find函數無法找到模式的所有出現

[英]GDB's find function doesn't find all occurences of the pattern

我正在嘗試使用GDB的find函數在正在調試的程序中搜索所有出現的0xE4FF 在下面的內容中,我的搜索找到了兩種模式,然后繼續進行驗證:

(gdb) find 0x8048000, 0x888a000, 0xE4FF
0x8142c63
0x8848fa4
2 patterns found.
(gdb) x/2bx 0x08142c63
0x8142c63:  0xff        0xe4
(gdb) x/2bx 0x08848fa4
0x8848fa4:  0xff        0xe4

在我關注的教程中,作者使用EDB並確定了該地址0x08134597 ,該地址屬於我給GDB的搜索范圍。 快速檢查確認此地址符合我正在搜索的模式,但GDB並未報告該地址:

(gdb) x/2bx 0x08134597
0x8134597:  0xff        0xe4

我試圖理解為什么GDB沒有報告包含我正在搜索的模式的這個(和其他幾個)有效地址。 有沒有可以用來確保GDB報告所有這些地址的選項。

(注意:這是為了開發漏洞,我有目的地避免使用GDB-PEDA(非常棒)和Metasploit。我正在嘗試在純GDB中盡可能地做到這一點,我遇到的最后一個挑戰是我遇到了這種情況這就是我所擁有的全部)

(gdb) help find

Search memory for a sequence of bytes.
Usage:
find [/size-char] [/max-count] start-address, end-address, expr1 [, expr2 ...]
find [/size-char] [/max-count] start-address, +length, expr1 [, expr2 ...]
size-char is one of b,h,w,g for 8,16,32,64 bit values respectively,
and if not specified the size is taken from the type of the expression
in the current language.
Note that this means for example that in the case of C-like languages
a search for an untyped 0x42 will search for "(int) 0x42"
which is typically four bytes.

注意最后一句話。 我認為您正在尋找以下之一:

find/h 0x8048000, 0x888a000, 0xE4FF
find 0x8048000, 0x888a000, (short)0xE4FF

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM