Basics of Meterpreter Evasion

36
BASIC METERPRETER EVASION By: Nipun Jaswal Technical Director, Pyramid Cyber and Forensics Chair Member, National Cyber Defense and Research Center Author of Mastering Metasploit & Metasploit Bootcamp

Transcript of Basics of Meterpreter Evasion

Page 1: Basics of Meterpreter Evasion

BASIC METERPRETER EVASIONBy: Nipun Jaswal• Technical Director, Pyramid Cyber and Forensics• Chair Member, National Cyber Defense and Research Center• Author of Mastering Metasploit & Metasploit Bootcamp

Page 2: Basics of Meterpreter Evasion

• 10+ Years into IT Security

• Author of Mastering Metasploit , First, Second,CN Edition & “Metasploit Bootcamp”

• Technical Director , Pyramid Cyber andForensics

• Chair member, National Cyber Defense andResearch Center

• Known for Exploit Research, CyberSurveillance, Cyber Warfare, WirelessHacking & Exploitation and HardwareHacking

• Can code in 15+ programming languages, 20Hall of fames including Offensive Security,AT&T, Facebook, Apple etc

• Worked Globally with various lawenforcement agencies

#WHOAMI

Page 3: Basics of Meterpreter Evasion

WHAT WE WILL LEARN TODAY?

BYPASS SIGNATURE DETECTION

• Changing the Known Signatures for Malware

• Making use of Shell code instead of conventional executables

• Using Encoding wrappers for bypassing detections

BYPASS DYNAMIC ANALYSIS

• Using SSL to defeat Network behavior analysis

• Using Popular yet self signed certificates to whitelist communication

• Using Microsoft utilities to bypass application whitelisting

Page 4: Basics of Meterpreter Evasion

TOP 3 ANTIVIRUS SOLUTIONS

Page 5: Basics of Meterpreter Evasion

TYPES OF DETECTION

Common Detection Types:• Signature Based Detection• Dynamic Analysis / Behavioral Detection

Page 6: Basics of Meterpreter Evasion

BYPASSING

Page 7: Basics of Meterpreter Evasion

LET’S CREATE A BACKDOOR WITH METASPLOIT…

Page 8: Basics of Meterpreter Evasion

FAILED SIGNATURE DETECTION…

Page 9: Basics of Meterpreter Evasion

LET’S TRY A .VBS SCRIPT…

Page 10: Basics of Meterpreter Evasion

FAILED SIGNATURE DETECTION…YET AGAIN

Page 11: Basics of Meterpreter Evasion

LET’S CHECK AV DETECTION STATUS…

• 30/39 AVS DETECT THE BACKDOOR AS MALICIOUS

• HOW CAN WE CIRCUMVENT THIS?

Page 12: Basics of Meterpreter Evasion

LET’S BYPASS SIGNATURE DETECTION WITH CUSTOMIZED EXECUTABLE

Page 13: Basics of Meterpreter Evasion

LET’S BYPASS SIGNATURE DETECTION WITH CUSTOMIZED EXECUTABLE (CONT.)

Page 14: Basics of Meterpreter Evasion

LET’S BYPASS SIGNATURE DETECTION WITH CUSTOMIZED EXECUTABLE (CONT.)

Page 15: Basics of Meterpreter Evasion

LET’S BYPASS SIGNATURE DETECTION WITH CUSTOMIZED EXECUTABLE (CONT.)

Page 16: Basics of Meterpreter Evasion

LET’S BYPASS SIGNATURE DETECTION WITH CUSTOMIZED EXECUTABLE (CONT.)

Page 17: Basics of Meterpreter Evasion

Let’s check AV Detection status…

• 3/39 AVs detect the backdoor as malicious

• By simply replacing the executable by shellcode we dropped 27 antivirus detections

Page 18: Basics of Meterpreter Evasion

LET’S SEE WHAT 360 HAVE TO SAY…

Page 19: Basics of Meterpreter Evasion

TYPES OF DETECTION

Common Detection Types:• Signature Based Detection• Dynamic Analysis / Behavioral Detection

Page 20: Basics of Meterpreter Evasion

LET’S EXECUTE THE APPLICATION…

Page 21: Basics of Meterpreter Evasion

TYPES OF DETECTION

Common Detection Types:• Signature Based Detection• Dynamic Analysis / Behavioral Detection

Page 22: Basics of Meterpreter Evasion

TOP 3 ANTIVIRUS SOLUTIONS

Page 23: Basics of Meterpreter Evasion

BYPASSING

Page 24: Basics of Meterpreter Evasion

AVAST IS A TOUGH NUT TO CRACK…

Page 25: Basics of Meterpreter Evasion

USING SSL TO BYPASS AVAST NETWORK DETECTION

Page 26: Basics of Meterpreter Evasion

USING SSL TO BYPASS AVAST NETWORK DETECTION

Page 27: Basics of Meterpreter Evasion

USING SSL TO BYPASS AVAST NETWORK DETECTION

Page 28: Basics of Meterpreter Evasion

USING SSL TO BYPASS AVAST NETWORK DETECTION

Page 29: Basics of Meterpreter Evasion

Let’s check AV Detection status…

• 0/39 AVs detect the backdoor as malicious

• By simply adding support for SSL and using Google’s SSL Cert (Self Signed) we dropped rest of the 3 as well

Page 30: Basics of Meterpreter Evasion

SUCCESS ON AVAST

Page 31: Basics of Meterpreter Evasion

SUCCESS ON AVAST

Page 32: Basics of Meterpreter Evasion

TOP 3 ANTIVIRUS SOLUTIONS

Page 33: Basics of Meterpreter Evasion

BYPASSING

Page 34: Basics of Meterpreter Evasion

NORTON WILL TAKE YOUR NIGHTS AWAYWhy I Have rated Norton as one of the Best AV Solutions out there?

• Aggressive Firewall• Aggressive Behavior Detection• File Info based Blocking / File

Attributes• Application Memory and CPU

Consumption

Page 35: Basics of Meterpreter Evasion

WHAT DOES IT TAKE TO BYPASS NORTON?• Fake SSL Certificate• Application Whitelisting

Method• Delays and Continuous

Process Consumption, but not too high.

• Patience

Page 36: Basics of Meterpreter Evasion

THANKS• For More Information on AV Evasion, refer to “Metasploit

Bootcamp” & “Mastering Metasploit”

• Twitter : @nipunjaswal• FB : @nipunjaswal• Linknd : @nipunjaswal• http://Amazon.com/authors/nipunjaswal