SlideShare a Scribd company logo
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

More Related Content

Similar to PowerShell Defcon for Cybersecurity Topics

Building Security into Your Workflow with InSpec
Building Security into Your Workflow with InSpecBuilding Security into Your Workflow with InSpec
Building Security into Your Workflow with InSpec
Mandi Walls
 
Open Source Cyber Weaponry
Open Source Cyber WeaponryOpen Source Cyber Weaponry
Open Source Cyber Weaponry
Joshua L. Davis
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, PowershellRoo7break
 
1 artem mygaiev - testing open-source software in embedded devices
1   artem mygaiev - testing open-source software in embedded devices1   artem mygaiev - testing open-source software in embedded devices
1 artem mygaiev - testing open-source software in embedded devices
Ievgenii Katsan
 
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
Hackito Ergo Sum
 
EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22
MichaelM85042
 
State of virtualisation -- 2012
State of virtualisation -- 2012State of virtualisation -- 2012
State of virtualisation -- 2012
Jonathan Sinclair
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopersBryan Cafferky
 
Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworksphanleson
 
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B KuteUnit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Tushar B Kute
 
Magento infrastructure by OpsWay
Magento infrastructure by OpsWayMagento infrastructure by OpsWay
Magento infrastructure by OpsWay
OpsWay
 
metaploit framework
metaploit frameworkmetaploit framework
metaploit frameworkLe Quyen
 
A Xen Case Study
A Xen Case StudyA Xen Case Study
A Xen Case Study
Kris Buytaert
 
Introducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkitIntroducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkit
jaredhaight
 
Automating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShellAutomating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShell
EnclaveSecurity
 
Metasploit (Module-1) - Getting Started With Metasploit
Metasploit (Module-1) - Getting Started With MetasploitMetasploit (Module-1) - Getting Started With Metasploit
Metasploit (Module-1) - Getting Started With Metasploit
Anurag Srivastava
 
InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017
Mandi Walls
 
2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red Hat2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red Hat
Shawn Wells
 
Finalppt metasploit
Finalppt metasploitFinalppt metasploit
Finalppt metasploitdevilback
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Qualcomm Developer Network
 

Similar to PowerShell Defcon for Cybersecurity Topics (20)

Building Security into Your Workflow with InSpec
Building Security into Your Workflow with InSpecBuilding Security into Your Workflow with InSpec
Building Security into Your Workflow with InSpec
 
Open Source Cyber Weaponry
Open Source Cyber WeaponryOpen Source Cyber Weaponry
Open Source Cyber Weaponry
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, Powershell
 
1 artem mygaiev - testing open-source software in embedded devices
1   artem mygaiev - testing open-source software in embedded devices1   artem mygaiev - testing open-source software in embedded devices
1 artem mygaiev - testing open-source software in embedded devices
 
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
 
EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22
 
State of virtualisation -- 2012
State of virtualisation -- 2012State of virtualisation -- 2012
State of virtualisation -- 2012
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopers
 
Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworks
 
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B KuteUnit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
 
Magento infrastructure by OpsWay
Magento infrastructure by OpsWayMagento infrastructure by OpsWay
Magento infrastructure by OpsWay
 
metaploit framework
metaploit frameworkmetaploit framework
metaploit framework
 
A Xen Case Study
A Xen Case StudyA Xen Case Study
A Xen Case Study
 
Introducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkitIntroducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkit
 
Automating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShellAutomating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShell
 
Metasploit (Module-1) - Getting Started With Metasploit
Metasploit (Module-1) - Getting Started With MetasploitMetasploit (Module-1) - Getting Started With Metasploit
Metasploit (Module-1) - Getting Started With Metasploit
 
InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017InSpec Workflow for DevOpsDays Riga 2017
InSpec Workflow for DevOpsDays Riga 2017
 
2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red Hat2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red Hat
 
Finalppt metasploit
Finalppt metasploitFinalppt metasploit
Finalppt metasploit
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
 

Recently uploaded

Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 

Recently uploaded (20)

Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 

PowerShell Defcon for Cybersecurity Topics

  • 1. PowerShell David Kennedy (ReL1K) Josh Kelley (Winfang) http://www.secmaniac.com Twitter: dave_rel1k winfang98
  • 2. 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 
  • 3. 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.
  • 4. Special Thanks Special thanks to IronGeek and Kathy Peters
  • 5. 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.
  • 6. If you haven’t seen it..
  • 7. 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.
  • 8. 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.
  • 9. 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.
  • 11. 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.
  • 12. 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…
  • 13. 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.
  • 14. 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.
  • 16. 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...
  • 17. DEMO – PowerShell based SAMDump
  • 18. PowerShell SAMDump • Meterpreter based module, will dump the SAM database purely through powershell. • Works on all operating systems, both x86 and 64 bit.
  • 19. SET v0.6 – Codename “Arnold Palmer”
  • 20. 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.
  • 21. SET DEMO USB HID Attack Vector
  • 22. USB HID Attack Vector • Drop a payload onto a system either through PowerShell or WSCRIPT. • Automatic creation of attack vector through SET
  • 23. Integrating into Existing Hardware • Most new keyboards have integrated USB Hubs.
  • 24. All put together… • Keyboard still works perfectly… We have our malicious stuff just sitting there waiting…
  • 25. SET DEMO Java Applet Attack Vector
  • 26. 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!
  • 27. 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.
  • 28. Future Plans • Process injection and code injection capabilities within PowerShell. • Ability to deploy security baselines to multiple systems and ensure enforcement.
  • 29.
  • 31. Thanks to Kathy Peters Be sure to check out: http://www.secmaniac.com Twitter: dave_rel1k winfang98