Skip to content
Snippets Groups Projects
Commit 45f49613 authored by iliya.saroukha's avatar iliya.saroukha :first_quarter_moon:
Browse files

feat: state of the art and impl done

parent 23f28bc6
Branches
No related tags found
No related merge requests found
...@@ -93,7 +93,7 @@ of a computer system **without being detected**"_ [^2] ...@@ -93,7 +93,7 @@ of a computer system **without being detected**"_ [^2]
| \textcolor{teal}{User mode} | \textcolor{red}{Kernel mode} | | \textcolor{teal}{User mode} | \textcolor{red}{Kernel mode} |
|--------------- | --------------- | |--------------- | --------------- |
| `LD_PRELOAD` library hijacking | Syscall table _hooking_ | | `LD_PRELOAD` library hijacking | Syscall table _hooking_ |
| Patching de binaire \footnotesize (e.g. `su`, `passwd`) | Injection de modules/pilotes malicieux \footnotesize(GNU/Linux, Windows) | | Binary patching \footnotesize (e.g. `su`, `passwd`) | Injection de modules/pilotes malicieux \footnotesize(GNU/Linux, Windows) |
[^2]: [Oxford English Dictionary, s.v. "rootkit (n.)," December 2024](https://doi.org/10.1093/OED/6892331220) [^2]: [Oxford English Dictionary, s.v. "rootkit (n.)," December 2024](https://doi.org/10.1093/OED/6892331220)
...@@ -149,14 +149,37 @@ Est simplement chargé en tant que pilote Windows (`.sys`) ...@@ -149,14 +149,37 @@ Est simplement chargé en tant que pilote Windows (`.sys`)
[^4]: [Subverting Vista™ Kernel For Fun and Profit](https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2008/08/20084218/BH-US-06-Rutkowska.pdf) [^4]: [Subverting Vista™ Kernel For Fun and Profit](https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2008/08/20084218/BH-US-06-Rutkowska.pdf)
## Cloudskulk <!--HACK: à voir si je fais les deux ci-dessous-->
## CoVirt <!--## Cloudskulk-->
<!---->
<!--## CoVirt-->
# Implémentation/_Reverse-Engineering_ # _Reverse-Engineering_
## Hyperviseur sous forme de module noyau chargeable
::: {.incremental}
- Concerne l'architecture x86 pour Intel VT-x
- Détection du CPU et de ses capacités pour la virtualisation (_support for VMX_)
- Appel à `cpuid` avec `eax = 1` (bit 5 de `ecx`)
- Vérification du _"feature control"_ MSR (_"model specific registers"_) pour
déterminer si la virtualisation n'a pas été désactivée depuis le BIOS.
- Initialisation de la région **VMXON** associée à une future VM
- Vérification des valeurs dans les registres de contrôle **CR0** et **CR4**
- Activation de **VMX** à travers le **bit 13** du registre **CR4**
- Exécution de l'instruction **`vmxon`** avec comme opérande l'adresse de la
région allouée et initialisée
:::
## Anatomie d'un _world-switch_ ## Anatomie d'un _world-switch_
- Chaque CPU possèdent une région **VMCS** (_"Virtual Machine Control Structure"_)
- Semblable en tout genre à la région **VMXON**
- Est utilisé pour sauvegarder l'état du CPU ou vCPU à chaque _world-switch_
- VMEntry $\rightarrow$ état du CPU en mode \textcolor{red}{root}
- VMExit $\rightarrow$ état du CPU en mode \textcolor{teal}{non-root}
# Méthodes de détection # Méthodes de détection
## _Timing analysis_ ## _Timing analysis_
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment