This is beautiful! I have wondered for a long time about how to preform scans on a remote network via a compromised machine using meterpreter. DigiNinja (with some help from Mark Baggett, and Egypt) has finally showed us how. (Btw, this is a great reason for everyone to join some good mailing lists. This was the result of a discussion on the Metasploit list.)
Why is this a big deal? Well, the ease of use and simplicity of metasploit/meterpreter is a big enough reason itself. However, the fact that the entire scan would pivot via a machine without ever touching anything besides memory is another huge benefit.
Although the tutorial is meant for Nessus, id imagine the same technique would work for Nmap and other scans ran through metasploit.
Take a look at it and enjoy!
Nessus Through Socks Through Meterpreter
EDIT:
Here is a link to Mark Baggett’s original blog post (on PaulDotCom) about using Proxychains and SSH to do the same thing:
SSH gymnastics with Proxychains