Skip to content
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

Extract Rust specific strings from binaries #791 #836

Merged
merged 44 commits into from
Aug 23, 2023
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a75661e
Initial implementation of Rust specific strings
Arker123 Jul 17, 2023
e7c7595
New algorithm
Arker123 Jul 28, 2023
8a394bb
code style
Arker123 Jul 28, 2023
e9ca68e
Implemented separation of references from .text segment
Arker123 Aug 5, 2023
45978ea
Added rust coverage script
Arker123 Aug 5, 2023
4cbffaf
Introduced shared functions into language/utils.py
Arker123 Aug 5, 2023
f128d19
Refractored Go and Rust extraction files
Arker123 Aug 5, 2023
80dce99
Removed unused functions
Arker123 Aug 5, 2023
13c8920
Modularized code into separate functions
Arker123 Aug 5, 2023
27958fb
Merge remote-tracking branch 'origin/master' into rust-strings
Arker123 Aug 5, 2023
e074722
Refractored comments and type hints
Arker123 Aug 5, 2023
dbf7ad1
Tweaks
Arker123 Aug 5, 2023
bbd3d53
Update coverage Script
Arker123 Aug 11, 2023
4839543
Tweaks
Arker123 Aug 11, 2023
3ebd075
Minor fixes
Arker123 Aug 11, 2023
226486e
code style
Arker123 Aug 11, 2023
c46410e
Apply suggestions from code review
Arker123 Aug 14, 2023
8fabe4b
Tweaks
Arker123 Aug 14, 2023
8bd3711
Minor fixes
Arker123 Aug 14, 2023
74f3a91
code style
Arker123 Aug 14, 2023
2d5bf95
Update coverage script
Arker123 Aug 15, 2023
76d5f84
Update coverage script
Arker123 Aug 17, 2023
b02fc6a
Tweaks
Arker123 Aug 17, 2023
39e814c
Apply suggestions from code review
Arker123 Aug 19, 2023
02288d7
Tweaks
Arker123 Aug 19, 2023
797e5e3
Minor fixes
Arker123 Aug 19, 2023
657d497
Design Tweaks
Arker123 Aug 21, 2023
73afe8b
Refractored Design
Arker123 Aug 21, 2023
267862e
Improved Design
Arker123 Aug 22, 2023
9fe75c7
Further Improvised Design
Arker123 Aug 22, 2023
a67f9f2
Tweaks
Arker123 Aug 22, 2023
07a7558
Design Tweaks
Arker123 Aug 22, 2023
5a6fdb6
Updated Design Structure
Arker123 Aug 22, 2023
1650f8b
Cleanup
Arker123 Aug 22, 2023
6cdccb3
Rust updates (#7)
mr-tz Aug 22, 2023
62405fe
Added push and mov xrefs for i386 arch and test updates
Arker123 Aug 22, 2023
c98450d
Tweaks
Arker123 Aug 23, 2023
57fc902
Update floss/language/go/coverage.py
Arker123 Aug 23, 2023
ef27592
Add push and mov for amd64
Arker123 Aug 23, 2023
1909255
Merge branch 'rust-strings' of https://github.com/Arker123/flare-flos…
Arker123 Aug 23, 2023
6011ea7
Update Comments
Arker123 Aug 23, 2023
890ba55
Tweaks
Arker123 Aug 23, 2023
df20ec1
Comment Tweaks
Arker123 Aug 23, 2023
2fdb823
Tweaks
Arker123 Aug 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions floss/language/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ def get_extract_stats(
pe: pefile, all_ss_strings: List[StaticString], lang_strings: List[StaticString], min_len: int, min_blob_len=0
) -> float:
# min_blob_len: this is the minimum length of a string blob in binary file to be considered for extraction
# It is 0 in case of Rust extraction because we want to extract all strings from binary file
# while in case of Go extraction, we want to extract only large strings (len > 2800) from binary file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's only leave the respective comments where this is called, so please remove here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

all_strings = list()
# these are ascii, extract these utf-8 to get fewer chunks (ascii may split on two-byte characters, for example)
for ss in all_ss_strings:
Expand Down