Giant Penetration Testing Cheat Sheet for Linux Commands – IV


Hello, readers, I know you have been waiting for the next installment of the awesome Linux command series. We have already completed the three installments of the series and about to share the fourth part of the series in which we will talk about the Metasploit command references. So, let’s just finish up the series quickly, shall we?

Metasploit Command Reference

Core Metasploit Commands:

Well, Metasploit is something which is always growing and evolving. With the discovery of new vulnerability which is added to the Metasploit framework, is a pyramid of new patches and operating systems to a response. It’s just a matter of searching through all the vulnerabilities, modules and exploits. Following are the cheat sheets of the Metasploit commands which will help you a lot in performing operations on it.

  • To automatically update the functions and note down all the new vulnerabilities and exploits, this command has been put into use
  • msfupdate. It should be always run from the standard command line.
  • The command to enter the Metasploit environment and receive the msf> prompt in the terminal, you have to use msfconsole.
  • To display all the exploits in the terminal, you have the assistance of show exploits.
  • For printing all the payloads familiar to the current terminal use the show payloads.
  • To view all auxiliary modules of the Metasploit framework use this one action show auxiliary.
  • If you are in problem, then use help command to show the help page of Metasploit.
  • For searches through modules and exploits to for any labeled with the matching name supply use this line search [name].
  • To know Information about the certain module or exploit, you can use info command.
  • To load module or exploit just use use [name].
  • To set to your interface’s local IP address, especially if you’re currently on the same subnet or network as the target, then use lhost [IP_address].
  • This command rhost [IP_address] will use to set the IP address of the target.
  • To display all the parameters of the modules and exploits that can be set use show options.
  • To display which target and system can be set for a given module use the command show targets.

Database Commands:

We have already mentioned that NMAP commands can be used with the Metasploit database. Metasploit has numerous tools and commands to build a database using NMAP such as;

  • The basic syntax of NMAP command within the Metasploit is db_nmap [nmap_command_syntax].
  • db_nmap -v -Pn is used to scans the subnet with a basic port scan in verbose mode, and adds those hosts to the database
  • For transferring your current database to file and save on the location of your wish use db_export.
  • To import database from another source use the command db_import.
  • For display the status of the database, you should use the db_status. If everything is working in proper order, then the command will return the status of connected.
  • To print a list of all the discovered hosts in the database which can be discovered with the NMAP command can be retrieved hosts.
  • To add the IP address, range, and subnet to the host database list, you can use the hosts -a [ip_address] command.
  • To delete an IP address, range, or subnet from the host’s database list, you can use hosts -d [ip_address].

Wrap up

Okay, folks, we would like to convey that these cheat sheet commands can’t be used to learn the new operating system or skills. If you haven’t worked or learned the terminals before, then you are going to have difficulty using any of the shortcuts Linux commands.

So, we will recommend you to learn basic Linux file system and how to use shell commands, before using any of the commands. However, we hope that you enjoyed our series folks and don’t forget to share your thoughts with us.

About the author

Arpit Agarwal

I am a freelancer content writer, web developer and Video editor who loves to write technical stuff and on the other hand makes awesome videos as well. I like to make people happy with my writing and also try to make sure, you come back to read more.

Add comment

Leave a Reply

By Arpit Agarwal

Most common tags

%d bloggers like this: