-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to use PDB MSDIA instead of PDB Universal #65
Comments
This request speaks to a larger requirement to be able to provide custom analyzer options to For example. If you save the options for the screenshot above it generates a custom options file like: {
"SAVE_STATE_NAME": "File_Options",
"VALUES": {
"WindowsPE x86 Propagate External Parameters": true,
"Aggressive Instruction Finder": true,
"PDB Universal.Search remote symbol servers": true,
"Condense Filler Bytes": true,
"Decompiler Parameter ID": true,
"Variadic Function Signature Override": true,
"PDB MSDIA": true
},
"TYPES": {
"WindowsPE x86 Propagate External Parameters": "boolean",
"Aggressive Instruction Finder": "boolean",
"PDB Universal.Search remote symbol servers": "boolean",
"Condense Filler Bytes": "boolean",
"Decompiler Parameter ID": "boolean",
"Variadic Function Signature Override": "boolean",
"PDB MSDIA": "boolean"
},
"ENUM_CLASSES": {}
} I think in short order I could support that in ghidriff, as a command line option to supply custom analysis. What do you think? Alternatively, at the moment, if you want to try your already analyzed file in Ghidra. Just export the binary / each binary to a Ghidra Zipped format. See the latest release picture. You can export the binary to my_large_bin1.gzf and my_large_bin2.gzf. Then you can pass the already analyzed bins to to ghidriff for diffing.
I just put this out though, so I am curious of the results. Let me know if you try it and if it works for you. Based on your feedback, I'll likely create a ticket to support custom analysis options generally. |
"I think in short order I could support that in ghidriff" - sounds good,
maybe sth like:
`--analysis-option="PDB MSDIA=true"`
Or a json that will be used to override options.
"if you want to try your already analyzed file in Ghidra" - frankly I
already used bindiff, but I'll try that later.
|
Download of pdbs always fails for me, I had to use another tool to download:
Then I got this assert:
BTW typo: analyiss I added |
If one version has symbols and the other doesn't, it becomes difficult to match the functions because Ghidra will have a different set of functions for each binary. So sometimes functions won't be aligned. That assertion is there to let you know you are stepping into a diff that might not work. That being said, I have seen even partial diffs be useful. There is also an option to run without symbols (which again sometimes can be best if the analysis with and without symbols is so changed). Everything depends. |
Did the diff finish? |
I don't think that's the case, file size is similar. Here are both files:
It failed with:
|
That's not so large, chromium pdbs are several GBs
…On Wed, Dec 20, 2023, 07:05 clearbluejar ***@***.***> wrote:
ah.. seems like the pe_url generation is failing for that binary.
That isn't a critical function. just gives you a nice wget original
binary command line.
Like this:
image.png (view on web)
<https://github.com/clearbluejar/ghidriff/assets/3752074/26971955-f1cf-417f-b36a-364aa75fe45e>
Which seems like another issue to resolve. :)
Storing windows.ui.xaml.pdb in local symbol store (338.91MB)
(ConsoleTaskMonitor)
The PDB for the binary is 350 MB!
wow.
And the binary is 18MB...
I just kicked off a local test. I will see if it survives it.
—
Reply to this email directly, view it on GitHub
<#65 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMDRPFDKBVWHSNMJ3O3QOLYKJWYXAVCNFSM6AAAAABAXO2YIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTHA2TQNRQGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Did you use MSDIA? ram I think I used 16GB
…On Wed, Dec 20, 2023, 07:26 clearbluejar ***@***.***> wrote:
This is how analysis is going:
image.png (view on web)
<https://github.com/clearbluejar/ghidriff/assets/3752074/afd2f19f-d610-452b-95e3-a23ab1f0a4f3>
I ran out of heap and actually crashed the JVM. This is Ghidra analysis
(before ghidriff is doing any work). I can bump up the heap for the jvm,
but how much will I need. How much RAM are you working with? I can also
turn off threading so it only analyzes one binary at a time with
--no-threaded. Trying again.
—
Reply to this email directly, view it on GitHub
<#65 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMDRPG7HEKZH7S5AVTRIA3YKJZHLAVCNFSM6AAAAABAXO2YIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTHA3TMMZTHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
ah no, just using command-line on linux, regular pdb universal. maybe it can't handle it... |
Yeah, that's the issue I linked at the beginning
…On Wed, Dec 20, 2023, 07:39 clearbluejar ***@***.***> wrote:
ah no, just using command-line on linux, regular pdb universal. maybe it
can't handle it...
—
Reply to this email directly, view it on GitHub
<#65 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMDRPGHZUDDKA5PEAIBM3LYKJ2XLAVCNFSM6AAAAABAXO2YIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTHA4DMMRYGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Full circle. 🤦♂️ Sorry. I have yet to use MSDIA for Ghidra, besides the analysis option needed, and having to run it on Windows (because that is a requirement for MSDIA right?), is there anything else you need to run on the PDB to make it work? Or MSDIA is just another parser for the PDB that handles large ones better, so there is no preprocessing needed, it can just run with the original PDB. |
I think MSDIA is just another parser for the PDB that handles large ones
better, so there is no preprocessing needed. And probably Windows only
indeed, but I'm not sure.
…On Wed, Dec 20, 2023, 07:45 clearbluejar ***@***.***> wrote:
Full circle. 🤦♂️ Sorry.
I have yet to use MSDIA for Ghidra, besides the analysis option needed,
and having to run it on Windows (because that is a requirement for MSDIA
right?), is there anything else you need to run on the PDB to make it work?
Or MSDIA is just another parser for the PDB that handles large ones better,
so there is no preprocessing needed, it can just run with the original PDB.
—
Reply to this email directly, view it on GitHub
<#65 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMDRPGCJV5ZMLHBTUBWGZTYKJ3ODAVCNFSM6AAAAABAXO2YIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTHA4TAOBQG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Will need to get back to you when I can test with Windows. I will try to add the options json import to enable all the Ghidra analysis settings. |
Now Ghidra 11 is released with some pdb improvements, maybe now it won't OOM, worth trying |
For large binaries, Universal fails with OOM. See:
NationalSecurityAgency/ghidra#2485
For this reason I couldn't try this tool with my binary.
Please add a command line option to switch to MSDIA.
The text was updated successfully, but these errors were encountered: