LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-16-2024, 07:06 AM   #1
kosmo333
LQ Newbie
 
Registered: Nov 2020
Posts: 24

Rep: Reputation: Disabled
find target function in raw MIPS32 binary (Ghidra)


I'm analyzing the raw MIPS32 binary (memory dump) code in Ghidra. After importing the file, I did search strings and found the target instructions of interest. For example, offset address "00734cb4": I don't see functions there, 'No Function' in Decompiler window. I definitely missing something. I've selected the part of code, but how to decompile it and find linked functions?

Last edited by kosmo333; 07-21-2024 at 07:51 AM.
 
Old 07-17-2024, 02:16 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,923
Blog Entries: 1

Rep: Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885
You are examining a data segment: obviously there is no code in it. What is problem X, I mean where did this 00734cb address come?
 
2 members found this post helpful.
Old 07-17-2024, 05:49 AM   #3
kosmo333
LQ Newbie
 
Registered: Nov 2020
Posts: 24

Original Poster
Rep: Reputation: Disabled
My mistype - the correct offset is 00734cb4, not 00734cb. I find the address '00734cb4' using Search > For Strings, "validate a given passowrd against all three passwords (10 Alphanumeric characters)". There are no label starting with `FUN_007` in Symbol Tree window.

Last edited by kosmo333; 07-17-2024 at 06:58 AM.
 
Old 07-17-2024, 06:03 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,923
Blog Entries: 1

Rep: Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885
As far as I know string literals don't carry information about the code that uses them.
 
Old 07-17-2024, 06:58 AM   #5
kosmo333
LQ Newbie
 
Registered: Nov 2020
Posts: 24

Original Poster
Rep: Reputation: Disabled
How I can find that function? By browsing FUN_ labels one by one from beginning to end?

Last edited by kosmo333; 07-17-2024 at 07:02 AM.
 
Old 07-17-2024, 08:26 AM   #6
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,793

Rep: Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087
The code itself should have a reference to that address. But it could be split in two (e.g., load upper 16 bits, then load lower 16 bits), so a bit tricky to search for. I'm not familiar with Ghidra, perhaps it has a some feature to help with this?
 
Old 07-17-2024, 12:44 PM   #7
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,923
Blog Entries: 1

Rep: Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885
Well, helping users to avoid the password-verification is not necessarily a priority for the developers.
 
1 members found this post helpful.
Old 07-17-2024, 03:49 PM   #8
kosmo333
LQ Newbie
 
Registered: Nov 2020
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
Well, helping users to avoid the password-verification is not necessarily a priority for the developers.
It's not my case. I own the device.
 
Old 07-26-2024, 06:07 AM   #9
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,325

Rep: Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919Reputation: 919
Quote:
Originally Posted by kosmo333 View Post
My mistype - the correct offset is 00734cb4, not 00734cb. I find the address '00734cb4' using Search > For Strings, "validate a given passowrd against all three passwords (10 Alphanumeric characters)". There are no label starting with `FUN_007` in Symbol Tree window.
mī best gess: if rejjistər rs = rejjistər rt; then, set u trap exxepshun.
 
  


Reply

Tags
assembly, c++ compiler, debugging, decryption, java17


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The NSA Makes Ghidra, a Powerful Cybersecurity Tool, Open Source LXer Syndicated Linux News 0 03-07-2019 02:52 AM
LXer: MIPS32 SoCs target PMPs and PNDs, run Linux LXer Syndicated Linux News 0 01-23-2007 07:54 AM
MIPS32 toolchain on Cygwin Rostfrei General 3 07-07-2006 02:29 AM
Where can I get mips32-gcc? supertoad Linux - Software 2 06-21-2006 11:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration