SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Keep calm and monitor PowerShell
Major issues with native PowerShell (PS) auditing
Large volume of logs generated (e.g. greater than 100 logs
must be checked to detect a potential brute-force attack)
Users may use PS for legitimate reasons - Numerous logs that are a
combination of malicious PS scripts and legitimate scripts
Limited search capabilities - No filtered search (e.g. tracking
malicious scripts by reading the code, commands invoked, etc.)
No instant alerts upon the execution of malicious commands/scripts
Cannot apply remedial measures when malicious scripts/cmdlets are
detected
The ADAudit Plus approach to detect PowerShell attacks
Performs filtered searches
for malicious PS
commands/scripts
Alerts the admin via
SMS/email
Takes corrective action
Attacker gains access/insider
goes rogue
Runs a malicious script
using PS
Detecting PowerShell-based attacks with ADAudit Plus
Get a bird’s-eye view on all PowerShell scripts
Bird’s-eye view of scripts and
commands executed by users
Granular search based on users, commands invoked, and
more
A classic brute-force attack on the administrator account
• The simplicity of a brute-force attack is that a malicious actor can try numerous
predictable and vulnerable password patterns to compromise a user’s password
• Often these attacks involve manually keying in a password during native logons,
which can raise suspicion due to the rise in the number of logon failures
• But with PowerShell, millions of passwords can be brute-forced:
– And the administrator account (with the SID 500) is likely the target, because these
accounts can never be deleted from Active Directory and have no lockout policy!
Detecting PowerShell-based brute-force attacks with ADAudit Plus
Perform granular
searches about users
who executed PS
scripts, and get the
script path
Find the
exact script
code
Search based
on commands
invoked
A domain password spray attack using PowerShell
• A domain password spray attack could be a slightly more advanced version of a
typical brute-force attack
• In a password spray attack, an attacker specifies an entire password list or a single
password, and performs a spray attempt on all accounts within the domain
• The password spray is performed very cautiously to not lockout any account and is
within the lockout threshold, and there is always a 30-minute wait between sprays
(which can be modified based on the lockout observation window)
Detecting password spray attacks with ADAudit Plus
A code block in the
script to get the
lockout counter
reset time
Find details like the
name, SID of
account who ran
the script, and more
Find complete
script details
Specific script functions (like finding the lockout observation window) can be detected
with ADAudit Plus, and corrective actions (like changing the lockout observation time )
can be immediately performed to counter the attack attempt
Privilege escalation attacks using PowerShell
• PowerShell is not only used for password-based attacks, but for post-
exploitation activities, like privilege escalation as well
• Powerup is a PowerShell tool that allows a malicious actor, with the
help of PowerShell script, to install and execute a Windows Installer
(MSI) application
• The MSI application, when run, offers a GUI to secretly add a backdoor
user to any group within Active Directory
Detecting privilege escalation attacks with ADAudit Plus
Function to get a list of
unattended install files
(that may have
deployment credentials)
for privilege escalation
Function to write out
a pre-compiled MSI
installer that
prompts for
user/group addition
Function to
get a list of
exploitable
services
Bypassing execution policies with PowerShell
• The starting point before running any malicious PowerShell script is
bypassing the default execution policy
• The execution policy, if set to restricted, prevents malicious actors
from running PowerShell scripts/code that are not authorized by
Microsoft or are not from verified sources
• But it is also extremely easy to bypass these policies; all you need to do
is run the command Set-ExecutionPolicy unrestricted, and that’s it!
Any malicious code can now be executed without any hindrance
Detecting execution policy bypass attempts with ADAudit Plus
Search for bypassing
commands and which
user invoked it
Find the exact
commands run,
values changed, etc.
Attacking Exchange Servers with PowerShell
• PowerShell can be used to attack not only Active Directory, but hybrid environments,
too – in this case, Exchange or Office 365
• MailSniper is a free tool that can be used to perform guessing attacks to
compromise domains and usernames; it can also perform a password spray attack
on the accounts that have a mailbox in the Exchange Server
• And once a user is compromised, the credentials can be used to perform a global
mail search, and write out emails (in a CSV file) containing sensitive data (logon
credentials)
Discovering Exchange/0ffice365 attacks with ADAudit Plus
Get credential
command, which
provides a dialog
box to enter
account credentials
An Invoke-
WebRequest to
connect to an
Exchange Server
A GlobalMailSearch
attempt to read emails
being passed within an
organization
Get-Credential: This command can be used by an attacker to obtain a user's credentials.
An unassuming user, upon seeing a dialog box prompting for credentials, will enter the
required details under the impression that it is a legitimate request
There is more than one way to leverage PowerShell for attacks
Detecting remote PowerShell attempts, version downgrades, and third-party
attack toolkit use with ADAudit Plus
An attempt to
create a PS remote
session to remotely
execute commands
Often, a first step in
PSRemote attacks:
enabling remoting
within PowerShell
A PowerShell version
downgrade attempt to enable
an earlier version of PS that
lacks essential security
features
Invoking a third party
tool (Mimikatz) for
post-exploitation
activities
Set up customized PowerShell alerts with ADAudit Plus
Instant PowerShell-based alerts
Set threshold-
based alerts
Granularly filter
alerts based on
various
parameters
Instantly notify
the admin/take
corrective action
PowerShell-based attacks are on the rise. It is crucial to have a bird’s-eye view of all
PowerShell-based activities and a strong 24x7 defense mechanism
Stay alert with
Abhilash Mamidela
abi@manageengine.com
Get your free trial!

Weitere ähnliche Inhalte

Was ist angesagt?

Goethe-Zertifikat B2 - Cover
Goethe-Zertifikat B2 - CoverGoethe-Zertifikat B2 - Cover
Goethe-Zertifikat B2 - Cover
Mads Knudsen
 
1 システム開発の基礎 第1章 システム開発の基礎知識(1)
1 システム開発の基礎 第1章 システム開発の基礎知識(1)1 システム開発の基礎 第1章 システム開発の基礎知識(1)
1 システム開発の基礎 第1章 システム開発の基礎知識(1)
Enpel
 

Was ist angesagt? (20)

Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
 
Manga Kissxsis Tomo 15
Manga Kissxsis Tomo 15Manga Kissxsis Tomo 15
Manga Kissxsis Tomo 15
 
Zagor nemilosrdni jess (extra 289)
Zagor nemilosrdni jess (extra 289)Zagor nemilosrdni jess (extra 289)
Zagor nemilosrdni jess (extra 289)
 
MenusConejoNegro.pdf
MenusConejoNegro.pdfMenusConejoNegro.pdf
MenusConejoNegro.pdf
 
ZS - 0221 - Teks Viler - VRAC DIJABLERO
ZS - 0221 - Teks Viler - VRAC DIJABLEROZS - 0221 - Teks Viler - VRAC DIJABLERO
ZS - 0221 - Teks Viler - VRAC DIJABLERO
 
Mister NO VC 046 - Makao
Mister NO VC 046 - MakaoMister NO VC 046 - Makao
Mister NO VC 046 - Makao
 
Veliki Blek L 063 - Pobunjenik
Veliki Blek L 063 - PobunjenikVeliki Blek L 063 - Pobunjenik
Veliki Blek L 063 - Pobunjenik
 
CとGo -Go言語のご紹介-
CとGo -Go言語のご紹介-CとGo -Go言語のご紹介-
CとGo -Go言語のご紹介-
 
Goethe-Zertifikat B2 - Cover
Goethe-Zertifikat B2 - CoverGoethe-Zertifikat B2 - Cover
Goethe-Zertifikat B2 - Cover
 
Chse certificate
Chse certificateChse certificate
Chse certificate
 
Goethe Zertifikat B2
Goethe Zertifikat B2Goethe Zertifikat B2
Goethe Zertifikat B2
 
Zagor Ludens Maxi 23 - Legija ubojica
Zagor Ludens Maxi   23 - Legija ubojicaZagor Ludens Maxi   23 - Legija ubojica
Zagor Ludens Maxi 23 - Legija ubojica
 
Pengenalan Git
Pengenalan GitPengenalan Git
Pengenalan Git
 
1 システム開発の基礎 第1章 システム開発の基礎知識(1)
1 システム開発の基礎 第1章 システム開発の基礎知識(1)1 システム開発の基礎 第1章 システム開発の基礎知識(1)
1 システム開発の基礎 第1章 システム開発の基礎知識(1)
 
VC - Dylan Dog - 126 - GOLGOTA
VC - Dylan Dog - 126 - GOLGOTAVC - Dylan Dog - 126 - GOLGOTA
VC - Dylan Dog - 126 - GOLGOTA
 
Khazina e-ruhaniyaat (feb'17)
Khazina e-ruhaniyaat (feb'17)Khazina e-ruhaniyaat (feb'17)
Khazina e-ruhaniyaat (feb'17)
 
Zagor LUDSP 21 Crni plamen
Zagor LUDSP 21 Crni plamenZagor LUDSP 21 Crni plamen
Zagor LUDSP 21 Crni plamen
 
Vajat erp 128
Vajat erp 128Vajat erp 128
Vajat erp 128
 
Khawateen Digest February 2023.pdf
Khawateen Digest February 2023.pdfKhawateen Digest February 2023.pdf
Khawateen Digest February 2023.pdf
 
Advanced Git
Advanced GitAdvanced Git
Advanced Git
 

Ähnlich wie IT security : Keep calm and monitor PowerShell

Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.ppt
SilverGold16
 
System security by Amin Pathan
System security by Amin PathanSystem security by Amin Pathan
System security by Amin Pathan
aminpathan11
 

Ähnlich wie IT security : Keep calm and monitor PowerShell (20)

Owasp first5 presentation
Owasp first5 presentationOwasp first5 presentation
Owasp first5 presentation
 
Owasp first5 presentation
Owasp first5 presentationOwasp first5 presentation
Owasp first5 presentation
 
Ch07 Access Control Fundamentals
Ch07 Access Control FundamentalsCh07 Access Control Fundamentals
Ch07 Access Control Fundamentals
 
Andrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.pptAndrews whitakrer lecture18-security.ppt
Andrews whitakrer lecture18-security.ppt
 
OWASP Secure Coding
OWASP Secure CodingOWASP Secure Coding
OWASP Secure Coding
 
Security testing
Security testingSecurity testing
Security testing
 
Security testing
Security testingSecurity testing
Security testing
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top Ten
 
Security In PHP Applications
Security In PHP ApplicationsSecurity In PHP Applications
Security In PHP Applications
 
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain AccessDefcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
 
Introduction to Web Application Security Principles
Introduction to Web Application Security Principles Introduction to Web Application Security Principles
Introduction to Web Application Security Principles
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10
 
I Hunt Sys Admins
I Hunt Sys AdminsI Hunt Sys Admins
I Hunt Sys Admins
 
Заполучили права администратора домена? Игра еще не окончена
Заполучили права администратора домена? Игра еще не оконченаЗаполучили права администратора домена? Игра еще не окончена
Заполучили права администратора домена? Игра еще не окончена
 
System security by Amin Pathan
System security by Amin PathanSystem security by Amin Pathan
System security by Amin Pathan
 
Security testing
Security testingSecurity testing
Security testing
 
AWS Security - An Engineer’s Introduction to AWS Security Auditing using CIS ...
AWS Security - An Engineer’s Introduction to AWS Security Auditing using CIS ...AWS Security - An Engineer’s Introduction to AWS Security Auditing using CIS ...
AWS Security - An Engineer’s Introduction to AWS Security Auditing using CIS ...
 
VAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptxVAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptx
 
Develop, Test & Maintain Secure Systems (While Being PCI Compliant)
Develop, Test & Maintain Secure Systems (While Being PCI Compliant)Develop, Test & Maintain Secure Systems (While Being PCI Compliant)
Develop, Test & Maintain Secure Systems (While Being PCI Compliant)
 
Introduction To Ethical Hacking
Introduction To Ethical HackingIntroduction To Ethical Hacking
Introduction To Ethical Hacking
 

Mehr von ManageEngine

Mehr von ManageEngine (20)

IT security: PowerShell as a cyberattack tool
IT security: PowerShell as a cyberattack toolIT security: PowerShell as a cyberattack tool
IT security: PowerShell as a cyberattack tool
 
There's more than one way to get admin privileges
There's more than one way to get admin privilegesThere's more than one way to get admin privileges
There's more than one way to get admin privileges
 
8 must dos for a perfect privileged account management strategy
8 must dos for a perfect privileged account management strategy8 must dos for a perfect privileged account management strategy
8 must dos for a perfect privileged account management strategy
 
ManageEngine's Patch Manager Plus
ManageEngine's Patch Manager PlusManageEngine's Patch Manager Plus
ManageEngine's Patch Manager Plus
 
Ease out the GDPR adoption with ManageEngine
Ease out the GDPR adoption with ManageEngineEase out the GDPR adoption with ManageEngine
Ease out the GDPR adoption with ManageEngine
 
Major Incident Management in ServiceDesk Plus
Major Incident Management in ServiceDesk PlusMajor Incident Management in ServiceDesk Plus
Major Incident Management in ServiceDesk Plus
 
IT Incident Management in ServiceDesk Plus
IT Incident Management in ServiceDesk PlusIT Incident Management in ServiceDesk Plus
IT Incident Management in ServiceDesk Plus
 
IT Change Management in ServiceDesk Plus
IT Change Management in ServiceDesk PlusIT Change Management in ServiceDesk Plus
IT Change Management in ServiceDesk Plus
 
IT Asset Management in ServiceDesk Plus
IT Asset Management in ServiceDesk PlusIT Asset Management in ServiceDesk Plus
IT Asset Management in ServiceDesk Plus
 
Webinar - How to Get Real-Time Network Management Right?
Webinar - How to Get Real-Time Network Management Right?Webinar - How to Get Real-Time Network Management Right?
Webinar - How to Get Real-Time Network Management Right?
 
Webinar - How to Get Real-Time Network Management Right?
Webinar - How to Get Real-Time Network Management Right?Webinar - How to Get Real-Time Network Management Right?
Webinar - How to Get Real-Time Network Management Right?
 
Desmitificando SNMP Parte-II
Desmitificando SNMP Parte-IIDesmitificando SNMP Parte-II
Desmitificando SNMP Parte-II
 
SNMP Demystified Part-II
SNMP Demystified Part-IISNMP Demystified Part-II
SNMP Demystified Part-II
 
Are Your Mission Critical Applications Really Performing?
Are Your Mission Critical Applications Really Performing?Are Your Mission Critical Applications Really Performing?
Are Your Mission Critical Applications Really Performing?
 
Desmitificando SNMP
Desmitificando SNMPDesmitificando SNMP
Desmitificando SNMP
 
SNMP Demystified Part-I
SNMP Demystified Part-ISNMP Demystified Part-I
SNMP Demystified Part-I
 
How Application Discovery and Dependency Mapping can stop you from losing cus...
How Application Discovery and Dependency Mapping can stop you from losing cus...How Application Discovery and Dependency Mapping can stop you from losing cus...
How Application Discovery and Dependency Mapping can stop you from losing cus...
 
Webinar - The Science Behind Effective Service Catalogues
Webinar - The Science Behind Effective Service CataloguesWebinar - The Science Behind Effective Service Catalogues
Webinar - The Science Behind Effective Service Catalogues
 
Webinar - 8 ways to align IT to your business
Webinar - 8 ways to align IT to your businessWebinar - 8 ways to align IT to your business
Webinar - 8 ways to align IT to your business
 
ManageEngine - Forrester Webinar: Maximize your application performance to en...
ManageEngine - Forrester Webinar: Maximize your application performance to en...ManageEngine - Forrester Webinar: Maximize your application performance to en...
ManageEngine - Forrester Webinar: Maximize your application performance to en...
 

Kürzlich hochgeladen

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Kürzlich hochgeladen (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 

IT security : Keep calm and monitor PowerShell

  • 1. Keep calm and monitor PowerShell
  • 2. Major issues with native PowerShell (PS) auditing Large volume of logs generated (e.g. greater than 100 logs must be checked to detect a potential brute-force attack) Users may use PS for legitimate reasons - Numerous logs that are a combination of malicious PS scripts and legitimate scripts Limited search capabilities - No filtered search (e.g. tracking malicious scripts by reading the code, commands invoked, etc.) No instant alerts upon the execution of malicious commands/scripts Cannot apply remedial measures when malicious scripts/cmdlets are detected
  • 3. The ADAudit Plus approach to detect PowerShell attacks Performs filtered searches for malicious PS commands/scripts Alerts the admin via SMS/email Takes corrective action Attacker gains access/insider goes rogue Runs a malicious script using PS
  • 5. Get a bird’s-eye view on all PowerShell scripts Bird’s-eye view of scripts and commands executed by users Granular search based on users, commands invoked, and more
  • 6. A classic brute-force attack on the administrator account • The simplicity of a brute-force attack is that a malicious actor can try numerous predictable and vulnerable password patterns to compromise a user’s password • Often these attacks involve manually keying in a password during native logons, which can raise suspicion due to the rise in the number of logon failures • But with PowerShell, millions of passwords can be brute-forced: – And the administrator account (with the SID 500) is likely the target, because these accounts can never be deleted from Active Directory and have no lockout policy!
  • 7. Detecting PowerShell-based brute-force attacks with ADAudit Plus Perform granular searches about users who executed PS scripts, and get the script path Find the exact script code Search based on commands invoked
  • 8. A domain password spray attack using PowerShell • A domain password spray attack could be a slightly more advanced version of a typical brute-force attack • In a password spray attack, an attacker specifies an entire password list or a single password, and performs a spray attempt on all accounts within the domain • The password spray is performed very cautiously to not lockout any account and is within the lockout threshold, and there is always a 30-minute wait between sprays (which can be modified based on the lockout observation window)
  • 9. Detecting password spray attacks with ADAudit Plus A code block in the script to get the lockout counter reset time Find details like the name, SID of account who ran the script, and more Find complete script details
  • 10. Specific script functions (like finding the lockout observation window) can be detected with ADAudit Plus, and corrective actions (like changing the lockout observation time ) can be immediately performed to counter the attack attempt
  • 11. Privilege escalation attacks using PowerShell • PowerShell is not only used for password-based attacks, but for post- exploitation activities, like privilege escalation as well • Powerup is a PowerShell tool that allows a malicious actor, with the help of PowerShell script, to install and execute a Windows Installer (MSI) application • The MSI application, when run, offers a GUI to secretly add a backdoor user to any group within Active Directory
  • 12. Detecting privilege escalation attacks with ADAudit Plus Function to get a list of unattended install files (that may have deployment credentials) for privilege escalation Function to write out a pre-compiled MSI installer that prompts for user/group addition Function to get a list of exploitable services
  • 13. Bypassing execution policies with PowerShell • The starting point before running any malicious PowerShell script is bypassing the default execution policy • The execution policy, if set to restricted, prevents malicious actors from running PowerShell scripts/code that are not authorized by Microsoft or are not from verified sources • But it is also extremely easy to bypass these policies; all you need to do is run the command Set-ExecutionPolicy unrestricted, and that’s it! Any malicious code can now be executed without any hindrance
  • 14. Detecting execution policy bypass attempts with ADAudit Plus Search for bypassing commands and which user invoked it Find the exact commands run, values changed, etc.
  • 15. Attacking Exchange Servers with PowerShell • PowerShell can be used to attack not only Active Directory, but hybrid environments, too – in this case, Exchange or Office 365 • MailSniper is a free tool that can be used to perform guessing attacks to compromise domains and usernames; it can also perform a password spray attack on the accounts that have a mailbox in the Exchange Server • And once a user is compromised, the credentials can be used to perform a global mail search, and write out emails (in a CSV file) containing sensitive data (logon credentials)
  • 16. Discovering Exchange/0ffice365 attacks with ADAudit Plus Get credential command, which provides a dialog box to enter account credentials An Invoke- WebRequest to connect to an Exchange Server A GlobalMailSearch attempt to read emails being passed within an organization
  • 17. Get-Credential: This command can be used by an attacker to obtain a user's credentials. An unassuming user, upon seeing a dialog box prompting for credentials, will enter the required details under the impression that it is a legitimate request
  • 18. There is more than one way to leverage PowerShell for attacks
  • 19. Detecting remote PowerShell attempts, version downgrades, and third-party attack toolkit use with ADAudit Plus
  • 20. An attempt to create a PS remote session to remotely execute commands Often, a first step in PSRemote attacks: enabling remoting within PowerShell A PowerShell version downgrade attempt to enable an earlier version of PS that lacks essential security features Invoking a third party tool (Mimikatz) for post-exploitation activities
  • 21. Set up customized PowerShell alerts with ADAudit Plus
  • 22. Instant PowerShell-based alerts Set threshold- based alerts Granularly filter alerts based on various parameters Instantly notify the admin/take corrective action
  • 23. PowerShell-based attacks are on the rise. It is crucial to have a bird’s-eye view of all PowerShell-based activities and a strong 24x7 defense mechanism
  • 24. Stay alert with Abhilash Mamidela abi@manageengine.com Get your free trial!