-
Notifications
You must be signed in to change notification settings - Fork 540
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
Taint analysis in Double-Precision Floating-Point instruction #471
Comments
Right but i'm very curious about how you will provide the good semantics :). If you have ideas go ahead! |
Actually, I don't have good idea now. I just want to confirm with you firstly. And then exploring and trying the possible way. I also wonder whether you have any tips to share with me? I see you have build the semantic for movsd. |
actually, if you only want the taint analysis you can only call |
I know the problem for symbolic execution. Currently, I just need to do taint and no symbolic execution. I will try taintAssignment and taintUnion. Thanks Jonathan. |
Okay. Below an example for the addsd tainting: + void x86Semantics::addsd_s(triton::arch::Instruction& inst) {
+ auto& dst = inst.operands[0];
+ auto& src = inst.operands[1];
+
+ /* Spread taint */
+ this->taintEngine->taintUnion(dst, src);
+
+ /* Upate the symbolic control flow */
+ this->controlFlow_s(inst);
+ }
+
+ |
Great. I just go to one class. I will try them and then let you know. But it looks that isTainted() also need to check the symbolic expression, and need the semantic, right? |
Indeed. You have to define |
Please + void x86Semantics::addsd_s(triton::arch::Instruction& inst) {
+ auto& dst = inst.operands[0];
+ auto& src = inst.operands[1];
+
+ /* Spread taint */
+ inst.setTaint(this->taintEngine->taintUnion(dst, src));
+
+ /* Upate the symbolic control flow */
+ this->controlFlow_s(inst);
+ }
+
+ |
The taint works prefect now. Thanks for you help. |
Thanks Jonathan. Now I can taint the four float-point instruction. One more thing, I don't need the symbolic execution for float-point instruction. But I do need the semantic expression for them. Do you plan to add them in some point? I am also exploring them now. |
It's a long term goal but it's a bit complex to do and I have so much easy things to do before :) |
Hi @JonathanSalwan, now I start to explore |
Past your code. |
Now for
For instruction: 4050a0: subsd xmm0, qword ptr [rbp - 0x60] In my script, for insertCall(cbefore, INSERT_POINT.BEFORE), I do the following:
The result looks good:
In my script, for insertCall(cafter, INSERT_POINT.AFTER), I also output the expr and getAst()
Based on the result, I think whether the problem may be If you need my script and test binary, I can send them to you later. But I think the main problem is for symbolic. Thanks. |
@JonathanSalwan For taint analysis in double-precisson floating-point instruction (e.g. subsd, mulsd, addsd, divsd), I must firstly provide the correct semantics, and then I can do taint analysis in these instructions, right?
The text was updated successfully, but these errors were encountered: