How To Use Powerhell For Security Research



Similar documents
PowerShell. It s time to own. David Kennedy (ReL1K) Josh Kelley (Winfang) Twitter: dave_rel1k

The Social-Engineer Toolkit (SET)

Hacking your perimeter. Social-Engineering. Not everyone needs to use zero. David Kennedy (ReL1K) Twitter: Dave_ReL1K

Kautilya: Teensy beyond shells

Defcon 20 Owning One To Rule Them All. Dave DeSimone Manager, Information Security Fortune 1000

BSIDES Las Vegas Secret Pentesting Techniques Shhh...

Social Engineering Toolkit

Social-Engineering. Adaptive Pentesting. Kevin Mitnick Dave Kennedy

The Penetration Testing Execution Standard (PTES) Dave Kennedy (ReL1K) Twitter: Dave_ReL1K

PowerShell for Penetration Testers

ASL IT SECURITY XTREME XPLOIT DEVELOPMENT

CIT 480: Securing Computer Systems. Vulnerability Scanning and Exploitation Frameworks

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

Automation of Post-Exploitation

Penetration Testing with Kali Linux

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

Vulnerability Assessment and Penetration Testing

AUTHOR CONTACT DETAILS

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

Next-Generation Penetration Testing. Benjamin Mossé, MD, Mossé Security

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

Wordpress Security. A guide on how to not get hacked when using wordpress. David Kennedy (ReL1K) Twitter: Dave_ReL1K

CLASS FINAL REPORT UNIVERSITY OF CENTRAL FLORIDA FRONTIERS IN INFORMATION TECHNOLOGY COP 4910

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

Social-Engineering. Hacking a mature security program. Strategic Penetration Testing

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

The Value of Physical Memory for Incident Response

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

A New Era. A New Edge. Phishing within your company

Penetration Testing Using The Kill Chain Methodology

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

Protect Your IT Infrastructure from Zero-Day Attacks and New Vulnerabilities

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

EC-Council CAST CENTER FOR ADVANCED SECURITY TRAINING. CAST 619 Advanced SQLi Attacks and Countermeasures. Make The Difference CAST.

Persistence Mechanisms as Indicators of Compromise

WHITEPAPER. Nessus Exploit Integration

Security Intelligence Services. Cybersecurity training.

MetaXSSploit. Bringing XSS in Pentesting A journey in building a security tool. Claudio

Virtually Pwned Pentesting VMware. Claudio

Project Artillery Active Honeypotting. Dave Kennedy Founder, Principal Security Consultant

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

5 Steps to Advanced Threat Protection

Exploiting Transparent User Identification Systems

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

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

Advancements in Botnet Attacks and Malware Distribution

How to hack a website with Metasploit

Eugene Tsyrklevich. Ozone HIPS: Unbreakable Windows

University of Hull Department of Computer Science. Wrestling with Python Week 01 Playing with Python

Real World Web Service Testing For Web Hackers

Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant

Shellshock. Oz Elisyan & Maxim Zavodchik

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

I Hunt Penetration Testers!

The BackTrack Successor

Penetration Testing Walkthrough

How We're Getting Creamed

KASPERSKY SECURITY INTELLIGENCE SERVICES. EXPERT SERVICES.

Learn Ethical Hacking, Become a Pentester

PuttyRider. With great power comes great responsibility. # Pivoting from Windows to Linux in a penetration test. Adrian Furtunã, PhD adif2k8@gmail.

Keyloggers ETHICAL HACKING EEL-4789 GROUP 2: WILLIAM LOPEZ HUMBERTO GUERRA ENIO PENA ERICK BARRERA JUAN SAYOL

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

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

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

Attacking the Traveling Salesman Point-of-sale attacks on airline travelers DEFCON 2014

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

Manipulating Microsoft SQL Server Using SQL Injection

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

Malware Analysis Quiz 6

Patch Management. Module VMware Inc. All rights reserved

Goal Oriented Pentesting Getting the most value out of Penetration Testing

SECURITY TRENDS & VULNERABILITIES REVIEW 2015

TUNNA. A tool designed to bypass firewall restrictions on remote webservers. By: Rodrigo Marcos Nikos Vassakis

APT Advanced Persistent Threat Time to rethink?

Agenda. Red Team Difference to a Pen Test Common RT Techniques Blue Team

FORENSIC ANALYSIS Aleš Padrta

ADVANCED THREATS IN THE ENTERPRISE. Finding an Evil in the Haystack with RSA ECAT. White Paper

Penetration Test Report

Smart Card APDU Analysis

Operation Liberpy : Keyloggers and information theft in Latin America

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

Real World and Vulnerability Protection, Performance and Remediation Report

Implementing and Managing Windows Server 2008 Hyper-V

Practical Threat Intelligence. with Bromium LAVA

Introduction to Penetration Testing Paul D.

Presented by:!!dave Kennedy (RELIK)"!!!!!Ryan Macfarlane "

HackMiami Web Application Scanner 2013 PwnOff

ITEC441- IS Security. Chapter 15 Performing a Penetration Test

McAfee Application Control / Change Control Administration Intel Security Education Services Administration Course

Integrated Network Vulnerability Scanning & Penetration Testing SAINTcorporation.com

Audience. Pre-Requisites

Outline SSS Microsoft Windows Server 2008 Hyper-V Virtualization

Top Five Data Security Trends Impacting Franchise Operators. Payment System Risk September 29, 2009

ETHICAL HACKING APPLICATIO WIRELESS110 00NETWORK APPLICATION MOBILE MOBILE0001

Transcription:

PowerShell David Kennedy (ReL1K) Josh Kelley (Winfang) http://www.secmaniac.com Twitter: dave_rel1k winfang98

About Josh Security Analyst with a Fortune 1000 --- Works with Dave Heavy experience in penetration testing, exploitation, web application security, vulnerability management, and incident response. Primary languages are Python and now PowerShell

About Dave Director of Regional Security for a Fortune 1000 Heavy experience in penetration testing, exploitation, web application security, wireless and physical Creator of the Social-Engineer Toolkit, the Social- Engineer Framework. Heavy military background in Intelligence, deployed twice to Iraq and other middle east countries.

Special Thanks Special thanks to IronGeek and Kathy Peters

Brief Intro to PowerShell Windows version of a bash shell in nix Very powerful, flexible, and getting improved regularly. Installed by default on all Windows 7 and Server 2008 operating systems. Full integration for all new existing Microsoft products, including Exchange and AD integration. Full integration into the.net framework and can be directly called when performing scripting.

If you haven t seen it..

PowerShell for h4x0rs We will be the first ones to admit the usefulness and power of PowerShell in a positive manner. The ability to perform advanced tasks on Microsoft based operating systems is a huge leap forward. PowerShell for us as security researchers can be a great addition ranging from tool creation and automation when performing security assessments.

Execution Policies Restricted Places it in a mode where only certain scripts and calls can be called. AllSigned This script only allows signed scripts to be executed. Has to be from a trusted publisher. This is the most restrictive policy. RemoteSigned Remote scripts must be signed by a trusted publisher, things run locally don t need to be signed. Unrestricted Can run anything both remote and local.

Release of Metasploit Module 1 PowerShell Debug Traditionally post-exploitation phase, if you didn t have direct access to memory, traditional methods of getting a payload onto a system was through Windows debug (now removed in all newer operating systems), vbscript, csc, TFTP, or FTP. These methods are now proving much more difficult with better A/V and HIPS detection (well kinda..) and TFTP and FTP blocked egress.

DEMO Metasploit Module

Small Example of Conversion Binary is converted to hexadecimal and placed onto the filesystem. Convert script is created to take the hexadecimal and rewrite it back in a byte array as binary. Payload is now on the system for execution.

Execution Restriction Policies Shouldn t be relied upon for protecting execution of PowerShell based commands. Execution restriction policies do not help from a post exploitation perspective

CreateCMD Release Contents of a file are concatenated, compressed, and converted to base 64 into a single string. A boilerplate bootstrap code created for powershell Command or encodedcommand args then unpack the code and then perform an Invoke-Expression That will execute the script contents in the current shell context with all new functions that are in the script.

What s this mean With the most restrictive policy set on PowerShell we can still execute whatever we want (again not a security prevention method). No need to disable execution restriction policies No registry interaction, no reboots, nothing.

DEMO CreateCMD

What we can do.. Since we have full access to both PowerShell and the.net libraries, we can do pretty much anything we want which is great Releasing today both a bind and reverse shell programmed purely in PowerShell as PoC tools that you can create for security testing and to demonstrate the power of what we have...

DEMO PowerShell based SAMDump

PowerShell SAMDump Meterpreter based module, will dump the SAM database purely through powershell. Works on all operating systems, both x86 and 64 bit.

SET v0.6 Codename Arnold Palmer

Basics of SET Open-Source purely Python driven. Integration into Metasploit for both the exploit repository for client-side attacks and payloads. Multiple attack vectors specifically designed for Social- Engineering. For good, not bad, help pentesters and organizations test their security program.

SET DEMO USB HID Attack Vector

USB HID Attack Vector Drop a payload onto a system either through PowerShell or WSCRIPT. Automatic creation of attack vector through SET

Integrating into Existing Hardware Most new keyboards have integrated USB Hubs.

All put together Keyboard still works perfectly We have our malicious stuff just sitting there waiting

SET DEMO Java Applet Attack Vector

Thomas Werth Attack Vector Released at ShmooCon, this attack vector allows you to create a malicious Java Applet. User hits run and the payload is executed on the victims machine. Redirects user back to original site to make attack less conspicuous. New in SET v0.6, heavy obfuscation of java and payload for A/V bypass and fixed major issues with Linux/OSX payload deployment. Applet source just opened today!

What does this mean? Anti-Virus and HIPS aren t picking up these types of attacks, which means it s a safe passage for exploitation. The usefulness of this really aids us in post-exploitation scenarios and for security research and analysis.

Future Plans Process injection and code injection capabilities within PowerShell. Ability to deploy security baselines to multiple systems and ensure enforcement.

Social-Engineer.org http://www.social-engineer.org

Thanks to Kathy Peters Be sure to check out: http://www.secmaniac.com Twitter: dave_rel1k winfang98