-
Notifications
You must be signed in to change notification settings - Fork 135
Can qsym run the instrumented program by afl-clang-fast? #56
Comments
Hi! In theory, yes. But current PIN, which is DBT that QSYM relies on, seems not to support shared memory, which is commonly used in a instrumented binary. |
Hi. QSYM is not good for finding such inputs. It is designed for binary-format files, not string-like. First of all, QSYM uses a search mechanism calls generative search, which is introduced in Microsoft SAGE. The basic idea is to flip branches following concrete execution to maximize impacts of P.S. If you need to handle that using concolic execution, I suggest you to use angr, which already implement this mechanism. |
Please allow me to make a confirmation. Do you mean qsym can not deal with strcmp() issue? But through my testing, it can produce the satisfying result by calling the function named makeAddrConcrete. Is this intentional or coincidental. As I know this function is used for handling symbolic pointer. |
Oh, sorry. I misunderstood. What I mean is that QSYM can handle strcmp() partially. So, if you have |
I checked and found that it is hard for qsym to find the correct result when the string is very long as you mentioned. |
Hi! I took a look at the code. v4.m128i_i64[0] = *(__int64 *)a1;
v5.m128i_i64[0] = *(__int64 *)a2;
v4.m128i_i64[1] = *(__int64 *)(a1 + 1);
v5.m128i_i64[1] = *(__int64 *)(a2 + 1);
v6 = (unsigned int)(_mm_movemask_epi8(_mm_sub_epi8(_mm_cmpeq_epi8(v4, v5), _mm_cmpeq_epi8(0LL, v4))) - 0xFFFF);
if ( (_DWORD)v6 )
{
LABEL_16:
_BitScanForward64(&v6, v6);
return *((unsigned __int8 *)a1 + v6) - (unsigned int)*((unsigned __int8 *)a2 + v6); // <- here This is a decompiled code of strcmp(). The Best, |
OK,I got it. Thanks for your patience. |
You're welcome :) |
Hi,
I notice the usage tells to use the non-instrumented binary for qsym. I wonder if I can run it on the instrumented binary? if so, will it cause any problems? Thank you.
The text was updated successfully, but these errors were encountered: