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

exclude/tag strings referenced by library functions (identified by FLIRT) #362

Open
williballenthin opened this issue May 3, 2021 · 12 comments
Labels
enhancement QS QUANTUMSTRAND

Comments

@williballenthin
Copy link
Collaborator

No description provided.

@symbolicvoid
Copy link
Contributor

Hello @williballenthin, I have a question about this issue. Doesn't FLOSS already recognize library functions using viv-utils? Can we use that to tag strings used by these? I guess we could use the addresses to see if the strings are used within the functions, but not sure about arguments etc. though..

@mr-tz
Copy link
Collaborator

mr-tz commented Mar 20, 2023

Exactly, for recognized functions we can mark associated strings up accordingly. This markup doesn't happen currently and we would also have to discuss and/or change the rendering of identified library-related strings.

@williballenthin
Copy link
Collaborator Author

williballenthin commented Mar 20, 2023 via email

@williballenthin
Copy link
Collaborator Author

williballenthin commented Mar 20, 2023 via email

@symbolicvoid
Copy link
Contributor

symbolicvoid commented Mar 20, 2023

Thank you for the replies! Also it does seem like FLOSS can sometimes not recognize library functions.. For example, this is a C program that I used (compiled by GCC):

#include<stdio.h>

int main(){
    printf("Hello World");
    return 0;
}

Just a simple hello world program. However, FLOSS seems to be picking up multiple functions and decoded strings:
image_2023-03-20_154012392
I assume those are added by the compiler, but is there something we can do to mark these functions aswell?

@mr-tz
Copy link
Collaborator

mr-tz commented Mar 20, 2023

We don't have any signatures for GCC currently. We could try with the rizin libs (https://github.com/rizinorg/sigdb).

@symbolicvoid
Copy link
Contributor

Oh I see. I can test around with this issue and see if I can do something about it.

@symbolicvoid
Copy link
Contributor

Is there any data I can use to test the code? Something that has library functions with strings that can be recognized by FLOSS. @mr-tz @williballenthin

@williballenthin
Copy link
Collaborator Author

i dont think we have any binaries handy right night, but using something statically linked with OpenSSL or zlib should provide a good starting point, since those strings are fairly obvious and easy to correlate with the source code, and FLIRT signatures should work reasonably well against them.

@mr-tz
Copy link
Collaborator

mr-tz commented Mar 30, 2023

Plus Microsoft Visual Studio CRT functions from many versions (see https://github.com/mandiant/siglib/); when using the default signatures. I'd recommend to find a file, e.g., from https://github.com/mandiant/capa-testfiles that has many library function identifications and start from there.

@symbolicvoid
Copy link
Contributor

Plus Microsoft Visual Studio CRT functions from many versions (see https://github.com/mandiant/siglib/); when using the default signatures. I'd recommend to find a file, e.g., from https://github.com/mandiant/capa-testfiles that has many library function identifications and start from there.

@mr-tz Sorry I don't understand what you mean. Could you please explain more?

@mr-tz
Copy link
Collaborator

mr-tz commented Mar 31, 2023

Sorry for being unclear. My comment was meant as an addition to Willi's comment above it.

Our signatures should also pick up standard run-time (library) functions used by MS Visual Studio compiled binaries.

@mr-tz mr-tz modified the milestones: vnext, Quantum Strand M1 May 4, 2023
@williballenthin williballenthin added the QS QUANTUMSTRAND label May 4, 2023
@mr-tz mr-tz removed this from the Quantum Strand milestone May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement QS QUANTUMSTRAND
Projects
None yet
Development

No branches or pull requests

3 participants