|
Timing: The Bane of My Fuzzing Existence
Well this may not be directly RE related, but I thought it might make an interesting blog posting. I recently came upon an interesting bug, and by interesting I mean I could NOT for the life of me reproduce it in any way! The bug was inside a certain server daemon, and my fuzzer would hit the bug after about 4000 iterations. Fine and dandy. Now the tricky part was capturing what magic packet finally did the trick (Wireshark does NOT like to run for hours on end :) and since changing my fuzzer to replay everything it did at what time would take heavy code modidifications, which I didn't wanna do, I was somewhat stuck. I reduced this to doing 1000 iterations at a time when I could monitor it, and finally got it to the point where I had found the spot where the crash occurred. Paydirt! Not so fast, when I took this beauty of a packet capture, converted everything over to Python....it didn't work. I tried cat | nc target port ....no love. After some prodding a good friend of mine finally convinced me to get an active netcat session with the server, and send the commands one after the other, and sure enough it worked. I had learned the valuable lesson on timing! Especially when you use fuzzing tools like GPF (www.appliedsec.com), which is intelligent enough to handle timing when doing network read/writes, in order for you to reproduce this in your code you gotta throw a couple of sleep()'s in there. I know this probably isn't the most helpful posting to any of you, but it really made me think about all those times that I had been stalking something in PaiMei and ran an automated fuzzer, came back to find it had crashed the process but I could never reproduce.....if only I could have been patient, I wonder how many of those would have turned into exploitable bugs? Comments
| ||||||||||||||