nixawk / pentest-wiki

PENTEST-WIKI is a free online security knowledge library for pentesters / researchers. If you have a good idea, please share it with others.
MIT License
3.44k stars 917 forks source link

[Maintaining Access] How to create a iso with backdoor ? #34

Open nixawk opened 5 years ago

nixawk commented 5 years ago

add a backdoor driver into kernel-source

You can try to use other methods to backdoor the linux. (not driver)

~/Projects/kernelbuild/linux-5.0.3 ➭ zcat /proc/config.gz > .config
~/Projects/kernelbuild/linux-5.0.3 ➭ ll drivers/backdoor
total 12K
-rw-r--r-- 1 debug debug 3.3K Mar 22 16:41 backdoor.c
-rw-r--r-- 1 debug debug   94 Mar 22 16:57 Kconfig
-rw-r--r-- 1 debug debug   37 Mar 22 17:01 Makefile

~/Projects/kernelbuild/linux-5.0.3 ➭ make
...
  AR      drivers/backdoor/built-in.a
...

~/Projects/kernelbuild/linux-5.0.3 ➭ ll drivers/backdoor
total 16K
-rw-r--r-- 1 debug debug 3.3K Mar 22 16:41 backdoor.c
-rw-r--r-- 1 debug debug    8 Mar 22 17:23 built-in.a
-rw-r--r-- 1 debug debug   94 Mar 22 16:57 Kconfig
-rw-r--r-- 1 debug debug   37 Mar 22 17:01 Makefile
-rw-r--r-- 1 debug debug    0 Mar 22 17:23 modules.order
~/Projects/kernelbuild/linux-5.0.3 ➭  cat drivers/backdoor/Makefile
obj-$(CONFIG_BACKDOOR) += backdoor.o

~/Projects/kernelbuild/linux-5.0.3 ➭  cat drivers/backdoor/Kconfig
config BACKDOOR
    tristate "backdoor module"
    # depends on ARM
    help
        this is a backdoor module
~/Projects/kernelbuild/linux-5.0.3 ➭ grep backdoor drivers/Kconfig
source "drivers/backdoor/Kconfig"
~/Projects/kernelbuild/linux-5.0.3 ➭ grep backdoor drivers/Makefile
obj-y                           += backdoor/

create a iso

If you are a archer, archiso is a good choice.

references