SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Downloaden Sie, um offline zu lesen
PowerShell – what every
haXor needs to know
Jameel	
  Haffejee	
  /	
  RC1140	
  	
  
What is PowerShell
Its awesome
Why Should you care ?
 Its installed by default on a growing number of MS OS’s
  Windows 7
  Windows Server 2K8R2
 Optional On Windows XP SP 3
 Its an alternate scriptable way to access the OS
 It’s a unchecked environment at the moment
Accessing PowerShell
•  Can be accessed via the Start Menu or Run
•  Can be called from within batch files
•  Accessed via its hostable core in any supported language
Execution Policies
•  Restricted (Default)
•  Signed
•  Remote Signed
•  Unrestricted
•  Bypass
•  PowerShell Does not require admin privileges to run and
most commands work without the need for admin access.
PowerShell Trinity
 Where it all begins and ends, Get-Help , Get-Command ,Get-
member
Hello World
•  Variables
•  String Types
•  Loops
•  Running a script
•  ISE , Yes is comes with a ISE :P
Poking the System with
PowerShell
 One Liners – Because everyone has to count their
keystrokes till doom
 Accessing windows through WMI and COM
 Making use of Active Directory to index machines on the
network
 What can we do with more than one line
Knock Knock – Is that port open
 No direct PowerShell interfaces so we have to resort to .Net
 Making socket connections in PowerShell
  $tcpclient = new-Object system.Net.Sockets.TcpClient
  $tcpclient.Connect('localhost','80')
 Creating and using a Port Scanner in PowerShell
 Finally setting up a basic bind interface to listen on our port of
choice i.e Basic netcat
Breaking Down the front door
 Brute Forcing RDP/SQL with PowerShell
Popped The Cork
  So now that you have access to a PC/Server
what can you do ?
  Dumping Hashes
  Complete control over IIS from the command
line
  Setting up a bot with PowerShell
  Setting up backdoor access in 60 seconds,
Assuming you have physical access (Still
possible without physical access as well )
Questions and Contact Info
Twi3er	
  :	
  h3p://twi3er.com/RC1140	
  
Mail	
  	
  	
  	
  	
  	
  :	
  jameel@superuser.co.za	
  
IRC 	
  	
  	
  	
  	
  :	
  #ZaCon	
  (On	
  Atrum)	
  
	
  	
  	
  	
  	
  	
  	
  #PowerShell	
  (On	
  FreeNode)	
  
Code	
  	
  	
  	
  	
  :	
  h3p://github.com/rc1140/zacon	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Networking session-4-final by aravind.R
Networking session-4-final by aravind.RNetworking session-4-final by aravind.R
Networking session-4-final by aravind.RNavaneethan Naveen
 
Configuration of Ansible - DevOps: Beginner's Guide To Automation With Ansible
Configuration of Ansible - DevOps: Beginner's Guide To Automation With AnsibleConfiguration of Ansible - DevOps: Beginner's Guide To Automation With Ansible
Configuration of Ansible - DevOps: Beginner's Guide To Automation With AnsibleTetraNoodle_Tech
 
CNIT 124: Ch 8: Exploitation
CNIT 124: Ch 8: ExploitationCNIT 124: Ch 8: Exploitation
CNIT 124: Ch 8: ExploitationSam Bowne
 
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูล
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูลบทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูล
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูลPriew Chakrit
 
Addmi 12-basic scan
Addmi 12-basic scanAddmi 12-basic scan
Addmi 12-basic scanodanyboy
 
[TUTORIAL] PetitParser
[TUTORIAL] PetitParser[TUTORIAL] PetitParser
[TUTORIAL] PetitParserESUG
 
Post exploitation using powershell
Post exploitation using powershellPost exploitation using powershell
Post exploitation using powershellMihir Shah
 
Python Network Programming – Course Applications Guide
Python Network Programming – Course Applications GuidePython Network Programming – Course Applications Guide
Python Network Programming – Course Applications GuideMihai Catalin Teodosiu
 
Recon with Nmap
Recon with Nmap Recon with Nmap
Recon with Nmap OWASP Delhi
 

Was ist angesagt? (18)

PHPCS (PHP Code Sniffer)
PHPCS (PHP Code Sniffer)PHPCS (PHP Code Sniffer)
PHPCS (PHP Code Sniffer)
 
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
 
Root via XSS
Root via XSSRoot via XSS
Root via XSS
 
Networking session-4-final by aravind.R
Networking session-4-final by aravind.RNetworking session-4-final by aravind.R
Networking session-4-final by aravind.R
 
gfd
gfdgfd
gfd
 
Configuration of Ansible - DevOps: Beginner's Guide To Automation With Ansible
Configuration of Ansible - DevOps: Beginner's Guide To Automation With AnsibleConfiguration of Ansible - DevOps: Beginner's Guide To Automation With Ansible
Configuration of Ansible - DevOps: Beginner's Guide To Automation With Ansible
 
CNIT 124: Ch 8: Exploitation
CNIT 124: Ch 8: ExploitationCNIT 124: Ch 8: Exploitation
CNIT 124: Ch 8: Exploitation
 
Hands on experience Open Journal Installation
Hands on experience Open Journal InstallationHands on experience Open Journal Installation
Hands on experience Open Journal Installation
 
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูล
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูลบทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูล
บทที่ 3 การเขียนโปรแกรมติดต่อฐานข้อมูล
 
Addmi 12-basic scan
Addmi 12-basic scanAddmi 12-basic scan
Addmi 12-basic scan
 
Ent wiki a short introduction
Ent wiki a short introductionEnt wiki a short introduction
Ent wiki a short introduction
 
Presentation (PPT)
Presentation (PPT)Presentation (PPT)
Presentation (PPT)
 
[TUTORIAL] PetitParser
[TUTORIAL] PetitParser[TUTORIAL] PetitParser
[TUTORIAL] PetitParser
 
Post exploitation using powershell
Post exploitation using powershellPost exploitation using powershell
Post exploitation using powershell
 
Pentesting Cloud Environment
Pentesting Cloud EnvironmentPentesting Cloud Environment
Pentesting Cloud Environment
 
Python Network Programming – Course Applications Guide
Python Network Programming – Course Applications GuidePython Network Programming – Course Applications Guide
Python Network Programming – Course Applications Guide
 
Ddos final part
Ddos final part Ddos final part
Ddos final part
 
Recon with Nmap
Recon with Nmap Recon with Nmap
Recon with Nmap
 

Andere mochten auch

Anexo a demanda impugnacion laudo sunat comprimido
Anexo a demanda impugnacion laudo sunat   comprimidoAnexo a demanda impugnacion laudo sunat   comprimido
Anexo a demanda impugnacion laudo sunat comprimidoPaola Aliaga
 
2010 za con_todor_genov
2010 za con_todor_genov2010 za con_todor_genov
2010 za con_todor_genovJohan Klerk
 
4 pliego reclamo 2015
4 pliego reclamo 20154 pliego reclamo 2015
4 pliego reclamo 2015Paola Aliaga
 
2010 za con_jurgens_van_der_merwe
2010 za con_jurgens_van_der_merwe2010 za con_jurgens_van_der_merwe
2010 za con_jurgens_van_der_merweJohan Klerk
 
2010 za con_daniel_cuthbert
2010 za con_daniel_cuthbert2010 za con_daniel_cuthbert
2010 za con_daniel_cuthbertJohan Klerk
 
2010 za con_georg-christian_pranschke
2010 za con_georg-christian_pranschke2010 za con_georg-christian_pranschke
2010 za con_georg-christian_pranschkeJohan Klerk
 
2010 za con_ian_de_villiers
2010 za con_ian_de_villiers2010 za con_ian_de_villiers
2010 za con_ian_de_villiersJohan Klerk
 
Arts railway station tv exp
Arts railway station tv expArts railway station tv exp
Arts railway station tv expMezbah Uddin
 
Cv paola aliaga 21
Cv paola aliaga 21Cv paola aliaga 21
Cv paola aliaga 21Paola Aliaga
 
Arts railway station tv exp
Arts railway station tv expArts railway station tv exp
Arts railway station tv expMezbah Uddin
 
2010 za con_roelof_temmingh
2010 za con_roelof_temmingh2010 za con_roelof_temmingh
2010 za con_roelof_temminghJohan Klerk
 
2010 za con_haroon_meer
2010 za con_haroon_meer2010 za con_haroon_meer
2010 za con_haroon_meerJohan Klerk
 
2010 za con_ivan_burke
2010 za con_ivan_burke2010 za con_ivan_burke
2010 za con_ivan_burkeJohan Klerk
 
2010 za con_barry_irwin
2010 za con_barry_irwin2010 za con_barry_irwin
2010 za con_barry_irwinJohan Klerk
 
2010 za con_stephen_kreusch
2010 za con_stephen_kreusch2010 za con_stephen_kreusch
2010 za con_stephen_kreuschJohan Klerk
 
Training management
Training managementTraining management
Training managementMezbah Uddin
 

Andere mochten auch (16)

Anexo a demanda impugnacion laudo sunat comprimido
Anexo a demanda impugnacion laudo sunat   comprimidoAnexo a demanda impugnacion laudo sunat   comprimido
Anexo a demanda impugnacion laudo sunat comprimido
 
2010 za con_todor_genov
2010 za con_todor_genov2010 za con_todor_genov
2010 za con_todor_genov
 
4 pliego reclamo 2015
4 pliego reclamo 20154 pliego reclamo 2015
4 pliego reclamo 2015
 
2010 za con_jurgens_van_der_merwe
2010 za con_jurgens_van_der_merwe2010 za con_jurgens_van_der_merwe
2010 za con_jurgens_van_der_merwe
 
2010 za con_daniel_cuthbert
2010 za con_daniel_cuthbert2010 za con_daniel_cuthbert
2010 za con_daniel_cuthbert
 
2010 za con_georg-christian_pranschke
2010 za con_georg-christian_pranschke2010 za con_georg-christian_pranschke
2010 za con_georg-christian_pranschke
 
2010 za con_ian_de_villiers
2010 za con_ian_de_villiers2010 za con_ian_de_villiers
2010 za con_ian_de_villiers
 
Arts railway station tv exp
Arts railway station tv expArts railway station tv exp
Arts railway station tv exp
 
Cv paola aliaga 21
Cv paola aliaga 21Cv paola aliaga 21
Cv paola aliaga 21
 
Arts railway station tv exp
Arts railway station tv expArts railway station tv exp
Arts railway station tv exp
 
2010 za con_roelof_temmingh
2010 za con_roelof_temmingh2010 za con_roelof_temmingh
2010 za con_roelof_temmingh
 
2010 za con_haroon_meer
2010 za con_haroon_meer2010 za con_haroon_meer
2010 za con_haroon_meer
 
2010 za con_ivan_burke
2010 za con_ivan_burke2010 za con_ivan_burke
2010 za con_ivan_burke
 
2010 za con_barry_irwin
2010 za con_barry_irwin2010 za con_barry_irwin
2010 za con_barry_irwin
 
2010 za con_stephen_kreusch
2010 za con_stephen_kreusch2010 za con_stephen_kreusch
2010 za con_stephen_kreusch
 
Training management
Training managementTraining management
Training management
 

Ähnlich wie 2010 za con_jameel_haffejee

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 toolkitjaredhaight
 
Sql Server & PowerShell
Sql Server & PowerShellSql Server & PowerShell
Sql Server & PowerShellAaron Shilo
 
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 BalazsShakacon
 
Hogy jussunk ki lezárt hálózatokból?
Hogy jussunk ki lezárt hálózatokból?Hogy jussunk ki lezárt hálózatokból?
Hogy jussunk ki lezárt hálózatokból?hackersuli
 
Improving your shell usage - 2010
Improving your shell usage - 2010Improving your shell usage - 2010
Improving your shell usage - 2010Chris Sinjakli
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellSharePoint Saturday NY
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellSharePoint Saturday NY
 
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubPowershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubEssam Salah
 
Automating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShellAutomating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShellEnclaveSecurity
 
The Dark Side of PowerShell by George Dobrea
The Dark Side of PowerShell by George DobreaThe Dark Side of PowerShell by George Dobrea
The Dark Side of PowerShell by George DobreaEC-Council
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, PowershellRoo7break
 
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.0jsnover1
 
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 AccessEC-Council
 
Easy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltEasy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltPuppet
 

Ähnlich wie 2010 za con_jameel_haffejee (20)

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
 
Sql Server & PowerShell
Sql Server & PowerShellSql Server & PowerShell
Sql Server & PowerShell
 
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
 
Hogy jussunk ki lezárt hálózatokból?
Hogy jussunk ki lezárt hálózatokból?Hogy jussunk ki lezárt hálózatokból?
Hogy jussunk ki lezárt hálózatokból?
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Windows PowerShell
 
Improving your shell usage - 2010
Improving your shell usage - 2010Improving your shell usage - 2010
Improving your shell usage - 2010
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
 
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with PowershellBrian Jackett: Managing SharePoint 2010 Farms with Powershell
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
 
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubPowershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge Club
 
Automating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShellAutomating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShell
 
Powering up on power shell avengercon - 2018
Powering up on power shell   avengercon - 2018Powering up on power shell   avengercon - 2018
Powering up on power shell avengercon - 2018
 
The Dark Side of PowerShell by George Dobrea
The Dark Side of PowerShell by George DobreaThe Dark Side of PowerShell by George Dobrea
The Dark Side of PowerShell by George Dobrea
 
Basics to Configure NW Device
Basics to Configure NW DeviceBasics to Configure NW Device
Basics to Configure NW Device
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, Powershell
 
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
 
Powering up on PowerShell - BSides Greenville 2019
Powering up on PowerShell  - BSides Greenville 2019Powering up on PowerShell  - BSides Greenville 2019
Powering up on PowerShell - BSides Greenville 2019
 
PowerShell Remoting
PowerShell RemotingPowerShell Remoting
PowerShell Remoting
 
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
 
PowerShell-1
PowerShell-1PowerShell-1
PowerShell-1
 
Easy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltEasy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet Bolt
 

2010 za con_jameel_haffejee

  • 1. PowerShell – what every haXor needs to know Jameel  Haffejee  /  RC1140    
  • 3. Why Should you care ?  Its installed by default on a growing number of MS OS’s   Windows 7   Windows Server 2K8R2  Optional On Windows XP SP 3  Its an alternate scriptable way to access the OS  It’s a unchecked environment at the moment
  • 4. Accessing PowerShell •  Can be accessed via the Start Menu or Run •  Can be called from within batch files •  Accessed via its hostable core in any supported language
  • 5. Execution Policies •  Restricted (Default) •  Signed •  Remote Signed •  Unrestricted •  Bypass •  PowerShell Does not require admin privileges to run and most commands work without the need for admin access.
  • 6. PowerShell Trinity  Where it all begins and ends, Get-Help , Get-Command ,Get- member
  • 7. Hello World •  Variables •  String Types •  Loops •  Running a script •  ISE , Yes is comes with a ISE :P
  • 8. Poking the System with PowerShell  One Liners – Because everyone has to count their keystrokes till doom  Accessing windows through WMI and COM  Making use of Active Directory to index machines on the network  What can we do with more than one line
  • 9. Knock Knock – Is that port open  No direct PowerShell interfaces so we have to resort to .Net  Making socket connections in PowerShell   $tcpclient = new-Object system.Net.Sockets.TcpClient   $tcpclient.Connect('localhost','80')  Creating and using a Port Scanner in PowerShell  Finally setting up a basic bind interface to listen on our port of choice i.e Basic netcat
  • 10. Breaking Down the front door  Brute Forcing RDP/SQL with PowerShell
  • 11. Popped The Cork   So now that you have access to a PC/Server what can you do ?   Dumping Hashes   Complete control over IIS from the command line   Setting up a bot with PowerShell   Setting up backdoor access in 60 seconds, Assuming you have physical access (Still possible without physical access as well )
  • 12. Questions and Contact Info Twi3er  :  h3p://twi3er.com/RC1140   Mail            :  jameel@superuser.co.za   IRC          :  #ZaCon  (On  Atrum)                #PowerShell  (On  FreeNode)   Code          :  h3p://github.com/rc1140/zacon