Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2016-8655 PoC — Linux kernel 资源管理错误漏洞

Source
Associated Vulnerability
Title:Linux kernel 资源管理错误漏洞 (CVE-2016-8655)
Description:Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 4.8.12版本及之前版本存在资源管理错误漏洞。攻击者利用该漏洞获取特权,或造成拒绝服务(释放后重用)。
Description
Android attempt at PoC CVE-2016-8655
Readme
# CVE-2016-5195 GoldFish 3.4
* This works on the goldfish 3.4 Emulator
* Initroot: https://alephsecurity.com/2017/06/07/initroot-moto/ has been released for my device (harpia), so I have stopped porting the exploit to my device (harpia/...).
* I have learnt a large amount from working on this project, but initroot appears to be a better option.

* goldifsh/... has the files to execute this exploit on android.
* goldfish/runme.sh has the steps to deploy and execute the exploit
* mod_exploit/ is a kernel module that creates the exploit shell code (see expmod.c) extracted by goldfish/..
* As a PoC the exploit will call trace_printk to print some text to /sys/kernel/debug/tracing/trace, the correct trace_printk pointer for your goldfish kernel should be set in expmod.c

File Snapshot

[4.0K] /data/pocs/3d7433553588bf103447b72767bd0ca44fb3c588 ├── [4.0K] goldfish │   ├── [2.0K] deviceconfig.h │   ├── [1.4K] exp.c │   ├── [ 66] exp.h │   ├── [1.5K] func.c │   ├── [ 98] func.h │   ├── [1.7K] functest.c │   ├── [ 728] main.c │   ├── [1.8K] Makefile │   ├── [6.7K] pagemap.c │   ├── [ 110] pagemap.h │   ├── [ 106] pointer.h │   ├── [9.6K] race.c │   ├── [ 96] race.h │   ├── [ 211] runme.sh │   ├── [2.3K] spawn.c │   └── [ 99] spawn.h ├── [4.0K] harpia │   ├── [3.9K] deviceconfig.h │   ├── [1.6K] exp.c │   ├── [ 66] exp.h │   ├── [1.5K] func.c │   ├── [ 109] func.h │   ├── [1.7K] functest.c │   ├── [ 728] main.c │   ├── [2.0K] Makefile │   ├── [4.0K] marsh │   │   ├── [ 15K] appspawn.c │   │   ├── [ 817] check.c │   │   ├── [3.6K] dirtycow.h │   │   ├── [ 821] Makefile │   │   ├── [4.1K] psutils.h │   │   ├── [9.7K] race.c │   │   ├── [ 80] race.h │   │   ├── [ 783] reset.sh │   │   ├── [4.8K] tcfix.c │   │   └── [ 11K] tcfix.o │   ├── [7.0K] pagemap.c │   ├── [ 110] pagemap.h │   ├── [5.5K] pager.c │   ├── [ 106] pointer.h │   ├── [2.3K] spawn.c │   └── [ 99] spawn.h ├── [4.0K] mod_exploit │   ├── [ 399] deviceconfig.h │   ├── [1.8K] expmod.c │   └── [ 651] Makefile ├── [4.0K] mod_nop │   ├── [ 399] deviceconfig.h │   ├── [ 648] Makefile │   └── [1.3K] nop.c ├── [4.0K] rabit_hole │   ├── [6.9K] afterfree │   ├── [6.9K] afterfree2 │   ├── [5.7K] afterfree2.c │   ├── [4.3K] afterfree.c │   ├── [ 413] Android.mk │   ├── [4.0K] android-root-misc │   ├── [ 16K] appspawn │   ├── [ 15K] appspawn.c │   ├── [4.0K] atest │   │   ├── [8.4K] atest │   │   └── [ 99] atest.c │   ├── [ 11K] att │   ├── [9.5K] att2.c │   ├── [ 16K] att3 │   ├── [ 12K] att3.c │   ├── [ 13K] att4.c │   ├── [9.5K] att.c │   ├── [4.0K] bk_mod_exploit │   │   ├── [ 399] deviceconfig.h │   │   ├── [1.7K] expmod.c │   │   ├── [1.5K] expmod.dump │   │   ├── [ 77K] expmod.ko │   │   ├── [ 444] expmod.mod.c │   │   ├── [ 15K] expmod.mod.o │   │   ├── [ 67K] expmod.o │   │   ├── [1.5K] func.c │   │   ├── [ 651] Makefile │   │   ├── [ 63] modules.order │   │   └── [ 0] Module.symvers │   ├── [4.0K] c40b │   │   ├── [ 21K] c40b │   │   ├── [1.0K] deviceconfig.h │   │   ├── [ 17K] exp │   │   ├── [1.3K] exp.c │   │   ├── [2.3K] exp.o │   │   ├── [1.7K] func.c │   │   ├── [ 98] func.h │   │   ├── [2.0K] func.o │   │   ├── [1.5K] funcold.c │   │   ├── [6.6K] functest │   │   ├── [1.7K] functest.c │   │   ├── [ 728] main.c │   │   ├── [ 943] Makefile │   │   ├── [1.4K] Makefile_exp │   │   ├── [ 20] mod.func │   │   ├── [ 187] mod.h │   │   ├── [ 11K] modtest3 │   │   ├── [ 12K] modtest5 │   │   ├── [6.7K] pagemap.c │   │   ├── [5.6K] pagemap.c_old │   │   ├── [ 110] pagemap.h │   │   ├── [4.4K] pagemap.o │   │   ├── [ 106] pointer.h │   │   ├── [9.6K] #race.c# │   │   ├── [9.6K] race.c │   │   ├── [ 96] race.h │   │   ├── [7.2K] race.o │   │   ├── [2.3K] spawn.c │   │   ├── [ 99] spawn.h │   │   └── [2.8K] spawn.o │   ├── [ 12K] checksock │   ├── [4.8K] checksock.c │   ├── [ 11K] chocoboandroid │   ├── [6.7K] chocobo_android.c │   ├── [6.0K] chocoboandroid.c │   ├── [6.7K] chocobo_check1.c │   ├── [ 20K] chocobo_root.c │   ├── [ 11K] createkeys │   ├── [4.9K] createkeys.c │   ├── [6.6K] createpackets │   ├── [2.0K] createpackets.c │   ├── [4.0K] CVE-2015-3636 │   ├── [ 14K] dat │   ├── [ 11K] dirtycow │   ├── [3.6K] dirtycow.c │   ├── [3.6K] dirtycow.h │   ├── [ 735] dumpstat │   ├── [4.0K] exp │   │   ├── [1.0K] deviceconfig.h │   │   ├── [ 918] exp.c │   │   ├── [ 856] func.c │   │   ├── [ 98] func.h │   │   ├── [1.5K] funcold.c │   │   ├── [6.6K] functest │   │   ├── [1.7K] functest.c │   │   ├── [ 52] lol.func │   │   ├── [ 385] lol.h │   │   ├── [1.4K] Makefile │   │   ├── [5.9K] pagemap.c │   │   ├── [ 110] pagemap.h │   │   ├── [ 106] pointer.h │   │   ├── [9.2K] race.c │   │   └── [ 96] race.h │   ├── [4.0K] expit │   │   ├── [ 494] checkexe.c │   │   ├── [ 106] checkexe.h │   │   ├── [1.0K] deviceconfig.h │   │   ├── [ 17K] exp │   │   ├── [ 17K] exp2 │   │   ├── [ 954] exp.c │   │   ├── [ 856] func.c │   │   ├── [4.5K] func.dump │   │   ├── [ 98] func.h │   │   ├── [1.5K] funcold.c │   │   ├── [6.6K] functest │   │   ├── [1.7K] functest.c │   │   ├── [ 52] lol.func │   │   ├── [ 385] lol.h │   │   ├── [1.4K] Makefile │   │   ├── [ 240] mod.func │   │   ├── [1.5K] mod.h │   │   ├── [5.9K] pagemap.c │   │   ├── [ 110] pagemap.h │   │   ├── [ 106] pointer.h │   │   ├── [9.3K] race.c │   │   └── [ 96] race.h │   ├── [7.1K] fdsa2 │   ├── [4.0K] harpiastrucs │   │   ├── [314K] goof │   │   ├── [314K] goof2 │   │   ├── [370K] harpiastructs │   │   ├── [2.7K] internal.h │   │   ├── [4.0K] kcore │   │   │   ├── [115K] elf.h │   │   │   ├── [7.6K] getkcore.c │   │   │   ├── [ 238] getkcore.h │   │   │   └── [ 107] Makefile │   │   ├── [ 624] Makefile │   │   ├── [ 627] Makefile2 │   │   ├── [ 314] Makefile.enterprise │   │   ├── [ 16K] module.c │   │   ├── [ 16K] module.c2 │   │   ├── [ 0] module.dwarf │   │   ├── [185K] module.ko │   │   ├── [ 521] module.mod.c │   │   ├── [ 18K] module.mod.o │   │   ├── [172K] module.o │   │   ├── [ 64] modules.order │   │   ├── [ 0] Module.symvers │   │   ├── [ 200] run.sh │   │   ├── [ 891] sock1 │   │   ├── [ 935] sock2 │   │   └── [314K] struct │   ├── [6.3K] highlow │   ├── [1.4K] highlow.c │   ├── [6.5K] ip │   ├── [2.8K] ip.c │   ├── [6.5K] ip_full │   ├── [2.8K] ip_full.c │   ├── [6.4K] ip_new │   ├── [2.3K] ip_new.c │   ├── [6.6K] ip_thread │   ├── [2.5K] ip_thread.c │   ├── [6.4K] jiffy │   ├── [ 751] jiffy.c │   ├── [ 11K] keyring │   ├── [4.1K] keyring.c │   ├── [1.9K] launch │   ├── [2.0K] launch_pagemap │   ├── [5.8K] libmytestlib.so │   ├── [4.0K] LiME │   ├── [6.4K] loadlib │   ├── [3.0K] loadlib.c │   ├── [5.1K] lsh.h │   ├── [ 412] Makefile │   ├── [4.0K] mod │   │   ├── [1.2K] bad │   │   ├── [ 235] hello-1.c │   │   ├── [4.7K] hello-4.c │   │   ├── [6.6K] hello-5.c │   │   ├── [4.9K] hello-5.ko │   │   ├── [ 444] hello-5.mod.c │   │   ├── [1.5K] hello-5.mod.o │   │   ├── [4.2K] hello-5.o │   │   ├── [8.2K] hello-7.c │   │   ├── [ 91K] hello-7.ko │   │   ├── [ 444] hello-7.mod.c │   │   ├── [ 15K] hello-7.mod.o │   │   ├── [ 82K] hello-7.o │   │   ├── [6.6K] hello-9.c │   │   ├── [4.8K] hello-9.ko │   │   ├── [ 444] hello-9.mod.c │   │   ├── [1.5K] hello-9.mod.o │   │   ├── [4.2K] hello-9.o │   │   ├── [4.3K] justexec.c │   │   ├── [ 86K] justexec.ko │   │   ├── [ 444] justexec.mod.c │   │   ├── [ 15K] justexec.mod.o │   │   ├── [ 76K] justexec.o │   │   ├── [ 611] Makefile │   │   ├── [ 57] modules.order │   │   └── [ 0] Module.symvers │   ├── [4.0K] mod_exploit │   │   ├── [ 399] deviceconfig.h │   │   ├── [1.5K] expmod.c │   │   ├── [ 76K] expmod.ko │   │   ├── [ 444] expmod.mod.c │   │   ├── [ 15K] expmod.mod.o │   │   ├── [ 67K] expmod.o │   │   ├── [1.5K] func.c │   │   ├── [ 651] Makefile │   │   ├── [ 63] modules.order │   │   └── [ 0] Module.symvers │   ├── [4.0K] mod_exploit_c60b │   │   ├── [1.8K] expmod.c │   │   ├── [ 86K] expmod.ko │   │   ├── [ 729] expmod.mod.c │   │   ├── [ 18K] expmod.mod.o │   │   ├── [ 74K] expmod.o │   │   ├── [1.5K] func.c │   │   ├── [ 686] Makefile │   │   ├── [ 68] modules.order │   │   └── [ 0] Module.symvers │   ├── [4.0K] mod_nop_c60b │   │   ├── [ 399] deviceconfig.h │   │   ├── [1.5K] func.c │   │   ├── [ 696] Makefile │   │   ├── [ 61] modules.order │   │   ├── [ 0] Module.symvers │   │   ├── [1.3K] nop.c │   │   ├── [ 85K] nop.ko │   │   ├── [ 666] nop.mod.c │   │   ├── [ 18K] nop.mod.o │   │   └── [ 73K] nop.o │   ├── [4.0K] modtest │   │   ├── [ 11K] main │   │   ├── [ 642] main.c │   │   ├── [1.8K] main.o │   │   ├── [ 504] Makefile │   │   ├── [5.4K] pagemap.c │   │   ├── [ 110] pagemap.h │   │   ├── [4.1K] pagemap.o │   │   └── [ 106] pointer.h │   ├── [4.0K] modtest2 │   │   ├── [1.4K] func.c │   │   ├── [ 98] func.h │   │   ├── [1.7K] func.o │   │   ├── [ 749] main.c │   │   ├── [1.9K] main.o │   │   ├── [ 515] Makefile │   │   ├── [ 11K] modtest2 │   │   ├── [5.4K] pagemap.c │   │   ├── [ 110] pagemap.h │   │   ├── [4.1K] pagemap.o │   │   └── [ 106] pointer.h │   ├── [4.0K] modtest3 │   │   ├── [1.0K] func.c │   │   ├── [ 98] func.h │   │   ├── [1.7K] func.o │   │   ├── [ 769] main.c │   │   ├── [1.9K] main.o │   │   ├── [ 935] Makefile │   │   ├── [ 24] mod.func │   │   ├── [ 211] mod.h │   │   ├── [2.5M] mod.h.gch │   │   ├── [ 11K] modtest3 │   │   ├── [6.3K] pagemap.c │   │   ├── [5.6K] pagemap.c_old │   │   ├── [ 110] pagemap.h │   │   ├── [4.7K] pagemap.o │   │   └── [ 106] pointer.h │   ├── [4.0K] modtest4 │   │   ├── [1.0K] func.c │   │   ├── [ 98] func.h │   │   ├── [1.7K] func.o │   │   ├── [ 868] main.c │   │   ├── [1.8K] main.o │   │   ├── [ 935] Makefile │   │   ├── [ 24] mod.func │   │   ├── [ 211] mod.h │   │   ├── [2.5M] mod.h.gch │   │   ├── [ 11K] modtest3 │   │   ├── [ 11K] modtest4 │   │   ├── [6.4K] pagemap.c │   │   ├── [5.6K] pagemap.c_old │   │   ├── [ 110] pagemap.h │   │   ├── [4.5K] pagemap.o │   │   └── [ 106] pointer.h │   ├── [4.0K] modtest5 │   │   ├── [1.1K] func.c │   │   ├── [ 98] func.h │   │   ├── [1.7K] func.o │   │   ├── [ 728] main.c │   │   ├── [1.8K] main.o │   │   ├── [ 943] Makefile │   │   ├── [ 20] mod.func │   │   ├── [ 187] mod.h │   │   ├── [2.5M] mod.h.gch │   │   ├── [ 11K] modtest3 │   │   ├── [ 12K] modtest5 │   │   ├── [6.7K] pagemap.c │   │   ├── [5.6K] pagemap.c_old │   │   ├── [ 110] pagemap.h │   │   ├── [4.4K] pagemap.o │   │   ├── [ 106] pointer.h │   │   ├── [2.3K] spawn.c │   │   ├── [ 99] spawn.h │   │   └── [2.8K] spawn.o │   ├── [ 168] mytestlib.c │   ├── [ 22K] nc │   ├── [ 77K] okMake │   ├── [ 11K] pagemap │   ├── [4.4K] pagemap.c │   ├── [ 11K] pagemap_emu │   ├── [4.7K] pagemap_emu.c │   ├── [4.0K] pager │   │   ├── [ 404] Makefile │   │   ├── [ 11K] pager │   │   ├── [ 14K] pager2 │   │   ├── [3.6K] pager2.c │   │   ├── [ 14K] pager3 │   │   ├── [3.2K] pager3.c │   │   ├── [ 14K] pager4 │   │   ├── [4.5K] pager4.c │   │   ├── [4.3K] pager.c │   │   ├── [1.0K] runone │   │   └── [1.0K] runtwo │   ├── [1.0K] pasf │   ├── [4.0K] pizza │   │   └── [ 0] lol │   ├── [3.8K] psutils.h │   ├── [ 11K] race │   ├── [8.6K] race.c │   ├── [ 556] runall │   ├── [ 1] s │   ├── [6.4K] serv │   ├── [1.1K] serv.c │   ├── [6.4K] serv_fork │   ├── [1.5K] serv_fork.c │   ├── [4.0K] shell_marsh │   │   ├── [ 17K] appspawn │   │   ├── [ 15K] appspawn.c │   │   ├── [ 13K] appspawn.c~ │   │   ├── [7.1K] check │   │   ├── [ 817] check.c │   │   ├── [ 815] check.c~ │   │   ├── [3.6K] dirtycow.h │   │   ├── [ 605] Makefile │   │   ├── [ 606] Makefile~ │   │   ├── [4.1K] psutils.h │   │   ├── [4.0K] psutils.h~ │   │   ├── [ 783] reset.sh │   │   ├── [ 756] reset.sh~ │   │   ├── [ 16K] tcfix │   │   ├── [5.1K] #tcfix.c# │   │   ├── [4.4K] tcfix.c │   │   └── [3.9K] tcfix.c~ │   ├── [4.0K] shell_mint │   │   ├── [8.8K] a.out │   │   ├── [1.8K] getshell.c │   │   ├── [1.0K] getshell.c~ │   │   ├── [ 0] main.c │   │   ├── [ 92] Makefile │   │   ├── [ 69] Makefile~ │   │   ├── [9.0K] spawner │   │   ├── [1.4K] spawner.c │   │   └── [2.0K] spawner.c~ │   ├── [4.0K] static_kallsyms │   ├── [ 994] test │   ├── [ 792] testbedlocal.sh │   ├── [ 167] testbed.sh │   ├── [ 17K] testkeyun │   ├── [ 16K] testkeyun.c │   ├── [ 16K] tether │   ├── [3.2K] tether.c │   ├── [ 16K] tetherspawn │   ├── [ 15K] tetherspawn.c │   ├── [4.0K] tether_src │   │   ├── [ 17K] appspawn │   │   ├── [ 14K] appspawn.c │   │   ├── [6.3K] asdf │   │   ├── [ 489] asdf.c │   │   ├── [3.6K] dirtycow.h │   │   ├── [6.5K] hello │   │   ├── [1.1K] hello.c │   │   ├── [ 606] Makefile │   │   ├── [4.0K] psutils.h │   │   ├── [ 16K] reset │   │   ├── [ 36] reseta.sh │   │   ├── [3.6K] reset.c │   │   ├── [ 756] reset.sh │   │   ├── [ 16K] setprop │   │   └── [3.9K] setprop.c │   ├── [4.0K] vola │   └── [4.0K] volatility └── [ 777] README.md 33 directories, 405 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.