top | item 6383977

64bit Pointer Truncation in Meterpreter

22 points| peschkaj | 12 years ago |buffered.io

3 comments

order

humbledrone|12 years ago

This is the reason that you enable all of the compiler warnings that you possibly can, and treat them as errors. For instance I believe that gcc's -Wconversion would catch an implicit cast from a long to an int (and I'm sure there's a Visual C++ warning for the same problem).

There is simply no excuse to work with warnings like this disabled. If you come across a codebase that was built without such warnings, turn them on and have fun finding out about tons of bugs that could have been trivially avoided.

rcconf|12 years ago

Interesting article! It's really unfortunate that you got so close, you knew exactly what was wrong, but couldn't find where it happened! What's even more interesting is that you actually reached out to Stephen Fewer and he solved the issue! I've been writing software for a while, but I usually have this mindset that more well known and successful researchers are too busy to respond.

Maybe the next time I have a problem, and know of someone who is highly skilled in that area, I'll send them an e-mail.

OJ|12 years ago

Thanks rcconf. Yeah I did feel like a bit of a muppet for missing it. I'm going to say "It was late and I was tired" and try to hide behind that as an excuse ;) I'm pretty sure I would have found it eventually, but I was time-poor and thought it'd be a good idea to call in the cavalry. Stephen was great, plus he knows the RDI code inside out for obvious reasons. I still feel like I contributed though!