-
-
Notifications
You must be signed in to change notification settings - Fork 631
String Searcher Extension #472
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
Conversation
ElektroKill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the comments regarding the code, I think it would be nice to have an option to display the strings view from the Edit/View toolbar menus, since that's how dnSpy tool windows are summoned.
I also think it would be a good addition to include strings that can be found in custom attributes, field constants, etc., in the string view.
Additional options when it comes to filtering, like case-insensitive compare or matching by whole words.
Let me know if you would be willing to add this as part of your PR, or if it's something I should add myself.
Extensions/dnSpy.StringSearcher/StringReferencesToolWindowContent.cs
Outdated
Show resolved
Hide resolved
5101eed to
c70feb0
Compare
…eference kind column
ElektroKill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than a few minor touchups and the license header in each file, LGTM!
6894b59 to
d9c1e4a
Compare
ElektroKill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for the contribution.



Problem
General-purpose disassemblers like Ghidra and IDA include cross-referencing for strings found in a binary. dnSpy, however, lacks this feature, which can make it awkward to use for tasks such as malware analysis where string literals frequently serve as indicators of compromise (IoC). Furthermore, strings are also useful for identifying obfuscators and in general for quickly locating and navigating related parts of a program.
Solution
This PR proposes a new string searcher extension that can enumerate string literals found in all method bodies of a selected module:
The strings are displayed in a new searchable and sortable pane which can be used to navigate around in the module easily:
output.mp4
Considered Alternatives
The existing search pane (activated by Ctrl+Shift+K) can also search for string literals, but this A) only displays the member it was referenced in and doesn't include the full string, and B) assumes you know the string you want to look for beforehand, making it not very useful for the scenarios described in the above.