SlideShare a Scribd company logo
ROMANIAN
POWERSHELL
USER GROUP
5th Meeting – February 28th 2017
Network Mapping with PowerShell
Neacsu Costin-Alin
PS C:> $env:USERNAME
 -not Sysadmin
 -not Developer
PS C:> $env:POSITION
 Vulnerability Assessment Engineer at NTT Data Services, formerly Dell Services
PS C:> $env:CONTACT
 Twitter: @z00v4sh
 LinkedIn: https://www.linkedin.com/in/caneacsu/
 Email: caneacsu@gmail.com
Scenario: Attacker gains access to a station inside
the network.
Question: How to discover additional hosts and
services on the local network ?
 Native to Windows environments
 Built on top of .NET Framework
 Rich set of Cmdlets
 Full access to WMI
 Powerful scripting engine
 Much more ...
PowerShell Version Installed by default on Can be Installed on
PowerShell 1.0 - Windows XP SP2
Windows Server 2003
Windows Vista
Windows Server 2008
PowerShell 2.0 Windows 7
Windows Server 2008 R2
Windows XP SP3
Windows Server 2003 SP2
Windows Vista SP1
PowerShell 3.0 Windows 8
Windows Server 2012
Windows 7 SP1
Windows Server 2008 SP2
Windows Server 2008 R2 SP1
PowerShell 4.0 Windows 8.1
Windows Server 2012 R2
Windows 7 SP1
Windows Server 2008 R2 SP1
Windows Server 2012
PowerShell 5.0 Windows 10
Windows Server 2016
Windows 7 SP1
Windows 8.1
Windows Server 2008 R2 SP1
Windows Server 2012
Windows Server 2012 R2
Local IP(s) Ping Sweep
Port Scanner
Active
Connections
Reverse DNS ARP Scanner
Places to look
Cmdlets .NET Classes
WMI Win32 API
Methods Used
PREREQUISITES
ARP (Address Resolution Protocol)
 Queries IP Addresses for MAC Addresses
 We use ARP Request
 Opcode 1
 Destination MAC: FF-FF-FF-FF-FF-FF
 Ethernet Broadcast Address
Ping
 Network Diagnostic Tool
 Uses ICMP (Internet Control Message Protocol)
 Sends ICMP Echo Request Messages
 Type 8
 Expects ICMP Echo Reply Messages
 Type 0
IP (Internet Protocol)
 Main communications protocol in the Internet Protocol Suite
 Uses either TCP or UDP
TCP (Transmission Control Protocol)
 Connection-oriented (3-Way Handshake)
 Reliable
 Error-checks
 Potentially adds latency
 Uses port numbers to distinguish between requests (0-65535)
UDP (User Datagram Protocol)
 Connectionless
 Fast
 Error prone
 Also uses port numbers (0-65535)
DNS (Domain Name System)
 Hierarchical decentralized naming system
 Commonly used to resolve hostnames to IP Addresses
 Stores information as records in a database
 Multiple types of records:
 A record : points a hostname to an IPv4 Address
 PTR record: points an IP Address to a hostname
 Also known as Reverse DNS
.NET Framework
 Software Framework developed by Microsoft
 Rich and powerful classes
 Serves as the foundation upon which PowerShell is built
 Extends the functionalities of PowerShell by writing
custom code
WMI (Windows Management
Instrumentation)
 Microsoft's implementation of Web-
Based Enterprise Management
(WBEM) and Common Information
Model (CIM) industry standards
published by the Distributed
Management Task Force (DMTF)
 Provides the interface for
management data and operations
for local or remote computers
Copyright: https://www.blackhat.com/docs/us-15/materials/us-15-Graeber-Abusing-Windows-Management-
Instrumentation-WMI-To-Build-A-Persistent%20Asynchronous-And-Fileless-Backdoor-wp.pdf
Win32 API
 Set of functions provided by the Windows operating system
 Used for resource manipulation
 Exposed through various libraries (kernel32.dll, user32.dll, etc.)
Network Mapping with PowerShell
• Get-NetIPConfiguration
Cmdlet
• System.Net.NetworkInformation.NetworkInterface
.NET class
• Win32_NetworkAdapterConfiguration
WMI
Local IP(s)
DEMO
• Test-Connection
Cmdlet
• System.Net.NetworkInformation.Ping
.NET Class
• Win32_PingStatus
WMI
Ping Sweep
DEMO
•System.Net.Sockets.TcpClient
•System.Net.Sockets.UdpClient
.NET Classes
Port Scanner
DEMO
• Get-NetTCPConnection
Cmdlet
• System.Net.NetworkInformation.SystemTcpConnectionInformation
.NET Class
• MSFT_NetTCPConnection
WMI
Active Connections
DEMO
• Resolve-DnsName
Cmdlet
• System.Net.Dns
.NET Class
Reverse DNS
DEMO
•SendARP(iphlapi.dll)
Win32 API
ARP Scanner
DEMO
Conclusions
 Multiple ways to query the local network
 Different techniques to obtain the same information
 All from non-privilege user
QUESTIONS?
KEEP IN TOUCH
Twitter: @z00v4sh
LinkedIn: https://www.linkedin.com/in/caneacsu/
Email: caneacsu@gmail.com
THANK YOU !

More Related Content

What's hot (20)

PPT
introduction to security
ahmad amiruddin
 
PPTX
Ethical hacking chapter 8 - Windows Vulnerabilities - Eric Vanderburg
Eric Vanderburg
 
PPT
Remote Login
guest095022
 
PPT
Module 2 Foot Printing
leminhvuong
 
PPTX
Ethical hacking Chapter 11 - Exploiting Wireless Networks - Eric Vanderburg
Eric Vanderburg
 
PPTX
Ethical hacking Chapter 9 - Linux Vulnerabilities - Eric Vanderburg
Eric Vanderburg
 
PPTX
Tunneling
Ilan Mindel
 
PPTX
Dhcp, dns and proxy server (1)
Sahira Khan
 
PPTX
Fundamental of Secure Socket Layer (SSL) | Part - 2
Vishal Kumar
 
PPTX
Proxy Presentation
primeteacher32
 
PPTX
Assigning A Static IP Address
Aurelio Eslawan
 
PDF
Meeting 4 : proxy
Syaiful Ahdan
 
PPT
Proxy Servers & Firewalls
Mehdi Poustchi Amin
 
PPT
Operating System Fingerprinting Prevention
dcalhoun1984
 
PPTX
Client server chat application
Piyush Rawat
 
PDF
SHARE_2016_Atlanta_19148_How_IBM
Ernie Gilman
 
PDF
OS Fingerprinting
Rashmika Nawaratne
 
PDF
CEHv7 Question Collection
Manish Luintel
 
PPSX
Banner grabbing
arizonainfotech
 
PPTX
Eternal blue Vulnerability
kandelrc
 
introduction to security
ahmad amiruddin
 
Ethical hacking chapter 8 - Windows Vulnerabilities - Eric Vanderburg
Eric Vanderburg
 
Remote Login
guest095022
 
Module 2 Foot Printing
leminhvuong
 
Ethical hacking Chapter 11 - Exploiting Wireless Networks - Eric Vanderburg
Eric Vanderburg
 
Ethical hacking Chapter 9 - Linux Vulnerabilities - Eric Vanderburg
Eric Vanderburg
 
Tunneling
Ilan Mindel
 
Dhcp, dns and proxy server (1)
Sahira Khan
 
Fundamental of Secure Socket Layer (SSL) | Part - 2
Vishal Kumar
 
Proxy Presentation
primeteacher32
 
Assigning A Static IP Address
Aurelio Eslawan
 
Meeting 4 : proxy
Syaiful Ahdan
 
Proxy Servers & Firewalls
Mehdi Poustchi Amin
 
Operating System Fingerprinting Prevention
dcalhoun1984
 
Client server chat application
Piyush Rawat
 
SHARE_2016_Atlanta_19148_How_IBM
Ernie Gilman
 
OS Fingerprinting
Rashmika Nawaratne
 
CEHv7 Question Collection
Manish Luintel
 
Banner grabbing
arizonainfotech
 
Eternal blue Vulnerability
kandelrc
 

Viewers also liked (20)

PPTX
PowerShell Plus v4.7 Overview
Richard Giles
 
PDF
Practical PowerShell Programming for Professional People - Extended Edition
Ben Ten (0xA)
 
PPTX
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Richard Calderon
 
PPTX
Office 365 & PowerShell - A match made in heaven
Sébastien Levert
 
PDF
Power on, Powershell
Roo7break
 
PPT
Windows Server 2008 (PowerShell Scripting Uygulamaları)
ÇözümPARK
 
PPT
Powershell Seminar @ ITWorx CuttingEdge Club
Essam Salah
 
PDF
PowerShell from *nix user perspective
Juraj Michálek
 
PPT
Managing Virtual Infrastructures With PowerShell
guesta849bc8b
 
PDF
PowerShell UIAtomation
Juraj Michálek
 
PPTX
PowerShell 101
Thomas Lee
 
PPTX
Incorporating PowerShell into your Arsenal with PS>Attack
jaredhaight
 
PPTX
Getting Started With PowerShell Scripting
Ravikanth Chaganti
 
PDF
Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012
Puppet
 
PPT
Introduction to PowerShell
Salaudeen Rajack
 
PPTX
Geek Sync | Using PowerShell with Python and SQL Server
IDERA Software
 
PDF
Gray Hat PowerShell - ShowMeCon 2015
Ben Ten (0xA)
 
PDF
Practical PowerShell Programming for Professional People
Ben Ten (0xA)
 
PPTX
Workshop: PowerShell for Penetration Testers
Nikhil Mittal
 
PPTX
PowerShell 101 - What is it and Why should YOU Care!
Thomas Lee
 
PowerShell Plus v4.7 Overview
Richard Giles
 
Practical PowerShell Programming for Professional People - Extended Edition
Ben Ten (0xA)
 
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Richard Calderon
 
Office 365 & PowerShell - A match made in heaven
Sébastien Levert
 
Power on, Powershell
Roo7break
 
Windows Server 2008 (PowerShell Scripting Uygulamaları)
ÇözümPARK
 
Powershell Seminar @ ITWorx CuttingEdge Club
Essam Salah
 
PowerShell from *nix user perspective
Juraj Michálek
 
Managing Virtual Infrastructures With PowerShell
guesta849bc8b
 
PowerShell UIAtomation
Juraj Michálek
 
PowerShell 101
Thomas Lee
 
Incorporating PowerShell into your Arsenal with PS>Attack
jaredhaight
 
Getting Started With PowerShell Scripting
Ravikanth Chaganti
 
Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012
Puppet
 
Introduction to PowerShell
Salaudeen Rajack
 
Geek Sync | Using PowerShell with Python and SQL Server
IDERA Software
 
Gray Hat PowerShell - ShowMeCon 2015
Ben Ten (0xA)
 
Practical PowerShell Programming for Professional People
Ben Ten (0xA)
 
Workshop: PowerShell for Penetration Testers
Nikhil Mittal
 
PowerShell 101 - What is it and Why should YOU Care!
Thomas Lee
 
Ad

Similar to Network Mapping with PowerShell (20)

PPT
Networking For Application Developers by Roy Kim
Roy Kim
 
PPT
Day2
Jai4uk
 
PPT
Introduction to TCP/IP
Frank Fang Kuo Yu
 
PPT
01204427-scanner.ppt
VarunBehere1
 
PPTX
Packet Analysis - Course Technology Computing Conference
Cengage Learning
 
PPTX
Windows PowerShell.pptx
MuhammadYasirKhan42
 
PDF
Handy Networking Tools and How to Use Them
Sneha Inguva
 
PPTX
Scanning and Enumeration in Cyber Security.pptx
MahdiHasanSowrav
 
PDF
Nmap Hacking Guide
Aryan G
 
PPTX
Detecting Reconnaissance Through Packet Forensics by Shashank Nigam
OWASP Delhi
 
PPTX
linux networking laboratory presentation .pptx
AnuradhaJadiya1
 
PDF
packet traveling (pre cloud)
iman darabi
 
PPT
NW_Tools.ppt
jaba kumar
 
PPT
Port Scanning in computer networks with .ppt
imranahmadrana28
 
PPT
CYBER FORENSICS-scanning and enumuration.ppt
jayaprasanna10
 
PPTX
Null Delhi chapter - Feb 2019
Nikhil Raj
 
PPTX
Recon with Nmap
OWASP Delhi
 
PPT
Linux networking
Armando Reis
 
PPTX
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
Abodahab
 
PPSX
Automating Windows Server 2008 R2 Administration with Windows PowerShell
alexandair
 
Networking For Application Developers by Roy Kim
Roy Kim
 
Day2
Jai4uk
 
Introduction to TCP/IP
Frank Fang Kuo Yu
 
01204427-scanner.ppt
VarunBehere1
 
Packet Analysis - Course Technology Computing Conference
Cengage Learning
 
Windows PowerShell.pptx
MuhammadYasirKhan42
 
Handy Networking Tools and How to Use Them
Sneha Inguva
 
Scanning and Enumeration in Cyber Security.pptx
MahdiHasanSowrav
 
Nmap Hacking Guide
Aryan G
 
Detecting Reconnaissance Through Packet Forensics by Shashank Nigam
OWASP Delhi
 
linux networking laboratory presentation .pptx
AnuradhaJadiya1
 
packet traveling (pre cloud)
iman darabi
 
NW_Tools.ppt
jaba kumar
 
Port Scanning in computer networks with .ppt
imranahmadrana28
 
CYBER FORENSICS-scanning and enumuration.ppt
jayaprasanna10
 
Null Delhi chapter - Feb 2019
Nikhil Raj
 
Recon with Nmap
OWASP Delhi
 
Linux networking
Armando Reis
 
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
Abodahab
 
Automating Windows Server 2008 R2 Administration with Windows PowerShell
alexandair
 
Ad

Recently uploaded (20)

PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
PDF
Python Conference Singapore - 19 Jun 2025
ninefyi
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PDF
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
PPTX
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PDF
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
PPTX
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
Python Conference Singapore - 19 Jun 2025
ninefyi
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Kubernetes - Architecture & Components.pdf
geethak285
 
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 

Network Mapping with PowerShell