EXCELLENCE AS STANDARD PowerShell Fu with Metasploit “Interactive PowerShell Sessions in Metasploit” 4 th July 2015 Presented to SteelCon Presented by.

Slides:



Advertisements
Similar presentations
Faith Allington Program Manager Microsoft Corporation WSV322.
Advertisements

An open source QA stack testing tools for agile teams Presented by Aaron Evans
en-us/sharepoint/fp
Abusing Windows Remote Management with Metasploit David Maloney Metasploit Software Engineer Rapid7.
A Complete Tool For System Penetration Testing Presented By:- Mahesh Kumar Sharma B.Tech IV Year Computer Science Roll No. :- CS09047.
James Boother Blog: INTRODUCTION TO POWERSHELL.
James Boother Blog: AUTOMATING ADMIN TASKS WITH POWERSHELL.
Buffer Overflow sailaja yagnavajhala sailaja yagnavajhala.
Lesson 2: Configuring Servers
Browser Exploitation Framework (BeEF) Lab
Technical Workshops | Esri International User Conference San Diego, California Customizing ArcPad solutions Marika Vertzonis, Gareth Walters, Stephen Quan.
DotNET A Developer’s Perspective Mike Litzkow University of Wisconsin - MadisonOne.
We have you by the gadgets Hitting your OS below the belt.
System Center 2012 R2 Windows Azure Pack Service Management Automation 101.
Nikto LUCA ALEXANDRA ADELA. Nikto  Web server assessment tool  Written by Chris Solo and David Lodge  Released on December 27, 2001  Stable release:
Hands-On Microsoft Windows Server 2008 Chapter 1 Introduction to Windows Server 2008.
Verify Hardware Requirements Install Windows Server 2008 R2 Configure Active Directory Install SQL Server 2008 Install SharePoint Server 2010 Configure.
Microsoft ® Official Course Module XA Using Windows PowerShell ®
Appendix A Starting Out with Windows PowerShell™ 2.0.
Section 1: Introducing Group Policy What Is Group Policy? Group Policy Scenarios New Group Policy Features Introduced with Windows Server 2008 and Windows.
Version control Using Git Version control, using Git1.
Penetration Testing Training Day Penetration Testing Tools and Techniques – pt 1 Mike Westmacott, IRM plc Supported by.
PowerShell Shenanigans Lateral Movement with PowerShell
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
POWERSHELL SHENANIGANS KIERAN JACOBSEN HP ENTERPRISE SERVICES.
Cherwell + PowerShell = Powerful Workflow Automation
GeniDesktop : The GEMINI Portal (and more) Hussam Nasir University of Kentucky.
What’s New in SharePoint 2010 SharePoint 2010 Development Primer New Developer Tools for SharePoint 2010 SharePoint 2010 Integration with PowerShell.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
Corey Hynes HynesITe, Inc Session Code: SRV317 Objectives Let you walk out of here, being able to run a script against an OU of computers, to make some.
Infrastructure as code. “Enable the reconstruction of the business from nothing but a source code repository, an application data backup, and bare metal.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
Module 1A An Introduction to Metasploit – Based upon Chapter 2 of “Metasploit the Penetration testers guide” Based upon Chapter 2 of “Metasploit the Penetration.
Module 14: Advanced Topics and Troubleshooting. Microsoft ® Windows ® Small Business Server (SBS) 2008 Management Console (Advanced Mode) Managing Windows.
Ben Fletcher Mark Rhodes. Windows Management Framework 3.0 Microsoft Online Services Sign-in Assistant All the latest updates Windows Azure AD Module.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
PowerShell for Cyber Warriors
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Database Development with SQL Server Data Tools (SSDT) Björn Eriksen, Architect Evangelist DPE Microsoft
SharePoint Online and PowerShell?
Using Grsync with Ubuntu Presented by Dave Mawdsley, DACS Member, Linux SIG August 20, 2008 (making rsync easy with a memory key or a server)
PowerShell 5 & Windows 10. What are we covering today? What is PowerShell? Why is PowerShell important? Some simple demos on Windows 10.
ALL THINGS IIS TERRI DONAHUE
Common System Exploits Tom Chothia Computer Security, Lecture 17.
Updating FreeBSD Unix System Administration. Objectives At the end of this session you should be able to: 1. Understand the differences between the CURRENT.
PowerShell Chattanooga
Start-SPPowerShell – Introduction to PowerShell for SharePoint Admins and Developers Paul BAker.
Build Automation with Gradle
PowerShell Introduction Copyright © 2016 – Curt Hill.
Windows Server 8 beta og Windows PowerShell 3.0
Introduction to ASP By “FlyingBono” 2009_01 By FlyingBono 2009_01
Version control, using Git
TechEd /3/2018 4:18 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
New Tricks for Old Dogs: The SharePoint Framework (SPFx)
Fun with Reporting Services Tools
Pentesting with Powershell
SharePoint Saturday Omaha April 2016
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Extending and enhancing PowerShell features with fantastic results
Backtrack Metasploit and SET
Web Application Penetration Testing ‘17
PowerShell Best Practices for SQL DBA’s
Mass Hunting and exploitation with powershell
Penetration Testing & Network Defense
Michael Wall Senior DBA, Great Western Malting
Securing web applications Externally
This is the slide shown before the presentation starts
PNW SQL Users Group August 10th, 2011
Samuel Kastberg Scripting a BizTalk Server installation
Presentation transcript:

EXCELLENCE AS STANDARD PowerShell Fu with Metasploit “Interactive PowerShell Sessions in Metasploit” 4 th July 2015 Presented to SteelCon Presented by Ben Turner & Dave Hardy

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? o Dave o Ben :: WHOAMI /groups o Hacker / Penetration Tester Nettitude Limited: 1 Jephson Court Tancred Close Leamington Spa Warwickshire CV31 3RZ Nettitude Inc: 222 Broadway 19th Floor New York NY10038

EXCELLENCE AS STANDARD What is Metasploit?

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? o Defacto penetration testing framework!! ::

EXCELLENCE AS STANDARD What is Powershell?

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: PowerShell Command prompt on steroids!!

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? o Introduced in May 2009, PowerShell version 1.0 was released on Vista -Object-Oriented -Incorporates.NET Objects and Forms -More Functions compared to cmd.exe and VBScript. -More Extensible via cmdlets, plugins. -Background Jobs :: PowerShell

EXCELLENCE AS STANDARD Why do we need PowerShell?

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? Examples are many, but here’s a few notable ones o Windows Server 2012 Core o It is possible to re add the GUI, but it needs a reboot  o Windows Nano Server o A cut down minimal ‘JeOS’ build of Windows Server, manageable via PowerShell/DSC o PowerShell 5 o So many new features and cmdlets, but most notable online repositories, ‘apt-get’ for Windows o New versions of Windows Server, aka Server 2016 default to a core install o PowerShell is at the ‘Heart’ of the OS now o Allow us to do so many cool things, and ‘MOSTLY’ undetected o SSH Support is coming! ::Microsoft has really got behind PowerShell

EXCELLENCE AS STANDARD Why should pentesters use PowerShell?

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? o PowerSploit, PowerTools, Nishang, Inveigh, Powercat, Get-Packet (Wireshark) o o o o o o o o o o o o :: PowerShell-Based Tools

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? o Not much…We could execute one PowerShell script at a time and get results o Slow, not very intuitive o Nothing preserved between running scripts <– This is important! :: What did we have before in Metasploit?

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: Demo Environment

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: Demo – Old Way

EXCELLENCE AS STANDARD Some background

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? “Background – Development Evolution” Bourne out of the need to easily import tools like PowerSploit into a PoSH session Developed scripts to achieve, but physical or RDP access was required Why not use Metasploit, developed POC to return a PoSH session, with PowerCat :: The old way functional, but in no way ideal!!

EXCELLENCE AS STANDARD So whats new!!

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: MSF Interactive PowerShell Sessions “We have developed, for Metasploit a PowerShell session that gives us an ‘On the Box’ like session to run PowerShell commands, modules and scripts”

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? “This was not a trivial task” 7 new pull requests 10 new modules/payloads/classes added to Metasploit git repository 178 comments, suggestions, @sempervictus :: MSF Interactive PowerShell Sessions

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? “We have added functionality to ‘Weaponise’ the PowerShell session” :: AND………

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? “Everything is done in memory” No Pesky Anti-Virus Interference Most Antivirus doesn't see inside PowerShell Sessions. :: MSF Interactive PowerShell Sessions

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: Demo – New Way

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: Powerfun Code (Lines 1 – 37)

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: Powerfun Code (Lines 38 – 75)

EXCELLENCE AS STANDARD Further Development

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? “New Metasploit Pull Requests” 64 bit PowerShell sessions SSL support for all payloads Reverse HTTP that is proxy aware Load_Script – Silver Bullet Simple POST modules Re-writing of ‘mixin’ modules :: We have not rested on our Laurels (or Hardy’s)

EXCELLENCE AS STANDARD Demo 64bit and LOAD_SCRIPT module

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: Demo – 64bit Payloads & Load_Script Module

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: Demo – Proxy Aware HTTP Payload

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: How to write a simple Post Module

EXCELLENCE AS STANDARD Blue Team Approach

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? “It is possible to stop this attack” Close monitoring of eventlog GPO – Blacklist Powershell.exe Local Windows Firewall ‘Egress’ rules :: Time to be responsible hackers

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? Close monitoring of eventlog :: Time to be responsible hackers Would only detect initial script

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? GPO – Blacklist Powershell.exe :: Time to be responsible hackers

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? Local Windows Firewall ‘Egress’ rules :: Time to be responsible hackers

EXCELLENCE AS STANDARD :: HOW ARE BUSINESSES EVOLVING? :: We have not rested on our Laurels (or Hardy’s)

EXCELLENCE AS STANDARD Any Questions?