rapid7 / meterpreter

THIS REPO IS OBSOLETE. USE https://github.com/rapid7/metasploit-payloads INSTEAD
Other
328 stars 143 forks source link

Added the notion of "group packets" #75

Closed OJ closed 10 years ago

OJ commented 10 years ago

A group packet is a special packet that is to be used as a group of TLVs that will live under another packet. Using this functionality means that we can easily nest groupings of data to arbitrary depths, which wasn't something we were able to do before easily.

The MSF side is easily capable of handling this scenario, but this side had always been lacking.

The clipboard dump code has been updated to show how this can be used.

This is based on a chat I had with egypt tonight, where we were both lamenting on the inability to have arbitrary depths of groups. This seems to solve it well enough without having to create a stack of code specific to group hierarchies.

Feedback/discussion very much welcome!

metasploit-public-bot commented 10 years ago

Test PASSED. Refer to this link for build results: https://ci.metasploit.com/job/GPR-MeterpreterWin/81/

jlee-r7 commented 10 years ago

This looks very much cleaner. In fact, other places that build group TLVs could benefit from this, particularly source/extensions/stdapi/server/net/config/interface.c

OJ commented 10 years ago

I can think of quite a few other places where this can be used to make things not only more readable but reduce the amount of data transferred. Reducing code is always a win too. Constructing arrays of TLVs in the way we had to do before felt like it was prone to errors.